diff --git a/.gitignore b/.gitignore index d15486e..f14f426 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ -_saves/* \ No newline at end of file +_saves/ +project/bgms/ +project/animates/ +_docs/ +常用工具/ +/.vs \ No newline at end of file diff --git a/B站视频教程.url b/B站视频教程.url deleted file mode 100644 index c045095..0000000 --- a/B站视频教程.url +++ /dev/null @@ -1,5 +0,0 @@ -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,2 -[InternetShortcut] -IDList= -URL=https://www.bilibili.com/video/BV1SB4y1p7bg?spm_id_from=333.999.0.0 \ No newline at end of file diff --git a/_server/CodeMirror/beautify.min.js b/_server/CodeMirror/beautify.min.js index d57943a..9e30be9 100644 --- a/_server/CodeMirror/beautify.min.js +++ b/_server/CodeMirror/beautify.min.js @@ -1 +1 @@ -!function(){var t=function(u){var i={};function n(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return u[t].call(e.exports,e,e.exports,n),e.l=!0,e.exports}return n.m=u,n.c=i,n.d=function(t,e,u){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:u})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var u=Object.create(null);if(n.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(u,i,function(t){return e[t]}.bind(null,i));return u},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,u){"use strict";var i=u(1).Beautifier,n=u(5).Options;t.exports=function(t,e){return new i(t,e).beautify()},t.exports.defaultOptions=function(){return new n}},function(t,e,u){"use strict";var i=u(2).Output,n=u(3).Token,o=u(4),_=u(5).Options,s=u(7).Tokenizer,p=u(7).line_starters,l=u(7).positionable_operators,f=u(7).TOKEN;function c(t,e){return-1!==e.indexOf(t)}function a(t,e){return t&&t.type===f.RESERVED&&t.text===e}function d(t,e){return t&&t.type===f.RESERVED&&c(t.text,e)}var b=["case","return","do","if","throw","else","await","break","continue","async"],g=function(t){for(var e={},u=0;uu&&(u=t.line_indent_level)),{mode:e,parent:t,last_token:t?t.last_token:new n(f.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:u,alignment:0,line_indent_level:t?t.line_indent_level:u,start_line_index:this._output.get_line_number(),ternary_depth:0}},T.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new i(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m);var u=new s(t,this._options);return this._tokens=u.tokenize(),t},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._reset(this._source_text),e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&o.lineBreak.test(t||"")&&(e=t.match(o.lineBreak)[0]));for(var u=this._tokens.next();u;)this.handle_token(u),this._last_last_text=this._flags.last_token.text,this._flags.last_token=u,u=this._tokens.next();return this._output.get_code(e)},T.prototype.handle_token=function(t,e){t.type===f.START_EXPR?this.handle_start_expr(t):t.type===f.END_EXPR?this.handle_end_expr(t):t.type===f.START_BLOCK?this.handle_start_block(t):t.type===f.END_BLOCK?this.handle_end_block(t):t.type===f.WORD?this.handle_word(t):t.type===f.RESERVED?this.handle_word(t):t.type===f.SEMICOLON?this.handle_semicolon(t):t.type===f.STRING?this.handle_string(t):t.type===f.EQUALS?this.handle_equals(t):t.type===f.OPERATOR?this.handle_operator(t):t.type===f.COMMA?this.handle_comma(t):t.type===f.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===f.COMMENT?this.handle_comment(t,e):t.type===f.DOT?this.handle_dot(t):t.type===f.EOF?this.handle_eof(t):(t.type,f.UNKNOWN,this.handle_unknown(t,e))},T.prototype.handle_whitespace_and_comments=function(t,e){var u=t.newlines,i=this._options.keep_array_indentation&&R(this._flags.mode);if(t.comments_before)for(var n=t.comments_before.next();n;)this.handle_whitespace_and_comments(n,e),this.handle_token(n,e),n=t.comments_before.next();if(i)for(var _=0;_this._options.max_preserve_newlines&&(u=this._options.max_preserve_newlines),this._options.preserve_newlines&&1this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},T.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},T.prototype.restore_mode=function(){0"===this._flags.last_token.text?this.set_mode(m):c(this._flags.last_token.type,[f.EQUALS,f.START_EXPR,f.COMMA,f.OPERATOR])||d(this._flags.last_token,["return","throw","import","default"])?this.set_mode(r):this.set_mode(m);var i=!e.comments_before&&"}"===e.text,n=i&&"function"===this._flags.last_word&&this._flags.last_token.type===f.END_EXPR;if(this._options.brace_preserve_inline){var _=0,s=null;this._flags.inline_frame=!0;do{if(_+=1,(s=this._tokens.peek(_-1)).newlines){this._flags.inline_frame=!1;break}}while(s.type!==f.EOF&&(s.type!==f.END_BLOCK||s.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==f.OPERATOR&&(n||this._flags.last_token.type===f.EQUALS||d(this._flags.last_token,b)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!R(this._previous_flags.mode)||this._flags.last_token.type!==f.START_EXPR&&this._flags.last_token.type!==f.COMMA||((this._flags.last_token.type===f.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==f.OPERATOR&&this._flags.last_token.type!==f.START_EXPR&&(this._flags.last_token.type!==f.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),this.print_token(t),this.indent(),i||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},T.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===w;)this.restore_mode();var e=this._flags.last_token.type===f.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(R(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)},T.prototype.handle_word=function(t){if(t.type===f.RESERVED)if(c(t.text,["set","get"])&&this._flags.mode!==r)t.type=f.WORD;else if("import"===t.text&&"("===this._tokens.peek().text)t.type=f.WORD;else if(c(t.text,["as","from"])&&!this._flags.import_block)t.type=f.WORD;else if(this._flags.mode===r){":"===this._tokens.peek().text&&(t.type=f.WORD)}if(this.start_of_statement(t)?d(this._flags.last_token,["var","let","const"])&&t.type===f.WORD&&(this._flags.declaration_statement=!0):!t.newlines||O(this._flags.mode)||this._flags.last_token.type===f.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===f.EQUALS||!this._options.preserve_newlines&&d(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(a(t,"while"))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&a(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===w;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(t,["case","default"]))return this.print_newline(),(this._flags.case_body||this._options.jslint_happy)&&(this.deindent(),this._flags.case_body=!1),this.print_token(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==f.COMMA&&this._flags.last_token.type!==f.START_EXPR&&this._flags.last_token.type!==f.EQUALS&&this._flags.last_token.type!==f.OPERATOR||this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t),a(t,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==f.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD?d(this._flags.last_token,["get","set","new","export"])||d(this._flags.last_token,A)?this._output.space_before_token=!0:a(this._flags.last_token,"default")&&"export"===this._last_last_text?this._output.space_before_token=!0:"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===f.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!O(this._flags.mode)&&!R(this._flags.mode))&&this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var e="NONE";(this._flags.last_token.type===f.END_BLOCK?this._previous_flags.inline_frame?e="SPACE":d(t,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?e="NEWLINE":(e="SPACE",this._output.space_before_token=!0):e="NEWLINE":this._flags.last_token.type===f.SEMICOLON&&this._flags.mode===m?e="NEWLINE":this._flags.last_token.type===f.SEMICOLON&&O(this._flags.mode)?e="SPACE":this._flags.last_token.type===f.STRING?e="NEWLINE":this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===r&&c(this._last_last_text,["{",","]))?e="SPACE":this._flags.last_token.type===f.START_BLOCK?e=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===f.END_EXPR&&(this._output.space_before_token=!0,e="NEWLINE"),d(t,p)&&")"!==this._flags.last_token.text&&(e=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),d(t,["else","catch","finally"]))?(this._flags.last_token.type!==f.END_BLOCK||this._previous_flags.mode!==m||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===e?d(this._flags.last_token,b)?this._output.space_before_token=!0:"declare"===this._flags.last_token.text&&d(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==f.END_EXPR?this._flags.last_token.type===f.START_EXPR&&d(t,["var","let","const"])||":"===this._flags.last_token.text||(a(t,"if")&&a(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):d(t,p)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&R(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===e&&(this._output.space_before_token=!0);!t.previous||t.previous.type!==f.WORD&&t.previous.type!==f.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===f.RESERVED&&("do"===t.text?this._flags.do_block=!0:"if"===t.text?this._flags.if_block=!0:"import"===t.text?this._flags.import_block=!0:this._flags.import_block&&a(t,"from")&&(this._flags.import_block=!1))},T.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();!(this._flags.mode!==w||this._flags.if_block&&a(e,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},T.prototype.handle_string=function(t){this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR||this._flags.last_token.type===f.EQUALS||this._flags.last_token.type===f.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):this.print_newline()),this.print_token(t)},T.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},T.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(O(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===r||this._flags.mode===w&&this._flags.parent.mode===r?(this._flags.mode===w&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},T.prototype.handle_operator=function(t){var e="*"===t.text&&(d(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[f.START_BLOCK,f.COMMA,f.END_BLOCK,f.SEMICOLON])),u=c(t.text,["-","+"])&&(c(this._flags.last_token.type,[f.START_BLOCK,f.START_EXPR,f.EQUALS,f.OPERATOR])||c(this._flags.last_token.text,p)||","===this._flags.last_token.text);if(this.start_of_statement(t));else{var i=!e;this.handle_whitespace_and_comments(t,i)}if(d(this._flags.last_token,b))return this._output.space_before_token=!0,void this.print_token(t);if("*"!==t.text||this._flags.last_token.type!==f.DOT)if("::"!==t.text){if(this._flags.last_token.type===f.OPERATOR&&c(this._options.operator_position,k)&&this.allow_wrap_or_preserved_newline(t),":"===t.text&&this._flags.in_case)return this._flags.case_body=!0,this.indent(),this.print_token(t),this.print_newline(),void(this._flags.in_case=!1);var n=!0,_=!0,s=!1;if(":"===t.text?0===this._flags.ternary_depth?n=!1:(this._flags.ternary_depth-=1,s=!0):"?"===t.text&&(this._flags.ternary_depth+=1),!u&&!e&&this._options.preserve_newlines&&c(t.text,l)){var a=":"===t.text,o=a&&s,r=a&&!s;switch(this._options.operator_position){case g.before_newline:return this._output.space_before_token=!r,this.print_token(t),a&&!o||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case g.after_newline:return this._output.space_before_token=!0,!a||o?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case g.preserve_newline:return r||this.allow_wrap_or_preserved_newline(t),n=!(this._output.just_added_newline()||r),this._output.space_before_token=n,this.print_token(t),void(this._output.space_before_token=!0)}}if(e){this.allow_wrap_or_preserved_newline(t),n=!1;var h=this._tokens.peek();_=h&&c(h.type,[f.WORD,f.RESERVED])}else"..."===t.text?(this.allow_wrap_or_preserved_newline(t),n=this._flags.last_token.type===f.START_BLOCK,_=!1):(c(t.text,["--","++","!","~"])||u)&&(this._flags.last_token.type!==f.COMMA&&this._flags.last_token.type!==f.START_EXPR||this.allow_wrap_or_preserved_newline(t),_=n=!1,!t.newlines||"--"!==t.text&&"++"!==t.text||this.print_newline(!1,!0),";"===this._flags.last_token.text&&O(this._flags.mode)&&(n=!0),this._flags.last_token.type===f.RESERVED?n=!0:this._flags.last_token.type===f.END_EXPR?n=!("]"===this._flags.last_token.text&&("--"===t.text||"++"===t.text)):this._flags.last_token.type===f.OPERATOR&&(n=c(t.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(t.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(_=!0)),(this._flags.mode!==m||this._flags.inline_frame)&&this._flags.mode!==w||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline());this._output.space_before_token=this._output.space_before_token||n,this.print_token(t),this._output.space_before_token=_}else this.print_token(t);else this.print_token(t)},T.prototype.handle_block_comment=function(t,e){if(this._output.raw)return this._output.add_raw_token(t),void(t.directives&&"end"===t.directives.preserve&&(this._output.raw=this._options.test_output_raw));if(t.directives)return this.print_newline(!1,e),this.print_token(t),"start"===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0);if(!o.newline.test(t.text)&&!t.newlines)return this._output.space_before_token=!0,this.print_token(t),void(this._output.space_before_token=!0);var u,i=function(t){for(var e=[],u=(t=t.replace(o.allLineBreaks,"\n")).indexOf("\n");-1!==u;)e.push(t.substring(0,u)),u=(t=t.substring(u+1)).indexOf("\n");return t.length&&e.push(t),e}(t.text),n=!1,_=!1,s=t.whitespace_before,a=s.length;if(this.print_newline(!1,e),this.print_token(t,i[0]),this.print_newline(!1,e),1this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return 0===this.__items.length},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},n.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},n.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var t=this.__cache.length,e=0,u="";this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,u=new Array(e+1).join(this.__indent_string)),t&&(u+=new Array(t+1).join(" ")),this.__cache.push(u)},_.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},_.prototype.get_line_number=function(){return this.__lines.length},_.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},_.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},_.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},_.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},_.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join("\n");return"\n"!==t&&(u=u.replace(/[\n]/g,t)),u},_.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},_.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),1>> === !== << && >= ** != == <= >> || < / - + > : & % ? ^ | *".split(" "),g=">>>= ... >>= <<= === >>> !== **= => ^= :: /= << <= == && -= >= >> != -- += ** || ++ %= &= *= |= = ! ? > < : / ^ - + * & % ~ |";g=(g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")).replace(/ /g,"|");var k,m=new RegExp(g),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),y=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),x=new RegExp("^(?:"+y.join("|")+")$"),v=function(t,e){n.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var u=new a(this._input),i=new o(this._input);i=(i=i.disable("handlebars")).disable("django"),this.__patterns={template:i,identifier:i.starting_with(r.identifier).matching(r.identifierMatch),number:u.matching(f),punct:u.matching(m),comment:u.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:u.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:u.matching(//),include:u.starting_with(/#include/).until_after(r.lineBreak),shebang:u.starting_with(/#!/).until_after(r.lineBreak),xml:u.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/),single_quote:i.until(/['\\\n\r\u2028\u2029]/),double_quote:i.until(/["\\\n\r\u2028\u2029]/),template_text:i.until(/[`\\$]/),template_expression:i.until(/[`}\\]/)}};(v.prototype=new n)._is_comment=function(t){return t.type===p.COMMENT||t.type===p.BLOCK_COMMENT||t.type===p.UNKNOWN},v.prototype._is_opening=function(t){return t.type===p.START_BLOCK||t.type===p.START_EXPR},v.prototype._is_closing=function(t,e){return(t.type===p.END_BLOCK||t.type===p.END_EXPR)&&e&&("]"===t.text&&"["===e.text||")"===t.text&&"("===e.text||"}"===t.text&&"{"===e.text)},v.prototype._reset=function(){k=!1},v.prototype._get_next_token=function(t,e){var u=null;this._readWhitespace();var i=this._input.peek();return null===i?this._create_token(p.EOF,""):u=(u=(u=(u=(u=(u=(u=(u=(u=u||this._read_string(i))||this._read_word(t))||this._read_singles(i))||this._read_comment(i))||this._read_regexp(i,t))||this._read_xml(i,t))||this._read_non_javascript(i))||this._read_punctuation())||this._create_token(p.UNKNOWN,this._input.next())},v.prototype._read_word=function(t){var e;return""!==(e=this.__patterns.identifier.read())?(e=e.replace(r.allLineBreaks,"\n"),t.type!==p.DOT&&(t.type!==p.RESERVED||"set"!==t.text&&"get"!==t.text)&&x.test(e)?"in"===e||"of"===e?this._create_token(p.OPERATOR,e):this._create_token(p.RESERVED,e):this._create_token(p.WORD,e)):""!==(e=this.__patterns.number.read())?this._create_token(p.WORD,e):void 0},v.prototype._read_singles=function(t){var e=null;return"("===t||"["===t?e=this._create_token(p.START_EXPR,t):")"===t||"]"===t?e=this._create_token(p.END_EXPR,t):"{"===t?e=this._create_token(p.START_BLOCK,t):"}"===t?e=this._create_token(p.END_BLOCK,t):";"===t?e=this._create_token(p.SEMICOLON,t):"."===t&&d.test(this._input.peek(1))?e=this._create_token(p.DOT,t):","===t&&(e=this._create_token(p.COMMA,t)),e&&this._input.next(),e},v.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(""!==t)return"="===t?this._create_token(p.EQUALS,t):this._create_token(p.OPERATOR,t)},v.prototype._read_non_javascript=function(t){var e="";if("#"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read()))return this._create_token(p.UNKNOWN,e.trim()+"\n");if(e=this.__patterns.include.read())return this._create_token(p.UNKNOWN,e.trim()+"\n");t=this._input.next();var u="#";if(this._input.hasNext()&&this._input.testChar(c)){for(;u+=t=this._input.next(),this._input.hasNext()&&"#"!==t&&"="!==t;);return"#"===t||("["===this._input.peek()&&"]"===this._input.peek(1)?(u+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(u+="{}",this._input.next(),this._input.next())),this._create_token(p.WORD,u)}this._input.back()}else if("<"===t){if(e=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(r.newline);)e+=this._input.next();return k=!0,this._create_token(p.COMMENT,e)}}else if(k&&"-"===t&&(e=this.__patterns.html_comment_end.read()))return k=!1,this._create_token(p.COMMENT,e);return null},v.prototype._read_comment=function(t){var e=null;if("/"===t){var u="";if("*"===this._input.peek(1)){u=this.__patterns.block_comment.read();var i=l.get_directives(u);i&&"start"===i.ignore&&(u+=l.readIgnored(this._input)),u=u.replace(r.allLineBreaks,"\n"),(e=this._create_token(p.BLOCK_COMMENT,u)).directives=i}else"/"===this._input.peek(1)&&(u=this.__patterns.comment.read(),e=this._create_token(p.COMMENT,u))}return e},v.prototype._read_string=function(t){if("`"!==t&&"'"!==t&&'"'!==t)return null;var e=this._input.next();return this.has_char_escapes=!1,e+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=function(t){var e="",u=0,i=new _(t),n=null;for(;i.hasNext();)if((n=i.match(/([\s]|[^\\]|\\\\)+/g))&&(e+=n[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())n=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){e+="\\",i.hasNext()&&(e+=i.next());continue}n=i.match(/u([0-9A-Fa-f]{4})/g)}if(!n)return t;if(126<(u=parseInt(n[1],16))&&u<=255&&0===n[0].indexOf("x"))return t;if(0<=u&&u<32){e+="\\"+n[0];continue}e+=34===u||39===u||92===u?"\\"+String.fromCharCode(u):String.fromCharCode(u)}return e}(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(r.allLineBreaks,"\n"),this._create_token(p.STRING,e)},v.prototype._allow_regexp_or_xml=function(t){return t.type===p.RESERVED&&h(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===p.END_EXPR&&")"===t.text&&t.opened.previous.type===p.RESERVED&&h(t.opened.previous.text,["if","while","for"])||h(t.type,[p.COMMENT,p.START_EXPR,p.START_BLOCK,p.START,p.END_BLOCK,p.OPERATOR,p.EQUALS,p.EOF,p.SEMICOLON,p.COMMA])},v.prototype._read_regexp=function(t,e){if("/"===t&&this._allow_regexp_or_xml(e)){for(var u=this._input.next(),i=!1,n=!1;this._input.hasNext()&&(i||n||this._input.peek()!==t)&&!this._input.testChar(r.newline);)u+=this._input.peek(),i?i=!1:(i="\\"===this._input.peek(),"["===this._input.peek()?n=!0:"]"===this._input.peek()&&(n=!1)),this._input.next();return this._input.peek()===t&&(u+=this._input.next(),u+=this._input.read(r.identifier)),this._create_token(p.STRING,u)}return null},v.prototype._read_xml=function(t,e){if(this._options.e4x&&"<"===t&&this._allow_regexp_or_xml(e)){var u="",i=this.__patterns.xml.read_match();if(i){for(var n=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),_=0===n.indexOf("{"),s=0;i;){var a=!!i[1],o=i[2];if(!(!!i[i.length-1]||"![CDATA["===o.slice(0,8))&&(o===n||_&&o.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(a?--s:++s),u+=i[0],s<=0)break;i=this.__patterns.xml.read_match()}return i||(u+=this._input.match(/[\s\S]*/g)[0]),u=u.replace(r.allLineBreaks,"\n"),this._create_token(p.STRING,u)}}return null},v.prototype._read_string_recursive=function(t,e,u){var i,n;"'"===t?n=this.__patterns.single_quote:'"'===t?n=this.__patterns.double_quote:"`"===t?n=this.__patterns.template_text:"}"===t&&(n=this.__patterns.template_expression);for(var _=n.read(),s="";this._input.hasNext();){if((s=this._input.next())===t||!e&&r.newline.test(s)){this._input.back();break}"\\"===s&&this._input.hasNext()?("x"===(i=this._input.peek())||"u"===i?this.has_char_escapes=!0:"\r"===i&&"\n"===this._input.peek(1)&&this._input.next(),s+=this._input.next()):u&&("${"===u&&"$"===s&&"{"===this._input.peek()&&(s+=this._input.next()),u===s&&(s+="`"===t?this._read_string_recursive("}",e,"`"):this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(s+=this._input.next()))),_+=s+=n.read()}return _},t.exports.Tokenizer=v,t.exports.TOKEN=p,t.exports.positionable_operators=b.slice(),t.exports.line_starters=w.slice()},function(t,e,u){"use strict";var n=RegExp.prototype.hasOwnProperty("sticky");function i(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){0=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=i},function(t,e,u){"use strict";var i=u(8).InputScanner,_=u(3).Token,s=u(10).TokenStream,n=u(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(t,e){this._input=new i(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};o.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();for(var e=new _(a.START,""),u=null,i=[],n=new s;e.type!==a.EOF;){for(t=this._get_next_token(e,u);this._is_comment(t);)n.add(t),t=this._get_next_token(e,u);n.isEmpty()||(t.comments_before=n,n=new s),t.parent=u,this._is_opening(t)?(i.push(u),u=t):u&&this._is_closing(t,u)&&((t.opened=u).closed=t,u=i.pop(),t.parent=u),(t.previous=e).next=t,this.__tokens.add(t),e=t}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(t,e){this._readWhitespace();var u=this._input.read(/.+/g);return u?this._create_token(a.RAW,u):this._create_token(a.EOF,"")},o.prototype._is_comment=function(t){return!1},o.prototype._is_opening=function(t){return!1},o.prototype._is_closing=function(t,e){return!1},o.prototype._create_token=function(t,e){return new _(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=o,t.exports.TOKEN=a},function(t,e,u){"use strict";function i(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}i.prototype.restart=function(){this.__position=0},i.prototype.isEmpty=function(){return 0===this.__tokens_length},i.prototype.hasNext=function(){return this.__position/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/)}}(_.prototype=new i)._create=function(){return new _(this._input,this)},_.prototype._update=function(){this.__set_templated_pattern()},_.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},_.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},_.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},_.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},_.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var u=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==u||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==u||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())));return t},t.exports.TemplatablePattern=_}]);"function"==typeof define&&define.amd?define([],function(){return{js_beautify:t}}):"undefined"!=typeof exports?exports.js_beautify=t:"undefined"!=typeof window?window.js_beautify=t:"undefined"!=typeof global&&(global.js_beautify=t)}(); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("beautifier",[],e):"object"==typeof exports?exports.beautifier=e():t.beautifier=e()}("undefined"!=typeof self?self:"undefined"!=typeof windows?window:"undefined"!=typeof global?global:this,(function(){return function(){"use strict";var t={7:function(t){function e(t,e){t="string"==typeof t?t:t.source,e="string"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(t);i;)e[i[1]]=i[2],i=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.t=e},418:function(t){var e=RegExp.prototype.hasOwnProperty("sticky");function i(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.g=i},915:function(t){function e(t,e){this.raw_options=function(t,e){var i,n={};for(i in t=function(t){var e,i={};for(e in t)i[e.replace(/-/g,"_")]=t[e];return i}(t))i!==e&&(n[i]=t[i]);if(e&&t[e])for(i in t[e])n[i]=t[e][i];return n}(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}e.prototype._get_array=function(t,e){var i=this.raw_options[t],n=e||[];return"object"==typeof i?null!==i&&"function"==typeof i.concat&&(n=i.concat()):"string"==typeof i&&(n=i.split(/[^a-zA-Z0-9_\/\-]+/)),n},e.prototype._get_boolean=function(t,e){var i=this.raw_options[t];return void 0===i?!!e:!!i},e.prototype._get_characters=function(t,e){var i=this.raw_options[t],n=e||"";return"string"==typeof i&&(n=i.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),n},e.prototype._get_number=function(t,e){var i=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var n=parseInt(i,10);return isNaN(n)&&(n=e),n},e.prototype._get_selection=function(t,e,i){var n=this._get_selection_list(t,e,i);if(1!==n.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return n[0]},e.prototype._get_selection_list=function(t,e,i){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(i=i||[e[0]],!this._is_valid_selection(i,e))throw new Error("Invalid Default Value!");var n=this._get_array(t,i);if(!this._is_valid_selection(n,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return n},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Ei=e},558:function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function i(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function n(t,n){this.__indent_cache=new i(t,n),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t},i.prototype.get_indent_size=function(t,e){var i=this.__base_string_length;return e=e||0,t<0&&(i=0),(i+=t*this.__indent_size)+e},i.prototype.get_indent_string=function(t,e){var i=this.__base_string;return e=e||0,t<0&&(t=0,i=""),e+=t*this.__indent_size,this.__ensure_cache(e),i+this.__cache[e]},i.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var t=this.__cache.length,e=0,i="";this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,i=new Array(e+1).join(this.__indent_string)),t&&(i+=new Array(t+1).join(" ")),this.__cache.push(i)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},n.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline()||(this.raw||this.__add_outputline(),0))},n.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join("\n");return"\n"!==t&&(i=i.replace(/[\n]/g,t)),i},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(t,i){for(var n=this.__lines.length-2;n>=0;){var _=this.__lines[n];if(_.is_empty())break;if(0!==_.item(0).indexOf(t)&&_.item(-1)!==i){this.__lines.splice(n+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},t.exports.r=n},348:function(t){function e(t,e){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,e&&(this._starting_pattern=this._input.get_regexp(e._starting_pattern,!0),this._match_pattern=this._input.get_regexp(e._match_pattern,!0),this._until_pattern=this._input.get_regexp(e._until_pattern),this._until_after=e._until_after)}e.prototype.read=function(){var t=this._input.read(this._starting_pattern);return this._starting_pattern&&!t||(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(t){var e=this._create();return e._until_after=!0,e._until_pattern=this._input.get_regexp(t),e._update(),e},e.prototype.until=function(t){var e=this._create();return e._until_after=!1,e._until_pattern=this._input.get_regexp(t),e._update(),e},e.prototype.starting_with=function(t){var e=this._create();return e._starting_pattern=this._input.get_regexp(t,!0),e._update(),e},e.prototype.matching=function(t){var e=this._create();return e._match_pattern=this._input.get_regexp(t,!0),e._update(),e},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},t.exports.c=e},800:function(t,e,i){var n=i(348).c,_={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(t,e){n.call(this,t,e),this.__template_pattern=null,this._disabled=Object.assign({},_),this._excluded=Object.assign({},_),e&&(this.__template_pattern=this._input.get_regexp(e.__template_pattern),this._excluded=Object.assign(this._excluded,e._excluded),this._disabled=Object.assign(this._disabled,e._disabled));var i=new n(t);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new n,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},s.prototype.read_options=function(t){var e=this._create();for(var i in _)e._disabled[i]=-1===t.templating.indexOf(i);return e._update(),e},s.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},s.prototype.read=function(){var t="";t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},s.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},s.prototype._read_template=function(){var t="",e=this._input.peek();if("<"===e){var i=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==i||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==i||(t=t||this.__patterns.erb.read())}else"{"===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=(t=(t=t||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return t},t.exports.A=s},650:function(t){t.exports.W=function(t,e,i,n){this.type=t,this.text=e,this.comments_before=null,this.newlines=i||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},147:function(t,e,i){var n=i(418).g,_=i(650).W,s=i(134).q,a=i(401).d,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(t,e){this._input=new n(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)};r.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new s,this._reset();for(var e=new _(u.START,""),i=null,n=[],a=new s;e.type!==u.EOF;){for(t=this._get_next_token(e,i);this._is_comment(t);)a.add(t),t=this._get_next_token(e,i);a.isEmpty()||(t.comments_before=a,a=new s),t.parent=i,this._is_opening(t)?(n.push(i),i=t):i&&this._is_closing(t,i)&&(t.opened=i,i.closed=t,i=n.pop(),t.parent=i),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(t,e){this._readWhitespace();var i=this._input.read(/.+/g);return i?this._create_token(u.RAW,i):this._create_token(u.EOF,"")},r.prototype._is_comment=function(t){return!1},r.prototype._is_opening=function(t){return!1},r.prototype._is_closing=function(t,e){return!1},r.prototype._create_token=function(t,e){return new _(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.d=r,t.exports.o=u},134:function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position=0&&t0&&this._indentLevel--},c.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===e&&(e="\n",t&&u.test(t||"")&&(e=t.match(u)[0]));var i=(t=t.replace(r,"\n")).match(/^[\t ]*/)[0];this._output=new _(this._options,i),this._input=new s(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var n,c,f=0,d=!1,g=!1,b=!1,m=!1,k=!1,w=!1,y=this._ch,x=!1;n=""!==this._input.read(h),c=y,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var v=this._input.read(p),E=a.get_directives(v);E&&"start"===E.ignore&&(v+=a.readIgnored(this._input)),this.print_string(v),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(l)),this.eatWhitespace(!0);else if("@"===this._ch||"$"===this._ch)if(this.preserveSingleSpace(n),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var O=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);O.match(/[ :]$/)&&(O=this.eatString(": ").replace(/\s$/,""),this.print_string(O),this._output.space_before_token=!0),"extend"===(O=O.replace(/\s$/,""))?m=!0:"import"===O&&(k=!0),O in this.NESTED_AT_RULE?(this._nestedLevel+=1,O in this.CONDITIONAL_GROUP_RULE&&(b=!0)):d||0!==f||-1===O.indexOf(":")||(g=!0,this.indent())}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(n),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)g&&(g=!1,this.outdent()),b?(b=!1,d=this._indentLevel>=this._nestedLevel):d=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&d&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===c?this._output.space_before_token=!1:","!==c&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===c&&this._output.trim(!0),k=!1,m=!1,g&&(this.outdent(),g=!1),this.print_string(this._ch),d=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var T=0;T"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||g||0!==f)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(n),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),o.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var N='"'===c||"'"===c;this.preserveSingleSpace(N||n),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&x&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&o.test(this._ch)&&(this._ch=""));return this._output.get_code(e)},t.exports.K=c},968:function(t,e,i){var n=i(434).K,_=i(492).E;t.exports=function(t,e){return new n(t,e).beautify()},t.exports.defaultOptions=function(){return new _}},492:function(t,e,i){var n=i(915).Ei;function _(t){n.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var e=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||e;var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var _=0;_0);return 0!==e},o.prototype.traverse_whitespace=function(t){return!(!t.whitespace_before&&!t.newlines||(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),0))},o.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},o.prototype.print_newline=function(t){this._output.add_new_line(t)},o.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))},o.prototype.indent=function(){this.indent_level++},o.prototype.get_full_indent=function(t){return(t=this.indent_level+(t||0))<1?"":this._output.get_indent_string(t)};function h(t,e){return-1!==e.indexOf(t)}function p(t,e,i){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=i||0,this.parser_token=e||null}function l(t){this._printer=t,this._current_frame=null}function c(t,e,i,_){this._source_text=t||"",e=e||{},this._js_beautify=i,this._css_beautify=_,this._tag_stack=null;var s=new n(e,"html");this._options=s,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,"force".length),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,"preserve".length),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}l.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},l.prototype.record_tag=function(t){var e=new p(this._current_frame,t,this._printer.indent_level);this._current_frame=e},l.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e},l.prototype._get_frame=function(t,e){for(var i=this._current_frame;i&&-1===t.indexOf(i.tag);){if(e&&-1!==e.indexOf(i.tag)){i=null;break}i=i.parent}return i},l.prototype.try_pop=function(t,e){var i=this._get_frame([t],e);return this._try_pop_frame(i)},l.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)},c.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&u.test(t)&&(e=t.match(u)[0]));var i=(t=t.replace(r,"\n")).match(/^[\t ]*/)[0],n={text:"",type:""},_=new f,h=new o(this._options,i),p=new s(t,this._options).tokenize();this._tag_stack=new l(h);for(var c=null,d=p.next();d.type!==a.EOF;)d.type===a.TAG_OPEN||d.type===a.COMMENT?_=c=this._handle_tag_open(h,d,_,n):d.type===a.ATTRIBUTE||d.type===a.EQUALS||d.type===a.VALUE||d.type===a.TEXT&&!_.tag_complete?c=this._handle_inside_tag(h,d,_,p):d.type===a.TAG_CLOSE?c=this._handle_tag_close(h,d,_):d.type===a.TEXT?c=this._handle_text(h,d,_):h.add_raw_token(d),n=c,d=p.next();return h._output.get_code(e)},c.prototype._handle_tag_close=function(t,e,i){var n={text:e.text,type:e.type};return t.alignment_size=0,i.tag_complete=!0,t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),i.is_unformatted?t.add_raw_token(e):("<"===i.tag_start_char&&(t.set_space_before_token("/"===e.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&i.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),!i.indent_content||i.is_unformatted||i.is_content_unformatted||(t.indent(),i.indent_content=!1),i.is_inline_element||i.is_unformatted||i.is_content_unformatted||t.set_wrap_point(),n},c.prototype._handle_inside_tag=function(t,e,i,n){var _=i.has_wrapped_attrs,s={text:e.text,type:e.type};if(t.set_space_before_token(e.newlines||""!==e.whitespace_before,!0),i.is_unformatted)t.add_raw_token(e);else if("{"===i.tag_start_char&&e.type===a.TEXT)t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e);else{if(e.type===a.ATTRIBUTE?(t.set_space_before_token(!0),i.attr_count+=1):(e.type===a.EQUALS||e.type===a.VALUE&&e.previous.type===a.EQUALS)&&t.set_space_before_token(!1),e.type===a.ATTRIBUTE&&"<"===i.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),_=_||0!==e.newlines),this._is_wrap_attributes_force)){var u=i.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&1===i.attr_count){var r,o=!0,h=0;do{if((r=n.peek(h)).type===a.ATTRIBUTE){o=!1;break}h+=1}while(h<4&&r.type!==a.EOF&&r.type!==a.TAG_CLOSE);u=!o}u&&(t.print_newline(!1),_=!0)}t.print_token(e),_=_||t.previous_token_wrapped(),i.has_wrapped_attrs=_}return s},c.prototype._handle_text=function(t,e,i){var n={text:e.text,type:"TK_CONTENT"};return i.custom_beautifier_name?this._print_custom_beatifier_text(t,e,i):i.is_unformatted||i.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),n},c.prototype._print_custom_beatifier_text=function(t,e,i){var n=this;if(""!==e.text){var _,s=e.text,a=1,u="",r="";"javascript"===i.custom_beautifier_name&&"function"==typeof this._js_beautify?_=this._js_beautify:"css"===i.custom_beautifier_name&&"function"==typeof this._css_beautify?_=this._css_beautify:"html"===i.custom_beautifier_name&&(_=function(t,e){return new c(t,e,n._js_beautify,n._css_beautify).beautify()}),"keep"===this._options.indent_scripts?a=0:"separate"===this._options.indent_scripts&&(a=-t.indent_level);var o=t.get_full_indent(a);if(s=s.replace(/\n[ \t]*$/,""),"html"!==i.custom_beautifier_name&&"<"===s[0]&&s.match(/^(|]]>)$/.exec(s);if(!h)return void t.add_raw_token(e);u=o+h[1]+"\n",s=h[4],h[5]&&(r=o+h[5]),s=s.replace(/\n[ \t]*$/,""),(h[2]||-1!==h[3].indexOf("\n"))&&(h=h[3].match(/[ \t]+$/))&&(e.whitespace_before=h[0])}if(s)if(_){var p=function(){this.eol="\n"};p.prototype=this._options.raw_options,s=_(o+s,new p)}else{var l=e.whitespace_before;l&&(s=s.replace(new RegExp("\n("+l+")?","g"),"\n")),s=o+s.replace(/\n/g,"\n"+o)}u&&(s=s?u+s+"\n"+r:u+r),t.print_newline(!1),s&&(e.text=s,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},c.prototype._handle_tag_open=function(t,e,i,n){var _=this._get_tag_open_token(e);return!i.is_unformatted&&!i.is_content_unformatted||i.is_empty_element||e.type!==a.TAG_OPEN||0!==e.text.indexOf("]*)/),this.tag_check=i?i[1]:""):(i=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=i?i[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==e.next?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===a.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&"/>"===e.closed.text;var n=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(n=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(n)))}else this.tag_complete=!0};c.prototype._get_tag_open_token=function(t){var e=new f(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||h(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&h(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&h(e.tag_check,this._options.content_unformatted),e.is_inline_element=h(e.tag_name,this._options.inline)||"{"===e.tag_start_char,e},c.prototype._set_tag_position=function(t,e,i,n,_){if(i.is_empty_element||(i.is_end_tag?i.start_tag_token=this._tag_stack.try_pop(i.tag_name):(this._do_optional_end_element(i)&&(i.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(i),"script"!==i.tag_name&&"style"!==i.tag_name||i.is_unformatted||i.is_content_unformatted||(i.custom_beautifier_name=function(t,e){var i=null,n=null;return e.closed?("script"===t?i="text/javascript":"style"===t&&(i="text/css"),i=function(t){for(var e=null,i=t.next;i.type!==a.EOF&&t.closed!==i;){if(i.type===a.ATTRIBUTE&&"type"===i.text){i.next&&i.next.type===a.EQUALS&&i.next.next&&i.next.next.type===a.VALUE&&(e=i.next.next.text);break}i=i.next}return e}(e)||i,i.search("text/css")>-1?n="css":i.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?n="javascript":i.search(/(text|application|dojo)\/(x-)?(html)/)>-1?n="html":i.search(/test\/null/)>-1&&(n="null"),n):null}(i.tag_check,e)))),h(i.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),i.is_empty_element)"{"===i.tag_start_char&&"else"===i.tag_check&&(this._tag_stack.indent_to_tag(["if","unless","each"]),i.indent_content=!0,t.current_line_has_match(/{{#if/)||t.print_newline(!1)),"!--"===i.tag_name&&_.type===a.TAG_CLOSE&&n.is_end_tag&&-1===i.text.indexOf("\n")||(i.is_inline_element||i.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,i));else if(i.is_end_tag){var s=!1;s=(s=i.start_tag_token&&i.start_tag_token.multiline_content)||!i.is_inline_element&&!(n.is_inline_element||n.is_unformatted)&&!(_.type===a.TAG_CLOSE&&i.start_tag_token===n)&&"TK_CONTENT"!==_.type,(i.is_content_unformatted||i.is_unformatted)&&(s=!1),s&&t.print_newline(!1)}else i.indent_content=!i.custom_beautifier_name,"<"===i.tag_start_char&&("html"===i.tag_name?i.indent_content=this._options.indent_inner_html:"head"===i.tag_name?i.indent_content=this._options.indent_head_inner_html:"body"===i.tag_name&&(i.indent_content=this._options.indent_body_inner_html)),i.is_inline_element||i.is_unformatted||"TK_CONTENT"===_.type&&!i.is_content_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,i)},c.prototype._calcluate_parent_multiline=function(t,e){!e.parent||!t._output.just_added_newline()||(e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element||(e.parent.multiline_content=!0)};var d=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],g=["a","audio","del","ins","map","noscript","video"];c.prototype._do_optional_end_element=function(t){var e=null;if(!t.is_empty_element&&t.is_start_tag&&t.parent){if("body"===t.tag_name)e=e||this._tag_stack.try_pop("head");else if("li"===t.tag_name)e=e||this._tag_stack.try_pop("li",["ol","ul"]);else if("dd"===t.tag_name||"dt"===t.tag_name)e=(e=e||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===t.parent.tag_name&&-1!==d.indexOf(t.tag_name)){var i=t.parent.parent;i&&-1!==g.indexOf(i.tag_name)||(e=e||this._tag_stack.try_pop("p"))}else"rp"===t.tag_name||"rt"===t.tag_name?e=(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===t.tag_name?e=e||this._tag_stack.try_pop("optgroup",["select"]):"option"===t.tag_name?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===t.tag_name?e=e||this._tag_stack.try_pop("caption",["table"]):"thead"===t.tag_name?e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===t.tag_name||"tfoot"===t.tag_name?e=(e=(e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===t.tag_name?e=(e=(e=e||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==t.tag_name&&"td"!==t.tag_name||(e=(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}},t.exports.K=c},391:function(t,e,i){var n=i(843).K,_=i(402).E;t.exports=function(t,e,i,_){return new n(t,e,i,_).beautify()},t.exports.defaultOptions=function(){return new _}},402:function(t,e,i){var n=i(915).Ei;function _(t){n.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}_.prototype=new n,t.exports.E=_},41:function(t,e,i){var n=i(147).d,_=i(147).o,s=i(7).t,a=i(800).A,u=i(348).c,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:_.START,RAW:_.RAW,EOF:_.EOF},o=new s(/<\!--/,/-->/),h=function(t,e){n.call(this,t,e),this._current_tag_name="";var i=new a(this._input).read_options(this._options),_=new u(this._input);if(this.__patterns={word:i.until(/[\n\r\t <]/),single_quote:i.until_after(/'/),double_quote:i.until_after(/"/),attribute:i.until(/[\n\r\t =>]|\/>/),element_name:i.until(/[\n\r\t >\/]/),handlebars_comment:_.starting_with(/{{!--/).until_after(/--}}/),handlebars:_.starting_with(/{{/).until_after(/}}/),handlebars_open:_.until(/[\n\r\t }]/),handlebars_raw_close:_.until(/}}/),comment:_.starting_with(//),cdata:_.starting_with(//),conditional_comment:_.starting_with(//),processing:_.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var s=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=_.matching(s).until_after(s)}};(h.prototype=new n)._is_comment=function(t){return!1},h.prototype._is_opening=function(t){return t.type===r.TAG_OPEN},h.prototype._is_closing=function(t,e){return t.type===r.TAG_CLOSE&&e&&((">"===t.text||"/>"===t.text)&&"<"===e.text[0]||"}}"===t.text&&"{"===e.text[0]&&"{"===e.text[1])},h.prototype._reset=function(){this._current_tag_name=""},h.prototype._get_next_token=function(t,e){var i=null;this._readWhitespace();var n=this._input.peek();return null===n?this._create_token(r.EOF,""):i=(i=(i=(i=(i=(i=(i=(i=(i=i||this._read_open_handlebars(n,e))||this._read_attribute(n,t,e))||this._read_close(n,e))||this._read_raw_content(n,t,e))||this._read_content_word(n))||this._read_comment_or_cdata(n))||this._read_processing(n))||this._read_open(n,e))||this._create_token(r.UNKNOWN,this._input.next())},h.prototype._read_comment_or_cdata=function(t){var e=null,i=null,n=null;return"<"===t&&("!"===this._input.peek(1)&&((i=this.__patterns.comment.read())?(n=o.get_directives(i))&&"start"===n.ignore&&(i+=o.readIgnored(this._input)):i=this.__patterns.cdata.read()),i&&((e=this._create_token(r.COMMENT,i)).directives=n)),e},h.prototype._read_processing=function(t){var e=null,i=null;if("<"===t){var n=this._input.peek(1);"!"!==n&&"?"!==n||(i=(i=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),i&&((e=this._create_token(r.COMMENT,i)).directives=null)}return e},h.prototype._read_open=function(t,e){var i=null,n=null;return e||"<"===t&&(i=this._input.next(),"/"===this._input.peek()&&(i+=this._input.next()),i+=this.__patterns.element_name.read(),n=this._create_token(r.TAG_OPEN,i)),n},h.prototype._read_open_handlebars=function(t,e){var i=null,n=null;return e||this._options.indent_handlebars&&"{"===t&&"{"===this._input.peek(1)&&("!"===this._input.peek(2)?(i=(i=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),n=this._create_token(r.COMMENT,i)):(i=this.__patterns.handlebars_open.read(),n=this._create_token(r.TAG_OPEN,i))),n},h.prototype._read_close=function(t,e){var i=null,n=null;return e&&("<"===e.text[0]&&(">"===t||"/"===t&&">"===this._input.peek(1))?(i=this._input.next(),"/"===t&&(i+=this._input.next()),n=this._create_token(r.TAG_CLOSE,i)):"{"===e.text[0]&&"}"===t&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),n=this._create_token(r.TAG_CLOSE,"}}"))),n},h.prototype._read_attribute=function(t,e,i){var n=null,_="";if(i&&"<"===i.text[0])if("="===t)n=this._create_token(r.EQUALS,this._input.next());else if('"'===t||"'"===t){var s=this._input.next();s+='"'===t?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),n=this._create_token(r.VALUE,s)}else(_=this.__patterns.attribute.read())&&(n=e.type===r.EQUALS?this._create_token(r.VALUE,_):this._create_token(r.ATTRIBUTE,_));return n},h.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},h.prototype._read_raw_content=function(t,e,i){var n="";if(i&&"{"===i.text[0])n=this.__patterns.handlebars_raw_close.read();else if(e.type===r.TAG_CLOSE&&"<"===e.opened.text[0]&&"/"!==e.text[0]){var _=e.opened.text.substr(1).toLowerCase();if("script"===_||"style"===_){var s=this._read_comment_or_cdata(t);if(s)return s.type=r.TEXT,s;n=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(_)&&(n=this._input.readUntil(new RegExp("","ig")))}return n?this._create_token(r.TEXT,n):null},h.prototype._read_content_word=function(t){var e="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(e=this.__patterns.unformatted_content_delimiter.read()),e||(e=this.__patterns.word.read()),e)return this._create_token(r.TEXT,e)},t.exports.d=h,t.exports.o=r},772:function(t,e,i){var n=i(82),_=i(968),s=i(391);function a(t,e,i,a){return s(t,e,i=i||n,a=a||_)}a.defaultOptions=s.defaultOptions,t.exports.js=n,t.exports.css=_,t.exports.html=a},273:function(t,e){var i="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="(?:\\\\u[0-9a-fA-F]{4}|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+i+"])";e.identifier=new RegExp(n+"(?:\\\\u[0-9a-fA-F]{4}|[\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f])*","g"),e.identifierStart=new RegExp(n),e.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a"+i+"\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")},282:function(t,e,i){var n=i(558).r,_=i(650).W,s=i(273),a=i(962).E,u=i(76).d2,r=i(76).O9,o=i(76).L2,h=i(76).o3;function p(t,e){return-1!==e.indexOf(t)}function l(t,e){return t&&t.type===h.RESERVED&&t.text===e}function c(t,e){return t&&t.type===h.RESERVED&&p(t.text,e)}var f=["case","return","do","if","throw","else","await","break","continue","async"],d=function(t){for(var e={},i=0;ii&&(i=t.line_indent_level)),{mode:e,parent:t,last_token:t?t.last_token:new _(h.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:i,alignment:0,line_indent_level:t?t.line_indent_level:i,start_line_index:this._output.get_line_number(),ternary_depth:0}},R.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new n(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(b);var i=new u(t,this._options);return this._tokens=i.tokenize(),t},R.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._reset(this._source_text),e=this._options.eol;"auto"===this._options.eol&&(e="\n",t&&s.lineBreak.test(t||"")&&(e=t.match(s.lineBreak)[0]));for(var i=this._tokens.next();i;)this.handle_token(i),this._last_last_text=this._flags.last_token.text,this._flags.last_token=i,i=this._tokens.next();return this._output.get_code(e)},R.prototype.handle_token=function(t,e){t.type===h.START_EXPR?this.handle_start_expr(t):t.type===h.END_EXPR?this.handle_end_expr(t):t.type===h.START_BLOCK?this.handle_start_block(t):t.type===h.END_BLOCK?this.handle_end_block(t):t.type===h.WORD||t.type===h.RESERVED?this.handle_word(t):t.type===h.SEMICOLON?this.handle_semicolon(t):t.type===h.STRING?this.handle_string(t):t.type===h.EQUALS?this.handle_equals(t):t.type===h.OPERATOR?this.handle_operator(t):t.type===h.COMMA?this.handle_comma(t):t.type===h.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===h.COMMENT?this.handle_comment(t,e):t.type===h.DOT?this.handle_dot(t):t.type===h.EOF?this.handle_eof(t):(t.type,h.UNKNOWN,this.handle_unknown(t,e))},R.prototype.handle_whitespace_and_comments=function(t,e){var i=t.newlines,n=this._options.keep_array_indentation&&O(this._flags.mode);if(t.comments_before)for(var _=t.comments_before.next();_;)this.handle_whitespace_and_comments(_,e),this.handle_token(_,e),_=t.comments_before.next();if(n)for(var s=0;s0,e);else if(this._options.max_preserve_newlines&&i>this._options.max_preserve_newlines&&(i=this._options.max_preserve_newlines),this._options.preserve_newlines&&i>1){this.print_newline(!1,e);for(var a=1;a0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},R.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},R.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===m&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},R.prototype.start_of_object_property=function(){return this._flags.parent.mode===k&&this._flags.mode===m&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||c(this._flags.last_token,["get","set"]))},R.prototype.start_of_statement=function(t){var e=!1;return!!(e=(e=(e=(e=(e=(e=(e=e||c(this._flags.last_token,["var","let","const"])&&t.type===h.WORD)||l(this._flags.last_token,"do"))||!(this._flags.parent.mode===k&&this._flags.mode===m)&&c(this._flags.last_token,A)&&!t.newlines)||l(this._flags.last_token,"else")&&!(l(t,"if")&&!t.comments_before))||this._flags.last_token.type===h.END_EXPR&&(this._previous_flags.mode===y||this._previous_flags.mode===x))||this._flags.last_token.type===h.WORD&&this._flags.mode===b&&!this._flags.in_case&&!("--"===t.text||"++"===t.text)&&"function"!==this._last_last_text&&t.type!==h.WORD&&t.type!==h.RESERVED)||this._flags.mode===k&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||c(this._flags.last_token,["get","set"])))&&(this.set_mode(m),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,c(t,["do","for","if","while"])),!0)},R.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=v;if("["===t.text){if(this._flags.last_token.type===h.WORD||")"===this._flags.last_token.text)return c(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));e=w,O(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),p(this._flags.last_token.type,[h.START_EXPR,h.END_EXPR,h.WORD,h.OPERATOR,h.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===h.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,e=y):p(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=x):p(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===t.whitespace_before?this._output.space_before_token=!1:(p(this._flags.last_token.text,r)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===h.WORD){this._output.space_before_token=!1;var i=this._tokens.peek(-3);if(this._options.space_after_named_function&&i){var n=this._tokens.peek(-4);c(i,["async","function"])||"*"===i.text&&c(n,["async","function"])?this._output.space_before_token=!0:this._flags.mode===k?"{"!==i.text&&","!==i.text&&("*"!==i.text||"{"!==n.text&&","!==n.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===h.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(p(this._last_last_text,["function","yield"])||this._flags.mode===k&&p(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===h.START_BLOCK?this.print_newline():this._flags.last_token.type!==h.END_EXPR&&this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==h.COMMA||this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},R.prototype.handle_end_expr=function(t){for(;this._flags.mode===m;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,"]"===t.text&&O(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==h.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(t),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===x&&(this._previous_flags.mode=v,this._flags.do_block=!1,this._flags.do_while=!1)},R.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),i=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===h.END_EXPR?(this.set_mode(b),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(b):i&&(p(i.text,[":",","])&&p(e.type,[h.STRING,h.WORD,h.RESERVED])||p(e.text,["get","set","..."])&&p(i.type,[h.WORD,h.RESERVED]))?p(this._last_last_text,["class","interface"])&&!p(i.text,[":",","])?this.set_mode(b):this.set_mode(k):this._flags.last_token.type===h.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(b):p(this._flags.last_token.type,[h.EQUALS,h.START_EXPR,h.COMMA,h.OPERATOR])||c(this._flags.last_token,["return","throw","import","default"])?this.set_mode(k):this.set_mode(b),this._flags.last_token&&c(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var n=!e.comments_before&&"}"===e.text,_=n&&"function"===this._flags.last_word&&this._flags.last_token.type===h.END_EXPR;if(this._options.brace_preserve_inline){var s=0,a=null;this._flags.inline_frame=!0;do{if(s+=1,(a=this._tokens.peek(s-1)).newlines){this._flags.inline_frame=!1;break}}while(a.type!==h.EOF&&(a.type!==h.END_BLOCK||a.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==h.OPERATOR&&(_||this._flags.last_token.type===h.EQUALS||c(this._flags.last_token,f)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!O(this._previous_flags.mode)||this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.COMMA||((this._flags.last_token.type===h.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==h.OPERATOR&&this._flags.last_token.type!==h.START_EXPR&&(this._flags.last_token.type!==h.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),this.print_token(t),this.indent(),n||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},R.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===m;)this.restore_mode();var e=this._flags.last_token.type===h.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(O(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)},R.prototype.handle_word=function(t){if(t.type===h.RESERVED&&(p(t.text,["set","get"])&&this._flags.mode!==k||"import"===t.text&&p(this._tokens.peek().text,["(","."])||p(t.text,["as","from"])&&!this._flags.import_block||this._flags.mode===k&&":"===this._tokens.peek().text)&&(t.type=h.WORD),this.start_of_statement(t)?c(this._flags.last_token,["var","let","const"])&&t.type===h.WORD&&(this._flags.declaration_statement=!0):!t.newlines||T(this._flags.mode)||this._flags.last_token.type===h.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===h.EQUALS||!this._options.preserve_newlines&&c(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(l(t,"while"))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&l(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===m;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&c(t,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==h.COMMA&&this._flags.last_token.type!==h.START_EXPR&&this._flags.last_token.type!==h.EQUALS&&this._flags.last_token.type!==h.OPERATOR||this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t),l(t,"function"))return(p(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!p(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==h.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD?c(this._flags.last_token,["get","set","new","export"])||c(this._flags.last_token,A)||l(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===h.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!T(this._flags.mode)&&!O(this._flags.mode))&&this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var e="NONE";this._flags.last_token.type===h.END_BLOCK?this._previous_flags.inline_frame?e="SPACE":c(t,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?e="NEWLINE":(e="SPACE",this._output.space_before_token=!0):e="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&this._flags.mode===b?e="NEWLINE":this._flags.last_token.type===h.SEMICOLON&&T(this._flags.mode)?e="SPACE":this._flags.last_token.type===h.STRING?e="NEWLINE":this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||"*"===this._flags.last_token.text&&(p(this._last_last_text,["function","yield"])||this._flags.mode===k&&p(this._last_last_text,["{",","]))?e="SPACE":this._flags.last_token.type===h.START_BLOCK?e=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===h.END_EXPR&&(this._output.space_before_token=!0,e="NEWLINE"),c(t,r)&&")"!==this._flags.last_token.text&&(e=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),c(t,["else","catch","finally"])?(this._flags.last_token.type!==h.END_BLOCK||this._previous_flags.mode!==b||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===e?c(this._flags.last_token,f)||"declare"===this._flags.last_token.text&&c(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==h.END_EXPR?this._flags.last_token.type===h.START_EXPR&&c(t,["var","let","const"])||":"===this._flags.last_token.text||(l(t,"if")&&l(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):c(t,r)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&O(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===e&&(this._output.space_before_token=!0),!t.previous||t.previous.type!==h.WORD&&t.previous.type!==h.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===h.RESERVED&&("do"===t.text?this._flags.do_block=!0:"if"===t.text?this._flags.if_block=!0:"import"===t.text?this._flags.import_block=!0:this._flags.import_block&&l(t,"from")&&(this._flags.import_block=!1))},R.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();!(this._flags.mode!==m||this._flags.if_block&&l(e,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},R.prototype.handle_string=function(t){(!t.text.startsWith("`")||0!==t.newlines||""!==t.whitespace_before||")"!==t.previous.text&&this._flags.last_token.type!==h.WORD)&&(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===h.RESERVED||this._flags.last_token.type===h.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===h.COMMA||this._flags.last_token.type===h.START_EXPR||this._flags.last_token.type===h.EQUALS||this._flags.last_token.type===h.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):!t.text.startsWith("`")||this._flags.last_token.type!==h.END_EXPR||"]"!==t.previous.text&&")"!==t.previous.text||0!==t.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(t)},R.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},R.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(T(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===k||this._flags.mode===m&&this._flags.parent.mode===k?(this._flags.mode===m&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},R.prototype.handle_operator=function(t){var e="*"===t.text&&(c(this._flags.last_token,["function","yield"])||p(this._flags.last_token.type,[h.START_BLOCK,h.COMMA,h.END_BLOCK,h.SEMICOLON])),i=p(t.text,["-","+"])&&(p(this._flags.last_token.type,[h.START_BLOCK,h.START_EXPR,h.EQUALS,h.OPERATOR])||p(this._flags.last_token.text,r)||","===this._flags.last_token.text);if(this.start_of_statement(t));else{var n=!e;this.handle_whitespace_and_comments(t,n)}if("*"!==t.text||this._flags.last_token.type!==h.DOT)if("::"!==t.text){if(this._flags.last_token.type===h.OPERATOR&&p(this._options.operator_position,g)&&this.allow_wrap_or_preserved_newline(t),":"===t.text&&this._flags.in_case)return this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==h.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var _=!0,s=!0,a=!1;if(":"===t.text?0===this._flags.ternary_depth?_=!1:(this._flags.ternary_depth-=1,a=!0):"?"===t.text&&(this._flags.ternary_depth+=1),!i&&!e&&this._options.preserve_newlines&&p(t.text,o)){var u=":"===t.text,l=u&&a,k=u&&!a;switch(this._options.operator_position){case d.before_newline:return this._output.space_before_token=!k,this.print_token(t),u&&!l||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case d.after_newline:return this._output.space_before_token=!0,!u||l?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case d.preserve_newline:return k||this.allow_wrap_or_preserved_newline(t),_=!(this._output.just_added_newline()||k),this._output.space_before_token=_,this.print_token(t),void(this._output.space_before_token=!0)}}if(e){this.allow_wrap_or_preserved_newline(t),_=!1;var w=this._tokens.peek();s=w&&p(w.type,[h.WORD,h.RESERVED])}else if("..."===t.text)this.allow_wrap_or_preserved_newline(t),_=this._flags.last_token.type===h.START_BLOCK,s=!1;else if(p(t.text,["--","++","!","~"])||i){if(this._flags.last_token.type!==h.COMMA&&this._flags.last_token.type!==h.START_EXPR||this.allow_wrap_or_preserved_newline(t),_=!1,s=!1,t.newlines&&("--"===t.text||"++"===t.text||"~"===t.text)){var y=c(this._flags.last_token,f)&&t.newlines;y&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(y,!0)}";"===this._flags.last_token.text&&T(this._flags.mode)&&(_=!0),this._flags.last_token.type===h.RESERVED?_=!0:this._flags.last_token.type===h.END_EXPR?_=!("]"===this._flags.last_token.text&&("--"===t.text||"++"===t.text)):this._flags.last_token.type===h.OPERATOR&&(_=p(t.text,["--","-","++","+"])&&p(this._flags.last_token.text,["--","-","++","+"]),p(t.text,["+","-"])&&p(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==b||this._flags.inline_frame)&&this._flags.mode!==m||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||_,this.print_token(t),this._output.space_before_token=s}else this.print_token(t);else this.print_token(t)},R.prototype.handle_block_comment=function(t,e){return this._output.raw?(this._output.add_raw_token(t),void(t.directives&&"end"===t.directives.preserve&&(this._output.raw=this._options.test_output_raw))):t.directives?(this.print_newline(!1,e),this.print_token(t),"start"===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):s.newline.test(t.text)||t.newlines?void this.print_block_commment(t,e):(this._output.space_before_token=!0,this.print_token(t),void(this._output.space_before_token=!0))},R.prototype.print_block_commment=function(t,e){var i,n=function(t){for(var e=[],i=(t=t.replace(s.allLineBreaks,"\n")).indexOf("\n");-1!==i;)e.push(t.substring(0,i)),i=(t=t.substring(i+1)).indexOf("\n");return t.length&&e.push(t),e}(t.text),_=!1,a=!1,u=t.whitespace_before,r=u.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(n[0]),this.print_newline(!1,e),n.length>1){for(_=function(t,e){for(var i=0;i>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=(b="\\?\\.(?!\\d) "+(b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var m,k=new RegExp(b),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),y=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),x=new RegExp("^(?:"+y.join("|")+")$"),v=function(t,e){_.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var i=new r(this._input),n=new o(this._input).read_options(this._options);this.__patterns={template:n,identifier:n.starting_with(u.identifier).matching(u.identifierMatch),number:i.matching(c),punct:i.matching(k),comment:i.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:i.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:i.matching(//),include:i.starting_with(/#include/).until_after(u.lineBreak),shebang:i.starting_with(/#!/).until_after(u.lineBreak),xml:i.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:n.until(/['\\\n\r\u2028\u2029]/),double_quote:n.until(/["\\\n\r\u2028\u2029]/),template_text:n.until(/[`\\$]/),template_expression:n.until(/[`}\\]/)}};(v.prototype=new _)._is_comment=function(t){return t.type===p.COMMENT||t.type===p.BLOCK_COMMENT||t.type===p.UNKNOWN},v.prototype._is_opening=function(t){return t.type===p.START_BLOCK||t.type===p.START_EXPR},v.prototype._is_closing=function(t,e){return(t.type===p.END_BLOCK||t.type===p.END_EXPR)&&e&&("]"===t.text&&"["===e.text||")"===t.text&&"("===e.text||"}"===t.text&&"{"===e.text)},v.prototype._reset=function(){m=!1},v.prototype._get_next_token=function(t,e){var i=null;this._readWhitespace();var n=this._input.peek();return null===n?this._create_token(p.EOF,""):i=(i=(i=(i=(i=(i=(i=(i=(i=i||this._read_non_javascript(n))||this._read_string(n))||this._read_word(t))||this._read_singles(n))||this._read_comment(n))||this._read_regexp(n,t))||this._read_xml(n,t))||this._read_punctuation())||this._create_token(p.UNKNOWN,this._input.next())},v.prototype._read_word=function(t){var e;return""!==(e=this.__patterns.identifier.read())?(e=e.replace(u.allLineBreaks,"\n"),t.type!==p.DOT&&(t.type!==p.RESERVED||"set"!==t.text&&"get"!==t.text)&&x.test(e)?"in"!==e&&"of"!==e||t.type!==p.WORD&&t.type!==p.STRING?this._create_token(p.RESERVED,e):this._create_token(p.OPERATOR,e):this._create_token(p.WORD,e)):""!==(e=this.__patterns.number.read())?this._create_token(p.WORD,e):void 0},v.prototype._read_singles=function(t){var e=null;return"("===t||"["===t?e=this._create_token(p.START_EXPR,t):")"===t||"]"===t?e=this._create_token(p.END_EXPR,t):"{"===t?e=this._create_token(p.START_BLOCK,t):"}"===t?e=this._create_token(p.END_BLOCK,t):";"===t?e=this._create_token(p.SEMICOLON,t):"."===t&&d.test(this._input.peek(1))?e=this._create_token(p.DOT,t):","===t&&(e=this._create_token(p.COMMA,t)),e&&this._input.next(),e},v.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(""!==t)return"="===t?this._create_token(p.EQUALS,t):"?."===t?this._create_token(p.DOT,t):this._create_token(p.OPERATOR,t)},v.prototype._read_non_javascript=function(t){var e="";if("#"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read()))return this._create_token(p.UNKNOWN,e.trim()+"\n");if(e=this.__patterns.include.read())return this._create_token(p.UNKNOWN,e.trim()+"\n");t=this._input.next();var i="#";if(this._input.hasNext()&&this._input.testChar(f)){do{i+=t=this._input.next()}while(this._input.hasNext()&&"#"!==t&&"="!==t);return"#"===t||("["===this._input.peek()&&"]"===this._input.peek(1)?(i+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(i+="{}",this._input.next(),this._input.next())),this._create_token(p.WORD,i)}this._input.back()}else if("<"===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(u.newline);)e+=this._input.next();return m=!0,this._create_token(p.COMMENT,e)}}else if(m&&"-"===t&&(e=this.__patterns.html_comment_end.read()))return m=!1,this._create_token(p.COMMENT,e);return null},v.prototype._read_comment=function(t){var e=null;if("/"===t){var i="";if("*"===this._input.peek(1)){i=this.__patterns.block_comment.read();var n=l.get_directives(i);n&&"start"===n.ignore&&(i+=l.readIgnored(this._input)),i=i.replace(u.allLineBreaks,"\n"),(e=this._create_token(p.BLOCK_COMMENT,i)).directives=n}else"/"===this._input.peek(1)&&(i=this.__patterns.comment.read(),e=this._create_token(p.COMMENT,i))}return e},v.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var e=this._input.next();return this.has_char_escapes=!1,e+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=function(t){for(var e="",i=0,_=new n(t),s=null;_.hasNext();)if((s=_.match(/([\s]|[^\\]|\\\\)+/g))&&(e+=s[0]),"\\"===_.peek()){if(_.next(),"x"===_.peek())s=_.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==_.peek()){e+="\\",_.hasNext()&&(e+=_.next());continue}s=_.match(/u([0-9A-Fa-f]{4})/g)}if(!s)return t;if((i=parseInt(s[1],16))>126&&i<=255&&0===s[0].indexOf("x"))return t;if(i>=0&&i<32){e+="\\"+s[0];continue}e+=34===i||39===i||92===i?"\\"+String.fromCharCode(i):String.fromCharCode(i)}return e}(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(u.allLineBreaks,"\n"),this._create_token(p.STRING,e)}return null},v.prototype._allow_regexp_or_xml=function(t){return t.type===p.RESERVED&&h(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===p.END_EXPR&&")"===t.text&&t.opened.previous.type===p.RESERVED&&h(t.opened.previous.text,["if","while","for"])||h(t.type,[p.COMMENT,p.START_EXPR,p.START_BLOCK,p.START,p.END_BLOCK,p.OPERATOR,p.EQUALS,p.EOF,p.SEMICOLON,p.COMMA])},v.prototype._read_regexp=function(t,e){if("/"===t&&this._allow_regexp_or_xml(e)){for(var i=this._input.next(),n=!1,_=!1;this._input.hasNext()&&(n||_||this._input.peek()!==t)&&!this._input.testChar(u.newline);)i+=this._input.peek(),n?n=!1:(n="\\"===this._input.peek(),"["===this._input.peek()?_=!0:"]"===this._input.peek()&&(_=!1)),this._input.next();return this._input.peek()===t&&(i+=this._input.next(),i+=this._input.read(u.identifier)),this._create_token(p.STRING,i)}return null},v.prototype._read_xml=function(t,e){if(this._options.e4x&&"<"===t&&this._allow_regexp_or_xml(e)){var i="",n=this.__patterns.xml.read_match();if(n){for(var _=n[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),s=0===_.indexOf("{"),a=0;n;){var r=!!n[1],o=n[2];if(!(n[n.length-1]||"![CDATA["===o.slice(0,8))&&(o===_||s&&o.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(r?--a:++a),i+=n[0],a<=0)break;n=this.__patterns.xml.read_match()}return n||(i+=this._input.match(/[\s\S]*/g)[0]),i=i.replace(u.allLineBreaks,"\n"),this._create_token(p.STRING,i)}}return null},v.prototype._read_string_recursive=function(t,e,i){var n,_;"'"===t?_=this.__patterns.single_quote:'"'===t?_=this.__patterns.double_quote:"`"===t?_=this.__patterns.template_text:"}"===t&&(_=this.__patterns.template_expression);for(var s=_.read(),a="";this._input.hasNext();){if((a=this._input.next())===t||!e&&u.newline.test(a)){this._input.back();break}"\\"===a&&this._input.hasNext()?("x"===(n=this._input.peek())||"u"===n?this.has_char_escapes=!0:"\r"===n&&"\n"===this._input.peek(1)&&this._input.next(),a+=this._input.next()):i&&("${"===i&&"$"===a&&"{"===this._input.peek()&&(a+=this._input.next()),i===a&&(a+="`"===t?this._read_string_recursive("}",e,"`"):this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(a+=this._input.next()))),s+=a+=_.read()}return s},t.exports.d2=v,t.exports.o3=p,t.exports.L2=g.slice(),t.exports.O9=w.slice()}},e={};return function i(n){var _=e[n];if(void 0!==_)return _.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}(772)}()})); \ No newline at end of file diff --git a/_server/CodeMirror/jshint.min.js b/_server/CodeMirror/jshint.min.js index 0acbc1d..fda6dc6 100644 --- a/_server/CodeMirror/jshint.min.js +++ b/_server/CodeMirror/jshint.min.js @@ -1 +1 @@ -var JSHINT;"undefined"==typeof window&&(window={}),function(){var e;e=function t(n,r,i){function o(a,u){if(!r[a]){if(!n[a]){var c="function"==typeof e&&e;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var f=r[a]={exports:{}};n[a][0].call(f.exports,function(e){var t=n[a][1][e];return o(t||e)},f,f.exports,t,n,r,i)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a=65&&i<=90||95===i||i>=97&&i<=122;for(var o=[],i=0;i<128;i++)o[i]=r[i]||i>=48&&i<=57;t.exports={asciiIdentifierStartTable:r,asciiIdentifierPartTable:o}},{}],2:[function(e,t,n){var r=[];[[768,112],[1155,5],[1425,45],1472,[1473,2],[1476,2],1480,[1552,11],[1611,31],1649,[1750,7],[1759,6],[1767,2],[1770,4],[1776,10],1810,[1840,27],[1958,11],[1984,10],[2027,9],[2070,4],[2075,9],[2085,3],[2089,5],[2137,3],[2276,27],[2304,4],[2362,3],[2366,18],[2385,7],[2402,2],[2406,10],[2433,3],2493,[2494,7],[2503,2],[2507,3],2520,[2530,2],[2534,10],[2561,3],2621,[2622,5],[2631,2],[2635,3],2642,[2662,12],2678,[2689,3],2749,[2750,8],[2759,3],[2763,3],[2786,2],[2790,10],[2817,3],2877,[2878,7],[2887,2],[2891,3],[2902,2],[2914,2],[2918,10],2947,[3006,5],[3014,3],[3018,4],3032,[3046,10],[3073,3],[3134,7],[3142,3],[3146,4],[3157,2],[3170,2],[3174,10],[3202,2],3261,[3262,7],[3270,3],[3274,4],[3285,2],[3298,2],[3302,10],[3330,2],[3390,7],[3398,3],[3402,4],3416,[3426,2],[3430,10],[3458,2],3531,[3535,6],3543,[3544,8],[3570,2],3634,[3636,7],[3655,8],[3664,10],3762,[3764,6],[3771,2],[3784,6],[3792,10],[3864,2],[3872,10],3894,3896,3898,[3902,2],[3953,20],[3974,2],[3981,11],[3993,36],4039,[4139,20],[4160,10],[4182,4],[4190,3],[4194,3],[4199,7],[4209,4],[4226,12],[4239,15],[4957,3],[5906,3],[5938,3],[5970,2],[6002,2],[6068,32],6110,[6112,10],[6155,3],[6160,10],6314,[6432,12],[6448,12],[6470,10],[6576,17],[6600,2],[6608,10],[6679,5],[6741,10],[6752,29],[6783,11],[6800,10],[6912,5],[6964,17],[6992,10],[7019,9],[7040,3],[7073,13],[7088,10],[7142,14],[7204,20],[7232,10],[7248,10],[7376,3],[7380,21],7406,[7410,3],[7616,39],[7676,4],[8204,2],[8255,2],8277,[8400,13],8418,[8421,12],[11503,3],11648,[11744,32],[12330,6],[12441,2],[42528,10],42608,[42612,10],42656,[42736,2],43011,43015,43020,[43043,5],[43136,2],[43188,17],[43216,10],[43232,18],[43264,10],[43302,8],[43335,13],[43392,4],[43443,14],[43472,10],[43561,14],43588,[43596,2],[43600,10],43644,43697,[43698,3],[43703,2],[43710,2],43714,[43755,5],[43765,2],[44003,8],[44012,2],[44016,10],64287,[65024,16],[65056,7],[65075,2],[65101,3],[65296,10],65344].forEach(function(o){for(var x=0;x<(o[1]||1);x++)r.push((o[0]||o)+x)});t.exports=r},{}],3:[function(e,t,n){var r=[];[171,182,187,[192,23],[216,31],[248,458],[710,12],[736,5],749,751,[880,5],[886,2],[890,4],903,[904,3],909,[910,20],[931,83],[1015,139],[1162,158],[1329,38],1370,[1377,39],[1488,27],[1520,3],[1568,43],[1646,2],[1649,99],1750,[1765,2],[1774,2],[1786,3],1792,1809,[1810,30],[1869,89],1970,[1994,33],[2036,2],2043,[2048,22],2075,2085,2089,[2112,25],2209,[2210,11],[2308,54],2366,2385,[2392,10],[2417,7],[2425,7],[2437,8],[2447,2],[2451,22],[2474,7],2483,[2486,4],2494,2511,[2524,2],[2527,3],[2544,2],[2565,6],[2575,2],[2579,22],[2602,7],[2610,2],[2613,2],[2616,2],[2649,4],2655,[2674,3],[2693,9],[2703,3],[2707,22],[2730,7],[2738,2],[2741,5],2750,2769,[2784,2],[2821,8],[2831,2],[2835,22],[2858,7],[2866,2],[2869,5],2878,[2908,2],[2911,3],2930,2948,[2949,6],[2958,3],[2962,4],[2969,2],2973,[2974,2],[2979,2],[2984,3],[2990,12],3025,[3077,8],[3086,3],[3090,23],[3114,10],[3125,5],3134,[3160,2],[3168,2],[3205,8],[3214,3],[3218,23],[3242,10],[3253,5],3262,3295,[3296,2],[3313,2],[3333,8],[3342,3],[3346,41],3390,3407,[3424,2],[3450,6],[3461,18],[3482,24],[3507,9],3518,[3520,7],[3585,48],[3634,2],[3648,7],[3713,2],3717,[3719,2],3723,3726,[3732,4],[3737,7],[3745,3],3750,3752,[3754,2],[3757,4],[3762,2],3774,[3776,5],3783,[3804,4],3841,[3904,8],[3913,36],[3976,5],[4096,43],4160,[4176,6],[4186,4],4194,[4197,2],[4206,3],[4213,13],4239,[4256,38],4296,4302,[4304,43],[4348,333],[4682,4],[4688,7],4697,[4698,4],[4704,41],[4746,4],[4752,33],[4786,4],[4792,7],4801,[4802,4],[4808,15],[4824,57],[4882,4],[4888,67],[4992,16],[5024,85],[5121,620],[5743,17],[5761,26],[5792,75],[5870,3],[5888,13],[5902,4],[5920,18],[5952,18],[5984,13],[5998,3],[6016,52],6104,6109,[6176,88],[6272,41],6315,[6320,70],[6400,29],[6480,30],[6512,5],[6528,44],[6593,7],[6656,23],[6688,53],6824,[6917,47],[6981,7],[7043,30],[7086,2],[7098,44],[7168,36],[7245,3],[7258,36],[7401,4],[7406,4],[7413,2],[7424,192],[7680,278],[7960,6],[7968,38],[8008,6],[8016,8],8026,8028,8030,[8031,31],[8064,53],[8118,7],8127,[8130,3],[8134,7],[8144,4],[8150,6],[8160,13],[8178,3],[8182,7],8306,8320,[8336,13],8451,8456,[8458,10],8470,[8473,5],8485,8487,8489,[8490,4],[8495,11],[8508,4],[8517,5],8527,[8544,41],[11264,47],[11312,47],[11360,133],[11499,4],[11506,2],[11520,38],11560,11566,[11568,56],11632,[11648,23],[11680,7],[11688,7],[11696,7],[11704,7],[11712,7],[11720,7],[11728,7],[11736,7],11824,[12293,3],[12321,9],[12337,5],[12344,5],[12353,86],[12445,3],[12449,90],[12540,4],[12549,41],[12593,94],[12704,27],[12784,16],[13312,6582],[19968,20941],[40960,1165],[42192,46],[42240,269],[42512,16],[42538,2],[42560,47],[42623,25],[42656,80],[42775,9],[42786,103],[42891,4],[42896,4],[42912,11],[43000,10],[43011,3],[43015,4],[43020,23],[43072,52],[43138,50],[43250,6],43260,[43274,28],[43312,23],[43360,29],[43396,47],43472,[43520,41],[43584,3],[43588,8],[43616,23],43643,[43648,48],43698,[43701,2],[43705,5],43713,43715,[43739,3],[43744,11],[43762,3],[43777,6],[43785,6],[43793,6],[43808,7],[43816,7],[43968,35],[44032,11172],[55216,23],[55243,49],[63744,366],[64112,106],[64256,7],[64275,5],64286,[64287,10],[64298,13],[64312,5],64319,[64320,2],[64323,2],[64326,108],[64467,363],[64848,64],[64914,54],[65008,12],[65136,5],[65142,135],[65313,26],[65345,26],[65382,89],[65474,6],[65482,6],[65490,6],[65498,3]].forEach(function(o){for(var x=0;x<(o[1]||1);x++)r.push((o[0]||o)+x)});t.exports=r},{}],4:[function(e,t,n){function r(e,t){return h.isUndefined(t)?""+t:h.isNumber(t)&&!isFinite(t)?t.toString():h.isFunction(t)||h.isRegExp(t)?t.toString():t}function i(e,t){return h.isString(e)?e.length=0;o--)if(s[o]!=a[o])return!1;for(o=s.length-1;o>=0;o--)if(i=s[o],!u(e[i],t[i]))return!1;return!0}function f(e,t){return!(!e||!t)&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,r){var i;h.isString(n)&&(r=n,n=null);try{t()}catch(e){i=e}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&s(i,n,"Missing expected exception"+r),!e&&f(i,n)&&s(i,n,"Got unwanted exception"+r),e&&i&&n&&!f(i,n)||!e&&i)throw i}var h=e("util/"),d=Array.prototype.slice,v=Object.prototype.hasOwnProperty,g=t.exports=a;g.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||s;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,a=r.indexOf("\n"+i);if(a>=0){var u=r.indexOf("\n",a+1);r=r.substring(u+1)}this.stack=r}}},h.inherits(g.AssertionError,Error),g.fail=s,g.ok=a,g.equal=function(e,t,n){e!=t&&s(e,t,n,"==",g.equal)},g.notEqual=function(e,t,n){e==t&&s(e,t,n,"!=",g.notEqual)},g.deepEqual=function(e,t,n){u(e,t)||s(e,t,n,"deepEqual",g.deepEqual)},g.notDeepEqual=function(e,t,n){u(e,t)&&s(e,t,n,"notDeepEqual",g.notDeepEqual)},g.strictEqual=function(e,t,n){e!==t&&s(e,t,n,"===",g.strictEqual)},g.notStrictEqual=function(e,t,n){e===t&&s(e,t,n,"!==",g.notStrictEqual)},g.throws=function(e,t,n){p.apply(this,[!0].concat(d.call(arguments)))},g.doesNotThrow=function(e,t){p.apply(this,[!1].concat(d.call(arguments)))},g.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t=[];for(var n in e)v.call(e,n)&&t.push(n);return t}},{"util/":9}],5:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,o,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],a(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),u=1;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=o;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){return e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],6:[function(e,t,n){function r(){if(!a){a=!0;for(var e,t=s.length;t;){e=s,s=[];for(var n=-1;++n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&w(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return k(i)||(i=u(e,i,r)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),v=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),_(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(w(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(E(t))return e.stylize(Date.prototype.toString.call(t),"date");if(_(t))return l(t)}var m="",y=!1,b=["{","}"];if(d(t)&&(y=!0,b=["[","]"]),w(t)&&(m=" [Function"+(t.name?": "+t.name:"")+"]"),x(t)&&(m=" "+RegExp.prototype.toString.call(t)),E(t)&&(m=" "+Date.prototype.toUTCString.call(t)),_(t)&&(m=" "+l(t)),0===s.length&&(!y||0==t.length))return b[0]+m+b[1];if(r<0)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var S;return S=y?f(e,t,r,v,s):s.map(function(n){return p(e,t,r,v,n,y)}),e.seen.pop(),h(S,m,b)}function c(e,t){if(y(t))return e.stylize("undefined","undefined");if(k(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i){for(var o=[],s=0,a=t.length;s-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function k(e){return"string"==typeof e}function y(e){return void 0===e}function x(e){return b(e)&&"[object RegExp]"===S(e)}function b(e){return"object"==typeof e&&null!==e}function E(e){return b(e)&&"[object Date]"===S(e)}function _(e){return b(e)&&("[object Error]"===S(e)||e instanceof Error)}function w(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function W(e){return e<10?"0"+e.toString(10):e.toString(10)}function A(){var e=new Date,t=[W(e.getHours()),W(e.getMinutes()),W(e.getSeconds())].join(":");return[e.getDate(),G[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var j=/%[sdj%]/g;n.format=function(e){if(!k(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),a=r[n];nt||!n||e===S&&r)return 1;if(e-1;);return n}function l(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function f(e,t){return r(e.criteria,t.criteria)||e.index-t.index}function p(e,t,n){for(var i=-1,o=e.criteria,s=t.criteria,a=o.length,u=n.length;++i=u?c:c*(n[i]?1:-1)}return e.index-t.index}function h(e){return Ne[e]}function d(e){return De[e]}function v(e){return"\\"+He[e]}function g(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function y(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nr&&(r=i)}return r}function Ye(e,t){for(var n=-1,r=e.length;++n=200?Xi(t):null,c=t.length;u&&(s=ze,a=!1,t=u);e:for(;++ii?0:i+n),(r=r===S||r>i?i:+r||0)<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;ni?0:i+t),(n=n===S||n>i?i:+n||0)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Ur(i);++r=200,u=a?Xi():null,c=[];u?(r=ze,s=!1):(a=!1,u=t?[]:c);e:for(;++n>>1,s=e[o];(n?s<=t:s2&&n[i-2],s=i>2&&n[2],a=i>1&&n[i-1];for("function"==typeof o?(o=zt(o,a,5),i-=2):i-=(o="function"==typeof a?a:null)?1:0,s&&Gn(n[0],n[1],s)&&(o=i<3?null:o,i=1);++r-1?n[s]:S}return dt(n,r,e)}}function sn(e){return function(t,n,r){return t&&t.length?(n=wn(n,r,3),i(t,n,e)):-1}}function an(e){return function(t,n,r){return n=wn(n,r,3),dt(t,n,e,!0)}}function un(e){return function(){var t=arguments.length;if(!t)return function(){return arguments[0]};for(var n,r=e?t:-1,i=0,o=Ur(t);e?r--:++r=t||!Si(t))return"";var i=t-r;return n=null==n?" ":n+"",Or(n,ui(i/n.length)).slice(0,i)}function mn(e,t,n,r){function i(){for(var t=-1,a=arguments.length,u=-1,c=r.length,l=Ur(a+c);++uu))return!1;for(;l&&++ai)||u===r&&u===o)&&(i=u,o=e)}),o}function wn(e,n,r){var i=t.callback||Mr;return i=i===Mr?at:i,r?i(e,n,r):i}function Sn(e,n,r){var i=t.indexOf||Xn;return i=i===Xn?o:i,e?i(e,n,r):i}function Wn(e,t,n){for(var r=-1,i=n?n.length:0;++r-1&&e%1==0&&e-1&&e%1==0&&e<=Ri}function In(e){return e===e&&(0===e?1/e>0:!kr(e))}function Fn(e,t){var n=e[1],r=t[1],i=n|r,o=i>>0,r=Ur(n);++t-1:Sn(e,t,n)>-1)}function ar(e,t,n){var r=Po(e)?Xe:wt;return t=wn(t,n,3),r(e,t)}function ur(e,t,n){if(n?Gn(e,t,n):null==t){var r=(e=Dn(e)).length;return r>0?e[Gt(0,r-1)]:S}var i=cr(e);return i.length=Li(t<0?0:+t||0,i.length),i}function cr(e){for(var t=-1,n=(e=Dn(e)).length,r=Ur(n);++t0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}function pr(e,t,n){function r(){var n=t-(So()-c);if(n<=0||n>t){a&&ci(a);var i=p;a=f=p=S,i&&(h=So(),u=e.apply(l,s),f||a||(s=l=null))}else f=mi(r,n)}function i(){f&&ci(f),a=f=p=S,(v||d!==t)&&(h=So(),u=e.apply(l,s),f||a||(s=l=null))}function o(){if(s=arguments,c=So(),l=this,p=v&&(f||!g),!1===d)var n=g&&!f;else{a||g||(h=c);var o=d-(c-h),m=o<=0||o>d;m?(a&&(a=ci(a)),h=c,u=e.apply(l,s)):a||(a=mi(i,o))}return m&&f?f=ci(f):f||t===d||(f=mi(r,t)),n&&(m=!0,u=e.apply(l,s)),!m||f||a||(s=l=null),u}var s,a,u,c,l,f,p,h=0,d=!1,v=!0;if("function"!=typeof e)throw new Zr(D);if(t=t<0?0:+t||0,!0===n){var g=!0;v=!1}else kr(n)&&(g=n.leading,d="maxWait"in n&&Ai(+n.maxWait||0,t),v="trailing"in n?n.trailing:v);return o.cancel=function(){f&&ci(f),a&&ci(a),a=f=p=S},o}function hr(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Zr(D);var n=function(){var r=arguments,i=n.cache,o=t?t.apply(this,r):r[0];if(i.has(o))return i.get(o);var s=e.apply(this,r);return i.set(o,s),s};return n.cache=new hr.Cache,n}function dr(e,t){if("function"!=typeof e)throw new Zr(D);return t=Ai(t===S?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=Ai(n.length-t,0),o=Ur(i);++r-1}function mr(e){return m(e)&&"string"==typeof e.message&&ri.call(e)==Z}function kr(e){var t=typeof e;return"function"==t||!!e&&"object"==t}function yr(e){return null!=e&&(ri.call(e)==X?oi.test(ei.call(e)):m(e)&&Oe.test(e))}function xr(e){return"number"==typeof e||m(e)&&ri.call(e)==K}function br(e){return m(e)&&ri.call(e)==Q||!1}function Er(e){return"string"==typeof e||m(e)&&ri.call(e)==ee}function _r(e){return m(e)&&Vn(e.length)&&!!Re[ri.call(e)]}function wr(e){return st(e,Wr(e))}function Sr(e){return yt(e,Wr(e))}function Wr(e){if(null==e)return[];kr(e)||(e=Hr(e));var t=e.length;t=t&&Vn(t)&&(Po(e)||Ni.nonEnumArgs&&vr(e))&&t||0;for(var n=e.constructor,r=-1,i="function"==typeof n&&n.prototype===e,o=Ur(t),s=t>0;++r>>1,Pi=bi?bi.BYTES_PER_ELEMENT:0,Ri=qr.pow(2,53)-1,Ui=xi&&new xi,Bi={},Ni=t.support={};!function(e){var t=function(){this.x=e},n=[];t.prototype={valueOf:e,y:e};for(var r in new t)n.push(r);Ni.funcDecomp=/\bthis\b/.test(function(){return this}),Ni.funcNames="string"==typeof Dr.name;try{Ni.dom=11===Qr.createDocumentFragment().nodeType}catch(e){Ni.dom=!1}try{Ni.nonEnumArgs=!vi.call(arguments,1)}catch(e){Ni.nonEnumArgs=!0}}(1,0),t.templateSettings={escape:ke,evaluate:ye,interpolate:xe,variable:"",imports:{_:t}};var Di=Ei||function(e,t){return null==t?e:st(t,eo(t),st(t,Xo(t),e))},qi=function(){function t(){}return function(n){if(kr(n)){t.prototype=n;var r=new t;t.prototype=null}return r||e.Object()}}(),zi=Kt(mt),Hi=Kt(kt,!0),$i=Yt(),Ji=Yt(!0),Zi=Ui?function(e,t){return Ui.set(e,t),e}:Ir;ai||(Ht=si&&yi?function(e){var t=e.byteLength,n=bi?li(t/Pi):0,r=n*Pi,i=new si(t);if(n){var o=new bi(i,0,n);o.set(new bi(e,0,n))}return t!=r&&(o=new yi(i,r)).set(new yi(e,r)),i}:Vr(null));var Xi=wi&&gi?function(e){return new qe(e)}:Vr(null),Ki=Ui?function(e){return Ui.get(e)}:Pr,Yi=Ni.funcNames?"constant"==Vr.name?jt("name"):function(e){for(var t=e.name,n=Bi[t],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}:Vr(""),Qi=jt("length"),eo=fi?function(e){return fi(qn(e))}:Vr([]),to=function(){var e=0,t=0;return function(n,r){var i=So(),o=R-(i-t);if(t=i,o>0){if(++e>=P)return n}else e=0;return Zi(n,r)}}(),no=dr(function(e,t){return Po(e)||vr(e)?lt(e,vt(t,!1,!0)):[]}),ro=sn(),io=sn(!0),oo=dr(function(e,t){e||(e=[]);var n=ot(e,t=vt(t));return Ot(e,t.sort(r)),n}),so=kn(),ao=kn(!0),uo=dr(function(e){return Rt(vt(e,!1,!0))}),co=dr(function(e,t){return Po(e)||vr(e)?lt(e,t):[]}),lo=dr(er),fo=dr(function(e,t){return Vn(e?Qi(e):0)&&(e=Dn(e)),ot(e,vt(t))}),po=Zt(function(e,t,n){ti.call(e,n)?++e[n]:e[n]=1}),ho=on(zi),vo=on(Hi,!0),go=cn($e,zi),mo=cn(function(e,t){for(var n=e.length;n--&&!1!==t(e[n],n,e););return e},Hi),ko=Zt(function(e,t,n){ti.call(e,n)?e[n].push(t):e[n]=[t]}),yo=Zt(function(e,t,n){e[n]=t}),xo=dr(function(e,t,n){var r=-1,i="function"==typeof t,o=Cn(t),s=Qi(e),a=Vn(s)?Ur(s):[];return zi(e,function(e){var s=i?t:o&&null!=e&&e[t];a[++r]=s?s.apply(e,n):Tn(e,t,n)}),a}),bo=Zt(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Eo=dn(function(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i=120?Xi(t&&u):null))}if((n=e.length)<2)return a;var c=e[0],l=-1,f=c?c.length:0,p=r[0];e:for(;++l-1;)ki.call(t,o,1);return t},t.pullAt=oo,t.range=function(e,t,n){n&&Gn(e,t,n)&&(t=n=null),e=+e||0,n=null==n?1:+n||0,null==t?(t=e,e=0):t=+t||0;for(var r=-1,i=Ai(ui((t-e)/(n||1)),0),o=Ur(i);++r=0&&e.indexOf(t,n)==n},t.escape=function(e){return e=a(e),e&&me.test(e)?e.replace(ve,d):e},t.escapeRegExp=jr,t.every=ir,t.find=ho,t.findIndex=ro,t.findKey=qo,t.findLast=vo,t.findLastIndex=io,t.findLastKey=zo,t.findWhere=function(e,t){return ho(e,St(t))},t.first=Zn,t.get=function(e,t,n){var r=null==e?S:xt(e,zn(t),t+"");return r===S?n:r},t.has=function(e,t){if(null==e)return!1;var n=ti.call(e,t);return n||Cn(t)||(e=1==(t=zn(t)).length?e:xt(e,Mt(t,0,-1)),t=Kn(t),n=null!=e&&ti.call(e,t)),n},t.identity=Ir,t.includes=sr,t.indexOf=Xn,t.inRange=function(e,t,n){return t=+t||0,void 0===n?(n=t,t=0):n=+n||0,e>=Li(t,n)&&e=t||!Si(t))return e;var i=(t-r)/2,o=li(i);return(n=gn("",ui(i),n)).slice(0,o)+e+n},t.padLeft=ns,t.padRight=rs,t.parseInt=Tr,t.random=function(e,t,n){n&&Gn(e,t,n)&&(t=n=null);var r=null==e,i=null==t;if(null==n&&(i&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,i=!0)),r&&i&&(t=1,i=!1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1){var o=Gi();return Li(e+o*(t-e+parseFloat("1e-"+((o+"").length-1))),t)}return Gt(e,t)},t.reduce=Eo,t.reduceRight=_o,t.repeat=Or,t.result=function(e,t,n){var r=null==e?S:e[t];return r===S&&(null==e||Cn(t,e)||(r=null==(e=1==(t=zn(t)).length?e:xt(e,Mt(t,0,-1)))?S:e[Kn(t)]),r=r===S?n:r),Uo(r)?r.call(e):r},t.runInContext=w,t.size=function(e){var t=e?Qi(e):0;return Vn(t)?t:Xo(e).length},t.snakeCase=is,t.some=lr,t.sortedIndex=so,t.sortedLastIndex=ao,t.startCase=os,t.startsWith=function(e,t,n){return e=a(e),n=null==n?0:Li(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n},t.sum=function(e,t,n){n&&Gn(e,t,n)&&(t=null);var r=wn(),i=null==t;return r===at&&i||(i=!1,t=r(t,n,3)),i?tt(Po(e)?e:Dn(e)):Pt(e,t)},t.template=function(e,n,r){var i=t.templateSettings;r&&Gn(e,n,r)&&(n=r=null),e=a(e),n=it(Di({},r||n),i,rt);var o,s,u=it(Di({},n.imports),i.imports,rt),c=Xo(u),l=Ut(u,c),f=0,p=n.interpolate||Ce,h="__p += '",d=$r((n.escape||Ce).source+"|"+p.source+"|"+(p===xe?Le:Ce).source+"|"+(n.evaluate||Ce).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Pe+"]")+"\n";e.replace(d,function(t,n,r,i,a,u){return r||(r=i),h+=e.slice(f,u).replace(Me,v),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+t.length,t}),h+="';\n";var m=n.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(s?h.replace(fe,""):h).replace(pe,"$1").replace(he,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var k=ss(function(){return Dr(c,g+"return "+h).apply(S,l)});if(k.source=h,mr(k))throw k;return k},t.trim=Gr,t.trimLeft=function(e,t,n){var r=e;return e=a(e),e?(n?Gn(r,t,n):null==t)?e.slice(b(e)):e.slice(c(e,t+"")):e},t.trimRight=function(e,t,n){var r=e;return e=a(e),e?(n?Gn(r,t,n):null==t)?e.slice(0,E(e)+1):e.slice(0,l(e,t+"")+1):e},t.trunc=function(e,t,n){n&&Gn(e,t,n)&&(t=null);var r=I,i=F;if(null!=t)if(kr(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?a(t.omission):i}else r=+t||0;if(e=a(e),r>=e.length)return e;var s=r-i.length;if(s<1)return i;var u=e.slice(0,s);if(null==o)return u+i;if(br(o)){if(e.slice(s).search(o)){var c,l,f=e.slice(0,s);for(o.global||(o=$r(o.source,(je.exec(o)||"")+"g")),o.lastIndex=0;c=o.exec(f);)l=c.index;u=u.slice(0,null==l?s:l)}}else if(e.indexOf(o,s)!=s){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i},t.unescape=function(e){return e=a(e),e&&ge.test(e)?e.replace(de,_):e},t.uniqueId=function(e){var t=++ni;return a(e)+t},t.words=Cr,t.all=ir,t.any=lr,t.contains=sr,t.detect=ho,t.foldl=Eo,t.foldr=_o,t.head=Zn,t.include=sr,t.inject=Eo,Fr(t,function(){var e={};return mt(t,function(n,r){t.prototype[r]||(e[r]=n)}),e}(),!1),t.sample=ur,t.prototype.sample=function(e){return this.__chain__||null!=e?this.thru(function(t){return ur(t,e)}):ur(this.value())},t.VERSION=W,$e(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){t[e].placeholder=t}),$e(["dropWhile","filter","map","takeWhile"],function(e,t){var n=t!=N,r=t==U;Ne.prototype[e]=function(e,i){var o=this.__filtered__,s=o&&r?new Ne(this):this.clone();return(s.__iteratees__||(s.__iteratees__=[])).push({done:!1,count:0,index:0,iteratee:wn(e,i,1),limit:-1,type:t}),s.__filtered__=o||n,s}}),$e(["drop","take"],function(e,t){var n=e+"While";Ne.prototype[e]=function(n){var r=this.__filtered__,i=r&&!t?this.dropWhile():this.clone();return n=null==n?1:Ai(li(n)||0,0),r?t?i.__takeCount__=Li(i.__takeCount__,n):Kn(i.__iteratees__).limit=n:(i.__views__||(i.__views__=[])).push({size:n,type:e+(i.__dir__<0?"Right":"")}),i},Ne.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()},Ne.prototype[e+"RightWhile"]=function(e,t){return this.reverse()[n](e,t).reverse()}}),$e(["first","last"],function(e,t){var n="take"+(t?"Right":"");Ne.prototype[e]=function(){return this[n](1).value()[0]}}),$e(["initial","rest"],function(e,t){var n="drop"+(t?"":"Right");Ne.prototype[e]=function(){return this[n](1)}}),$e(["pluck","where"],function(e,t){var n=t?"filter":"map",r=t?St:Rr;Ne.prototype[e]=function(e){return this[n](r(e))}}),Ne.prototype.compact=function(){return this.filter(Ir)},Ne.prototype.reject=function(e,t){return e=wn(e,t,1),this.filter(function(t){return!e(t)})},Ne.prototype.slice=function(e,t){var n=(e=null==e?0:+e||0)<0?this.takeRight(-e):this.drop(e);return t!==S&&(n=(t=+t||0)<0?n.dropRight(-t):n.take(t-e)),n},Ne.prototype.toArray=function(){return this.drop(0)},mt(Ne.prototype,function(e,n){var r=t[n];if(r){var i=/^(?:filter|map|reject)|While$/.test(n),o=/^(?:first|last)$/.test(n);t.prototype[n]=function(){var n=arguments,s=(n.length,this.__chain__),a=this.__wrapped__,u=!!this.__actions__.length,c=a instanceof Ne,l=n[0],f=c||Po(a);f&&i&&"function"==typeof l&&1!=l.length&&(c=f=!1);var p=c&&!u;if(o&&!s)return p?e.call(a):r.call(t,this.value());var h=function(e){var i=[e];return hi.apply(i,n),r.apply(t,i)};if(f){var d=p?a:new Ne(this),v=e.apply(d,n);return o||!u&&!v.__actions__||(v.__actions__||(v.__actions__=[])).push({func:rr,args:[h],thisArg:t}),new k(v,s)}return this.thru(h)}}}),$e(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?Yr:Xr)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),mt(Ne.prototype,function(e,n){var r=t[n];if(r){var i=r.name;(Bi[i]||(Bi[i]=[])).push({name:n,func:r})}}),Bi[vn(null,L).name]=[{name:"wrapper",func:null}],Ne.prototype.clone=function(){var e=this.__actions__,t=this.__iteratees__,n=this.__views__,r=new Ne(this.__wrapped__);return r.__actions__=e?He(e):null,r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=t?He(t):null,r.__takeCount__=this.__takeCount__,r.__views__=n?He(n):null,r},Ne.prototype.reverse=function(){if(this.__filtered__){var e=new Ne(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ne.prototype.value=function(){var e=this.__wrapped__.value();if(!Po(e))return Nt(e,this.__actions__);var t=this.__dir__,n=t<0,r=Wn(0,e.length,this.__views__),i=r.start,o=r.end,s=o-i,a=n?o:i-1,u=Li(s,this.__takeCount__),c=this.__iteratees__,l=c?c.length:0,f=0,p=[];e:for(;s--&&fv.index:a-1?v.count++>=k:!g(d)))continue e}}else{var y=g(d);if(m==N)d=y;else if(!y){if(m==B)continue e;break e}}}p[f++]=d}return p},t.prototype.chain=function(){return nr(this)},t.prototype.commit=function(){return new k(this.value(),this.__chain__)},t.prototype.plant=function(e){for(var t,r=this;r instanceof n;){var i=Hn(r);t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},t.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof Ne?(this.__actions__.length&&(e=new Ne(this)),new k(e.reverse(),this.__chain__)):this.thru(function(e){return e.reverse()})},t.prototype.toString=function(){return this.value()+""},t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=function(){return Nt(this.__wrapped__,this.__actions__)},t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var S,W="3.7.0",A=1,L=2,j=4,T=8,O=16,G=32,C=64,M=128,V=256,I=30,F="...",P=150,R=16,U=0,B=1,N=2,D="Expected a function",q="__lodash_placeholder__",z="[object Arguments]",H="[object Array]",$="[object Boolean]",J="[object Date]",Z="[object Error]",X="[object Function]",K="[object Number]",Y="[object Object]",Q="[object RegExp]",ee="[object String]",te="[object ArrayBuffer]",ne="[object Float32Array]",re="[object Float64Array]",ie="[object Int8Array]",oe="[object Int16Array]",se="[object Int32Array]",ae="[object Uint8Array]",ue="[object Uint8ClampedArray]",ce="[object Uint16Array]",le="[object Uint32Array]",fe=/\b__p \+= '';/g,pe=/\b(__p \+=) '' \+/g,he=/(__e\(.*?\)|\b__t\)) \+\n'';/g,de=/&(?:amp|lt|gt|quot|#39|#96);/g,ve=/[&<>"'`]/g,ge=RegExp(de.source),me=RegExp(ve.source),ke=/<%-([\s\S]+?)%>/g,ye=/<%([\s\S]+?)%>/g,xe=/<%=([\s\S]+?)%>/g,be=/\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,Ee=/^\w*$/,_e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,we=/[.*+?^${}()|[\]\/\\]/g,Se=RegExp(we.source),We=/[\u0300-\u036f\ufe20-\ufe23]/g,Ae=/\\(\\)?/g,Le=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,je=/\w*$/,Te=/^0[xX]/,Oe=/^\[object .+?Constructor\]$/,Ge=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ce=/($^)/,Me=/['\n\r\u2028\u2029\\]/g,Ve=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),Ie=" \t\v\f \ufeff\n\r\u2028\u2029 ᠎              ",Fe=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],Pe=-1,Re={};Re[ne]=Re[re]=Re[ie]=Re[oe]=Re[se]=Re[ae]=Re[ue]=Re[ce]=Re[le]=!0,Re[z]=Re[H]=Re[te]=Re[$]=Re[J]=Re[Z]=Re[X]=Re["[object Map]"]=Re[K]=Re[Y]=Re[Q]=Re["[object Set]"]=Re[ee]=Re["[object WeakMap]"]=!1;var Ue={};Ue[z]=Ue[H]=Ue[te]=Ue[$]=Ue[J]=Ue[ne]=Ue[re]=Ue[ie]=Ue[oe]=Ue[se]=Ue[K]=Ue[Y]=Ue[Q]=Ue[ee]=Ue[ae]=Ue[ue]=Ue[ce]=Ue[le]=!0,Ue[Z]=Ue[X]=Ue["[object Map]"]=Ue["[object Set]"]=Ue["[object WeakMap]"]=!1;var Be={leading:!1,maxWait:0,trailing:!1},Ne={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},De={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},qe={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},ze={function:!0,object:!0},He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$e=ze[typeof n]&&n&&!n.nodeType&&n,Je=ze[typeof t]&&t&&!t.nodeType&&t,Ze=$e&&Je&&"object"==typeof e&&e&&e.Object&&e,Xe=ze[typeof self]&&self&&self.Object&&self,Ke=ze[typeof window]&&window&&window.Object&&window,Ye=Je&&Je.exports===$e&&$e,Qe=Ze||Ke!==(this&&this.window)&&Ke||Xe||this,et=w();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Qe._=et,define(function(){return et})):$e&&Je?Ye?(Je.exports=et)._=et:$e._=et:Qe._=et}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,t,n){"use strict";function r(e){return/^[0-9a-fA-F]+$/.test(e)}function i(e){return 1===e.length&&r(e)}function o(){var e=[];return{push:function(t){e.push(t)},check:function(){for(var t=0;t0&&this.context[this.context.length-1].type===e},pushContext:function(e){this.context.push({type:e})},popContext:function(){return this.context.pop()},isContext:function(e){return this.context.length>0&&this.context[this.context.length-1]===e},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=l.lines,this._lines},setLines:function(e){this._lines=e,l.lines=this._lines},peek:function(e){return this.input.charAt(e||0)},skip:function(e){e=e||1,this.char+=e,this.input=this.input.slice(e)},on:function(e,t){e.split(" ").forEach(function(e){this.emitter.on(e,t)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(e,t,n,r){n.push(function(){r()&&this.trigger(e,t)}.bind(this))},scanPunctuator:function(){var e,t,n,r=this.peek();switch(r){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if("."===this.peek(1)&&"."===this.peek(2))return{type:g.Punctuator,value:"..."};case"(":case")":case";":case",":case"[":case"]":case":":case"~":case"?":return{type:g.Punctuator,value:r};case"{":return this.pushContext(m.Block),{type:g.Punctuator,value:r};case"}":return this.inContext(m.Block)&&this.popContext(),{type:g.Punctuator,value:r};case"#":return{type:g.Punctuator,value:r};case"":return null}return e=this.peek(1),t=this.peek(2),n=this.peek(3),">"===r&&">"===e&&">"===t&&"="===n?{type:g.Punctuator,value:">>>="}:"="===r&&"="===e&&"="===t?{type:g.Punctuator,value:"==="}:"!"===r&&"="===e&&"="===t?{type:g.Punctuator,value:"!=="}:">"===r&&">"===e&&">"===t?{type:g.Punctuator,value:">>>"}:"<"===r&&"<"===e&&"="===t?{type:g.Punctuator,value:"<<="}:">"===r&&">"===e&&"="===t?{type:g.Punctuator,value:">>="}:"="===r&&">"===e?{type:g.Punctuator,value:r+e}:r===e&&"+-<>&|".indexOf(r)>=0?{type:g.Punctuator,value:r+e}:"<>=!+-*%&|^/".indexOf(r)>=0?"="===e?{type:g.Punctuator,value:r+e}:{type:g.Punctuator,value:r}:null},scanComments:function(e){function t(e,t,n){var r=["jshint","jslint","members","member","globals","global","exported"],i=!1,o=e+t,s="plain";return(n=n||{}).isMultiline&&(o+="*/"),t=t.replace(/\n/g," "),"/*"===e&&c.fallsThrough.test(t)&&(i=!0,s="falls through"),r.forEach(function(n){if(!i&&("//"!==e||"jshint"===n)&&(" "===t.charAt(n.length)&&t.substr(0,n.length)===n&&(i=!0,e+=n,t=t.substr(n.length)),i||" "!==t.charAt(0)||" "!==t.charAt(n.length+1)||t.substr(1,n.length)!==n||(i=!0,e=e+" "+n,t=t.substr(n.length+1)),i))switch(n){case"member":s="members";break;case"global":s="globals";break;default:var r=t.split(":").map(function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")});if(2===r.length)switch(r[0]){case"ignore":switch(r[1]){case"start":a.ignoringLinterErrors=!0,i=!1;break;case"end":a.ignoringLinterErrors=!1,i=!1}}s=n}}),{type:g.Comment,commentType:s,value:o,body:t,isSpecial:i,isMultiline:n.isMultiline||!1,isMalformed:n.isMalformed||!1}}var n=this.peek(),r=this.peek(1),i=this.input.substr(2),o=this.line,s=this.char,a=this;if("*"===n&&"/"===r)return this.trigger("error",{code:"E018",line:o,character:s}),this.skip(2),null;if("/"!==n||"*"!==r&&"/"!==r)return null;if("/"===r)return this.skip(this.input.length),t("//",i);var u="";if("*"===r){for(this.inComment=!0,this.skip(2);"*"!==this.peek()||"/"!==this.peek(1);)if(""===this.peek()){if(u+="\n",!this.nextLine(e))return this.trigger("error",{code:"E017",line:o,character:s}),this.inComment=!1,t("/*",u,{isMultiline:!0,isMalformed:!0})}else u+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,t("/*",u,{isMultiline:!0})}},scanKeyword:function(){var e=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),t=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];return e&&t.indexOf(e[0])>=0?{type:g.Keyword,value:e[0]}:null},scanIdentifier:function(){function e(e){return d.indexOf(e)>-1}function t(t){return e(t)||v.indexOf(t)>-1}var n,i,o="",s=0,a=function(){if(s+=1,"u"!==this.peek(s))return null;var e,n=this.peek(s+1)+this.peek(s+2)+this.peek(s+3)+this.peek(s+4);return r(n)?(e=parseInt(n,16),h[e]||t(e)?(s+=5,"\\u"+n):null):null}.bind(this),u=function(){var t=this.peek(s),n=t.charCodeAt(0);return 92===n?a():n<128?p[n]?(s+=1,t):null:e(n)?(s+=1,t):null}.bind(this),c=function(){var e=this.peek(s),n=e.charCodeAt(0);return 92===n?a():n<128?h[n]?(s+=1,e):null:t(n)?(s+=1,e):null}.bind(this);if(null===(i=u()))return null;for(o=i;null!==(i=c());)o+=i;switch(o){case"true":case"false":n=g.BooleanLiteral;break;case"null":n=g.NullLiteral;break;default:n=g.Identifier}return{type:n,value:function(e){return e.replace(/\\u([0-9a-fA-F]{4})/g,function(e,t){return String.fromCharCode(parseInt(t,16))})}(o),text:o,tokenLength:o.length}},scanNumericLiteral:function(e){function t(e){return/^[0-9]$/.test(e)}function n(e){return/^[0-7]$/.test(e)}function r(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"}var o=0,s="",a=this.input.length,u=this.peek(o),c=t,f=10,p=!1;if("."!==u&&!t(u))return null;if("."!==u){for(s=this.peek(o),o+=1,u=this.peek(o),"0"===s&&("x"!==u&&"X"!==u||(c=i,f=16,o+=1,s+=u),"o"!==u&&"O"!==u||(c=n,f=8,l.inES6(!0)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["Octal integer literal","6"]},e,function(){return!0}),o+=1,s+=u),"b"!==u&&"B"!==u||(c=function(e){return/^[01]$/.test(e)},f=2,l.inES6(!0)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["Binary integer literal","6"]},e,function(){return!0}),o+=1,s+=u),n(u)&&(c=n,f=8,p=!0,!1,o+=1,s+=u),!n(u)&&t(u)&&(o+=1,s+=u));o=0&&o<=7&&l.isStrict()});break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":i="\\"+i,this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},e,function(){return l.isStrict()});break;case"u":var s=this.input.substr(1,4),a=parseInt(s,16);r(s)||this.trigger("warning",{code:"W052",line:this.line,character:this.char,data:["u"+s]}),i=String.fromCharCode(a),n=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\v"]},e,function(){return l.jsonMode}),i="\v";break;case"x":var u=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\x-"]},e,function(){return l.jsonMode}),i=String.fromCharCode(u),n=3;break;case"\\":i="\\\\";break;case'"':i='\\"';break;case"/":break;case"":t=!0,i=""}return{char:i,jump:n,allowNewLine:t}},scanTemplateLiteral:function(e){var t,n,r="",i=this.line,o=this.char,s=this.templateStarts.length;if("`"===this.peek())l.inES6(!0)||this.triggerAsync("warning",{code:"W119",line:this.line,character:this.char,data:["template literal syntax","6"]},e,function(){return!0}),t=g.TemplateHead,this.templateStarts.push({line:this.line,char:this.char}),s=this.templateStarts.length,this.skip(1),this.pushContext(m.Template);else{if(!this.inContext(m.Template)||"}"!==this.peek())return null;t=g.TemplateMiddle}for(;"`"!==this.peek();){for(;""===(n=this.peek());)if(r+="\n",!this.nextLine(e)){var a=this.templateStarts.pop();return this.trigger("error",{code:"E052",line:a.line,character:a.char}),{type:t,value:r,startLine:i,startChar:o,isUnclosed:!0,depth:s,context:this.popContext()}}if("$"===n&&"{"===this.peek(1))return r+="${",this.skip(2),{type:t,value:r,startLine:i,startChar:o,isUnclosed:!1,depth:s,context:this.currentContext()};if("\\"===n){var u=this.scanEscapeSequence(e);r+=u.char,this.skip(u.jump)}else"`"!==n&&(r+=n,this.skip(1))}return t=t===g.TemplateHead?g.NoSubstTemplate:g.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:t,value:r,startLine:i,startChar:o,isUnclosed:!1,depth:s,context:this.popContext()}},scanStringLiteral:function(e){var t=this.peek();if('"'!==t&&"'"!==t)return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},e,function(){return l.jsonMode&&'"'!==t});var n="",r=this.line,i=this.char,o=!1;for(this.skip();this.peek()!==t;)if(""===this.peek()){if(o?(o=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},e,function(){return!l.option.multistr}),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},e,function(){return l.jsonMode&&l.option.multistr})):this.trigger("warning",{code:"W112",line:this.line,character:this.char}),!this.nextLine(e))return this.trigger("error",{code:"E029",line:r,character:i}),{type:g.StringLiteral,value:n,startLine:r,startChar:i,isUnclosed:!0,quote:t}}else{o=!1;var s=this.peek(),a=1;if(s<" "&&this.triggerAsync("warning",{code:"W113",line:this.line,character:this.char,data:[""]},e,function(){return!0}),"\\"===s){var u=this.scanEscapeSequence(e);s=u.char,a=u.jump,o=u.allowNewLine}n+=s,this.skip(a)}return this.skip(),{type:g.StringLiteral,value:n,startLine:r,startChar:i,isUnclosed:!1,quote:t}},scanRegExp:function(e){var t,n,r=0,i=this.input.length,o=this.peek(),s=o,a="",u=[],c=!1,f=!1,p=function(){o<" "&&(c=!0,this.triggerAsync("warning",{code:"W048",line:this.line,character:this.char},e,function(){return!0})),"<"===o&&(c=!0,this.triggerAsync("warning",{code:"W049",line:this.line,character:this.char,data:[o]},e,function(){return!0}))}.bind(this);if(!this.prereg||"/"!==o)return null;for(r+=1,t=!1;r-1&&(n="Duplicate RegExp flag")):u.push(o),s+=o,r+=1;try{new RegExp(a,u.join(""))}catch(e){n=e.message}return n&&(c=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[n]})),{type:g.RegExp,value:s,flags:u,isMalformed:c}},scanNonBreakingSpaces:function(){return l.option.nonbsp?this.input.search(/(\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(c.unsafeChars)},next:function(e){for(this.from=this.char;/\s/.test(this.peek());)this.from+=1,this.skip();var t=this.scanComments(e)||this.scanStringLiteral(e)||this.scanTemplateLiteral(e);return t||(t=this.scanRegExp(e)||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(e),t?(this.skip(t.tokenLength||t.value.length),t):null)},nextLine:function(e){var t;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var n=this.input.trim(),r=function(){return a.some(arguments,function(e){return 0===n.indexOf(e)})};return!0===this.ignoringLinterErrors&&(r("/*","//")||this.inComment&&function(){return a.some(arguments,function(e){return-1!==n.indexOf(e,n.length-e.length)})}("*/")||(this.input="")),(t=this.scanNonBreakingSpaces())>=0&&this.triggerAsync("warning",{code:"W125",line:this.line,character:t+1},e,function(){return!0}),this.input=this.input.replace(/\t/g,l.tab),(t=this.scanUnsafeChars())>=0&&this.triggerAsync("warning",{code:"W100",line:this.line,character:t},e,function(){return!0}),!this.ignoringLinterErrors&&l.option.maxlen&&l.option.maxlen=0;--t){var n=k[t]["(labels)"];if(n[e])return n}}function d(e){for(var t=k.length-1;t>=0;t--){var n=k[t];if(n["(usages)"][e])return n["(usages)"][e];if(n===y)break}return!1}function v(t,n){if("outer"===e.option.shadow)for(var r="global"===y["(type)"],i="functionparams"===m["(type)"],o=!r,s=0;s1?k[k.length-2]:null,a=m===y,l="functionparams"===m["(type)"],p="functionouter"===m["(type)"],h=m["(usages)"],d=m["(labels)"],v=Object.keys(h);for(h.__proto__&&-1===v.indexOf("__proto__")&&v.push("__proto__"),t=0;t=0;i--){var o=k[i];if(o["(labels)"][e]&&(!n||o["(labels)"][e]["(blockscoped)"]))return o["(labels)"][e]["(type)"];var s=r?k[i-1]:o;if(s&&"functionparams"===s["(type)"])return null}return null},hasBreakLabel:function(e){for(var t=k.length-1;t>=0;t--){var n=k[t];if(n["(breakLabels)"][e])return!0;if("functionparams"===n["(type)"])return!1}return!1},has:function(e,t){return Boolean(this.labeltype(e,t))},add:function(e,t,n,r){m["(labels)"][e]={"(type)":t,"(token)":n,"(blockscoped)":!1,"(function)":y,"(unused)":r}}},block:{isGlobal:function(){return"global"===m["(type)"]},use:function(t,n){var r=y["(parent)"];r&&r["(labels)"][t]&&"param"===r["(labels)"][t]["(type)"]&&(W.funct.has(t,{excludeParams:!0,onlyBlockscoped:!0})||(r["(labels)"][t]["(unused)"]=!1)),n&&(e.ignored.W117||!1===e.option.undef)&&(n.ignoreUndef=!0),l(t),m["(usages)"][t]["(onlyUsedSubFunction)"]=!1,n&&(n["(function)"]=y,m["(usages)"][t]["(tokens)"].push(n));var i=m["(labels)"][t];i&&i["(blockscoped)"]&&!i["(initialized)"]&&c("E056",n,t,i["(type)"])},reassign:function(t,n){n.ignoreW020=e.ignored.W020,n.ignoreW021=e.ignored.W021,this.modify(t,n),m["(usages)"][t]["(reassigned)"].push(n)},modify:function(e,t){l(e),m["(usages)"][e]["(onlyUsedSubFunction)"]=!1,m["(usages)"][e]["(modified)"].push(t)},add:function(e,t,n,r,i){m["(labels)"][e]={"(type)":t,"(token)":n,"(initialized)":!!i,"(blockscoped)":!0,"(unused)":r}},addBreakLabel:function(t,n){var r=n.token;W.funct.hasBreakLabel(t)?u("E011",r,t):"outer"===e.option.shadow&&(W.funct.has(t)?u("W004",r,t):v(t,r)),m["(breakLabels)"][t]=r}}};return W}},{events:5,lodash:12}],19:[function(e,t,n){"use strict";var r=e("./name-stack.js"),i={syntax:{},isStrict:function(){return this.directive["use strict"]||this.inClassBody||this.option.module||"implied"===this.option.strict},stmtMissingStrict:function(){return"global"===this.option.strict||!1!==this.option.strict&&!!this.option.globalstrict},allowsGlobalUsd:function(){return"global"===this.option.strict||this.option.globalstrict||this.option.module||this.impliedClosure()},impliedClosure:function(){return this.option.node||this.option.phantom||this.option.browserify},inMoz:function(){return this.option.moz},inES6:function(e){return e?6===this.esVersion:this.option.moz||this.esVersion>=6},inES5:function(e){return e?!(this.esVersion&&5!==this.esVersion||this.option.moz):!this.esVersion||this.esVersion>=5||this.option.moz},inferEsVersion:function(){var e=null;if(this.option.esversion){if(this.option.es3?e="es3":this.option.es5?e="es5":this.option.esnext&&(e="esnext"),e)return e;2015===this.option.esversion?this.esVersion=6:this.esVersion=this.option.esversion}else this.option.es3?this.esVersion=3:this.option.esnext&&(this.esVersion=6);return null},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.esVersion=5,this.funct=null,this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab="",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new r,this.inClassBody=!1}};n.state=i},{"./name-stack.js":15}],20:[function(e,t,n){"use strict";n.register=function(e){e.on("Identifier",function(t){e.getOption("proto")||"__proto__"===t.name&&e.warn("W103",{line:t.line,char:t.char,data:[t.name,"6"]})}),e.on("Identifier",function(t){e.getOption("iterator")||"__iterator__"===t.name&&e.warn("W103",{line:t.line,char:t.char,data:[t.name]})}),e.on("Identifier",function(t){e.getOption("camelcase")&&t.name.replace(/^_+|_+$/g,"").indexOf("_")>-1&&!t.name.match(/^[A-Z0-9_]*$/)&&e.warn("W106",{line:t.line,char:t.char,data:[t.name]})}),e.on("String",function(t){var n,r=e.getOption("quotmark");r&&("single"===r&&"'"!==t.quote&&(n="W109"),"double"===r&&'"'!==t.quote&&(n="W108"),!0===r&&(e.getCache("quotmark")||e.setCache("quotmark",t.quote),e.getCache("quotmark")!==t.quote&&(n="W110")),n&&e.warn(n,{line:t.line,char:t.char}))}),e.on("Number",function(t){"."===t.value.charAt(0)&&e.warn("W008",{line:t.line,char:t.char,data:[t.value]}),"."===t.value.substr(t.value.length-1)&&e.warn("W047",{line:t.line,char:t.char,data:[t.value]}),/^00+/.test(t.value)&&e.warn("W046",{line:t.line,char:t.char,data:[t.value]})}),e.on("String",function(t){var n=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i;e.getOption("scripturl")||n.test(t.value)&&e.warn("W107",{line:t.line,char:t.char})})}},{}],21:[function(e,t,n){"use strict";n.reservedVars={arguments:!1,NaN:!1},n.ecmaIdentifiers={3:{Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},5:{JSON:!1},6:{ArrayBuffer:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int8Array:!1,Int16Array:!1,Int32Array:!1,Map:!1,Promise:!1,Proxy:!1,Reflect:!1,Set:!1,Symbol:!1,Uint8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8ClampledArray:!1,WeakMap:!1,WeakSet:!1}},n.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CSS:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,Comment:!1,CompositionEvent:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,Document:!1,document:!1,DocumentFragment:!1,Element:!1,ElementTimeControl:!1,Event:!1,event:!1,fetch:!1,File:!1,FileList:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,Intl:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MediaRecorder:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,performance:!1,print:!1,Range:!1,requestAnimationFrame:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,Storage:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},n.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},n.worker={importScripts:!0,onmessage:!0,postMessage:!0,self:!0,FileReaderSync:!0},n.nonstandard={escape:!1,unescape:!1},n.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},n.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,require:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},n.browserify={__filename:!1,__dirname:!1,global:!1,module:!1,require:!1,Buffer:!0,exports:!0,process:!0},n.phantom={phantom:!0,require:!0,WebPage:!0,console:!0,exports:!0},n.qunit={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},n.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},n.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},n.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},n.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},n.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},n.jquery={$:!1,jQuery:!1},n.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,IFrame:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},n.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},n.yui={YUI:!1,Y:!1,YUI_config:!1},n.mocha={mocha:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,context:!1,xcontext:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1,suiteSetup:!1,suiteTeardown:!1},n.jasmine={jasmine:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,beforeEach:!1,afterEach:!1,setFixtures:!1,loadFixtures:!1,spyOn:!1,expect:!1,runs:!1,waitsFor:!1,waits:!1,beforeAll:!1,afterAll:!1,fail:!1,fdescribe:!1,fit:!1,pending:!1}},{}],jshint:[function(e,t,n){var r=e("lodash"),i=e("events"),o=e("./vars.js"),s=e("./messages.js"),a=e("./lex.js").Lexer,u=e("./reg.js"),c=e("./state.js").state,l=e("./style.js"),f=e("./options.js"),p=e("./scope-manager.js"),h=(e("console-browserify"),function(){"use strict";function e(e,t){return e=e.trim(),!!/^[+-]W\d{3}$/g.test(e)||(!(-1===f.validNames.indexOf(e)&&"jslint"!==t.type&&!r.has(f.removed,e))||(_("E001",t,e),!1))}function t(e){return"[object String]"===Object.prototype.toString.call(e)}function n(e,t){return!!e&&!(!e.identifier||e.value!==t)}function d(e){if(!e.reserved)return!1;var t=e.meta;if(t&&t.isFutureReservedWord){if(t.moduleOnly&&!c.option.module)return!1;if(c.inES5()){if(!t.es5)return!1;if(t.strictOnly&&!c.option.strict&&!c.isStrict())return!1;if(e.isProperty)return!1}}return!0}function v(e,t){return e.replace(/\{([^{}]*)\}/g,function(e,n){var r=t[n];return"string"==typeof r||"number"==typeof r?r:e})}function g(e,t){Object.keys(t).forEach(function(n){r.has(h.blacklist,n)||(e[n]=t[n])})}function m(){if(c.option.enforceall){for(var e in f.bool.enforcing)void 0!==c.option[e]||f.noenforceall[e]||(c.option[e]=!0);for(var t in f.bool.relaxing)void 0===c.option[t]&&(c.option[t]=!1)}}function k(){var e=null;m(),(e=c.inferEsVersion())&&y("E059",c.tokens.next,"esversion",e),c.inES5()&&g(Ye,o.ecmaIdentifiers[5]),c.inES6()&&g(Ye,o.ecmaIdentifiers[6]),"global"===c.option.strict&&"globalstrict"in c.option&&y("E059",c.tokens.next,"strict","globalstrict"),c.option.module&&(c.inES6()||b("W134",c.tokens.next,"module",6)),c.option.couch&&g(Ye,o.couch),c.option.qunit&&g(Ye,o.qunit),c.option.rhino&&g(Ye,o.rhino),c.option.shelljs&&(g(Ye,o.shelljs),g(Ye,o.node)),c.option.typed&&g(Ye,o.typed),c.option.phantom&&g(Ye,o.phantom),c.option.prototypejs&&g(Ye,o.prototypejs),c.option.node&&(g(Ye,o.node),g(Ye,o.typed)),c.option.devel&&g(Ye,o.devel),c.option.dojo&&g(Ye,o.dojo),c.option.browser&&(g(Ye,o.browser),g(Ye,o.typed)),c.option.browserify&&(g(Ye,o.browser),g(Ye,o.typed),g(Ye,o.browserify)),c.option.nonstandard&&g(Ye,o.nonstandard),c.option.jasmine&&g(Ye,o.jasmine),c.option.jquery&&g(Ye,o.jquery),c.option.mootools&&g(Ye,o.mootools),c.option.worker&&g(Ye,o.worker),c.option.wsh&&g(Ye,o.wsh),c.option.yui&&g(Ye,o.yui),c.option.mocha&&g(Ye,o.mocha)}function y(e,t,n,r){var i=Math.floor(t.line/c.lines.length*100),o=s.errors[e].desc,a={name:"JSHintError",line:t.line,character:t.from,message:o+" ("+i+"% scanned).",raw:o,code:e,a:n,b:r};throw a.reason=v(o,a)+" ("+i+"% scanned).",a}function x(){var e=c.ignoredLines;r.isEmpty(e)||(h.errors=r.reject(h.errors,function(t){return e[t.line]}))}function b(e,t,n,r,i,o){var a,u,l,f;if(/^W\d{3}$/.test(e)){if(c.ignored[e])return;f=s.warnings[e]}else/E\d{3}/.test(e)?f=s.errors[e]:/I\d{3}/.test(e)&&(f=s.info[e]);return"(end)"===(t=t||c.tokens.next||{}).id&&(t=c.tokens.curr),u=t.line,a=t.from,l={id:"(error)",raw:f.desc,code:f.code,evidence:c.lines[u-1]||"",line:u,character:a,scope:h.scope,a:n,b:r,c:i,d:o},l.reason=v(f.desc,l),h.errors.push(l),x(),h.errors.length>=c.option.maxerr&&y("E043",t),l}function E(e,t,n,r,i,o,s){return b(e,{line:t,from:n},r,i,o,s)}function _(e,t,n,r,i,o){b(e,t,n,r,i,o)}function w(e,t,n,r,i,o,s){return _(e,{line:t,from:n},r,i,o,s)}function S(e,t){h.internals.push({id:"(internal)",elem:e,token:t,code:t.value.replace(/([^\\])(\\*)\2\\n/g,"$1\n")})}function W(t,n){var i=t.body.split(",").map(function(e){return e.trim()}),o={};if("falls through"!==t.type){if("globals"===t.type){i.forEach(function(e,n){var r=((e=e.split(":"))[0]||"").trim(),s=(e[1]||"").trim();if("-"!==r&&r.length)"-"===r.charAt(0)?(r=r.slice(1),s=!1,h.blacklist[r]=r,delete Ye[r]):o[r]="true"===s;else{if(n>0&&n===i.length-1)return;_("E002",t)}}),g(Ye,o);for(var s in o)r.has(o,s)&&(qe[s]=t)}"exported"===t.type&&i.forEach(function(e,n){if(e.length)c.funct["(scope)"].addExported(e);else{if(n>0&&n===i.length-1)return;_("E002",t)}}),"members"===t.type&&(Ke=Ke||{},i.forEach(function(e){var t=e.charAt(0);t!==e.charAt(e.length-1)||'"'!==t&&"'"!==t||(e=e.substr(1,e.length-2).replace('\\"','"')),Ke[e]=!1}));var a=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];"jshint"!==t.type&&"jslint"!==t.type||(i.forEach(function(n){var r=((n=n.split(":"))[0]||"").trim(),i=(n[1]||"").trim();if(e(r,t))if(a.indexOf(r)>=0)if("false"!==i){if("number"!=typeof(i=+i)||!isFinite(i)||i<=0||Math.floor(i)!==i)return void _("E032",t,n[1].trim());c.option[r]=i}else c.option[r]="indent"===r&&4;else{if("validthis"===r)return c.funct["(global)"]?void _("E009"):"true"!==i&&"false"!==i?void _("E002",t):void(c.option.validthis="true"===i);if("quotmark"!==r)if("shadow"!==r)if("unused"!==r)if("latedef"!==r)if("ignore"!==r)if("strict"!==r)if("module"===r&&(xe(c.funct)||_("E055",t,"module")),"esversion"!==r){var o=/^([+-])(W\d{3})$/g.exec(r);if(o)c.ignored[o[2]]="-"===o[1];else{var s;"true"!==i&&"false"!==i?_("E002",t):"jslint"===t.type?(s=f.renamed[r]||r,c.option[s]="true"===i,void 0!==f.inverted[s]&&(c.option[s]=!c.option[s])):c.option[r]="true"===i}}else{switch(i){case"3":case"5":case"6":case"2015":c.option.moz=!1,c.option.esversion=+i;break;default:_("E002",t)}xe(c.funct)||_("E055",t,"esversion")}else switch(i){case"true":c.option.strict=!0;break;case"false":c.option.strict=!1;break;case"global":case"implied":c.option.strict=i;break;default:_("E002",t)}else switch(i){case"line":c.ignoredLines[t.line]=!0,x();break;default:_("E002",t)}else switch(i){case"true":c.option.latedef=!0;break;case"false":c.option.latedef=!1;break;case"nofunc":c.option.latedef="nofunc";break;default:_("E002",t)}else switch(i){case"true":c.option.unused=!0;break;case"false":c.option.unused=!1;break;case"vars":case"strict":c.option.unused=i;break;default:_("E002",t)}else switch(i){case"true":c.option.shadow=!0;break;case"outer":c.option.shadow="outer";break;case"false":case"inner":c.option.shadow="inner";break;default:_("E002",t)}else switch(i){case"true":case"false":c.option.quotmark="true"===i;break;case"double":case"single":c.option.quotmark=i;break;default:_("E002",t)}}}),k())}else n.caseFallsThrough=!0}function A(e){var t,n=e||0,r=Je.length;if(n="a"&&t<="z"||t>="A"&&t<="Z")&&(e.identifier=e.reserved=!0),e}function D(e,t){var n=P(e,150);return N(n),n.nud="function"==typeof t?t:function(){return this.arity="unary",this.right=G(150),"++"!==this.id&&"--"!==this.id||(c.option.plusplus?b("W016",this,this.id):!this.right||this.right.identifier&&!d(this.right)||"."===this.right.id||"["===this.right.id||b("W017",this),this.right&&this.right.isMetaProperty?_("E031",this):this.right&&this.right.identifier&&c.funct["(scope)"].block.modify(this.right.value,this)),this},n}function q(e,t){var n=R(e);return n.type=e,n.nud=t,n}function z(e,t){var n=q(e,t);return n.identifier=!0,n.reserved=!0,n}function H(e,t){var n=q(e,t&&t.nud||function(){return this});return t=t||{},t.isFutureReservedWord=!0,n.value=e,n.identifier=!0,n.reserved=!0,n.meta=t,n}function $(e,t){return z(e,function(){return"function"==typeof t&&t(this),this})}function J(e,t,n,r){var i=P(e,n);return N(i),i.infix=!0,i.led=function(i){return r||M(c.tokens.prev,c.tokens.curr),"in"!==e&&"instanceof"!==e||"!"!==i.id||b("W018",i,"!"),"function"==typeof t?t(i,this):(this.left=i,this.right=G(n),this)},i}function Z(e,t){var r=P(e,100);return r.infix=!0,r.led=function(e){M(c.tokens.prev,c.tokens.curr),this.left=e;var r=this.right=G(100);return n(e,"NaN")||n(r,"NaN")?b("W019",this):t&&t.apply(this,[e,r]),e&&r||y("E041",c.tokens.curr),"!"===e.id&&b("W018",e,"!"),"!"===r.id&&b("W018",r,"!"),this},r}function X(e,t,n){var i;return!n.option.notypeof&&(!(!e||!t)&&(i=n.inES6()?ot.es6:ot.es3,"(identifier)"===t.type&&"typeof"===t.value&&"(string)"===e.type&&!r.contains(i,e.value)))}function K(e,t){var n=!1;return"this"===e.type&&null===t.funct["(context)"]?n=!0:"(identifier)"===e.type&&(t.option.node&&"global"===e.value?n=!0:!t.option.browser||"window"!==e.value&&"document"!==e.value||(n=!0)),n}function Y(e){function t(e){if("object"==typeof e)return"prototype"===e.right?e:t(e.left)}var n=["Array","ArrayBuffer","Boolean","Collator","DataView","Date","DateTimeFormat","Error","EvalError","Float32Array","Float64Array","Function","Infinity","Intl","Int16Array","Int32Array","Int8Array","Iterator","Number","NumberFormat","Object","RangeError","ReferenceError","RegExp","StopIteration","String","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError"],r=t(e);if(r)return function(e){for(;!e.identifier&&"object"==typeof e.left;)e=e.left;if(e.identifier&&n.indexOf(e.value)>=0&&c.funct["(scope)"].isPredefined(e.value))return e.value}(r)}function Q(e,t,n){var r=n&&n.allowDestructuring;if(t=t||e,c.option.freeze){var i=Y(e);i&&b("W121",e,i)}return Re(e,"...")&&(e=e.right),e.identifier&&!e.isMetaProperty&&c.funct["(scope)"].block.reassign(e.value,e),"."===e.id?(e.left&&("arguments"!==e.left.value||c.isStrict())||b("E031",t),c.nameStack.set(c.tokens.prev),!0):"{"===e.id||"["===e.id?(r&&e.destructAssign||("{"!==e.id&&e.left?"arguments"!==e.left.value||c.isStrict()||b("E031",t):b("E031",t)),"["===e.id&&c.nameStack.set(e.right),!0):!e.identifier||d(e)||e.isMetaProperty?(e===c.syntax.function?b("W023",c.tokens.curr):_("E031",t),!1):("exception"===c.funct["(scope)"].labeltype(e.value)&&b("W022",e),c.nameStack.set(e),!0)}function ee(e,t,n){var r=J(e,"function"==typeof t?t:function(e,t){return t.left=e,Q(e,t,{allowDestructuring:!0}),t.right=G(10),t},n);return r.exps=!0,r.assign=!0,r}function te(e,t,n){var r=P(e,n);return N(r),r.infix=!0,r.led="function"==typeof t?t:function(e){return c.option.bitwise&&b("W016",this,this.id),this.left=e,this.right=G(n),this},r}function ne(e){return ee(e,function(e,t){return c.option.bitwise&&b("W016",t,t.id),Q(e,t),t.right=G(10),t},20)}function re(e){var t=P(e,150);return t.led=function(e){return c.option.plusplus?b("W016",this,this.id):e.identifier&&!d(e)||"."===e.id||"["===e.id||b("W017",this),e.isMetaProperty?_("E031",this):e&&e.identifier&&c.funct["(scope)"].block.modify(e.value,e),this.left=e,this},t}function ie(e,t,n){if(c.tokens.next.identifier){n||j();var r=c.tokens.curr,i=c.tokens.curr.value;return d(r)?t&&c.inES5()?i:e&&"undefined"===i?i:(b("W024",c.tokens.curr,c.tokens.curr.id),i):i}}function oe(e,t){var n=ie(e,t,!1);if(n)return n;if("..."===c.tokens.next.value){if(c.inES6(!0)||b("W119",c.tokens.next,"spread/rest operator","6"),j(),Re(c.tokens.next,"..."))for(b("E024",c.tokens.next,"...");Re(c.tokens.next,"...");)j();return c.tokens.next.identifier?oe(e,t):void b("E024",c.tokens.curr,c.tokens.next.id)}_("E030",c.tokens.next,c.tokens.next.value),";"!==c.tokens.next.id&&j()}function se(e){var t,n=0;if(";"===c.tokens.next.id&&!e.inBracelessBlock)for(;;){do{t=A(n),n+=1}while("(end)"!==t.id&&"(comment)"===t.id);if(t.reach)return;if("(endline)"!==t.id){if("function"===t.id){!0===c.option.latedef&&b("W026",t);break}b("W027",t,t.value,e.value);break}}}function ae(e){if(";"!==c.tokens.next.id){if(c.tokens.next.isUnclosed)return j();var t=C(c.tokens.next)===c.tokens.curr.line&&"(end)"!==c.tokens.next.id,n=Re(c.tokens.next,"}");!t||n||"do"===e.id&&c.inES6(!0)?c.option.asi||n&&t&&c.option.lastsemic||E("W033",c.tokens.curr.line,c.tokens.curr.character):w("E058",c.tokens.curr.line,c.tokens.curr.character)}else j(";")}function ue(){var e,t=$e,n=c.tokens.next,r=!1;{if(";"!==n.id){var i=d(n);return i&&n.meta&&n.meta.isFutureReservedWord&&":"===A().id&&(b("W024",n,n.id),i=!1),n.identifier&&!i&&":"===A().id&&(j(),j(":"),r=!0,c.funct["(scope)"].stack(),c.funct["(scope)"].block.addBreakLabel(n.value,{token:c.tokens.curr}),c.tokens.next.labelled||"{"===c.tokens.next.value||b("W028",c.tokens.next,n.value,c.tokens.next.value),c.tokens.next.label=n.value,n=c.tokens.next),"{"===n.id?(fe(!0,!0,!1,!1,"case"===c.funct["(verb)"]&&":"===c.tokens.curr.value),void(r&&c.funct["(scope)"].unstack())):(!(e=G(0,!0))||e.identifier&&"function"===e.value||"(punctuator)"===e.type&&e.left&&e.left.identifier&&"function"===e.left.value||!c.isStrict()&&c.stmtMissingStrict()&&b("E007"),n.block||(c.option.expr||e&&e.exps?c.option.nonew&&e&&e.left&&"("===e.id&&"new"===e.left.id&&b("W031",n):b("W030",c.tokens.curr),ae(n)),$e=t,r&&c.funct["(scope)"].unstack(),e)}j(";")}}function ce(){for(var e,t=[];!c.tokens.next.reach&&"(end)"!==c.tokens.next.id;)";"===c.tokens.next.id?((!(e=A())||"("!==e.id&&"["!==e.id)&&b("W032"),j(";")):t.push(ue());return t}function le(){for(var e=c.tokens.next;"(string)"===c.tokens.next.id;){var t=L();if(!O(e,t))break;e=t,j();var n=c.tokens.curr.value;(c.directive[n]||"use strict"===n&&"implied"===c.option.strict)&&b("W034",c.tokens.curr,n),c.directive[n]=!0,ae(e)}c.isStrict()&&(c.option.undef=!0)}function fe(e,t,n,i,o){var s,a,u,l,f=He,p=$e;He=e,u=c.tokens.next;var h=c.funct["(metrics)"];if(h.nestedBlockDepth+=1,h.verifyMaxNestedBlockDepthPerFunction(),"{"===c.tokens.next.id){if(j("{"),c.funct["(scope)"].stack(),c.funct["(noblockscopedvar)"]=!1,c.tokens.curr.line,"}"!==c.tokens.next.id){for($e+=c.option.indent;!e&&c.tokens.next.from>$e;)$e+=c.option.indent;if(n){a={};for(l in c.directive)r.has(c.directive,l)&&(a[l]=c.directive[l]);le(),c.option.strict&&c.funct["(context)"]["(global)"]&&(a["use strict"]||c.isStrict()||b("E007"))}s=ce(),h.statementCount+=s.length,$e-=c.option.indent}j("}",u),n&&(c.funct["(scope)"].validateParams(),a&&(c.directive=a)),c.funct["(scope)"].unstack(),$e=p}else if(e)c.funct["(noblockscopedvar)"]="for"!==c.tokens.next.id,c.funct["(scope)"].stack(),t&&!c.option.curly||b("W116",c.tokens.next,"{",c.tokens.next.value),c.tokens.next.inBracelessBlock=!0,$e+=c.option.indent,s=[ue()],$e-=c.option.indent,c.funct["(scope)"].unstack(),delete c.funct["(noblockscopedvar)"];else if(n){if(c.funct["(scope)"].stack(),a={},!t||i||c.inMoz()||_("W118",c.tokens.curr,"function closure expressions"),!t)for(l in c.directive)r.has(c.directive,l)&&(a[l]=c.directive[l]);G(10),c.option.strict&&c.funct["(context)"]["(global)"]&&(a["use strict"]||c.isStrict()||b("E007")),c.funct["(scope)"].unstack()}else _("E021",c.tokens.next,"{",c.tokens.next.value);switch(c.funct["(verb)"]){case"break":case"continue":case"return":case"throw":if(o)break;default:c.funct["(verb)"]=null}return He=f,!e||!c.option.noempty||s&&0!==s.length||b("W035",c.tokens.prev),h.nestedBlockDepth-=1,s}function pe(e){Ke&&"boolean"!=typeof Ke[e]&&b("W036",c.tokens.curr,e),"number"==typeof Xe[e]?Xe[e]+=1:Xe[e]=1}function he(){var e={};e.exps=!0,c.funct["(comparray)"].stack();var t=!1;return"for"!==c.tokens.next.value&&(t=!0,c.inMoz()||b("W116",c.tokens.next,"for",c.tokens.next.value),c.funct["(comparray)"].setState("use"),e.right=G(10)),j("for"),"each"===c.tokens.next.value&&(j("each"),c.inMoz()||b("W118",c.tokens.curr,"for each")),j("("),c.funct["(comparray)"].setState("define"),e.left=G(130),r.contains(["in","of"],c.tokens.next.value)?j():_("E045",c.tokens.curr),c.funct["(comparray)"].setState("generate"),G(10),j(")"),"if"===c.tokens.next.value&&(j("if"),j("("),c.funct["(comparray)"].setState("filter"),e.filter=G(10),j(")")),t||(c.funct["(comparray)"].setState("use"),e.right=G(10)),j("]"),c.funct["(comparray)"].unstack(),e}function de(){return c.funct["(statement)"]&&"class"===c.funct["(statement)"].type||c.funct["(context)"]&&"class"===c.funct["(context)"]["(verb)"]}function ve(e){return e.identifier||"(string)"===e.id||"(number)"===e.id}function ge(e){var t,n=!0;return t="object"==typeof e?e:ie(!1,!0,n=e),t?"object"==typeof t&&("(string)"===t.id||"(identifier)"===t.id?t=t.value:"(number)"===t.id&&(t=t.value.toString())):"(string)"===c.tokens.next.id?(t=c.tokens.next.value,n||j()):"(number)"===c.tokens.next.id&&(t=c.tokens.next.value.toString(),n||j()),"hasOwnProperty"===t&&b("W001"),t}function me(e){var t,n,i,o=[],s=[],a=!1,u=!1,l=0,f=e&&e.loneArg;if(f&&!0===f.identifier)return c.funct["(scope)"].addParam(f.value,f),{arity:1,params:[f.value]};if(t=c.tokens.next,e&&e.parsedOpening||j("("),")"!==c.tokens.next.id)for(;;){l++;var p=[];if(r.contains(["{","["],c.tokens.next.id)){s=Le();for(i in s)(i=s[i]).id&&(o.push(i.id),p.push([i.id,i.token]))}else if(Re(c.tokens.next,"...")&&(u=!0),n=oe(!0))o.push(n),p.push([n,c.tokens.curr]);else for(;!Pe(c.tokens.next,[",",")"]);)j();if(a&&"="!==c.tokens.next.id&&_("W138",c.tokens.current),"="===c.tokens.next.id&&(c.inES6()||b("W119",c.tokens.next,"default parameters","6"),j("="),a=!0,G(10)),p.forEach(function(e){c.funct["(scope)"].addParam.apply(c.funct["(scope)"],e)}),","!==c.tokens.next.id)return j(")",t),{arity:l,params:o};u&&b("W131",c.tokens.next),F()}else j(")")}function ke(e,t,n){var i={"(name)":e,"(breakage)":0,"(loopage)":0,"(tokens)":{},"(properties)":{},"(catch)":!1,"(global)":!1,"(line)":null,"(character)":null,"(metrics)":null,"(statement)":null,"(context)":null,"(scope)":null,"(comparray)":null,"(generator)":null,"(arrow)":null,"(params)":null};return t&&r.extend(i,{"(line)":t.line,"(character)":t.character,"(metrics)":_e(t)}),r.extend(i,n),i["(context)"]&&(i["(scope)"]=i["(context)"]["(scope)"],i["(comparray)"]=i["(context)"]["(comparray)"]),i}function ye(e){return"(scope)"in e}function xe(e){return e["(global)"]&&!e["(verb)"]}function be(e){var t=this.context,n=this.noSubst,r=this.depth,i="number"==typeof e?null:e;if(!n)for(;!function(){if(c.tokens.curr.template&&c.tokens.curr.tail&&c.tokens.curr.context===t)return!0;var e=c.tokens.next.template&&c.tokens.next.tail&&c.tokens.next.context===t;return e&&j(),e||c.tokens.next.isUnclosed}();)!c.tokens.next.template||c.tokens.next.depth>r?G(0):j();return{id:"(template)",type:"(template)",tag:i}}function Ee(e){var t,n,r,i,o,s,a,u,l=c.option,f=c.ignored;e&&(r=e.name,i=e.statement,o=e.classExprBinding,s="generator"===e.type,a="arrow"===e.type,u=e.ignoreLoopFunc),c.option=Object.create(c.option),c.ignored=Object.create(c.ignored),c.funct=ke(r||c.nameStack.infer(),c.tokens.next,{"(statement)":i,"(context)":c.funct,"(arrow)":a,"(generator)":s}),t=c.funct,(n=c.tokens.curr).funct=c.funct,ze.push(c.funct),c.funct["(scope)"].stack("functionouter");var p=r||o;p&&c.funct["(scope)"].block.add(p,o?"class":"function",c.tokens.curr,!1),c.funct["(scope)"].stack("functionparams");var h=me(e);return h?(c.funct["(params)"]=h.params,c.funct["(metrics)"].arity=h.arity,c.funct["(metrics)"].verifyMaxParametersPerFunction()):c.funct["(metrics)"].arity=0,a&&(c.inES6(!0)||b("W119",c.tokens.curr,"arrow function syntax (=>)","6"),e.loneArg||j("=>")),fe(!1,!0,!0,a),!c.option.noyield&&s&&"yielded"!==c.funct["(generator)"]&&b("W124",c.tokens.curr),c.funct["(metrics)"].verifyMaxStatementsPerFunction(),c.funct["(metrics)"].verifyMaxComplexityPerFunction(),c.funct["(unusedOption)"]=c.option.unused,c.option=l,c.ignored=f,c.funct["(last)"]=c.tokens.curr.line,c.funct["(lastcharacter)"]=c.tokens.curr.character,c.funct["(scope)"].unstack(),c.funct["(scope)"].unstack(),c.funct=c.funct["(context)"],u||c.option.loopfunc||!c.funct["(loopage)"]||t["(isCapturing)"]&&b("W083",n),t}function _e(e){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){c.option.maxstatements&&this.statementCount>c.option.maxstatements&&b("W071",e,this.statementCount)},verifyMaxParametersPerFunction:function(){r.isNumber(c.option.maxparams)&&this.arity>c.option.maxparams&&b("W072",e,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){c.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===c.option.maxdepth+1&&b("W073",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var t=c.option.maxcomplexity,n=this.ComplexityCount;t&&n>t&&b("W074",e,n)}}}function we(){c.funct["(metrics)"].ComplexityCount+=1}function Se(e){var t,n;switch(e&&(t=e.id,n=e.paren,","===t&&(e=e.exprs[e.exprs.length-1])&&(t=e.id,n=n||e.paren)),t){case"=":case"+=":case"-=":case"*=":case"%=":case"&=":case"|=":case"^=":case"/=":n||c.option.boss||b("W084")}}function We(e){if(c.inES5())for(var t in e)e[t]&&e[t].setterToken&&!e[t].getterToken&&b("W078",e[t].setterToken)}function Ae(e,t){if(Re(c.tokens.next,".")){var n=c.tokens.curr.id;j(".");var r=oe();return c.tokens.curr.isMetaProperty=!0,e!==r?_("E057",c.tokens.prev,n,r):t(),c.tokens.curr}}function Le(e){var t=e&&e.assignment;return c.inES6()||b("W104",c.tokens.curr,t?"destructuring assignment":"destructuring binding","6"),je(e)}function je(e){var t,n,r,i=[],o=e&&e.openingParsed,s=e&&e.assignment,a=s?{assignment:s}:null,u=o?c.tokens.curr:c.tokens.next,l=function(){var e;if(Pe(c.tokens.next,["[","{"])){t=je(a);for(var n in t)n=t[n],i.push({id:n.id,token:n.token})}else if(Re(c.tokens.next,","))i.push({id:null,token:c.tokens.curr});else{if(!Re(c.tokens.next,"(")){var r=Re(c.tokens.next,"...");if(s){var o=G(20);o&&(Q(o),o.identifier&&(e=o.value))}else e=oe();return e&&i.push({id:e,token:c.tokens.curr}),r}j("("),l(),j(")")}return!1};if(Re(u,"[")){o||j("["),Re(c.tokens.next,"]")&&b("W137",c.tokens.curr);for(var f=!1;!Re(c.tokens.next,"]");)l()&&!f&&Re(c.tokens.next,",")&&(b("W130",c.tokens.next),f=!0),Re(c.tokens.next,"=")&&(j(Re(c.tokens.prev,"...")?"]":"="),n=c.tokens.prev,(r=G(10))&&"undefined"===r.type&&b("W080",n,n.value)),Re(c.tokens.next,"]")||j(",");j("]")}else if(Re(u,"{")){for(o||j("{"),Re(c.tokens.next,"}")&&b("W137",c.tokens.curr);!Re(c.tokens.next,"}")&&(function(){var e;Re(c.tokens.next,"[")?(j("["),G(10),j("]"),j(":"),l()):"(string)"===c.tokens.next.id||"(number)"===c.tokens.next.id?(j(),j(":"),l()):(e=oe(),Re(c.tokens.next,":")?(j(":"),l()):e&&(s&&Q(c.tokens.curr),i.push({id:e,token:c.tokens.curr})))}(),Re(c.tokens.next,"=")&&(j("="),n=c.tokens.prev,(r=G(10))&&"undefined"===r.type&&b("W080",n,n.value)),Re(c.tokens.next,"}")||(j(","),!Re(c.tokens.next,"}"))););j("}")}return i}function Te(e,t){var n=t.first;n&&r.zip(e,Array.isArray(n)?n:[n]).forEach(function(e){var t=e[0],n=e[1];t&&n?t.first=n:t&&t.first&&!n&&b("W080",t.first,t.first.value)})}function Oe(e,t,n){var i,o,s,a,u=n&&n.prefix,l=n&&n.inexport,f="let"===e,p="const"===e;for(c.inES6()||b("W104",c.tokens.curr,e,"6"),f&&"("===c.tokens.next.value?(c.inMoz()||b("W118",c.tokens.next,"let block"),j("("),c.funct["(scope)"].stack(),a=!0):c.funct["(noblockscopedvar)"]&&_("E048",c.tokens.curr,p?"Const":"Let"),t.first=[];;){var h=[];r.contains(["{","["],c.tokens.next.value)?(i=Le(),o=!1):(i=[{id:oe(),token:c.tokens.curr}],o=!0),!u&&p&&"="!==c.tokens.next.id&&b("E012",c.tokens.curr,c.tokens.curr.value);for(var d in i)i.hasOwnProperty(d)&&(d=i[d],c.funct["(scope)"].block.isGlobal()&&!1===Ye[d.id]&&b("W079",d.token,d.id),d.id&&!c.funct["(noblockscopedvar)"]&&(c.funct["(scope)"].addlabel(d.id,{type:e,token:d.token}),h.push(d.token)));if("="===c.tokens.next.id){j("="),!u&&"="===A(0).id&&c.tokens.next.identifier&&b("W120",c.tokens.next,c.tokens.next.value);var v=c.tokens.prev;s=G(u?120:10),!u&&s&&"undefined"===s.type&&b("W080",v,v.value),o?i[0].first=s:Te(h,s)}if(!u)for(d in i)i.hasOwnProperty(d)&&(d=i[d],c.funct["(scope)"].initialize(d.id),o&&l&&c.funct["(scope)"].setExported(d.token.value,d.token));if(t.first=t.first.concat(h),","!==c.tokens.next.id)break;F()}return a&&(j(")"),fe(!0,!0),t.block=!0,c.funct["(scope)"].unstack()),t}function Ge(e,t){return c.inES6()||b("W104",c.tokens.curr,"class","6"),t?(this.name=oe(),c.funct["(scope)"].addlabel(this.name,{type:"class",token:c.tokens.curr})):c.tokens.next.identifier&&"extends"!==c.tokens.next.value?(this.name=oe(),this.namedExpr=!0):this.name=c.nameStack.infer(),Ce(this),t&&c.funct["(scope)"].initialize(this.name),this}function Ce(e){var t=c.inClassBody;"extends"===c.tokens.next.value&&(j("extends"),e.heritage=G(10)),c.inClassBody=!0,j("{"),e.body=Me(e),j("}"),c.inClassBody=t}function Me(e){for(var t,n,r,i,o,s=Object.create(null),a=Object.create(null),u=0;"}"!==c.tokens.next.id;++u)if(t=c.tokens.next,n=!1,r=!1,i=null,";"!==t.id){if("*"===t.id&&(r=!0,j("*"),t=c.tokens.next),"["===t.id)t=Fe(),o=!0;else{if(!ve(t)){b("W052",c.tokens.next,c.tokens.next.value||c.tokens.next.type),j();continue}j(),o=!1,t.identifier&&"static"===t.value&&(Re(c.tokens.next,"*")&&(r=!0,j("*")),(ve(c.tokens.next)||"["===c.tokens.next.id)&&(o="["===c.tokens.next.id,n=!0,t=c.tokens.next,"["===c.tokens.next.id?t=Fe():j())),!t.identifier||"get"!==t.value&&"set"!==t.value||(ve(c.tokens.next)||"["===c.tokens.next.id)&&(o="["===c.tokens.next.id,i=t,t=c.tokens.next,"["===c.tokens.next.id?t=Fe():j())}if(!Re(c.tokens.next,"(")){for(_("E054",c.tokens.next,c.tokens.next.value);"}"!==c.tokens.next.id&&!Re(c.tokens.next,"(");)j();"("!==c.tokens.next.value&&Ee({statement:e})}o||(i?Ie(i.value,n?a:s,t.value,t,!0,n):("constructor"===t.value?c.nameStack.set(e):c.nameStack.set(t),Ve(n?a:s,t.value,t,!0,n))),i&&"constructor"===t.value?_("E049",t,"get"===i.value?"class getter method":"class setter method","constructor"):"prototype"===t.value&&_("E049",t,"class method","prototype"),ge(t),Ee({statement:e,type:r?"generator":null,classExprBinding:e.namedExpr?e.name:null})}else b("W032"),j(";");We(s)}function Ve(e,t,n,r,i){var o=["key","class method","static class method"];o=o[(r||!1)+(i||!1)],n.identifier&&(t=n.value),e[t]&&"__proto__"!==t?b("W075",c.tokens.next,o,t):e[t]=Object.create(null),e[t].basic=!0,e[t].basictkn=n}function Ie(e,t,n,r,i,o){var s="get"===e?"getterToken":"setterToken",a="";i?(o&&(a+="static "),a+=e+"ter method"):a="key",c.tokens.curr.accessorType=e,c.nameStack.set(r),t[n]?(t[n].basic||t[n][s])&&"__proto__"!==n&&b("W075",c.tokens.next,a,n):t[n]=Object.create(null),t[n][s]=r}function Fe(){j("["),c.inES6()||b("W119",c.tokens.curr,"computed property names","6");var e=G(10);return j("]"),e}function Pe(e,t){return"(punctuator)"===e.type&&r.contains(t,e.value)}function Re(e,t){return"(punctuator)"===e.type&&e.value===t}function Ue(){var e=ut();e.notJson?(!c.inES6()&&e.isDestAssign&&b("W104",c.tokens.curr,"destructuring assignment","6"),ce()):(c.option.laxbreak=!0,c.jsonMode=!0,Be())}function Be(){switch(c.tokens.next.id){case"{":!function(){var e={},t=c.tokens.next;if(j("{"),"}"!==c.tokens.next.id)for(;;){if("(end)"===c.tokens.next.id)_("E026",c.tokens.next,t.line);else{if("}"===c.tokens.next.id){b("W094",c.tokens.curr);break}","===c.tokens.next.id?_("E028",c.tokens.next):"(string)"!==c.tokens.next.id&&b("W095",c.tokens.next,c.tokens.next.value)}if(!0===e[c.tokens.next.value]?b("W075",c.tokens.next,"key",c.tokens.next.value):"__proto__"===c.tokens.next.value&&!c.option.proto||"__iterator__"===c.tokens.next.value&&!c.option.iterator?b("W096",c.tokens.next,c.tokens.next.value):e[c.tokens.next.value]=!0,j(),j(":"),Be(),","!==c.tokens.next.id)break;j(",")}j("}")}();break;case"[":!function(){var e=c.tokens.next;if(j("["),"]"!==c.tokens.next.id)for(;;){if("(end)"===c.tokens.next.id)_("E027",c.tokens.next,e.line);else{if("]"===c.tokens.next.id){b("W094",c.tokens.curr);break}","===c.tokens.next.id&&_("E028",c.tokens.next)}if(Be(),","!==c.tokens.next.id)break;j(",")}j("]")}();break;case"true":case"false":case"null":case"(number)":case"(string)":j();break;case"-":j("-"),j("(number)");break;default:_("E003",c.tokens.next)}}function Ne(e,t,n){var r,i,o,s;for(i=0;i":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},nt=["closure","exception","global","label","outer","unused","var"],rt=[],it=new i.EventEmitter,ot={};ot.legacy=["xml","unknown"],ot.es3=["undefined","boolean","number","string","function","object"],ot.es3=ot.es3.concat(ot.legacy),ot.es6=ot.es3.concat("symbol"),q("(number)",function(){return this}),q("(string)",function(){return this}),c.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var e=this.value;return"=>"===c.tokens.next.id?this:(c.funct["(comparray)"].check(e)||c.funct["(scope)"].block.use(e,c.tokens.curr),this)},led:function(){_("E033",c.tokens.next,c.tokens.next.value)}};var st={identifier:!1,template:!0};c.syntax["(template)"]=r.extend({lbp:155,type:"(template)",nud:be,led:be,noSubst:!1},st),c.syntax["(template middle)"]=r.extend({lbp:0,type:"(template middle)",middle:!0,noSubst:!1},st),c.syntax["(template tail)"]=r.extend({lbp:0,type:"(template tail)",tail:!0,noSubst:!1},st),c.syntax["(no subst template)"]=r.extend({lbp:155,type:"(template)",nud:be,led:be,noSubst:!0,tail:!0},st),q("(regexp)",function(){return this}),R("(endline)"),function(e){e.line=e.from=0}(R("(begin)")),R("(end)").reach=!0,R("(error)").reach=!0,R("}").reach=!0,R(")"),R("]"),R('"').reach=!0,R("'").reach=!0,R(";"),R(":").reach=!0,R("#"),z("else"),z("case").reach=!0,z("catch"),z("default").reach=!0,z("finally"),$("arguments",function(e){c.isStrict()&&c.funct["(global)"]&&b("E008",e)}),$("eval"),$("false"),$("Infinity"),$("null"),$("this",function(e){c.isStrict()&&!de()&&!c.option.validthis&&(c.funct["(statement)"]&&c.funct["(name)"].charAt(0)>"Z"||c.funct["(global)"])&&b("W040",e)}),$("true"),$("undefined"),ee("=","assign",20),ee("+=","assignadd",20),ee("-=","assignsub",20),ee("*=","assignmult",20),ee("/=","assigndiv",20).nud=function(){_("E014")},ee("%=","assignmod",20),ne("&="),ne("|="),ne("^="),ne("<<="),ne(">>="),ne(">>>="),J(",",function(e,t){var n;if(t.exprs=[e],c.option.nocomma&&b("W127"),!F({peek:!0}))return t;for(;;){if(!(n=G(10)))break;if(t.exprs.push(n),","!==c.tokens.next.value||!F())break}return t},10,!0),J("?",function(e,t){return we(),t.left=e,t.right=G(10),j(":"),t.else=G(10),t},30);J("||",function(e,t){return we(),t.left=e,t.right=G(40),t},40),J("&&","and",50),te("|","bitor",70),te("^","bitxor",80),te("&","bitand",90),Z("==",function(e,t){switch(!0){case!(c.option.eqnull&&("null"===(e&&e.value)||"null"===(t&&t.value)))&&c.option.eqeqeq:this.from=this.character,b("W116",this,"===","==");break;case X(t,e,c):b("W122",this,t.value);break;case X(e,t,c):b("W122",this,e.value)}return this}),Z("===",function(e,t){return X(t,e,c)?b("W122",this,t.value):X(e,t,c)&&b("W122",this,e.value),this}),Z("!=",function(e,t){return!(c.option.eqnull&&("null"===(e&&e.value)||"null"===(t&&t.value)))&&c.option.eqeqeq?(this.from=this.character,b("W116",this,"!==","!=")):X(t,e,c)?b("W122",this,t.value):X(e,t,c)&&b("W122",this,e.value),this}),Z("!==",function(e,t){return X(t,e,c)?b("W122",this,t.value):X(e,t,c)&&b("W122",this,e.value),this}),Z("<"),Z(">"),Z("<="),Z(">="),te("<<","shiftleft",120),te(">>","shiftright",120),te(">>>","shiftrightunsigned",120),J("in","in",120),J("instanceof",function(e,t){var n,r=c.funct["(scope)"];return t.left=e,t.right=n=G(120),n?(("(number)"===n.id||"(string)"===n.id||"null"===n.value||"undefined"===n.value&&!r.has("undefined")||"unary"===n.arity||"{"===n.id||"["===n.id&&!n.right||"(regexp)"===n.id||"(template)"===n.id&&!n.tag)&&_("E060"),"function"===n.id&&b("W139"),t):t},120),J("+",function(e,t){var n;return t.left=e,t.right=n=G(130),e&&n&&"(string)"===e.id&&"(string)"===n.id?(e.value+=n.value,e.character=n.character,!c.option.scripturl&&u.javascriptURL.test(e.value)&&b("W050",e),e):t},130),D("+","num"),D("+++",function(){return b("W007"),this.arity="unary",this.right=G(150),this}),J("+++",function(e){return b("W007"),this.left=e,this.right=G(130),this},130),J("-","sub",130),D("-","neg"),D("---",function(){return b("W006"),this.arity="unary",this.right=G(150),this}),J("---",function(e){return b("W006"),this.left=e,this.right=G(130),this},130),J("*","mult",140),J("/","div",140),J("%","mod",140),re("++"),D("++","preinc"),c.syntax["++"].exps=!0,c.syntax["++"].ltBoundary="before",re("--"),D("--","predec"),c.syntax["--"].exps=!0,c.syntax["--"].ltBoundary="before",D("delete",function(){var e=G(10);return e?("."!==e.id&&"["!==e.id&&b("W051"),this.first=e,e.identifier&&!c.isStrict()&&(e.forgiveUndef=!0),this):this}).exps=!0,D("~",function(){return c.option.bitwise&&b("W016",this,"~"),this.arity="unary",this.right=G(150),this}),D("...",function(){return c.inES6(!0)||b("W119",this,"spread/rest operator","6"),c.tokens.next.identifier||"(string)"===c.tokens.next.type||Pe(c.tokens.next,["[","("])||_("E030",c.tokens.next,c.tokens.next.value),this.right=G(150),this}),D("!",function(){return this.arity="unary",this.right=G(150),this.right||y("E041",this),!0===tt[this.right.id]&&b("W018",this,"!"),this}),D("typeof",function(){var e=G(150);return this.first=this.right=e,e||y("E041",this),e.identifier&&(e.forgiveUndef=!0),this}),D("new",function(){var e=Ae("target",function(){c.inES6(!0)||b("W119",c.tokens.prev,"new.target","6");for(var e,t=c.funct;t&&(e=!t["(global)"],t["(arrow)"]);)t=t["(context)"];e||b("W136",c.tokens.prev,"new.target")});if(e)return e;var t,n=G(155);if(n&&"function"!==n.id)if(n.identifier)switch(n.new=!0,n.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":b("W053",c.tokens.prev,n.value);break;case"Symbol":c.inES6()&&b("W053",c.tokens.prev,n.value);break;case"Function":c.option.evil||b("W054");break;case"Date":case"RegExp":case"this":break;default:"function"!==n.id&&(t=n.value.substr(0,1),c.option.newcap&&(t<"A"||t>"Z")&&!c.funct["(scope)"].isPredefined(n.value)&&b("W055",c.tokens.curr))}else"."!==n.id&&"["!==n.id&&"("!==n.id&&b("W056",c.tokens.curr);else c.option.supernew||b("W057",this);return"("===c.tokens.next.id||c.option.supernew||b("W058",c.tokens.curr,c.tokens.curr.value),this.first=this.right=n,this}),c.syntax.new.exps=!0,D("void").exps=!0,J(".",function(e,t){var n=oe(!1,!0);return"string"==typeof n&&pe(n),t.left=e,t.right=n,n&&"hasOwnProperty"===n&&"="===c.tokens.next.value&&b("W001"),!e||"arguments"!==e.value||"callee"!==n&&"caller"!==n?c.option.evil||!e||"document"!==e.value||"write"!==n&&"writeln"!==n||b("W060",e):c.option.noarg?b("W059",e,n):c.isStrict()&&_("E008"),c.option.evil||"eval"!==n&&"execScript"!==n||K(e,c)&&b("W061"),t},160,!0),J("(",function(e,t){c.option.immed&&e&&!e.immed&&"function"===e.id&&b("W062");var n=0,r=[];if(e&&"(identifier)"===e.type&&e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&-1==="Array Number String Boolean Date Object Error Symbol".indexOf(e.value)&&("Math"===e.value?b("W063",e):c.option.newcap&&b("W064",e)),")"!==c.tokens.next.id)for(;r[r.length]=G(10),n+=1,","===c.tokens.next.id;)F();return j(")"),"object"==typeof e&&(c.inES5()||"parseInt"!==e.value||1!==n||b("W065",c.tokens.curr),c.option.evil||("eval"===e.value||"Function"===e.value||"execScript"===e.value?b("W061",e):!r[0]||"(string)"!==r[0].id||"setTimeout"!==e.value&&"setInterval"!==e.value?!r[0]||"(string)"!==r[0].id||"."!==e.value||"window"!==e.left.value||"setTimeout"!==e.right&&"setInterval"!==e.right||(b("W066",e),S(e,r[0])):(b("W066",e),S(e,r[0]))),e.identifier||"."===e.id||"["===e.id||"=>"===e.id||"("===e.id||"&&"===e.id||"||"===e.id||"?"===e.id||c.inES6()&&e["(name)"]||b("W067",t)),t.left=e,t},155,!0).exps=!0,D("(",function(e){var t,n,r,i,o,s=c.tokens.next,a=-1,u=1,l=c.tokens.curr,f=c.tokens.prev,p=!c.option.singleGroups;do{"("===s.value?u+=1:")"===s.value&&(u-=1),t=s,s=A(a+=1)}while((0!==u||")"!==t.value)&&"(end)"!==s.type);if("function"===c.tokens.next.id&&(r=c.tokens.next.immed=!0),"=>"===s.value)return Ee({type:"arrow",parsedOpening:!0});var h=[];if(")"!==c.tokens.next.id)for(;h.push(G(10)),","===c.tokens.next.id;)c.option.nocomma&&b("W127"),F();return j(")",this),c.option.immed&&h[0]&&"function"===h[0].id&&"("!==c.tokens.next.id&&"."!==c.tokens.next.id&&"["!==c.tokens.next.id&&b("W068",this),h.length?(h.length>1?((n=Object.create(c.syntax[","])).exprs=h,i=h[0],o=h[h.length-1]):(n=i=o=h[0],p||(p=l.beginsStmt&&("{"===n.id||r||ye(n))||r&&(!O()||"}"!==c.tokens.prev.id)||ye(n)&&!O()||"{"===n.id&&"=>"===f.id||"(number)"===n.type&&Re(s,".")&&/^\d+$/.test(n.value)||l.beginsStmt&&"="===n.id&&"{"===n.left.id)),n&&(p||!T(i)&&!n.exprs||(p=e>i.lbp||e>0&&e===i.lbp||!O()&&o.lbp"),J("[",function(e,t){var n,r=G(10);return r&&"(string)"===r.type&&(c.option.evil||"eval"!==r.value&&"execScript"!==r.value||K(e,c)&&b("W061"),pe(r.value),!c.option.sub&&u.identifier.test(r.value)&&((n=c.syntax[r.value])&&d(n)||b("W069",c.tokens.prev,r.value))),j("]",t),r&&"hasOwnProperty"===r.value&&"="===c.tokens.next.value&&b("W001"),t.left=e,t.right=r,t},160,!0),D("[",function(){var e=ut();if(e.isCompArray)return c.option.esnext||c.inMoz()||b("W118",c.tokens.curr,"array comprehension"),he();if(e.isDestAssign)return this.destructAssign=Le({openingParsed:!0,assignment:!0}),this;var t=c.tokens.curr.line!==C(c.tokens.next);for(this.first=[],t&&($e+=c.option.indent,c.tokens.next.from===$e+c.option.indent&&($e+=c.option.indent));"(end)"!==c.tokens.next.id;){for(;","===c.tokens.next.id;){if(!c.option.elision){if(c.inES5()){b("W128");do{j(",")}while(","===c.tokens.next.id);continue}b("W070")}j(",")}if("]"===c.tokens.next.id)break;if(this.first.push(G(10)),","!==c.tokens.next.id){c.option.trailingcomma&&c.inES5()&&E("W140",c.tokens.curr.line,c.tokens.curr.character);break}if(F({allowTrailing:!0}),"]"===c.tokens.next.id&&!c.inES5()){b("W070",c.tokens.curr);break}}return t&&($e-=c.option.indent),j("]",this),this}),function(e){e.nud=function(){var e,t,n,r,i,o,s=!1,a=Object.create(null);if((e=c.tokens.curr.line!==C(c.tokens.next))&&($e+=c.option.indent,c.tokens.next.from===$e+c.option.indent&&($e+=c.option.indent)),ut().isDestAssign)return this.destructAssign=Le({openingParsed:!0,assignment:!0}),this;for(;"}"!==c.tokens.next.id;){if(o=c.tokens.next.value,!c.tokens.next.identifier||","!==L().id&&"}"!==L().id)if(":"===A().id||"get"!==o&&"set"!==o){if("*"===c.tokens.next.value&&"(punctuator)"===c.tokens.next.type?(c.inES6()||b("W104",c.tokens.next,"generator functions","6"),j("*"),s=!0):s=!1,"["===c.tokens.next.id)n=Fe(),c.nameStack.set(n);else if(c.nameStack.set(c.tokens.next),n=ge(),Ve(a,n,c.tokens.next),"string"!=typeof n)break;"("===c.tokens.next.value?(c.inES6()||b("W104",c.tokens.curr,"concise methods","6"),Ee({type:s?"generator":null})):(j(":"),G(10))}else j(o),c.inES5()||_("E034"),(n=ge())||c.inES6()||_("E035"),n&&Ie(o,a,n,c.tokens.curr),i=c.tokens.next,r=(t=Ee())["(params)"],"get"===o&&n&&r?b("W076",i,r[0],n):"set"===o&&n&&1!==t["(metrics)"].arity&&b("W077",i,n);else c.inES6()||b("W104",c.tokens.next,"object short notation","6"),Ve(a,n=ge(!0),c.tokens.next),G(10);if(pe(n),","!==c.tokens.next.id){c.option.trailingcomma&&c.inES5()&&E("W140",c.tokens.curr.line,c.tokens.curr.character);break}F({allowTrailing:!0,property:!0}),","===c.tokens.next.id?b("W070",c.tokens.curr):"}"!==c.tokens.next.id||c.inES5()||b("W070",c.tokens.curr)}return e&&($e-=c.option.indent),j("}",this),We(a),this},e.fud=function(){_("E036",c.tokens.curr)}}(R("{")),U("const",function(e){return Oe("const",this,e)}).exps=!0,U("let",function(e){return Oe("let",this,e)}).exps=!0,U("var",function(e){var t,n,i,s=e&&e.prefix,a=e&&e.inexport;for(this.first=[];;){var u=[];r.contains(["{","["],c.tokens.next.value)?(t=Le(),n=!1):(t=[{id:oe(),token:c.tokens.curr}],n=!0),c.option.varstmt&&b("W132",this),this.first=this.first.concat(u);for(var l in t)t.hasOwnProperty(l)&&(l=t[l],c.funct["(global)"]&&!c.impliedClosure()&&(!1===Ye[l.id]?b("W079",l.token,l.id):!1===c.option.futurehostile&&(!c.inES5()&&!1===o.ecmaIdentifiers[5][l.id]||!c.inES6()&&!1===o.ecmaIdentifiers[6][l.id])&&b("W129",l.token,l.id)),l.id&&(c.funct["(scope)"].addlabel(l.id,{type:"var",token:l.token}),n&&a&&c.funct["(scope)"].setExported(l.id,l.token),u.push(l.token)));if("="===c.tokens.next.id){c.nameStack.set(c.tokens.curr),j("="),"="===A(0).id&&c.tokens.next.identifier&&((s||c.funct["(params)"])&&-1!==c.funct["(params)"].indexOf(c.tokens.next.value)||b("W120",c.tokens.next,c.tokens.next.value));var f=c.tokens.prev;!(i=G(s?120:10))||s||c.funct["(loopage)"]||"undefined"!==i.type||b("W080",f,f.value),n?t[0].first=i:Te(u,i)}if(","!==c.tokens.next.id)break;F()}return this}).exps=!0,B("class",function(e){return Ge.call(this,e,!0)}),B("function",function(e){var t=e&&e.inexport,n=!1;"*"===c.tokens.next.value&&(j("*"),c.inES6(!0)?n=!0:b("W119",c.tokens.curr,"function*","6")),He&&b("W082",c.tokens.curr);var r=ie();return c.funct["(scope)"].addlabel(r,{type:"function",token:c.tokens.curr}),void 0===r?b("W025"):t&&c.funct["(scope)"].setExported(r,c.tokens.prev),Ee({name:r,statement:this,type:n?"generator":null,ignoreLoopFunc:He}),"("===c.tokens.next.id&&c.tokens.next.line===c.tokens.curr.line&&_("E039"),this}),D("function",function(){var e=!1;return"*"===c.tokens.next.value&&(c.inES6()||b("W119",c.tokens.curr,"function*","6"),j("*"),e=!0),Ee({name:ie(),type:e?"generator":null}),this}),B("if",function(){var e=c.tokens.next;we(),c.condition=!0,j("(");var t=G(0);t||y("E041",this),Se(t);var n=null;c.option.forin&&c.forinifcheckneeded&&(c.forinifcheckneeded=!1,n=c.forinifchecks[c.forinifchecks.length-1],"(punctuator)"===t.type&&"!"===t.value?n.type="(negative)":n.type="(positive)"),j(")",e),c.condition=!1;var r=fe(!0,!0);return n&&"(negative)"===n.type&&r&&r[0]&&"(identifier)"===r[0].type&&"continue"===r[0].value&&(n.type="(negative-with-continue)"),"else"===c.tokens.next.id&&(j("else"),"if"===c.tokens.next.id||"switch"===c.tokens.next.id?ue():fe(!0,!0)),this}),B("try",function(){var e;for(fe(!0);"catch"===c.tokens.next.id;)we(),e&&!c.inMoz()&&b("W118",c.tokens.next,"multiple catch blocks"),function(){if(j("catch"),j("("),c.funct["(scope)"].stack("catchparams"),Pe(c.tokens.next,["[","{"])){var e=Le();r.each(e,function(e){e.id&&c.funct["(scope)"].addParam(e.id,e,"exception")})}else"(identifier)"!==c.tokens.next.type?b("E030",c.tokens.next,c.tokens.next.value):c.funct["(scope)"].addParam(oe(),c.tokens.curr,"exception");"if"===c.tokens.next.value&&(c.inMoz()||b("W118",c.tokens.curr,"catch filter"),j("if"),G(0)),j(")"),fe(!1),c.funct["(scope)"].unstack()}(),e=!0;return"finally"===c.tokens.next.id?(j("finally"),void fe(!0)):(e||_("E021",c.tokens.next,"catch",c.tokens.next.value),this)}),B("while",function(){var e=c.tokens.next;return c.funct["(breakage)"]+=1,c.funct["(loopage)"]+=1,we(),j("("),Se(G(0)),j(")",e),fe(!0,!0),c.funct["(breakage)"]-=1,c.funct["(loopage)"]-=1,this}).labelled=!0,B("with",function(){var e=c.tokens.next;return c.isStrict()?_("E010",c.tokens.curr):c.option.withstmt||b("W085",c.tokens.curr),j("("),G(0),j(")",e),fe(!0,!0),this}),B("switch",function(){var e=c.tokens.next,t=!1,n=!1;for(c.funct["(breakage)"]+=1,j("("),Se(G(0)),j(")",e),e=c.tokens.next,j("{"),c.tokens.next.from===$e&&(n=!0),n||($e+=c.option.indent),this.cases=[];;)switch(c.tokens.next.id){case"case":switch(c.funct["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:c.tokens.curr.caseFallsThrough||b("W086",c.tokens.curr,"case")}j("case"),this.cases.push(G(0)),we(),t=!0,j(":"),c.funct["(verb)"]="case";break;case"default":switch(c.funct["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;default:this.cases.length&&(c.tokens.curr.caseFallsThrough||b("W086",c.tokens.curr,"default"))}j("default"),t=!0,j(":");break;case"}":return n||($e-=c.option.indent),j("}",e),c.funct["(breakage)"]-=1,void(c.funct["(verb)"]=void 0);case"(end)":return void _("E023",c.tokens.next,"}");default:if($e+=c.option.indent,t)switch(c.tokens.curr.id){case",":return void _("E040");case":":t=!1,ce();break;default:return void _("E025",c.tokens.curr)}else{if(":"!==c.tokens.curr.id)return void _("E021",c.tokens.next,"case",c.tokens.next.value);j(":"),_("E024",c.tokens.curr,":"),ce()}$e-=c.option.indent}return this}).labelled=!0,U("debugger",function(){return c.option.debug||b("W087",this),this}).exps=!0,function(){var e=U("do",function(){c.funct["(breakage)"]+=1,c.funct["(loopage)"]+=1,we(),this.first=fe(!0,!0),j("while");var e=c.tokens.next;return j("("),Se(G(0)),j(")",e),c.funct["(breakage)"]-=1,c.funct["(loopage)"]-=1,this});e.labelled=!0,e.exps=!0}(),B("for",function(){var e,t=c.tokens.next,n=!1,i=null;"each"===t.value&&(i=t,j("each"),c.inMoz()||b("W118",c.tokens.curr,"for each")),we(),j("(");var o,s,a,u,l,f,p=0,h=["in","of"],d=0;Pe(c.tokens.next,["{","["])&&++d;do{if(o=A(p),++p,Pe(o,["{","["])?++d:Pe(o,["}","]"])&&--d,d<0)break;0===d&&(!s&&Re(o,",")?s=o:!a&&Re(o,"=")&&(a=o))}while(d>0||!r.contains(h,o.value)&&";"!==o.value&&"(end)"!==o.type);if(r.contains(h,o.value)){if("of"===o.value?(u=20,c.inES6()||b("W104",o,"for of","6")):u=0,a&&_("W133",s,o.value,"initializer is forbidden"),s&&_("W133",s,o.value,"more than one ForBinding"),"var"===c.tokens.next.id)j("var"),c.tokens.curr.fud({prefix:!0});else if("let"===c.tokens.next.id||"const"===c.tokens.next.id)j(c.tokens.next.id),n=!0,c.funct["(scope)"].stack(),c.tokens.curr.fud({prefix:!0});else{l=[];do{Pe(c.tokens.next,["{","["])?Le({assignment:!0}).forEach(function(e){this.push(e.token)},l):("(identifier)"===(f=G(120)).type&&l.push(f),Q(f,o)),Re(c.tokens.next,"=")&&(j("="),G(120)),Re(c.tokens.next,",")&&j(",")}while(c.tokens.next!==o);a||s||l.forEach(function(e){c.funct["(scope)"].has(e.value)||b("W088",e,e.value)})}if(j(o.value),G(u),j(")",t),"in"===o.value&&c.option.forin&&(c.forinifcheckneeded=!0,void 0===c.forinifchecks&&(c.forinifchecks=[]),c.forinifchecks.push({type:"(none)"})),c.funct["(breakage)"]+=1,c.funct["(loopage)"]+=1,e=fe(!0,!0),"in"===o.value&&c.option.forin){if(c.forinifchecks&&c.forinifchecks.length>0){var v=c.forinifchecks.pop();(e&&e.length>0&&("object"!=typeof e[0]||"if"!==e[0].value)||"(positive)"===v.type&&e.length>1||"(negative)"===v.type)&&b("W089",this)}c.forinifcheckneeded=!1}c.funct["(breakage)"]-=1,c.funct["(loopage)"]-=1}else{if(i&&_("E045",i),";"!==c.tokens.next.id)if("var"===c.tokens.next.id)j("var"),c.tokens.curr.fud();else if("let"===c.tokens.next.id)j("let"),n=!0,c.funct["(scope)"].stack(),c.tokens.curr.fud();else for(;G(0,"for"),","===c.tokens.next.id;)F();if(V(c.tokens.curr),j(";"),c.funct["(loopage)"]+=1,";"!==c.tokens.next.id&&Se(G(0)),V(c.tokens.curr),j(";"),";"===c.tokens.next.id&&_("E021",c.tokens.next,")",";"),")"!==c.tokens.next.id)for(;G(0,"for"),","===c.tokens.next.id;)F();j(")",t),c.funct["(breakage)"]+=1,fe(!0,!0),c.funct["(breakage)"]-=1,c.funct["(loopage)"]-=1}return n&&c.funct["(scope)"].unstack(),this}).labelled=!0,U("break",function(){var e=c.tokens.next.value;return c.option.asi||V(this),";"===c.tokens.next.id||c.tokens.next.reach||c.tokens.curr.line!==C(c.tokens.next)?0===c.funct["(breakage)"]&&b("W052",c.tokens.next,this.value):(c.funct["(scope)"].funct.hasBreakLabel(e)||b("W090",c.tokens.next,e),this.first=c.tokens.next,j()),se(this),this}).exps=!0,U("continue",function(){var e=c.tokens.next.value;return 0!==c.funct["(breakage)"]&&c.funct["(loopage)"]||b("W052",c.tokens.next,this.value),c.option.asi||V(this),";"===c.tokens.next.id||c.tokens.next.reach||c.tokens.curr.line===C(c.tokens.next)&&(c.funct["(scope)"].funct.hasBreakLabel(e)||b("W090",c.tokens.next,e),this.first=c.tokens.next,j()),se(this),this}).exps=!0,U("return",function(){return this.line===C(c.tokens.next)?";"===c.tokens.next.id||c.tokens.next.reach||(this.first=G(0),!this.first||"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||c.option.boss||E("W093",this.first.line,this.first.character)):"(punctuator)"===c.tokens.next.type&&["[","{","+","-"].indexOf(c.tokens.next.value)>-1&&V(this),se(this),this}).exps=!0,function(e){e.exps=!0,e.lbp=25,e.ltBoundary="after"}(D("yield",function(){if(c.inMoz())return at.call(this);var e=c.tokens.prev;!this.beginsStmt&&e.lbp>30&&!Pe(e,["("])&&_("E061",this),c.inES6(!0)&&!c.funct["(generator)"]?"(catch)"===c.funct["(name)"]&&c.funct["(context)"]["(generator)"]||_("E046",c.tokens.curr,"yield"):c.inES6()||b("W104",c.tokens.curr,"yield","6"),c.funct["(generator)"]="yielded";return"*"===c.tokens.next.value&&(!0,j("*")),O()||","===c.tokens.next.id||(c.tokens.next.nud?(M(c.tokens.curr,c.tokens.next),this.first=G(10),"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||c.option.boss||E("W093",this.first.line,this.first.character)):c.tokens.next.led&&","!==c.tokens.next.id&&_("W017",c.tokens.next)),this}));var at=function(){var e=c.tokens.prev;c.inES6(!0)&&!c.funct["(generator)"]&&("(catch)"===c.funct["(name)"]&&c.funct["(context)"]["(generator)"]||_("E046",c.tokens.curr,"yield")),c.funct["(generator)"]="yielded";var t=!1;return"*"===c.tokens.next.value&&(t=!0,j("*")),this.line===C(c.tokens.next)?((t||";"!==c.tokens.next.id&&!c.option.asi&&!c.tokens.next.reach&&c.tokens.next.nud)&&(M(c.tokens.curr,c.tokens.next),this.first=G(10),"(punctuator)"!==this.first.type||"="!==this.first.value||this.first.paren||c.option.boss||E("W093",this.first.line,this.first.character)),")"!==c.tokens.next.id&&(e.lbp>30||!e.assign&&!O()||"yield"===e.id)&&_("E050",this)):c.option.asi||V(this),this};U("throw",function(){return V(this),this.first=G(20),se(this),this}).exps=!0,U("import",function(){if(c.funct["(scope)"].block.isGlobal()||_("E053",c.tokens.curr,"Import"),c.inES6()||b("W119",c.tokens.curr,"import","6"),"(string)"===c.tokens.next.type)return j("(string)"),this;if(c.tokens.next.identifier){if(this.name=oe(),c.funct["(scope)"].addlabel(this.name,{type:"import",initialized:!0,token:c.tokens.curr}),","!==c.tokens.next.value)return j("from"),j("(string)"),this;j(",")}if("*"===c.tokens.next.id)j("*"),j("as"),c.tokens.next.identifier&&(this.name=oe(),c.funct["(scope)"].addlabel(this.name,{type:"import",initialized:!0,token:c.tokens.curr}));else for(j("{");;){if("}"===c.tokens.next.value){j("}");break}var e;if("default"===c.tokens.next.type?(e="default",j("default")):e=oe(),"as"===c.tokens.next.value&&(j("as"),e=oe()),c.funct["(scope)"].addlabel(e,{type:"import",initialized:!0,token:c.tokens.curr}),","!==c.tokens.next.value){if("}"===c.tokens.next.value){j("}");break}_("E024",c.tokens.next,c.tokens.next.value);break}j(",")}return j("from"),j("(string)"),this}).exps=!0,U("export",function(){var e,t,n=!0;if(c.inES6()||(b("W119",c.tokens.curr,"export","6"),n=!1),c.funct["(scope)"].block.isGlobal()||(_("E053",c.tokens.curr,"Export"),n=!1),"*"===c.tokens.next.value)return j("*"),j("from"),j("(string)"),this;if("default"===c.tokens.next.type){c.nameStack.set(c.tokens.next),j("default");var r=c.tokens.next.id;return"function"!==r&&"class"!==r||(this.block=!0),e=A(),G(10),t=e.value,this.block&&(c.funct["(scope)"].addlabel(t,{type:r,initialized:!0,token:e}),c.funct["(scope)"].setExported(t,e)),this}if("{"===c.tokens.next.value){j("{");for(var i=[];;){if(c.tokens.next.identifier||_("E030",c.tokens.next,c.tokens.next.value),j(),i.push(c.tokens.curr),"as"===c.tokens.next.value&&(j("as"),c.tokens.next.identifier||_("E030",c.tokens.next,c.tokens.next.value),j()),","!==c.tokens.next.value){if("}"===c.tokens.next.value){j("}");break}_("E024",c.tokens.next,c.tokens.next.value);break}j(",")}return"from"===c.tokens.next.value?(j("from"),j("(string)")):n&&i.forEach(function(e){c.funct["(scope)"].setExported(e.value,e)}),this}if("var"===c.tokens.next.id)j("var"),c.tokens.curr.fud({inexport:!0});else if("let"===c.tokens.next.id)j("let"),c.tokens.curr.fud({inexport:!0});else if("const"===c.tokens.next.id)j("const"),c.tokens.curr.fud({inexport:!0});else if("function"===c.tokens.next.id)this.block=!0,j("function"),c.syntax.function.fud({inexport:!0});else if("class"===c.tokens.next.id){this.block=!0,j("class");var o=c.tokens.next;c.syntax.class.fud(),c.funct["(scope)"].setExported(o.value,o)}else _("E024",c.tokens.next,c.tokens.next.value);return this}).exps=!0,H("abstract"),H("await",{es5:!0,moduleOnly:!0}),H("boolean"),H("byte"),H("char"),H("class",{es5:!0,nud:Ge}),H("double"),H("enum",{es5:!0}),H("export",{es5:!0}),H("extends",{es5:!0}),H("final"),H("float"),H("goto"),H("implements",{es5:!0,strictOnly:!0}),H("import",{es5:!0}),H("int"),H("interface",{es5:!0,strictOnly:!0}),H("long"),H("native"),H("package",{es5:!0,strictOnly:!0}),H("private",{es5:!0,strictOnly:!0}),H("protected",{es5:!0,strictOnly:!0}),H("public",{es5:!0,strictOnly:!0}),H("short"),H("static",{es5:!0,strictOnly:!0}),H("super",{es5:!0}),H("synchronized"),H("transient"),H("volatile");var ut=function(){var e,t,n,r=-1,i=0,o={};Pe(c.tokens.curr,["[","{"])&&(i+=1);do{if(n=-1===r?c.tokens.curr:e,e=-1===r?c.tokens.next:A(r),t=A(r+1),r+=1,Pe(e,["[","{"])?i+=1:Pe(e,["]","}"])&&(i-=1),1===i&&e.identifier&&"for"===e.value&&!Re(n,".")){o.isCompArray=!0,o.notJson=!0;break}if(0===i&&Pe(e,["}","]"])){if("="===t.value){o.isDestAssign=!0,o.notJson=!0;break}if("."===t.value){o.notJson=!0;break}}Re(e,";")&&(o.isBlock=!0,o.notJson=!0)}while(i>0&&"(end)"!==e.id);return o},ct=function(){function e(e){return 0!==n.variables.filter(function(t){if(t.value===e)return t.undef=!1,e}).length}function t(e){return 0===n.variables.filter(function(t){if(t.value===e&&!t.undef)return!0===t.unused&&(t.unused=!1),e}).length}var n,i=function(){this.mode="use",this.variables=[]},o=[];return{stack:function(){n=new i,o.push(n)},unstack:function(){n.variables.filter(function(e){e.unused&&b("W098",e.token,e.raw_text||e.value),e.undef&&c.funct["(scope)"].block.use(e.value,e.token)}),o.splice(-1,1),n=o[o.length-1]},setState:function(e){r.contains(["use","define","generate","filter"],e)&&(n.mode=e)},check:function(r){if(n)return n&&"use"===n.mode?(t(r)&&n.variables.push({funct:c.funct,token:c.tokens.curr,value:r,undef:!0,unused:!1}),!0):n&&"define"===n.mode?(e(r)||n.variables.push({funct:c.funct,token:c.tokens.curr,value:r,undef:!1,unused:!0}),!0):n&&"generate"===n.mode?(c.funct["(scope)"].block.use(r,c.tokens.curr),!0):!(!n||"filter"!==n.mode)&&(t(r)&&c.funct["(scope)"].block.use(r,c.tokens.curr),!0)}}},lt=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},ft=function(n,i,s){function u(e,t){e&&(Array.isArray(e)||"object"!=typeof e||(e=Object.keys(e)),e.forEach(t))}var l,f,d,v,m={},x={};i=r.clone(i),c.reset(),i&&i.scope?h.scope=i.scope:(h.errors=[],h.undefs=[],h.internals=[],h.blacklist={},h.scope="(main)"),g(Ye=Object.create(null),o.ecmaIdentifiers[3]),g(Ye,o.reservedVars),g(Ye,s||{}),qe=Object.create(null);var S=Object.create(null);if(i)for(u(i.predef||null,function(e){var t,n;"-"===e[0]?(t=e.slice(1),h.blacklist[t]=t,delete Ye[t]):(n=Object.getOwnPropertyDescriptor(i.predef,e),Ye[e]=!!n&&n.value)}),u(i.exported||null,function(e){S[e]=!0}),delete i.predef,delete i.exported,v=Object.keys(i),l=0;l0&&(s.implieds=a),et.length>0&&(s.urls=et),(o=c.funct["(scope)"].getUsedOrDefinedGlobals()).length>0&&(s.globals=o),n=1;n0&&(s.unused=u);for(i in Xe)if("number"==typeof Xe[i]){s.member=Xe;break}return s},ft.jshint=ft,ft}());"object"==typeof n&&n&&(n.JSHINT=h)},{"./lex.js":13,"./messages.js":14,"./options.js":16,"./reg.js":17,"./scope-manager.js":18,"./state.js":19,"./style.js":20,"./vars.js":21,"console-browserify":10,events:5,lodash:12}]},{},[]),JSHINT=e("jshint").JSHINT,"object"==typeof exports&&exports&&(exports.JSHINT=JSHINT)}(); \ No newline at end of file +var JSHINT;"undefined"==typeof window&&(window={}),function(){var c=function r(i,u,o){function a(n,e){if(!u[n]){if(!i[n]){var t="function"==typeof c&&c;if(!e&&t)return t(n,!0);if(s)return s(n,!0);e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}t=u[n]={exports:{}};i[n][0].call(t.exports,function(e){var t=i[n][1][e];return a(t||e)},t,t.exports,r,i,u,o)}return u[n].exports}for(var s="function"==typeof c&&c,e=0;et&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this;throw TypeError("listener must be a function")},r.prototype.once=function(e,t){if(!a(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,i,u;if(!a(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||a(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(u=i;0"']/g,R6=RegExp(V6.source),U6=RegExp(P6.source),z6=/<%-([\s\S]+?)%>/g,H6=/<%([\s\S]+?)%>/g,N6=/<%=([\s\S]+?)%>/g,q6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$6=/^\w*$/,J6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z6=/[\\^$.*+?()[\]{}|]/g,K6=RegExp(Z6.source),X6=/^\s+/,u=/\s/,Q6=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Y6=/\{\n\/\* \[wrapped with (.+)\] \*/,e7=/,? & /,t7=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,n7=/[()=,{}\[\]\/\s]/,r7=/\\(\\)?/g,i7=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,u7=/\w*$/,o7=/^[-+]0x[0-9a-f]+$/i,a7=/^0b[01]+$/i,s7=/^\[object .+?Constructor\]$/,c7=/^0o[0-7]+$/i,l7=/^(?:0|[1-9]\d*)$/,f7=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,p7=/($^)/,h7=/['\n\r\u2028\u2029\\]/g,o="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",s="\\u2700-\\u27bf",e="a-z\\xdf-\\xf6\\xf8-\\xff",t="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",l="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="['’]",n="["+o+"]",p="["+l+"]",h="["+a+"]",d="["+s+"]",g="["+e+"]",l="[^"+o+l+"\\d+"+s+e+t+"]",s="\\ud83c[\\udffb-\\udfff]",e="[^"+o+"]",v="(?:\\ud83c[\\udde6-\\uddff]){2}",r="[\\ud800-\\udbff][\\udc00-\\udfff]",t="["+t+"]",m="\\u200d",y="(?:"+g+"|"+l+")",l="(?:"+t+"|"+l+")",k="(?:['’](?:d|ll|m|re|s|t|ve))?",b="(?:['’](?:D|LL|M|RE|S|T|VE))?",x="(?:"+h+"|"+s+")"+"?",E="["+c+"]?",E=E+x+("(?:"+m+"(?:"+[e,v,r].join("|")+")"+E+x+")*"),x="(?:"+[d,v,r].join("|")+")"+E,d="(?:"+[e+h+"?",h,v,r,n].join("|")+")",d7=RegExp(f,"g"),g7=RegExp(h,"g"),_=RegExp(s+"(?="+s+")|"+d+E,"g"),v7=RegExp([t+"?"+g+"+"+k+"(?="+[p,t,"$"].join("|")+")",l+"+"+b+"(?="+[p,t+y,"$"].join("|")+")",t+"?"+y+"+"+k,t+"+"+b,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",x].join("|"),"g"),A=RegExp("["+m+o+a+c+"]"),m7=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,y7=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],k7=-1,t6={},n6=(t6[F6]=t6[w6]=t6[D6]=t6[W6]=t6[B6]=t6[L6]=t6[j6]=t6[M6]=t6[T6]=!0,t6[H0]=t6[b6]=t6[C6]=t6[N0]=t6[e6]=t6[q0]=t6[x6]=t6[E6]=t6[$0]=t6[J0]=t6[Z0]=t6[K0]=t6[X0]=t6[Q0]=t6[Y0]=!1,{}),S=(n6[H0]=n6[b6]=n6[C6]=n6[e6]=n6[N0]=n6[q0]=n6[F6]=n6[w6]=n6[D6]=n6[W6]=n6[B6]=n6[$0]=n6[J0]=n6[Z0]=n6[K0]=n6[X0]=n6[Q0]=n6[S6]=n6[L6]=n6[j6]=n6[M6]=n6[T6]=!0,n6[x6]=n6[E6]=n6[Y0]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),b7=parseFloat,x7=parseInt,e="object"==typeof D&&D&&D.Object===Object&&D,v="object"==typeof self&&self&&self.Object===Object&&self,r6=e||v||Function("return this")(),r="object"==typeof B&&B&&!B.nodeType&&B,i=r&&"object"==typeof W&&W&&!W.nodeType&&W,E7=i&&i.exports===r,C=E7&&e.process,n=function(){try{var e=i&&i.require&&i.require("util").types;return e?e:C&&C.binding&&C.binding("util")}catch(e){}}(),_7=n&&n.isArrayBuffer,A7=n&&n.isDate,S7=n&&n.isMap,C7=n&&n.isRegExp,F7=n&&n.isSet,w7=n&&n.isTypedArray;function i6(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function D7(e,t,n,r){for(var i=-1,u=null==e?0:e.length;++i":">",'"':""","'":"'"});function Y7(e){return"\\"+S[e]}function f6(e){return A.test(e)}function e8(e){var n=-1,r=Array(e.size);return e.forEach(function(e,t){r[++n]=[t,e]}),r}function t8(t,n){return function(e){return t(n(e))}}function p6(e,t){for(var n=-1,r=e.length,i=0,u=[];++n",""":'"',"'":"'"});var g6=function i(e){var E=(e=null==e?r6:g6.defaults(r6.Object(),e,g6.pick(r6,y7))).Array,u=e.Date,L=e.Error,j=e.Function,M=e.Math,g=e.Object,T=e.RegExp,U=e.String,y=e.TypeError,z=E.prototype,H=j.prototype,N=g.prototype,q=e["__core-js_shared__"],$=H.toString,O=N.hasOwnProperty,J=0,Z=(H=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=N.toString,X=$.call(g),Q=r6._,Y=T("^"+$.call(O).replace(Z6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=E7?e.Buffer:V0,t=e.Symbol,e4=e.Uint8Array,t4=H?H.allocUnsafe:V0,n4=t8(g.getPrototypeOf,g),r4=g.create,i4=N.propertyIsEnumerable,u4=z.splice,o4=t?t.isConcatSpreadable:V0,a4=t?t.iterator:V0,s4=t?t.toStringTag:V0,c4=function(){try{var e=X2(g,"defineProperty");return e({},"",{}),e}catch(e){}}(),l4=e.clearTimeout!==r6.clearTimeout&&e.clearTimeout,f4=u&&u.now!==r6.Date.now&&u.now,p4=e.setTimeout!==r6.setTimeout&&e.setTimeout,h4=M.ceil,d4=M.floor,g4=g.getOwnPropertySymbols,H=H?H.isBuffer:V0,v4=e.isFinite,m4=z.join,y4=t8(g.keys,g),k=M.max,_=M.min,k4=u.now,b4=e.parseInt,x4=M.random,E4=z.reverse,u=X2(e,"DataView"),_4=X2(e,"Map"),A4=X2(e,"Promise"),S4=X2(e,"Set"),e=X2(e,"WeakMap"),C4=X2(g,"create"),F4=e&&new e,w4={},D4=E1(u),W4=E1(_4),B4=E1(A4),L4=E1(S4),j4=E1(e),t=t?t.prototype:V0,M4=t?t.valueOf:V0,T4=t?t.toString:V0;function d(e){if(R(e)&&!P(e)&&!(e instanceof m)){if(e instanceof v)return e;if(O.call(e,"__wrapped__"))return _1(e)}return new v(e)}var O4=function(e){if(!S(e))return{};if(r4)return r4(e);I4.prototype=e;e=new I4;return I4.prototype=V0,e};function I4(){}function G4(){}function v(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=V0}function m(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=z0,this.__views__=[]}function V4(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t>>0,t>>>=0,E(i));++r>>1,o=e[u];null!==o&&!C(o)&&(n?o<=t:o>>0)?(e=h(e))&&("string"==typeof t||null!=t&&!C5(t))&&!(t=c(t))&&f6(e)?a2(d6(e),0,n):e.split(t,n):[]},d.spread=function(n,r){if("function"!=typeof n)throw new y(P0);return r=null==r?0:k(F(r),0),o(function(e){var t=e[r],e=a2(e,0,r);return t&&s6(e,t),i6(n,this,e)})},d.tail=function(e){var t=null==e?0:e.length;return t?a(e,1,t):[]},d.take=function(e,t,n){return e&&e.length?a(e,0,(t=n||t===V0?1:F(t))<0?0:t):[]},d.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?a(e,(t=r-(t=n||t===V0?1:F(t)))<0?0:t,r):[]},d.takeRightWhile=function(e,t){return e&&e.length?Y3(e,f(t,3),!1,!0):[]},d.takeWhile=function(e,t){return e&&e.length?Y3(e,f(t,3)):[]},d.tap=function(e,t){return t(e),e},d.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new y(P0);return S(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),a5(e,t,{leading:r,maxWait:t,trailing:i})},d.thru=z1,d.toArray=L5,d.toPairs=Y5,d.toPairsIn=e0,d.toPath=function(e){return P(e)?a6(e,x1):C(e)?[e]:A(b1(h(e)))},d.toPlainObject=T5,d.transform=function(e,r,i){var t,n=P(e),u=n||y5(e)||D5(e);return r=f(r,4),null==i&&(t=e&&e.constructor,i=u?n?new t:[]:S(e)&&b5(t)?O4(n4(e)):{}),(u?u6:f3)(e,function(e,t,n){return r(i,e,t,n)}),i},d.unary=function(e){return r5(e,1)},d.union=B1,d.unionBy=L1,d.unionWith=j1,d.uniq=function(e){return e&&e.length?K3(e):[]},d.uniqBy=function(e,t){return e&&e.length?K3(e,f(t,2)):[]},d.uniqWith=function(e,t){return t="function"==typeof t?t:V0,e&&e.length?K3(e,V0,t):[]},d.unset=function(e,t){return null==e||X3(e,t)},d.unzip=M1,d.unzipWith=T1,d.update=function(e,t,n){return null==e?e:Q3(e,t,i2(n))},d.updateWith=function(e,t,n,r){return r="function"==typeof r?r:V0,null==e?e:Q3(e,t,i2(n),r)},d.values=t0,d.valuesIn=function(e){return null==e?[]:$7(e,W(e))},d.without=O1,d.words=p0,d.wrap=function(e,t){return f5(i2(t),e)},d.xor=I1,d.xorBy=G1,d.xorWith=V1,d.zip=P1,d.zipObject=function(e,t){return n2(e||[],t||[],J4)},d.zipObjectDeep=function(e,t){return n2(e||[],t||[],U3)},d.zipWith=R1,d.entries=Y5,d.entriesIn=e0,d.extend=I5,d.extendWith=G5,x0(d,d),d.add=B0,d.attempt=h0,d.camelCase=n0,d.capitalize=r0,d.ceil=L0,d.clamp=function(e,t,n){return n===V0&&(n=t,t=V0),n!==V0&&(n=(n=w(n))==n?n:0),t!==V0&&(t=(t=w(t))==t?t:0),e3(w(e),t,n)},d.clone=function(e){return b(e,4)},d.cloneDeep=function(e){return b(e,5)},d.cloneDeepWith=function(e,t){return b(e,5,t="function"==typeof t?t:V0)},d.cloneWith=function(e,t){return b(e,4,t="function"==typeof t?t:V0)},d.conformsTo=function(e,t){return null==t||t3(e,t,D(t))},d.deburr=i0,d.defaultTo=function(e,t){return null==e||e!=e?t:e},d.divide=j0,d.endsWith=function(e,t,n){e=h(e),t=c(t);var r=e.length,r=n=n===V0?r:e3(F(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},d.eq=V,d.escape=function(e){return(e=h(e))&&U6.test(e)?e.replace(P6,Q7):e},d.escapeRegExp=function(e){return(e=h(e))&&K6.test(e)?e.replace(Z6,"\\$&"):e},d.every=function(e,t,n){return(P(e)?B7:o3)(e,f(t=n&&p(e,t,n)?V0:t,3))},d.find=q1,d.findIndex=A1,d.findKey=function(e,t){return I7(e,f(t,3),f3)},d.findLast=$1,d.findLastIndex=S1,d.findLastKey=function(e,t){return I7(e,f(t,3),p3)},d.floor=M0,d.forEach=J1,d.forEachRight=Z1,d.forIn=function(e,t){return null==e?e:c3(e,f(t,3),W)},d.forInRight=function(e,t){return null==e?e:l3(e,f(t,3),W)},d.forOwn=function(e,t){return e&&f3(e,f(t,3))},d.forOwnRight=function(e,t){return e&&p3(e,f(t,3))},d.get=z5,d.gt=d5,d.gte=g5,d.has=function(e,t){return null!=e&&e1(e,t,m3)},d.hasIn=H5,d.head=F1,d.identity=B,d.includes=function(e,t,n,r){return e=l(e)?e:t0(e),n=n&&!r?F(n):0,r=e.length,n<0&&(n=k(r+n,0)),w5(e)?n<=r&&-1=_(t=t,n=n)&&e=this.__values__.length;return{done:e,value:e?V0:this.__values__[this.__index__++]}},d.prototype.plant=function(e){for(var t,n=this;n instanceof G4;)var r=_1(n),i=(r.__index__=0,r.__values__=V0,t?i.__wrapped__=r:t=r,r),n=n.__wrapped__;return i.__wrapped__=e,t},d.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof m?(e=e,(e=(e=this.__actions__.length?new m(this):e).reverse()).__actions__.push({func:z1,args:[W1],thisArg:V0}),new v(e,this.__chain__)):this.thru(W1)},d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=function(){return e2(this.__wrapped__,this.__actions__)},d.prototype.first=d.prototype.head,a4&&(d.prototype[a4]=function(){return this}),d}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(r6._=g6,define(function(){return g6})):i?((i.exports=g6)._=g6,r._=g6):r6._=g6}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,t,n){var t=t.exports={},r=[],i=!1;function u(){if(!i){i=!0;for(var e,t=r.length;t;){e=r,r=[];for(var n=-1;++n"===r&&">"===e&&">"===t&&"="===n?{type:i,value:">>>="}:"="===r&&"="===e&&"="===t?{type:i,value:"==="}:"!"===r&&"="===e&&"="===t?{type:i,value:"!=="}:">"===r&&">"===e&&">"===t?{type:i,value:">>>"}:"<"===r&&"<"===e&&"="===t?{type:i,value:"<<="}:">"===r&&">"===e&&"="===t?{type:i,value:">>="}:"="===r&&">"===e?{type:i,value:r+e}:r===e&&0<="+-<>&|*".indexOf(r)?"*"===r&&"="===t?{type:i,value:r+e+t}:{type:i,value:r+e}:0<="<>=!+-*%&|^/".indexOf(r)?"="===e?{type:i,value:r+e}:{type:i,value:r}:null)},scanComments:function(e){var t=this.peek(),n=this.peek(1),r=this.input.substr(2),i=this.line,u=this.char,a=this;function o(r,i,e){var u=!1,t=r+i,o="plain";return(e=e||{}).isMultiline&&(t+="*/"),i=i.replace(/\n/g," "),"/*"===r&&A.fallsThrough.test(i)&&(u=!0,o="falls through"),["jshint","jshint.unstable","jslint","members","member","globals","global","exported"].forEach(function(e){if(!u&&("//"!==r||"jshint"===e||"jshint.unstable"===e)){" "===i.charAt(e.length)&&i.substr(0,e.length)===e&&(u=!0,r+=e,i=i.substr(e.length)),u||" "!==i.charAt(0)||" "!==i.charAt(e.length+1)||i.substr(1,e.length)!==e||(u=!0,r=r+" "+e,i=i.substr(e.length+1));var t=i.indexOf(e);if(!u&&0<=t&&" "===i.charAt(t+e.length)&&0===i.substr(0,t).trim().length&&(u=!0,i=i.substr(e.length+t)),u)switch(e){case"member":o="members";break;case"global":o="globals";break;default:var n=i.split(":").map(function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")});if(2===n.length&&"ignore"===n[0])switch(n[1]){case"start":a.ignoringLinterErrors=!0,u=!1;break;case"end":a.ignoringLinterErrors=!1,u=!1}o=e}}}),{type:v,commentType:o,value:t,body:i,isSpecial:u,isMalformed:e.isMalformed||!1}}if("*"===t&&"/"===n)return this.trigger("error",{code:"E018",line:i,character:u}),this.skip(2),null;if("/"!==t||"*"!==n&&"/"!==n)return null;if("/"===n)return this.skip(this.input.length),o("//",r);var s="";if("*"===n){for(this.inComment=!0,this.skip(2);"*"!==this.peek()||"/"!==this.peek(1);)if(""===this.peek()){if(s+="\n",!this.nextLine(e))return this.trigger("error",{code:"E017",line:i,character:u}),o("/*",s,{isMultiline:!(this.inComment=!1),isMalformed:!0})}else s+=this.peek(),this.skip();return this.skip(2),o("/*",s,{isMultiline:!(this.inComment=!1)})}},scanKeyword:function(){var e=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);return e&&0<=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof","true","false","null","async","await"].indexOf(e[0])?{type:a,value:e[0]}:null},scanIdentifier:function(e){var t,n="",r=0;function i(e){return-1"]},e,function(){return!0}),"\\"===a&&(a=(o=this.scanEscapeSequence(e)).char,s=o.jump,u=o.allowNewLine),""!==a&&(n+=a,this.skip(s))}return this.skip(),{type:g,value:n,startLine:r,startChar:i,isUnclosed:!1,quote:t}},scanRegExp:function(i){function u(){return-1=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;function n(){return o.some(arguments,function(e){return 0===r.indexOf(e)})}var r=this.input.trim();return!0!==this.ignoringLinterErrors||n("/*","//")||this.inComment&&function(){return o.some(arguments,function(e){return-1!==r.indexOf(e,r.length-e.length)})}("*/")||(this.input=""),0<=(t=this.scanNonBreakingSpaces())&&this.triggerAsync("warning",{code:"W125",line:this.line,character:t+1},e,function(){return!0}),this.input=this.input.replace(/\t/g,S.tab),!(!this.ignoringLinterErrors&&S.option.maxlen&&S.option.maxlen":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},U=[],z=new H4.EventEmitter;function H(e,t,n){var r,t=t?(r="",X4.validNames):(r="unstable ",X4.unstableNames);return e=e.trim(),/^[+-]W\d{3}$/g.test(e)||(-1!==t.indexOf(e)||"jslint"===n.type||z4.has(X4.removed,e)||void w("E001",n,r,e))}function N(e,t){return e&&!(!e.identifier||e.value!==t)}function q(e,t){if(!t.reserved)return!1;var n=t.meta;if(n&&n.isFutureReservedWord){if(Z4.inES5()){if(!n.es5)return!1;if(t.isProperty)return!1}}else if(n&&n.es5&&!Z4.inES5())return!1;return!(n&&n.strictOnly&&Z4.inES5()&&!Z4.option.strict&&!Z4.isStrict())&&(!!("await"!==t.id||e&Y4.async||Z4.option.module)&&(!!("yield"!==t.id||e&Y4.yield)||Z4.isStrict()))}function $(e,n){return e.replace(/\{([^{}]*)\}/g,function(e,t){t=n[t];return"string"==typeof t||"number"==typeof t?t:e})}function S(t,n){Object.keys(n).forEach(function(e){z4.has(e3.blacklist,e)||(t[e]=n[e])})}function J(){var e;if(Z4.option.enforceall){for(var t in X4.bool.enforcing)void 0!==Z4.option[t]||X4.noenforceall[t]||(Z4.option[t]=!0);for(var n in X4.bool.relaxing)void 0===Z4.option[n]&&(Z4.option[n]=!1)}(e=Z4.inferEsVersion())&&C("E059",Z4.tokens.next,"esversion",e),Z4.inES5()&&S(A,N4.ecmaIdentifiers[5]),Z4.inES6()&&S(A,N4.ecmaIdentifiers[6]),Z4.inES8()&&S(A,N4.ecmaIdentifiers[8]),Z4.inES11()&&S(A,N4.ecmaIdentifiers[11]),"global"===Z4.option.strict&&"globalstrict"in Z4.option&&C("E059",Z4.tokens.next,"strict","globalstrict"),Z4.option.module&&!Z4.inES6()&&F("W134",Z4.tokens.next,"module",6),Z4.option.regexpu&&!Z4.inES6()&&F("W134",Z4.tokens.next,"regexpu",6),Z4.option.couch&&S(A,N4.couch),Z4.option.qunit&&S(A,N4.qunit),Z4.option.rhino&&S(A,N4.rhino),Z4.option.shelljs&&(S(A,N4.shelljs),S(A,N4.node)),Z4.option.typed&&S(A,N4.typed),Z4.option.phantom&&S(A,N4.phantom),Z4.option.prototypejs&&S(A,N4.prototypejs),Z4.option.node&&(S(A,N4.node),S(A,N4.typed)),Z4.option.devel&&S(A,N4.devel),Z4.option.dojo&&S(A,N4.dojo),Z4.option.browser&&(S(A,N4.browser),S(A,N4.typed)),Z4.option.browserify&&(S(A,N4.browser),S(A,N4.typed),S(A,N4.browserify)),Z4.option.nonstandard&&S(A,N4.nonstandard),Z4.option.jasmine&&S(A,N4.jasmine),Z4.option.jquery&&S(A,N4.jquery),Z4.option.mootools&&S(A,N4.mootools),Z4.option.worker&&S(A,N4.worker),Z4.option.wsh&&S(A,N4.wsh),Z4.option.yui&&S(A,N4.yui),Z4.option.mocha&&S(A,N4.mocha)}function C(e,t,n,r){var i=Math.floor(t.line/Z4.lines.length*100),u=q4.errors[e].desc,t={name:"JSHintError",line:t.line,character:t.from,message:u+" ("+i+"% scanned).",raw:u,code:e,a:n,b:r};throw t.reason=$(u,t)+" ("+i+"% scanned).",t}function Z(){var t=Z4.ignoredLines;z4.isEmpty(t)||(e3.errors=z4.reject(e3.errors,function(e){return t[e.line]}))}function F(e,t,n,r,i,u){var o,a;if(/^W\d{3}$/.test(e)){if(Z4.ignored[e])return;a=q4.warnings[e]}else/E\d{3}/.test(e)?a=q4.errors[e]:/I\d{3}/.test(e)&&(a=q4.info[e]);return e=(t="(end)"===(t=t||Z4.tokens.next||{}).id?Z4.tokens.curr:t).line,o=t.from,(e={id:"(error)",raw:a.desc,code:a.code,evidence:Z4.lines[e-1]||"",line:e,character:o,scope:e3.scope,a:n,b:r,c:i,d:u}).reason=$(a.desc,e),e3.errors.push(e),Z(),e3.errors.filter(function(e){return/E\d{3}/.test(e.code)}).length>=Z4.option.maxerr&&C("E043",t),e}function K(e,t,n,r,i,u,o){return F(e,{line:t,from:n},r,i,u,o)}function w(e,t,n,r,i,u){F(e,t,n,r,i,u)}function X(e,t,n,r,i,u,o){return w(e,{line:t,from:n},r,i,u,o)}function Q(e,t){e3.internals.push({id:"(internal)",elem:e,token:t,code:t.value.replace(/([^\\])(\\*)\2\\n/g,"$1\n")})}function h(e){var t,n=e||0,r=x.length;if(nb;)b+=Z4.option.indent;if(r){for(s in a={},Z4.directive)a[s]=Z4.directive[s];m4(),Z4.funct["(isStrict)"]=Z4.isStrict(),Z4.option.strict&&Z4.funct["(context)"]["(global)"]&&(a["use strict"]||Z4.isStrict()||F("E007"))}o=v4(e),p.statementCount+=o.length,b-=Z4.option.indent}else r&&(Z4.funct["(isStrict)"]=Z4.isStrict());D("}",c),r&&(Z4.funct["(scope)"].validateParams(i),a&&(Z4.directive=a)),Z4.funct["(scope)"].unstack(),b=f}else t?(Z4.funct["(scope)"].stack(),n&&!Z4.option.curly||F("W116",Z4.tokens.next,"{",Z4.tokens.next.value),c="if"===Z4.funct["(verb)"]||"else"===Z4.tokens.curr.id,Z4.tokens.next.inBracelessBlock=!0,b+=Z4.option.indent,o=[g4(e)],b-=Z4.option.indent,!o[0]||!o[0].declaration||c&&"function"===o[0].id||w("E048",o[0],o[0].id[0].toUpperCase()+o[0].id.slice(1)),Z4.funct["(scope)"].unstack()):r?(Z4.funct["(scope)"].stack(),!n||i||Z4.inMoz()||w("W118",Z4.tokens.curr,"function closure expressions"),i&&Z4.funct["(scope)"].validateParams(!0),f=g(e,10),Z4.option.noreturnawait&&e&Y4.async&&f.identifier&&"await"===f.value&&F("W146",f),Z4.option.strict&&Z4.funct["(context)"]["(global)"]&&(Z4.isStrict()||F("E007")),Z4.funct["(scope)"].unstack()):w("E021",Z4.tokens.next,"{",Z4.tokens.next.value);switch(Z4.funct["(verb)"]){case"break":case"continue":case"return":case"throw":if(u)break;default:Z4.funct["(verb)"]=null}return V=l,!t||!Z4.option.noempty||o&&0!==o.length||F("W035",Z4.tokens.prev),--p.nestedBlockDepth,o}function y4(e){P&&"boolean"!=typeof P[e]&&F("W036",Z4.tokens.curr,e),"number"==typeof _[e]?_[e]+=1:_[e]=1}c.legacy=["xml","unknown"],c.es3=["undefined","boolean","number","string","function","object"],c.es3=c.es3.concat(c.legacy),c.es6=c.es3.concat("symbol","bigint"),i4("(number)",function(){return"."===Z4.tokens.next.id&&F("W005",this),this}),i4("(string)",function(){return this});var y={identifier:!(Z4.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(e){var t=this.value,n="=>"===Z4.tokens.next.id;return q(e,this)?F("W024",this,t):n||Z4.funct["(comparray)"].check(t)||Z4.funct["(scope)"].block.use(t,Z4.tokens.curr),this},led:function(){w("E033",Z4.tokens.next,Z4.tokens.next.value)}}),template:!0},y=(Z4.syntax["(template)"]=z4.extend({lbp:155,type:"(template)",nud:S4,led:S4,noSubst:!1},y),Z4.syntax["(template middle)"]=z4.extend({lbp:0,type:"(template middle)",noSubst:!1},y),Z4.syntax["(template tail)"]=z4.extend({lbp:0,type:"(template tail)",tail:!0,noSubst:!1},y),Z4.syntax["(no subst template)"]=z4.extend({lbp:155,type:"(template)",nud:S4,led:S4,noSubst:!0,tail:!0},y),i4("(regexp)",function(){return this}),n("(endline)"),(y=n("(begin)")).line=y.from=0,n("(end)").reach=!0,n("(error)").reach=!0,n("}").reach=!0,n(")"),n("]"),n('"').reach=!0,n("'").reach=!0,n(";"),n(":").reach=!0,n("#"),i("else"),i("case").reach=!0,i("catch"),i("default").reach=!0,i("finally"),i("true",function(){return this}),i("false",function(){return this}),i("null",function(){return this}),i("this",function(){return Z4.isStrict()&&!Z4.funct["(method)"]&&!Z4.option.validthis&&(Z4.funct["(statement)"]&&"Z">="),c4(">>>="),a(",",function(e,t,n){return Z4.option.nocomma&&F("W127",n),n.left=t,W()?n.right=g(e,10):n.right=null,n},10,!0),a("?",function(e,t,n){return B(),n.left=t,n.right=g(e&~Y4.noin,10),D(":"),g(e,10),n},30),a("||",function(e,t,n){return B(),n.left=t,n.right=g(e,40),n},40),a("&&",function(e,t,n){return B(),n.left=t,n.right=g(e,50),n},50),a("??",function(e,t,n){t.paren||"||"!==t.id&&"&&"!==t.id||w("E024",n,"??"),Z4.inES11()||F("W119",n,"nullish coalescing","11"),B(),n.left=t;t=n.right=g(e,39);return t?t.paren||"||"!==t.id&&"&&"!==t.id||w("E024",n.right,n.right.id):w("E024",Z4.tokens.next,Z4.tokens.next.id),n},39),a("**",function(e,t,n){return Z4.inES7()||F("W119",n,"Exponentiation operator","7"),!t.paren&&u4(t)&&w("E024",n,"**"),n.left=t,n.right=g(e,n.rbp),n},150),Z4.syntax["**"].rbp=140,s4("|","bitor",70),s4("^","bitxor",80),s4("&","bitand",90),s("==",function(e,t,n){switch(!0){case!(Z4.option.eqnull&&("null"===(t&&t.value)||"null"===(n&&n.value)))&&Z4.option.eqeqeq:this.from=this.character,F("W116",this,"===","==");break;case f(n,t,Z4):F("W122",this,n.value);break;case f(t,n,Z4):F("W122",this,t.value)}return this}),s("===",function(e,t,n){return f(n,t,Z4)?F("W122",this,n.value):f(t,n,Z4)&&F("W122",this,t.value),this}),s("!=",function(e,t,n){return!(Z4.option.eqnull&&("null"===(t&&t.value)||"null"===(n&&n.value)))&&Z4.option.eqeqeq?(this.from=this.character,F("W116",this,"!==","!=")):f(n,t,Z4)?F("W122",this,n.value):f(t,n,Z4)&&F("W122",this,t.value),this}),s("!==",function(e,t,n){return f(n,t,Z4)?F("W122",this,n.value):f(t,n,Z4)&&F("W122",this,t.value),this}),s("<"),s(">"),s("<="),s(">="),s4("<<","shiftleft",120),s4(">>","shiftright",120),s4(">>>","shiftrightunsigned",120),a("in","in",120),a("instanceof",function(e,t,n){var r=Z4.funct["(scope)"];return n.left=t,n.right=t=g(e,120),t&&(("(number)"===t.id||"(string)"===t.id||"null"===t.value||"undefined"===t.value&&!r.has("undefined")||"unary"===t.arity||"{"===t.id||"["===t.id&&!t.right||"(regexp)"===t.id||"(template)"===t.id&&!t.tag)&&w("E060"),"function"===t.id&&F("W139")),n},120),a("+",function(e,t,n){var r=Z4.tokens.next;return n.left=t,n.right=e=g(e,130),t&&e&&"(string)"===t.id&&"(string)"===e.id?(t.value+=e.value,t.character=e.character,!Z4.option.scripturl&&J4.javascriptURL.test(t.value)&&F("W050",t),t):("+"!==r.id&&"++"!==r.id||F("W007",n.right),n)},130),t("+",function(e){var t=Z4.tokens.next;return this.arity="unary",this.right=g(e,150),"+"!==t.id&&"++"!==t.id||F("W007",this.right),this}),a("-",function(e,t,n){var r=Z4.tokens.next;return n.left=t,n.right=g(e,130),"-"!==r.id&&"--"!==r.id||F("W006",n.right),n},130),t("-",function(e){var t=Z4.tokens.next;return this.arity="unary",this.right=g(e,150),"-"!==t.id&&"--"!==t.id||F("W006",this.right),this}),a("*","mult",140),a("/","div",140),a("%","mod",140),l4("++"),t("++","preinc"),Z4.syntax["++"].exps=!0,l4("--"),t("--","predec"),Z4.syntax["--"].exps=!0,t("delete",function(e){this.arity="unary";e=g(e,150);return e&&("."!==e.id&&"["!==e.id&&F("W051"),(this.first=e).identifier&&!Z4.isStrict()&&(e.forgiveUndef=!0)),this}).exps=!0,t("~",function(e){return Z4.option.bitwise&&F("W016",this,"~"),this.arity="unary",this.right=g(e,150),this}),a("..."),t("!",function(e){return this.arity="unary",this.right=g(e,150),this.right||C("E041",this),!0===R[this.right.id]&&F("W018",this,"!"),this}),t("typeof",function(e){this.arity="unary";e=g(e,150);return(this.first=this.right=e)||C("E041",this),e.identifier&&(e.forgiveUndef=!0),this}),t("new",function(e){var t=D4(e,"target",function(){Z4.inES6(!0)||F("W119",Z4.tokens.prev,"new.target","6");for(var e,t=Z4.funct;t&&(e=!t["(global)"],t["(arrow)"]);)t=t["(context)"];e||F("W136",Z4.tokens.prev,"new.target")});if(t)return t;var n,t=Z4.tokens.next,r=g(e,155);if(!r)return this;if(!r.paren&&160i?g(e,0):D();return{id:"(template)",type:"(template)",tag:t}}function k(e,t){var n,r,i,u,o,a=Z4.option,s=Z4.ignored,c=e&Y4.preAsync,l=(t&&(f=t.name,n=t.statement,r=t.classExprBinding,i="generator"===t.type,u="arrow"===t.type,l=t.isMethod,o=t.ignoreLoopFunc),e=(e&=~Y4.noin)&~Y4.tryClause,c?e|=Y4.async:e&=~Y4.async,i?e|=Y4.yield:u||(e&=~Y4.yield),e&=~Y4.preAsync,Z4.option=Object.create(Z4.option),Z4.ignored=Object.create(Z4.ignored),Z4.funct=_4(f||Z4.nameStack.infer(),Z4.tokens.next,{"(statement)":n,"(context)":Z4.funct,"(arrow)":u,"(method)":l,"(async)":c}),n=Z4.funct,c=Z4.tokens.curr,G.push(Z4.funct),Z4.funct["(scope)"].stack("functionouter"),!l&&(f||r)),f=(l&&Z4.funct["(scope)"].block.add(l,r?"class":"function",Z4.tokens.curr,!1),u||Z4.funct["(scope)"].funct.add("arguments","var",c,!1),Z4.funct["(scope)"].stack("functionparams"),function(e,t){var n,r,i,u,o=[],a=!1,s=0,c=t&&t.loneArg,l=!1;if(c&&!0===c.identifier)return Z4.funct["(scope)"].addParam(c.value,c),{arity:1,params:[c.value],isSimple:!0};if(n=Z4.tokens.next,t&&t.parsedOpening||D("("),")"===Z4.tokens.next.id)D(")");else for(;;){s++;var f=[],p=p4("rest");if(z4.includes(["{","["],Z4.tokens.next.id))for(u in l=!0,i=L(e))(u=i[u]).id&&(o.push(u.id),f.push([u.id,u.token]));else if(r=m(e))o.push(r),f.push([r,Z4.tokens.curr]);else for(;!j(Z4.tokens.next,[",",")"]);)D();if(a&&"="!==Z4.tokens.next.id&&w("W138",Z4.tokens.curr),"="===Z4.tokens.next.id&&(Z4.inES6()||F("W119",Z4.tokens.next,"default parameters","6"),p&&w("E062",Z4.tokens.next),D("="),a=!0,g(e,10)),f.forEach(h),","===Z4.tokens.next.id&&(p&&F("W131",Z4.tokens.next),D(","),W({allowTrailing:!0})),")"===Z4.tokens.next.id)return","!==Z4.tokens.curr.id||Z4.inES8()||F("W119",Z4.tokens.curr,"Trailing comma in function parameters","8"),D(")",n),{arity:s,params:o,isSimple:!l&&!p&&!a}}function h(e){Z4.funct["(scope)"].addParam.apply(Z4.funct["(scope)"],e)}}(e,t));return f?(Z4.funct["(params)"]=f.params,Z4.funct["(hasSimpleParams)"]=f.isSimple,Z4.funct["(metrics)"].arity=f.arity,Z4.funct["(metrics)"].verifyMaxParametersPerFunction()):(Z4.funct["(params)"]=[],Z4.funct["(metrics)"].arity=0,Z4.funct["(hasSimpleParams)"]=!0),u&&(e&=~Y4.yield,Z4.inES6(!0)||F("W119",Z4.tokens.curr,"arrow function syntax (=>)","6"),t.loneArg||D("=>")),d(e,!1,!0,!0,u),Z4.option.noyield||!i||Z4.funct["(yielded)"]||F("W124",Z4.tokens.curr),Z4.funct["(metrics)"].verifyMaxStatementsPerFunction(),Z4.funct["(metrics)"].verifyMaxComplexityPerFunction(),Z4.funct["(unusedOption)"]=Z4.option.unused,Z4.option=a,Z4.ignored=s,Z4.funct["(last)"]=Z4.tokens.curr.line,Z4.funct["(lastcharacter)"]=Z4.tokens.curr.character,Z4.funct["(scope)"].unstack(),Z4.funct["(scope)"].unstack(),Z4.funct=Z4.funct["(context)"],o||Z4.option.loopfunc||!Z4.funct["(loopage)"]||n["(outerMutables)"]&&F("W083",c,n["(outerMutables)"].join(", ")),n}function C4(n){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){Z4.option.maxstatements&&this.statementCount>Z4.option.maxstatements&&F("W071",n,this.statementCount)},verifyMaxParametersPerFunction:function(){z4.isNumber(Z4.option.maxparams)&&this.arity>Z4.option.maxparams&&F("W072",n,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){Z4.option.maxdepth&&0"===r.id||"("===r.id||"&&"===r.id||"||"===r.id||"?"===r.id||"async"===r.id||"?."===r.id||Z4.inES6()&&r["(name)"]||F("W067",n)),n.left=t,n},155,!0).exps=!0,t("(",function(e,t){var n,r,i,u=Z4.tokens.curr,o=Z4.tokens.prev,a=!Z4.option.singleGroups,s=x4(1);if("function"===Z4.tokens.next.id&&(i=Z4.tokens.next.immed=!0),"=>"===s.value)return s.funct=k(e,{type:"arrow",parsedOpening:!0}),s;if(")"===Z4.tokens.next.id)D(")");else if(e=g(e,0),D(")",this),e){if(e.paren=!0,Z4.option.immed&&e&&"function"===e.id&&"("!==Z4.tokens.next.id&&"."!==Z4.tokens.next.id&&"["!==Z4.tokens.next.id&&F("W068",this),","===e.id){for(n=e.left;","===n.id;)n=n.left;r=e.right}else n=r=e,a||(i=i||"async"===e.id,a=u.beginsStmt&&("{"===e.id||i)||i&&(!e4()||"}"!==Z4.tokens.prev.id)||"=>"===e.id&&!e4()||"{"===e.id&&"=>"===o.id||u4(e)&&"**"===Z4.tokens.next.id||"??"===o.id&&("&&"===e.id||"||"===e.id)||"(number)"===e.type&&M(s,".")&&/^\d+$/.test(e.value)||u.beginsStmt&&"="===e.id&&"{"===e.left.id||"?."===e.id&&("new"===o.id||"(template)"===Z4.tokens.next.type));return(a=!a&&((i=n).first||i.right||i.left||"yield"===i.id||"await"===i.id||n!==r)?t>n.lbp||0",42)).infix=!0,y.led=function(e,t){return t4(Z4.tokens.prev,Z4.tokens.curr),this.left=t,this.right=k(e,{type:"arrow",loneArg:t}),this},y.rbp=161,a("[",function(e,t,n){var r,i;return Z4.option.asi&&j(Z4.tokens.prev,[")","]"])&&!l(Z4.tokens.prev,Z4.tokens.curr)&&F("W014",Z4.tokens.curr,Z4.tokens.curr.id),(r=g(e&~Y4.noin,0))&&"(string)"===r.type&&(Z4.option.evil||"eval"!==r.value&&"execScript"!==r.value||o4(t,Z4)&&F("W061"),y4(r.value),!Z4.option.sub&&J4.identifier.test(r.value)&&((i=Z4.syntax[r.value])?!q(e,i):"eval"!==r.value&&"arguments"!==r.value)&&F("W069",Z4.tokens.prev,r.value)),D("]",n),r&&"hasOwnProperty"===r.value&&"="===Z4.tokens.next.value&&F("W001"),n.left=t,n.right=r,n},160,!0),t("[",function(e){var t,n,r=O4();if(r.isCompArray)return Z4.option.esnext||Z4.inMoz()||F("W118",Z4.tokens.curr,"array comprehension"),t=e,n={exps:!0},Z4.funct["(comparray)"].stack(),i=!1,"for"!==Z4.tokens.next.value&&(i=!0,Z4.inMoz()||F("W116",Z4.tokens.next,"for",Z4.tokens.next.value),Z4.funct["(comparray)"].setState("use"),n.right=g(t,10)),D("for"),"each"===Z4.tokens.next.value&&(D("each"),Z4.inMoz()||F("W118",Z4.tokens.curr,"for each")),D("("),Z4.funct["(comparray)"].setState("define"),n.left=g(t,130),z4.includes(["in","of"],Z4.tokens.next.value)?D():w("E045",Z4.tokens.curr),Z4.funct["(comparray)"].setState("generate"),g(t,10),D(")"),"if"===Z4.tokens.next.value&&(D("if"),D("("),Z4.funct["(comparray)"].setState("filter"),g(t,10),D(")")),i||(Z4.funct["(comparray)"].setState("use"),n.right=g(t,10)),D("]"),Z4.funct["(comparray)"].unstack(),n;if(r.isDestAssign)return this.destructAssign=L(e,{openingParsed:!0,assignment:!0}),this;var i=!l(Z4.tokens.curr,Z4.tokens.next);for(this.first=[],i&&(b+=Z4.option.indent,Z4.tokens.next.from===b+Z4.option.indent&&(b+=Z4.option.indent));"(end)"!==Z4.tokens.next.id;){for(;","===Z4.tokens.next.id;){if(!Z4.option.elision){if(Z4.inES5()){for(F("W128");D(","),","===Z4.tokens.next.id;);continue}F("W070")}D(",")}if("]"===Z4.tokens.next.id)break;if(p4("spread"),this.first.push(g(e,10)),","!==Z4.tokens.next.id){Z4.option.trailingcomma&&Z4.inES5()&&K("W140",Z4.tokens.curr.line,Z4.tokens.curr.character);break}if(D(","),W({allowTrailing:!0}),"]"===Z4.tokens.next.id&&!Z4.inES5()){F("W070",Z4.tokens.curr);break}}return i&&(b-=Z4.option.indent),D("]",this),this}),(y=n("{")).nud=function(e){var t,n,r,i,u,o=!1,a=Object.create(null),s=!1,c=!l(Z4.tokens.curr,Z4.tokens.next);if(c&&(b+=Z4.option.indent,Z4.tokens.next.from===b+Z4.option.indent&&(b+=Z4.option.indent)),O4().isDestAssign)return this.destructAssign=L(e,{openingParsed:!0,assignment:!0}),this;for(Z4.inObjectBody=!0;"}"!==Z4.tokens.next.id;){if(u=Z4.tokens.next.value,!Z4.tokens.next.identifier||","!==Y().id&&"}"!==Y().id)if(":"===h().id||"get"!==u&&"set"!==u)if(p4("spread"))Z4.inES9()||F("W119",Z4.tokens.next,"object spread property","9"),g(e,10);else{if("async"!==Z4.tokens.next.id||j(h(),["(",":"])?s=!1:(Z4.inES8()||F("W119",Z4.tokens.next,"async functions","8"),s=!0,D(),n4(Z4.tokens.curr)),o="*"===Z4.tokens.next.value&&"(punctuator)"===Z4.tokens.next.type&&(s&&!Z4.inES9()?F("W119",Z4.tokens.next,"async generators","9"):Z4.inES6()||F("W104",Z4.tokens.next,"generator functions","6"),D("*"),!0),"["===Z4.tokens.next.id)n=V4(e),Z4.nameStack.set(n);else if(Z4.nameStack.set(Z4.tokens.next),I4(a,n=E4(e),Z4.tokens.next),"string"!=typeof n)break;"("===Z4.tokens.next.value?(Z4.inES6()||F("W104",Z4.tokens.curr,"concise methods","6"),k(s?e|Y4.preAsync:e,{isMethod:!0,type:o?"generator":null})):(D(":"),g(e,10))}else D(u),Z4.inES5()||w("E034"),"["===Z4.tokens.next.id?n=V4(e):(n=E4(e))||Z4.inES6()||w("E035"),n&&G4(u,a,n,Z4.tokens.curr),i=Z4.tokens.next,r=(t=k(e,{isMethod:!0}))["(params)"],"get"===u&&n&&r.length?F("W076",i,r[0],n):"set"===u&&n&&1!==t["(metrics)"].arity&&F("W077",i,n);else Z4.inES6()||F("W104",Z4.tokens.next,"object short notation","6"),n=(i=g(e,10))&&i.value,i&&I4(a,n,i);if(y4(n),","!==Z4.tokens.next.id){Z4.option.trailingcomma&&Z4.inES5()&&K("W140",Z4.tokens.curr.line,Z4.tokens.curr.character);break}D(","),W({allowTrailing:!0,property:!0}),","!==Z4.tokens.next.id&&("}"!==Z4.tokens.next.id||Z4.inES5())||F("W070",Z4.tokens.curr)}return c&&(b-=Z4.option.indent),D("}",this),w4(a),Z4.inObjectBody=!1,this},y.fud=function(){w("E036",Z4.tokens.curr)};y=r("const",function(e){return B4("const",this,e)});function L4(){return"("===Z4.tokens.next.id&&Z4.inMoz()}y.exps=!0,y.declaration=!0;y=r("let",function(e){return B4("let",this,e)});y.nud=function(e,t){if(!L4())return this.exps=!1,Z4.syntax["(identifier)"].nud.apply(this,arguments);Z4.funct["(scope)"].stack(),D("("),Z4.tokens.prev.fud(e),D(")"),g(e,t),Z4.funct["(scope)"].unstack()},y.meta={es5:!0,isFutureReservedWord:!1,strictOnly:!0},y.exps=!0,y.declaration=!0,y.useFud=function(e){var t=Z4.tokens.next;return!(this.line!==t.line&&!Z4.inES6())&&(t.identifier&&(!q(e,t)||"let"===t.id)||j(t,["{","["])||L4())};r("var",function(e){var t,n,r,i=e&Y4.noin;for(this.first=[];;){var u,o=[],a=z4.includes(["{","["],Z4.tokens.next.value)?(t=L(e),!1):(t=[],(r=m(e))&&t.push({id:r,token:Z4.tokens.curr}),!0);for(u in Z4.option.varstmt&&F("W132",this),t)t.hasOwnProperty(u)&&(u=t[u],Z4.funct["(global)"]&&!Z4.impliedClosure()&&(!1===A[u.id]?F("W079",u.token,u.id):!1===Z4.option.futurehostile&&(!Z4.inES5()&&!1===N4.ecmaIdentifiers[5][u.id]||!Z4.inES6()&&!1===N4.ecmaIdentifiers[6][u.id])&&F("W129",u.token,u.id)),u.id&&(Z4.funct["(scope)"].addbinding(u.id,{type:"var",token:u.token}),o.push(u.token)));if("="===Z4.tokens.next.id&&(this.hasInitializer=!0,Z4.nameStack.set(Z4.tokens.curr),D("="),"="!==h(0).id||!Z4.tokens.next.identifier||(i||Z4.funct["(params)"])&&-1!==Z4.funct["(params)"].indexOf(Z4.tokens.next.value)||F("W120",Z4.tokens.next,Z4.tokens.next.value),r=Z4.tokens.prev,(n=g(e,10))&&(!Z4.funct["(loopage)"]&&n.identifier&&"undefined"===n.value&&F("W080",r,r.value),a||W4(o,n))),this.first=this.first.concat(o),","!==Z4.tokens.next.id)break;this.hasComma=!0,D(","),W()}return this}).exps=!0,e("function",function(e){var t=e&Y4.export,n=!1,r=e&Y4.preAsync,i=r?"async ":"",r=("*"===Z4.tokens.next.value&&(r&&!Z4.inES9()?F("W119",Z4.tokens.prev,"async generators","9"):r||Z4.inES6(!0)||F("W119",Z4.tokens.next,"function*","6"),D("*"),i+="generator ",n=!0),i+="function",V&&F("W082",Z4.tokens.curr),this.name=f4(e)?Z4.tokens.curr:null,this.name?Z4.funct["(scope)"].addbinding(this.name.value,{type:i,token:Z4.tokens.curr,initialized:!0}):t||F("W025"),k(e,{name:this.name&&this.name.value,statement:this,type:n?"generator":null,ignoreLoopFunc:V})),i=r["(isStrict)"]&&!Z4.isStrict();return this.name&&("arguments"===r["(name)"]||"eval"===r["(name)"])&&i&&w("E008",this.name),"("===Z4.tokens.next.id&&")"===h().id&&"=>"!==h(1).id&&Z4.tokens.next.line===Z4.tokens.curr.line&&w("E039"),this}).declaration=!0,t("function",function(e){var t=!1,n=e&Y4.preAsync,n=("*"===Z4.tokens.next.value&&(n&&!Z4.inES9()?F("W119",Z4.tokens.prev,"async generators","9"):n||Z4.inES6(!0)||F("W119",Z4.tokens.curr,"function*","6"),D("*"),t=!0),this.name=f4(n?e|Y4.async:e)?Z4.tokens.curr:null,k(e,{name:this.name&&this.name.value,type:t?"generator":null}));return t&&this.name&&"yield"===this.name.value&&w("E024",this.name,"yield"),this.name&&("arguments"===n["(name)"]||"eval"===n["(name)"])&&n["(isStrict)"]&&w("E008",this.name),this}),e("if",function(e){var t=Z4.tokens.next,n=(B(),D("("),g(e,0)),r=(n||C("E041",this),F4(n),null),n=(Z4.option.forin&&Z4.forinifcheckneeded&&(Z4.forinifcheckneeded=!1,r=Z4.forinifchecks[Z4.forinifchecks.length-1],"(punctuator)"===n.type&&"!"===n.value?r.type="(negative)":r.type="(positive)"),D(")",t),d(e,!0,!0));return r&&"(negative)"===r.type&&n&&n[0]&&"(identifier)"===n[0].type&&"continue"===n[0].value&&(r.type="(negative-with-continue)"),"else"===Z4.tokens.next.id&&(D("else"),"if"===Z4.tokens.next.id||"switch"===Z4.tokens.next.id?g4(e):d(e,!0,!0)),this}),e("try",function(e){var t,n,r=!1;for(d(e|Y4.tryClause,!0);"catch"===Z4.tokens.next.id;)B(),t&&!Z4.inMoz()&&F("W118",Z4.tokens.next,"multiple catch blocks"),D("catch"),"{"!==Z4.tokens.next.id?(Z4.funct["(scope)"].stack("catchparams"),r=!0,n=void 0,D("("),j(Z4.tokens.next,["[","{"])?(n=L(e),z4.each(n,function(e){e.id&&Z4.funct["(scope)"].addParam(e.id,e.token,"exception")})):"(identifier)"!==Z4.tokens.next.type?F("E030",Z4.tokens.next,Z4.tokens.next.value):Z4.funct["(scope)"].addParam(m(e),Z4.tokens.curr,"exception"),"if"===Z4.tokens.next.value&&(Z4.inMoz()||F("W118",Z4.tokens.curr,"catch filter"),D("if"),g(e,0)),D(")")):Z4.inES10()||F("W119",Z4.tokens.curr,"optional catch binding","10"),d(e,!1),r&&(Z4.funct["(scope)"].unstack(),r=!1),t=!0;return"finally"===Z4.tokens.next.id?(D("finally"),void d(e,!0)):(t||w("E021",Z4.tokens.next,"catch",Z4.tokens.next.value),this)}),e("while",function(e){var t=Z4.tokens.next;return Z4.funct["(breakage)"]+=1,Z4.funct["(loopage)"]+=1,B(),D("("),F4(g(e,0)),D(")",t),d(e,!0,!0),--Z4.funct["(breakage)"],--Z4.funct["(loopage)"],this}).labelled=!0,e("with",function(e){var t=Z4.tokens.next;return Z4.isStrict()?w("E010",Z4.tokens.curr):Z4.option.withstmt||F("W085",Z4.tokens.curr),D("("),g(e,0),D(")",t),d(e,!0,!0),this}),e("switch",function(e){var t=Z4.tokens.next,n=!1,r=!1,i=!1;for(Z4.funct["(breakage)"]+=1,D("("),F4(g(e,0)),D(")",t),t=Z4.tokens.next,D("{"),Z4.funct["(scope)"].stack(),(r=Z4.tokens.next.from===b?!0:r)||(b+=Z4.option.indent);;)switch(Z4.tokens.next.id){case"case":switch(Z4.funct["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;case"default":Z4.option.leanswitch&&F("W145",Z4.tokens.next);break;default:Z4.tokens.curr.caseFallsThrough||F("W086",Z4.tokens.curr,"case")}D("case"),g(e,0),i=!0,B(),n=!0,D(":"),Z4.funct["(verb)"]="case";break;case"default":switch(Z4.funct["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;case"case":Z4.option.leanswitch&&F("W145",Z4.tokens.curr);break;default:i&&!Z4.tokens.curr.caseFallsThrough&&F("W086",Z4.tokens.curr,"default")}D("default"),n=!0,D(":"),Z4.funct["(verb)"]="default";break;case"}":return r||(b-=Z4.option.indent),D("}",t),Z4.funct["(scope)"].unstack(),--Z4.funct["(breakage)"],void(Z4.funct["(verb)"]=void 0);case"(end)":return void w("E023",Z4.tokens.next,"}");default:if(b+=Z4.option.indent,n)switch(Z4.tokens.curr.id){case",":return void w("E040");case":":n=!1,v4(e);break;default:return void w("E025",Z4.tokens.curr)}else{if(":"!==Z4.tokens.curr.id)return void w("E021",Z4.tokens.next,"case",Z4.tokens.next.value);D(":"),w("E024",Z4.tokens.curr,":"),v4(e)}b-=Z4.option.indent}}).labelled=!0,r("debugger",function(){return Z4.option.debug||F("W087",this),this}).exps=!0,(y=r("do",function(e){Z4.funct["(breakage)"]+=1,Z4.funct["(loopage)"]+=1,B(),this.first=d(e,!0,!0),D("while");var t=Z4.tokens.next;return D("("),F4(g(e,0)),D(")",t),--Z4.funct["(breakage)"],--Z4.funct["(loopage)"],this})).labelled=!0,y.exps=!0,e("for",function(e){var t,n,r,i,u,o,a=Z4.tokens.next,s=!1,c=!1,l=null,f=("each"===a.value&&(l=a,D("each"),Z4.inMoz()||F("W118",Z4.tokens.curr,"for each")),Z4.tokens.next.identifier&&"await"===Z4.tokens.next.value&&(D("await"),c=!0,e&Y4.async?Z4.inES9()||F("W119",Z4.tokens.curr,"asynchronous iteration","9"):w("E024",Z4.tokens.curr,"await")),B(),D("("),h()),p=e|Y4.noin;if("var"===Z4.tokens.next.id)D("var"),t=(u=Z4.tokens.curr.fud(p)).hasComma?u:null,n=u.hasInitializer?u:null;else if("const"===Z4.tokens.next.id||"let"===Z4.tokens.next.id&&(f.identifier&&"in"!==f.id||j(f,["{","["])))D(Z4.tokens.next.id),s=!0,Z4.funct["(scope)"].stack(),t=(u=Z4.tokens.curr.fud(p)).hasComma?u:null,n=u.hasInitializer?u:null;else if(!M(Z4.tokens.next,";")){for(r=[];"in"!==Z4.tokens.next.value&&"of"!==Z4.tokens.next.value&&!M(Z4.tokens.next,";");)j(Z4.tokens.next,["{","["])?(L(p,{assignment:!0}).forEach(function(e){this.push(e.token)},r),M(Z4.tokens.next,"=")&&(D("="),n=Z4.tokens.curr,g(p,10))):(i=g(p,10))&&("(identifier)"===i.type?r.push(i):M(i,"=")&&(n=i,r.push(i))),M(Z4.tokens.next,",")&&(D(","),t=t||Z4.tokens.curr);n||t||r.forEach(function(e){Z4.funct["(scope)"].has(e.value)||F("W088",e,e.value)})}if(f=Z4.tokens.next,c&&"of"!==f.value&&w("E066",f),z4.includes(["in","of"],f.value))"of"===f.value?(o=20,Z4.inES6()||F("W104",f,"for of","6")):o=0,t&&w("W133",t,f.value,"more than one ForBinding"),n&&w("W133",n,f.value,"initializer is forbidden"),!i||t||n||v(e,i,f),D(f.value),g(e,o),D(")",a),"in"===f.value&&Z4.option.forin&&(Z4.forinifcheckneeded=!0,void 0===Z4.forinifchecks&&(Z4.forinifchecks=[]),Z4.forinifchecks.push({type:"(none)"})),Z4.funct["(breakage)"]+=1,Z4.funct["(loopage)"]+=1,c=d(e,!0,!0),"in"===f.value&&Z4.option.forin&&(Z4.forinifchecks&&0"===x4(0).id:!!e.identifier&&"=>"===h().id))},y.useFud=y.isFunc,y.fud=function(e){return Z4.inES8()||F("W119",this,"async functions","8"),e=(e|=Y4.preAsync)|Y4.initial,this.func=g(e,0),this.block=this.func.block,this.exps=this.func.exps,this},y.exps=!0,delete y.reserved,(y=t("yield",function(e){if(Z4.inMoz())return j4.call(this,e);if(!(e&Y4.yield))return this.exps=!1,Z4.syntax["(identifier)"].nud.apply(this,arguments);var t=Z4.tokens.prev;return Z4.funct["(params)"]||w("E024",this,"yield"),!this.beginsStmt&&30执行操作..." + + document.getElementById('codemirrorCommands').innerHTML = + "" + Object.keys(commandsName).map(function (name) { return "" }).join(''); var coredef = terndefs_f6783a0a_522d_417e_8407_94c67b692e50[2]; - Object.keys(core.material.enemys).forEach(function (name){ + Object.keys(core.material.enemys).forEach(function (name) { coredef.core.material.enemys[name] = { "!type": "enemy", "!doc": core.material.enemys[name].name || "怪物" @@ -236,7 +236,15 @@ editor_multi = function () { document.getElementById('left7').style = 'z-index:-1;opacity: 0;'; } editor_multi.setLint = function () { - codeEditor.setOption("lint", editor_multi.lintAutocomplete); + if (editor_multi.lintAutocomplete) { + codeEditor.setOption("lint", { + options: { + esversion: 2021 + } + }); + } else { + codeEditor.setOption("lint", false); + } codeEditor.setOption("autocomplete", editor_multi.lintAutocomplete); document.getElementById("lintCheckbox").checked = editor_multi.lintAutocomplete; } @@ -253,7 +261,7 @@ editor_multi = function () { var _format = function () { if (!editor_multi.lintAutocomplete) return; var offset = (codeEditor.getScrollInfo() || {}).top || 0; - _setValue(js_beautify(codeEditor.getValue(), { + _setValue(beautifier.js(codeEditor.getValue(), { brace_style: "collapse-preserve-inline", indent_with_tabs: true, jslint_happy: true @@ -486,6 +494,22 @@ editor_multi = function () { editor_multi.importFile(dict[mod]) } + // 字体大小 + { + const CONFIG_KEY = "editor_multi.fontSize"; + let fontsize = editor.config.get(CONFIG_KEY, 14); + const input = document.getElementById("editor_multi_fontsize"); + const check = document.getElementById("editor_multi_fontweight") + input.value = fontsize; + editor_multi.setFontSize = function () { + const value = Number(input.value); + editor.config.set(CONFIG_KEY, value); + const ele = codeEditor.getWrapperElement() + ele.style.fontSize = `${value}px`; + ele.style.fontWeight = `${check.checked ? 'bold' : 'normal'}` + } + } + return editor_multi; } //editor_multi=editor_multi(); \ No newline at end of file diff --git a/_server/table/data.comment.js b/_server/table/data.comment.js index 9fa2d24..0ebe2a8 100644 --- a/_server/table/data.comment.js +++ b/_server/table/data.comment.js @@ -555,14 +555,20 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "autoScale": { "_leaf": true, "_type": "checkbox", - "_docs": "自动缩放最大化", - "_data": "是否自动缩放最大化,关闭后不再最大化" + "_docs": "自动缩放", + "_data": "是否自动缩放至合适值" }, "extendToolbar": { "_leaf": true, "_type": "checkbox", - "_docs": "横屏隐藏状态栏", - "_data": "在横屏状态下是否隐藏左侧状态栏,从而获得仿RM的沉浸式体验" + "_docs": "画面下方道具栏", + "_data": "开启后道具栏会被挪动至游戏画面的下方" + }, + "hideLeftStatusBar": { + "_leaf": true, + "_type": "checkbox", + "_docs": "隐藏左侧状态栏", + "_data": "是否隐藏左侧状态栏,开启后强制开启画面下方道具栏" }, "flyNearStair": { "_leaf": true, diff --git a/editor-mobile.html b/editor-mobile.html index 5964f4c..ed4c344 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -242,15 +242,21 @@
- - - - - - - 语法检查 - +
+ + + + + + + 语法检查 + + 字体大小 + + 字体加粗 + +
diff --git a/editor.html b/editor.html index 8a6d7b1..31332e0 100644 --- a/editor.html +++ b/editor.html @@ -238,15 +238,21 @@
- - - - - - - 语法检查 - +
+ + + + + + + 语法检查 + + 字体大小 + + 字体加粗 + +
diff --git a/index.html b/index.html index 4cf2e0c..8db0234 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,14 @@ + - + HTML5魔塔 - + @@ -15,186 +17,188 @@ - -
-
- -
- - -
-

请稍候...

- -
-
-
-
-
-

资源即将开始加载

-

HTML5魔塔游戏平台,享受更多魔塔游戏:
https://h5mota.com/

-
- - -
-
- 开始游戏 - 载入游戏 - 录像回放 -
-
-
-
-
-

-

-

-
-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- -

-
-
- - - - -
-
- - - -
-
- - - -
- - + +
+
+
-
- - - - - - - - - - - - - - - - -

+ + +
+

请稍候...

+ +
+
+
+
+
+

资源即将开始加载

+

HTML5魔塔游戏平台,享受更多魔塔游戏:
https://h5mota.com/

+
+ + +
+
+ 开始游戏 + 载入游戏 + 录像回放 +
+
+
+
+
+

+

+

+
+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ +

+
+
+ + + + +
+
+ + + +
+
+ + + +
+ + + +
+
+ + + + + + + + + + + + + + + + +

+
+
+
+
+ + + + + + + + + + 此浏览器不支持HTML5 + +
-
-
-
- - - - - - - - - - 此浏览器不支持HTML5 - +
+
+

请输入文字...

+ + + +
-
-
-
-

请输入文字...

- - - -
-
-
- - - - - - - +
+ + + + + + + + \ No newline at end of file diff --git a/libs/actions.js b/libs/actions.js index 6891d5a..e25afb8 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -1225,7 +1225,7 @@ actions.prototype._clickBook = function (x, y) { var data = core.status.event.data; if (data != null && y < core._HEIGHT_-1) { var per_page = pageinfo.per_page, page = parseInt(data / per_page); - var u = this.LAST / per_page; + var u = (core._HEIGHT_ - 1) / per_page; for (var i = 0; i < per_page; ++i) { if (y >= u * i && y < u * (i + 1)) { var index = per_page * page + i; diff --git a/libs/control.js b/libs/control.js index 01e1d64..c6e4f30 100644 --- a/libs/control.js +++ b/libs/control.js @@ -18,6 +18,7 @@ control.prototype._init = function () { this.weathers = {}; this.resizes = []; this.noAutoEvents = true; + this.updateNextFrame = false; // --- 注册系统的animationFrame this.registerAnimationFrame("totalTime", false, this._animationFrame_totalTime); this.registerAnimationFrame("autoSave", true, this._animationFrame_autoSave); @@ -3046,22 +3047,27 @@ control.prototype.clearStatusBar = function () { ////// 更新状态栏 ////// control.prototype.updateStatusBar = function (doNotCheckAutoEvents, immediate) { + if (!core.isPlaying()) return; if (immediate) { return this.updateStatusBar_update(); } if (!doNotCheckAutoEvents) this.noAutoEvents = false; if (core.isReplaying()) return this.updateStatusBar_update(); - requestAnimationFrame(this.updateStatusBar_update) -} + if (!core.control.updateNextFrame) { + core.control.updateNextFrame = true; + requestAnimationFrame(this.updateStatusBar_update); + } +}; control.prototype.updateStatusBar_update = function () { + core.control.updateNextFrame = false; if (!core.isPlaying() || core.hasFlag('__statistics__')) return; core.control.controldata.updateStatusBar(); if (!core.control.noAutoEvents) core.checkAutoEvents(); core.control._updateStatusBar_setToolboxIcon(); core.clearRouteFolding(); core.control.noAutoEvents = true; -} +}; control.prototype._updateStatusBar_setToolboxIcon = function () { if (core.isReplaying()) { @@ -3265,9 +3271,10 @@ control.prototype.resize = function () { var clientWidth = main.dom.body.clientWidth, clientHeight = main.dom.body.clientHeight; var BORDER = 3; var extendToolbar = core.flags.extendToolbar; - var BAR_WIDTH = extendToolbar ? 0 : Math.round(core._PY_ * 0.3); + let hideLeftStatusBar = core.flags.hideLeftStatusBar; + var BAR_WIDTH = hideLeftStatusBar ? 0 : Math.round(core._PY_ * 0.31); - var horizontalMaxRatio = (clientHeight - 2 * BORDER - (extendToolbar ? BORDER : 0)) / (core._PY_ + (extendToolbar ? 38 : 0)); + var horizontalMaxRatio = (clientHeight - 2 * BORDER - (hideLeftStatusBar ? BORDER : 0)) / (core._PY_ + (hideLeftStatusBar ? 38 : 0)); if (clientWidth - 3 * BORDER >= core._PX_ + BAR_WIDTH || (clientWidth > clientHeight && horizontalMaxRatio < 1)) { // 横屏 @@ -3289,6 +3296,7 @@ control.prototype.resize = function () { core.domStyle.scale = Math.min((clientWidth - 2 * BORDER) / core._PX_); core.domStyle.availableScale = []; extendToolbar = false; + hideLeftStatusBar = false; BAR_WIDTH = Math.round(core._PX_ * 0.3); } @@ -3317,7 +3325,8 @@ control.prototype.resize = function () { statusBarHeightInVertical: core.domStyle.isVertical ? (32 * col + 6) * core.domStyle.scale + 2 * BORDER : 0, toolbarHeightInVertical: core.domStyle.isVertical ? 38 * core.domStyle.scale + 2 * BORDER : 0, extendToolbar: extendToolbar, - is15x15: false + is15x15: false, + hideLeftStatusBar }; this._doResize(obj); @@ -3339,7 +3348,7 @@ control.prototype._resize_gameGroup = function (obj) { totalHeight = obj.outerHeight + obj.statusBarHeightInVertical + obj.toolbarHeightInVertical } else { - totalWidth = obj.outerWidth + obj.BAR_WIDTH * core.domStyle.scale + (obj.extendToolbar ? 0 : obj.BORDER); + totalWidth = obj.outerWidth + obj.BAR_WIDTH * core.domStyle.scale + (obj.hideLeftStatusBar ? 0 : obj.BORDER); totalHeight = obj.outerHeight + (obj.extendToolbar ? obj.TOOLBAR_HEIGHT * core.domStyle.scale + obj.BORDER : 0); } gameGroup.style.width = totalWidth + "px"; @@ -3409,9 +3418,7 @@ control.prototype._resize_canvas = function (obj) { } else { for (var name in core.dymCanvas) { var ctx = core.dymCanvas[name], canvas = ctx.canvas; - var ratio = canvas.hasAttribute('isHD') ? core.domStyle.ratio : 1; - canvas.style.width = canvas.width / ratio * core.domStyle.scale + "px"; - canvas.style.height = canvas.height / ratio * core.domStyle.scale + "px"; + core.resizeCanvas(ctx, parseFloat(canvas.getAttribute("_width")), parseFloat(canvas.getAttribute("_height"))) canvas.style.left = parseFloat(canvas.getAttribute("_left")) * core.domStyle.scale + "px"; canvas.style.top = parseFloat(canvas.getAttribute("_top")) * core.domStyle.scale + "px"; } @@ -3435,13 +3442,13 @@ control.prototype._resize_statusBar = function (obj) { statusBar.style.height = obj.outerHeight + (obj.extendToolbar ? obj.TOOLBAR_HEIGHT * core.domStyle.scale + obj.BORDER : 0) + "px"; statusBar.style.background = obj.globalAttribute.statusLeftBackground; // --- 计算文字大小 - if (obj.extendToolbar) { + if (obj.hideLeftStatusBar) { statusBar.style.fontSize = 16 * core.domStyle.scale + "px"; } else { statusBar.style.fontSize = 16 * Math.min(1, (core._HEIGHT_ - 4) / obj.count) * core.domStyle.scale + "px"; } } - statusBar.style.display = obj.extendToolbar ? 'none' : 'block'; + statusBar.style.display = obj.hideLeftStatusBar ? 'none' : 'block'; statusBar.style.borderTop = statusBar.style.borderLeft = obj.border; statusBar.style.borderRight = core.domStyle.isVertical ? obj.border : ''; statusBar.style.borderBottom = core.domStyle.isVertical ? '' : obj.border; @@ -3456,7 +3463,7 @@ control.prototype._resize_statusBar = function (obj) { core.dom.statusCanvas.style.height = obj.outerHeight - 2 * obj.BORDER + (obj.extendToolbar ? obj.TOOLBAR_HEIGHT * core.domStyle.scale + obj.BORDER : 0) + "px"; core.maps._setHDCanvasSize(core.dom.statusCanvasCtx, obj.BAR_WIDTH, core._PY_ + (obj.extendToolbar ? obj.TOOLBAR_HEIGHT + obj.BORDER : 0)); } - core.dom.statusCanvas.style.display = core.flags.statusCanvas && !obj.extendToolbar ? "block" : "none"; + core.dom.statusCanvas.style.display = core.flags.statusCanvas && !obj.hideLeftStatusBar ? "block" : "none"; } control.prototype._resize_status = function (obj) { @@ -3464,7 +3471,7 @@ control.prototype._resize_status = function (obj) { if (core.domStyle.isVertical) { statusHeight = 32 * core.domStyle.scale * 0.8; } else { - statusHeight = (obj.extendToolbar ? core._HEIGHT_ : core._HEIGHT_ - 4) / obj.count * 32 * core.domStyle.scale * 0.8; + statusHeight = (obj.hideLeftStatusBar ? core._HEIGHT_ : core._HEIGHT_ - 4) / obj.count * 32 * core.domStyle.scale * 0.8; } // status for (var i = 0; i < core.dom.status.length; ++i) { @@ -3507,7 +3514,7 @@ control.prototype._resize_toolBar = function (obj) { toolBar.style.background = obj.globalAttribute.toolsBackground; } else { - if (obj.extendToolbar) { + if (obj.extendToolbar || obj.hideLeftStatusBar) { toolBar.style.left = ""; toolBar.style.right = 0; toolBar.style.width = obj.outerWidth + "px"; diff --git a/libs/core.js b/libs/core.js index 89a8bb1..2559b64 100644 --- a/libs/core.js +++ b/libs/core.js @@ -18,7 +18,7 @@ function core () { this._HALF_WIDTH_ = Math.floor(this._WIDTH_ / 2); this._HALF_HEIGHT_ = Math.floor(this._HEIGHT_ / 2); - this.__SIZE__ = main.mode == 'editor' ? 15 : this._HEIGHT_; + this.__SIZE__ = main.mode == 'editor' ? 13 : this._HEIGHT_; this.__PIXELS__ = this.__SIZE__ * 32; this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2); this.material = { diff --git a/libs/maps.js b/libs/maps.js index 1c69af3..4fbbb8b 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -34,11 +34,10 @@ maps.prototype._resetFloorImages = function () { } } -maps.prototype._setHDCanvasSize = function (ctx, width, height, isTempCanvas) { +maps.prototype._setHDCanvasSize = function (ctx, width, height) { ctx.setTransform(1, 0, 0, 1, 0, 0); - var ratio = core.domStyle.ratio; - if (ctx === core.bigmap.tempCanvas) ratio = core.domStyle.scale; - if (isTempCanvas) ratio = core.domStyle.ratio; + var ratio = core.domStyle.scale; + ratio *= devicePixelRatio; if (width != null) ctx.canvas.width = width * ratio; if (height != null) ctx.canvas.height = height * ratio; ctx.scale(ratio, ratio); @@ -1728,18 +1727,20 @@ maps.prototype._drawThumbnail_drawTempCanvas = function (floorId, blocks, option // 如果是大地图模式? if (options.all) { // 计算比例 - var scale = Math.max(core._WIDTH_ / width, core._HEIGHT_ / height); if (options.noHD) { - tempCanvas.canvas.width = width * 32 * scale; - tempCanvas.canvas.height = height * 32 * scale; - } else core.resizeCanvas(tempCanvas, width * 32 * scale, height * 32 * scale, false, true); - tempCanvas.scale(scale, scale); + tempCanvas.canvas.width = width * 32; + tempCanvas.canvas.height = height * 32; + tempCanvas.canvas.removeAttribute('isHD'); + } else { + core.maps._setHDCanvasSize(tempCanvas, width * 32, height * 32); + } } else if (width * height > core.bigmap.threshold) { options.v2 = true; if (options.noHD) { tempCanvas.canvas.width = core._PX_; tempCanvas.canvas.height = core._PY_; - } else core.resizeCanvas(tempCanvas, core._PX_, core._PY_); + tempCanvas.canvas.removeAttribute('isHD'); + } else core.maps._setHDCanvasSize(tempCanvas, width * 32, height * 32); var centerX = options.centerX, centerY = options.centerY; if (centerX == null) centerX = Math.floor(width / 2); if (centerY == null) centerY = Math.floor(height / 2); @@ -1751,7 +1752,8 @@ maps.prototype._drawThumbnail_drawTempCanvas = function (floorId, blocks, option if (options.noHD) { tempCanvas.canvas.width = width * 32; tempCanvas.canvas.height = height * 32; - } else core.resizeCanvas(tempCanvas, width * 32, height * 32, false, true); + tempCanvas.canvas.removeAttribute('isHD'); + } else core.maps._setHDCanvasSize(tempCanvas, width * 32, height * 32); } options.ctx = tempCanvas; @@ -1813,6 +1815,7 @@ maps.prototype._drawThumbnail_drawToTarget = function (floorId, options) { if (centerY == null) centerY = Math.floor(height / 2); var tempCanvas = core.bigmap.tempCanvas; + const scale = core.domStyle.scale * devicePixelRatio; if (options.all) { var tempWidth = tempCanvas.canvas.width, tempHeight = tempCanvas.canvas.height; // 绘制全景图 @@ -1833,20 +1836,28 @@ maps.prototype._drawThumbnail_drawToTarget = function (floorId, options) { } else { // 只绘制可见窗口 - var pw = core._PX_, ph = core._PY_, hw = core._HALF_WIDTH_, hh = core._HALF_HEIGHT_, W = core._WIDTH_, H = core._HEIGHT_; - var ratio = core.domStyle.isVertical ? core.domStyle.ratio : core.domStyle.scale; - if (main.mode == 'editor') { pw = ph = core.__PIXELS__; hw = hh = core.__HALF_SIZE__; W = H = core.__SIZE__; } + var pw = core._PX_, + ph = core._PY_, + hw = core._HALF_WIDTH_, + hh = core._HALF_HEIGHT_, + W = core._WIDTH_, + H = core._HEIGHT_; + if (main.mode == 'editor') { + pw = ph = core.__PIXELS__; + hw = hh = core.__HALF_SIZE__; + W = H = core.__SIZE__; + } if (options.v2) { - core.drawImage(ctx, tempCanvas.canvas, 0, 0, pw * ratio, ph * ratio, x, y, w, h); + if (options.noHD) core.drawImage(ctx, tempCanvas.canvas, 0, 0, pw, ph, x, y, w, h); + else core.drawImage(ctx, tempCanvas.canvas, 0, 0, pw * scale, ph * scale, x, y, w, h); } else { var offsetX = core.clamp(centerX - hw, 0, width - W), - offsetY = core.clamp(centerY - hh, 0, height - H), - c = options.noHD ? 1 : core.domStyle.scale; + offsetY = core.clamp(centerY - hh, 0, height - H); if (options.noHD) { core.drawImage(ctx, tempCanvas.canvas, offsetX * 32, offsetY * 32, pw, ph, x, y, w, h); - return; + } else { + core.drawImage(ctx, tempCanvas.canvas, offsetX * 32 * scale, offsetY * 32 * scale, pw * scale, ph * scale, x, y, w, h); } - core.drawImage(ctx, tempCanvas.canvas, offsetX * 32 * ratio, offsetY * 32 * ratio, pw * ratio, ph * ratio, x, y, w, h); } } } diff --git a/libs/ui.js b/libs/ui.js index 7b6885e..bcead0e 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -57,7 +57,13 @@ ui.prototype.clearMap = function (name, x, y, width, height) { if (x != null && y != null && width != null && height != null) { ctx.clearRect(x, y, width, height); } else { - ctx.clearRect(-32, -32, ctx.canvas.width + 32, ctx.canvas.height + 32); + if (ctx.canvas.getAttribute('isHD')) { + const width = ctx.canvas.width / core.domStyle.scale / devicePixelRatio; + const height = ctx.canvas.height / core.domStyle.scale / devicePixelRatio; + ctx.clearRect(0, 0, width, height); + } else { + ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); + } } } } @@ -1108,12 +1114,16 @@ ui.prototype.drawTextContent = function (ctx, content, config) { config.offsetY = 0; config.line = 0; config.blocks = []; - config.isHD = ctx != null && ctx.canvas.hasAttribute('isHD'); + config.isHD = ctx == null || ctx.canvas.hasAttribute('isHD'); // 创建一个新的临时画布 var tempCtx = document.createElement('canvas').getContext('2d'); - if (config.isHD) { - core.maps._setHDCanvasSize(tempCtx, ctx.canvas.width, ctx.canvas.height); + if (config.isHD && ctx) { + core.maps._setHDCanvasSize( + tempCtx, + ctx.canvas.width, + ctx.canvas.height + ); } else { tempCtx.canvas.width = ctx == null ? 1 : ctx.canvas.width; tempCtx.canvas.height = ctx == null ? 1 : ctx.canvas.height; @@ -1148,10 +1158,20 @@ ui.prototype._drawTextContent_draw = function (ctx, tempCtx, content, config) { if (config.index >= config.blocks.length) return false; var block = config.blocks[config.index++]; if (block != null) { - var ratio = config.isHD ? core.domStyle.ratio : 1; - core.drawImage(ctx, tempCtx.canvas, block.left * ratio, block.top * ratio, block.width * ratio, block.height * ratio, - config.left + block.left + block.marginLeft, config.top + block.top + block.marginTop, - block.width, block.height); + // It works, why? + const scale = config.isHD ? devicePixelRatio * core.domStyle.scale : 1; + core.drawImage( + ctx, + tempCtx.canvas, + block.left * scale, + block.top * scale, + block.width * scale, + block.height * scale, + config.left + block.left + block.marginLeft, + config.top + block.top + block.marginTop, + block.width, + block.height + ); } return true; } @@ -2512,23 +2532,24 @@ ui.prototype.drawFly = function (page) { core.setTextAlign('ui', 'center'); var middle = core._PY_ / 2 + 39; + const lastWidth = 0.25 * core._PX_ - 16; // 换行 - var lines = core.splitLines('ui', title, 120, this._buildFont(19, true)); + var lines = core.splitLines('ui', title, lastWidth, this._buildFont(19, true)); var start_y = middle - (lines.length - 1) * 11; for (var i in lines) { - core.fillText('ui', lines[i], core._PX_ - 60, start_y, '#FFFFFF'); + core.fillText('ui', lines[i], core._PX_ - lastWidth * 0.5, start_y, '#FFFFFF'); start_y += 22; } if (core.actions._getNextFlyFloor(1) != page) { - core.fillText('ui', '▲', core._PX_ - 60, middle - 64, null, this._buildFont(17, false)); - core.fillText('ui', '▲', core._PX_ - 60, middle - 96); - core.fillText('ui', '▲', core._PX_ - 60, middle - 96 - 7); + core.fillText('ui', '▲', core._PX_ - lastWidth * 0.5, middle - 64, null, this._buildFont(17, false)); + core.fillText('ui', '▲', core._PX_ - lastWidth * 0.5, middle - 96); + core.fillText('ui', '▲', core._PX_ - lastWidth * 0.5, middle - 96 - 7); } if (core.actions._getNextFlyFloor(-1) != page) { - core.fillText('ui', '▼', core._PX_ - 60, middle + 64, null, this._buildFont(17, false)); - core.fillText('ui', '▼', core._PX_ - 60, middle + 96); - core.fillText('ui', '▼', core._PX_ - 60, middle + 96 + 7); + core.fillText('ui', '▼', core._PX_ - lastWidth * 0.5, middle + 64, null, this._buildFont(17, false)); + core.fillText('ui', '▼', core._PX_ - lastWidth * 0.5, middle + 96); + core.fillText('ui', '▼', core._PX_ - lastWidth * 0.5, middle + 96 + 7); } var size = 0.75; core.strokeRect('ui', 16, 64, size * core._PX_, size * core._PY_, '#FFFFFF', 2); @@ -3381,6 +3402,8 @@ ui.prototype.createCanvas = function (name, x, y, width, height, z) { newCanvas.style.display = 'block'; newCanvas.setAttribute("_left", x); newCanvas.setAttribute("_top", y); + newCanvas.setAttribute("_width", width); + newCanvas.setAttribute("_height", height); newCanvas.style.width = width * core.domStyle.scale + 'px'; newCanvas.style.height = height * core.domStyle.scale + 'px'; newCanvas.style.left = x * core.domStyle.scale + 'px'; @@ -3439,16 +3462,21 @@ ui.prototype.rotateCanvas = function (name, angle, centerX, centerY) { } ////// canvas重置 ////// -ui.prototype.resizeCanvas = function (name, width, height, styleOnly, isTempCanvas) { +ui.prototype.resizeCanvas = function (name, width, height, styleOnly) { var ctx = core.getContextByName(name); + const canvas = ctx.canvas; if (!ctx) return null; if (width != null) { - if (!styleOnly) core.maps._setHDCanvasSize(ctx, width, null, isTempCanvas); + if (!styleOnly && ctx.canvas.hasAttribute('isHD')) + core.maps._setHDCanvasSize(ctx, width, null); ctx.canvas.style.width = width * core.domStyle.scale + 'px'; + canvas.setAttribute('_width', width); } if (height != null) { - if (!styleOnly) core.maps._setHDCanvasSize(ctx, null, height, isTempCanvas); + if (!styleOnly && ctx.canvas.hasAttribute('isHD')) + core.maps._setHDCanvasSize(ctx, null, height); ctx.canvas.style.height = height * core.domStyle.scale + 'px'; + canvas.setAttribute('_height', height); } return ctx; } diff --git a/main.js b/main.js index ff6da6a..eeead2e 100644 --- a/main.js +++ b/main.js @@ -1,9 +1,8 @@ /// -function main () { - +function main() { //------------------------ 用户修改内容 ------------------------// - this.version = "2.10.0"; // 游戏版本号;如果更改了游戏内容建议修改此version以免造成缓存问题。 + this.version = '2.10.3'; // 游戏版本号;如果更改了游戏内容建议修改此version以免造成缓存问题。 this.useCompress = false; // 是否使用压缩文件 // 当你即将发布你的塔时,请使用“JS代码压缩工具”将所有js代码进行压缩,然后将这里的useCompress改为true。 @@ -11,7 +10,7 @@ function main () { // 如果要进行剧本的修改请务必将其改成false。 this.bgmRemote = false; // 是否采用远程BGM - this.bgmRemoteRoot = "https://h5mota.com/music/"; // 远程BGM的根目录 + this.bgmRemoteRoot = 'https://h5mota.com/music/'; // 远程BGM的根目录 this.isCompetition = false; // 是否是比赛模式 @@ -21,181 +20,210 @@ function main () { //------------------------ 用户修改内容 END ------------------------// this.dom = { - 'body': document.body, - 'gameGroup': document.getElementById('gameGroup'), - 'mainTips': document.getElementById('mainTips'), - 'musicBtn': document.getElementById('musicBtn'), - 'enlargeBtn': document.createElement('img'), - 'startPanel': document.getElementById('startPanel'), - 'startTop': document.getElementById('startTop'), - 'startTopProgressBar': document.getElementById('startTopProgressBar'), - 'startTopProgress': document.getElementById('startTopProgress'), - 'startTopLoadTips': document.getElementById('startTopLoadTips'), - 'startBackground': document.getElementById('startBackground'), - 'startLogo': document.getElementById('startLogo'), - 'startButtonGroup': document.getElementById('startButtonGroup'), - 'floorMsgGroup': document.getElementById('floorMsgGroup'), - 'logoLabel': document.getElementById('logoLabel'), - 'versionLabel': document.getElementById('versionLabel'), - 'floorNameLabel': document.getElementById('floorNameLabel'), - 'statusBar': document.getElementById('statusBar'), - 'status': document.getElementsByClassName('status'), - 'toolBar': document.getElementById('toolBar'), - 'tools': document.getElementsByClassName('tools'), - 'gameCanvas': document.getElementsByClassName('gameCanvas'), - 'gif': document.getElementById('gif'), - 'gif2': document.getElementById('gif2'), - 'gameDraw': document.getElementById('gameDraw'), - 'startButtons': document.getElementById('startButtons'), - 'playGame': document.getElementById('playGame'), - 'loadGame': document.getElementById('loadGame'), - 'replayGame': document.getElementById('replayGame'), - 'levelChooseButtons': document.getElementById('levelChooseButtons'), - 'data': document.getElementById('data'), - 'statusLabels': document.getElementsByClassName('statusLabel'), - 'statusTexts': document.getElementsByClassName('statusText'), - 'floorCol': document.getElementById('floorCol'), - 'nameCol': document.getElementById('nameCol'), - 'lvCol': document.getElementById('lvCol'), - 'hpmaxCol': document.getElementById('hpmaxCol'), - 'hpCol': document.getElementById('hpCol'), - 'manaCol': document.getElementById('manaCol'), - 'atkCol': document.getElementById('atkCol'), - 'defCol': document.getElementById('defCol'), - 'mdefCol': document.getElementById('mdefCol'), - 'moneyCol': document.getElementById('moneyCol'), - 'expCol': document.getElementById('expCol'), - 'upCol': document.getElementById('upCol'), - 'keyCol': document.getElementById('keyCol'), - 'pzfCol': document.getElementById('pzfCol'), - 'debuffCol': document.getElementById('debuffCol'), - 'skillCol': document.getElementById('skillCol'), - 'hard': document.getElementById('hard'), - 'statusCanvas': document.getElementById('statusCanvas'), - 'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'), - 'inputDiv': document.getElementById('inputDiv'), - 'inputMessage': document.getElementById('inputMessage'), - 'inputBox': document.getElementById('inputBox'), - 'inputYes': document.getElementById('inputYes'), - 'inputNo': document.getElementById('inputNo'), - 'next': document.getElementById('next') + body: document.body, + gameGroup: document.getElementById('gameGroup'), + mainTips: document.getElementById('mainTips'), + musicBtn: document.getElementById('musicBtn'), + enlargeBtn: document.createElement('img'), + startPanel: document.getElementById('startPanel'), + startTop: document.getElementById('startTop'), + startTopProgressBar: document.getElementById('startTopProgressBar'), + startTopProgress: document.getElementById('startTopProgress'), + startTopLoadTips: document.getElementById('startTopLoadTips'), + startBackground: document.getElementById('startBackground'), + startLogo: document.getElementById('startLogo'), + startButtonGroup: document.getElementById('startButtonGroup'), + floorMsgGroup: document.getElementById('floorMsgGroup'), + logoLabel: document.getElementById('logoLabel'), + versionLabel: document.getElementById('versionLabel'), + floorNameLabel: document.getElementById('floorNameLabel'), + statusBar: document.getElementById('statusBar'), + status: document.getElementsByClassName('status'), + toolBar: document.getElementById('toolBar'), + tools: document.getElementsByClassName('tools'), + gameCanvas: document.getElementsByClassName('gameCanvas'), + gif: document.getElementById('gif'), + gif2: document.getElementById('gif2'), + gameDraw: document.getElementById('gameDraw'), + startButtons: document.getElementById('startButtons'), + playGame: document.getElementById('playGame'), + loadGame: document.getElementById('loadGame'), + replayGame: document.getElementById('replayGame'), + levelChooseButtons: document.getElementById('levelChooseButtons'), + data: document.getElementById('data'), + statusLabels: document.getElementsByClassName('statusLabel'), + statusTexts: document.getElementsByClassName('statusText'), + floorCol: document.getElementById('floorCol'), + nameCol: document.getElementById('nameCol'), + lvCol: document.getElementById('lvCol'), + hpmaxCol: document.getElementById('hpmaxCol'), + hpCol: document.getElementById('hpCol'), + manaCol: document.getElementById('manaCol'), + atkCol: document.getElementById('atkCol'), + defCol: document.getElementById('defCol'), + mdefCol: document.getElementById('mdefCol'), + moneyCol: document.getElementById('moneyCol'), + expCol: document.getElementById('expCol'), + upCol: document.getElementById('upCol'), + keyCol: document.getElementById('keyCol'), + pzfCol: document.getElementById('pzfCol'), + debuffCol: document.getElementById('debuffCol'), + skillCol: document.getElementById('skillCol'), + hard: document.getElementById('hard'), + statusCanvas: document.getElementById('statusCanvas'), + statusCanvasCtx: document + .getElementById('statusCanvas') + .getContext('2d'), + inputDiv: document.getElementById('inputDiv'), + inputMessage: document.getElementById('inputMessage'), + inputBox: document.getElementById('inputBox'), + inputYes: document.getElementById('inputYes'), + inputNo: document.getElementById('inputNo'), + next: document.getElementById('next') }; this.mode = 'play'; this.loadList = [ - 'loader', 'control', 'utils', 'items', 'icons', 'maps', 'enemys', 'events', 'actions', 'data', 'ui', 'extensions', 'core' + 'loader', + 'control', + 'utils', + 'items', + 'icons', + 'maps', + 'enemys', + 'events', + 'actions', + 'data', + 'ui', + 'extensions', + 'core' ]; this.pureData = [ - 'data', 'enemys', 'icons', 'maps', 'items', 'functions', 'events', 'plugins' + 'data', + 'enemys', + 'icons', + 'maps', + 'items', + 'functions', + 'events', + 'plugins' ]; this.materials = [ - 'animates', 'enemys', 'items', 'npcs', 'terrains', 'enemy48', 'npc48', 'icons' + 'animates', + 'enemys', + 'items', + 'npcs', + 'terrains', + 'enemy48', + 'npc48', + 'icons' ]; this.statusBar = { - 'image': { - 'floor': document.getElementById('img-floor'), - 'name': document.getElementById('img-name'), - 'lv': document.getElementById('img-lv'), - 'hpmax': document.getElementById('img-hpmax'), - 'hp': document.getElementById("img-hp"), - 'mana': document.getElementById("img-mana"), - 'atk': document.getElementById("img-atk"), - 'def': document.getElementById("img-def"), - 'mdef': document.getElementById("img-mdef"), - 'money': document.getElementById("img-money"), - 'exp': document.getElementById("img-exp"), - 'up': document.getElementById("img-up"), - 'skill': document.getElementById('img-skill'), - 'book': document.getElementById("img-book"), - 'fly': document.getElementById("img-fly"), - 'toolbox': document.getElementById("img-toolbox"), - 'keyboard': document.getElementById("img-keyboard"), - 'shop': document.getElementById('img-shop'), - 'save': document.getElementById("img-save"), - 'load': document.getElementById("img-load"), - 'settings': document.getElementById("img-settings"), - 'btn1': document.getElementById("img-btn1"), - 'btn2': document.getElementById("img-btn2"), - 'btn3': document.getElementById("img-btn3"), - 'btn4': document.getElementById("img-btn4"), - 'btn5': document.getElementById("img-btn5"), - 'btn6': document.getElementById("img-btn6"), - 'btn7': document.getElementById("img-btn7"), - 'btn8': document.getElementById("img-btn8"), + image: { + floor: document.getElementById('img-floor'), + name: document.getElementById('img-name'), + lv: document.getElementById('img-lv'), + hpmax: document.getElementById('img-hpmax'), + hp: document.getElementById('img-hp'), + mana: document.getElementById('img-mana'), + atk: document.getElementById('img-atk'), + def: document.getElementById('img-def'), + mdef: document.getElementById('img-mdef'), + money: document.getElementById('img-money'), + exp: document.getElementById('img-exp'), + up: document.getElementById('img-up'), + skill: document.getElementById('img-skill'), + book: document.getElementById('img-book'), + fly: document.getElementById('img-fly'), + toolbox: document.getElementById('img-toolbox'), + keyboard: document.getElementById('img-keyboard'), + shop: document.getElementById('img-shop'), + save: document.getElementById('img-save'), + load: document.getElementById('img-load'), + settings: document.getElementById('img-settings'), + btn1: document.getElementById('img-btn1'), + btn2: document.getElementById('img-btn2'), + btn3: document.getElementById('img-btn3'), + btn4: document.getElementById('img-btn4'), + btn5: document.getElementById('img-btn5'), + btn6: document.getElementById('img-btn6'), + btn7: document.getElementById('img-btn7'), + btn8: document.getElementById('img-btn8') }, - 'icons': { - 'floor': 0, - 'name': null, - 'lv': 1, - 'hpmax': 2, - 'hp': 3, - 'atk': 4, - 'def': 5, - 'mdef': 6, - 'money': 7, - 'exp': 8, - 'up': 9, - 'book': 10, - 'fly': 11, - 'toolbox': 12, - 'keyboard': 13, - 'shop': 14, - 'save': 15, - 'load': 16, - 'settings': 17, - 'play': 18, - 'pause': 19, - 'stop': 20, - 'speedDown': 21, - 'speedUp': 22, - 'rewind': 23, - 'equipbox': 24, - 'mana': 25, - 'skill': 26, - 'btn1': 27, - 'btn2': 28, - 'btn3': 29, - 'btn4': 30, - 'btn5': 31, - 'btn6': 32, - 'btn7': 33, - 'btn8': 34 + icons: { + floor: 0, + name: null, + lv: 1, + hpmax: 2, + hp: 3, + atk: 4, + def: 5, + mdef: 6, + money: 7, + exp: 8, + up: 9, + book: 10, + fly: 11, + toolbox: 12, + keyboard: 13, + shop: 14, + save: 15, + load: 16, + settings: 17, + play: 18, + pause: 19, + stop: 20, + speedDown: 21, + speedUp: 22, + rewind: 23, + equipbox: 24, + mana: 25, + skill: 26, + btn1: 27, + btn2: 28, + btn3: 29, + btn4: 30, + btn5: 31, + btn6: 32, + btn7: 33, + btn8: 34 }, - 'floor': document.getElementById('floor'), - 'name': document.getElementById('name'), - 'lv': document.getElementById('lv'), - 'hpmax': document.getElementById('hpmax'), - 'hp': document.getElementById('hp'), - 'mana': document.getElementById('mana'), - 'atk': document.getElementById('atk'), - 'def': document.getElementById("def"), - 'mdef': document.getElementById('mdef'), - 'money': document.getElementById("money"), - 'exp': document.getElementById("exp"), - 'up': document.getElementById('up'), - 'skill': document.getElementById('skill'), - 'yellowKey': document.getElementById("yellowKey"), - 'blueKey': document.getElementById("blueKey"), - 'redKey': document.getElementById("redKey"), - 'greenKey': document.getElementById("greenKey"), - 'poison': document.getElementById('poison'), - 'weak': document.getElementById('weak'), - 'curse': document.getElementById('curse'), - 'pickaxe': document.getElementById('pickaxe'), - 'bomb': document.getElementById('bomb'), - 'fly': document.getElementById('fly'), - 'hard': document.getElementById("hard") - } - this.floors = {} + floor: document.getElementById('floor'), + name: document.getElementById('name'), + lv: document.getElementById('lv'), + hpmax: document.getElementById('hpmax'), + hp: document.getElementById('hp'), + mana: document.getElementById('mana'), + atk: document.getElementById('atk'), + def: document.getElementById('def'), + mdef: document.getElementById('mdef'), + money: document.getElementById('money'), + exp: document.getElementById('exp'), + up: document.getElementById('up'), + skill: document.getElementById('skill'), + yellowKey: document.getElementById('yellowKey'), + blueKey: document.getElementById('blueKey'), + redKey: document.getElementById('redKey'), + greenKey: document.getElementById('greenKey'), + poison: document.getElementById('poison'), + weak: document.getElementById('weak'), + curse: document.getElementById('curse'), + pickaxe: document.getElementById('pickaxe'), + bomb: document.getElementById('bomb'), + fly: document.getElementById('fly'), + hard: document.getElementById('hard') + }; + this.floors = {}; this.canvas = {}; - this.__VERSION__ = "2.10.0"; - this.__VERSION_CODE__ = 510; + this.__VERSION__ = '2.10.3'; + this.__VERSION_CODE__ = 512; } main.prototype.init = function (mode, callback) { for (var i = 0; i < main.dom.gameCanvas.length; i++) { - main.canvas[main.dom.gameCanvas[i].id] = main.dom.gameCanvas[i].getContext('2d'); + main.canvas[main.dom.gameCanvas[i].id] = + main.dom.gameCanvas[i].getContext('2d'); } main.mode = mode; @@ -213,7 +241,7 @@ main.prototype.init = function (mode, callback) { (function (span, str_) { span.onclick = function () { core.events.startGame(str_); - } + }; })(span, value.name || ''); main.dom.levelChooseButtons.appendChild(span); }); @@ -231,44 +259,94 @@ main.prototype.init = function (mode, callback) { main.loadFloors(function () { var coreData = {}; - ["dom", "statusBar", "canvas", "images", "tilesets", "materials", - "animates", "bgms", "sounds", "floorIds", "floors", "floorPartitions"].forEach(function (t) { - coreData[t] = main[t]; - }) + [ + 'dom', + 'statusBar', + 'canvas', + 'images', + 'tilesets', + 'materials', + 'animates', + 'bgms', + 'sounds', + 'floorIds', + 'floors', + 'floorPartitions' + ].forEach(function (t) { + coreData[t] = main[t]; + }); main.core.init(coreData, callback); main.core.resize(); // 自动放缩最大化 - if (!data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.flags.autoScale) core.setLocalStorage('autoScale', false) - else core.setLocalStorage('autoScale', true); - if (core.getLocalStorage('autoScale') && !core.domStyle.isVertical) { - try { - if (main.core) { - var index = main.core.domStyle.availableScale.indexOf(core.domStyle.scale); - main.core.control.setDisplayScale(main.core.domStyle.availableScale.length - 1 - index); - if (!main.core.isPlaying() && main.core.flags.enableHDCanvas) { - main.core.domStyle.ratio = Math.max(window.devicePixelRatio || 1, main.core.domStyle.scale); - main.core.resize(); + if (!main.replayChecking) { + if (core.getLocalStorage('autoScale') == null) { + core.setLocalStorage('autoScale', true); + } + if ( + core.getLocalStorage('autoScale') && + !core.domStyle.isVertical + ) { + try { + if (main.core) { + var index = + main.core.domStyle.availableScale.indexOf( + core.domStyle.scale + ); + main.core.control.setDisplayScale( + main.core.domStyle.availableScale.length - + 1 - + index + ); + if ( + !main.core.isPlaying() && + main.core.flags.enableHDCanvas + ) { + main.core.domStyle.ratio = Math.max( + window.devicePixelRatio || 1, + main.core.domStyle.scale + ); + main.core.resize(); + } + requestAnimationFrame(function () { + var style = getComputedStyle( + main.dom.gameGroup + ); + var height = parseFloat(style.height); + if (height > window.innerHeight * 0.95) { + main.core.control.setDisplayScale(-1); + if ( + !main.core.isPlaying() && + main.core.flags.enableHDCanvas + ) { + main.core.domStyle.ratio = Math.max( + window.devicePixelRatio || 1, + main.core.domStyle.scale + ); + main.core.resize(); + } + } + }); } + } catch (e) { + console.error(e); } - } catch (e) { console.error(e) }; + } } }); }); }); -} +}; ////// 动态加载所有核心JS文件 ////// main.prototype.loadJs = function (dir, loadList, callback) { - // 加载js - main.setMainTipsText('正在加载核心js文件...') + main.setMainTipsText('正在加载核心js文件...'); if (this.useCompress) { main.loadMod(dir, dir, function () { callback(); - }) - } - else { + }); + } else { var instanceNum = 0; for (var i = 0; i < loadList.length; i++) { main.loadMod(dir, loadList[i], function (modName) { @@ -280,57 +358,75 @@ main.prototype.loadJs = function (dir, loadList, callback) { }); } } -} +}; ////// 加载某一个JS文件 ////// main.prototype.loadMod = function (dir, modName, callback, onerror) { var script = document.createElement('script'); var name = modName; - script.src = dir + '/' + modName + (this.useCompress ? ".min" : "") + '.js?v=' + this.version; + script.src = + dir + + '/' + + modName + + (this.useCompress ? '.min' : '') + + '.js?v=' + + this.version; script.onload = function () { callback(name); - } + }; main.dom.body.appendChild(script); -} +}; ////// 动态加载所有楼层(剧本) ////// main.prototype.loadFloors = function (callback) { - // 加载js - main.setMainTipsText('正在加载楼层文件...') - if (this.useCompress) { // 读取压缩文件 + main.setMainTipsText('正在加载楼层文件...'); + if (this.useCompress) { + // 读取压缩文件 var script = document.createElement('script'); script.src = 'project/floors.min.js?v=' + this.version; main.dom.body.appendChild(script); script.onload = function () { main.dom.mainTips.style.display = 'none'; callback(); - } + }; return; } // 高层塔优化 var script = document.createElement('script'); - script.src = '__all_floors__.js?v=' + this.version + '&id=' + main.floorIds.join(','); + script.src = + '__all_floors__.js?v=' + + this.version + + '&id=' + + main.floorIds.join(','); script.onload = function () { main.dom.mainTips.style.display = 'none'; main.supportBunch = true; callback(); - } - script.onerror = script.onabort = script.ontimeout = function (e) { - // console.clear(); - for (var i = 0; i < main.floorIds.length; i++) { - main.loadFloor(main.floorIds[i], function (modName) { - main.setMainTipsText("楼层 " + modName + '.js 加载完毕'); - if (Object.keys(main.floors).length === main.floorIds.length) { - main.dom.mainTips.style.display = 'none'; - callback(); + }; + script.onerror = + script.onabort = + script.ontimeout = + function (e) { + // console.clear(); + for (var i = 0; i < main.floorIds.length; i++) { + main.loadFloor(main.floorIds[i], function (modName) { + main.setMainTipsText( + '楼层 ' + modName + '.js 加载完毕' + ); + if ( + Object.keys(main.floors).length === + main.floorIds.length + ) { + main.dom.mainTips.style.display = 'none'; + callback(); + } + }); } - }); - } - } + }; main.dom.body.appendChild(script); -} +}; ////// 加载某一个楼层 ////// main.prototype.loadFloor = function (floorId, callback) { @@ -339,69 +435,78 @@ main.prototype.loadFloor = function (floorId, callback) { main.dom.body.appendChild(script); script.onload = function () { callback(floorId); - } -} + }; +}; ////// 加载过程提示 ////// main.prototype.setMainTipsText = function (text) { main.dom.mainTips.innerHTML = text; -} +}; main.prototype.log = function (e, error) { if (e) { if (error) return console.error(e); if (main.core && main.core.platform && !main.core.platform.isPC) { - console.log((e.stack || e.toString())); - } - else { + console.log(e.stack || e.toString()); + } else { console.log(e); } } -} +}; main.prototype.createOnChoiceAnimation = function () { - var borderColor = main.dom.startButtonGroup.style.caretColor || "rgb(255, 215, 0)"; + var borderColor = + main.dom.startButtonGroup.style.caretColor || 'rgb(255, 215, 0)'; // get rgb value - var rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+\s*)?\)$/.exec(borderColor); + var rgb = + /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+\s*)?\)$/.exec( + borderColor + ); if (rgb != null) { - var value = rgb[1] + ", " + rgb[2] + ", " + rgb[3]; - var style = document.createElement("style"); + var value = rgb[1] + ', ' + rgb[2] + ', ' + rgb[3]; + var style = document.createElement('style'); style.type = 'text/css'; - var keyFrames = "onChoice { " + - "0% { border-color: rgba(" + value + ", 0.9); } " + - "50% { border-color: rgba(" + value + ", 0.3); } " + - "100% { border-color: rgba(" + value + ", 0.9); } " + - "}"; - style.innerHTML = "@-webkit-keyframes " + keyFrames + " @keyframes " + keyFrames; + var keyFrames = + 'onChoice { ' + + '0% { border-color: rgba(' + + value + + ', 0.9); } ' + + '50% { border-color: rgba(' + + value + + ', 0.3); } ' + + '100% { border-color: rgba(' + + value + + ', 0.9); } ' + + '}'; + style.innerHTML = + '@-webkit-keyframes ' + keyFrames + ' @keyframes ' + keyFrames; document.body.appendChild(style); } -} +}; ////// 选项 ////// main.prototype.selectButton = function (index) { var select = function (children) { index = (index + children.length) % children.length; for (var i = 0; i < children.length; ++i) { - children[i].classList.remove("onChoiceAnimate"); + children[i].classList.remove('onChoiceAnimate'); } - children[index].classList.add("onChoiceAnimate"); + children[index].classList.add('onChoiceAnimate'); if (main.selectedButton == index) { children[index].click(); - } - else { + } else { main.selectedButton = index; } - } + }; if (core.dom.startPanel.style.display != 'block') return; if (main.dom.startButtons.style.display == 'block') { select(main.dom.startButtons.children); - } - else if (main.dom.levelChooseButtons.style.display == 'block') { + } else if (main.dom.levelChooseButtons.style.display == 'block') { select(main.dom.levelChooseButtons.children); } -} +}; ////// 创建字体 ////// main.prototype.importFonts = function (fonts) { @@ -410,44 +515,65 @@ main.prototype.importFonts = function (fonts) { style.type = 'text/css'; var html = ''; fonts.forEach(function (font) { - html += '@font-face { font-family: "' + font + '"; src: url("project/fonts/' + font + '.ttf") format("truetype"); }'; + html += + '@font-face { font-family: "' + + font + + '"; src: url("project/fonts/' + + font + + '.ttf") format("truetype"); }'; }); style.innerHTML = html; document.body.appendChild(style); -} +}; main.prototype.listen = function () { - ////// 窗口大小变化时 ////// window.onresize = function () { try { main.core.resize(); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 在界面上按下某按键时 ////// main.dom.body.onkeydown = function (e) { if (main.editorOpened) return; try { if (main.dom.inputDiv.style.display == 'block') return; - if (main.core && (main.core.isPlaying() || main.core.status.lockControl)) + if ( + main.core && + (main.core.isPlaying() || main.core.status.lockControl) + ) main.core.onkeyDown(e); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 在界面上放开某按键时 ////// main.dom.body.onkeyup = function (e) { if (main.editorOpened) return; try { - if (main.dom.startPanel.style.display == 'block' && - (main.dom.startButtons.style.display == 'block' || main.dom.levelChooseButtons.style.display == 'block')) { - if (e.keyCode == 38 || e.keyCode == 33) // up/pgup + if ( + main.dom.startPanel.style.display == 'block' && + (main.dom.startButtons.style.display == 'block' || + main.dom.levelChooseButtons.style.display == 'block') + ) { + if (e.keyCode == 38 || e.keyCode == 33) + // up/pgup main.selectButton((main.selectedButton || 0) - 1); - else if (e.keyCode == 40 || e.keyCode == 34) // down/pgdn + else if (e.keyCode == 40 || e.keyCode == 34) + // down/pgdn main.selectButton((main.selectedButton || 0) + 1); - else if (e.keyCode == 67 || e.keyCode == 13 || e.keyCode == 32) // C/Enter/Space + else if (e.keyCode == 67 || e.keyCode == 13 || e.keyCode == 32) + // C/Enter/Space main.selectButton(main.selectedButton); - else if (e.keyCode == 27 && main.dom.levelChooseButtons.style.display == 'block') { // ESC + else if ( + e.keyCode == 27 && + main.dom.levelChooseButtons.style.display == 'block' + ) { + // ESC main.core.showStartAnimate(true); } e.stopPropagation(); @@ -458,34 +584,44 @@ main.prototype.listen = function () { setTimeout(function () { main.dom.inputYes.click(); }, 50); - } - else if (e.keyCode == 27) { + } else if (e.keyCode == 27) { setTimeout(function () { main.dom.inputNo.click(); }, 50); } return; } - if (main.core && main.core.isPlaying && main.core.status && - (main.core.isPlaying() || main.core.status.lockControl)) + if ( + main.core && + main.core.isPlaying && + main.core.status && + (main.core.isPlaying() || main.core.status.lockControl) + ) main.core.onkeyUp(e); - } catch (ee) { console.error(ee) } + } catch (ee) { + console.error(ee); + } }; - [main.dom.startButtons, main.dom.levelChooseButtons].forEach(function (dom) { + [main.dom.startButtons, main.dom.levelChooseButtons].forEach(function ( + dom + ) { dom.onmousemove = function (e) { for (var i = 0; i < dom.children.length; ++i) { - if (dom.children[i] == e.target && i != (main.selectedButton || 0)) { + if ( + dom.children[i] == e.target && + i != (main.selectedButton || 0) + ) { main.selectButton(i); } } - } + }; }); ////// 开始选择时 ////// main.dom.body.onselectstart = function () { return false; - } + }; ////// 鼠标按下时 ////// main.dom.data.onmousedown = function (e) { @@ -494,8 +630,10 @@ main.prototype.listen = function () { var loc = main.core.actions._getClickLoc(e.clientX, e.clientY); if (loc == null) return; main.core.ondown(loc); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 鼠标移动时 ////// main.dom.data.onmousemove = function (e) { @@ -504,8 +642,10 @@ main.prototype.listen = function () { var loc = main.core.actions._getClickLoc(e.clientX, e.clientY); if (loc == null) return; main.core.onmove(loc); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 鼠标放开时 ////// main.dom.data.onmouseup = function (e) { @@ -514,40 +654,52 @@ main.prototype.listen = function () { var loc = main.core.actions._getClickLoc(e.clientX, e.clientY); if (loc == null) return; main.core.onup(loc); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 鼠标滑轮滚动时 ////// main.dom.data.onmousewheel = function (e) { try { - if (e.wheelDelta) - main.core.onmousewheel(Math.sign(e.wheelDelta)) - else if (e.detail) - main.core.onmousewheel(Math.sign(e.detail)); - } catch (ee) { console.error(ee) } - } + if (e.wheelDelta) main.core.onmousewheel(Math.sign(e.wheelDelta)); + else if (e.detail) main.core.onmousewheel(Math.sign(e.detail)); + } catch (ee) { + console.error(ee); + } + }; ////// 手指在触摸屏开始触摸时 ////// main.dom.data.ontouchstart = function (e) { try { e.preventDefault(); - var loc = main.core.actions._getClickLoc(e.targetTouches[0].clientX, e.targetTouches[0].clientY); + var loc = main.core.actions._getClickLoc( + e.targetTouches[0].clientX, + e.targetTouches[0].clientY + ); if (loc == null) return; main.lastTouchLoc = loc; main.core.ondown(loc); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 手指在触摸屏上移动时 ////// main.dom.data.ontouchmove = function (e) { try { e.preventDefault(); - var loc = main.core.actions._getClickLoc(e.targetTouches[0].clientX, e.targetTouches[0].clientY); + var loc = main.core.actions._getClickLoc( + e.targetTouches[0].clientX, + e.targetTouches[0].clientY + ); if (loc == null) return; main.lastTouchLoc = loc; main.core.onmove(loc); - } catch (ee) { console.error(ee) } - } + } catch (ee) { + console.error(ee); + } + }; ////// 手指离开触摸屏时 ////// main.dom.data.ontouchend = function (e) { @@ -560,7 +712,7 @@ main.prototype.listen = function () { } catch (e) { console.error(e); } - } + }; main.dom.statusCanvas.onclick = function (e) { try { @@ -569,7 +721,7 @@ main.prototype.listen = function () { } catch (e) { console.error(e); } - } + }; ////// 点击状态栏中的怪物手册时 ////// main.statusBar.image.book.onclick = function (e) { @@ -580,9 +732,8 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.openBook(true); - } + if (main.core.isPlaying()) main.core.openBook(true); + }; ////// 点击状态栏中的楼层传送器/装备栏时 ////// main.statusBar.image.fly.onclick = function (e) { @@ -597,12 +748,11 @@ main.prototype.listen = function () { if (main.core.isPlaying()) { if (!main.core.flags.equipboxButton) { main.core.useFly(true); - } - else { - main.core.openEquipbox(true) + } else { + main.core.openEquipbox(true); } } - } + }; ////// 点击状态栏中的工具箱时 ////// main.statusBar.image.toolbox.onclick = function (e) { @@ -616,7 +766,7 @@ main.prototype.listen = function () { if (main.core.isPlaying()) { main.core.openToolbox(core.status.event.id != 'equipbox'); } - } + }; ////// 双击状态栏中的工具箱时 ////// main.statusBar.image.toolbox.ondblclick = function (e) { @@ -626,10 +776,8 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.openEquipbox(true); - - } + if (main.core.isPlaying()) main.core.openEquipbox(true); + }; ////// 点击状态栏中的虚拟键盘时 ////// main.statusBar.image.keyboard.onclick = function (e) { @@ -640,9 +788,8 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.openKeyBoard(true); - } + if (main.core.isPlaying()) main.core.openKeyBoard(true); + }; ////// 点击状态栏中的快捷商店时 ////// main.statusBar.image.shop.onclick = function (e) { @@ -653,26 +800,29 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.openQuickShop(true); - } + if (main.core.isPlaying()) main.core.openQuickShop(true); + }; ////// 点击金币时也可以开启快捷商店 ////// main.statusBar.image.money.onclick = function (e) { e.stopPropagation(); - if (main.core.isPlaying()) - main.core.openQuickShop(true); - } + if (main.core.isPlaying()) main.core.openQuickShop(true); + }; ////// 点击楼梯图标也可以浏览地图 ////// main.statusBar.image.floor.onclick = function (e) { e.stopPropagation(); - if (main.core && main.core.isPlaying() && !core.isMoving() && !core.status.lockControl) { + if ( + main.core && + main.core.isPlaying() && + !core.isMoving() && + !core.status.lockControl + ) { core.ui._drawViewMaps(); } - } + }; ////// 点击状态栏中的存档按钮时 ////// main.statusBar.image.save.onclick = function (e) { @@ -683,9 +833,8 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.save(true); - } + if (main.core.isPlaying()) main.core.save(true); + }; ////// 点击状态栏中的读档按钮时 ////// main.statusBar.image.load.onclick = function (e) { @@ -696,9 +845,8 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.load(true); - } + if (main.core.isPlaying()) main.core.load(true); + }; ////// 点击状态栏中的系统菜单时 ////// main.statusBar.image.settings.onclick = function (e) { @@ -709,61 +857,80 @@ main.prototype.listen = function () { return; } - if (main.core.isPlaying()) - main.core.openSettings(true); - } + if (main.core.isPlaying()) main.core.openSettings(true); + }; ////// 点击工具栏时 ////// main.dom.hard.onclick = function () { main.core.control.setToolbarButton(!core.domStyle.toolbarBtn); - } + }; ////// 手机端的按钮1-7 ////// main.statusBar.image.btn1.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 49, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 49, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn2.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 50, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 50, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn3.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 51, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 51, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn4.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 52, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 52, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn5.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 53, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 53, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn6.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 54, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 54, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn7.onclick = function (e) { e.stopPropagation(); - main.core.onkeyUp({ "keyCode": 55, "altKey": core.getLocalStorage('altKey') }); + main.core.onkeyUp({ + keyCode: 55, + altKey: core.getLocalStorage('altKey') + }); }; main.statusBar.image.btn8.onclick = function (e) { e.stopPropagation(); if (core.getLocalStorage('altKey')) { core.removeLocalStorage('altKey'); - core.drawTip("Alt模式已关闭。"); + core.drawTip('Alt模式已关闭。'); main.statusBar.image.btn8.style.filter = ''; - } - else { + } else { core.setLocalStorage('altKey', true); - core.drawTip("Alt模式已开启;此模式下1~7按钮视为Alt+1~7。"); + core.drawTip('Alt模式已开启;此模式下1~7按钮视为Alt+1~7。'); main.statusBar.image.btn8.style.filter = 'sepia(1) contrast(1.5)'; } }; @@ -774,55 +941,55 @@ main.prototype.listen = function () { main.core.control.checkBgm(); if (main.levelChoose.length == 0) { - core.events.startGame(""); + core.events.startGame(''); } else { main.dom.levelChooseButtons.style.display = 'block'; main.selectedButton = null; main.selectButton(0); } - } + }; ////// 点击“载入游戏”时 ////// main.dom.loadGame.onclick = function () { main.core.control.checkBgm(); main.core.load(); - } + }; ////// 点击“录像回放”时 ////// main.dom.replayGame.onclick = function () { main.core.control.checkBgm(); main.core.chooseReplayFile(); - } + }; main.dom.musicBtn.onclick = function () { try { - if (main.core) - main.core.triggerBgm(); - } catch (ee) { console.error(ee) } - } + if (main.core) main.core.triggerBgm(); + } catch (ee) { + console.error(ee); + } + }; window.onblur = function () { if (main.core && main.core.control) { try { main.core.control.checkAutosave(); - } catch (e) { } + } catch (e) {} } - } + }; main.dom.inputYes.onclick = function () { main.dom.inputDiv.style.display = 'none'; var func = core.platform.successCallback; core.platform.successCallback = core.platform.errorCallback = null; if (func) func(main.dom.inputBox.value); - } + }; main.dom.inputNo.onclick = function () { main.dom.inputDiv.style.display = 'none'; var func = core.platform.errorCallback; core.platform.successCallback = core.platform.errorCallback = null; if (func) func(null); - } + }; +}; //listen end -}//listen end - -var main = new main(); \ No newline at end of file +var main = new main(); diff --git a/project/data.js b/project/data.js index b7dd682..98877e7 100644 --- a/project/data.js +++ b/project/data.js @@ -165,7 +165,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "firstData": { "title": "魔塔样板", "name": "template", - "version": "Ver 2.10.0", + "version": "Ver 2.10.3", "floorId": "sample0", "hero": { "image": "hero.png", @@ -771,6 +771,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "enableMoveDirectly": true, "enableRouteFolding": true, "disableShopOnDamage": false, - "blurFg": false + "blurFg": false, + "hideLeftStatusBar": false } } \ No newline at end of file diff --git a/project/functions.js b/project/functions.js index 1ceccc8..299ae53 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1592,6 +1592,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = .sort( /*function (id1, id2) { return core.material.items[id1].name <= core.material.items[id2].name ? -1 : 1 }*/); }, "drawStatusBar": function () { + // 这真的是人能写出来的东西? var ctx, fill = function (text, x, y, style) { core.ui.setFont(ctx, (/\w+/.test(text) ? 'italic ' : '') + 'bold 18px Verdana'); core.ui.fillBoldText(ctx, text, x, y, style); @@ -1614,7 +1615,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = fill(core.formatBigNumber(core.status.hero.money), 304, 58); core.drawImage(ctx, core.statusBar.icons.exp, 6, 70, 25, 25); fill(core.formatBigNumber(core.status.hero.exp), 42, 90); - } else if (!core.flags.extendToolbar) { // 横屏且未隐藏状态栏 + } else if (!core.flags.hideLeftStatusBar) { // 横屏且未隐藏状态栏 core.drawImage(ctx, core.statusBar.icons.floor, 6, 9, 25, 25); fill((core.status.thisMap || {}).name || "Loading", 42, 29); core.drawImage(ctx, core.statusBar.icons.hp, 6, 43, 25, 25); @@ -1633,7 +1634,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = fill(core.setTwoDigits(core.itemCount('blueKey')), 46, 267, '#AAAADD'); fill(core.setTwoDigits(core.itemCount('redKey')), 81, 267, '#FF8888'); } - } else if (core.flags.extendToolbar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏 + } else if (core.flags.hideLeftStatusBar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏 if (!core.dymCanvas['status']) core.ui.createCanvas('status', 0, 0, core._PX_, core._PY_, 66); // 刚好盖过显伤层 core.ui.clearMap(ctx = core.dymCanvas['status']); diff --git a/project/plugins.js b/project/plugins.js index 2d0001b..93e3b92 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -362,7 +362,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = if (!name) return; var canvas = document.createElement('canvas'); canvas.id = name; - canvas.className = 'gameCanvas'; + canvas.className = 'gameCanvas anti-aliasing'; // 编辑器模式下设置zIndex会导致加入的图层覆盖优先级过高 if (main.mode != "editor") canvas.style.zIndex = zIndex || 0; // 将图层插入进游戏内容 @@ -1551,5 +1551,269 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } window.Sprite = Sprite; + }, + "hotReload": function () { + /* ---------- 功能说明 ---------- * + + 1. 当 libs/ main.js index.html 中的任意一个文件被更改后,会自动刷新塔的页面 + 2. 修改楼层文件后自动在塔的页面上显示出来,不需要刷新 + 3. 修改脚本编辑或插件编写后也能自动更新更改的插件或脚本,但不保证不会出问题(一般都不会有问题的 + 4. 修改图块属性、怪物属性等后会自动更新 + 5. 当全塔属性被修改时,会自动刷新塔的页面 + 6. 样板的 styles.css 被修改后也可以直接显示,不需要刷新 + 7. 其余内容修改后不会自动更新也不会刷新 + + /* ---------- 使用方式 ---------- * + + 1. 前往 https://nodejs.org/en/ 下载node.js的LTS版本(点左边那个绿色按钮)并安装 + 2. 将该插件复制到插件编写中 + 3. 在造塔群的群文件-魔塔样板·改中找到server.js,下载并放到塔的根目录(与启动服务同一级) + 4. 在该目录下按下shift+鼠标右键(win11只按右键即可),选择在终端打开或在powershell打开 + 5. 运行node server.js即可 + + */ + + if (main.mode !== 'play' || main.replayChecking) return; + + /** + * 发送请求 + * @param {string} url + * @param {string} type + * @param {string} data + * @returns {Promise} + */ + async function post(url, type, data) { + const xhr = new XMLHttpRequest(); + xhr.open(type, url); + xhr.send(data); + const res = await new Promise(res => { + xhr.onload = e => { + if (xhr.status !== 200) { + console.error(`hot reload: http ${xhr.status}`); + res('@error'); + } else res('success'); + }; + xhr.onerror = e => { + res('@error'); + console.error(`hot reload: error on connection`); + }; + }); + if (res === 'success') return xhr.response; + else return '@error'; + } + + /** + * 热重载css + * @param {string} data + */ + function reloadCss(data) { + const all = Array.from(document.getElementsByTagName('link')); + all.forEach(v => { + if (v.rel !== 'stylesheet') return; + if (v.href === `http://127.0.0.1:3000/${data}`) { + v.remove(); + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.href = data; + document.head.appendChild(link); + console.log(`css hot reload: ${data}`); + } + }); + } + + /** + * 热重载楼层 + * @param {string} data + */ + async function reloadFloor(data) { + // 首先重新加载main.floors对应的楼层 + await import(`/project/floors/${data}.js?v=${Date.now()}`); + // 然后写入core.floors并解析 + core.floors[data] = main.floors[data]; + const floor = core.loadFloor(data); + if (core.isPlaying()) { + core.status.maps[data] = floor; + delete core.status.mapBlockObjs[data]; + core.extractBlocks(data); + if (data === core.status.floorId) { + core.drawMap(data); + core.setWeather( + core.animateFrame.weather.type, + core.animateFrame.weather.level + ); + } + core.updateStatusBar(true, true); + } + console.log(`floor hot reload: ${data}`); + } + + /** + * 热重载脚本编辑及插件编写 + * @param {string} data + */ + async function reloadScript(data) { + if (data === 'plugins') { + // 插件编写比较好办 + const before = plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1; + // 这里不能用动态导入,因为动态导入会变成模块,变量就不是全局的了 + const script = document.createElement('script'); + script.src = `/project/plugins.js?v=${Date.now()}`; + document.body.appendChild(script); + await new Promise(res => { + script.onload = () => res('success'); + }); + const after = plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1; + // 找到差异的函数 + for (const id in before) { + const fn = before[id]; + if (typeof fn !== 'function') continue; + if (fn.toString() !== after[id]?.toString()) { + try { + core.plugin[id] = after[id]; + core.plugin[id].call(core.plugin); + core.updateStatusBar(true, true); + console.log(`plugin hot reload: ${id}`); + } catch (e) { + console.error(e); + } + } + } + } else if (data === 'functions') { + // 脚本编辑略微麻烦点 + const before = functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a; + // 这里不能用动态导入,因为动态导入会变成模块,变量就不是全局的了 + const script = document.createElement('script'); + script.src = `/project/functions.js?v=${Date.now()}`; + document.body.appendChild(script); + await new Promise(res => { + script.onload = () => res('success'); + }); + const after = functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a; + // 找到差异的函数 + for (const mod in before) { + const fns = before[mod]; + for (const id in fns) { + const fn = fns[id]; + if (typeof fn !== 'function' || id === 'hasSpecial') + continue; + const now = after[mod][id]; + if (fn.toString() !== now.toString()) { + try { + if (mod === 'events') { + core.events.eventdata[id] = now; + } else if (mod === 'enemys') { + core.enemys.enemydata[id] = now; + } else if (mod === 'actions') { + core.actions.actionsdata[id] = now; + } else if (mod === 'control') { + core.control.controldata[id] = now; + } else if (mod === 'ui') { + core.ui.uidata[id] = now; + } + core.updateStatusBar(true, true); + console.log( + `function hot reload: ${mod}.${id}` + ); + } catch (e) { + console.error(e); + } + } + } + } + } + } + + /** + * 属性热重载,包括全塔属性等 + * @param {string} data + */ + async function reloadData(data) { + const script = document.createElement('script'); + script.src = `/project/${data}.js?v=${Date.now()}`; + document.body.appendChild(script); + await new Promise(res => { + script.onload = () => res('success'); + }); + + let after; + if (data === 'data') + after = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d; + if (data === 'enemys') + after = enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80; + if (data === 'icons') + after = icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1; + if (data === 'items') + after = items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a; + if (data === 'maps') + after = maps_90f36752_8815_4be8_b32b_d7fad1d0542e; + if (data === 'events') + after = events_c12a15a8_c380_4b28_8144_256cba95f760; + + if (data === 'enemys') { + core.enemys.enemys = after; + for (var enemyId in after) { + core.enemys.enemys[enemyId].id = enemyId; + } + core.material.enemys = core.getEnemys(); + } else if (data === 'icons') { + core.icons.icons = after; + core.material.icons = core.getIcons(); + } else if (data === 'items') { + core.items.items = after; + for (var itemId in after) { + core.items.items[itemId].id = itemId; + } + core.material.items = core.getItems(); + } else if (data === 'maps') { + core.maps.blocksInfo = after; + core.status.mapBlockObjs = {}; + core.status.number2block = {}; + Object.values(core.status.maps).forEach(v => delete v.blocks); + core.extractBlocks(); + core.setWeather( + core.animateFrame.weather.type, + core.animateFrame.weather.level + ); + core.drawMap(); + } else if (data === 'events') { + core.events.commonEvent = after.commonEvent; + } else if (data === 'data') { + location.reload(); + } + core.updateStatusBar(true, true); + console.log(`data hot reload: ${data}`); + } + + // 初始化 + (async function () { + const data = await post('/reload', 'POST', 'test'); + if (data === '@error') { + console.log(`未检测到node服务,热重载插件将无法使用`); + } else { + console.log(`热重载插件加载成功`); + // reload + setInterval(async () => { + const res = await post('/reload', 'POST'); + if (res === '@error') return; + if (res === 'true') location.reload(); + else return; + }, 1000); + + // hot reload + setInterval(async () => { + const res = await post('/hotReload', 'POST'); + const data = res.split('@@'); + data.forEach(v => { + if (v === '') return; + const [type, file] = v.split(':'); + if (type === 'css') reloadCss(file); + if (type === 'data') reloadData(file); + if (type === 'floor') reloadFloor(file); + if (type === 'script') reloadScript(file); + }); + }, 1000); + } + })(); } } \ No newline at end of file diff --git a/server.js b/server.js new file mode 100644 index 0000000..e298e24 --- /dev/null +++ b/server.js @@ -0,0 +1,651 @@ +const http = require('http'); +const fs = require('fs/promises'); +const fss = require('fs'); +const path = require('path'); + +const name = (() => { + const data = fss.readFileSync('./project/data.js', 'utf-8'); + const json = JSON.parse( + data + .split(/(\n|\r\n)/) + .slice(1) + .join('\n') + ); + return json.firstData.name; +})(); + +/** 核心服务器 */ +const server = http.createServer(); + +/** 是否需要重新加载浏览器 */ +let needReload = true; + +/** 热重载信息 */ +let hotReloadData = ''; + +/** 是否已经启动了热重载模块 */ +let watched = false; + +/** 是否已经启动了录像调试模块 */ +let replayed = false; + +/** 监听端口 */ +let port = 3000; +const next = () => { + server.listen(port, '127.0.0.1'); + server.on('error', () => { + console.log(`${port}端口已被占用`); + port++; + next(); + }); +}; +next(); + +let repStart; + +const listenedFloors = []; + +// ----- GET file + +/** + * 请求文件 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + * @param {string} path + */ +async function getFile(req, res, path) { + try { + const data = await fs.readFile(path); + if (path.endsWith('.js')) + res.writeHead(200, { 'Content-type': 'text/javascript' }); + if (path.endsWith('.css')) + res.writeHead(200, { 'Content-type': 'text/css' }); + if (path.endsWith('.html')) + res.writeHead(200, { 'Content-type': 'text/html' }); + return res.end(data), true; + } catch { + return false; + } +} + +/** + * 高层塔优化及动画加载 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + * @param {string[]} ids + * @param {string} suffix 后缀名 + * @param {string} dir 文件夹路径 + * @param {string} join 分隔符 + */ +async function getAll(req, res, ids, suffix, dir, join) { + let data = {}; + const tasks = ids.map(v => { + return new Promise(res => { + const d = path.resolve(__dirname, `${dir}${v}${suffix}`); + try { + fs.readFile(d).then(vv => { + data[v] = vv; + res(`${v} pack success.`); + }); + } catch { + throw new ReferenceError(`The file ${d} does not exists.`); + } + }); + }); + await Promise.all(tasks); + const result = ids.map(v => data[v]); + return res.end(result.join(join)), true; +} + +// ----- 样板的fs功能 + +/** + * 获取POST的数据 + * @param {http.IncomingMessage} req + */ +async function getPostData(req) { + let data = ''; + await new Promise(res => { + req.on('data', chunk => { + data += chunk.toString(); + }); + req.on('end', res); + }); + return data; +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function readDir(req, res) { + const data = await getPostData(req); + const dir = path.resolve(__dirname, data.toString().slice(5)); + try { + const info = await fs.readdir(dir); + res.end(JSON.stringify(info)); + } catch (e) { + console.error(e); + res.end(`error: Read dir ${dir} fail. Does the dir exists?`); + } +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function mkdir(req, res) { + const data = await getPostData(req); + const dir = path.resolve(__dirname, data.toString().slice(5)); + try { + await fs.mkdir(dir); + } catch (e) {} + res.end(); +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function readFile(req, res) { + const data = (await getPostData(req)).toString(); + const dir = path.resolve(__dirname, data.split('&name=')[1]); + try { + const type = /^type=(utf8|base64)/.exec(data)[0]; + const info = await fs.readFile(dir, { encoding: type.slice(5) }); + res.end(info); + } catch (e) { + res.end(); + } +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function writeFile(req, res) { + const data = (await getPostData(req)).toString(); + const name = data.split('&name=')[1].split('&value=')[0]; + const dir = path.resolve(__dirname, name); + try { + const type = /^type=(utf8|base64)/.exec(data)[0].slice(5); + const value = /&value=[^]+/.exec(data)[0].slice(7); + await fs.writeFile(dir, value, { encoding: type }); + testWatchFloor(name); + } catch (e) { + console.error(e); + res.end( + `error: Write file ${dir} fail. Does the parent folder exists?` + ); + } + res.end(); +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function rm(req, res) { + const data = (await getPostData(req)).toString(); + const dir = path.resolve(__dirname, data.slice(5)); + try { + await fs.rm(dir); + } catch (e) { + console.error(e); + res.end(`error: Remove file ${dir} fail. Does this file exists?`); + } + res.end(); +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function moveFile(req, res) { + const data = (await getPostData(req)).toString(); + const info = data.split('&dest='); + const src = path.resolve(__dirname, info[0].slice(4)); + const dest = info[1]; + try { + const data = await fs.readFile(src); + await fs.writeFile(path.resolve(__dirname, dest), data); + await fs.rm(src); + } catch (e) { + console.error(e); + res.end(`error: Move file ${dir} fail.`); + } + res.end(); +} + +/** + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function writeMultiFiles(req, res) { + const data = (await getPostData(req)).toString(); + const names = /name=[^]+&value=/.exec(data)[0].slice(5, -7).split(';'); + const value = /&value=[^]+/.exec(data)[0].slice(7).split(';'); + + const tasks = names.map((v, i) => { + try { + return new Promise(res => { + fs.writeFile( + path.resolve(__dirname, v), + value[i], + 'base64' // 多文件是base64写入的 + ).then(v => { + testWatchFloor(v); + res(`write ${v} success.`); + }); + }); + } catch { + console.error(e); + res.end(`error: Write multi files fail.`); + } + }); + await Promise.all(tasks); + res.end(); +} + +// ----- extract path & utils + +/** + * 解析路径 + * @param {...string} dirs + * @returns {Promise} + */ +async function extract(...dirs) { + const res = []; + const tasks = dirs.map(v => { + return new Promise(resolve => { + if (v.endsWith('/')) { + // 匹配路径 + const dir = path.resolve(__dirname, v.slice(0, -1)); + fs.readdir(dir).then(files => { + const all = files + .filter(v => v !== 'thirdparty') // 排除第三方库 + .map(vv => v + vv); + + res.push(...all); + resolve('success'); + }); + } else if (/\/\*.\w+$/.test(v)) { + // 匹配文件夹中的后缀名 + const suffix = /\.\w+$/.exec(v)[0]; + const d = v.split(`/*${suffix}`)[0]; + const dir = path.resolve(__dirname, d); + fs.readdir(dir).then(files => { + const all = files + .filter(v => v.endsWith(suffix)) + .map(v => `${d === '' ? '' : d + '/'}${v}`); + + res.push(...all); + resolve('success'); + }); + } else { + res.push(v); + resolve('success'); + } + }); + }); + await Promise.all(tasks); + return res; +} + +// ----- hot reload + +/** + * 监听文件变化 + */ +async function watch() { + // 需要重新加载的文件 + const refresh = await extract('main.js', 'index.html', 'libs/'); + const option = { + interval: 1000 + }; + refresh.forEach(v => { + const dir = path.resolve(__dirname, v); + fss.watchFile(dir, option, () => { + needReload = true; + console.log(`change: ${v}`); + }); + }); + + // css 热重载 + const css = await extract('/*.css'); + css.forEach(v => { + const dir = path.resolve(__dirname, v); + fss.watchFile(dir, option, () => { + hotReloadData += `@@css:${v}`; + console.log(`css hot reload: ${v}`); + }); + }); + + // 楼层 热重载 + // 注意这里要逐个监听,并通过创建文件来监听文件改变 + const floors = await extract('project/floors/*.js'); + floors.forEach(v => { + watchOneFloor(v.slice(15)); + }); + + // 脚本编辑 及 插件 热重载 + const scripts = await extract('project/functions.js', 'project/plugins.js'); + scripts.forEach(v => { + const dir = path.resolve(__dirname, v); + const type = v.split('/').at(-1).slice(0, -3); + fss.watchFile(dir, option, () => { + hotReloadData += `@@script:${type}`; + console.log(`script hot reload: ${type}.js`); + }); + }); + + // 数据热重载 + const datas = (await extract('project/*.js')).filter( + v => !v.endsWith('functions.js') && !v.endsWith('plugins.js') + ); + datas.forEach(v => { + const dir = path.resolve(__dirname, v); + const type = v.split('/').at(-1).slice(0, -3); + fss.watchFile(dir, option, () => { + hotReloadData += `@@data:${type}`; + console.log(`data hot reload: ${type}`); + }); + }); +} + +/** + * 检测是否是楼层文件并进行监听 + * @param {string} url 要测试的路径 + */ +function testWatchFloor(url) { + if (/project(\/|\\)floors(\/|\\).*\.js/.test(url)) { + const f = url.slice(15); + if (!listenedFloors.includes(f.slice(0, -3))) { + watchOneFloor(f); + } + } +} + +/** + * 监听一个楼层文件 + * @param {string} file 要监听的文件 + */ +function watchOneFloor(file) { + if (!/.*\.js/.test(file)) return; + const f = file.slice(0, -3); + listenedFloors.push(file.slice(0, -3)); + fss.watchFile(`project/floors/${file}`, { interval: 1000 }, () => { + const floorId = f; + if (hotReloadData.includes(`@@floor:${floorId}`)) return; + hotReloadData += `@@floor:${floorId}`; + console.log(`floor hot reload: ${floorId}`); + }); +} + +/** + * 修改部分文件后重新加载及热重载 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +function reload(req, res, hot = false) { + req.on('data', chunk => { + if (chunk.toString() === 'test' && !watched) { + watch(); + watched = true; + console.log(`服务器热重载模块已开始服务`); + } + }); + + req.on('end', () => { + if (!hot) { + res.end(`${needReload}`); + needReload = false; + } else { + res.end(hotReloadData); + hotReloadData = ''; + } + }); +} + +// ----- replay debugger + +/** + * 录像调试 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +function replay(req, res) { + req.on('data', async chunk => { + if (chunk.toString() === 'test' && !replayed) { + replayed = true; + try { + await fs.mkdir(path.resolve(__dirname, '_replay')); + await fs.mkdir(path.resolve(__dirname, '_replay/status')); + await fs.mkdir(path.resolve(__dirname, '_replay/save')); + } catch {} + + try { + await fs.readFile( + path.resolve(__dirname, '_replay/.info'), + 'utf-8' + ); + } catch { + await fs.writeFile( + path.resolve(__dirname, '_replay/.info'), + `{ + "cnt": 0 +}`, + 'utf-8' + ); + } + const data = fss.readFileSync( + path.resolve(__dirname, '_replay/.info'), + 'utf-8' + ); + repStart = Number(JSON.parse(data).cnt); + console.log(`服务器录像调试模块已开始服务`); + } + }); + + req.on('end', () => { + res.end(); + }); +} + +/** + * 获取未占用的状态栏位 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function replayCnt() { + const data = `{ + "cnt": ${++repStart} +}`; + fss.writeFileSync(path.resolve(__dirname, '_replay/.info'), data, 'utf-8'); + + return repStart; +} + +/** + * 写入 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function replayWrite(req, res) { + const data = await getPostData(req); + const n = await replayCnt(); + + if (isNaN(n)) res.end('@error'); + + await Promise.all([ + fs.writeFile( + path.resolve(__dirname, '_replay/.info'), + `{ + "cnt": ${n + 1} +}`, + 'utf-8' + ), + fs.writeFile( + path.resolve(__dirname, `_replay/status/${n}.rep`), + data, + 'utf-8' + ) + ]); + + res.end(n.toString()); +} + +/** + * 比对录像与本地数据 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function replayCheck(req, res) { + const ans = await getPostData(req); + const [n, data] = ans.split('@-|-@'); + + const local = ( + await fs.readFile( + path.resolve(__dirname, `_replay/status/${n}.rep`), + 'utf-8' + ) + ) + .split('@---@') + .map(v => JSON.parse(v)); + const rep = data.split('@---@').map(v => JSON.parse(v)); + + if (local.length !== rep.length) return res.end('false'); + + const check = (a, b) => { + if (a === b) return true; + if (typeof a !== typeof b) return false; + if (typeof a === 'object' && a !== null) { + for (const j in a) { + if (j === 'statistics' || j === 'timeout') continue; // 忽略统计信息 + const aa = a[j]; + const bb = b[j]; + if (!check(aa, bb)) { + return false; + } + } + return true; + } + if ( + typeof a === 'boolean' || + typeof a === 'number' || + typeof a === 'string' || + typeof a === 'symbol' || + typeof a === 'undefined' || + typeof a === 'bigint' || + a === null + ) { + return a === b; + } + return true; + }; + + for (let i = 0; i < local.length; i++) { + const a = local[i]; + const b = rep[i]; + if (!check(a, b)) return res.end('false'); + } + + res.end('true'); +} + +/** + * 获取本地属性 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function replayGet(req, res, dir) { + const ans = Number(await getPostData(req)); + + const data = await fs.readFile( + path.resolve(__dirname, `_replay/${dir}/${ans}.rep`) + ); + res.end(data); +} + +/** + * 录像回放存档 + * @param {http.IncomingMessage} req + * @param {http.ServerResponse & {req: http.IncomingMessage;}} res + */ +async function replaySave(req, res) { + const data = await getPostData(req); + const [cnt, save] = data.split('@-|-@'); + + if (isNaN(Number(cnt))) { + console.log('Invalid input of save cnt'); + res.end('@error: 不合法的录像存档信息'); + } + + await fs.writeFile( + path.resolve(__dirname, `_replay/save/${cnt}.rep`), + save, + 'utf-8' + ); + + res.end('success'); +} + +// ----- server + +server.on('listening', () => { + console.log(`服务已启动,编辑器地址:http://127.0.0.1:${port}/editor.html`); + console.log(`游戏地址:http://127.0.0.1:${port}`); +}); + +// 处理请求 +server.on('request', async (req, res) => { + /** @type {string} */ + const p = req.url.replace(`/games/${name}`, '').replace('/all/', '/'); + + if (req.method === 'GET') { + const dir = path + .resolve(__dirname, p === '/' ? 'index.html' : p.slice(1)) + .split('?v=')[0]; + + if (await getFile(req, res, dir)) return; + + if (p.startsWith('/__all_floors__.js')) { + const all = p.split('&id=')[1].split(','); + res.writeHead(200, { 'Content-type': 'text/javascript' }); + return await getAll(req, res, all, '.js', 'project/floors/', '\n'); + } + + if (p.startsWith('/__all_animates__')) { + const all = p.split('&id=')[1].split(','); + return await getAll( + req, + res, + all, + '.animate', + 'project/animates/', + '@@@~~~###~~~@@@' + ); + } + } + + if (req.method === 'POST') { + if (p === '/listFile') return await readDir(req, res); + if (p === '/makeDir') return await mkdir(req, res); + if (p === '/readFile') return await readFile(req, res); + if (p === '/writeFile') return await writeFile(req, res); + if (p === '/deleteFile') return await rm(req, res); + if (p === '/moveFile') return await moveFile(req, res); + if (p === '/writeMultiFiles') return await writeMultiFiles(req, res); + if (p === '/reload') return reload(req, res); + if (p === '/hotReload') return reload(req, res, true); + if (p === '/replay') return replay(req, res); + if (p === '/replayWrite') return await replayWrite(req, res); + if (p === '/replayCheck') return await replayCheck(req, res); + if (p === '/replayGet') return await replayGet(req, res, 'status'); + if (p === '/replaySave') return await replaySave(req, res); + if (p === '/replayGetSave') return await replayGet(req, res, 'save'); + } + + res.statusCode = 404; + res.end(); +}); diff --git a/styles.css b/styles.css index 5958386..1d84860 100644 --- a/styles.css +++ b/styles.css @@ -499,4 +499,9 @@ p#name { @font-face { font-family: Fira Code; src: url(../src/fonts/FiraCode-Regular.ttf); +} + +/* 注释下面这三行以开启抗锯齿 */ +.anti-aliasing { + image-rendering: pixelated; } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index f297e8c..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "allowJs": true, - "noEmit": true, - }, - "include": [ - "main.js", "project/**/*.js", "libs/**/*.js", "runtime.d.ts" - ] -} \ No newline at end of file diff --git a/启动服务.exe b/启动服务.exe index 6fc2c67..349d1de 100644 Binary files a/启动服务.exe and b/启动服务.exe differ