/*! * froala_editor v4.3.0 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2024 Froala Labs */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";(t=t&&t.hasOwnProperty("default")?t["default"]:t).PLUGINS.codeBeautifier=function(){var t,e,n,i,Q={};function y(i,t){var e={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};t=t||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=t.indent_size||4,s=t.indent_char||" ",a=t.selector_separator_newline===undefined||t.selector_separator_newline,_=t.end_with_newline!==undefined&&t.end_with_newline,o=t.newline_between_rules===undefined||t.newline_between_rules,c=t.eol?t.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),t.indent_with_tabs&&(s="\t",r=1),c=c.replace(/\\r/,"\r").replace(/\\n/,"\n");var l,h=/^\s+$/,u=-1,p=0;function d(){return(l=i.charAt(++u))||""}function f(t){var e,n=u;return t&&E(),e=i.charAt(u+1)||"",u=n-1,d(),e}function T(t){for(var e=u;d();)if("\\"===l)d();else{if(-1!==t.indexOf(l))break;if("\n"===l)break}return i.substring(e,u+1)}function E(){for(var t="";h.test(f());)d(),t+=l;return t}function g(){var t="";for(l&&h.test(l)&&(t=l);h.test(d());)t+=l;return t}function x(t){var e=u;for(t="/"===f(),d();d();){if(!t&&"*"===l&&"/"===f()){d();break}if(t&&"\n"===l)return i.substring(e,u)}return i.substring(e,u)+l}function w(t){return i.substring(u-t.length,u).toLowerCase()===t}function K(){for(var t=0,e=u+1;en&&(n=t.line_indent_level)),{mode:e,parent:t,last_text:t?t.last_text:"",last_word:t?t.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,case_body:!1,indentation_level:n,line_indent_level:t?t.line_indent_level:n,start_line_index:c.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function L(){O();var t=Z.Expression;if("["===l.text){if("TK_WORD"===a||")"===h.last_text)return"TK_RESERVED"===a&&Y(h.last_text,s.line_starters)&&(c.space_before_token=!0),v(t),m(),b(),void(d.space_in_paren&&(c.space_before_token=!0));t=Z.ArrayLiteral,S(h.mode)&&("["!==h.last_text&&(","!==h.last_text||"]"!==_&&"}"!==_)||d.keep_array_indentation||K())}else"TK_RESERVED"===a&&"for"===h.last_text?t=Z.ForInitializer:"TK_RESERVED"===a&&Y(h.last_text,["if","while"])&&(t=Z.Conditional);" "===h.last_text||"TK_START_BLOCK"===a?K():"TK_END_EXPR"===a||"TK_START_EXPR"===a||"TK_END_BLOCK"===a||"."===h.last_text?w(l.wanted_newline):"TK_RESERVED"===a&&"("===l.text||"TK_WORD"===a||"TK_OPERATOR"===a?"TK_RESERVED"===a&&("function"===h.last_word||"typeof"===h.last_word)||"*"===h.last_text&&"function"===_?d.space_after_anon_function&&(c.space_before_token=!0):"TK_RESERVED"!==a||!Y(h.last_text,s.line_starters)&&"catch"!==h.last_text||d.space_before_conditional&&(c.space_before_token=!0):c.space_before_token=!0;"("===l.text&&"TK_RESERVED"===a&&"await"===h.last_word&&(c.space_before_token=!0);"("===l.text&&("TK_EQUALS"!==a&&"TK_OPERATOR"!==a||y()||w());v(t),m(),d.space_in_paren&&(c.space_before_token=!0);b()},TK_END_EXPR:function I(){for(;h.mode===Z.Statement;)k();h.multiline_frame&&w("]"===l.text&&S(h.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==a||d.space_in_empty_paren?c.space_before_token=!0:(c.trim(),c.space_before_token=!1));"]"===l.text&&d.keep_array_indentation?(m(),k()):(k(),m());c.remove_redundant_indentation(u),h.do_while&&u.mode===Z.Conditional&&(u.mode=Z.Expression,h.do_block=!1,h.do_while=!1)},TK_START_BLOCK:function V(){var t=D(1),e=D(2);e&&(":"===e.text&&Y(t.type,["TK_STRING","TK_WORD","TK_RESERVED"])||Y(t.text,["get","set"])&&Y(e.type,["TK_WORD","TK_RESERVED"]))?Y(_,["class","interface"])?v(Z.BlockStatement):v(Z.ObjectLiteral):v(Z.BlockStatement);var n=!t.comments_before.length&&"}"===t.text&&"function"===h.last_word&&"TK_END_EXPR"===a;"expand"===d.brace_style||"none"===d.brace_style&&l.wanted_newline?"TK_OPERATOR"!==a&&(n||"TK_EQUALS"===a||"TK_RESERVED"===a&&N(h.last_text)&&"else"!==h.last_text)?c.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==a&&"TK_START_EXPR"!==a?"TK_START_BLOCK"===a?K():c.space_before_token=!0:S(u.mode)&&","===h.last_text&&("}"===_?c.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function P(){for(;h.mode===Z.Statement;)k();var t="TK_START_BLOCK"===a;"expand"===d.brace_style?t||K():t||(S(h.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function B(){O()&&(c.space_before_token=!1);for(;h.mode===Z.Statement&&!h.if_block&&!h.do_block;)k();m()},TK_STRING:function j(){O()?c.space_before_token=!0:"TK_RESERVED"===a||"TK_WORD"===a?c.space_before_token=!0:"TK_COMMA"===a||"TK_START_EXPR"===a||"TK_EQUALS"===a||"TK_OPERATOR"===a?y()||w():K();m()},TK_EQUALS:function M(){O();h.declaration_statement&&(h.declaration_assignment=!0);c.space_before_token=!0,m(),c.space_before_token=!0},TK_OPERATOR:function U(){O();if("TK_RESERVED"===a&&N(h.last_text))return c.space_before_token=!0,void m();if("*"===l.text&&"TK_DOT"===a)return void m();if(":"===l.text&&h.in_case)return h.case_body=!0,b(),m(),K(),void(h.in_case=!1);if("::"===l.text)return void m();"TK_OPERATOR"===a&&w();var t=!0,e=!0;Y(l.text,["--","++","!","~"])||Y(l.text,["-","+"])&&(Y(a,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Y(h.last_text,s.line_starters)||","===h.last_text)?(e=t=!1,!l.wanted_newline||"--"!==l.text&&"++"!==l.text||K(!1,!0)," "===h.last_text&&A(h.mode)&&(t=!0),"TK_RESERVED"===a?t=!0:"TK_END_EXPR"===a?t=!("]"===h.last_text&&("--"===l.text||"++"===l.text)):"TK_OPERATOR"===a&&(t=Y(l.text,["--","-","++","+"])&&Y(h.last_text,["--","-","++","+"]),Y(l.text,["+","-"])&&Y(h.last_text,["--","++"])&&(e=!0)),h.mode!==Z.BlockStatement&&h.mode!==Z.Statement||"{"!==h.last_text&&" "!==h.last_text||K()):":"===l.text?0===h.ternary_depth?t=!1:h.ternary_depth-=1:"?"===l.text?h.ternary_depth+=1:"*"===l.text&&"TK_RESERVED"===a&&"function"===h.last_text&&(e=t=!1);c.space_before_token=c.space_before_token||t,m(),c.space_before_token=e},TK_COMMA:function W(){if(h.declaration_statement)return A(h.parent.mode)&&(h.declaration_assignment=!1),m(),void(h.declaration_assignment?K(h.declaration_assignment=!1,!0):(c.space_before_token=!0,d.comma_first&&w()));m(),h.mode===Z.ObjectLiteral||h.mode===Z.Statement&&h.parent.mode===Z.ObjectLiteral?(h.mode===Z.Statement&&k(),K()):(c.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function z(){if(c.raw)return c.add_raw_token(l),void(l.directives&&"end"===l.directives.preserve&&(d.test_output_raw||(c.raw=!1)));if(l.directives)return K(!1,!0),m(),"start"===l.directives.preserve&&(c.raw=!0),void K(!1,!0);if(!Q.newline.test(l.text)&&!l.wanted_newline)return c.space_before_token=!0,m(),void(c.space_before_token=!0);var t,e=function a(t){var e;t=t.replace(/\x0d/g,"");var n=[];e=t.indexOf("\n");for(;-1!==e;)n.push(t.substring(0,e)),t=t.substring(e+1),e=t.indexOf("\n");t.length&&n.push(t);return n}(l.text),n=!1,i=!1,r=l.whitespace_before,s=r.length;K(!1,!0),1s?m(e[t].substring(s)):c.add_token(e[t]);K(!1,!0)},TK_COMMENT:function G(){l.wanted_newline?K(!1,!0):c.trim(!0);c.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function X(){O();"TK_RESERVED"===a&&N(h.last_text)?c.space_before_token=!0:w(")"===h.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function F(){m(),"\n"===l.text[l.text.length-1]&&K()},TK_EOF:function $(){for(;h.mode===Z.Statement;)k()}},d={},(t=t||{}).braces_on_own_line!==undefined&&(d.brace_style=t.braces_on_own_line?"expand":"collapse"),d.brace_style=t.brace_style?t.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=t.indent_size?parseInt(t.indent_size,10):4,d.indent_char=t.indent_char?t.indent_char:" ",d.eol=t.eol?t.eol:"\n",d.preserve_newlines=t.preserve_newlines===undefined||t.preserve_newlines,d.break_chained_methods=t.break_chained_methods!==undefined&&t.break_chained_methods,d.max_preserve_newlines=t.max_preserve_newlines===undefined?0:parseInt(t.max_preserve_newlines,10),d.space_in_paren=t.space_in_paren!==undefined&&t.space_in_paren,d.space_in_empty_paren=t.space_in_empty_paren!==undefined&&t.space_in_empty_paren,d.jslint_happy=t.jslint_happy!==undefined&&t.jslint_happy,d.space_after_anon_function=t.space_after_anon_function!==undefined&&t.space_after_anon_function,d.keep_array_indentation=t.keep_array_indentation!==undefined&&t.keep_array_indentation,d.space_before_conditional=t.space_before_conditional===undefined||t.space_before_conditional,d.unescape_strings=t.unescape_strings!==undefined&&t.unescape_strings,d.wrap_line_length=t.wrap_line_length===undefined?0:parseInt(t.wrap_line_length,10),d.e4x=t.e4x!==undefined&&t.e4x,d.end_with_newline=t.end_with_newline!==undefined&&t.end_with_newline,d.comma_first=t.comma_first!==undefined&&t.comma_first,d.test_output_raw=t.test_output_raw!==undefined&&t.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),t.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),o="";0d.max_preserve_newlines&&(e=d.max_preserve_newlines),d.preserve_newlines&&1=d.wrap_line_length&&K(!1,!0)}}function K(t,e){if(!e&&" "!==h.last_text&&","!==h.last_text&&"="!==h.last_text&&"TK_OPERATOR"!==a)for(;h.mode===Z.Statement&&!h.if_block&&!h.do_block;)k();c.add_new_line(t)&&(h.multiline_frame=!0)}function R(){c.just_added_newline()&&(d.keep_array_indentation&&S(h.mode)&&l.wanted_newline?(c.current_line.push(l.whitespace_before),c.space_before_token=!1):c.set_indent(h.indentation_level)&&(h.line_indent_level=h.indentation_level))}function m(t){c.raw?c.add_raw_token(l):(d.comma_first&&"TK_COMMA"===a&&c.just_added_newline()&&","===c.previous_line.last()&&(c.previous_line.pop(),R(),c.add_token(","),c.space_before_token=!0),t=t||l.text,R(),c.add_token(t))}function b(){h.indentation_level+=1}function v(t){u=h?(e.push(h),h):E(null,t),h=E(u,t)}function S(t){return t===Z.ArrayLiteral}function A(t){return Y(t,[Z.Expression,Z.ForInitializer,Z.Conditional])}function k(){0=f.length?null:f[e]}function C(){("TK_RESERVED"===l.type&&h.mode!==Z.ObjectLiteral&&Y(l.text,["set","get"])&&(l.type="TK_WORD"),"TK_RESERVED"===l.type&&h.mode===Z.ObjectLiteral)&&(":"===D(1).text&&(l.type="TK_WORD"));if(O()||!l.wanted_newline||A(h.mode)||"TK_OPERATOR"===a&&"--"!==h.last_text&&"++"!==h.last_text||"TK_EQUALS"===a||!d.preserve_newlines&&"TK_RESERVED"===a&&Y(h.last_text,["const","let","const","set","get"])||K(),h.do_block&&!h.do_while){if("TK_RESERVED"===l.type&&"while"===l.text)return c.space_before_token=!0,m(),c.space_before_token=!0,void(h.do_while=!0);K(),h.do_block=!1}if(h.if_block)if(h.else_block||"TK_RESERVED"!==l.type||"else"!==l.text){for(;h.mode===Z.Statement;)k();h.if_block=!1,h.else_block=!1}else h.else_block=!0;if("TK_RESERVED"===l.type&&("case"===l.text||"default"===l.text&&h.in_case_statement))return K(),(h.case_body||d.jslint_happy)&&(!function t(){0h.parent.indentation_level)&&(h.indentation_level-=1)}(),h.case_body=!1),m(),h.in_case=!0,void(h.in_case_statement=!0);if("TK_RESERVED"===l.type&&"function"===l.text&&((Y(h.last_text,["}"," "])||c.just_added_newline()&&!Y(h.last_text,["[","{",":","=",","]))&&(c.just_added_blankline()||l.comments_before.length||(K(),K(!0))),"TK_RESERVED"===a||"TK_WORD"===a?"TK_RESERVED"===a&&Y(h.last_text,["get","set","new","return","export","async"])?c.space_before_token=!0:"TK_RESERVED"===a&&"default"===h.last_text&&"export"===_?c.space_before_token=!0:K():"TK_OPERATOR"===a||"="===h.last_text?c.space_before_token=!0:(h.multiline_frame||!A(h.mode)&&!S(h.mode))&&K()),"TK_COMMA"!==a&&"TK_START_EXPR"!==a&&"TK_EQUALS"!==a&&"TK_OPERATOR"!==a||y()||w(),"TK_RESERVED"===l.type&&Y(l.text,["function","get","set"]))return m(),void(h.last_word=l.text);(n="NONE","TK_END_BLOCK"===a?"TK_RESERVED"===l.type&&Y(l.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&l.wanted_newline?n="NEWLINE":(n="SPACE",c.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===a&&h.mode===Z.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===a&&A(h.mode)?n="SPACE":"TK_STRING"===a?n="NEWLINE":"TK_RESERVED"===a||"TK_WORD"===a||"*"===h.last_text&&"function"===_?n="SPACE":"TK_START_BLOCK"===a?n="NEWLINE":"TK_END_EXPR"===a&&(c.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===l.type&&Y(l.text,s.line_starters)&&")"!==h.last_text&&(n="else"===h.last_text||"export"===h.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===l.type&&Y(l.text,["else","catch","finally"]))?"TK_END_BLOCK"!==a||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&l.wanted_newline?K():(c.trim(!0),"}"!==c.current_line.last()&&K(),c.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===a&&N(h.last_text)?c.space_before_token=!0:"TK_END_EXPR"!==a?"TK_START_EXPR"===a&&"TK_RESERVED"===l.type&&Y(l.text,["const","let","const"])||":"===h.last_text||("TK_RESERVED"===l.type&&"if"===l.text&&"else"===h.last_text?c.space_before_token=!0:K()):"TK_RESERVED"===l.type&&Y(l.text,s.line_starters)&&")"!==h.last_text&&K():h.multiline_frame&&S(h.mode)&&","===h.last_text&&"}"===_?K():"SPACE"===n&&(c.space_before_token=!0);m(),h.last_word=l.text,"TK_RESERVED"===l.type&&"do"===l.text&&(h.do_block=!0),"TK_RESERVED"===l.type&&"if"===l.text&&(h.if_block=!0)}a="TK_START_BLOCK",_="",(c=new q(o,T)).raw=d.test_output_raw,e=[],v(Z.BlockStatement),this.beautify=function(){var t,e;for(s=new tt(i,d,o),f=s.tokenize(),r=0;t=D();){for(var n=0;n=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(t),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(t){for(var e=0;e < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var I,V,P,B,j,M,U=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),W=/([\s\S]*?)((?:\*\/)|$)/g,z=/([^\n\r\u2028\u2029]*)/g,G=/\/\* beautify( \w+[:]\w+)+ \*\//g,X=/ (\w+)[:](\w+)/g,F=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,$=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function a(){var t,e,n=[];if(I=0,V="",M<=j)return["","TK_EOF"];e=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var i=k.charAt(j);for(j+=1;Y(i,O);){if(Q.newline.test(i)?"\n"===i&&"\r"===k.charAt(j-2)||(I+=1,n=[]):n.push(i),M<=j)return["","TK_EOF"];i=k.charAt(j),j+=1}if(n.length&&(V=n.join("")),N.test(i)){var r=!0,s=!0,a=N;for("0"===i&&j/))&&("TK_RESERVED"===e.type&&Y(e.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===e.type&&")"===e.text&&e.parent&&"TK_RESERVED"===e.parent.type&&Y(e.parent.text,["if","while","for"])||Y(e.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var h=i,u=!1,p=!1;if(t=i,"/"===h)for(var d=!1;j/g,T=k.slice(j-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),j+=m-1,[T=T.replace(Q.lineBreak,"\n"),"TK_STRING"]}}else for(;j=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" "))},this.get_content=function(){for(var t="",e=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return e.length?e.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(e);else{if(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}t=this.input.charAt(this.pos),this.pos++,this.line_char_count++,e.push(t)}}return e.length?e.join(""):""},this.get_contents_to=function(t){if(this.pos===this.input.length)return["","TK_EOF"];var e="",n=new RegExp(""),"igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos=this.input.length)return t&&(this.pos=o,this.line_char_count=c),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))a=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),a=!0),"="===i&&(a=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&a){if(this.space_or_wrap(r),a=!1,!_&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var l=0;l"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?t||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?t||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted(""),d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1",i=!0):0===e.indexOf("",i=!0):0===e.indexOf("",i=!0):0===e.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===e.indexOf("{{!")?(n="}}",i=!0):0===e.indexOf("",i=!0):0===e.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return e},this.get_unformatted=function(t,e){if(e&&-1!=e.toLowerCase().indexOf(t))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(t,r));return i},this.get_token=function(){var t;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(t=this.get_content())?t:[t,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(t=this.get_tag())?t:[t,"TK_TAG_".concat(this.tag_type)]:void 0;var e=this.last_token.substr(7);return"string"!=typeof(t=this.get_contents_to(e))?t:[t,"TK_".concat(e)]},this.get_full_indent=function(t){return(t=this.indent_level+t||0)<1?"":new Array(t+1).join(this.indent_string)},this.is_unformatted=function(t,e){if(!this.Utils.in_array(t,e))return!1;if("a"!=t.toLowerCase()||!this.Utils.in_array("a",e))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,e))},this.printer=function(t,e,n,i,r){this.input=t||"",this.output=[],this.indent_character=e,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s