1 !function(){function f(a,l){for(var d=0;d<l.length;d+=1)if(l[d]===a)return!0;return!1}function x(a,l){return(new I(a,l)).beautify()}function I(r,l){function w(c,b){var e=0;return c&&(e=c.indentation_level,!g.just_added_newline()&&c.line_indent_level>e&&(e=c.line_indent_level)),{mode:b,parent:c,last_text:c?c.last_text:"",last_word:c?c.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,
2 case_body:!1,indentation_level:e,line_indent_level:c?c.line_indent_level:e,start_line_index:g.get_line_number(),ternary_depth:0}}function p(b){var e=b.newlines;if(m.keep_array_indentation&&c.mode===a.ArrayLiteral)for(g=0;g<e;g+=1)q(0<g);else if(m.max_preserve_newlines&&e>m.max_preserve_newlines&&(e=m.max_preserve_newlines),m.preserve_newlines&&1<b.newlines){q();for(var g=1;g<e;g+=1)q(!0)}h=b;O[h.type]()}function B(c){(c=void 0!==c&&c,g.just_added_newline())||(m.preserve_newlines&&h.wanted_newline||
3 c?q(!1,!0):m.wrap_line_length&&g.current_line.get_character_count()+h.text.length+(g.space_before_token?1:0)>=m.wrap_line_length&&q(!1,!0))}function q(b,e){if(!e&&";"!==c.last_text&&","!==c.last_text&&"\x3d"!==c.last_text&&"TK_OPERATOR"!==k)for(;c.mode===a.Statement&&!c.if_block&&!c.do_block;)z();g.add_new_line(b)&&(c.multiline_frame=!0)}function K(){g.just_added_newline()&&(m.keep_array_indentation&&c.mode===a.ArrayLiteral&&h.wanted_newline?(g.current_line.push(h.whitespace_before),g.space_before_token=
4 !1):g.set_indent(c.indentation_level)&&(c.line_indent_level=c.indentation_level))}function t(c){if(g.raw)return void g.add_raw_token(h);m.comma_first&&"TK_COMMA"===k&&g.just_added_newline()&&","===g.previous_line.last()&&(g.previous_line.pop(),K(),g.add_token(","),g.space_before_token=!0);c=c||h.text;K();g.add_token(c)}function D(b){c?(N.push(c),e=c):e=w(null,b);c=w(e,b)}function E(c){return f(c,[a.Expression,a.ForInitializer,a.Conditional])}function z(){0<N.length&&(e=c,c=N.pop(),e.mode===a.Statement&&
5 g.remove_redundant_indentation(e))}function C(){return c.parent.mode===a.ObjectLiteral&&c.mode===a.Statement&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===k&&f(c.last_text,["get","set"]))}function b(){var b;if(b=!!("TK_RESERVED"===k&&f(c.last_text,["var","let","const"])&&"TK_WORD"===h.type||"TK_RESERVED"===k&&"do"===c.last_text||"TK_RESERVED"===k&&"return"===c.last_text&&!h.wanted_newline||"TK_RESERVED"===k&&"else"===c.last_text&&("TK_RESERVED"!==h.type||"if"!==h.text)||"TK_END_EXPR"===
6 k&&(e.mode===a.ForInitializer||e.mode===a.Conditional)||"TK_WORD"===k&&c.mode===a.BlockStatement&&!c.in_case&&"--"!==h.text&&"++"!==h.text&&"function"!==G&&"TK_WORD"!==h.type&&"TK_RESERVED"!==h.type||c.mode===a.ObjectLiteral&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===k&&f(c.last_text,["get","set"]))))D(a.Statement),c.indentation_level+=1,b=("TK_RESERVED"===k&&f(c.last_text,["var","let","const"])&&"TK_WORD"===h.type&&(c.declaration_statement=!0),C()||B("TK_RESERVED"===h.type&&f(h.text,
7 ["do","for","if","while"])),!0);return b}function u(c){return f(c,"case return do if throw else".split(" "))}function y(c){c=L+(c||0);return 0>c||c>=x.length?null:x[c]}function F(){("TK_RESERVED"===h.type&&c.mode!==a.ObjectLiteral&&f(h.text,["set","get"])&&(h.type="TK_WORD"),"TK_RESERVED"===h.type&&c.mode===a.ObjectLiteral)&&":"==y(1).text&&(h.type="TK_WORD");if(b()||!h.wanted_newline||E(c.mode)||"TK_OPERATOR"===k&&"--"!==c.last_text&&"++"!==c.last_text||"TK_EQUALS"===k||!m.preserve_newlines&&"TK_RESERVED"===
8 k&&f(c.last_text,["var","let","const","set","get"])||q(),c.do_block&&!c.do_while){if("TK_RESERVED"===h.type&&"while"===h.text)return g.space_before_token=!0,t(),g.space_before_token=!0,void(c.do_while=!0);q();c.do_block=!1}if(c.if_block)if(c.else_block||"TK_RESERVED"!==h.type||"else"!==h.text){for(;c.mode===a.Statement;)z();c.if_block=!1;c.else_block=!1}else c.else_block=!0;if("TK_RESERVED"===h.type&&("case"===h.text||"default"===h.text&&c.in_case_statement)){q();if(c.case_body||m.jslint_happy)0<
9 c.indentation_level&&(!c.parent||c.indentation_level>c.parent.indentation_level)&&--c.indentation_level,c.case_body=!1;return t(),c.in_case=!0,void(c.in_case_statement=!0)}if("TK_RESERVED"===h.type&&"function"===h.text&&((f(c.last_text,["}",";"])||g.just_added_newline()&&!f(c.last_text,["[","{",":","\x3d",","]))&&(g.just_added_blankline()||h.comments_before.length||(q(),q(!0))),"TK_RESERVED"===k||"TK_WORD"===k?"TK_RESERVED"===k&&f(c.last_text,"get set new return export async".split(" "))?g.space_before_token=
10 !0:"TK_RESERVED"===k&&"default"===c.last_text&&"export"===G?g.space_before_token=!0:q():"TK_OPERATOR"===k||"\x3d"===c.last_text?g.space_before_token=!0:(c.multiline_frame||!E(c.mode)&&c.mode!==a.ArrayLiteral)&&q()),"TK_COMMA"!==k&&"TK_START_EXPR"!==k&&"TK_EQUALS"!==k&&"TK_OPERATOR"!==k||C()||B(),"TK_RESERVED"===h.type&&f(h.text,["function","get","set"]))return t(),void(c.last_word=h.text);(v="NONE","TK_END_BLOCK"===k?"TK_RESERVED"===h.type&&f(h.text,["else","catch","finally"])?"expand"===m.brace_style||
11 "end-expand"===m.brace_style||"none"===m.brace_style&&h.wanted_newline?v="NEWLINE":(v="SPACE",g.space_before_token=!0):v="NEWLINE":"TK_SEMICOLON"===k&&c.mode===a.BlockStatement?v="NEWLINE":"TK_SEMICOLON"===k&&E(c.mode)?v="SPACE":"TK_STRING"===k?v="NEWLINE":"TK_RESERVED"===k||"TK_WORD"===k||"*"===c.last_text&&"function"===G?v="SPACE":"TK_START_BLOCK"===k?v="NEWLINE":"TK_END_EXPR"===k&&(g.space_before_token=!0,v="NEWLINE"),"TK_RESERVED"===h.type&&f(h.text,H.line_starters)&&")"!==c.last_text&&(v="else"===
12 c.last_text||"export"===c.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===h.type&&f(h.text,["else","catch","finally"]))?"TK_END_BLOCK"!==k||"expand"===m.brace_style||"end-expand"===m.brace_style||"none"===m.brace_style&&h.wanted_newline?q():(g.trim(!0),"}"!==g.current_line.last()&&q(),g.space_before_token=!0):"NEWLINE"===v?"TK_RESERVED"===k&&u(c.last_text)?g.space_before_token=!0:"TK_END_EXPR"!==k?"TK_START_EXPR"===k&&"TK_RESERVED"===h.type&&f(h.text,["var","let","const"])||":"===c.last_text||("TK_RESERVED"===
13 h.type&&"if"===h.text&&"else"===c.last_text?g.space_before_token=!0:q()):"TK_RESERVED"===h.type&&f(h.text,H.line_starters)&&")"!==c.last_text&&q():c.multiline_frame&&c.mode===a.ArrayLiteral&&","===c.last_text&&"}"===G?q():"SPACE"===v&&(g.space_before_token=!0);t();c.last_word=h.text;"TK_RESERVED"===h.type&&"do"===h.text&&(c.do_block=!0);"TK_RESERVED"===h.type&&"if"===h.text&&(c.if_block=!0)}var g,L,H,h,k,G,n,c,e,N,v,O,m,x=[],J="";O={TK_START_EXPR:function(){b();var e=a.Expression;if("["===h.text){if("TK_WORD"===
14 k||")"===c.last_text)return"TK_RESERVED"===k&&f(c.last_text,H.line_starters)&&(g.space_before_token=!0),D(e),t(),c.indentation_level+=1,void(m.space_in_paren&&(g.space_before_token=!0));e=a.ArrayLiteral;c.mode===a.ArrayLiteral&&("["!==c.last_text&&(","!==c.last_text||"]"!==G&&"}"!==G)||m.keep_array_indentation||q())}else"TK_RESERVED"===k&&"for"===c.last_text?e=a.ForInitializer:"TK_RESERVED"===k&&f(c.last_text,["if","while"])&&(e=a.Conditional);";"===c.last_text||"TK_START_BLOCK"===k?q():"TK_END_EXPR"===
15 k||"TK_START_EXPR"===k||"TK_END_BLOCK"===k||"."===c.last_text?B(h.wanted_newline):"TK_RESERVED"===k&&"("===h.text||"TK_WORD"===k||"TK_OPERATOR"===k?"TK_RESERVED"===k&&("function"===c.last_word||"typeof"===c.last_word)||"*"===c.last_text&&"function"===G?m.space_after_anon_function&&(g.space_before_token=!0):"TK_RESERVED"!==k||!f(c.last_text,H.line_starters)&&"catch"!==c.last_text||m.space_before_conditional&&(g.space_before_token=!0):g.space_before_token=!0;"("===h.text&&"TK_RESERVED"===k&&"await"===
16 c.last_word&&(g.space_before_token=!0);"("===h.text&&("TK_EQUALS"!==k&&"TK_OPERATOR"!==k||C()||B());D(e);t();m.space_in_paren&&(g.space_before_token=!0);c.indentation_level+=1},TK_END_EXPR:function(){for(;c.mode===a.Statement;)z();c.multiline_frame&&B("]"===h.text&&c.mode===a.ArrayLiteral&&!m.keep_array_indentation);m.space_in_paren&&("TK_START_EXPR"!==k||m.space_in_empty_paren?g.space_before_token=!0:(g.trim(),g.space_before_token=!1));"]"===h.text&&m.keep_array_indentation?(t(),z()):(z(),t());g.remove_redundant_indentation(e);
17 c.do_while&&e.mode===a.Conditional&&(e.mode=a.Expression,c.do_block=!1,c.do_while=!1)},TK_START_BLOCK:function(){var b=y(1),r=y(2);D(r&&(":"===r.text&&f(b.type,["TK_STRING","TK_WORD","TK_RESERVED"])||f(b.text,["get","set"])&&f(r.type,["TK_WORD","TK_RESERVED"]))?f(G,["class","interface"])?a.BlockStatement:a.ObjectLiteral:a.BlockStatement);b=!b.comments_before.length&&"}"===b.text&&"function"===c.last_word&&"TK_END_EXPR"===k;"expand"===m.brace_style||"none"===m.brace_style&&h.wanted_newline?"TK_OPERATOR"!==
18 k&&(b||"TK_EQUALS"===k||"TK_RESERVED"===k&&u(c.last_text)&&"else"!==c.last_text)?g.space_before_token=!0:q(!1,!0):"TK_OPERATOR"!==k&&"TK_START_EXPR"!==k?"TK_START_BLOCK"===k?q():g.space_before_token=!0:e.mode===a.ArrayLiteral&&","===c.last_text&&("}"===G?g.space_before_token=!0:q());t();c.indentation_level+=1},TK_END_BLOCK:function(){for(;c.mode===a.Statement;)z();var b="TK_START_BLOCK"===k;"expand"===m.brace_style?b||q():b||(c.mode===a.ArrayLiteral&&m.keep_array_indentation?(m.keep_array_indentation=
19 !1,q(),m.keep_array_indentation=!0):q());z();t()},TK_WORD:F,TK_RESERVED:F,TK_SEMICOLON:function(){for(b()&&(g.space_before_token=!1);c.mode===a.Statement&&!c.if_block&&!c.do_block;)z();t()},TK_STRING:function(){b()?g.space_before_token=!0:"TK_RESERVED"===k||"TK_WORD"===k?g.space_before_token=!0:"TK_COMMA"===k||"TK_START_EXPR"===k||"TK_EQUALS"===k||"TK_OPERATOR"===k?C()||B():q();t()},TK_EQUALS:function(){b();c.declaration_statement&&(c.declaration_assignment=!0);g.space_before_token=!0;t();g.space_before_token=
20 !0},TK_OPERATOR:function(){if(b(),"TK_RESERVED"===k&&u(c.last_text))return g.space_before_token=!0,void t();if("*"===h.text&&"TK_DOT"===k)return void t();if(":"===h.text&&c.in_case)return c.case_body=!0,c.indentation_level+=1,t(),q(),void(c.in_case=!1);if("::"===h.text)return void t();"TK_OPERATOR"===k&&B();var e=!0,y=!0;f(h.text,["--","++","!","~"])||f(h.text,["-","+"])&&(f(k,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||f(c.last_text,H.line_starters)||","===c.last_text)?(e=!1,y=
21 !1,!h.wanted_newline||"--"!==h.text&&"++"!==h.text||q(!1,!0),";"===c.last_text&&E(c.mode)&&(e=!0),"TK_RESERVED"===k?e=!0:"TK_END_EXPR"===k?e=!("]"===c.last_text&&("--"===h.text||"++"===h.text)):"TK_OPERATOR"===k&&(e=f(h.text,["--","-","++","+"])&&f(c.last_text,["--","-","++","+"]),f(h.text,["+","-"])&&f(c.last_text,["--","++"])&&(y=!0)),c.mode!==a.BlockStatement&&c.mode!==a.Statement||"{"!==c.last_text&&";"!==c.last_text||q()):":"===h.text?0===c.ternary_depth?e=!1:--c.ternary_depth:"?"===h.text?c.ternary_depth+=
22 1:"*"===h.text&&"TK_RESERVED"===k&&"function"===c.last_text&&(e=!1,y=!1);g.space_before_token=g.space_before_token||e;t();g.space_before_token=y},TK_COMMA:function(){if(c.declaration_statement)return E(c.parent.mode)&&(c.declaration_assignment=!1),t(),void(c.declaration_assignment?(c.declaration_assignment=!1,q(!1,!0)):(g.space_before_token=!0,m.comma_first&&B()));t();c.mode===a.ObjectLiteral||c.mode===a.Statement&&c.parent.mode===a.ObjectLiteral?(c.mode===a.Statement&&z(),q()):(g.space_before_token=
23 !0,m.comma_first&&B())},TK_BLOCK_COMMENT:function(){if(g.raw)return g.add_raw_token(h),void(h.directives&&"end"===h.directives.preserve&&(m.test_output_raw||(g.raw=!1)));if(h.directives)return q(!1,!0),t(),"start"===h.directives.preserve&&(g.raw=!0),void q(!1,!0);if(!A.newline.test(h.text)&&!h.wanted_newline)return g.space_before_token=!0,t(),void(g.space_before_token=!0);var c,b;b=h.text;b=b.replace(/\x0d/g,"");for(var e=[],a=b.indexOf("\n");-1!==a;)e.push(b.substring(0,a)),b=b.substring(a+1),a=
24 b.indexOf("\n");b=(b.length&&e.push(b),e);var a=e=!1,y=h.whitespace_before,r=y.length;q(!1,!0);if(1<b.length){var k;a:{k=b.slice(1);for(var F=0;F<k.length;F++)if("*"!==k[F].replace(/^\s+|\s+$/g,"").charAt(0)){k=!1;break a}k=!0}if(k)e=!0;else{a:{k=b.slice(1);for(var F=0,l=k.length;F<l;F++)if((c=k[F])&&0!==c.indexOf(y)){c=!1;break a}c=!0}c&&(a=!0)}}t(b[0]);for(c=1;c<b.length;c++)q(!1,!0),e?t(" "+b[c].replace(/^\s+/g,"")):a&&b[c].length>r?t(b[c].substring(r)):g.add_token(b[c]);q(!1,!0)},TK_COMMENT:function(){h.wanted_newline?
25 q(!1,!0):g.trim(!0);g.space_before_token=!0;t();q(!1,!0)},TK_DOT:function(){b();"TK_RESERVED"===k&&u(c.last_text)?g.space_before_token=!0:B(")"===c.last_text&&m.break_chained_methods);t()},TK_UNKNOWN:function(){t();"\n"===h.text[h.text.length-1]&&q()},TK_EOF:function(){for(;c.mode===a.Statement;)z()}};l=l||{};m={};void 0!==l.braces_on_own_line&&(m.brace_style=l.braces_on_own_line?"expand":"collapse");m.brace_style=l.brace_style?l.brace_style:m.brace_style?m.brace_style:"collapse";"expand-strict"===
26 m.brace_style&&(m.brace_style="expand");m.indent_size=l.indent_size?parseInt(l.indent_size,10):4;m.indent_char=l.indent_char?l.indent_char:" ";m.eol=l.eol?l.eol:"\n";m.preserve_newlines=void 0===l.preserve_newlines||l.preserve_newlines;m.break_chained_methods=void 0!==l.break_chained_methods&&l.break_chained_methods;m.max_preserve_newlines=void 0===l.max_preserve_newlines?0:parseInt(l.max_preserve_newlines,10);m.space_in_paren=void 0!==l.space_in_paren&&l.space_in_paren;m.space_in_empty_paren=void 0!==
27 l.space_in_empty_paren&&l.space_in_empty_paren;m.jslint_happy=void 0!==l.jslint_happy&&l.jslint_happy;m.space_after_anon_function=void 0!==l.space_after_anon_function&&l.space_after_anon_function;m.keep_array_indentation=void 0!==l.keep_array_indentation&&l.keep_array_indentation;m.space_before_conditional=void 0===l.space_before_conditional||l.space_before_conditional;m.unescape_strings=void 0!==l.unescape_strings&&l.unescape_strings;m.wrap_line_length=void 0===l.wrap_line_length?0:parseInt(l.wrap_line_length,
28 10);m.e4x=void 0!==l.e4x&&l.e4x;m.end_with_newline=void 0!==l.end_with_newline&&l.end_with_newline;m.comma_first=void 0!==l.comma_first&&l.comma_first;m.test_output_raw=void 0!==l.test_output_raw&&l.test_output_raw;m.jslint_happy&&(m.space_after_anon_function=!0);l.indent_with_tabs&&(m.indent_char="\t",m.indent_size=1);m.eol=m.eol.replace(/\\r/,"\r").replace(/\\n/,"\n");for(n="";0<m.indent_size;)n+=m.indent_char,--m.indent_size;var M=0;if(r&&r.length){for(;" "===r.charAt(M)||"\t"===r.charAt(M);)J+=
29 r.charAt(M),M+=1;r=r.substring(M)}k="TK_START_BLOCK";G="";g=new d(n,J);g.raw=m.test_output_raw;N=[];D(a.BlockStatement);this.beautify=function(){var b,e;H=new P(r,m,n);x=H.tokenize();for(L=0;b=y();){for(var a=0;a<b.comments_before.length;a++)p(b.comments_before[a]);p(b);G=c.last_text;k=b.type;c.last_text=b.text;L+=1}return e=g.get_code(),m.end_with_newline&&(e+="\n"),"\n"!=m.eol&&(e=e.replace(/[\n]/g,m.eol)),e}}function K(a){var l=0,d=-1,p=[],f=!0;this.set_indent=function(p){l=a.baseIndentLength+
30 p*a.indent_length;d=p};this.get_character_count=function(){return l};this.is_empty=function(){return f};this.last=function(){return this._empty?null:p[p.length-1]};this.push=function(a){p.push(a);l+=a.length;f=!1};this.pop=function(){var a=null;return f||(a=p.pop(),l-=a.length,f=0===p.length),a};this.remove_indent=function(){0<d&&(--d,l-=a.indent_length)};this.trim=function(){for(;" "===this.last();)p.pop(),--l;f=0===p.length};this.toString=function(){var l="";return this._empty||(0<=d&&(l=a.indent_cache[d]),
31 l+=p.join("")),l}}function d(r,l){l=l||"";this.indent_cache=[l];this.baseIndentLength=l.length;this.indent_length=r.length;this.raw=!1;var d=[];this.baseIndentString=l;this.indent_string=r;this.current_line=this.previous_line=null;this.space_before_token=!1;this.add_outputline=function(){this.previous_line=this.current_line;this.current_line=new K(this);d.push(this.current_line)};this.add_outputline();this.get_line_number=function(){return d.length};this.add_new_line=function(a){return(1!==this.get_line_number()||
32 !this.just_added_newline())&&!(!a&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0)};this.get_code=function(){return d.join("\n").replace(/[\r\n\t ]+$/,"")};this.set_indent=function(a){if(1<d.length){for(;a>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(a),!0}return this.current_line.set_indent(0),!1};this.add_raw_token=function(a){for(var r=0;r<a.newlines;r++)this.add_outputline();
33 this.current_line.push(a.whitespace_before);this.current_line.push(a.text);this.space_before_token=!1};this.add_token=function(a){this.add_space_before_token();this.current_line.push(a)};this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" ");this.space_before_token=!1};this.remove_redundant_indentation=function(r){if(!r.multiline_frame&&r.mode!==a.ForInitializer&&r.mode!==a.Conditional){r=r.start_line_index;for(var l=d.length;r<l;)d[r].remove_indent(),
34 r++}};this.trim=function(a){a=void 0!==a&&a;for(this.current_line.trim(r,l);a&&1<d.length&&this.current_line.is_empty();)d.pop(),this.current_line=d[d.length-1],this.current_line.trim();this.previous_line=1<d.length?d[d.length-2]:null};this.just_added_newline=function(){return this.current_line.is_empty()};this.just_added_blankline=function(){return this.just_added_newline()?1===d.length?!0:d[d.length-2].is_empty():!1}}function P(a,l,d){function p(){var d,n=[];if(D=0,E="",b>=u)return["","TK_EOF"];
35 var c;c=C.length?C[C.length-1]:new J("TK_START_BLOCK","{");var e=a.charAt(b);for(b+=1;f(e,K);){if(A.newline.test(e)?"\n"===e&&"\r"===a.charAt(b-2)||(D+=1,n=[]):n.push(e),b>=u)return["","TK_EOF"];e=a.charAt(b);b+=1}if(n.length&&(E=n.join("")),q.test(e)){c=n=!0;var p=q;for("0"===e&&b<u&&/[Xx]/.test(a.charAt(b))?(n=!1,c=!1,e+=a.charAt(b),b+=1,p=x):(e="",--b);b<u&&p.test(a.charAt(b));)e+=a.charAt(b),b+=1,n&&b<u&&"."===a.charAt(b)&&(e+=a.charAt(b),b+=1,n=!1),c&&b<u&&/[Ee]/.test(a.charAt(b))&&(e+=a.charAt(b),
36 b+=1,b<u&&/[+-]/.test(a.charAt(b))&&(e+=a.charAt(b),b+=1),c=!1,n=!1);return[e,"TK_WORD"]}if(A.isIdentifierStart(a.charCodeAt(b-1))){if(b<u)for(;A.isIdentifierChar(a.charCodeAt(b))&&(e+=a.charAt(b),(b+=1)!==u););return"TK_DOT"===c.type||"TK_RESERVED"===c.type&&f(c.text,["set","get"])||!f(e,y)?[e,"TK_WORD"]:"in"===e?[e,"TK_OPERATOR"]:[e,"TK_RESERVED"]}if("("===e||"["===e)return[e,"TK_START_EXPR"];if(")"===e||"]"===e)return[e,"TK_END_EXPR"];if("{"===e)return[e,"TK_START_BLOCK"];if("}"===e)return[e,"TK_END_BLOCK"];
37 if(";"===e)return[e,"TK_SEMICOLON"];if("/"===e){n="";if("*"===a.charAt(b)){b+=1;F.lastIndex=b;e=F.exec(a);n="/*"+e[0];b+=e[0].length;c=n;if(c.match(L)){p={};H.lastIndex=0;for(d=H.exec(c);d;)p[d[1]]=d[2],d=H.exec(c);c=p}else c=null;return c&&"start"===c.ignore&&(h.lastIndex=b,e=h.exec(a),n+=e[0],b+=e[0].length),n=n.replace(A.lineBreak,"\n"),[n,"TK_BLOCK_COMMENT",c]}if("/"===a.charAt(b))return b+=1,g.lastIndex=b,e=g.exec(a),n="//"+e[0],b+=e[0].length,[n,"TK_COMMENT"]}if("`"===e||"'"===e||'"'===e||("/"===
38 e||l.e4x&&"\x3c"===e&&a.slice(b-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===c.type&&f(c.text,"return case throw else do typeof yield".split(" "))||"TK_END_EXPR"===c.type&&")"===c.text&&c.parent&&"TK_RESERVED"===c.parent.type&&f(c.parent.text,["if","while","for"])||f(c.type,"TK_COMMENT TK_START_EXPR TK_START_BLOCK TK_END_BLOCK TK_OPERATOR TK_EQUALS TK_EOF TK_SEMICOLON TK_COMMA".split(" ")))){var n=
39 e,v=c=!1;if(d=e,"/"===n)for(e=!1;b<u&&(c||e||a.charAt(b)!==n)&&!A.newline.test(a.charAt(b));)d+=a.charAt(b),c?c=!1:(c="\\"===a.charAt(b),"["===a.charAt(b)?e=!0:"]"===a.charAt(b)&&(e=!1)),b+=1;else if(l.e4x&&"\x3c"===n){if(c=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,e=a.slice(b-1),(p=c.exec(e))&&0===p.index){n=p[2];for(d=0;p;){var v=!!p[1],w=p[2],m=!!p[p.length-1]||"![CDATA["===w.slice(0,8);if(w!==n||m||(v?--d:++d),0>=
40 d)break;p=c.exec(e)}n=p?p.index+p[0].length:e.length;return e=e.slice(0,n),b+=n-1,e=e.replace(A.lineBreak,"\n"),[e,"TK_STRING"]}}else for(;b<u&&(c||a.charAt(b)!==n&&("`"===n||!A.newline.test(a.charAt(b))));)(c||"`"===n)&&A.newline.test(a.charAt(b))?("\r"===a.charAt(b)&&"\n"===a.charAt(b+1)&&(b+=1),d+="\n"):d+=a.charAt(b),c?("x"!==a.charAt(b)&&"u"!==a.charAt(b)||(v=!0),c=!1):c="\\"===a.charAt(b),b+=1;if(v&&l.unescape_strings){a:{e=d;p=!1;d="";v=0;w="";for(m=0;p||v<e.length;)if(c=e.charAt(v),v++,p){if(p=
41 !1,"x"===c)w=e.substr(v,2),v+=2;else{if("u"!==c){d+="\\"+c;continue}w=e.substr(v,4);v+=4}if(!w.match(/^[0123456789abcdefABCDEF]+$/))break a;if(0<=(m=parseInt(w,16))&&32>m)d+="x"===c?"\\x"+w:"\\u"+w;else if(34===m||39===m||92===m)d+="\\"+String.fromCharCode(m);else{if("x"===c&&126<m&&255>=m)break a;d+=String.fromCharCode(m)}}else"\\"===c?p=!0:d+=c;e=d}d=e}if(b<u&&a.charAt(b)===n&&(d+=n,b+=1,"/"===n))for(;b<u&&A.isIdentifierStart(a.charCodeAt(b));)d+=a.charAt(b),b+=1;return[d,"TK_STRING"]}if("#"===
42 e){if(0===C.length&&"!"===a.charAt(b)){for(d=e;b<u&&"\n"!==e;)e=a.charAt(b),d+=e,b+=1;return[d.replace(/^\s+|\s+$/g,"")+"\n","TK_UNKNOWN"]}n="#";if(b<u&&q.test(a.charAt(b))){do e=a.charAt(b),n+=e,b+=1;while(b<u&&"#"!==e&&"\x3d"!==e);return"#"===e||("["===a.charAt(b)&&"]"===a.charAt(b+1)?(n+="[]",b+=2):"{"===a.charAt(b)&&"}"===a.charAt(b+1)&&(n+="{}",b+=2)),[n,"TK_WORD"]}}if("\x3c"===e&&("?"===a.charAt(b)||"%"===a.charAt(b))&&(k.lastIndex=b-1,n=k.exec(a)))return e=n[0],b+=e.length-1,e=e.replace(A.lineBreak,
43 "\n"),[e,"TK_STRING"];if("\x3c"===e&&"\x3c!--"===a.substring(b-1,b+3)){b+=3;for(e="\x3c!--";!A.newline.test(a.charAt(b))&&b<u;)e+=a.charAt(b),b++;return z=!0,[e,"TK_COMMENT"]}if("-"===e&&z&&"--\x3e"===a.substring(b-1,b+2))return z=!1,b+=2,["--\x3e","TK_COMMENT"];if("."===e)return[e,"TK_DOT"];if(f(e,t)){for(;b<u&&f(e+a.charAt(b),t)&&(e+=a.charAt(b),!((b+=1)>=u)););return","===e?[e,"TK_COMMA"]:"\x3d"===e?[e,"TK_EQUALS"]:[e,"TK_OPERATOR"]}return[e,"TK_UNKNOWN"]}var K=["\n","\r","\t"," "],q=/[0-9]/,x=
44 /[0123456789abcdefABCDEF]/,t="+ - * / % \x26 ++ -- \x3d +\x3d -\x3d *\x3d /\x3d %\x3d \x3d\x3d \x3d\x3d\x3d !\x3d !\x3d\x3d \x3e \x3c \x3e\x3d \x3c\x3d \x3e\x3e \x3c\x3c \x3e\x3e\x3e \x3e\x3e\x3e\x3d \x3e\x3e\x3d \x3c\x3c\x3d \x26\x26 \x26\x3d | || ! ~ , : ? ^ ^\x3d |\x3d :: \x3d\x3e \x3c%\x3d \x3c% %\x3e \x3c?\x3d \x3c? ?\x3e".split(" ");this.line_starters="continue try throw return var let const if switch case default for while break function import export".split(" ");var D,E,z,C,b,u,y=this.line_starters.concat("do in else get set new catch finally typeof yield async await".split(" ")),
45 F=/([\s\S]*?)((?:\*\/)|$)/g,g=/([^\n\r\u2028\u2029]*)/g,L=/\/\* beautify( \w+[:]\w+)+ \*\//g,H=/ (\w+)[:](\w+)/g,h=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,k=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;this.tokenize=function(){u=a.length;b=0;z=!1;C=[];for(var g,d,c,e=null,h=[],y=[];!d||"TK_EOF"!==d.type;){c=p();for(g=new J(c[1],c[0],D,E);"TK_COMMENT"===g.type||"TK_BLOCK_COMMENT"===g.type||"TK_UNKNOWN"===g.type;)"TK_BLOCK_COMMENT"===g.type&&(g.directives=c[2]),y.push(g),c=p(),g=new J(c[1],
46 c[0],D,E);y.length&&(g.comments_before=y,y=[]);"TK_START_BLOCK"===g.type||"TK_START_EXPR"===g.type?(g.parent=d,h.push(e),e=g):("TK_END_BLOCK"===g.type||"TK_END_EXPR"===g.type)&&e&&("]"===g.text&&"["===e.text||")"===g.text&&"("===e.text||"}"===g.text&&"{"===e.text)&&(g.parent=e.parent,e=h.pop());C.push(g);d=g}return C}}var A={};!function(a){var d=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),
47 f=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]");
48 a.newline=/[\n\r\u2028\u2029]/;a.lineBreak=/\r\n|[\n\r\u2028\u2029]/g;a.isIdentifierStart=function(a){return 65>a?36===a:91>a||(97>a?95===a:123>a||170<=a&&d.test(String.fromCharCode(a)))};a.isIdentifierChar=function(a){return 48>a?36===a:58>a||!(65>a)&&(91>a||(97>a?95===a:123>a||170<=a&&f.test(String.fromCharCode(a))))}}(A);var a={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",
49 Expression:"Expression"},J=function(a,d,f,p,K,q){this.type=a;this.text=d;this.comments_before=[];this.newlines=f||0;this.wanted_newline=0<f;this.whitespace_before=p||"";this.directives=this.parent=null};"function"==typeof define&&define.amd?define("beautify.js",[],function(){return{js_beautify:x}}):"undefined"!=typeof exports?exports.js_beautify=x:"undefined"!=typeof window?window.js_beautify=x:"undefined"!=typeof global&&(global.js_beautify=x)}();
50 (function(){function f(f,d,x,A){var a,J,r,l,w,p,B,q,I,t,D,E,z,C,b;d=d||{};void 0!==d.wrap_line_length&&0!==parseInt(d.wrap_line_length,10)||void 0===d.max_char||0===parseInt(d.max_char,10)||(d.wrap_line_length=d.max_char);J=void 0!==d.indent_inner_html&&d.indent_inner_html;r=void 0===d.indent_size?4:parseInt(d.indent_size,10);l=void 0===d.indent_char?" ":d.indent_char;p=void 0===d.brace_style?"collapse":d.brace_style;w=0===parseInt(d.wrap_line_length,10)?32786:parseInt(d.wrap_line_length||250,10);
51 B=d.unformatted||"a span img bdo em strong dfn code samp kbd var cite abbr acronym q sub sup tt i b big small u s strike font ins del pre address dt h1 h2 h3 h4 h5 h6".split(" ");I=(q=void 0===d.preserve_newlines||d.preserve_newlines)?isNaN(parseInt(d.max_preserve_newlines,10))?32786:parseInt(d.max_preserve_newlines,10):0;t=void 0!==d.indent_handlebars&&d.indent_handlebars;D=void 0===d.wrap_attributes?"auto":d.wrap_attributes;E=void 0===d.wrap_attributes_indent_size?r:parseInt(d.wrap_attributes_indent_size,
52 10)||r;z=void 0!==d.end_with_newline&&d.end_with_newline;C="object"==typeof d.extra_liners&&d.extra_liners?d.extra_liners.concat():"string"==typeof d.extra_liners?d.extra_liners.split(","):["head","body","/html"];b=d.eol?d.eol:"\n";d.indent_with_tabs&&(l="\t",r=1);b=b.replace(/\\r/,"\r").replace(/\\n/,"\n");a=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=
53 this.token_type="",this.newlines=0,this.indent_content=J,this.Utils={whitespace:["\n","\r","\t"," "],single_token:"br input link meta source !doctype basefont base area hr wbr param img isindex embed".split(" "),extra_liners:C,in_array:function(a,b){for(var g=0;g<b.length;g++)if(a===b[g])return!0;return!1}},this.is_whitespace=function(a){for(;0<a.length;a++)if(!this.Utils.in_array(a.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var a="";if(a=this.input.charAt(this.pos),
54 this.Utils.in_array(a,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(a,this.Utils.whitespace);)q&&"\n"===a&&this.newlines<=I&&(this.newlines+=1),this.pos++,a=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(a){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,a),this.print_indentation(a)):(this.line_char_count++,a.push(" "))},this.get_content=function(){for(var a="",b=[];"\x3c"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return b.length?
55 b.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(b);else{if(t){a=this.input.substr(this.pos,3);if("{{#"===a||"{{/"===a)break;if("{{!"===a)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}a=this.input.charAt(this.pos);this.pos++;this.line_char_count++;b.push(a)}}return b.length?b.join(""):""},this.get_contents_to=function(a){if(this.pos===this.input.length)return["","TK_EOF"];var b="";a=new RegExp("\x3c/"+
56 a+"\\s*\x3e","igm");a.lastIndex=this.pos;a=(a=a.exec(this.input))?a.index:this.input.length;return this.pos<a&&(b=this.input.substring(this.pos,a),this.pos=a),b},this.record_tag=function(a){this.tags[a+"count"]?(this.tags[a+"count"]++,this.tags[a+this.tags[a+"count"]]=this.indent_level):(this.tags[a+"count"]=1,this.tags[a+this.tags[a+"count"]]=this.indent_level);this.tags[a+this.tags[a+"count"]+"parent"]=this.tags.parent;this.tags.parent=a+this.tags[a+"count"]},this.retrieve_tag=function(a){if(this.tags[a+
57 "count"]){for(var b=this.tags.parent;b&&a+this.tags[a+"count"]!==b;)b=this.tags[b+"parent"];b&&(this.indent_level=this.tags[a+this.tags[a+"count"]],this.tags.parent=this.tags[b+"parent"]);delete this.tags[a+this.tags[a+"count"]+"parent"];delete this.tags[a+this.tags[a+"count"]];1===this.tags[a+"count"]?delete this.tags[a+"count"]:this.tags[a+"count"]--}},this.indent_to_tag=function(a){if(this.tags[a+"count"]){for(var b=this.tags.parent;b&&a+this.tags[a+"count"]!==b;)b=this.tags[b+"parent"];b&&(this.indent_level=
58 this.tags[a+this.tags[a+"count"]])}},this.get_tag=function(a){var b,g,d="",f=[],h="",k=!1,p=!0,n=this.pos,c=this.line_char_count;a=void 0!==a&&a;do{if(this.pos>=this.input.length)return a&&(this.pos=n,this.line_char_count=c),f.length?f.join(""):["","TK_EOF"];if(d=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(d,this.Utils.whitespace))k=!0;else{if("'"!==d&&'"'!==d||(d+=this.get_unformatted(d),k=!0),"\x3d"===d&&(k=!1),f.length&&"\x3d"!==f[f.length-1]&&"\x3e"!==d&&k){if(this.space_or_wrap(f),
59 k=!1,!p&&"force"===D&&"/"!==d){this.print_newline(!0,f);this.print_indentation(f);for(var e=0;e<E;e++)f.push(l)}for(e=0;e<f.length;e++)if(" "===f[e]){p=!1;break}}if(t&&"\x3c"===g&&"{{"===d+this.input.charAt(this.pos)&&(d+=this.get_unformatted("}}"),f.length&&" "!==f[f.length-1]&&"\x3c"!==f[f.length-1]&&(d=" "+d),k=!0),"\x3c"!==d||g||(b=this.pos-1,g="\x3c"),t&&!g&&2<=f.length&&"{"===f[f.length-1]&&"{"===f[f.length-2]&&(b="#"===d||"/"===d||"!"===d?this.pos-3:this.pos-2,g="{"),this.line_char_count++,
60 f.push(d),f[1]&&("!"===f[1]||"?"===f[1]||"%"===f[1])){f=[this.get_comment(b)];break}if(t&&f[1]&&"{"===f[1]&&f[2]&&"!"===f[2]){f=[this.get_comment(b)];break}if(t&&"{"===g&&2<f.length&&"}"===f[f.length-2]&&"}"===f[f.length-1])break}}while("\x3e"!==d);b=f.join("");g=-1!==b.indexOf(" ")?b.indexOf(" "):"{"===b.charAt(0)?b.indexOf("}"):b.indexOf("\x3e");d="\x3c"!==b.charAt(0)&&t?"#"===b.charAt(2)?3:2:1;g=b.substring(d,g).toLowerCase();return"/"===b.charAt(b.length-2)||this.Utils.in_array(g,this.Utils.single_token)?
61 a||(this.tag_type="SINGLE"):t&&"{"===b.charAt(0)&&"else"===g?a||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(g,B)?(h=this.get_unformatted("\x3c/"+g+"\x3e",b),f.push(h),this.pos-1,this.tag_type="SINGLE"):"script"===g&&(-1===b.search("type")||-1<b.search("type")&&-1<b.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?a||(this.record_tag(g),this.tag_type="SCRIPT"):"style"===g&&(-1===b.search("type")||
62 -1<b.search("type")&&-1<b.search("text/css"))?a||(this.record_tag(g),this.tag_type="STYLE"):"!"===g.charAt(0)?a||(this.tag_type="SINGLE",this.traverse_whitespace()):a||("/"===g.charAt(0)?(this.retrieve_tag(g.substring(1)),this.tag_type="END"):(this.record_tag(g),"html"!==g.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(f),this.Utils.in_array(g,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-
63 2]&&this.print_newline(!0,this.output))),a&&(this.pos=n,this.line_char_count=c),f.join("")},this.get_comment=function(a){var b="",d="\x3e",f=!1;this.pos=a;input_char=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&(b+=input_char,b.charAt(b.length-1)!==d.charAt(d.length-1)||-1===b.indexOf(d));)!f&&10>b.length&&(0===b.indexOf("\x3c![if")?(d="\x3c![endif]\x3e",f=!0):0===b.indexOf("\x3c![cdata[")?(d="]]\x3e",f=!0):0===b.indexOf("\x3c![")?(d="]\x3e",f=!0):0===b.indexOf("\x3c!--")?
64 (d="--\x3e",f=!0):0===b.indexOf("{{!")?(d="}}",f=!0):0===b.indexOf("\x3c?")?(d="?\x3e",f=!0):0===b.indexOf("\x3c%")&&(d="%\x3e",f=!0)),input_char=this.input.charAt(this.pos),this.pos++;return b},this.get_unformatted=function(a,b){if(b&&-1!==b.toLowerCase().indexOf(a))return"";var d="",f="",l=0,h=!0;do{if(this.pos>=this.input.length)break;if(d=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(d,this.Utils.whitespace)){if(!h){this.line_char_count--;continue}if("\n"===d||"\r"===d){f+="\n";this.line_char_count=
65 0;continue}}f+=d;this.line_char_count++;h=!0;t&&"{"===d&&f.length&&"{"===f.charAt(f.length-2)&&(f+=this.get_unformatted("}}"),l=f.length)}while(-1===f.toLowerCase().indexOf(a,l));return f},this.get_token=function(){var a;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var b=this.last_token.substr(7);return a=this.get_contents_to(b),"string"!=typeof a?a:[a,"TK_"+b]}if("CONTENT"===this.current_mode)return a=this.get_content(),"string"!=typeof a?a:[a,"TK_CONTENT"];if("TAG"===
66 this.current_mode)return"string"!=typeof(a=this.get_tag())?a:[a,"TK_TAG_"+this.tag_type]},this.get_full_indent=function(a){return a=this.indent_level+a||0,1>a?"":Array(a+1).join(this.indent_string)},this.is_unformatted=function(a,b){if(!this.Utils.in_array(a,b))return!1;if("a"!==a.toLowerCase()||!this.Utils.in_array("a",b))return!0;var d=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(d&&!this.Utils.in_array(d,b))},this.printer=function(a,b,d,f,l){this.input=a||"";this.input=
67 this.input.replace(/\r\n|[\r\u2028\u2029]/g,"\n");this.output=[];this.indent_character=b;this.indent_string="";this.indent_size=d;this.brace_style=l;this.indent_level=0;this.wrap_line_length=f;for(a=this.line_char_count=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(a,b){this.line_char_count=0;b&&b.length&&(a||"\n"!==b[b.length-1])&&("\n"!==b[b.length-1]&&(b[b.length-1]=b[b.length-1].replace(/\s+$/g,"")),b.push("\n"))};this.print_indentation=function(a){for(var b=
68 0;b<this.indent_level;b++)a.push(this.indent_string),this.line_char_count+=this.indent_string.length};this.print_token=function(a){this.is_whitespace(a)&&!this.output.length||((a||""!==a)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),a=a.replace(/^\s+/g,"")),this.print_token_raw(a))};this.print_token_raw=function(a){0<this.newlines&&(a=a.replace(/\s+$/g,""));a&&""!==a&&(1<a.length&&"\n"===a.charAt(a.length-1)?(this.output.push(a.slice(0,-1)),this.print_newline(!1,
69 this.output)):this.output.push(a));for(a=0;a<this.newlines;a++)this.print_newline(0<a,this.output);this.newlines=0};this.indent=function(){this.indent_level++};this.unindent=function(){0<this.indent_level&&this.indent_level--}},this};for(a.printer(f,l,r,w,p);;){f=a.get_token();if(a.token_text=f[0],a.token_type=f[1],"TK_EOF"===a.token_type)break;switch(a.token_type){case "TK_TAG_START":a.print_newline(!1,a.output);a.print_token(a.token_text);a.indent_content&&(a.indent(),a.indent_content=!1);a.current_mode=
70 "CONTENT";break;case "TK_TAG_STYLE":case "TK_TAG_SCRIPT":a.print_newline(!1,a.output);a.print_token(a.token_text);a.current_mode="CONTENT";break;case "TK_TAG_END":"TK_CONTENT"===a.last_token&&""===a.last_text&&(f=a.token_text.match(/\w+/)[0],r=null,a.output.length&&(r=a.output[a.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),(null===r||r[1]!==f&&!a.Utils.in_array(r[1],B))&&a.print_newline(!1,a.output));a.print_token(a.token_text);a.current_mode="CONTENT";break;case "TK_TAG_SINGLE":(f=a.token_text.match(/^\s*<([a-z-]+)/i))&&
71 a.Utils.in_array(f[1],B)||a.print_newline(!1,a.output);a.print_token(a.token_text);a.current_mode="CONTENT";break;case "TK_TAG_HANDLEBARS_ELSE":a.print_token(a.token_text);a.indent_content&&(a.indent(),a.indent_content=!1);a.current_mode="CONTENT";break;case "TK_TAG_HANDLEBARS_COMMENT":case "TK_CONTENT":a.print_token(a.token_text);a.current_mode="TAG";break;case "TK_STYLE":case "TK_SCRIPT":if(""!==a.token_text){a.print_newline(!1,a.output);var u;f=a.token_text;w=1;"TK_SCRIPT"===a.token_type?u="function"==
72 typeof x&&x:"TK_STYLE"===a.token_type&&(u="function"==typeof A&&A);"keep"===d.indent_scripts?w=0:"separate"===d.indent_scripts&&(w=-a.indent_level);r=a.get_full_indent(w);u?(w=function(){this.eol="\n"},w.prototype=d,w=new w,f=u(f.replace(/^\s*/,r),w)):(p=f.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(a.indent_string).length-1,w=a.get_full_indent(w-p),f=f.replace(/^\s*/,r).replace(/\r\n|\r|\n/g,"\n"+w).replace(/\s+$/,""));f&&(a.print_token_raw(f),a.print_newline(!0,a.output))}a.current_mode="TAG";
73 break;default:""!==a.token_text&&a.print_token(a.token_text)}a.last_token=a.token_type;a.last_text=a.token_text}d=a.output.join("").replace(/[\r\n\t ]+$/,"");return z&&(d+="\n"),"\n"!=b&&(d=d.replace(/[\n]/g,b)),d}if("function"==typeof define&&define.amd)define("beautify-html.js",["require","./beautify","./beautify-css"],function(x){var d=x("./beautify"),I=x("./beautify-css");return{html_beautify:function(x,a){return f(x,a,d.js_beautify,I.css_beautify)}}});else if("undefined"!=typeof exports){var x=
74 require("./beautify.js"),I=require("./beautify-css.js");exports.html_beautify=function(K,d){return f(K,d,x.js_beautify,I.css_beautify)}}else"undefined"!=typeof window?window.html_beautify=function(x,d){return f(x,d,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(x,d){return f(x,d,global.js_beautify,global.css_beautify)})})();
75 (function(f){"function"==typeof f.define&&(f.define("beautify",["beautify.js"],function(f){return f}),f.define("beautify-css",[],function(){return{css_beautify:void 0}}),f.define("beautifyModule",["beautify","beautify-html.js"],function(x,I){f.js_beautify=x.js_beautify;f.html_beautify=I.html_beautify}))})(this);