From f2434b809f9d3946f9430ad6ed2262cfc3929297 Mon Sep 17 00:00:00 2001 From: Nikolas Savvidis Date: Wed, 28 Sep 2022 07:07:11 +0200 Subject: [PATCH] v0.1.2-beta.1 --- index.js | 2 +- index.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bed199c..34cbe84 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); -var ot=Object.defineProperty;var at=(a,f)=>{for(var h in f)ot(a,h,{get:f[h],enumerable:true});};var M=function(){const a=typeof process!=="undefined"&&process.versions!=null?"node":"browser";let f="";return {env:a,mode:"beautify",end:0,iterator:0,start:0,scopes:[],beautify:{},lexers:{},get source(){return a==="node"&&Buffer.isBuffer(f)?f.toString():f},set source(h){f=a==="node"?Buffer.isBuffer(h)?h:Buffer.from(h):h;},data:{begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]},hooks:{before:[],language:[],rules:[],after:[]},stats:{chars:-1,time:-1,size:"",language:""},options:{lexer:"auto",language:"text",languageName:"Plain Text",mode:"beautify",indentLevel:0,crlf:false,commentIndent:true,endNewline:false,indentChar:" ",indentSize:2,preserveComment:false,preserveLine:2,wrap:0,grammar:{html:{tags:[],voids:[],embedded:{}},liquid:{tags:[],else:[],singletons:[],embedded:{}},script:{keywords:[]},style:{units:[]}},markup:{correct:false,commentNewline:false,attributeCasing:"preserve",attributeValues:"preserve",attributeSort:false,attributeSortList:[],forceAttribute:false,forceLeadAttribute:false,forceIndent:false,preserveText:false,preserveAttributes:false,selfCloseSpace:false,quoteConvert:"none"},style:{correct:false,compressCSS:false,classPadding:false,noLeadZero:false,sortSelectors:false,sortProperties:false,quoteConvert:"none",forceValue:"preserve"},script:{correct:false,braceNewline:false,bracePadding:false,braceStyle:"none",braceAllman:false,commentNewline:false,caseSpace:false,elseNewline:false,endComma:"never",arrayFormat:"default",objectSort:false,objectIndent:"default",functionNameSpace:false,functionSpace:false,styleGuide:"none",ternaryLine:false,methodChain:4,neverFlatten:false,noCaseIndent:false,noSemicolon:false,quoteConvert:"none",variableList:"none",vertical:false},json:{arrayFormat:"default",braceAllman:false,bracePadding:false,objectIndent:"default",objectSort:false}}}}();var ye=Object.assign;var Ce=Object.create;var Re=Object.keys;var Qe=Object.defineProperty;var _e=Array.isArray;var y="";var de=" ";var pe="\n";var me;var le=new(me=class{constructor(){this.html={};this.liquid={};this.script={};this.style={};this.script.keywords=new Set(me.defaults.script.keywords);this.style.units=new Set(me.defaults.style.units);this.html.tags=new Set(me.defaults.html.tags);this.html.voids=new Set(me.defaults.html.voids);this.html.embed={};this.liquid.tags=new Set(me.defaults.liquid.tags);this.liquid.else=new Set(me.defaults.liquid.else);this.liquid.singletons=new Set(me.defaults.liquid.singletons);this.liquid.embed={};this.defaults();}embed(f,h){return h in this[f].embed}defaults(){for(const f in me.defaults.html.embedded){this.html.embed[f]={};for(const{language:h,attribute:p=null}of me.defaults.html.embedded[f]){this.html.embed[f].language=h;if(typeof p==="object"){for(const r in p){this.html.embed[f].attribute=r;if(Array.isArray(p[r])){this.html.embed[f].value=m=>new Set(p[r]).has(m);}else {this.html.embed[f].value=m=>new RegExp(p[r]).test(m);}}}else {this.html.embed[f].attribute=null;}}}for(const f in me.defaults.liquid.embedded){this.liquid.embed[f]={end:h=>new RegExp(`^{%-?\\s*end${f}`).test(h)};for(const{language:h,argument:p}of me.defaults.liquid.embedded[f]){this.liquid.embed[f].language=h;if(p){if(Array.isArray(p)){this.liquid.embed[f].attribute=r=>new Set(p).has(r);}else {this.liquid.embed[f].attribute=r=>new RegExp(p).test(r);}}else {this.liquid.embed[f].attribute=null;}}}}extend(f){for(const h in f){if(h==="html"){if("tags"in f[h]&&Array.isArray(f[h].tags)){for(const p of f[h].tags){if(!this.html.tags.has(p))this.html.tags.add(p);}}if("voids"in f[h]&&Array.isArray(f[h].voids)){for(const p of f[h].voids){if(!this.html.voids.has(p))this.html.voids.add(p);}}if("embedded"in f[h]);}if(h==="liquid"){if("tags"in f[h]&&Array.isArray(f[h].tags)){for(const p of f[h].tags){if(!this.liquid.tags.has(p))this.liquid.tags.add(p);}}if("else"in f[h]&&Array.isArray(f[h].else)){for(const p of f[h].else){if(!this.liquid.else.has(p))this.liquid.else.add(p);}}if("singletons"in f[h]&&Array.isArray(f[h].singletons)){for(const p of f[h].singletons){if(!this.liquid.singletons.has(p))this.liquid.singletons.add(p);}}if("embedded"in f[h]&&typeof f[h].embedded==="object"){for(const p in f[h].embedded){if(!(p in this.liquid.embed)){this.liquid.embed[p]={end:r=>new RegExp(`{%-?\\s*end${p}`).test(r)};}for(const{language:r,argument:m}of f[h].embedded[p]){if(this.liquid.embed[p].language!==r){this.liquid.embed[p].language=r;}if(m){if(this.liquid.embed[p].attribute===null){if(Array.isArray(m)){this.liquid.embed[p].attribute=e=>new Set(m).has(e);}else {this.liquid.embed[p].attribute=e=>new RegExp(m).test(e);}}else {const e=[];for(const _ of me.defaults.liquid.embedded[p]){if(Array.isArray(_.argument)){for(const v of _.argument){if(m!==v)e.push(m);else e.push(v);}this.liquid.embed[p].attribute=v=>new Set(e).has(v);}else {if(_.argument!==m){this.liquid.embed[p].attribute=v=>new RegExp(m).test(v);}}}}}}}}}if(h==="style"){if("units"in f[h]&&Array.isArray(f[h].units)){for(const p of f[h].units){if(!this.style.units.has(p))this.style.units.add(p);}}}if(h==="script"){if("keywords"in f[h]&&Array.isArray(f[h].keywords)){for(const p of f[h].keywords){if(!this.script.keywords.has(p))this.script.keywords.add(p);}}}}}},me.defaults={script:{keywords:["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]},style:{units:["%","cap","ch","cm","deg","dpcm","dpi","dppx","em","ex","fr","grad","Hz","ic","in","kHz","lh","mm","ms","mS","pc","pt","px","Q","rad","rem","rlh","s","turn","vb","vh","vi","vmax","vmin","vw"]},html:{embedded:{script:[{language:"javascript"},{language:"json",attribute:{type:["application/json","application/ld+json"]}},{language:"jsx",attribute:{type:["text/jsx","application/jsx"]}}],style:[{language:"css"}]},voids:["area","base","basefont","br","col","embed","eventsource","frame","hr","image","img","input","isindex","keygen","link","meta","path","param","progress","wbr"],tags:["body","colgroup","dd","dt","head","html","li","option","p","tbody","td","tfoot","th","thead","tr"]},liquid:{embedded:{schema:[{language:"json"}],style:[{language:"css"}],stylesheet:[{language:"css"},{language:"scss",argument:/\s*['"]scss['"]/}],javascript:[{language:"javascript"}]},tags:["case","capture","comment","embed","filter","for","form","if","macro","paginate","raw","switch","tablerow","unless","verbatim","schema","style","javascript","highlight","stylesheet"],else:["default","else","when","elsif"],singletons:["assign","increment","decrement","render","include"]}},me);function Je(a){const f=Ce(null);if(a)return ye(f,a);return f}function $e(a,f=de){if(a===0)return f;let h=y;let p=1;do{h+=f;}while(p++{let e=0;const _=p.length;if(e<_){do{if(_e(p[e])===true)p[e]=He.apply(this,p[e]);e=e+1;}while(e<_)}};const m=e=>{let _=f;let v=0;let u=0;let g=0;let l=[];let t=p[f];let O="";const T=typeof t;if(_{let e=0;const _=p.length;if(e<_){do{if(_e(p[e]))p[e]=Ue.apply(this,p[e]);e=e+1;}while(e<_)}};const m=e=>{let _=f;let v=0;let u=0;let g=0;let l=p[f];let t=[];let O="";const T=typeof l;if(_l||O>T){l=p[_];t=[_];}else if(p[_]===l){t.push(_);}_=_+1;}while(_{let m=0;const e=f.length;if(m{let e=0;const _=[];const v=f.length;if(e0){h.push(_[0]);r(_[0]);}else {if(this.recursive===true)p();a=f;}};r(this.array[0]);return a}var ve=/^[\t\v\f\r \u00a0\u2000-\u200b\u2028-\u2029\u3000]+/;var we=/[\t\v\f \u00a0\u2000-\u200b\u2028-\u2029\u3000]+$/;var et=/(\/[*/]|{%-?\s*(?:comment\s*-?%}|#)|#|{const f=this.structure.length-1;const h=this.structure[f];if(f>0)this.structure.splice(f,1);return h};return this.data}concat(f,h){for(const p of this.datanames)f[p]=f[p].concat(h[p]);if(f===this.data)this.count=f.token.length-1;}objectSort(f){let h=this.count;let p=this.structure[this.structure.length-1][1];let r=0;let m=0;let e=0;let _=0;let v=true;let u=0;let g=0;let l=0;const t=[];const O=p;const T=M.options.language==="json";const i=f.lexer[h]==="style"&&this.structure[this.structure.length-1][0]==="global";const j=f.lexer[h]==="style";const C=j===true?[";","separator"]:[",","separator"];const b=this.linesSpace;const E=this.count;const Y=i===true?"global":this.structure[this.structure.length-1][0];function Q(k,x){let S=k[0];let R=x[0];if(f.types[S]==="comment"){do{S=S+1;}while(Sf.token[R].toLowerCase())return 1;return -1}const n={begin:[],ender:[],lexer:[],lines:[],stack:[],token:[],types:[]};_=h;do{if(f.begin[h]===p||i===true&&h<_&&f.token[h]==="}"&&f.begin[f.begin[h]]===-1){if(f.types[h].indexOf("template")>-1)return;if(f.token[h]===C[0]||j===true&&f.token[h]==="}"&&f.token[h+1]!==";"){v=true;u=h+1;}else if(j===true&&f.token[h-1]==="}"){v=true;u=h;}if(u===0&&f.types[0]==="comment"){do{u=u+1;}while(f.types[u]==="comment")}else if(f.types[u]==="comment"&&f.lines[u]<2){u=u+1;}if(v===true&&(f.token[h]===C[0]||j===true&&f.token[h-1]==="}")&&u<=_){if(j===true&&"};".indexOf(f.token[_])<0){_=_+1;}else if(j===false&&f.token[_]!==","){_=_+1;}t.push([u,_]);if(j===true&&f.token[u]==="}"){_=u;}else {_=u-1;}}}h=h-1;}while(h>p);if(t.length>0&&t[t.length-1][0]>h+1){r=t[t.length-1][0]-1;if(f.types[r]==="comment"&&f.lines[r]>1){do{r=r-1;}while(r>0&&f.types[r]==="comment");t[t.length-1][0]=r+1;}if(f.types[h+1]==="comment"&&h===-1){do{h=h+1;}while(f.types[h+1]==="comment")}t.push([h+1,r]);}if(t.length>1){if(T===true||j===true||f.token[h-1]==="="||f.token[h-1]===":"||f.token[h-1]==="("||f.token[h-1]==="["||f.token[h-1]===","||f.types[h-1]==="word"||h===0){t.sort(Q);l=t.length;v=false;p=0;do{g=t[p][1];if(j===true){e=g;if(f.types[e]==="comment")e=e-1;if(f.token[e]==="}"){g=g+1;C[0]="}";C[1]="end";}else {C[0]=";";C[1]="separator";}}r=t[p][0];if(j===true&&f.types[g-1]!=="end"&&f.types[g]==="comment"&&f.types[g+1]!=="comment"&&p0&&n.types[r]==="comment")}r=r+1;this.splice({data:n,howmany:0,index:r,record:{begin:O,stack:Y,ender:this.count,lexer:n.lexer[r-1],lines:0,token:C[0],types:C[1]}});m=m+1;}p=p+1;}while(p{let m=this.count;const e=f.begin[m];if(f.lexer[m]==="style"&&M.options.style.sortProperties===true||f.lexer[m]==="script"&&(M.options.script.objectSort===true||M.options.json.objectSort===true)){return}do{if(f.begin[m]===e||f.begin[f.begin[m]]===e&&f.types[m].indexOf("attribute")>-1&&f.types[m].indexOf("attribute_end")<0){f.ender[m]=this.count;}else {m=f.begin[m];}m=m-1;}while(m>e);if(m>-1)f.ender[m]=this.count;};this.datanames.forEach(m=>f[m].push(h[m]));if(f===this.data){this.count=this.count+1;this.linesSpace=0;if(h.lexer!=="style"){if(p.replace(/(\{|\}|@|<|>|%|#|)/g,y)===y){p=h.types==="else"?"else":p=h.token;}}if(h.types==="start"||h.types.indexOf("_start")>0){this.structure.push([p,this.count]);}else if(h.types==="end"||h.types.indexOf("_end")>0){let m=0;if(this.structure.length>2&&(f.types[this.structure[this.structure.length-1][1]]==="else"||f.types[this.structure[this.structure.length-1][1]].indexOf("_else")>0)&&(f.types[this.structure[this.structure.length-2][1]]==="start"||f.types[this.structure[this.structure.length-2][1]].indexOf("_start")>0)&&(f.types[this.structure[this.structure.length-2][1]+1]==="else"||f.types[this.structure[this.structure.length-2][1]+1].indexOf("_else")>0)){this.structure.pop();f.begin[this.count]=this.structure[this.structure.length-1][1];f.stack[this.count]=this.structure[this.structure.length-1][0];f.ender[this.count-1]=this.count;m=f.ender[f.begin[this.count]+1];}r();if(m>0)f.ender[f.begin[this.count]+1]=m;this.structure.pop();}else if(h.types==="else"||h.types.indexOf("_else")>0){if(p===y)p="else";if(this.count>0&&(f.types[this.count-1]==="start"||f.types[this.count-1].indexOf("_start")>0)){this.structure.push([p,this.count]);}else {r();if(p===y){this.structure[this.structure.length-1]=["else",this.count];}else {this.structure[this.structure.length-1]=[p,this.count];}}}}}safeSort(f,h,p){if(_e(f)===false)return f;if(h==="normal"){return Ze.call({array:f,recursive:p},f)}else if(h==="descend"){return Ue.call({recursive:p},f)}return He.call({recursive:p},f)}sortCorrection(f,h){let p=f;let r=-1;const m=this.data;const e=[];const _=this.structure.length<2?[-1]:[this.structure[this.structure.length-2][1]];do{if(p>0&&m.types[p].indexOf("attribute")>-1&&m.types[p].indexOf("end")<0&&m.types[p-1].indexOf("start")<0&&m.types[p-1].indexOf("attribute")<0&&m.lexer[p]==="markup"){_.push(p-1);}if(p>0&&m.types[p-1].indexOf("attribute")>-1&&m.types[p].indexOf("attribute")<0&&m.lexer[_[_.length-1]]==="markup"&&m.types[_[_.length-1]].indexOf("start")<0){_.pop();}if(m.begin[p]!==_[_.length-1]){if(_.length>0){m.begin[p]=_[_.length-1];}else {m.begin[p]=-1;}}if(m.types[p].indexOf("else")>-1){if(_.length>0){_[_.length-1]=p;}else {_.push(p);}}if(m.types[p].indexOf("end")>-1)_.pop();if(m.types[p].indexOf("start")>-1)_.push(p);p=p+1;}while(p-1){e.push(p);r=r+1;}m.ender[p]=r>-1?e[r]:-1;if(m.types[p].indexOf("start")>-1){e.pop();r=r-1;}}while(p>f)}spacer(f){this.linesSpace=1;do{if(f.array[f.index]===pe){this.linesSpace=this.linesSpace+1;this.lineNumber=this.lineNumber+1;}if(ue(f.array[f.index+1])===false)break;f.index=f.index+1;}while(f.index{if(oe.charCodeAt(0)===123)return "{%-?\\s*";return "\\s*-?%}"})}$`);}const H=()=>{if(/^\s+$/.test(i[l+1])||i[l+1]===y){do{l=l+1;}while(lf.start);if(f.opening==="/*"&&f.chars[l]==="*"){oe="*/";}else if(f.opening!=="/*"){oe=f.terminator;}k=oe.length-1;x=oe.charAt(k);if(oe!==pe||f.chars[g]!==pe){do{m.push(f.chars[g]);if(oe===pe&&f.chars[g+1]===pe)break;if(f.chars[g]===x&&f.chars.slice(g-k,g+1).join(y)===oe)break;g=g+1;}while(g0&&n.replace(pe,y).indexOf(pe)>0&&/\n(?!(\s*\*))/.test(n)===false){return [n,g]}l=f.start;if(l>0&&f.chars[l-1]!==pe&&ue(f.chars[l-1])){do{l=l-1;}while(l>0&&f.chars[l-1]!==pe&&ue(f.chars[l-1]))}j=f.chars.slice(l,f.start).join(y);const G=new RegExp(pe+j,"g");i=n.replace(/\r\n/g,pe).replace(G,pe).split(pe);T=i.length;i[0]=i[0].replace(N,y);i[T-1]=i[T-1].replace(R,y);if(T<2)i=i[0].split(de);if(i[0]===y){i[0]=f.opening;}else {i.splice(0,0,f.opening);}T=i.length;l=0;do{C=lh&&i[l].replace(ve,y).indexOf(de)>h){i[l]=i[l].replace(ve,y);t=i[l].indexOf(de);e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);l=l-1;}else {i[l]=f.opening==="/*"&&i[l].indexOf("/*")!==0?` ${i[l].replace(ve,y).replace(we,y).replace(/\s+/g,de)}`:`${i[l].replace(ve,y).replace(we,y).replace(/\s+/g,de)}`;S=l<1?h-(f.opening.length+1):h;t=i[l].length;O=i[l].replace(ve,y).indexOf(de);if(t>S&&O>0&&O0);if(i[l].slice(0,4)!==" "&&/^\s*(\*|-)\s/.test(i[l])===true&&/^\s*(\*|-)\s/.test(i[l+1])===false){i.splice(l+1,0,"* ");}if(i[l].slice(0,4)!==" "&&/^\s*\d+\.\s/.test(i[l])===true&&/^\s*\d+\.\s/.test(i[l+1])===false){i.splice(l+1,0,"1. ");}if(t<4){e.push(i[l]);Q=true;}else if(l===T-1){e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);Q=true;l=l-1;}else if(/^\s+$/.test(i[l+1])===true||i[l+1]===y){e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);b=true;l=l-1;}else if(i[l+1].slice(0,4)!==" "&&/^\s*(\*|-)\s/.test(i[l+1])){e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);E=true;l=l-1;}else if(i[l+1].slice(0,4)!==" "&&/^\s*\d+\.\s/.test(i[l+1])){e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);Y=true;l=l-1;}else if(i[l+1].slice(0,4)===" "){e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);Q=true;l=l-1;}else if(t+C.length>h&&C.indexOf(de)<0){e.push(i[l].slice(0,t));i[l]=i[l].slice(t+1);Q=true;l=l-1;}else if(i[l].replace(ve,y).indexOf(de)h?i[l].slice(t+1)+_+i[l+1]:`${i[l].slice(t+1)} ${i[l+1]}`;}if(b===false&&E===false&&Y===false&&Q===false){i[l]=i[l].slice(0,t);}}else if(i[l+1]!==void 0&&(i[l].length+C.indexOf(de)>h&&C.indexOf(de)>0||i[l].length+C.length>h&&C.indexOf(de)<0)){e.push(i[l]);l=l+1;}else if(i[l+1]!==void 0&&/^\s+$/.test(i[l+1])===false&&i[l+1]!==y&&i[l+1].slice(0,4)!==" "&&/^\s*(\*|-|(\d+\.))\s/.test(i[l+1])===false){i[l+1]=`${i[l]} ${i[l+1]}`;b=true;}if(Q===false&&E===false&&Y===false){if(b===true){b=false;}else if(/^\s*(\*|-|(\d+\.))\s*$/.test(i[l])===false){if(l0){if(e[e.length-1].length>h-(f.terminator.length+1)){e.push(f.terminator);}else {e[e.length-1]=`${e[e.length-1]} ${f.terminator}`;}n=e.join(_);}else {i[i.length-1]=i[i.length-1]+f.terminator;n=i.join(_);}return [n,g]}wrapCommentLine(f){let h=f.start;let p=0;let r=y;let m=[];const{wrap:e,preserveComment:_}=M.options;function v(){let g=y;do{p=p+1;if(d(f.chars[p+1],10))return}while(p{const g=[];const l={ender:-1,types:"comment",lexer:f.lexer,lines:this.linesSpace};if(this.count>-1){l.begin=this.structure[this.structure.length-1][1];l.stack=this.structure[this.structure.length-1][0];l.token=this.data.token[this.count];}else {l.begin=-1;l.stack="global";l.token=y;}let t=0;let O=0;r=r.replace(/\s+/g,de).replace(we,y);O=r.length;if(e>O)return;do{t=e;if(r.charAt(t)!==de){do{t=t-1;}while(t>0&&r.charAt(t)!==de);if(t<3){t=e;do{t=t+1;}while(tf.start&&f.chars[p-1]==="/"&&(f.chars[p]==="*"||f.chars[p]==="/"));if(f.chars[p]==="*")g="*/";if(g!==pe||f.chars[h]!==pe){do{m.push(f.chars[h]);if(g===pe&&f.chars[h+1]===pe)break;h=h+1;}while(h0);return (n-Q)%2===1}function T(Q){const n=Q.replace(/\s*!important/," !important").split(y);const k=/-?transition$/.test(r.token[s.count-2]);const x=[];const S=/(\s|\(|,)-?0+\.?\d+([a-z]|\)|,|\s)/g;const R=/(\s|\(|,)-?\.?\d+([a-z]|\)|,|\s)/g;let B=0;let P=0;let N=y;let U=n.length;let H=[];const G=I=>{return I};const oe=I=>{I=I.replace(/\s*/g,y);return /\/\d/.test(I)&&Q.indexOf("url(")===0?I:` ${I.charAt(0)} ${I.charAt(1)}`};const ce=I=>{if(p.noLeadZero===true){return I.replace(/^-?\D0+(\.|\d)/,ie=>ie.replace(/0+/,y))}else if(/0*\./.test(I)){return I.replace(/0*\./,"0.")}else if(/0+/.test(/\d+/.exec(I)[0])){return /^\D*0+\D*$/.test(I)?I.replace(/0+/,"0"):I.replace(/\d+/.exec(I)[0],/\d+/.exec(I)[0].replace(/^0+/,y))}return I};const X=I=>I.replace(",",", ");const fe=I=>`${I} `;const Oe=()=>{const I=B-1;let ie=I;if(I<1)return true;do{ie=ie-1;}while(ie>0&&n[ie]==="\\");return (I-ie)%2===1};if(B0)){x[B]=x[B].replace(/,\S/g,X);}B=B+1;}while(B{n.push(m[x]);if(ue(m[x+1])){do{x=x+1;}while(x-1&&r.token[s.count].indexOf("extend(")===0){g="pseudo";}else if(B===true&&/\d/.test(l.charAt(0))===false&&/^rgba?\(/.test(l)===false&&l.indexOf("url(")!==0&&(l.indexOf(" ")<0||l.indexOf(" ")>l.indexOf("("))&&l.charAt(l.length-1)===")"){if(d(r.token[s.count],58)){g="value";}else {l=l.replace(/,\u0020?/g,", ");g="function";}l=T(l);}else if(s.count>-1&&`"'`.indexOf(r.token[s.count].charAt(0))>-1&&r.types[s.count]==="variable"){g="item";}else if(d(n[0],64)||n[0]==="$"){if(r.types[s.count]==="colon"&&h.language==="css"&&(r.types[s.count-1]==="property"||r.types[s.count-1]==="variable")){g="value";}else if(s.count>-1){g="item";R=r.token[s.count];x=R.indexOf("(");if(d(R[R.length-1],41)&&x>0){R=R.slice(x+1,R.length-1);r.token[s.count]=r.token[s.count].slice(0,x+1)+T(R)+")";}}l=T(l);}else {g="item";}t(y);}function j(Q){let n=s.count;let k=0;let x=y;const S=[];const R=()=>{if(s.count<0)return;if(n>0&&(r.types[n]==="comment"||r.types[n]==="ignore")){do{n=n-1;S.push(r.token[n]);}while(n>0&&r.lexer[n]==="style"&&(r.types[n]==="comment"||r.types[n]==="ignore"))}k=n-1;if(k>0&&(r.types[k]==="comment"||r.types[k]==="ignore")){do{k=k-1;}while(k>0&&r.lexer[n]==="style"&&(r.types[k]==="comment"||r.types[k]==="ignore"))}if(k<0)k=0;if(n<0)n=0;x=r.token[n].charAt(0);};function B(P){let N=P;const U=r.begin[N];r.token[P]=r.token[P].replace(/\s*&/," &").replace(/(\s*>\s*)/g," > ").replace(/(\s*\+\s*)/g," + ").replace(/:\s+/g,": ").replace(/^(\s+)/,y).replace(/(\s+)$/,y).replace(/\s+::\s+/,"::");if(d(r.token[N-1],44)||d(r.token[N-1],58)||r.types[N-1]==="comment"||r.types[N-1]==="pseudo"){if(r.types[N-1]==="pseudo"){r.token[N-1]=`${r.token[N-1]}${r.token[N]}`;r.types[N-1]="selector";s.splice({data:r,howmany:1,index:N});}else {do{N=N-1;if(r.begin[N]===U){if(d(r.token[N],59)||r.types[N].indexOf("template")>-1)break;if(J(r.token[N],44)&&r.types[N]!=="comment"){r.types[N]="selector";}if(d(r.token[N],58)){if(J(r.token[N-1],58)&&r.stack[n]==="global"&&(r.types[N-1]==="comment"||r.types[N-1]==="ignore"||r.types[N-1].indexOf("template")>-1)){r.token[N]=`${r.token[N]}${r.token[N+1]}`;s.pop(r);}else if(s.count===1){r.token[N]=`${r.token[N]}${r.token[N+1]}`;s.pop(r);}else if(r.types[N]==="selector"&&r.types[N+1]==="item"){r.token[N]=`${r.token[N]}${r.token[N+1]}`;s.pop(r);}else {r.token[N]=`${r.token[N-1]}:${r.token[N+1]}`;r.lines[N]=r.lines[N-1];s.splice({data:r,howmany:2,index:N});}}}else {break}}while(N>0)}}N=s.count;if(p.sortSelectors===true&&d(r.token[N-1],44)){const H=[r.token[N]];do{N=N-1;if(r.types[N]==="comment"||r.types[N]==="ignore"){do{N=N-1;}while(N>0&&(r.types[N]==="comment"||r.types[N]==="ignore"))}if(d(r.token[N],44))N=N-1;H.push(r.token[N]);}while(N>0&&(d(r.token[N-1],44)||r.types[N-1]==="selector"||r.types[N-1]==="comment"||r.types[N-1]==="ignore"));H.sort();N=s.count;r.token[N]=H.pop();do{N=N-1;if(r.types[N]==="comment"||r.types[N]==="ignore"){do{N=N-1;}while(N>0&&(r.types[N]==="comment"||r.types[N]==="ignore"))}if(d(r.token[N],44))N=N-1;r.token[N]=H.pop();}while(N>0&&(d(r.token[N-1],44)||r.token[N-1]==="selector"||r.types[N-1]==="comment"||r.types[N-1]==="ignore"))}n=s.count;R();}R();if(Q==="start"&&(r.types[n]==="value"||r.types[n]==="variable")){r.types[n]="item";}if(r.lexer[s.count-1]!=="style"||k<0){if(Q==="colon"){if(x==="$"||d(x,64)){r.types[n]="variable";}else {if(r.stack[n]!=="global"&&(r.types[n]!=="comment"||r.types[n]!=="ignore")){r.types[n]="property";}}}else if(r.lexer[n]==="style"){r.types[n]="selector";B(n);}}else if(Q==="start"&&r.types[n]==="function"&&r.lexer[n]==="style"){r.types[n]="selector";B(n);}else if(r.types[n]==="item"&&r.lexer[n]==="style"){if(Q==="start"){B(n);r.types[n]="selector";if(d(r.token[n],58))r.types[k]="selector";if(r.token[n].indexOf("=\u201C")>0){s.error=`Invalid Quote (\u201C, \\201c) used on line number ${s.lineNumber}`;}else if(r.token[n].indexOf("=\u201D")>0){s.error=`Invalid Quote (\u201D, \\201d) used on line number ${s.lineNumber}`;}}else if(Q==="end"){if(x==="$"||d(x,64)){r.types[n]="variable";}else {r.types[n]="value";}r.token[n]=T(r.token[n]);}else if(Q==="separator"){if(r.types[k]==="colon"||d(r.token[k],44)||d(r.token[k],123)){if(J(m[u],59)&&(r.types[k]==="selector"||d(r.token[k],123))){r.types[n]="selector";B(n);}else if(r.token[n].charAt(0)==="$"||d(r.token[n],64)){r.types[n]="variable";}else {r.types[n]="value";}r.token[n]=T(r.token[n]);if(r.token[n].charAt(0)==="\u201C"){s.error=`Invalid Quote (\u201C, \\201c) used on line number ${s.lineNumber}`;}else if(r.token[n].charAt(0)==="\u201D"){s.error=`Invalid (\u201D, \\201d) used on line number ${s.lineNumber}`;}}else {if(x==="$"||d(x,64)){r.types[n]="variable";}else if(r.types[k]==="value"||r.types[k]==="variable"){r.token[k]=r.token[k]+r.token[n];s.pop(r);}else {r.types[n]="value";}}}else if(Q==="colon"){if(x==="$"||d(x,64)){r.types[n]="variable";}else {r.types[n]="property";}}else if(d(r.token[k],64)&&(r.types[k-2]!=="variable"&&r.types[k-2]!=="property"||r.types[k-1]==="separator")){r.types[k]="variable";g="variable";r.token[k]=T(r.token[k]);}}}function C(){let Q=s.count;do{Q=Q-1;}while(Q>0&&r.types[Q]==="comment");if(r.token[Q]===";")return;s.splice({data:r,howmany:0,index:Q+1,record:{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"style",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:";",types:"separator"}});}function b(Q,n){const k=[];let x=y;let S=y;let R=0;let B=Q.length;const P=N=>{const U=r.types[s.count-1];if(g==="item"){if(U==="colon"){r.types[s.count]="value";}else {j(U);}}g=N;if(g.indexOf("start")>-1||g.indexOf("else")>-1){t(l);}else {t(y);}};v[v.length-1]=true;if(u0){S=S.slice(0,S.indexOf("("));}if(S==="else"||S==="elseif"||S==="when"||S==="elsif"){P("template_else");return}U=N.length-1;if(U>-1){do{if(S===N[U]){P("template_start");return}if(S==="end"+N[U]){P("template_end");return}U=U-1;}while(U>-1)}}else if(Q==="{{"){let N=x.slice(2);const U=N.length;let H=0;do{H=H+1;}while(H-1)n.data[P[4]]=true;if(U>3){if(n.data[P][0]===y)n.data[P][0]=N[0];if(n.data[P][1]===y)n.data[P][1]=N[1];if(n.data[P][2]===y)n.data[P][2]=N[2];if(n.data[P][3]===y)n.data[P][3]=N[3];}else if(U>2){if(n.data[P][0]===y)n.data[P][0]=N[0];if(n.data[P][1]===y)n.data[P][1]=N[1];if(n.data[P][2]===y)n.data[P][2]=N[2];if(n.data[P][3]===y)n.data[P][3]=N[1];}else if(U>1){if(n.data[P][0]===y)n.data[P][0]=N[0];if(n.data[P][1]===y)n.data[P][1]=N[1];if(n.data[P][2]===y)n.data[P][2]=N[0];if(n.data[P][3]===y)n.data[P][3]=N[1];}else {if(n.data[P][0]===y)n.data[P][0]=N[0];if(n.data[P][1]===y)n.data[P][1]=N[0];if(n.data[P][2]===y)n.data[P][2]=N[0];if(n.data[P][3]===y)n.data[P][3]=N[0];}}else if(r.token[R-2]===`${P}-bottom`){if(n.data[P][2]===y)n.data[P][2]=r.token[R];}else if(r.token[R-2]===`${P}-left`){if(n.data[P][3]===y)n.data[P][3]=r.token[R];}else if(r.token[R-2]===`${P}-right`){if(n.data[P][1]===y)n.data[P][1]=r.token[R];}else if(r.token[R-2]===`${P}-top`){if(n.data[P][0]===y)n.data[P][0]=r.token[R];}else {return}n.removes.push([R,P]);n.last[P]=R;}function S(){let P=0;let N=y;const U=/^(0+([a-z]+|%))/;const H=n.removes.length;const G=n.data.margin[0]!==y&&n.data.margin[1]!==y&&n.data.margin[2]!==y&&n.data.margin[3]!==y;const oe=n.data.padding[0]!==y&&n.data.padding[1]!==y&&n.data.padding[2]!==y&&n.data.padding[3]!==y;function ce(X){if(U.test(n.data[X][0])===true)n.data[X][0]="0";if(U.test(n.data[X][1])===true)n.data[X][1]="0";if(U.test(n.data[X][2])===true)n.data[X][2]="0";if(U.test(n.data[X][3])===true)n.data[X][3]="0";if(n.data[X][0]===n.data[X][1]&&n.data[X][0]===n.data[X][2]&&n.data[X][0]===n.data[X][3]){N=n.data[X][0];}else if(n.data[X][0]===n.data[X][2]&&n.data[X][1]===n.data[X][3]&&n.data[X][0]!==n.data[X][1]){N=`${n.data[X][0]} ${n.data[X][1]}`;}else if(n.data[X][1]===n.data[X][3]&&n.data[X][0]!==n.data[X][2]){N=`${n.data[X][0]} ${n.data[X][1]} ${n.data[X][2]}`;}else {N=`${n.data[X][0]} ${n.data[X][1]} ${n.data[X][2]} ${n.data[X][3]}`;}if(n.data[X[4]]===true)N=`${N.replace(" !important",y)} !important`;if(n.last[X]>s.count){P=k<1?1:k+1;do{if(r.begin[P]===k&&r.types[P]==="value"&&r.token[P-2].indexOf(X)===0){n.last[X]=P;break}P=P+1;}while(P1&&(G===true||oe===true)){do{if(n.removes[P][0]!==n.last.margin&&n.removes[P][0]!==n.last.padding&&(G===true&&n.removes[P][1]==="margin"||oe===true&&n.removes[P][1]==="padding")){s.splice({data:r,howmany:r.types[n.removes[P][0]+1]==="separator"?4:3,index:n.removes[P][0]-2});}P=P+1;}while(Pk);S();s.linesSpace=Q;}do{if(ue(m[u])){u=s.spacer({array:m,end:e,index:u});}else if(d(m[u],47)&&d(m[u+1],42)){E(false);}else if(d(m[u],47)&&d(m[u+1],47)){E(true);}else if(d(m[u],123)&&d(m[u+1],37)){b("{%","%}");}else if(d(m[u],123)&&d(m[u+1],123)){b("{{","}}");}else if(d(m[u],123)||d(m[u],40)&&d(r.token[s.count],58)&&r.types[s.count-1]==="variable"){j("start");g="start";l=m[u];if(d(m[u],40)){t("map");_.push(0);}else if(r.types[s.count]==="selector"||r.types[s.count]==="variable"){t(r.token[s.count]);}else if(r.types[s.count]==="colon"){t(r.token[s.count-1]);}else {t("block");}v.push(false);}else if(d(m[u],125)||m[u]===")"&&s.structure[s.structure.length-1][0]==="map"&&_[_.length-1]===0){if(d(m[u],125)&&d(r.token[s.count-1],123)&&r.types[s.count]==="item"&&r.token[s.count-2]!==void 0&&r.token[s.count-2].charAt(r.token[s.count-2].length-1)==="@"){r.token[s.count-2]=r.token[s.count-2]+"{"+r.token[s.count]+"}";s.pop(r);s.pop(r);s.structure.pop();}else {if(d(m[u],41))_.pop();j("end");if(d(m[u],125)&&J(r.token[s.count],59)){if(r.types[s.count]==="value"||r.types[s.count]==="function"||r.types[s.count]==="variable"&&(d(r.token[s.count-1],58)||d(r.token[s.count-1],59))){if(p.correct===true){l=";";}else {l="x;";}g="separator";t(y);}else if(r.types[s.count]==="comment"){C();}}v.pop();l=m[u];g="end";if(d(m[u],125))Y();if(p.sortProperties===true&&d(m[u],125))s.objectSort(r);t(y);}}else if(d(m[u],59)||d(m[u],44)){if(r.types[s.count-1]==="selector"||r.types[s.count]!=="function"&&d(r.token[s.count-1],125)){j("start");}else {j("separator");}if(r.types[s.count]!=="separator"&&O(u)===true){l=m[u];g="separator";t(y);}}else if(d(m[u],58)&&r.types[s.count]!=="end"){if(d(m[u+1],58)){u=u+1;j("pseudo");l="::";g="pseudo";t(y);}else {j("colon");l=":";g="colon";t(y);}}else {if(s.structure[s.structure.length-1][0]==="map"&&d(m[u],40)){_[_.length-1]=_[_.length-1]+1;}i();}u=u+1;}while(u-1&&w.types.indexOf("template_string")<0){return}if(d(A,59)&&c===false)return;if(i.lexer[s.count-1]!=="script"&&(r0&&i.token[o]!==")"&&i.stack[o]!=="arguments");o=i.begin[o];}else {o=i.begin[w.begin-1];}if(d(i.token[o],40)){o=o-1;if(i.token[o-1]==="function")o=o-1;if(i.stack[o-1]==="object"||i.stack[o-1]==="switch")return;if(i.token[o-1]!=="="&&i.token[o-1]!=="return"&&i.token[o-1]!==":"){return}}else {return}}if(w.types==="comment"||L==="method"||L==="paren"||L==="expression"||L==="array"||L==="object"||L==="switch"&&w.stack!=="method"&&i.token[i.begin[s.count]]==="("&&i.token[i.begin[s.count]-1]!=="return"&&i.types[i.begin[s.count]-1]!=="operator"){return}if(i.stack[s.count]==="expression"&&(i.token[i.begin[s.count]-1]!=="while"||i.token[i.begin[s.count]-1]==="while"&&i.stack[i.begin[s.count]-2]!=="do")){return}if(A!==""&&"=<>+*?|^:&%~,.()]".indexOf(A)>-1&&c===false)return;if(w.types==="comment"){o=s.count;do{o=o-1;}while(o>0&&i.types[o]==="comment");if(o<1)return;w.token=i.token[o];w.types=i.types[o];w.stack=i.stack[o];}if(w.token===void 0||w.types==="start"||w.types==="separator"||w.types==="operator"&&w.token!=="++"&&w.token!=="--"||w.token==="x}"||w.token==="var"||w.token==="let"||w.token==="const"||w.token==="else"||w.token.indexOf("#!/")===0||w.token==="instanceof"){return}if(w.stack==="method"&&(i.token[w.begin-1]==="function"||i.token[w.begin-2]==="function")){return}if(h.script.variableList==="list")S.index[S.len]=s.count;m=h.script.correct===true?";":"x;";e="separator";o=s.linesSpace;s.linesSpace=0;ee("");s.linesSpace=o;U();}function B(){let c=s.count;do{c=c-1;}while(c>-1&&i.token[c]==="x}");if(i.stack[c]==="else")return ee("");c=c+1;s.splice({data:i,howmany:0,index:c,record:{begin:i.begin[c],ender:-1,lexer:"script",lines:s.linesSpace,stack:i.stack[c],token:m,types:e}});ee("");}function P(){let c=s.count;if(i.types[c]==="comment"){do{c=c-1;}while(c>0&&i.types[c]==="comment")}if(i.token[c]==="from")c=c-2;if(i.token[c]==="x;"){s.splice({data:i,howmany:1,index:c});}}function N(){R(false);if(u>-1)$();T=s.wrapCommentBlock({chars:b,end:C,lexer:"script",opening:"/*",start:r,terminator:"*/"});r=T[1];if(i.token[s.count]==="var"||i.token[s.count]==="let"||i.token[s.count]==="const"){t=s.pop(i);ee("");s.push(i,t,"");if(i.lines[s.count-2]===0)i.lines[s.count-2]=i.lines[s.count];i.lines[s.count]=0;}else if(T[0]!==""){m=T[0];e=/^\/\*\s*@prettify-ignore-start/.test(m)?"ignore":"comment";if(m.indexOf("# sourceMappingURL=")===2){n[0]=s.count+1;n[1]=m;}s.push(i,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"script",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:m,types:e},"");}if(/\/\*\s*global\s+/.test(i.token[s.count])===true&&i.types.indexOf("word")<0){j[0]=i.token[s.count].replace(/\/\*\s*global\s+/,"").replace("*/","").replace(/,\s+/g,",").split(",");}}function U(){let c="";const o=fe(5,false);const A=s.count;const L=s.linesSpace;if(h.language==="json"||Y.length<1||Y[Y.length-1].charAt(0)!=="x"||/^x?(;|\}|\))$/.test(m)===false){return}if(i.stack[s.count]==="do"&&o==="while"&&i.token[s.count]==="}"){return}if(m===";"&&i.token[A-1]==="x{"){c=i.token[i.begin[A-2]-1];if(i.token[A-2]==="do"||i.token[A-2]===")"&&"ifforwhilecatch".indexOf(c)>-1){t=s.pop(i);m=h.script.correct===true?"}":"x}";e="end";O=s.structure[s.structure.length-1];ee("");Y.pop();s.linesSpace=L;return}t=s.pop(i);m=h.script.correct===true?"}":"x}";e="end";O=s.structure[s.structure.length-1];ee("");Y.pop();m=";";e="end";s.push(i,t,"");s.linesSpace=L;return}m=h.script.correct===true?"}":"x}";e="end";if(i.token[s.count]==="x}")return;if(i.stack[s.count]==="if"&&(i.token[s.count]===";"||i.token[s.count]==="x;")&&o==="else"){O=s.structure[s.structure.length-1];ee("");Y.pop();s.linesSpace=L;return}do{O=s.structure[s.structure.length-1];ee("");Y.pop();if(i.stack[s.count]==="do")break}while(Y[Y.length-1]==="x{");s.linesSpace=L;}function H(){let c=s.count;if(i.stack[c]==="object"&&h.script.objectSort===true){m=",";e="separator";P();ee("");}else {do{c=c-1;}while(c>0&&i.types[c-1]==="comment");s.splice({data:i,howmany:0,index:c,record:{begin:i.begin[c],ender:-1,lexer:"script",lines:s.linesSpace,stack:i.stack[c],token:",",types:"separator"}});ee("");}}function G(c){let o=false;let A=false;const L=fe(1,false);const w=i.token[s.count]==="("?s.count:i.begin[s.count];function z(){let q=0;const W=i.token[w-1]==="Array";const se=W===true?"[":"{";const F=W===true?"]":"}";const K=W===true?"array":"object";if(W===true&&i.types[s.count]==="number"){q=Number(i.token[s.count]);t=s.pop(i);}t=s.pop(i);t=s.pop(i);t=s.pop(i);s.structure.pop();m=se;e="start";ee(K);if(q>0){m=",";e="separator";do{ee("");q=q-1;}while(q>0)}m=F;e="end";ee("");}if(u>-1)$();if(Q.length>0){if(Q[Q.length-1]===0){Q.pop();}else {Q[Q.length-1]=Q[Q.length-1]-1;}}if(d(c,41)||c==="x)"||d(c,93)){if(h.script.correct===true)ie();P();}if(d(c,41)||c==="x)")R(false);if(S.len>-1){if(d(c,125)&&(h.script.variableList==="list"&&S.count[S.len]===0||i.token[s.count]==="x;"&&h.script.variableList==="each")){D();}S.count[S.len]=S.count[S.len]-1;if(S.count[S.len]<0)D();}if(d(m,44)&&i.stack[s.count]!=="initializer"&&(d(c,93)&&d(i.token[s.count-1],91)||d(c,125))){t=s.pop(i);}if(d(c,41)||c==="x)"){m=c;if(E.length>0){_=E[E.length-1];if(_.length>1&&J(L,123)&&(_[0]==="if"||_[0]==="for"||_[0]==="with"||_[0]==="while"&&i.stack[_[1]-2]!==void 0&&i.stack[_[1]-2]!=="do")){o=true;}}}else if(d(c,93)){m="]";}else if(d(c,125)){if(J(m,44)&&h.script.correct===true)ie();if(s.structure.length>0&&s.structure[s.structure.length-1][0]!=="object")R(true);if((h.script.objectSort===true||h.language==="json"&&h.json.objectSort===true)&&s.structure[s.structure.length-1][0]==="object"){s.objectSort(i);}if(e==="comment"){m=i.token[s.count];e=i.types[s.count];}m="}";}if(s.structure[s.structure.length-1][0]==="data_type"){e="type_end";}else {e="end";}E.pop();O=s.structure[s.structure.length-1];if(d(c,41)&&h.script.correct===true&&w-s.count<2&&(d(i.token[s.count],40)||i.types[s.count]==="number")&&(i.token[w-1]==="Array"||i.token[w-1]==="Object")&&i.token[w-2]==="new"){z();A=true;}if(Y[Y.length-1]==="x{"&&d(c,125)){U();Y.pop();if(i.stack[s.count]!=="try"){if(J(L,58)&&J(L,59)&&i.token[i.begin[r]-1]!=="?")U();}m="}";}else {Y.pop();}if(h.script.endComma!==void 0&&h.script.endComma!=="none"&&s.structure[s.structure.length-1][0]==="array"||s.structure[s.structure.length-1][0]==="object"||s.structure[s.structure.length-1][0]==="data_type"){if(h.script.endComma==="always"&&i.token[s.count]!==","){const q=s.structure[s.structure.length-1][1];let W=s.count;do{if(i.begin[W]===q){if(d(i.token[W],44))break}else {W=i.begin[W];}W=W-1;}while(W>q);if(W>q){const se=e;const F=m;m=",";e="separator";ee("");m=F;e=se;}}else if(h.script.endComma==="never"&&d(i.token[s.count],44)){s.pop(i);}}if(A===false){ee("");if(m==="}"&&i.stack[s.count]!=="object"&&i.stack[s.count]!=="class"&&i.stack[s.count]!=="data_type"){j.pop();U();}}if(o===true){m=h.script.correct===true?"{":"x{";e="start";ee(_[0]);Y.push("x{");_[1]=s.count;}k.pop();if(s.structure[s.structure.length-1][0]!=="data_type")k[k.length-1]=false;}function oe(c,o,A){let L=0;let w=false;let z=false;let q=[c];let W;const se=o.split(y);const F=se.length;const K=r;const V=r+c.length;const ne=h.script.quoteConvert===void 0?"none":h.script.quoteConvert;function he(){let ae=0;q=[];e=A;L=r;if(A==="string"&&/\s/.test(b[L+1])===true){ae=1;do{L=L+1;if(b[L]==="\n")ae=ae+1;}while(Lge.replace(/\s*$/," ");const Ae=ge=>ge.replace(/^\s*/," ");if(/\{(#|\/|(%>)|(%\]))/.test(te)||/\}%(>|\])/.test(te))return te;te=te.replace(/\{((\{+)|%-?)\s*/g,be);te=te.replace(/\s*((\}\}+)|(-?%\}))/g,Ae);return te}return te}if(d(c,34)&&ne==="single"){q[0]="'";q[q.length-1]="'";}else if(d(c,39)&&ne==="double"){q[0]='"';q[q.length-1]='"';}else if(w===true){ae=q[q.length-1];q.pop();q.pop();q.push(ae);}r=L;if(o==="\n"){r=r-1;q.pop();}m=q.join(y);if(d(c,34)||d(c,39)||c==="{{"||c==="{%"){m=je(m);}if(c==="{%"||c==="{{"){W=Z(m);e=W[0];ee(W[1]);return}if(A==="string"){e="string";if(h.language==="json"){m=m.replace(/\u0000/g,"\\u0000").replace(/\u0001/g,"\\u0001").replace(/\u0002/g,"\\u0002").replace(/\u0003/g,"\\u0003").replace(/\u0004/g,"\\u0004").replace(/\u0005/g,"\\u0005").replace(/\u0006/g,"\\u0006").replace(/\u0007/g,"\\u0007").replace(/\u0008/g,"\\u0008").replace(/\u0009/g,"\\u0009").replace(/\u000a/g,"\\u000a").replace(/\u000b/g,"\\u000b").replace(/\u000c/g,"\\u000c").replace(/\u000d/g,"\\u000d").replace(/\u000e/g,"\\u000e").replace(/\u000f/g,"\\u000f").replace(/\u0010/g,"\\u0010").replace(/\u0011/g,"\\u0011").replace(/\u0012/g,"\\u0012").replace(/\u0013/g,"\\u0013").replace(/\u0014/g,"\\u0014").replace(/\u0015/g,"\\u0015").replace(/\u0016/g,"\\u0016").replace(/\u0017/g,"\\u0017").replace(/\u0018/g,"\\u0018").replace(/\u0019/g,"\\u0019").replace(/\u001a/g,"\\u001a").replace(/\u001b/g,"\\u001b").replace(/\u001c/g,"\\u001c").replace(/\u001d/g,"\\u001d").replace(/\u001e/g,"\\u001e").replace(/\u001f/g,"\\u001f");}else if(c.indexOf("#!")===0){m=m.slice(0,m.length-1);s.linesSpace=2;}else if(s.structure[s.structure.length-1][0]!=="object"||s.structure[s.structure.length-1][0]==="object"&&fe(1,false)!==":"&&J(i.token[s.count],44)&&J(i.token[s.count],123)){if(m.length>h.wrap&&h.wrap>0||h.wrap!==0&&i.token[s.count]==="+"&&(i.token[s.count-1].charAt(0)==='"'||i.token[s.count-1].charAt(0)==="'")){let te=m;let be="";let Ae=ne==="double"?'"':ne==="single"?"'":te.charAt(0);const ge=h.wrap;const Be=/u[0-9a-fA-F]{4}/;const Ge=/x[0-9a-fA-F]{2}/;te=te.slice(1,te.length-1);if(i.token[s.count]==="+"&&(i.token[s.count-1].charAt(0)==='"'||i.token[s.count-1].charAt(0)==="'")){s.pop(i);Ae=i.token[s.count].charAt(0);te=i.token[s.count].slice(1,i.token[s.count].length-1)+te;s.pop(i);}if(te.length>ge&&ge>0){do{be=te.slice(0,ge);if(be.charAt(ge-5)==="\\"&&Be.test(te.slice(ge-4,ge+1))){be=be.slice(0,ge-5);}else if(be.charAt(ge-4)==="\\"&&Be.test(te.slice(ge-3,ge+2))){be=be.slice(0,ge-4);}else if(be.charAt(ge-3)==="\\"&&(Be.test(te.slice(ge-2,ge+3))||Ge.test(te.slice(ge-2,ge+1)))){be=be.slice(0,ge-3);}else if(be.charAt(ge-2)==="\\"&&(Be.test(te.slice(ge-1,ge+4))||Ge.test(te.slice(ge-1,ge+2)))){be=be.slice(0,ge-2);}else if(be.charAt(ge-1)==="\\"){be=be.slice(0,ge-1);}be=Ae+be+Ae;te=te.slice(be.length-2);m=be;e="string";ee(y);s.linesSpace=0;m="+";e="operator";ee(y);}while(te.length>ge)}if(te===y){m=Ae+Ae;}else {m=Ae+te+Ae;}e="string";}}}else if(/\{\s*\?>$/.test(m)){e="template_start";}else {e=A;}if(m.length>0)ee(y);}if(u>-1)$();if(b[r-1]==="\\"&&xe(r-1)===true&&(d(b[r],34)||d(b[r],39))){s.pop(i);if(d(i.token[0],123)){if(d(b[r],34)){c='"';o='\\"';q=['"'];}else {c="'";o="\\'";q=["'"];}w=true;}else {if(d(b[r],34)){q=['\\"'];re();return}q=["\\'"];re();return}}L=V;if(LK){z=true;if(d(b[L],123)&&d(b[L+1],37)&&b[L+2]!==c){re();oe("{%","%}","template");he();}else if(d(b[L],123)&&d(b[L+1],123)&&b[L+2]!==c){re();oe("{{","}}","template");he();}else {z=false;q.push(b[L]);}}else {q.push(b[L]);}if(h.language!=="json"&&h.language!=="javascript"&&(d(c,34)||d(c,39))&&(z===true||L>K)&&b[L-1]!=="\\"&&J(b[L],34)&&J(b[L],39)&&(d(b[L],10)||L===C-1===true)){s.error="Unterminated string in script on line number "+s.lineNumber;break}if(b[L]===se[F-1]&&(b[L-1]!=="\\"||xe(L-1)===false)){if(F===1)break;if(q[L-V]===se[0]&&q.slice(L-V-F+2).join("")===o)break}L=L+1;}while(L-1)$();T=s.wrapCommentLine({chars:b,end:C,lexer:"script",opening:"//",start:r,terminator:"\n"});r=T[1];if(T[0]!==""){m=T[0];e=/^(\/\/\s*@prettify-ignore-start)/.test(m)?"ignore":"comment";if(m.indexOf("# sourceMappingURL=")===2){n[0]=s.count+1;n[1]=m;}s.push(i,{begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"script",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:m,types:e},"");}}function X(){let c=0;let o=false;let A=false;let L=0;let w=0;let z=0;let q="";let W="";let se="";const F=[];const K=k[k.length-1];const V="0123456789=<>+-*?|^:&.,;%(){}[]~";function ne(){if(m==="(")s.structure[s.structure.length-1]=["paren",s.count];M.lexers.markup(F.join(""));}if(u>-1)$();W=s.count>0?i.token[s.count-1]:"";se=s.count>0?i.types[s.count-1]:"";q=fe(1,false);if(h.language!=="jsx"&&h.language!=="tsx"&&/\d/.test(q)===false&&(m==="function"||W==="=>"||W==="void"||W==="."||i.stack[s.count]==="arguments"||e==="type"&&W==="type"||e==="reference"&&(se==="operator"||W==="function"||W==="class"||W==="new")||e==="type"&&se==="operator"||m==="return"||e==="operator")){const he=[];let re=0;let ae=0;c=r;do{he.push(b[c]);if(b[c]==="<"){re=re+1;}else if(b[c]===">"){re=re-1;if(re<1)break}c=c+1;}while(c"&&(K===true||W==="=>"||W==="."||se!=="operator"||se==="operator"&&(q==="("||q==="="))){e="generic";m=he.join("").replace(/^<\s+/,"<").replace(/\s+>$/,">").replace(/,\s*/g,", ");ee("");return}r=ae;}c=s.count;if(i.types[c]==="comment"){do{c=c-1;}while(c>0&&i.types[c]==="comment")}if(K===false&&fe(1,false)!==">"&&(b[r]!=="<"&&V.indexOf(b[r+1])>-1||i.token[c]==="++"||i.token[c]==="--"||/\s/.test(b[r+1])===true||/\d/.test(b[r+1])===true&&(e==="operator"||e==="string"||e==="number"||e==="reference"||e==="word"&&m!=="return"))){e="operator";m=I();return ee("")}if(h.language!=="typescript"&&(i.token[c]==="return"||i.types[c]==="operator"||i.types[c]==="start"||i.types[c]==="separator"||i.types[c]==="jsx_attribute_start"||i.token[c]==="}"&&s.structure[s.structure.length-1][0]==="global")){e="markup";h.language="jsx";do{F.push(b[r]);if(b[r]==="{"){w=w+1;o=true;}else if(b[r]==="}"){w=w-1;if(w===0)o=false;}else if(b[r]==="<"&&o===false){if(b[r+1]==="<"){do{F.push(b[r]);r=r+1;}while(r"&&o===false){if(b[r+1]===">"){do{F.push(b[r]);r=r+1;}while(b[r+1]===">")}L=L-1;if(A===true){z=z-1;}else if(b[r-1]!=="/"){z=z+1;}if(L===0&&w===0&&z<1){q=fe(2,false);if(q.charAt(0)!=="<")return ne();if(q.charAt(0)==="<"&&V.indexOf(q.charAt(1))<0&&/\s/.test(q.charAt(1))===false){c=r+1;do{c=c+1;if(b[c]===">"||/\s/.test(b[c-1])&&V.indexOf(b[c])<0)break;if(V.indexOf(b[c])>-1)return ne()}while(c","+","*","?","|","^",":","&","%","~"];const z=w.length;if(u>-1)$();if(b[r]==="/"&&(s.count>-1&&(e!=="word"&&e!=="reference"||m==="typeof"||m==="return"||m==="else")&&e!=="number"&&e!=="string"&&e!=="end")){if(m==="return"||m==="typeof"||m==="else"||e!=="word"){m=Ne();e="regex";}else {m="/";e="operator";}ee("");return "regex"}if(b[r]==="?"&&("+-*/.?".indexOf(b[r+1])>-1||b[r+1]===":"&&w.join("").indexOf(b[r+2])<0)){if(b[r+1]==="."&&/\d/.test(b[r+2])===false){L="?.";}else if(b[r+1]==="?"){L="??";}if(L==="")return "?"}if(b[r]===":"&&"+-*/".indexOf(b[r+1])>-1)return ":";if(r"){L="->";}if(L==="")return "-"}if(b[r]==="+"){k[k.length-1]=false;if(b[r+1]==="+"){L="++";}else if(b[r+1]==="="){L="+=";}if(L==="")return "+"}if(b[r]==="="&&b[r+1]!=="="&&b[r+1]!=="!"&&b[r+1]!==">"){k[k.length-1]=false;return "="}}if(b[r]===":"){if(h.language==="typescript"){if(i.stack[s.count]==="arguments"){if(i.token[s.count]==="?"){s.pop(i);L="?:";r=r-1;}k[k.length-1]=true;}else if(m===")"&&(i.token[i.begin[s.count]-1]==="function"||i.token[i.begin[s.count]-2]==="function")){k[k.length-1]=true;}else if(e==="reference"){c=s.count;let q=false;do{if(i.begin[c]===i.begin[s.count]){if(ci.begin[s.count])}}else if(i.token[s.count-1]==="["&&(i.types[s.count]==="word"||i.types[s.count]==="reference")){s.structure[s.structure.length-1][0]="attribute";i.stack[s.count]="attribute";}}if(L===""){if(b[r+1]==="+"&&b[r+2]==="+"||b[r+1]==="-"&&b[r+2]==="-"){L=b[r];}else {const q=[b[r]];c=r+1;if(c"&&m===")"){c=s.count;A=i.begin[c];do{if(i.begin[c]===A)i.stack[c]="method";c=c-1;}while(c>A-1)}return L}function ie(){let c=true;let o="+";let A="";let L="";let w="";let z=0;let q=0;let W=0;let se="";const F=[];function K(){W=i.begin[W]-1;if(i.types[W]==="end"){K();}else if(i.token[W-1]==="."){V();}}function V(){W=W-2;if(i.types[W]==="end"){K();}else if(i.token[W-1]==="."){V();}}function ne(){let re=0;const ae=F.length;if(re-1)return;z=W;if(z0)}}while(z>0&&(i.token[z]==="."||i.types[z]==="word"||i.types[z]==="reference"||i.types[z]==="end"));if(i.token[z]===","&&b[r]!==";"&&se!==";"&&b[r]!=="}"&&se!=="}"&&b[r]!==")"&&se!==")"){return}if(i.types[z]==="operator"){if(i.stack[z]==="switch"&&i.token[z]===":"){do{z=z-1;if(i.types[z]==="start"){q=q-1;if(q<0)break}else if(i.types[z]==="end"){q=q+1;}if(i.token[z]==="?"&&q===0)return}while(z>0)}else {return}}c=false;o=A==="--"?"-":"+";}else if(w==="["||w===";"||w==="x;"||w==="}"||w==="{"||w==="("||w===")"||w===","||w==="return"){if(A==="++"||A==="--"){if(w==="["||w==="("||w===","||w==="return")return;if(A==="--")o="-";c=false;}else if(L==="--"||A==="--"){o="-";}}else {return}if(c===false)t=s.pop(i);W=s.count;if(i.types[W]==="end"){K();}else if(i.token[W-1]==="."){V();}z=W;if(z0){do{if(b[o]==="\\"){A=A+1;}else {break}o=o-1;}while(o>0)}if(A%2===0){break}}else {break}}c=c+1;}while(c0);return (o-c)%2===1}function We(c){let o=s.count;let A="";let L="";let w="";let z=false;Y.push(c);if(c==="{"&&(i.types[s.count]==="type"||i.types[s.count]==="type_end"||i.types[s.count]==="generic")){let q=0;if(i.types[s.count]==="type_end")o=i.begin[s.count];q=o;do{o=o-1;if(i.begin[o]!==q&&i.begin[o]!==-1)break;if(i.token[o]===":")break}while(o>i.begin[o]);if(i.token[o]===":"&&i.stack[o-1]==="arguments"){k.push(false);z=true;}else {k.push(k[k.length-1]);}o=s.count;}else if(c==="["&&i.types[s.count]==="type_end"){k.push(true);}else {k.push(k[k.length-1]);}if(u>-1){$();o=s.count;}if(S.len>-1)S.count[S.len]=S.count[S.len]+1;if(i.token[o-1]==="function"){E.push(["function",o+1]);}else {E.push([m,o+1]);}m=c;if(k[k.length-1]===true){e="type_start";}else {e="start";}if(c==="("||c==="x("){P();}else if(c==="{"){if(g>-1){if(i.begin[g-1]===i.begin[i.begin[o]-1]||i.token[i.begin[o]]==="x("){g=-1;if(h.script.correct===true){G(")");}else {G("x)");}P();m="{";e="start";}}else if(m===")"){P();}if(e==="comment"&&i.token[o-1]===")"){m=i.token[o];i.token[o]="{";e=i.types[o];i.types[o]="start";}}A=(()=>{let q=s.count;if(i.types[q]==="comment"){do{q=q-1;}while(q>0&&i.types[q]==="comment")}return i.token[q]})();L=i.stack[o]===void 0?"":(()=>{let q=s.count;if(i.types[q]==="comment"){do{q=q-1;}while(q>0&&i.types[q]==="comment")}return i.token[i.begin[q]-1]})();if(d(m,123)&&(i.types[o]==="word"||i.token[o]==="]")){let q=o;if(i.token[q]==="]"){do{q=i.begin[q]-1;}while(i.token[q]==="]")}do{if(i.types[q]==="start"||i.types[q]==="end"||i.types[q]==="operator")break;q=q-1;}while(q>0);if(i.token[q]===":"&&i.stack[q-1]==="arguments"){w="function";j.push(l);l=[];}}if(e==="type_start"){w="data_type";}else if(w===""&&(d(m,123)||m==="x{")){if(A==="else"||A==="do"||A==="try"||A==="finally"||A==="switch"){w=A;}else if(Q[Q.length-1]===0&&A!=="return"){Q.pop();w="class";}else if(i.token[o-1]==="class"){w="class";}else if(i.token[o]==="]"&&i.token[o-1]==="["){w="array";}else if((i.types[o]==="word"||i.types[o]==="reference")&&(i.types[o-1]==="word"||i.types[o-1]==="reference"||i.token[o-1]==="?"&&(i.types[o-2]==="word"||i.types[o-2]==="reference"))&&i.token[o]!=="in"&&i.token[o-1]!=="export"&&i.token[o-1]!=="import"){w="map";}else if(i.stack[o]==="method"&&i.types[o]==="end"&&(i.types[i.begin[o]-1]==="word"||i.types[i.begin[o]-1]==="reference")&&i.token[i.begin[o]-2]==="new"){w="initializer";}else if(d(m,123)&&(d(A,41)||A==="x)")&&(i.types[i.begin[o]-1]==="word"||i.types[i.begin[o]-1]==="reference"||i.token[i.begin[o]-1]==="]")){if(L==="if"){w="if";}else if(L==="for"){w="for";}else if(L==="while"){w="while";}else if(L==="class"){w="class";}else if(L==="switch"||i.token[i.begin[o]-1]==="switch"){w="switch";}else if(L==="catch"){w="catch";}else {w="function";}}else if(d(m,123)&&(A===";"||A==="x;")){w="block";}else if(d(m,123)&&i.token[o]===":"&&i.stack[o]==="switch"){w="block";}else if(i.token[o-1]==="import"||i.token[o-2]==="import"||i.token[o-1]==="export"||i.token[o-2]==="export"){w="object";}else if(d(A,41)&&(_[0]==="function"||_[0]==="if"||_[0]==="for"||_[0]==="class"||_[0]==="while"||_[0]==="switch"||_[0]==="catch")){w=_[0];}else if(i.stack[o]==="notation"){w="function";}else if((i.types[o]==="number"||i.types[o]==="string"||i.types[o]==="word"||i.types[o]==="reference")&&(i.types[o-1]==="word"||i.types[o-1]==="reference")&&i.token[i.begin[o]-1]!=="for"){w="function";}else if(s.structure.length>0&&i.token[o]!==":"&&s.structure[s.structure.length-1][0]==="object"&&(i.token[i.begin[o]-2]==="{"||i.token[i.begin[o]-2]===",")){w="function";}else if(i.types[_[1]-1]==="markup"&&i.token[_[1]-3]==="function"){w="function";}else if(A==="=>"){w="function";}else if(z===true||i.types[s.count]==="type_end"&&i.stack[i.begin[s.count]-2]==="arguments"){w="function";}else if(d(A,41)&&i.stack[o]==="method"&&(i.types[i.begin[o]-1]==="word"||i.types[i.begin[o]-1]==="property"||i.types[i.begin[o]-1]==="reference")){w="function";}else if(i.types[o]==="word"&&d(m,123)&&i.token[o]!=="return"&&i.token[o]!=="in"&&i.token[o]!=="import"&&i.token[o]!=="const"&&i.token[o]!=="let"&&i.token[o]!==""){w="block";}else if(d(m,123)&&"if|else|for|while|function|class|switch|catch|finally".indexOf(i.stack[o])>-1&&(i.token[o]==="x}"||i.token[o]==="}")){w="block";}else if(i.stack[o]==="arguments"){w="function";}else if(i.types[o]==="generic"){do{o=o-1;if(i.token[o]==="function"||i.stack[o]==="arguments"){w="function";break}if(i.token[o]==="interface"){w="map";break}if(i.token[o]===";"){w="object";break}}while(o>i.begin[s.count])}else {w="object";}if(w!=="object"&&w!=="class"){if(w==="function"){j.push(l);l=[];}else {j.push([]);}}}else if(m==="["){w="array";}else if(m==="("||m==="x("){if(A==="function"||i.token[o-1]==="function"||i.token[o-1]==="function*"||i.token[o-2]==="function"){w="arguments";}else if(i.token[o-1]==="."||i.token[i.begin[o]-2]==="."){w="method";}else if(i.types[o]==="generic"){w="method";}else if(i.token[o]==="}"&&i.stack[o]==="function"){w="method";}else if(A==="if"||A==="for"||A==="class"||A==="while"||A==="catch"||A==="finally"||A==="switch"||A==="with"){w="expression";}else if(i.types[o]==="word"||i.types[o]==="property"||i.types[o]==="reference"){w="method";}else {w="paren";}}ee(w);if(Q.length>0)Q[Q.length-1]=Q[Q.length-1]+1;}function ze(){const c=[b[r]];r=r+1;if(r-1){do{if(L===x[A]&&(L!=="block"||/\{%\s*\w/.test(f)===false)){return ["template_start",`template_${L}`]}if(L==="end"+x[A]){return ["template_end",""]}A=A-1;}while(A>-1)}return ["template",""]}function D(){S.count.pop();S.index.pop();S.word.pop();S.len=S.len-1;}function $(){let c=u;let o=1;let A="";let L="";let w=m;let z=e;const q=[];function W(){Y.push("x{");s.splice({data:i,howmany:1,index:s.count-3});}function se(F,K,V){const ne=i.begin[F];let he=0;do{if(i.token[F]===K&&i.types[F]==="word"){if(V===true){i.types[F]="reference";}else if(i.begin[F]>ne&&i.token[i.begin[F]]==="{"&&i.stack[F]!=="object"&&i.stack[F]!=="class"&&i.stack[F]!=="data_type"){if(i.stack[F]==="function"){i.types[F]="reference";}else {he=i.begin[F];do{if(i.stack[he]==="function"){i.types[F]="reference";break}he=i.begin[he];}while(he>ne)}}}F=F-1;}while(F>ne)}do{q.push(b[c]);if(b[c]==="\\"){s.error=`Illegal escape in JavaScript on line number ${s.lineNumber}`;}c=c+1;}while(c0&&A==="function"&&i.token[s.count]==="("&&(i.token[s.count-1]==="{"||i.token[s.count-1]==="x{")){i.types[s.count]="start";}if(s.count>1&&A==="function"&&m==="("&&(i.token[s.count-1]==="}"||i.token[s.count-1]==="x}")){if(i.token[s.count-1]==="}"){c=s.count-2;if(c>-1){do{if(i.types[c]==="end"){o=o+1;}else if(i.types[c]==="start"||i.types[c]==="end"){o=o-1;}if(o===0)break;c=c-1;}while(c>-1)}if(i.token[c]==="{"&&i.token[c-1]===")"){o=1;c=c-2;if(c>-1){do{if(i.types[c]==="end"){o=o+1;}else if(i.types[c]==="start"||i.types[c]==="end"){o=o-1;}if(o===0)break;c=c-1;}while(c>-1)}if(i.token[c-1]!=="function"&&i.token[c-2]!=="function"){i.types[s.count]="start";}}}else {i.types[s.count]="start";}}if(h.script.correct===true&&(A==="Object"||A==="Array")&&b[r+1]==="("&&b[r+2]===")"&&i.token[s.count-1]==="="&&i.token[s.count]==="new"){if(A==="Object"){i.token[s.count]="{";m="}";i.stack[s.count]="object";s.structure[s.structure.length-1][0]="object";}else {i.token[s.count]="[";m="]";i.stack[s.count]="array";s.structure[s.structure.length-1][0]="array";}i.types[s.count]="start";e="end";b[r+1]="";b[r+2]="";r=r+2;}else {o=s.count;c=o;if(h.script.variableList!=="none"&&(A==="var"||A==="let"||A==="const")){if(i.types[o]==="comment"){do{o=o-1;}while(o>0&&i.types[o]==="comment")}if(h.script.variableList==="list"&&S.len>-1&&S.index[S.len]===o&&A===S.word[S.len]){m=",";e="separator";i.token[o]=m;i.types[o]=e;S.count[S.len]=0;S.index[S.len]=o;S.word[S.len]=A;return}S.len=S.len+1;S.count.push(0);S.index.push(o);S.word.push(A);o=c;}else if(S.len>-1&&A!==S.word[S.len]&&s.count===S.index[S.len]&&i.token[S.index[S.len]]===";"&&m!==S.word[S.len]&&h.script.variableList==="list"){D();}if(A==="from"&&i.token[s.count]==="x;"&&i.token[s.count-1]==="}"){P();}if(A==="while"&&i.token[s.count]==="x;"&&i.token[s.count-1]==="}"){let F=0;let K=s.count-2;if(K>-1){do{if(i.types[K]==="end"){F=F+1;}else if(i.types[K]==="start"){F=F-1;}if(F<0){if(i.token[K]==="{"&&i.token[K-1]==="do")P();return}K=K-1;}while(K>-1)}}if(z==="comment"){let F=s.count;do{F=F-1;}while(F>0&&i.types[F]==="comment");z=i.types[F];w=i.token[F];}L=fe(2,false);if(A==="void"){if(w===":"&&i.stack[s.count-1]==="arguments"){e="type";}else {e="word";}}else if((s.structure[s.structure.length-1][0]==="object"||s.structure[s.structure.length-1][0]==="class"||s.structure[s.structure.length-1][0]==="data_type")&&(i.token[s.count]==="{"||i.token[i.begin[s.count]]==="{"&&i.token[s.count]===","||i.types[s.count]==="template_end"&&(i.token[i.begin[s.count]-1]==="{"||i.token[i.begin[s.count]-1]===","))){if(A==="return"||A==="break"){e="word";}else {e="property";}}else if(k[k.length-1]===true||(h.language==="typescript"||h.language==="flow")&&w==="type"){e="type";}else if(j.length>0&&(w==="function"||w==="class"||w==="const"||w==="let"||w==="var"||w==="new"||w==="void")){e="reference";j[j.length-1].push(A);if(h.language==="javascript"||h.language==="jsx"||h.language==="typescript"||h.language==="tsx"){if(w==="var"||w==="function"&&i.types[s.count-1]!=="operator"&&i.types[s.count-1]!=="start"&&i.types[s.count-1]!=="end"){se(s.count,A,true);}else {se(s.count,A,false);}}else {se(s.count,A,false);}}else if(s.structure[s.structure.length-1][0]==="arguments"&&e!=="operator"){e="reference";l.push(A);}else if(w===","&&i.stack[s.count]!=="method"&&(i.stack[s.count]!=="expression"||i.token[i.begin[s.count]-1]==="for")){let F=s.count;const K=s.structure[s.structure.length-1][1];do{if(i.begin[F]===K){if(i.token[F]===";")break;if(i.token[F]==="var"||i.token[F]==="let"||i.token[F]==="const"||i.token[F]==="type"){break}}else if(i.types[F]==="end"){F=i.begin[F];}F=F-1;}while(F>K);if(j.length>0&&i.token[F]==="var"){e="reference";j[j.length-1].push(A);if(h.language==="javascript"||h.language==="jsx"||h.language==="typescript"||h.language==="tsx"){se(F,A,true);}else {se(F,A,false);}}else if(j.length>0&&(i.token[F]==="let"||i.token[F]==="const"||i.token[F]==="type"&&(h.language==="typescript"||h.language==="tsx"))){e="reference";j[j.length-1].push(A);se(F,A,false);}else {e="word";}}else if(s.structure[s.structure.length-1][0]!=="object"||s.structure[s.structure.length-1][0]==="object"&&m!==","&&m!=="{"){let F=j.length;let K=0;if(F>0){do{F=F-1;K=j[F].length;if(K>0){do{K=K-1;if(A===j[F][K])break}while(K>0);if(A===j[F][K])break}}while(F>0);if(j[F][K]===A&&w!=="."){e="reference";}else {e="word";}}else {e="word";}}else {e="word";}m=A;if(A==="from"&&i.token[s.count]==="}")P();}ee("");if(A==="class")Q.push(0);if(A==="do"){L=fe(1,true);if(L!=="{"){m=h.script.correct===true?"{":"x{";e="start";Y.push("x{");ee("do");}}if(A==="else"){L=fe(2,true);let F=s.count-1;if(i.types[F]==="comment"){do{F=F-1;}while(F>0&&i.types[F]==="comment")}if(i.token[F]==="x}"){if(i.token[s.count]==="else"){if(i.stack[s.count-1]!=="if"&&i.types[s.count-1]!=="comment"&&i.stack[s.count-1]!=="else"){Y.pop();s.splice({data:i,howmany:0,index:s.count-1,record:{begin:i.begin[i.begin[i.begin[s.count-1]-1]-1],ender:-1,lexer:"script",lines:0,stack:"if",token:h.script.correct===true?"}":"x}",types:"end"}});if(s.structure.length>1){s.structure.splice(s.structure.length-2,1);s.structure[s.structure.length-1][1]=s.count;}}else if(i.token[s.count-2]==="x}"&&O[0]!=="if"&&i.stack[s.count]==="else"){W();}else if(i.token[s.count-2]==="}"&&i.stack[s.count-2]==="if"&&O[0]==="if"&&i.token[O[1]-1]!=="if"&&i.token[i.begin[s.count-1]]==="x{"){W();}}else if(i.token[s.count]==="x}"&&i.stack[s.count]==="if"){W();}}if(L!=="if"&&L.charAt(0)!=="{"){m=h.script.correct===true?"{":"x{";e="start";Y.push("x{");ee("else");}}if((A==="for"||A==="if"||A==="switch"||A==="catch")&&i.token[s.count-1]!=="."){L=fe(1,true);if(L!=="("){g=s.count;if(h.script.correct===true){We("(");}else {We("x(");}}}}do{if(/\s/.test(b[r])){if(u>-1)$();r=s.spacer({array:b,end:C,index:r});if(s.linesSpace>1&&m!==";"&&v","comment");}else if(b[r]==="<"){X();}else if(b[r]==="/"&&(r===C-1||b[r+1]==="*")){N();}else if((s.count<0||i.lines[s.count]>0)&&b[r]==="#"&&b[r+1]==="!"&&(b[r+2]==="/"||b[r+2]==="[")){oe("#!"+b[r+2],"\n","string");}else if(b[r]==="/"&&(r===C-1||b[r+1]==="/")){ce();}else if(d(b[r],96)||d(b[r],125)&&s.structure[s.structure.length-1][0]==="template_string"){if(u>-1)$();m=ze();if(d(m,125)&&m.slice(m.length-2)==="${"){e="template_string_else";ee("template_string");}else if(m.slice(m.length-2)==="${"){e="template_string_start";ee("template_string");}else if(d(m[0],125)){e="template_string_end";ee("");}else {e="string";ee("");}}else if(b[r]==='"'||b[r]==="'"){oe(b[r],b[r],"string");}else if(b[r]==="-"&&(r-1)$();m="-";e="operator";ee("");}else if(u===-1&&(b[r]!=="0"||b[r]==="0"&&b[r+1]!=="b")&&(/\d/.test(b[r])||r!==C-2&&b[r]==="-"&&b[r+1]==="."&&/\d/.test(b[r+2])||r!==C-1&&(b[r]==="-"||b[r]===".")&&/\d/.test(b[r+1]))){if(u>-1)$();if(e==="end"&&b[r]==="-"){m="-";e="operator";}else {m=Oe();e="number";}ee("");}else if(b[r]===":"&&b[r+1]===":"){if(u>-1)$();if(h.script.correct===true)ie();P();r=r+1;m="::";e="separator";ee("");}else if(b[r]===","){if(u>-1)$();if(h.script.correct===true)ie();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(e==="comment"){H();}else if(S.len>-1&&S.count[S.len]===0&&h.script.variableList==="each"){P();m=";";e="separator";ee("");m=S.word[S.len];e="word";ee("");S.index[S.len]=s.count;}else {m=",";e="separator";P();ee("");}}else if(b[r]==="."){if(u>-1)$();k[k.length-1]=false;if(b[r+1]==="."&&b[r+2]==="."){m="...";e="operator";r=r+2;}else {P();m=".";e="separator";}if(/\s/.test(b[r-1])===true)s.linesSpace=1;ee("");}else if(b[r]===";"){if(u>-1)$();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(Q[Q.length-1]===0)Q.pop();if(S.len>-1&&S.count[S.len]===0){if(h.script.variableList==="each"){D();}else {S.index[S.len]=s.count+1;}}if(h.script.correct===true)ie();m=";";e="separator";if(i.token[s.count]==="x}"){B();}else {ee("");}U();}else if(b[r]==="("||b[r]==="["||b[r]==="{"){We(b[r]);}else if(b[r]===")"||b[r]==="]"||b[r]==="}"){G(b[r]);}else if(b[r]==="*"&&i.stack[s.count]==="object"&&u<0&&/\s/.test(b[r+1])===false&&b[r+1]!=="="&&/\d/.test(b[r+1])===false){u=r;}else if(b[r]==="="||b[r]==="&"||b[r]==="<"||b[r]===">"||b[r]==="+"||b[r]==="-"||b[r]==="*"||b[r]==="/"||b[r]==="!"||b[r]==="?"||b[r]==="|"||b[r]==="^"||b[r]===":"||b[r]==="%"||b[r]==="~"){m=I();if(m==="regex"){m=i.token[s.count];}else if(m==="*"&&i.token[s.count]==="function"){i.token[s.count]="function*";}else {e="operator";if(m!=="!"&&m!=="++"&&m!=="--")P();ee("");}}else if(u<0&&b[r]!==""){u=r;}if(S.len>-1&&s.count===S.index[S.len]+1&&i.token[S.index[S.len]]===";"&&m!==S.word[S.len]&&e!=="comment"&&h.script.variableList==="list"){D();}r=r+1;}while(r-1)$();if((i.token[s.count]!=="}"&&i.token[0]==="{"||i.token[0]!=="{")&&(i.token[s.count]!=="]"&&i.token[0]==="["||i.token[0]!=="[")){R(false);}if(n[0]===s.count){m="\n"+n[1];e="string";ee("");}if(i.token[s.count]==="x;"&&(i.token[s.count-1]==="}"||i.token[s.count-1]==="]")&&i.begin[s.count-1]===0){s.pop(i);}h.script=p;return i};var De={markup:"markup",html:"markup",liquid:"markup",xml:"markup",javascript:"script",typescript:"script",jsx:"script",tsx:"script",json:"script",less:"style",scss:"style",sass:"style",css:"style",text:"text"};var nt={html:"HTML",xhtml:"XHTML",liquid:"Liquid",xml:"XML",jsx:"JSX",tsx:"TSX",json:"JSON",yaml:"YAML",css:"CSS",scss:"SCSS",sass:"SASS",less:"LESS",text:"Plain Text",javascript:"JavaScript",typescript:"TypeScript"};function Xe(a){return typeof a!=="string"||a.indexOf("html")>-1||De[a]===void 0?"markup":De[a]}function ut(a){if(typeof a!=="string"||nt[a]===void 0)return a.toUpperCase();return nt[a]}function ke(a){const f={};if(a==="unknown"){f.language=a;f.languageName="Unknown";f.lexer="markup";}else if(a==="xhtml"||a==="markup"){f.language="xml";f.languageName="XHTML";f.lexer="markup";}else {f.language=a;f.languageName=ut(a);f.lexer=Xe(a);}if(M.hooks.language.length>0){for(const h of M.hooks.language){const p=h(f);if(typeof p==="object")ye(f,p);}}return f}qe.reference=ke;qe.listen=function(a){M.hooks.language.push(a);};function qe(a){let f=[];let h=0;const p=/(((var)|(let)|(const)|(function)|(import))\s+(\w|\$)+[a-zA-Z0-9]*)/.test(a)&&/@import/.test(a)===false;const r=/((((final)|(public)|(private))\s+static)|(static\s+void))/.test(a);function m(){if(/\n\s*#+\s+/.test(a)||/^#+\s+/.test(a))return ke("markdown");if(/\$[a-zA-Z]/.test(a)||/\{\s*(\w|\.|\$|#)+\s*\{/.test(a)||/^[.#]?[\w][\w-]+\s+\{(?:\s+[a-z][a-z-]+:\s*\S+;)+\s+[&>+]?\s+[.#:]?[\w][\w-]\s+\{/.test(a)&&/:\s*@[a-zA-Z];/.test(a)===false)return ke("scss");if(/@[a-zA-Z]:/.test(a)||/\.[a-zA-Z]\(\);/.test(a))return ke("less");return ke("css")}function e(){let v=1;let u=y;let g=false;let l=false;const t=/((public)|(private))\s+(static\s+)?(((v|V)oid)|(class)|(final))/.test(a);function O(){if(a.indexOf("(")>-1||a.indexOf("=")>-1||a.indexOf(";")>-1&&a.indexOf("{")>-1){if(r===true||/\w<\w+(,\s+\w+)*>/.test(a))return ke("typescript");if(/(?:var|let|const)\s+\w+\s*:/.test(a)||/=\s*<\w+/.test(a))return ke("typescript");return ke("javascript")}return ke("unknown")}function T(){if(/:\s*(?:number|string|boolean|any|unknown)(?:\[\])?/.test(a)||/(?:public|private)\s+/.test(a)||/(?:export|declare)\s+type\s+\w+\s*=/.test(a)||/(?:namespace|interface|enum|implements|declare)\s+\w+/.test(a)||/(?:typeof|keyof|as)\s+\w+/.test(a)||/\w+\s+as\s+\w+/.test(a)||/\[\w+(?:(?::\s*\w+)|(?:\s+in\s+\w+))\]:/.test(a)||/\):\s*\w+(?:\[\])?\s*(?:=>|\{)\s+/.test(a)||/(var|const|let)\s+\w+:\s*(string|number|boolean|string|any)(\[\])?/.test(a))return ke("typescript");if(/\s(class|var|const|let)\s+\w/.test(a)===false&&/<[a-zA-Z](?:-[a-zA-Z])?/.test(a)&&/<\/[a-zA-Z-](?:-[a-zA-Z])?/.test(a)&&(/\s?\{%/.test(a)||/{{/.test(a)))return ke("liquid");if(/^(\s*[$@])/.test(a)===false&&/([}\]];?\s*)$/.test(a)){if(/^\s*import\s+\*\s+as\s+\w+\s+from\s+['"]/.test(a)||/module\.export\s+=\s+/.test(a)||/export\s+default\s+\{/.test(a)||/[?:]\s*[{[]/.test(a)||/^(?:\s*return;?(?:\s+[{[])?)/.test(a)){return ke("javascript")}}if(/{%/.test(a)&&/{{/.test(a)&&/<\w/.test(a))return ke("liquid");if(/{\s*(?:\w|\.|@|#)+\s*\{/.test(a))return ke("less");if(/\$(\w|-)/.test(a))return ke("scss");if(/[;{:]\s*@\w/.test(a)===true)return ke("less");return ke("css")}if(v-1&&(/^(\s*[\u007b\u0024\u002e#@a-z0-9])/i.test(a)||/^(\s*\/(\*|\/))/.test(a)||/^(\s*\*\s*\{)/.test(a))&&/^(\s*if\s*\()/.test(a)===false&&/=\s*(\{|\[|\()/.test(u)===false&&(/(\+|-|=|\?)=/.test(u)===false||/\/\/\s*=+/.test(u)||/=+('|")?\)/.test(a)&&/;\s*base64/.test(a))&&/function(\s+\w+)*\s*\(/.test(u)===false)return T();return a.indexOf("{%")>-1?ke("liquid"):ke("unknown")}function _(){function v(){return /{%-?\s*(schema|for|if|unless|render|include)/.test(a)||/{%-?\s*end\w+/.test(a)||/{{-?\s*content_for/.test(a)||/{{-?\s*[a-zA-Z0-9_'".[\]]+\s*-?}}/.test(a)||/{%/.test(a)&&/%}/.test(a)&&/{{/.test(a)&&/}}/.test(a)?ke("liquid"):ke("html")}return /^(\s*)/i.test(a)||/^(\s*/i.test(a)&&/<\/ul>/i.test(a)||//.test(a)&&/<\/head>/.test(a)||/^(\s*)/i.test(a))return _();if(/^\s*@(?:charset|import|include|keyframes|media|namespace|page)\b/.test(a))return m();if(r===false&&/=(>|=|-|\+|\*)/.test(a)===false&&/^(?:\s*((if)|(for)|(function))\s*\()/.test(a)===false&&/(?:\s|;|\})((if)|(for)|(function\s*\w*))\s*\(/.test(a)===false&&p===false&&/return\s*\w*\s*(;|\})/.test(a)===false&&(a===void 0||/^(?:\s*#(?!(!\/)))/.test(a)||/\n\s*(\.|@)\w+(\(|(\s*:))/.test(a)&&/>\s*<\w/.test(a)===false||(/^\s*:root\s*\{/.test(a)||/-{2}\w+\s*\{/.test(a)||/^\s*(?:body|button|hr|section|h[1-6]|p|strong|\*)\s+\{\s+/.test(a))))return m();f=a.replace(/\[[a-zA-Z][\w-]*=['"]?[a-zA-Z][\w-]*['"]?\]/g,y).split(y);h=f.length;if(/^(\s*({{|{%|<))/.test(a))return _();if(r===true||/^(?:[\s\w-]*<)/.test(a)===false&&/(?:>[\s\w-]*)$/.test(a)===false)return e();return (/^(?:\s*<\?xml)/.test(a)||/(?:>[\w\s:]*)?<(?:\/|!|#)?[\w\s:\-[]+/.test(a)||/^\s*\s*$/.test(a))&&(/^(?:[\s\w]*<)/.test(a)||/(?:>[\s\w]*)$/.test(a))||/^(?:\s*\s*)$/i.test(a)?/^(?:[\s\w]*<)/.test(a)===false||/(?:>[\s\w]*)$/.test(a)===false?e():_():ke("unknown")}M.lexers.markup=function a(f){const{options:h}=M;const{data:p}=s;const r=h.language==="jsx"||h.language==="tsx";const m=h.language==="html"||h.language==="liquid";const e=h.markup;const _=e.attributeSortList.length;const v={end:0,index:-1,start:0,line:1};const u=f.split(y);const g=u.length;let l=0;let t=false;let O="javascript";let T=m?h.language:"html";let i=0;function j(n){if(m===true&&r===false){if(/(?:{[=#/]|%[>\]])|\}%[>\]]/.test(n))return n;if(e.delimiterSpacing===true){n=n.replace(/{[{%]-?\s*/g,k=>k.replace(/\s*$/," "));n=n.replace(/\s*-?[%}]}/g,k=>k.replace(/^\s*/," "));}return n}return n}function C(n,k,x){if(n===p){if(k.types.indexOf("end")>-1){v.end=v.end+1;}else if(k.types.indexOf("start")>-1){v.start=v.start+1;}}v.index=s.count;v.line=s.lineNumber;s.push(n,k,x);}function b(n){let k=0;let x=y;const S=/^(?:<|{%-?|{{-?)=?\s*/;if(typeof n!=="string")return y;k=n.replace(S,"%").replace(/\s+/," ").indexOf(" ");x=n.replace(S," ");x=k<0?x.slice(1,n.length-1):x.slice(1,k);if(T==="html")x=x.toLowerCase();x=x.replace(/-?[%}]}$/,y);if(x.indexOf("(")>0)x=x.slice(0,x.indexOf("("));if(x==="?xml?")return "xml";return x}function E(n,k){const x=b(n);const S=Je({begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:p.lines[s.count]>0?1:0,stack:s.structure[s.structure.length-1][0],token:``,types:"end"});C(p,S,y);if(le.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x)){do{S.begin=s.structure[s.structure.length-1][1];S.stack=s.structure[s.structure.length-1][0];S.token=``;C(p,S,y);}while(le.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x))}}function Y(n){const k={begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:y,types:y};let x=0;let S=y;let R=y;let B=y;let P=y;let N=y;let U=false;let H=false;let G=false;let oe=false;let ce=false;let X=false;let fe=false;let I=[];let ie=[y,0];function ee(Z){const D=Z.indexOf("=");if(D>0&&(D0||D0)){return [Z.slice(0,D),Z.slice(D+1)]}return [Z,y]}function Ne(){const Z=s.count;const D=P.replace(/(\/)$/,y);const $=e.quoteConvert;let c=0;let o=0;let A=0;let w=y;let z=y;let q=[];let W=I.length;function se(){let F=Le(k.token,5);if(G===true||$==="none"||k.types.indexOf("attribute")<0||F===false&&$==="single"&&k.token.indexOf('"')<0||F===false&&$==="double"&&k.token.indexOf("'")<0){C(p,k,y);}else {let K=0;let V=false;const ne=k.token.split(y);const he=k.token.indexOf("=");const re=ne.length-1;if(J(ne[he+1],34)&&J(ne[ne.length-1],34)&&$==="single"&&F===false){C(p,k,y);}else if(J(ne[he+1],39)&&J(ne[ne.length-1],39)&&$==="double"&&F===false){C(p,k,y);}else {K=he+2;if(F===false){if($==="double"){if(k.token.slice(he+2,re).indexOf('"')>-1)V=true;ne[he+1]='"';ne[ne.length-1]='"';}else if($==="single"){if(k.token.slice(he+2,re).indexOf("'")>-1)V=true;ne[he+1]="'";ne[ne.length-1]="'";}}if(V===true||F===true){F=false;do{if(d(ne[K-1],123)&&(d(ne[K],37)||d(ne[K],123))){F=true;}else if(d(ne[K],125)&&(d(ne[K-1],37)||d(ne[K-1],125))){F=false;}if(F===true){if(d(ne[K],34)&&$==="double"){ne[K]="'";}else if(d(ne[K],39)&&$==="single"){ne[K]='"';}}else {if(d(ne[K],39)&&$==="double"){ne[K]='"';}else if(d(ne[K],34)&&$==="single"){ne[K]="'";}}K=K+1;}while(K$/,"/>");}o=I.length;A=1;if(A0){const F=[];A=0;o=0;W=I.length;do{o=0;do{w=I[o][0].split("=")[0];if(e.attributeSortList[A]===w){F.push(I[o]);I.splice(o,1);W=W-1;break}o=o+1;}while(o0){k.token=q.join(" ");se();}}t=false;if(n==="---"){N="---";B="comment";}else if(d(u[l],60)){if(d(u[l+1],47)){n=">";B="end";}else if(d(u[l+1],33)){if((u[l+2].charCodeAt(0)===100||u[l+2].charCodeAt(0)===68)&&(u[l+3].charCodeAt(0)===111||u[l+3].charCodeAt(0)===79)&&(u[l+4].charCodeAt(0)===99||u[l+4].charCodeAt(0)===67)&&(u[l+5].charCodeAt(0)===116||u[l+5].charCodeAt(0)===84)&&(u[l+6].charCodeAt(0)===121||u[l+6].charCodeAt(0)===89)&&(u[l+7].charCodeAt(0)===112||u[l+7].charCodeAt(0)===80)&&(u[l+8].charCodeAt(0)===101||u[l+8].charCodeAt(0)===69)){n=">";B="doctype";X=true;}else if(d(u[l+2],45)&&d(u[l+3],45)){n="-->";B="comment";N="";}else if(d(u[l],123)&&J(Z[0],123)&&J(n,10)&&(d(u[l+1],123)||d(u[l+1],37))){if(d(u[l+1],123)){w="}}";}else {w=u[l+1]+"}";if(V.length<1&&(I.length<1||ue(u[l-1]))){Z.pop();do{if(d(u[l],10))L=L+1;V.push(u[l]);l=l+1;}while(ln.length+1||d(Z[0],93))&&(r===false||q===0)){if(d(n,10)){if(ue(Z[Z.length-1])){do{Z.pop();l=l-1;}while(ue(Z[Z.length-1]))}break}$=Z.length;D=n.length-1;if(D>-1){do{$=$-1;if(Z[$]!==n.charAt(D))break;D=D-1;}while(D>-1)}if(D<0){if(d(Z[$],62)&&d(u[l],62)&&I.length>0){if(I[I.length-1][1]===0&&d(u[l-1],125)&&ue(u[l+1])){I[I.length-1][1]=d(u[l+1],32)?1:2;}}break}}}else if(u[l].charCodeAt(0)===w.charCodeAt(w.length-1)&&(r&&d(n,125)&&(u[l-1]!=="\\"||he()===false)||(r===false||J(n,125)))){$=0;D=w.length-1;if(D>-1){do{if(u[l-$]!==w.charAt(D))break;$=$+1;D=D-1;}while(D>-1)}if(D<0)w=y;}}l=l+1;}while(l{c=w===y?0:w.split("\n").length;return y};const L=w=>{o=w===y?0:w.split("\n").length;return y};k.begin=s.structure[s.structure.length-1][1];k.ender=s.count+3;k.stack=s.structure[s.structure.length-1][0];k.types="template_start";k.token=Z;C(p,k,"comment");S=D.replace(/^\s*/,A);S=S.replace(/\s*$/,L);k.begin=s.count;k.lines=c;k.stack="comment";k.token=S;k.types="comment";C(p,k,y);k.types="template_end";k.stack="comment";k.lines=o;k.token=$;C(p,k,y);return}k.types=B;U=(()=>{const Z=/(\/>)$/;const D=(c,o)=>{if(!le.html.tags.has(c))return false;if(c===o)return true;if(c==="dd"&&o==="dt")return true;if(c==="dt"&&o==="dd")return true;if(c==="td"&&o==="th")return true;if(c==="th"&&o==="td")return true;if(c==="colgroup"&&(o==="tbody"||o==="tfoot"||o==="thead"||o==="tr"))return true;if(c==="tbody"&&(o==="colgroup"||o==="tfoot"||o==="thead"))return true;if(c==="tfoot"&&(o==="colgroup"||o==="tbody"||o==="thead"))return true;if(c==="thead"&&(o==="colgroup"||o==="tbody"||o==="tfoot"))return true;if(c==="tr"&&o==="colgroup")return true;return false};const $=c=>{k.lines=p.lines[s.count]>0?1:0;k.token=``;k.types="end";C(p,k,y);if(c>0){do{k.begin=s.structure[s.structure.length-1][1];k.stack=s.structure[s.structure.length-1][0];k.token=``;C(p,k,y);c=c-1;}while(c>0)}k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;};if(B==="end"){const c=p.token[s.count];if(p.types[s.count-1]==="singleton"&&c.charCodeAt(c.length-2)!==47&&`/${b(c)}`===P){p.types[s.count-1]="start";}}if(T==="html"){if(d(S[0],60)&&J(S[1],33)&&J(S[1],63)&&(s.count<0||p.types[s.count].indexOf("template")<0))S=S.toLowerCase();if(le.html.tags.has(s.structure[s.structure.length-1][0])&&D(P.slice(1),s.structure[s.structure.length-2][0])){$(0);}else if(s.structure.length>3&&le.html.tags.has(s.structure[s.structure.length-1][0])&&le.html.tags.has(s.structure[s.structure.length-2][0])&&le.html.tags.has(s.structure[s.structure.length-3][0])&&D(P,s.structure[s.structure.length-4][0])){$(3);}else if(s.structure.length>2&&le.html.tags.has(s.structure[s.structure.length-1][0])&&le.html.tags.has(s.structure[s.structure.length-2][0])&&D(P,s.structure[s.structure.length-3][0])){$(2);}else if(s.structure.length>1&&le.html.tags.has(s.structure[s.structure.length-1][0])&&D(P,s.structure[s.structure.length-2][0])){$(1);}else if(D(P,s.structure[s.structure.length-1][0])){$(0);}else if(d(P[0],47)&&le.html.tags.has(s.structure[s.structure.length-1][0])&&s.structure[s.structure.length-1][0]!==P.slice(1)){E(S,false);k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;}if(r===false&&le.html.voids.has(P)){if(e.correct===true&&Z.test(S)===false)S=S.slice(0,S.length-1)+" />";return true}}return false})();if(le.embed("html",P)&&S.slice(S.length-2)!=="/>"||le.embed("liquid",P)&&S.slice(S.length-2)==="%}"){const Z=Le(S,3);let D=I.length-1;let $=y;let c=[];if(D>-1){do{c=ee(I[D][0]);if(c[0]==="type"){$=c[1];if($.charCodeAt(0)===34||$.charCodeAt(0)===39){$=$.slice(1,$.length-1);}break}D=D-1;}while(D>-1)}if(Z===false&&le.embed("html",P)){t=true;if($===y){O=le.html.embed[P].language;}else if(le.html.embed[P].value($)){O=le.html.embed[P].language;}}else if(Z===true&&le.embed("liquid",P)){t=true;if($===y){O=le.liquid.embed[P].language;}else {O=le.liquid.embed[P].language;}}if(t===true){D=l+1;if(D"){B="singleton";}else {B="start";}k.types=B;}if(fe&&X===false&&G&&d(n,62)&&S.slice(S.length-2)!=="/>"){const Z=[];const D=[];if(U===true){B="singleton";}else {I.forEach($=>D.push($[0]));X=true;B="ignore";l=l+1;if(l-1){do{if(J(u[l-o],$.charCodeAt(c)))break;o=o+1;c=c-1;}while(c>-1)}if(c<0)$=y;}l=l+1;}while(l",` ${D.join(" ")}>`);k.token=S;k.types="content-ignore";I=[];}if(k.types.indexOf("template")>-1){if(d(S[0],123)&&d(S[1],37)){if((P==="case"||P==="default")&&(s.structure[s.structure.length-1][0]==="switch"||s.structure[s.structure.length-1][0]==="case")){k.types="template_else";}else if(le.liquid.else.has(P)){k.types="template_else";}else {if(le.liquid.tags.has(P)){k.types="template_start";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100&&le.liquid.tags.has(P.slice(3))){k.types="template_end";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100){k.types="template_end";k.stack=P.slice(3);let Z=0;do{if(p.types[Z]==="template"&&p.stack[Z]===k.stack){p.types[Z]="template_start";v.start=v.start+1;break}else {Z=p.stack.indexOf(k.stack,Z+1);}}while(Z>-1)}else {k.stack=P;}}}else if(k.types==="template"){if(S.indexOf("else")>2)k.types="template_else";}if(k.types==="template_start"||k.types==="template_else"){if(P===y||d(P,37)){P=P+S.slice(1).replace(P,y).replace(/^\s+/,y);P=P.slice(0,P.indexOf("(")).replace(/\s+/,y);}}if(e.quoteConvert==="double"){k.token=k.token.replace(/'/g,'"');}else if(e.quoteConvert==="single"){k.token=k.token.replace(/"/g,"'");}}if(B==="cdata"&&(k.stack==="script"||k.stack==="style")){let Z=s.count;let D=s.count;const $=k.stack;if(p.types[D]==="attribute"){do{Z=Z-1;D=D-1;}while(p.types[D]==="attribute"&&D>-1)}k.begin=Z;k.token="\s*)$/,y);C(p,k,y);s.structure.push(["cdata",s.count]);if($==="script"){M.lexers.script(S);}else {M.lexers.style(S);}k.begin=s.structure[s.structure.length-1][1];k.token="]]>";k.types="cdata_end";C(p,k,y);s.structure.pop();}else {C(p,k,P);}Ne();if(h.wrap>0&&r===true){let Z=0;let D=s.count;let $=0;if(p.types[D].indexOf("attribute")>-1){do{Z=Z+p.token[D].length+1;D=D-1;}while(p.lexer[D]!=="markup"||p.types[D].indexOf("attribute")>-1);if(p.lines[D]===1)Z=Z+p.token[D].length+1;}else if(p.lines[D]===1){Z=p.token[D].length+1;}$=D-1;if(Z>0&&p.types[$]!=="script_end"){if(p.types[$].indexOf("attribute")>-1){do{Z=Z+p.token[$].length+1;$=$-1;}while(p.lexer[$]!=="markup"||p.types[$].indexOf("attribute")>-1);if(p.lines[$]===1)Z=Z+p.token[$].length+1;}else if(p.lines[$]===1){Z=p.token[$].length+1;}}}s.linesSpace=0;}function Q(){const n=l;const k=d(p.token[s.count],123)&&r===true;let x=[];let S=y;let R=s.linesSpace;let B=y;if(t===true){if(k===true){B="script";}else if(s.structure[s.structure.length-1][1]>-1){B=b(p.token[s.structure[s.structure.length-1][1]].toLowerCase());}else if(p.begin[s.count]>1){B=b(p.token[p.begin[s.count]].toLowerCase());}else {B=b(p.token[p.begin[s.count]].toLowerCase());}}const P=p.types[s.count]==="template_start"&&p.token[s.count].indexOf("-1){do{if(u[H]!=="\\")break;G=G+1;H=H-1;}while(H>-1)}return G%2===1}if(l".indexOf(u[l-1])>-1){if(r===false||J(u[l-1],60))G="reg";}}else if((d(u[l],34)||d(u[l],39)||d(u[l],96))&&U()===false){G=u[l];}else if(d(u[l],123)&&k===true){ce=ce+1;}else if(d(u[l],125)&&k===true){if(ce===0){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);M.lexers.script(oe);s.structure[s.structure.length-1][1]+=1;if(p.types[s.count]==="end"&&p.lexer[p.begin[s.count]-1]==="script"){N.lexer="script";N.token=e.correct===true?";":"x;";N.types="separator";C(p,N,y);N.lexer="markup";}N.token="}";N.types="script_end";C(p,N,y);s.structure.pop();break}ce=ce-1;}if(Le(p.token[s.count],3)===false){H=u.slice(l,l+10).join(y).toLowerCase();if(B==="script"){H=l===g-9?H.slice(0,H.length-1):H.slice(0,H.length-2);if(H==="<\/script"){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l-1;if(x.length<1)break;if(/^";C(p,N,y);}else {h.language=O;M.lexers.script(oe);if(O==="json"&&h.json.objectSort===true||O!=="json"&&h.script.objectSort===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}if(B==="style"){if(l===g-8){H=H.slice(0,H.length-1);}else if(l===g-9){H=H.slice(0,H.length-2);}else {H=H.slice(0,H.length-3);}if(H==="$/.test(X)){N.token="";C(p,N,y);}else {h.language=O;M.lexers.style(X);if(h.style.sortProperties===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}}else {if(le.embed("liquid",B)){const X=u.slice(l).join(y);const fe=X.search(new RegExp(`{%-?\\s*end${B}`));x=x.length>0?x.concat(x,u.slice(l,l+fe)):u.slice(l,l+fe);l=l+fe;H=u.slice(l).join(y).toLowerCase();if(le.liquid.embed[B].end(H)){H=H.slice(0,H.indexOf("%}")+2);oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l+H.length-1;if(x.length<1)break;const Oe=De[le.liquid.embed[B].language];h.language=O;M.lexers[Oe](oe);if(O==="json"&&h.json.objectSort===true||O==="javascript"&&h.script.objectSort===true||(O==="css"||O==="scss")&&h.style.sortProperties===true){s.sortCorrection(0,s.count+1);}h.language="liquid";N.token=H;N.types="template_end";C(p,N,y);}break}}}else if(G===u[l]&&(d(G,34)||d(G,39)||d(G,96)||d(G,42)&&d(u[l+1],47))&&U()===false){G=y;}else if(d(G,96)&&u[l]==="$"&&d(u[l+1],123)&&U()===false){G="}";}else if(d(G,125)&&d(u[l],125)&&U()===false){G="`";}else if(d(G,47)&&(d(u[l],10)||u[l]==="\r")){G=y;}else if(G==="reg"&&d(u[l],47)&&U()===false){G=y;}else if(d(G,47)&&d(u[l],60)&&d(u[l-1],45)&&d(u[l-2],45)){H=u.slice(l+1,l+11).join(y).toLowerCase();H=H.slice(0,H.length-2);if(B==="script"&&H==="<\/script")G=y;H=H.slice(0,H.length-1);if(B==="style"&&H==="0&&(d(u[l],60)&&J(u[l+1],61)&&!/\s|\d/.test(u[l+1])||d(u[l],91)&&d(u[l+1],37)||d(u[l],123)&&(r===true||d(u[l+1],123)||d(u[l+1],37)))){l=l-1;if(s.structure[s.structure.length-1][0]==="comment"){S=x.join(y);}else {S=x.join(y).replace(/\s+$/,y);}S=j(S);R=0;N.token=S;if(h.wrap>0&&e.preserveText===false){const{wrap:X}=h;const fe=y;const Oe=y;const I=[];let ie=X;let ee=S.length;const Ne=()=>{if(S.charCodeAt(ie)===32){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;return}do{ie=ie-1;}while(ie>0&&S.charCodeAt(ie)!==32);if(ie>0){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;}else {ie=X;do{ie=ie+1;}while(ie"&&p.token[p.begin[p.begin[s.count]]]==="
  • "&&p.lines[p.begin[s.count]]===0&&s.linesSpace===0&&S.length-1)ie=ie-1;if(p.lines[xe]>0&&p.types[xe].indexOf("attribute")<0)break;xe=xe-1;}while(xe>0&&ie>0);if(ie<1)ie=S.indexOf(" ");}S=x.join(y);S=S.replace(/^\s+/,y).replace(/\s+$/,y).replace(/\s+/g," ");do{Ne();}while(ien&&ln&&ue(u[H]))}else {s.linesSpace=0;}}else if(l!==n||l===n&&t===false){S=x.join(y).replace(/\s+$/,y);R=0;if(N.token!==S){N.token=S;C(p,N,y);s.linesSpace=0;}}t=false;}if(_>0){do{e.attributeSortList[l]=e.attributeSortList[l].replace(/^\s+/,y).replace(/\s+$/,y);l=l+1;}while(l<_);l=0;}if(h.language==="html"||h.language==="liquid")T="html";do{if(ue(u[l])){if(p.types[s.count]==="template_start"&&s.structure[s.structure.length-1][0]==="comment"){Q();}else {l=s.spacer({array:u,end:g,index:l});}}else if(t){Q();}else if(d(u[l],60)){Y(y);}else if(d(u[l],91)&&d(u[l+1],37)){Y("%]");}else if(d(u[l],123)&&(r||d(u[l+1],123)||d(u[l+1],37))){Y(y);}else if(d(u[l],45)&&d(u[l+1],45)&&d(u[l+2],45)){Y("---");}else {Q();}l=l+1;}while(lv.start){const n=v.end-v.start;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more end type${k} than start types`].join("\n");}else {const n=v.start-v.end;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more start type${k} than end types`].join("\n");}}return p};M.beautify.markup=a=>{const f={};const h="markup";const{data:p}=s;const r=a.language==="jsx"||a.language==="tsx";const m=a.crlf===true?String.fromCharCode(13,10):String.fromCharCode(10);const e=a.markup;const _=M.end<1||M.end>p.token.length?p.token.length:M.end+1;const v={is:(j,C)=>p.types[j]===C,not:(j,C)=>p.types[j]!==C,idx:(j,C)=>j>-1&&(p.types[j]||y).indexOf(C)};const u={is:(j,C)=>p.token[j]===C,not:(j,C)=>p.token[j]!==C};let g=M.start;let l=-1;let t=0;let O=0;let T=isNaN(a.indentLevel)?0:Number(a.indentLevel);const i=(()=>{const j=M.start>0?Array(M.start).fill(0,0,M.start):[];function C(){let k=g+1;let x=0;if(v.is(k,void 0))return k-1;if(v.is(k,"comment")||g<_-1&&v.idx(k,"attribute")>-1){do{if(v.is(k,"jsx_attribute_start")){x=k;do{if(v.is(k,"jsx_attribute_end")&&p.begin[k]===x)break;k=k+1;}while(k<_)}else if(v.not(k,"comment")&&v.idx(k,"attribute")<0)return k;k=k+1;}while(k<_)}return k}function b(){const k=p.begin[g];let x=g;do{x=x-1;if(u.is(x,"
  • ")&&u.is(x-1,"")&&p.begin[p.begin[x]]===k&&p.begin[x-1]===p.begin[x]+1){x=p.begin[x];}else {return}}while(x>k+1);x=g;do{x=x-1;if(v.is(x+1,"attribute")){j[x]=-10;}else if(u.not(x,"")){j[x]=-20;}}while(x>k+1)}function E(){let k=g;let x=false;if(p.lines[g+1]===0&&e.forceIndent===false){do{if(p.lines[k]>0){x=true;break}k=k-1;}while(k>l);k=g;}else {x=true;}if(x===true){const S=v.is(t,"comment")||v.is(t,"end")||v.is(t,"template_end")?T+1:T;do{j.push(S);k=k-1;}while(k>l);if(S===T+1)j[g]=T;if(v.is(k,"attribute")||v.is(k,"template_attribute")||v.is(k,"jsx_attribute_start")){j[p.begin[k]]=S;}else {j[k]=S;}}else {do{j.push(-20);k=k-1;}while(k>l);j[k]=-20;}l=-1;}function Y(){let k=T;if(e.forceIndent===true||e.forceAttribute===true){j.push(T);return}if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&p.lines[t]>0){j.push(T);k=k+1;if(v.is(g,"singleton")&&g>0&&v.idx(g-1,"attribute")>-1&&v.is(p.begin[g-1],"singleton")){if(p.begin[g]<0||v.is(p.begin[g-1],"singleton")&&p.begin[p.ender[g]-1]!==g){j[g-1]=T;}else {j[g-1]=T+1;}}}else if(g>0&&v.is(g,"singleton")&&v.idx(g-1,"attribute")>-1){j[g-1]=T;O=p.token[g].length;j.push(-10);}else if(p.lines[t]===0){j.push(-20);}else if((a.wrap===0||g<_-2&&p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g+2]!==void 0&&p.token[g].length+p.token[g+1].length+p.token[g+2].length+1>a.wrap&&v.idx(g+2,"attribute")>-1||p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g].length+p.token[g+1].length>a.wrap)&&(v.is(g+1,"singleton")||v.is(g+1,"template"))){j.push(T);}else {O=O+1;j.push(-10);}if(g>0&&v.idx(g-1,"attribute")>-1&&p.lines[g]<1){j[g-1]=-20;}if(O>a.wrap){let x=g;let S=Math.max(p.begin[g],0);if(v.is(g,"content")&&e.preserveText===false){let R=0;const B=p.token[g].replace(/\s+/g,de).split(de);do{x=x-1;if(j[x]<0){R=R+p.token[x].length;if(j[x]===-10)R=R+1;}else {break}}while(x>0);x=0;S=B.length;do{if(B[x].length+R>a.wrap){B[x]=m+B[x];R=B[x].length;}else {B[x]=` ${B[x]}`;R=R+B[x].length;}x=x+1;}while(x0){O=p.token[g].length-p.token[g].lastIndexOf(m);}}else {do{x=x-1;if(j[x]>-1){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;return}if(v.idx(x,"start")>-1){O=0;return}if(p.lines[x+1]>0&&(v.not(x,"attribute")||v.is(x,"attribute")&&v.is(x+1,"attribute"))){if(v.not(x,"singleton")||v.is(x,"attribute")&&v.is(x+1,"attribute")){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;break}}}while(x>S);j[x]=k;}}}function Q(){const k=g;if(p.types[k-1]==="script_start"&&d(p.token[k-1],123)){j[k-1]=-20;}do{if(p.lexer[g+1]===h&&p.begin[g+1]a.wrap){X=G[ce].length;G[ce]=m+G[ce];}else {G[ce]=` ${G[ce]}`;X=X+G[ce].length;}ce=ce+1;}while(ce{if(v.idx(g,"start")>0){let H=g;do{if(p.types[H].indexOf("end")>0&&p.begin[H]===g){if(H<_-1&&v.idx(H+1,"attribute")>-1){R=true;break}}H=H+1;}while(H<_)}else if(g<_-1&&v.idx(g+1,"attribute")>-1){R=true;}if(v.is(t,"end")||v.is(t,"template_end")){return T+(v.is(S,"singleton")?2:1)}if(v.is(S,"singleton"))return T+1;return T})();if(R===false&&v.is(g,"comment_attribute")){j.push(T);j[S]=p.types[S]==="singleton"?T+1:T;return}if(U<1)U=1;do{O=O+p.token[g].length+1;if(p.types[g].indexOf("attribute")>0){if(p.types[g]==="template_attribute_start"){if(e.preserveAttributes===true){j.push(-10);}else {let H=1;do{if(p.lines[g]===0){j.push(-20);}else if(p.lines[g]===1){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else {j.push(U);}if(H===0)break;g=g+1;if(v.is(g,"template_attribute_start")){H=H+1;}else if(v.is(g,"template_attribute_end")){H=H-1;}P=P+1;if(p.token[g]!==void 0){O=O+p.token[g].length+1;N=N+p.token[g].length+1;}}while(g<_)}}else if(p.types[g]==="template_attribute"){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else if(p.types[g]==="comment_attribute"){j.push(U);}else if(p.types[g].indexOf("start")>0){B=true;if(g<_-2&&p.types[g+2].indexOf("attribute")>0){j.push(-20);g=g+1;f[g]=g;}else {if(S===g-1&&R===false){if(r){j.push(-20);}else {j.push(U);}}else {if(r){j.push(-20);}else {j.push(U+1);}}if(p.lexer[g+1]!==h){g=g+1;Q();}}}else if(p.types[g].indexOf("end")>0&&p.types[g].indexOf("template")<0){if(j[g-1]!==-20)j[g-1]=j[p.begin[g]]-1;if(p.lexer[g+1]!==h){j.push(-20);}else {j.push(U);}}else {j.push(U);}}else if(v.is(g,"attribute")){N=N+p.token[g].length+1;if(e.preserveAttributes===true){j.push(-10);}else if(e.forceAttribute===true||e.forceAttribute>=1||B===true||g<_-1&&(v.idx(g+1,"template_attribute_")>-1&&p.lines[g+1]!==-20||v.idx(g+1,"attribute")>0)){if(e.forceAttribute===false&&p.lines[g]===1){if(v.is(g+1,"template_attribute_start")&&p.lines[g+1]>1){j.push(U);}else {j.push(-10);}}else {if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}}else {j.push(-10);}}else if(p.begin[g]0&&v.idx(g,"attribute")>0&&v.not(S,"singleton")&&j[g-1]>0&&R===true){j[g-1]=j[g-1]-1;}if(j[g]!==-20){if(r===true&&v.idx(S,"start")>-1&&v.is(g+1,"script_start")){j[g]=U;}else {if(u.is(g,"/")&&j[g-1]!==10){j[g-1]=-10;}else {j[g]=j[S];}}}if(e.forceAttribute===true){O=0;j[S]=U;}else if(e.forceAttribute>=1){if(P>=e.forceAttribute){j[S]=U;let H=g-1;do{if(v.is(H,"template")&&j[H]===-10){j[H]=U;}else if(v.is(H,"attribute")&&j[H]===-10){j[H]=U;}H=H-1;}while(H>S)}else {j[S]=-10;}}else {j[S]=-10;}if(e.preserveAttributes===true||u.is(S,"<%xml%>")||u.is(S,"")){O=0;return}x=g;if(x>S+1){if(e.selfCloseSpace===false)N=N-1;if(N>a.wrap&&a.wrap>0&&e.forceAttribute===false){if(e.forceLeadAttribute===true){j[S]=U;x=x-1;}O=p.token[g].length;do{if(p.token[x].length>a.wrap&&ue(p.token[x]))k(x);if(v.idx(x,"template")>-1&&j[x]===-10){j[x]=U;}else if(v.is(x,"attribute")&&j[x]===-10){j[x]=U;}x=x-1;}while(x>S)}}else if(a.wrap>0&&v.is(g,"attribute")&&p.token[g].length>a.wrap&&ue(p.token[g])){k(g);}}do{if(p.lexer[g]===h){if(p.token[g].toLowerCase().indexOf("-1){n();}else if(v.is(g,"comment")){if(l<0)l=g;if(v.not(g+1,"comment")||g>0&&v.idx(g-1,"end")>-1)E();}else if(v.not(g,"comment")){t=C();if(v.is(t,"end")){T=T-1;if(u.is(g,"")||u.is(g,"")||u.is(g,""))b();}if(v.is(t,"template_end")){T=T-1;if(v.is(t,"template_end")&&v.is(p.begin[t]+1,"template_else"))T=T-1;}if(v.is(g,"script_end")&&v.is(t,"end")){if(p.lines[t]<1){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if((e.forceIndent===false||e.forceIndent===true&&v.is(t,"script_start"))&&(v.is(g,"content")||v.is(g,"singleton")||v.is(g,"template"))){O=O+p.token[g].length;if(v.is(g,"template")){j.push(T);const k=p.token[g].indexOf(m);if(k>0){const x=[];const S=j[g-1]*a.indentSize+p.token[g].charCodeAt(2)===45?a.indentSize:a.indentSize-1;let R=0;do{x.push(de);R=R+1;}while(R`${B}${x.join(y)}`);}}else if(p.lines[t]>0&&v.is(t,"script_start")){j.push(-10);}else if(a.wrap>0&&(v.idx(g,"template")<0||t<_&&v.idx(g,"template")>-1&&v.idx(g,"template")<0)){Y();}else if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&(p.lines[t]>0||v.idx(g,"template_")>-1)){j.push(T);}else if(p.lines[t]===0){j.push(-20);}else {j.push(T);}}else if(v.is(g,"start")||v.is(g,"template_start")){T=T+1;if(v.is(g,"template_start")&&v.is(t,"template_else")){T=T+1;}if(r===true&&u.is(g+1,"{")){if(p.lines[t]===0){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if(v.is(g,"start")&&v.is(t,"end")){j.push(-20);}else if(v.is(g,"start")&&v.is(t,"script_start")){j.push(-10);}else if(e.forceIndent===true){j.push(T);}else if(v.is(g,"template_start")&&v.is(t,"template_end")){j.push(-20);}else if(p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton")||v.is(g,"start")&&v.is(t,"template"))){j.push(-20);}else {j.push(T);}}else if(e.forceIndent===false&&p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton"))){j.push(-20);}else if(v.is(g+2,"script_end")){j.push(-20);}else if(v.is(g,"template_else")){if(v.is(t,"template_end")){j[g-1]=T+1;}else {j[g-1]=T-1;}j.push(T);}else {j.push(T);}}if(v.not(g,"content")&&v.not(g,"singleton")&&v.not(g,"template")&&v.not(g,"attribute")){O=0;}}else {O=0;Q();}g=g+1;}while(g<_);return j})();return (()=>{const j=[];const C=(()=>{const k=[a.indentChar];const x=a.indentSize-1;let S=0;if(S0){B=0;do{x.push(C);B=B+1;}while(BP.trimStart());const S=i[g-1]>-1?v.is(g,"attribute")?i[g-1]+1:i[g-1]:(()=>{let P=g-1;let N=P>-1&&v.idx(P,"start")>-1;if(i[g]>-1&&v.is(g,"attribute")){return i[g]+1}do{P=P-1;if(i[P]>-1){return v.is(g,"content")&&N===false?i[P]:i[P]+1}if(v.idx(P,"start")>-1)N=true;}while(P>0);return P===-2?0:1})();let R=0;p.lines[g+1]=0;const B=k.length-1;do{if(v.is(g,"comment")){if(k[R]!==y){if(k[R+1].trimStart()!==y){j.push(k[R],b(S));}else {j.push(k[R],pe);}}else {if(k[R+1].trimStart()===y){j.push(pe);}else {j.push(b(S));}}}else {j.push(k[R]);j.push(b(S));}R=R+1;}while(R1){j.push(b(i[g]));}}function Y(){const k=/\/?>$/;const x=p.token[g];const S=k.exec(x);if(S===null)return;let R=g+1;let B=false;let P=e.selfCloseSpace===true&&S!==null&&S[0]==="/>"?de:y;p.token[g]=x.replace(k,y);do{if(v.is(R,"jsx_attribute_end")&&p.begin[p.begin[R]]===g){B=false;}else if(p.begin[R]===g){if(v.is(R,"jsx_attribute_start")){B=true;}else if(v.idx(R,"attribute")<0&&B===false){break}}else if(B===false&&(p.begin[R]-1){Y();}if(u.not(g,void 0)&&p.token[g].indexOf(m)>0&&(v.is(g,"content")&&e.preserveText===false||v.is(g,"comment")||v.is(g,"attribute"))){E();}else {j.push(p.token[g]);if(i[g]===-10&&g<_-1){j.push(de);}else if(i[g]>-1){Q=i[g];j.push(b(i[g]));}}}else {M.start=g;M.end=f[g];a.indentLevel=Q;const k=a.language;const x=d(p.token[g],123)?"liquid":"html";const S=le[x].embed[p.stack[g]].language==="json";if(S)a.language="json";n=M.beautify[p.lexer[g]](a).replace(we,y);j.push(n);if(n.endsWith(pe)){if(Q-1>0)j.push($e(Q-1,C));}else {if(e.forceIndent===true||i[M.iterator]>-1&&f[g]>g){j.push(b(i[M.iterator]));}}g=M.iterator;a.indentLevel=0;if(S)a.language=k;}g=g+1;}while(g<_);M.iterator=_-1;if(j[0]===m||d(j[0],32))j[0]=y;return j.join(y)})()};M.beautify.style=a=>{const f=[];const h=M.data;const p=a.crlf===true?"\r\n":"\n";const r=M.end>0?M.end+1:h.token.length;const m=a.preserveLine+1;const e=(()=>{let O=0;const T=[];do{T.push(a.indentChar);O=O+1;}while(O0?a.wrap:0;let u=M.start;let g=[y,y];function l(O){const T=[];const i=(()=>{if(u===r-1)return 1;if(h.lines[u+1]-1>m)return m;if(h.lines[u+1]>1)return h.lines[u+1]-1;return 1})();let j=0;if(O<0)O=0;do{T.push(p);j=j+1;v=_;}while(j0){j=0;do{T.push(e);j=j+1;}while(jO+1);if(E[1]>Y)Y=E[1];j.push(E);}}else if(h.types[C]==="end"){if(CO);C=j.length;if(C<2)return;do{C=C-1;if(j[C][1]0)}if(a.script.vertical===true&&a.style.compressCSS===false){u=r;do{u=u-1;if(d(h.token[u],125)||d(h.token[u],41))t();}while(u>0);u=M.start;}do{if(h.types[u]==="property")v=_+h.token[u].length;if(h.types[u+1]==="end"||h.types[u+1]==="template_end"||h.types[u+1]==="template_else"){_=_-1;}if(h.types[u]==="template"&&h.lines[u]===0){f.push(h.token[u]);if(h.types[u+1]==="template"&&h.lines[u+1]>0)l(_);}else if(h.types[u]==="template"&&h.lines[u]>0){if(h.types[u-2]!=="property"&&h.types[u-1]!=="colon"){v=_;f.push(h.token[u]);l(_);}else if(h.types[u-2]==="property"&&h.types[u-1]==="colon"&&h.types[u+1]==="separator"&&d(h.token[u+1],44)){v=v+h.token[u].length;if(v>a.wrap)l(_);f.push(h.token[u]);do{u=u+1;f.push(h.token[u]);if(h.lines[u+1]>0)l(_);}while(h.types[u]!=="separator"&&J(h.token[u],59));if(d(h.token[u],59)&&h.types[u]==="separator"){f.push(h.token[u]);if(h.lines[u+1]>0)l(_);u=u+1;continue}}else {v=v+h.token[u].length;if(a.wrap>0&&v>a.wrap){l(_);f.push(h.token[u]);}else {f.push(h.token[u]);}}}else if(h.types[u]==="template_else"){f.push(h.token[u]);_=_+1;l(_);}else if(h.types[u]==="start"||h.types[u]==="template_start"){_=_+1;f.push(h.token[u]);if(h.types[u+1]!=="end"&&h.types[u+1]!=="template_end"&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")){l(_);}}else if(d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")||(h.types[u]==="end"||h.types[u]==="template_end"||h.types[u]==="comment")){f.push(h.token[u]);if(h.types[u+1]==="value"){if(h.lines[u+1]===1){f.push(" ");}else if(h.lines[u+1]>1){l(_);}}else if(h.types[u+1]!=="separator"){if(h.types[u+1]!=="comment"||h.types[u+1]==="comment"&&h.lines[u+1]>1){l(_);}else {f.push(" ");}}}else if(d(h.token[u],58)){f.push(h.token[u]);if(a.style.compressCSS===false)f.push(" ");}else if(h.types[u]==="selector"){if(a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);}if(h.token[u].indexOf("and(")>0){h.token[u]=h.token[u].replace(/and\(/,"and (");f.push(h.token[u]);}else if(h.token[u].indexOf("when(")>0){g=h.token[u].split("when(");f.push(g[0].replace(/\s+$/,y));l(_+1);f.push(`when (${g[1]}`);}else {f.push(h.token[u]);}if(h.types[u+1]==="start"){if(a.script.braceAllman===true){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}}else if(d(h.token[u],44)){f.push(h.token[u]);if(h.types[u+1]==="selector"||h.types[u+1]==="property"){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}else if(h.stack[u]==="map"&&d(h.token[u+1],41)&&u-h.begin[u]>5){f.push(h.token[u]);l(_);}else if(h.token[u]==="x;"){l(_);}else if((h.types[u]==="variable"||h.types[u]==="function")&&a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);f.push(h.token[u]);}else if(J(h.token[u],59)||d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&J(h.token[u+1],125))){f.push(h.token[u]);}u=u+1;}while(u{const f=ye({},a.script);if(a.language==="json"){a.script=ye(a.script,a.json,{quoteCovert:"double"});}const h=new Set(["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]);const m=Ce(null);const e=M.data;const _="script";const v=M.scopes;const u=M.end<1||M.end>e.token.length?e.token.length:M.end+1;const g=(()=>{let t=M.start;let O=isNaN(a.indentLevel)?0:Number(a.indentLevel);let T=false;let i=false;let j="";let C="";let b=e.types[0];let E=e.token[0];const Y=[-1];const Q=[];const n=M.start>0?Array(M.start).fill(0,0,M.start):[];const k=[];const x=[[]];const S=[];const R=[];const B=[];const P=[false];const N=[];const U=[];function H(){G(false,false);const $=a.commentIndent===true?O:0;if(T===false&&/\/\u002a\s*global\s/.test(e.token[t])){const c=e.token[t].replace(/\/\u002a\s*global\s+/,"").replace(/\s*\u002a\/$/,"").split(",");let o=c.length;do{o=o-1;c[o]=c[o].replace(/\s+/g,"");if(c[o]!=="")v.push([c[o],-1]);}while(o>0)}if(e.types[t-1]==="comment"||e.types[t+1]==="comment"){n[t-1]=$;}else if(e.lines[t]<2){let c=t+1;if(e.types[c]==="comment"){do{c=c+1;}while(c0){do{o=o-1;if(v[o][1]===c){v[o][1]=t;}else if(v[o][1]0)}c=c+1;e.begin.splice(c,1);e.ender.splice(c,1);e.lexer.splice(c,1);e.lines.splice(c,1);e.stack.splice(c,1);e.token.splice(c,1);e.types.splice(c,1);o=t+1;do{e.begin[o]=t;e.stack[o]=e.stack[c];o=o+1;}while(o-1&&e.lines[t]<3){e.lines[t]=3;}}if(e.types[t+1]!=="comment")T=true;return}else if(e.token[t-1]===","){n[t-1]=$;}else if(E==="="&&e.types[t-1]!=="comment"&&/^(\/\*\*\s*@[a-z_]+\s)/.test(C)===true){n[t-1]=-10;}else if(E==="{"&&e.types[t-1]!=="comment"&&e.lines[0]<2){if(e.stack[t]==="function"){n[t-1]=$;}else {n[t-1]=/\n/.test(C)?$:-10;}}else {n[t-1]=$;}if(e.types[t+1]!=="comment")T=true;if(e.token[e.begin[t]]==="("){n.push(O+1);}else {n.push(O);}if(n[t]>-1&&e.lines[t]<3){if(e.types[t-1]==="comment"&&C.startsWith("//")){e.lines[t]=2;}else {e.lines[t]=3;}}if(a.script.commentNewline===true&&C.startsWith("//")===false&&e.lines[t]>=3){e.lines[t]=2;}}function G($,c){let o=t-1;let A=$===true?0:1;const L=x[x.length-1]===void 0?[]:x[x.length-1];const w=c===false&&e.stack[t]==="array"&&$===true&&C!=="[";if(R[R.length-1]===false||e.stack[t]==="array"&&a.script.arrayFormat==="inline"||e.stack[t]==="object"&&a.script.objectIndent==="inline"){return}R[R.length-1]=false;do{if(e.types[o]==="end"){A=A+1;}else if(e.types[o]==="start"){A=A-1;}if(e.stack[o]==="global")break;if(A===0){if(e.stack[t]==="class"||e.stack[t]==="map"||w===false&&($===false&&e.token[o]!=="("&&e.token[o]!=="x("||$===true&&e.token[o]===",")){if(e.types[o+1]==="template_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}}else if(e.stack[t]==="array"&&e.types[t]==="operator"){if(e.token[o]===",")n[o]=O;if(o===e.begin[t])break}if($===false)break}if(A<0){if(e.types[o+1]==="template_start"||e.types[o+1]==="template_string_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}break}o=o-1;}while(o>-1)}function oe(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{let o=t;let A=false;const L=e.begin[o];do{o=o-1;if(e.lexer[o]==="markup"){A=true;break}if(e.begin[o]!==L)o=e.begin[o];}while(o>L);if(A===true){o=t;do{o=o-1;if(e.begin[o]!==L){o=e.begin[o];}else if(e.token[o]===","){n[o]=O+1;}}while(o>L);n[L]=O+1;n[t-1]=O;}else {n[t-1]=-20;}};if(C===")"&&e.token[t+1]==="."&&$[$.length-1]>-1&&e.token[$[0]]!==":"){let o=e.begin[t];let A=false;let L=false;do{o=o-1;}while(o>0&&n[o]<-9);A=n[o]===O;o=t+1;do{o=o+1;if(e.token[o]==="{"){L=true;break}if(e.begin[o]===e.begin[t+1]&&(e.types[o]==="separator"||e.types[o]==="end")){break}}while(o1){x[x.length-2].push(e.begin[t]);O=O+1;}}if(b!=="separator")fe();if(e.token[t+1]===","&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.token[e.begin[t]-1]===","&&(e.token[t+1]==="}"||e.token[t+1]==="]")&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.stack[t]!=="attribute"){if(C!==")"&&C!=="x)"&&(e.lexer[t-1]!=="markup"||e.lexer[t-1]==="markup"&&e.token[t-2]!=="return")){O=O-1;}if(C==="}"&&e.stack[t]==="switch"&&a.script.noCaseIndent===false){O=O-1;}}if(C==="}"||C==="x}"){if(e.types[t-1]!=="comment"&&E!=="{"&&E!=="x{"&&b!=="end"&&b!=="string"&&b!=="number"&&b!=="separator"&&E!=="++"&&E!=="--"&&(t<2||e.token[t-2]!==";"||e.token[t-2]!=="x;"||E==="break"||E==="return")){let o=t-1;let A=false;const L=e.begin[t];const w=Q.length;do{if(e.begin[o]===L){if(e.token[o]==="="||e.token[o]===";"||e.token[o]==="x;"){A=true;}if(e.token[o]==="."&&n[o-1]>-1){R[R.length-1]=false;n[L]=O+1;n[t-1]=O;break}if(o>0&&e.token[o]==="return"&&(e.token[o-1]===")"||e.token[o-1]==="x)"||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o-1]==="}"||e.token[o-1]==="x}"||e.token[o-1]===";"||e.token[o-1]==="x;")){O=O-1;n[t-1]=O;break}if(e.token[o]===":"&&k.length===0||e.token[o]===","&&A===false){break}if(o===0||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o]==="for"||e.token[o]==="if"||e.token[o]==="do"||e.token[o]==="function"||e.token[o]==="while"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"||e.token[o]==="with"){if(Q[w-1]===false&&w>1&&(t===u-1||e.token[t+1]!==")"&&e.token[t+1]!=="x)")&&e.stack[t]!=="object"){O=O-1;}break}}else {o=e.begin[o];}o=o-1;}while(o>L)}Y.pop();}if(a.script.bracePadding===false&&C!=="}"&&b!=="markup"){n[t-1]=-20;}if(a.script.bracePadding===true&&b!=="start"&&E!==";"&&(n[e.begin[t]]<-9||R[R.length-1]===true)){n[e.begin[t]]=-10;n[t-1]=-10;n.push(-20);}else if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(O);}else if(e.stack[t]==="array"&&($.length>0||S[S.length-1]===true)){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if((e.stack[t]==="object"||e.begin[t]===0&&C==="}")&&$.length>0){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if(C===")"||C==="x)"){const o=C===")"&&E!=="("&&U.length>0?U.pop()+1:0;const A=e.token[e.begin[t]-1]==="if"?(()=>{let L=t;do{L=L-1;if(e.token[L]===")"&&n[L-1]>-1)return o}while(L>e.begin[t]);return o+5})():o;if(o>0&&(a.language!=="jsx"||a.language==="jsx"&&e.token[e.begin[t]-1]!=="render")){const L=a.wrap;const w=e.begin[t];const z=U.length;let q=t-2;if(A>L){n[e.begin[t]]=O+1;n[t-1]=O;do{if(e.begin[q]===w){if(e.token[q]==="&&"||e.token[q]==="||"){n[q]=O+1;}else if(n[q]>-1&&e.types[q]!=="comment"&&e.token[q+1]!=="."){n[q]=n[q]+1;}}else if(n[q]>-1&&e.token[q+1]!=="."){n[q]=n[q]+1;}q=q-1;}while(q>w)}else if(z>0){U[z-1]=U[z-1]+o;}}else if(C===")"&&t>e.begin[t]+2&&e.lexer[e.begin[t]+1]===_&&e.token[e.begin[t]+1]!=="function"){const L=e.begin[t]<0?0:e.begin[t];const w=a.wrap;const z=$.length;let q=0;let W=0;let se=0;let F=0;let K=0;let V=false;let ne=false;let he=O+1;let re=false;let ae=false;let je=false;if(n[L]<-9){W=L;do{W=W+1;}while(W0&&se0)se=q;W=W-1;}while(W>L&&n[W]<-9);if(e.token[W+1]===".")he=n[W]+1;if(q>w-1&&w>0&&E!=="("&&se!==-1&&R[R.length-2]===false){if(e.token[L-1]==="if"&&Q[Q.length-1]===true||e.token[L-1]!=="if"){n[L]=he;if(e.token[L-1]==="for"){W=L;do{W=W+1;if(e.token[W]===";"&&e.begin[W]===L){n[W]=he;}}while(W=w&&w>0)re=true;}else if(e.types[W]==="markup"&&ae===false){ae=true;}if(n[W]>-9&&e.token[W]!==","&&e.types[W]!=="markup"){q=0;}else {if(n[W]===-10)q=q+1;q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){re=true;}}}else {if(n[W]>-9){q=0;}else {q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){re=true;}}}}while(W>L&&re===false);if(V===false&&e.token[e.begin[t]+1].charAt(0)==="`"){n[e.begin[t]]=-20;n[t-1]=-20;}else if((V===true||ae===true)&&q>=w&&w>0||n[L]>-9){if(je===true){he=n[L];if(e.token[L-1]==="["){W=t;do{W=W+1;if(e.types[W]==="end"||e.token[W]===","||e.token[W]===";"){break}}while(W0&&$[z-1]>W){he=he-z;}R[R.length-1]=false;W=t;do{W=W-1;if(e.begin[W]===L){if(e.token[W].indexOf("=")>-1&&e.types[W]==="operator"&&e.token[W].indexOf("!")<0&&e.token[W].indexOf("==")<0&&e.token[W]!=="<="&&e.token[W].indexOf(">")<0){q=W;do{q=q-1;if(e.begin[q]===L&&(e.token[q]===";"||e.token[q]===","||q===L)){break}}while(q>L)}else if(e.token[W]===","){n[W]=he;}else if(n[W]>-9&&ne===false&&(e.token[L-1]!=="for"||e.token[W+1]==="?"||e.token[W+1]===":")&&(e.token[e.begin[t]]!=="("||e.token[W]!=="+")){n[W]=n[W]+1;}}else if(n[W]>-9&&ne===false){n[W]=n[W]+1;}}while(W>L);n[L]=he;n[t-1]=he-1;}else {n[t-1]=-20;}if(e.token[e.begin[t]-1]==="+"&&n[e.begin[t]]>-9){n[e.begin[t]-1]=-10;}}else if(a.language==="jsx"){c();}else {n[t-1]=-20;}n.push(-20);}else if(R[R.length-1]===true){if(C==="]"&&e.begin[t]-1>0&&e.token[e.begin[e.begin[t]-1]]==="["){R[R.length-2]=false;}if(e.begin[t]-1){n[t-1]=n[e.begin[t]]-1;}else {n[t-1]=-20;}n.push(-20);}else if(e.types[t-1]==="comment"&&e.token[t-1].substring(0,2)==="//"){if(e.token[t-2]==="x}")n[t-3]=O+1;n[t-1]=O;n.push(-20);}else if(e.types[t-1]!=="comment"&&(E==="{"&&C==="}"||E==="["&&C==="]")){n[t-1]=-20;n.push(-20);}else if(C==="]"){if(Q[Q.length-1]===true&&R[R.length-1]===false&&a.script.arrayFormat!=="inline"||E==="]"&&n[t-2]===O+1){n[t-1]=O;n[e.begin[t]]=O+1;}else if(n[t-1]===-10){n[t-1]=-20;}if(e.token[e.begin[t]+1]==="function"){n[t-1]=O;}else if(Q[Q.length-1]===false){if(E==="}"||E==="x}")n[t-1]=O;let o=t-1;let A=1;do{if(e.token[o]==="]")A=A+1;if(e.token[o]==="["){A=A-1;if(A===0){if(o>0&&(e.token[o+1]==="{"||e.token[o+1]==="x{"||e.token[o+1]==="[")){n[o]=O+1;break}if(e.token[o+1]!=="["||i===false){n[o]=-20;break}break}}if(A===1&&e.token[o]==="+"&&n[o]>1){n[o]=n[o]-1;}o=o-1;}while(o>-1)}else if(a.language==="jsx"){c();}if(a.script.arrayFormat==="inline"){let o=t;const A=e.begin[t];do{o=o-1;if(e.types[o]==="end")break}while(o>A);if(o>A){n[e.begin[t]]=O+1;n[t-1]=O;}else {n[e.begin[t]]=-20;n[t-1]=-20;}}else if(n[e.begin[t]]>-1){n[t-1]=n[e.begin[t]]-1;}n.push(-20);}else if(C==="}"||C==="x}"||Q[Q.length-1]===true){if(C==="}"&&E==="x}"&&e.token[t+1]==="else"){n[t-2]=O+2;n.push(-20);}else {n.push(O);}n[t-1]=O;}else {n.push(-20);}if(e.types[t-1]==="comment")n[t-1]=O;ce();i=Q[Q.length-1];Q.pop();x.pop();S.pop();B.pop();N.pop();R.pop();P.pop();}function ce(){let $=0;const c=x[x.length-1];if(c===void 0)return;$=c.length-1;if($<1&&c[$]<0&&(C===";"||C==="x;"||C===")"||C==="x)"||C==="}"||C==="x}")){c.pop();return}if($<0||c[$]<0)return;if(C===":"){if(e.token[c[$]]!=="?"){do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1&&e.token[c[$]]!=="?")}c[$]=t;n[t-1]=O;}else {do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1)}if((e.stack[t]==="array"||C===",")&&c.length<1)c.push(-1);}function X(){const $=t;do{if(e.lexer[t+1]===_&&e.begin[t+1]<$)break;if(e.token[$-1]==="return"&&e.types[t]==="end"&&e.begin[t]===$)break;n.push(0);t=t+1;}while(t0){if(e.token[c-1]==="if"){O=O-2;}else {O=O-1;}}break}}$=$-1;}while($>0&&$>c)}function Oe(){if(e.token[t+1]!==","&&C.indexOf("/>")!==C.length-2||e.token[t+1]===","&&e.token[e.begin[t]-3]!=="React"){G(false,false);}if(E==="return"||E==="?"||E===":"){n[t-1]=-10;n.push(-20);}else if(b==="start"||e.token[t-2]==="return"&&e.stack[t-1]==="method"){n.push(O);}else {n.push(-20);}}function I(){const $=x[x.length-1]===void 0?[]:x[x.length-1];function c(){const o=e.token[t+1];let A=0;let L=0;let w=t;let z=C==="+"?O+2:O;let q=0;if(a.wrap<1){n.push(-10);return}do{w=w-1;if(e.token[e.begin[t]]==="("){if(w===e.begin[t]){q=A;}if(e.token[w]===","&&e.begin[w]===e.begin[t]&&Q[Q.length-1]===true){break}}if(A>a.wrap-1)break;if(n[w]>-9)break;if(e.types[w]==="operator"&&e.token[w]!=="="&&e.token[w]!=="+"&&e.begin[w]===e.begin[t]){break}A=A+e.token[w].length;if(w===e.begin[t]&&e.token[w]==="["&&A-9)break;if(n[w]===-10)A=A+1;}while(w>0);if(q>0)q=q+o.length;A=A+o.length;L=w;if(A>a.wrap-1&&n[w]<-9){do{L=L-1;}while(L>0&&n[L]<-9)}if(e.token[L+1]==="."&&e.begin[t]<=e.begin[L]){z=z+1;}else if(e.types[L]==="operator"){z=n[L];}L=o.length;if(A+L0){w=a.wrap-q;}else {w=a.wrap-A;}if(w>0&&w<5){n.push(z);if(e.token[t].charAt(0)==='"'||e.token[t].charAt(0)==="'"){t=t+1;n.push(-10);}return}if(e.token[e.begin[t]]!=="("||q>a.wrap-1||q===0){if(q>0)A=q;if(A-o.lengtha.wrap-4){n.push(z);return}n.push(-10);return}n.push(z);return}n.push(-10);}fe();if($.length>0&&$[$.length-1]>-1&&e.stack[t]==="array"){S[S.length-1]=true;}if(C!==":"){if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&R.length>0){G(true,false);}if(C!=="?"&&e.token[$[$.length-1]]==="."){let o=0;let A=t;const L=e.begin[A];do{if(e.begin[A]===L){if(e.token[A+1]==="{"||e.token[A+1]==="["||e.token[A]==="function"){break}if(e.token[A]===","||e.token[A]===";"||e.types[A]==="end"||e.token[A]===":"){$.pop();O=O-1;break}if(e.token[A]==="?"||e.token[A]===":"){if(e.token[$[$.length-1]]==="."&&o<2)$[$.length-1]=L+1;break}if(e.token[A]===".")o=o+1;}A=A+1;}while(A-1&&n[o]<-9);$.push(t);O=O+1;if(n[o]===O&&e.token[o+1]!==":"){O=O+1;$.push(t);}n[t-1]=O;if(e.token[e.begin[t]]==="("&&($.length<2||$[0]===$[1])){R[R.length-1]=false;if(t-2===e.begin[t]){n[e.begin[t]]=O-1;}else {n[e.begin[t]]=O;}o=t-2;do{if(e.types[o]==="end"&&n[o-1]>-1)break;if(n[o]>-1)n[o]=n[o]+1;o=o-1;}while(o>e.begin[t])}}n.push(-10);return}if(C===":"){if(e.stack[t]==="map"||e.types[t+1]==="type"||e.types[t+1]==="type_start"){n[t-1]=-20;n.push(-10);return}if(k.length>0&&e.begin[k[k.length-1]]===e.begin[t]){let o=t;const A=e.begin[t];do{o=o-1;if(e.begin[o]===A){if(e.token[o]===","||e.token[o]===";"){n[t-1]=-20;break}if(e.token[o]==="?"){k.pop();ce();if(a.script.ternaryLine===true)n[t-1]=-10;n.push(-10);return}}else if(e.types[o]==="end"){o=e.begin[o];}}while(o>A)}if(e.token[t-2]==="where"&&e.stack[t-2]===e.stack[t]){n[t-1]=-10;n.push(-10);return}if(b==="reference"&&e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("){n[t-1]=-20;n.push(-10);return}if((E===")"||E==="x)")&&e.token[e.begin[t-1]-2]==="function"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(-10);return}if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&(b==="reference"||E===")"||E==="]"||E==="?")&&(e.stack[t]==="map"||e.stack[t]==="class"||e.types[t+1]==="reference")&&(k.length===0||k[k.length-1]-1||e.types[t-2]==="word"&&e.stack[t]!=="switch")){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="switch"&&(k.length<1||k[k.length-1]0){n[t-1]=O;}else {n[t-1]=-10;}n.push(-10);return}if(C==="++"||C==="--"){if(b==="number"||b==="reference"){n[t-1]=-20;n.push(-10);}else if(t-1&&(/\d/.test(o.charAt(1))===true||o.charAt(1)==="."||o.charAt(1)==="-"||o.charAt(1)==="+")){n.push(-20);return}}return c()}if(e.types[t-1]!=="comment"){if(E==="("){n[t-1]=-20;}else if(C==="*"&&e.stack[t]==="object"&&e.types[t+1]==="reference"&&(E==="{"||E===",")){n[t-1]=O;}else if(C!=="?"||k.length===0){n[t-1]=-10;}}if(C.indexOf("=")>-1&&C!=="=="&&C!=="==="&&C!=="!="&&C!=="!=="&&C!==">="&&C!=="<="&&C!=="=>"&&e.stack[t]!=="method"&&e.stack[t]!=="object"){let o=t+1;let A=0;let L=false;let w="";if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&e.token[t+1]!=="function"){return}do{if(e.types[o]==="start"){if(L===true&&e.token[o]!=="["){if(P[P.length-1]===true){P[P.length-1]=false;}break}A=A+1;}if(e.types[o]==="end")A=A-1;if(A<0){if(P[P.length-1]===true){P[P.length-1]=false;}break}if(A===0){w=e.token[o];if(L===true){if(e.types[o]==="operator"||e.token[o]===";"||e.token[o]==="x;"||e.token[o]==="?"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"){if(w!==void 0&&(w==="?"||w.indexOf("=")>-1&&w!=="=="&&w!=="==="&&w!=="!="&&w!=="!=="&&w!==">="&&w!=="<=")){if(P[P.length-1]===false){P[P.length-1]=true;}}if((w===";"||w==="x;"||w==="var"||w==="let"||w==="const")&&P[P.length-1]===true){P[P.length-1]=false;}break}if(P[P.length-1]===true&&(w==="return"||w==="break"||w==="continue"||w==="throw")){P[P.length-1]=false;}}if(w===";"||w==="x;"||w===",")L=true;}o=o+1;}while(o{let c=e.begin[t];if(c<0){v.push([e.token[t],-1]);}else {if(e.stack[c+1]!=="function"){do{c=e.begin[c];}while(c>-1&&e.stack[c+1]!=="function")}v.push([e.token[t],c]);}};if(e.types[t-1]==="comment"){n[t-1]=O;}else if(b==="end"&&E!==")"&&e.token[e.begin[t-1]-1]!==")"){n[t-1]=-10;}else if(b!=="separator"&&b!=="start"&&b!=="end"&&b.indexOf("template_string")<0){if(b==="word"||b==="operator"||b==="property"||b==="type"||b==="reference"){n[t-1]=-10;}else {n[t-1]=-20;}}if(E==="var"&&e.lexer[t-1]===_){$();}else if(E==="function"){v.push([e.token[t],t]);}else if(E==="let"||E==="const"){v.push([e.token[t],t]);}else if(e.stack[t]==="arguments"){v.push([e.token[t],t]);}else if(E===","){let c=t;do{c=c-1;}while(c>e.begin[t]&&e.token[c]!=="var"&&e.token[c]!=="let"&&e.token[c]!=="const");if(e.token[c]==="var"){$();}else if(e.token[c]==="let"||e.token[c]==="const"){v.push([e.token[t],t]);}}n.push(-10);}function ee(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{if(a.script.methodChain>0){let o=t;let A=e.begin[t];const L=[t];const w=e.token[A-1]==="if";do{o=o-1;if(e.types[o]==="end")o=e.begin[o];if(e.begin[o]===A){if(e.types[o]==="string"&&e.token[o].indexOf("${")===e.token[o].length-2){break}if(e.token[o]==="."){if(n[o-1]>0){n[t-1]=w===true?O+1:O;return}L.push(o);}else if(e.token[o]===";"||e.token[o]===","||e.types[o]==="operator"||(e.types[o]==="word"||e.types[o]==="reference")&&(e.types[o-1]==="word"||e.types[o-1]==="reference")){break}}}while(o>A);if(L.length-1)n[o]=n[o]+1;o=o+1;}while(o0){if(e.stack[t]==="object"||e.stack[t]==="array"){G(true,false);}else {G(false,false);}}if(a.script.methodChain===0){n[t-1]=-20;}else if(a.script.methodChain<0){if(e.lines[t]>0){c();}else {n[t-1]=-20;}}else {c();}n.push(-20);return}if(C===","){fe();if(Q[Q.length-1]===false&&(e.stack[t]==="object"||e.stack[t]==="array"||e.stack[t]==="paren"||e.stack[t]==="expression"||e.stack[t]==="method")){Q[Q.length-1]=true;if(e.token[e.begin[t]]==="("){let o=t;do{o=o-1;if(e.begin[o]===e.begin[t]&&e.token[o]==="+"&&n[o]>-9){n[o]=n[o]+2;}}while(o>e.begin[t])}}if(e.stack[t]==="array"&&a.script.arrayFormat==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="array"&&a.script.arrayFormat==="inline"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="object"&&a.script.objectIndent==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="object"&&a.script.objectIndent==="inline"){n[t-1]=-20;n.push(-10);return}if($.length>0){if($[$.length-1]>-1)ce();n[t-1]=-20;n.push(O);return}if(e.token[t-2]===":"&&e.token[t-4]==="where"){n[t-1]=-20;n.push(-10);return}n[t-1]=-20;if(e.types[t+1]!=="end"){B[B.length-1]=B[B.length-1]+1;}if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&a.language!=="jsx"&&e.stack[t]!=="global"&&(e.types[t-1]!=="string"&&e.types[t-1]!=="number"||e.token[t-2]!=="+"||e.types[t-1]==="string"&&e.types[t-1]!=="number"&&e.token[t-2]==="+"&&e.types[t-3]!=="string"&&e.types[t-3]!=="number")){n.push(-10);return}if(b==="reference"&&e.types[t-2]==="word"&&"var-let-const-from".indexOf(e.token[t-2])<0&&(e.types[t-3]==="end"||e.token[t-3]===";")){N[N.length-1]=true;n.push(-10);return}if(N[N.length-1]===true||e.stack[t]==="notation"){n.push(-10);return}if(B[B.length-1]>3&&(e.stack[t]==="array"||e.stack[t]==="object")){if(R[R.length-1]===true)G(true,true);n[t-1]=-20;if(S[S.length-1]===true){n.push(O);return}const o=e.begin[t];let A=t;do{if(e.types[A]==="end"){A=e.begin[A];}else {if(e.token[A]===","&&e.types[A+1]!=="comment"){n[A]=O;}}A=A-1;}while(A>o);n[o]=O;S[S.length-1]=true;return}if(e.stack[t]==="object"){if(R[R.length-1]===true&&e.types[e.begin[t]-1]!=="word"&&e.types[e.begin[t]-1]!=="reference"&&e.token[e.begin[t]-1]!=="("&&e.token[e.begin[t]-1]!=="x("){const o=e.begin[t];let A=t-1;do{if(e.begin[A]===o){if(e.token[A]===",")break;if(e.token[A]===":"){G(true,false);break}}A=A-1;}while(A>o)}}if(R[R.length-1]===false||e.token[t-2]==="+"&&(b==="string"||b==="number")&&n[t-2]>0&&(E.charAt(0)==='"'||E.charAt(0)==="'")){if(e.stack[t]==="method"){if(e.token[t-2]==="+"&&(E.charAt(0)==='"'||E.charAt(0)==="'")&&(e.token[t-3].charAt(0)==='"'||e.token[t-3].charAt(0)==="'")){n.push(O+2);return}if(e.token[t-2]!=="+"){n.push(-10);return}}n.push(O);return}if(R[R.length-1]===true&&e.stack[t]!=="object"){n.push(-10);return}if(B[B.length-1]<4&&(e.stack[t]==="array"||e.stack[t]==="object")){n.push(-10);return}n.push(O);return}if(C===";"||C==="x;"){fe();if(e.token[t+1]!==void 0&&e.types[t+1].indexOf("attribute")>0&&e.types[t+1].indexOf("end")>0){n[t-1]=-20;n.push(O-1);return}if(Y[Y.length-1]>-1&&e.stack[Y[Y.length-1]]!=="expression"){let o=t;do{o=o-1;if(e.token[o]===";")break;if(e.token[o]===","){O=O-1;break}if(e.types[o]==="end")o=e.begin[o];}while(o>0&&o>e.begin[t])}Y[Y.length-1]=-1;ce();if(e.token[e.begin[t]-1]!=="for")G(false,false);N[N.length-1]=false;n[t-1]=-20;if(e.begin[t]>0&&e.token[e.begin[t]-1]==="for"&&e.stack[t]!=="for"){n.push(-10);return}n.push(O);return}n.push(-20);}function Ne(){const $=e.stack[t+1];const c=t===0?e.stack[t]:e.stack[t-1];if(E===")"||(c==="object"||c==="array")&&E!=="]"){if($!=="method"||$==="method"&&e.token[t+1]!==")"&&e.token[t+2]!==")"){if(E===")"&&($!=="function"||e.token[e.begin[e.begin[t-1]-1]]==="("||e.token[e.begin[e.begin[t-1]-1]]==="x(")){G(false,false);}else if(e.types[t+1]!=="end"&&e.types[t+2]!=="end"){G(true,false);}}}Q.push(false);x.push([]);P.push(false);S.push(false);N.push(false);B.push(0);if(a.script.neverFlatten===true||$==="array"&&a.script.arrayFormat==="indent"||$==="attribute"||b==="generic"||$==="class"&&E!=="("&&E!=="x("||C==="["&&e.token[t+1]==="function"){R.push(false);}else {if($==="expression"||$==="method"){R.push(true);}else if(($==="object"||$==="class")&&(E==="("||E==="x("||b==="word"||b==="reference")){R.push(true);}else if($==="array"||C==="("||C==="x("){R.push(true);}else if(C==="{"&&$==="object"&&b!=="operator"&&b!=="start"&&b!=="string"&&b!=="number"&&c!=="object"&&c!=="array"&&t>0){R.push(true);}else {R.push(false);}}if(C!=="("&&C!=="x("&&e.stack[t+1]!=="attribute"){O=O+1;}if(C==="{"||C==="x{"){Y.push(-1);if(e.types[t-1]!=="comment"){if(b==="markup"){n[t-1]=O;}else if(a.script.braceAllman===true&&b!=="operator"&&E!=="return"){n[t-1]=O-1;}else if(e.stack[t+1]!=="block"&&($==="function"||E===")"||E==="x)"||E===","||E==="}"||b==="markup")){n[t-1]=-10;}else if(E==="{"||E==="x{"||E==="["||E==="}"||E==="x}"){n[t-1]=O-1;}}if($==="object"){if(a.script.objectIndent==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.objectIndent==="inline"){R[R.length-1]=true;n.push(-20);return}}if($==="switch"){if(a.script.noCaseIndent===true){n.push(O-1);return}O=O+1;n.push(O);return}if(R[R.length-1]===true){if(b!=="word"&&b!=="reference"){n.push(-20);return}}n.push(O);return}if(C==="("||C==="x("){if(a.wrap>0&&C==="("&&e.token[t+1]!==")"){U.push(1);}if(E==="-"&&(e.token[t-2]==="("||e.token[t-2]==="x(")){n[t-2]=-20;}if(b==="end"&&c!=="if"&&c!=="for"&&c!=="catch"&&c!=="else"&&c!=="do"&&c!=="try"&&c!=="finally"&&c!=="catch"){if(e.types[t-1]==="comment"){n[t-1]=O;}else {n[t-1]=-20;}}if(E==="async"){n[t-1]=-10;}else if($==="method"||e.token[t-2]==="function"&&b==="reference"){if(E==="import"||E==="in"||a.script.functionNameSpace===true){n[t-1]=-10;}else if(E==="}"&&e.stack[t-1]==="function"||b==="word"||b==="reference"||b==="property"){n[t-1]=-20;}else if(c!=="method"&&$!=="method"){n[t-1]=O;}}if(E==="+"&&(e.token[t-2].charAt(0)==='"'||e.token[t-2].charAt(0)==="'")){n.push(O);return}if(E==="}"||E==="x}"){n.push(-20);return}if(E==="-"&&(t<2||e.token[t-2]!==")"&&e.token[t-2]!=="x)"&&e.token[t-2]!=="]"&&e.types[t-2]!=="reference"&&e.types[t-2]!=="string"&&e.types[t-2]!=="number")||a.script.functionSpace===false&&E==="function"){n[t-1]=-20;}n.push(-20);return}if(C==="["){if(E==="[")Q[Q.length-2]=true;if(E==="return"||E==="var"||E==="let"||E==="const"){n[t-1]=-10;}else if(e.types[t-1]!=="comment"&&e.stack[t-1]!=="attribute"&&(b==="end"||b==="word"||b==="reference")){n[t-1]=-20;}else if(E==="["||E==="{"||E==="x{"){n[t-1]=O-1;}if(e.stack[t]==="attribute"){n.push(-20);return}if(a.script.arrayFormat==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.arrayFormat==="inline"){R[R.length-1]=true;n.push(-20);return}if($==="method"||R[R.length-1]===true){n.push(-20);return}let o=t+1;do{if(e.token[o]==="]"){n.push(-20);return}if(e.token[o]===","){n.push(O);return}o=o+1;}while(o0){n[t-1]=O;}}function We(){if(j==="template_else"){n[t-1]=O-1;n.push(O);}else if(j==="template_start"){O=O+1;if(e.lines[t-1]<1)n[t-1]=-20;if(e.lines[t]>0||E.length===1&&b==="string"){n.push(O);}else {n.push(-20);}}else if(j==="template_end"){O=O-1;if(b==="template_start"||e.lines[t-1]<1){n[t-1]=-20;}else {n[t-1]=O;}if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}else if(j==="template"){if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}}function ze(){if(j==="template_string_start"){O=O+1;n.push(O);}else if(j==="template_string_else"){fe();n[t-1]=O-1;n.push(O);}else {fe();O=O-1;n[t-1]=O;n.push(-10);}if(t>2&&(e.types[t-2]==="template_string_else"||e.types[t-2]==="template_string_start")){if(a.script.bracePadding===true){n[t-2]=-10;n[t-1]=-10;}else {n[t-2]=-20;n[t-1]=-20;}}}function Z(){if(e.token[t-1]===","||e.token[t-1]===":"&&e.stack[t-1]!=="data_type"){n[t-1]=-10;}else {n[t-1]=-20;}if(e.types[t]==="type"||e.types[t]==="type_end"){n.push(-10);}if(e.types[t]==="type_start"){n.push(-20);}}function D(){if((E===")"||E==="x)")&&e.stack[t]==="class"&&(e.token[e.begin[t-1]-1]==="static"||e.token[e.begin[t-1]-1]==="final"||e.token[e.begin[t-1]-1]==="void")){n[t-1]=-10;n[e.begin[t-1]-1]=-10;}if(E==="]")n[t-1]=-10;if(C==="else"&&E==="}"){if(e.token[t-2]==="x}")n[t-3]=n[t-3]-1;if(a.script.braceAllman===true||a.script.elseNewline===true){n[t-1]=O;}}if(C==="new"&&h.has(e.token[t+1]));if(C==="from"&&b==="end"&&t>0&&(e.token[e.begin[t-1]-1]==="import"||e.token[e.begin[t-1]-1]===",")){n[t-1]=-10;}if(C==="function"){if(a.script.functionSpace===false&&t1){if(e.types[t-2]==="operator"||e.token[t-2]===","){n[t-1]=-20;}else if(e.types[t-2]==="start"){n[t-2]=-20;n[t-1]=-20;}}else if(C==="while"&&(E==="}"||E==="x}")){let $=t-1;let c=0;do{if(e.token[$]==="}"||e.token[$]==="x}")c=c+1;if(e.token[$]==="{"||e.token[$]==="x{")c=c-1;if(c===0){if(e.token[$-1]==="do"){n[t-1]=-10;break}n[t-1]=O;break}$=$-1;}while($>-1)}else if(C==="in"||(C==="else"&&a.script.elseNewline===false&&a.script.braceAllman===false||C==="catch")&&(E==="}"||E==="x}")){n[t-1]=-10;}else if(C==="var"||C==="let"||C==="const"){Y[Y.length-1]=t;if(b==="end")n[t-1]=O;if(e.token[e.begin[t]-1]!=="for"){let $=t+1;let c=0;do{if(e.types[$]==="end")c=c-1;if(e.types[$]==="start")c=c+1;if(c<0||c===0&&(e.token[$]===";"||e.token[$]===",")){break}$=$+1;}while($0&&e.token[t]!==")"){if(e.types[t]==="comment"&&U[U.length-1]>-1){U[U.length-1]=a.wrap+1;}else if(n[t]>-1||e.token[t].charAt(0)==="`"&&e.token[t].indexOf(pe)>0){U[U.length-1]=-1;}else if(U[U.length-1]>-1){U[U.length-1]=U[U.length-1]+e.token[t].length;if(n[t]===-10)U[U.length-1]=U[U.length-1]+1;}}}else {X();}t=t+1;}while(t{const t=[];const O=(()=>{const n=[];const k=a.indentChar;let x=a.indentSize;if(typeof x!=="number"||x<1)return "";do{n.push(k);x=x-1;}while(x>0);return n.join("")})();const T=a.crlf===true?"\r\n":pe;const i=a.preserveLine+1;const j=["x;","x}","x{","x(","x)"];let C=M.start;let b="";let E=a.indentLevel;function Y(n){const k=[];const x=(()=>{if(C===u-1)return 1;if(e.lines[C+1]-1>i)return i;if(e.lines[C+1]>1)return e.lines[C+1]-1;return 1})();let S=0;if(n<0)n=0;do{k.push(T);S=S+1;}while(S0){S=0;do{k.push(O);S=S+1;}while(S-1&&e.types[B]!=="comment"){if(e.token[B+1]==="."){S=S+a.indentSize*a.indentChar.length;}break}}else if(g[B]>-1){break}if(e.types[B]!=="comment"){if(g[B-1]===-10)S=S+1;S=e.token[B].length+S;}B=B-1;}while(B>N);P=B;if(e.token[P]===","&&e.token[R+1]==="="){do{if(e.types[P]==="end")P=e.begin[P];if(e.begin[P]===N){if(e.token[P]===";"||e.token[P]==="x;")break;if(e.token[P]==="var"||e.token[P]==="const"||e.token[P]==="let"){S=S+a.indentSize*a.indentChar.length;break}}P=P-1;}while(P>N)}if(S>x)x=S;U.push([R,S]);R=B;}else if(e.types[R]==="end"){R=e.begin[R];}R=R-1;}while(R>N);R=U.length;if(R>0){do{R=R-1;B=U[R][1];if(B0)}};C=u;do{C=C-1;if(e.lexer[C]==="script"){if(e.token[C]==="}"&&e.token[C-1]!=="{"&&g[e.begin[C]]>0){n(C);}}else {C=e.begin[C];}}while(C>0)}C=M.start;do{if(e.lexer[C]===_||M.beautify[e.lexer[C]]===void 0){if(e.types[C]==="comment"&&a.commentIndent===true){if(/\n/.test(e.token[C])){const n=e.begin[C]>-1?e.token[C].charAt(2)==="*"?$e(g[C],O)+a.indentChar:$e(g[C],O):a.indentChar;const k=e.token[C].split(/\n/);let x=1;do{k[x]=n+k[x].trimStart();x=x+1;}while(x-1){if((g[C]>-1&&e.token[C]==="{"||g[C]>-1&&e.token[C+1]==="}")&&e.lines[C]<3&&a.script.braceNewline===true){if(e.lines[C+1]<3)t.push(Y(0));}t.push(Y(g[C]));E=g[C];}else if(g[C]===-10){t.push(de);if(e.lexer[C+1]!==_)E=E+1;}}else {if(m[C]===C){t.push(e.token[C]);}else {M.end=m[C];M.start=C;a.indentLevel=E;b=M.beautify[e.lexer[C]](a).replace(we,y);t.push(b);C=M.iterator;if(g[C]===-10){t.push(de);}else if(g[C]>-1){t.push(Y(g[C]));}a.indentLevel=0;}}C=C+1;}while(C" instead of "/>".',lexer:"markup",type:"boolean"},classPadding:{description:"Inserts new line characters between every CSS code block.",default:false,type:"boolean",lexer:"style"},sortSelectors:{default:false,type:"boolean",description:"If comma separated CSS selectors should present on a single line of code.",lexer:"style"},sortProperties:{lexer:"style",description:"This option will alphabetically sort CSS properties contained within classes.",default:false,type:"boolean"},noLeadZero:{lexer:"style",description:"This will eliminate leading zeros from numbers expressed within values.",default:false,type:"boolean"},compressCSS:{lexer:"style",description:"If CSS should be beautified in a style where the properties and values are minifed for faster reading of selectors.",default:false,type:"boolean"},forceValue:{lexer:"style",description:"If CSS selector property values should be indented onto newlines",default:"preserve",type:"select",values:[{rule:"preserve",description:"Preserves property values, output does not augment provided structures"},{rule:"collapse",description:"Collapsed all selector property values onto newlines"},{rule:"wrap",description:"Collapase only selector property values which exceed wrap limit"}]},braceAllman:{lexer:"script",default:false,description:'Determines if opening curly braces will exist on the same line as their condition or be forced onto a new line, otherwise known as "Allman Style" indentation.',type:"boolean"},bracePadding:{default:false,description:"This will create a newline before and after objects values",type:"boolean",lexer:"script"},braceNewline:{default:false,description:"If true an empty line will be inserted after opening curly braces and before closing curly braces.",type:"boolean",lexer:"script"},braceStyle:{default:"none",description:"Emulates JSBeautify's brace_style option using existing Prettify options",type:"select",lexer:"script",values:[{rule:"none",description:"Ignores this option"},{rule:"collapse",description:"Sets formatObject to indent and neverflatten to true."},{rule:"collapse-preserve-inline",description:"Sets formatObject to inline and bracePadding to true"},{rule:"expand",description:"Sets objectIndent to indent and braceNewline + neverflatten to true."}]},arrayFormat:{lexer:"script",description:"Determines if all array indexes should be indented, never indented, or left to the default",type:"select",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},objectSort:{default:false,description:"This option will alphabetically sort object properties in JSON objects",type:"boolean",lexer:"script"},objectIndent:{description:"This option will alphabetically sort object properties in JSON objects",type:"select",lexer:"script",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},functionSpace:{lexer:"script",default:true,type:"boolean",description:"Inserts a space following the function keyword for anonymous functions."},functionNameSpace:{lexer:"script",default:true,type:"boolean",description:"If a space should follow a JavaScript function name."},methodChain:{lexer:"script",default:-1,description:"When to break consecutively chained methods and properties onto separate lines. A negative value disables this option. A value of 0 ensures method chainsare never broken.",type:"number"},caseSpace:{default:false,type:"boolean",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation thereby keeping the case on a single line of code.",lexer:"script"},inlineReturn:{lexer:"script",default:true,type:"boolean",description:"Inlines return statements contained within `if` and `else` conditions. This rules also augments code and will reason about your structure to output the best and most readable results."},elseNewline:{lexer:"script",default:false,type:"boolean",description:'If keyword "else" is forced onto a new line.'},ternaryLine:{lexer:"script",description:"If ternary operators in JavaScript `?` and `:` should remain on the same line.",type:"boolean",default:false},neverFlatten:{lexer:"script",default:true,description:"If destructured lists in script should never be flattend.",type:"boolean"},variableList:{lexer:"script",description:"If consecutive JavaScript variables should be merged into a comma separated list or if variables in a list should be separated. each \u2014 Ensure each reference is a single declaration statement.",type:"select",default:"none",values:[{rule:"none",description:"Ignores this option"},{rule:"each",description:"Ensure each reference is a single declaration statement"},{rule:"list",description:"Ensure consecutive declarations are a comma separated list"}]},vertical:{lexer:"script",description:"If lists of assignments and properties should be vertically aligned",type:"boolean",default:false},noCaseIndent:{lexer:"script",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation, thereby keeping the case on a single line of code.",default:false,type:"boolean"},noSemicolon:{lexer:"script",description:"Removes semicolons that would be inserted by ASI. This option is in conflict with option `attemptCorrection` and takes precedence over conflicting features. Use of this option is a possible security/stability risk.",default:false,type:"boolean"},endComma:{description:"If there should be a trailing comma in arrays and objects.",type:"select",lexer:"script",default:"none",values:[{rule:"none",description:"Ignore this option"},{rule:"always",description:"Always ensure there is a tailing comma"},{rule:"never",description:"Remove trailing commas"}]}};var lt={};at(lt,{format:()=>Fe,formatSync:()=>ht,language:()=>qe,options:()=>Ie,parse:()=>rt});function st(a){const f=a.source.search(et);const h=a.source.search(tt);const p=Re(Se);const r=p.length;let m=0;if(h>-1&&a.source.slice(0,h).trimStart()===y)return false;if(f>-1&&(f===0||`"':`.indexOf(a.source.charAt(f-1))<0)){let n=function(){if(g.charAt(t-1)!=="\\")return false;let k=t;do{k=k-1;}while(k>0&&g.charAt(k)==="\\");return (t-k)%2===0};const v=[];const u=f;const g=a.source;const l=g.length;let t=u;let O=0;let T=y;let i=y;let j=y;let C=y;let b=[];let E=[];let Y;let Q;if(g.charAt(t)==="<"){Q="")break;if(Q==="//"&&g.charAt(t)==="\n")break;if(Q==="/*"&&g.slice(t-1,t+1)==="*/")break;if(Q.charCodeAt(1)===37&&g.slice(t-1,t+1)==="%"&&g.indexOf("endcomment",g.indexOf("{%",Y))>0)break}else if(g.charAt(t)===T&&T!=="${"){T=y;}else if(T==="`"&&g.slice(t,t+2)==="${"){T="${";}else if(T==="${"&&g.charAt(t)==="}"){T="`";}}t=t+1;}while(t0){T=g.slice(O,t+1);if(Q==="","comment");}else if(b[r]==="<"){X();}else if(b[r]==="/"&&(r===C-1||b[r+1]==="*")){N();}else if((s.count<0||i.lines[s.count]>0)&&b[r]==="#"&&b[r+1]==="!"&&(b[r+2]==="/"||b[r+2]==="[")){oe("#!"+b[r+2],"\n","string");}else if(b[r]==="/"&&(r===C-1||b[r+1]==="/")){ce();}else if(d(b[r],96)||d(b[r],125)&&s.structure[s.structure.length-1][0]==="template_string"){if(u>-1)$();m=ze();if(d(m,125)&&m.slice(m.length-2)==="${"){e="template_string_else";ee("template_string");}else if(m.slice(m.length-2)==="${"){e="template_string_start";ee("template_string");}else if(d(m[0],125)){e="template_string_end";ee("");}else {e="string";ee("");}}else if(b[r]==='"'||b[r]==="'"){oe(b[r],b[r],"string");}else if(b[r]==="-"&&(r-1)$();m="-";e="operator";ee("");}else if(u===-1&&(b[r]!=="0"||b[r]==="0"&&b[r+1]!=="b")&&(/\d/.test(b[r])||r!==C-2&&b[r]==="-"&&b[r+1]==="."&&/\d/.test(b[r+2])||r!==C-1&&(b[r]==="-"||b[r]===".")&&/\d/.test(b[r+1]))){if(u>-1)$();if(e==="end"&&b[r]==="-"){m="-";e="operator";}else {m=Oe();e="number";}ee("");}else if(b[r]===":"&&b[r+1]===":"){if(u>-1)$();if(h.script.correct===true)ie();P();r=r+1;m="::";e="separator";ee("");}else if(b[r]===","){if(u>-1)$();if(h.script.correct===true)ie();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(e==="comment"){H();}else if(S.len>-1&&S.count[S.len]===0&&h.script.variableList==="each"){P();m=";";e="separator";ee("");m=S.word[S.len];e="word";ee("");S.index[S.len]=s.count;}else {m=",";e="separator";P();ee("");}}else if(b[r]==="."){if(u>-1)$();k[k.length-1]=false;if(b[r+1]==="."&&b[r+2]==="."){m="...";e="operator";r=r+2;}else {P();m=".";e="separator";}if(/\s/.test(b[r-1])===true)s.linesSpace=1;ee("");}else if(b[r]===";"){if(u>-1)$();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(Q[Q.length-1]===0)Q.pop();if(S.len>-1&&S.count[S.len]===0){if(h.script.variableList==="each"){D();}else {S.index[S.len]=s.count+1;}}if(h.script.correct===true)ie();m=";";e="separator";if(i.token[s.count]==="x}"){B();}else {ee("");}U();}else if(b[r]==="("||b[r]==="["||b[r]==="{"){We(b[r]);}else if(b[r]===")"||b[r]==="]"||b[r]==="}"){G(b[r]);}else if(b[r]==="*"&&i.stack[s.count]==="object"&&u<0&&/\s/.test(b[r+1])===false&&b[r+1]!=="="&&/\d/.test(b[r+1])===false){u=r;}else if(b[r]==="="||b[r]==="&"||b[r]==="<"||b[r]===">"||b[r]==="+"||b[r]==="-"||b[r]==="*"||b[r]==="/"||b[r]==="!"||b[r]==="?"||b[r]==="|"||b[r]==="^"||b[r]===":"||b[r]==="%"||b[r]==="~"){m=I();if(m==="regex"){m=i.token[s.count];}else if(m==="*"&&i.token[s.count]==="function"){i.token[s.count]="function*";}else {e="operator";if(m!=="!"&&m!=="++"&&m!=="--")P();ee("");}}else if(u<0&&b[r]!==""){u=r;}if(S.len>-1&&s.count===S.index[S.len]+1&&i.token[S.index[S.len]]===";"&&m!==S.word[S.len]&&e!=="comment"&&h.script.variableList==="list"){D();}r=r+1;}while(r-1)$();if((i.token[s.count]!=="}"&&i.token[0]==="{"||i.token[0]!=="{")&&(i.token[s.count]!=="]"&&i.token[0]==="["||i.token[0]!=="[")){R(false);}if(n[0]===s.count){m="\n"+n[1];e="string";ee("");}if(i.token[s.count]==="x;"&&(i.token[s.count-1]==="}"||i.token[s.count-1]==="]")&&i.begin[s.count-1]===0){s.pop(i);}h.script=p;return i};var De={markup:"markup",html:"markup",liquid:"markup",xml:"markup",javascript:"script",typescript:"script",jsx:"script",tsx:"script",json:"script",less:"style",scss:"style",sass:"style",css:"style",text:"text"};var nt={html:"HTML",xhtml:"XHTML",liquid:"Liquid",xml:"XML",jsx:"JSX",tsx:"TSX",json:"JSON",yaml:"YAML",css:"CSS",scss:"SCSS",sass:"SASS",less:"LESS",text:"Plain Text",javascript:"JavaScript",typescript:"TypeScript"};function Xe(a){return typeof a!=="string"||a.indexOf("html")>-1||De[a]===void 0?"markup":De[a]}function ut(a){if(typeof a!=="string"||nt[a]===void 0)return a.toUpperCase();return nt[a]}function ke(a){const f={};if(a==="unknown"){f.language=a;f.languageName="Unknown";f.lexer="markup";}else if(a==="xhtml"||a==="markup"){f.language="xml";f.languageName="XHTML";f.lexer="markup";}else {f.language=a;f.languageName=ut(a);f.lexer=Xe(a);}if(M.hooks.language.length>0){for(const h of M.hooks.language){const p=h(f);if(typeof p==="object")ye(f,p);}}return f}qe.reference=ke;qe.listen=function(a){M.hooks.language.push(a);};function qe(a){let f=[];let h=0;const p=/(((var)|(let)|(const)|(function)|(import))\s+(\w|\$)+[a-zA-Z0-9]*)/.test(a)&&/@import/.test(a)===false;const r=/((((final)|(public)|(private))\s+static)|(static\s+void))/.test(a);function m(){if(/\n\s*#+\s+/.test(a)||/^#+\s+/.test(a))return ke("markdown");if(/\$[a-zA-Z]/.test(a)||/\{\s*(\w|\.|\$|#)+\s*\{/.test(a)||/^[.#]?[\w][\w-]+\s+\{(?:\s+[a-z][a-z-]+:\s*\S+;)+\s+[&>+]?\s+[.#:]?[\w][\w-]\s+\{/.test(a)&&/:\s*@[a-zA-Z];/.test(a)===false)return ke("scss");if(/@[a-zA-Z]:/.test(a)||/\.[a-zA-Z]\(\);/.test(a))return ke("less");return ke("css")}function e(){let v=1;let u=y;let g=false;let l=false;const t=/((public)|(private))\s+(static\s+)?(((v|V)oid)|(class)|(final))/.test(a);function O(){if(a.indexOf("(")>-1||a.indexOf("=")>-1||a.indexOf(";")>-1&&a.indexOf("{")>-1){if(r===true||/\w<\w+(,\s+\w+)*>/.test(a))return ke("typescript");if(/(?:var|let|const)\s+\w+\s*:/.test(a)||/=\s*<\w+/.test(a))return ke("typescript");return ke("javascript")}return ke("unknown")}function T(){if(/:\s*(?:number|string|boolean|any|unknown)(?:\[\])?/.test(a)||/(?:public|private)\s+/.test(a)||/(?:export|declare)\s+type\s+\w+\s*=/.test(a)||/(?:namespace|interface|enum|implements|declare)\s+\w+/.test(a)||/(?:typeof|keyof|as)\s+\w+/.test(a)||/\w+\s+as\s+\w+/.test(a)||/\[\w+(?:(?::\s*\w+)|(?:\s+in\s+\w+))\]:/.test(a)||/\):\s*\w+(?:\[\])?\s*(?:=>|\{)\s+/.test(a)||/(var|const|let)\s+\w+:\s*(string|number|boolean|string|any)(\[\])?/.test(a))return ke("typescript");if(/\s(class|var|const|let)\s+\w/.test(a)===false&&/<[a-zA-Z](?:-[a-zA-Z])?/.test(a)&&/<\/[a-zA-Z-](?:-[a-zA-Z])?/.test(a)&&(/\s?\{%/.test(a)||/{{/.test(a)))return ke("liquid");if(/^(\s*[$@])/.test(a)===false&&/([}\]];?\s*)$/.test(a)){if(/^\s*import\s+\*\s+as\s+\w+\s+from\s+['"]/.test(a)||/module\.export\s+=\s+/.test(a)||/export\s+default\s+\{/.test(a)||/[?:]\s*[{[]/.test(a)||/^(?:\s*return;?(?:\s+[{[])?)/.test(a)){return ke("javascript")}}if(/{%/.test(a)&&/{{/.test(a)&&/<\w/.test(a))return ke("liquid");if(/{\s*(?:\w|\.|@|#)+\s*\{/.test(a))return ke("less");if(/\$(\w|-)/.test(a))return ke("scss");if(/[;{:]\s*@\w/.test(a)===true)return ke("less");return ke("css")}if(v-1&&(/^(\s*[\u007b\u0024\u002e#@a-z0-9])/i.test(a)||/^(\s*\/(\*|\/))/.test(a)||/^(\s*\*\s*\{)/.test(a))&&/^(\s*if\s*\()/.test(a)===false&&/=\s*(\{|\[|\()/.test(u)===false&&(/(\+|-|=|\?)=/.test(u)===false||/\/\/\s*=+/.test(u)||/=+('|")?\)/.test(a)&&/;\s*base64/.test(a))&&/function(\s+\w+)*\s*\(/.test(u)===false)return T();return a.indexOf("{%")>-1?ke("liquid"):ke("unknown")}function _(){function v(){return /{%-?\s*(schema|for|if|unless|render|include)/.test(a)||/{%-?\s*end\w+/.test(a)||/{{-?\s*content_for/.test(a)||/{{-?\s*[a-zA-Z0-9_'".[\]]+\s*-?}}/.test(a)||/{%/.test(a)&&/%}/.test(a)&&/{{/.test(a)&&/}}/.test(a)?ke("liquid"):ke("html")}return /^(\s*)/i.test(a)||/^(\s*/i.test(a)&&/<\/ul>/i.test(a)||//.test(a)&&/<\/head>/.test(a)||/^(\s*)/i.test(a))return _();if(/^\s*@(?:charset|import|include|keyframes|media|namespace|page)\b/.test(a))return m();if(r===false&&/=(>|=|-|\+|\*)/.test(a)===false&&/^(?:\s*((if)|(for)|(function))\s*\()/.test(a)===false&&/(?:\s|;|\})((if)|(for)|(function\s*\w*))\s*\(/.test(a)===false&&p===false&&/return\s*\w*\s*(;|\})/.test(a)===false&&(a===void 0||/^(?:\s*#(?!(!\/)))/.test(a)||/\n\s*(\.|@)\w+(\(|(\s*:))/.test(a)&&/>\s*<\w/.test(a)===false||(/^\s*:root\s*\{/.test(a)||/-{2}\w+\s*\{/.test(a)||/^\s*(?:body|button|hr|section|h[1-6]|p|strong|\*)\s+\{\s+/.test(a))))return m();f=a.replace(/\[[a-zA-Z][\w-]*=['"]?[a-zA-Z][\w-]*['"]?\]/g,y).split(y);h=f.length;if(/^(\s*({{|{%|<))/.test(a))return _();if(r===true||/^(?:[\s\w-]*<)/.test(a)===false&&/(?:>[\s\w-]*)$/.test(a)===false)return e();return (/^(?:\s*<\?xml)/.test(a)||/(?:>[\w\s:]*)?<(?:\/|!|#)?[\w\s:\-[]+/.test(a)||/^\s*\s*$/.test(a))&&(/^(?:[\s\w]*<)/.test(a)||/(?:>[\s\w]*)$/.test(a))||/^(?:\s*\s*)$/i.test(a)?/^(?:[\s\w]*<)/.test(a)===false||/(?:>[\s\w]*)$/.test(a)===false?e():_():ke("unknown")}M.lexers.markup=function a(f){const{options:h}=M;const{data:p}=s;const r=h.language==="jsx"||h.language==="tsx";const m=h.language==="html"||h.language==="liquid";const e=h.markup;const _=e.attributeSortList.length;const v={end:0,index:-1,start:0,line:1};const u=f.split(y);const g=u.length;let l=0;let t=false;let O="javascript";let T=m?h.language:"html";let i=0;function j(n){if(m===true&&r===false){if(/(?:{[=#/]|%[>\]])|\}%[>\]]/.test(n))return n;if(e.delimiterSpacing===true){n=n.replace(/{[{%]-?\s*/g,k=>k.replace(/\s*$/," "));n=n.replace(/\s*-?[%}]}/g,k=>k.replace(/^\s*/," "));}return n}return n}function C(n,k,x){if(n===p){if(k.types.indexOf("end")>-1){v.end=v.end+1;}else if(k.types.indexOf("start")>-1){v.start=v.start+1;}}v.index=s.count;v.line=s.lineNumber;s.push(n,k,x);}function b(n){let k=0;let x=y;const S=/^(?:<|{%-?|{{-?)=?\s*/;if(typeof n!=="string")return y;k=n.replace(S,"%").replace(/\s+/," ").indexOf(" ");x=n.replace(S," ");x=k<0?x.slice(1,n.length-1):x.slice(1,k);if(T==="html")x=x.toLowerCase();x=x.replace(/-?[%}]}$/,y);if(x.indexOf("(")>0)x=x.slice(0,x.indexOf("("));if(x==="?xml?")return "xml";return x}function E(n,k){const x=b(n);const S=Je({begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:p.lines[s.count]>0?1:0,stack:s.structure[s.structure.length-1][0],token:``,types:"end"});C(p,S,y);if(re.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x)){do{S.begin=s.structure[s.structure.length-1][1];S.stack=s.structure[s.structure.length-1][0];S.token=``;C(p,S,y);}while(re.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x))}}function Y(n){const k={begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:y,types:y};let x=0;let S=y;let R=y;let B=y;let P=y;let N=y;let U=false;let H=false;let G=false;let oe=false;let ce=false;let X=false;let fe=false;let I=[];let ie=[y,0];function ee(Z){const D=Z.indexOf("=");if(D>0&&(D0||D0)){return [Z.slice(0,D),Z.slice(D+1)]}return [Z,y]}function Ne(){const Z=s.count;const D=P.replace(/(\/)$/,y);const $=e.quoteConvert;let c=0;let o=0;let A=0;let w=y;let z=y;let q=[];let W=I.length;function se(){let F=Le(k.token,5);if(G===true||$==="none"||k.types.indexOf("attribute")<0||F===false&&$==="single"&&k.token.indexOf('"')<0||F===false&&$==="double"&&k.token.indexOf("'")<0){C(p,k,y);}else {let K=0;let V=false;const ne=k.token.split(y);const he=k.token.indexOf("=");const le=ne.length-1;if(J(ne[he+1],34)&&J(ne[ne.length-1],34)&&$==="single"&&F===false){C(p,k,y);}else if(J(ne[he+1],39)&&J(ne[ne.length-1],39)&&$==="double"&&F===false){C(p,k,y);}else {K=he+2;if(F===false){if($==="double"){if(k.token.slice(he+2,le).indexOf('"')>-1)V=true;ne[he+1]='"';ne[ne.length-1]='"';}else if($==="single"){if(k.token.slice(he+2,le).indexOf("'")>-1)V=true;ne[he+1]="'";ne[ne.length-1]="'";}}if(V===true||F===true){F=false;do{if(d(ne[K-1],123)&&(d(ne[K],37)||d(ne[K],123))){F=true;}else if(d(ne[K],125)&&(d(ne[K-1],37)||d(ne[K-1],125))){F=false;}if(F===true){if(d(ne[K],34)&&$==="double"){ne[K]="'";}else if(d(ne[K],39)&&$==="single"){ne[K]='"';}}else {if(d(ne[K],39)&&$==="double"){ne[K]='"';}else if(d(ne[K],34)&&$==="single"){ne[K]="'";}}K=K+1;}while(K$/,"/>");}o=I.length;A=1;if(A0){const F=[];A=0;o=0;W=I.length;do{o=0;do{w=I[o][0].split("=")[0];if(e.attributeSortList[A]===w){F.push(I[o]);I.splice(o,1);W=W-1;break}o=o+1;}while(o0){k.token=q.join(" ");se();}}t=false;if(n==="---"){N="---";B="comment";}else if(d(u[l],60)){if(d(u[l+1],47)){n=">";B="end";}else if(d(u[l+1],33)){if((u[l+2].charCodeAt(0)===100||u[l+2].charCodeAt(0)===68)&&(u[l+3].charCodeAt(0)===111||u[l+3].charCodeAt(0)===79)&&(u[l+4].charCodeAt(0)===99||u[l+4].charCodeAt(0)===67)&&(u[l+5].charCodeAt(0)===116||u[l+5].charCodeAt(0)===84)&&(u[l+6].charCodeAt(0)===121||u[l+6].charCodeAt(0)===89)&&(u[l+7].charCodeAt(0)===112||u[l+7].charCodeAt(0)===80)&&(u[l+8].charCodeAt(0)===101||u[l+8].charCodeAt(0)===69)){n=">";B="doctype";X=true;}else if(d(u[l+2],45)&&d(u[l+3],45)){n="-->";B="comment";N="";}else if(d(u[l],123)&&J(Z[0],123)&&J(n,10)&&(d(u[l+1],123)||d(u[l+1],37))){if(d(u[l+1],123)){w="}}";}else {w=u[l+1]+"}";if(V.length<1&&(I.length<1||ue(u[l-1]))){Z.pop();do{if(d(u[l],10))L=L+1;V.push(u[l]);l=l+1;}while(ln.length+1||d(Z[0],93))&&(r===false||q===0)){if(d(n,10)){if(ue(Z[Z.length-1])){do{Z.pop();l=l-1;}while(ue(Z[Z.length-1]))}break}$=Z.length;D=n.length-1;if(D>-1){do{$=$-1;if(Z[$]!==n.charAt(D))break;D=D-1;}while(D>-1)}if(D<0){if(d(Z[$],62)&&d(u[l],62)&&I.length>0){if(I[I.length-1][1]===0&&d(u[l-1],125)&&ue(u[l+1])){I[I.length-1][1]=d(u[l+1],32)?1:2;}}break}}}else if(u[l].charCodeAt(0)===w.charCodeAt(w.length-1)&&(r&&d(n,125)&&(u[l-1]!=="\\"||he()===false)||(r===false||J(n,125)))){$=0;D=w.length-1;if(D>-1){do{if(u[l-$]!==w.charAt(D))break;$=$+1;D=D-1;}while(D>-1)}if(D<0)w=y;}}l=l+1;}while(l{c=w===y?0:w.split("\n").length;return y};const L=w=>{o=w===y?0:w.split("\n").length;return y};k.begin=s.structure[s.structure.length-1][1];k.ender=s.count+3;k.stack=s.structure[s.structure.length-1][0];k.types="template_start";k.token=Z;C(p,k,"comment");S=D.replace(/^\s*/,A);S=S.replace(/\s*$/,L);k.begin=s.count;k.lines=c;k.stack="comment";k.token=S;k.types="comment";C(p,k,y);k.types="template_end";k.stack="comment";k.lines=o;k.token=$;C(p,k,y);return}k.types=B;U=(()=>{const Z=/(\/>)$/;const D=(c,o)=>{if(!re.html.tags.has(c))return false;if(c===o)return true;if(c==="dd"&&o==="dt")return true;if(c==="dt"&&o==="dd")return true;if(c==="td"&&o==="th")return true;if(c==="th"&&o==="td")return true;if(c==="colgroup"&&(o==="tbody"||o==="tfoot"||o==="thead"||o==="tr"))return true;if(c==="tbody"&&(o==="colgroup"||o==="tfoot"||o==="thead"))return true;if(c==="tfoot"&&(o==="colgroup"||o==="tbody"||o==="thead"))return true;if(c==="thead"&&(o==="colgroup"||o==="tbody"||o==="tfoot"))return true;if(c==="tr"&&o==="colgroup")return true;return false};const $=c=>{k.lines=p.lines[s.count]>0?1:0;k.token=``;k.types="end";C(p,k,y);if(c>0){do{k.begin=s.structure[s.structure.length-1][1];k.stack=s.structure[s.structure.length-1][0];k.token=``;C(p,k,y);c=c-1;}while(c>0)}k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;};if(B==="end"){const c=p.token[s.count];if(p.types[s.count-1]==="singleton"&&c.charCodeAt(c.length-2)!==47&&`/${b(c)}`===P){p.types[s.count-1]="start";}}if(T==="html"){if(d(S[0],60)&&J(S[1],33)&&J(S[1],63)&&(s.count<0||p.types[s.count].indexOf("template")<0))S=S.toLowerCase();if(re.html.tags.has(s.structure[s.structure.length-1][0])&&D(P.slice(1),s.structure[s.structure.length-2][0])){$(0);}else if(s.structure.length>3&&re.html.tags.has(s.structure[s.structure.length-1][0])&&re.html.tags.has(s.structure[s.structure.length-2][0])&&re.html.tags.has(s.structure[s.structure.length-3][0])&&D(P,s.structure[s.structure.length-4][0])){$(3);}else if(s.structure.length>2&&re.html.tags.has(s.structure[s.structure.length-1][0])&&re.html.tags.has(s.structure[s.structure.length-2][0])&&D(P,s.structure[s.structure.length-3][0])){$(2);}else if(s.structure.length>1&&re.html.tags.has(s.structure[s.structure.length-1][0])&&D(P,s.structure[s.structure.length-2][0])){$(1);}else if(D(P,s.structure[s.structure.length-1][0])){$(0);}else if(d(P[0],47)&&re.html.tags.has(s.structure[s.structure.length-1][0])&&s.structure[s.structure.length-1][0]!==P.slice(1)){E(S,false);k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;}if(r===false&&re.html.voids.has(P)){if(e.correct===true&&Z.test(S)===false)S=S.slice(0,S.length-1)+" />";return true}}return false})();if(re.embed("html",P)&&S.slice(S.length-2)!=="/>"||re.embed("liquid",P)&&S.slice(S.length-2)==="%}"){const Z=Le(S,3);let D=I.length-1;let $=y;let c=[];if(D>-1){do{c=ee(I[D][0]);if(c[0]==="type"){$=c[1];if($.charCodeAt(0)===34||$.charCodeAt(0)===39){$=$.slice(1,$.length-1);}break}D=D-1;}while(D>-1)}if(Z===false&&re.embed("html",P)){t=true;if($===y){O=re.html.embed[P].language;}else if(re.html.embed[P].value($)){O=re.html.embed[P].language;}}else if(Z===true&&re.embed("liquid",P)){t=true;if($===y){O=re.liquid.embed[P].language;}else {O=re.liquid.embed[P].language;}}if(t===true){D=l+1;if(D"){B="singleton";}else {B="start";}k.types=B;}if(fe&&X===false&&G&&d(n,62)&&S.slice(S.length-2)!=="/>"){const Z=[];const D=[];if(U===true){B="singleton";}else {I.forEach($=>D.push($[0]));X=true;B="ignore";l=l+1;if(l-1){do{if(J(u[l-o],$.charCodeAt(c)))break;o=o+1;c=c-1;}while(c>-1)}if(c<0)$=y;}l=l+1;}while(l",` ${D.join(" ")}>`);k.token=S;k.types="content-ignore";I=[];}if(k.types.indexOf("template")>-1){if(d(S[0],123)&&d(S[1],37)){if((P==="case"||P==="default")&&(s.structure[s.structure.length-1][0]==="switch"||s.structure[s.structure.length-1][0]==="case")){k.types="template_else";}else if(re.liquid.else.has(P)){k.types="template_else";}else {if(re.liquid.tags.has(P)){k.types="template_start";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100&&re.liquid.tags.has(P.slice(3))){k.types="template_end";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100){k.types="template_end";k.stack=P.slice(3);let Z=0;do{if(p.types[Z]==="template"&&p.stack[Z]===k.stack){p.types[Z]="template_start";v.start=v.start+1;break}else {Z=p.stack.indexOf(k.stack,Z+1);}}while(Z>-1)}else {k.stack=P;}}}else if(k.types==="template"){if(S.indexOf("else")>2)k.types="template_else";}if(k.types==="template_start"||k.types==="template_else"){if(P===y||d(P,37)){P=P+S.slice(1).replace(P,y).replace(/^\s+/,y);P=P.slice(0,P.indexOf("(")).replace(/\s+/,y);}}if(e.quoteConvert==="double"){k.token=k.token.replace(/'/g,'"');}else if(e.quoteConvert==="single"){k.token=k.token.replace(/"/g,"'");}}if(B==="cdata"&&(k.stack==="script"||k.stack==="style")){let Z=s.count;let D=s.count;const $=k.stack;if(p.types[D]==="attribute"){do{Z=Z-1;D=D-1;}while(p.types[D]==="attribute"&&D>-1)}k.begin=Z;k.token="\s*)$/,y);C(p,k,y);s.structure.push(["cdata",s.count]);if($==="script"){M.lexers.script(S);}else {M.lexers.style(S);}k.begin=s.structure[s.structure.length-1][1];k.token="]]>";k.types="cdata_end";C(p,k,y);s.structure.pop();}else {C(p,k,P);}Ne();if(h.wrap>0&&r===true){let Z=0;let D=s.count;let $=0;if(p.types[D].indexOf("attribute")>-1){do{Z=Z+p.token[D].length+1;D=D-1;}while(p.lexer[D]!=="markup"||p.types[D].indexOf("attribute")>-1);if(p.lines[D]===1)Z=Z+p.token[D].length+1;}else if(p.lines[D]===1){Z=p.token[D].length+1;}$=D-1;if(Z>0&&p.types[$]!=="script_end"){if(p.types[$].indexOf("attribute")>-1){do{Z=Z+p.token[$].length+1;$=$-1;}while(p.lexer[$]!=="markup"||p.types[$].indexOf("attribute")>-1);if(p.lines[$]===1)Z=Z+p.token[$].length+1;}else if(p.lines[$]===1){Z=p.token[$].length+1;}}}s.linesSpace=0;}function Q(){const n=l;const k=d(p.token[s.count],123)&&r===true;let x=[];let S=y;let R=s.linesSpace;let B=y;if(t===true){if(k===true){B="script";}else if(s.structure[s.structure.length-1][1]>-1){B=b(p.token[s.structure[s.structure.length-1][1]].toLowerCase());}else if(p.begin[s.count]>1){B=b(p.token[p.begin[s.count]].toLowerCase());}else {B=b(p.token[p.begin[s.count]].toLowerCase());}}const P=p.types[s.count]==="template_start"&&p.token[s.count].indexOf("-1){do{if(u[H]!=="\\")break;G=G+1;H=H-1;}while(H>-1)}return G%2===1}if(l".indexOf(u[l-1])>-1){if(r===false||J(u[l-1],60))G="reg";}}else if((d(u[l],34)||d(u[l],39)||d(u[l],96))&&U()===false){G=u[l];}else if(d(u[l],123)&&k===true){ce=ce+1;}else if(d(u[l],125)&&k===true){if(ce===0){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);M.lexers.script(oe);s.structure[s.structure.length-1][1]+=1;if(p.types[s.count]==="end"&&p.lexer[p.begin[s.count]-1]==="script"){N.lexer="script";N.token=e.correct===true?";":"x;";N.types="separator";C(p,N,y);N.lexer="markup";}N.token="}";N.types="script_end";C(p,N,y);s.structure.pop();break}ce=ce-1;}if(Le(p.token[s.count],3)===false){H=u.slice(l,l+10).join(y).toLowerCase();if(B==="script"){H=l===g-9?H.slice(0,H.length-1):H.slice(0,H.length-2);if(H==="<\/script"){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l-1;if(x.length<1)break;if(/^";C(p,N,y);}else {h.language=O;M.lexers.script(oe);if(O==="json"&&h.json.objectSort===true||O!=="json"&&h.script.objectSort===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}if(B==="style"){if(l===g-8){H=H.slice(0,H.length-1);}else if(l===g-9){H=H.slice(0,H.length-2);}else {H=H.slice(0,H.length-3);}if(H==="$/.test(X)){N.token="";C(p,N,y);}else {h.language=O;M.lexers.style(X);if(h.style.sortProperties===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}}else {if(re.embed("liquid",B)){const X=u.slice(l).join(y);const fe=X.search(new RegExp(`{%-?\\s*end${B}`));x=x.length>0?x.concat(x,u.slice(l,l+fe)):u.slice(l,l+fe);l=l+fe;H=u.slice(l).join(y).toLowerCase();if(re.liquid.embed[B].end(H)){H=H.slice(0,H.indexOf("%}")+2);oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l+H.length-1;if(x.length<1)break;const Oe=De[re.liquid.embed[B].language];h.language=O;M.lexers[Oe](oe);if(O==="json"&&h.json.objectSort===true||O==="javascript"&&h.script.objectSort===true||(O==="css"||O==="scss")&&h.style.sortProperties===true){s.sortCorrection(0,s.count+1);}h.language="liquid";N.token=H;N.types="template_end";C(p,N,y);}break}}}else if(G===u[l]&&(d(G,34)||d(G,39)||d(G,96)||d(G,42)&&d(u[l+1],47))&&U()===false){G=y;}else if(d(G,96)&&u[l]==="$"&&d(u[l+1],123)&&U()===false){G="}";}else if(d(G,125)&&d(u[l],125)&&U()===false){G="`";}else if(d(G,47)&&(d(u[l],10)||u[l]==="\r")){G=y;}else if(G==="reg"&&d(u[l],47)&&U()===false){G=y;}else if(d(G,47)&&d(u[l],60)&&d(u[l-1],45)&&d(u[l-2],45)){H=u.slice(l+1,l+11).join(y).toLowerCase();H=H.slice(0,H.length-2);if(B==="script"&&H==="<\/script")G=y;H=H.slice(0,H.length-1);if(B==="style"&&H==="0&&(d(u[l],60)&&J(u[l+1],61)&&!/\s|\d/.test(u[l+1])||d(u[l],91)&&d(u[l+1],37)||d(u[l],123)&&(r===true||d(u[l+1],123)||d(u[l+1],37)))){l=l-1;if(s.structure[s.structure.length-1][0]==="comment"){S=x.join(y);}else {S=x.join(y).replace(/\s+$/,y);}S=j(S);R=0;N.token=S;if(h.wrap>0&&e.preserveText===false){const{wrap:X}=h;const fe=y;const Oe=y;const I=[];let ie=X;let ee=S.length;const Ne=()=>{if(S.charCodeAt(ie)===32){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;return}do{ie=ie-1;}while(ie>0&&S.charCodeAt(ie)!==32);if(ie>0){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;}else {ie=X;do{ie=ie+1;}while(ie"&&p.token[p.begin[p.begin[s.count]]]==="
  • "&&p.lines[p.begin[s.count]]===0&&s.linesSpace===0&&S.length-1)ie=ie-1;if(p.lines[xe]>0&&p.types[xe].indexOf("attribute")<0)break;xe=xe-1;}while(xe>0&&ie>0);if(ie<1)ie=S.indexOf(" ");}S=x.join(y);S=S.replace(/^\s+/,y).replace(/\s+$/,y).replace(/\s+/g," ");do{Ne();}while(ien&&ln&&ue(u[H]))}else {s.linesSpace=0;}}else if(l!==n||l===n&&t===false){S=x.join(y).replace(/\s+$/,y);R=0;if(N.token!==S){N.token=S;C(p,N,y);s.linesSpace=0;}}t=false;}if(_>0){do{e.attributeSortList[l]=e.attributeSortList[l].replace(/^\s+/,y).replace(/\s+$/,y);l=l+1;}while(l<_);l=0;}if(h.language==="html"||h.language==="liquid")T="html";do{if(ue(u[l])){if(p.types[s.count]==="template_start"&&s.structure[s.structure.length-1][0]==="comment"){Q();}else {l=s.spacer({array:u,end:g,index:l});}}else if(t){Q();}else if(d(u[l],60)){Y(y);}else if(d(u[l],91)&&d(u[l+1],37)){Y("%]");}else if(d(u[l],123)&&(r||d(u[l+1],123)||d(u[l+1],37))){Y(y);}else if(d(u[l],45)&&d(u[l+1],45)&&d(u[l+2],45)){Y("---");}else {Q();}l=l+1;}while(lv.start){const n=v.end-v.start;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more end type${k} than start types`].join("\n");}else {const n=v.start-v.end;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more start type${k} than end types`].join("\n");}}return p};M.beautify.markup=a=>{const f={};const h="markup";const{data:p}=s;const r=a.language==="jsx"||a.language==="tsx";const m=a.crlf===true?String.fromCharCode(13,10):String.fromCharCode(10);const e=a.markup;const _=M.end<1||M.end>p.token.length?p.token.length:M.end+1;const v={is:(j,C)=>p.types[j]===C,not:(j,C)=>p.types[j]!==C,idx:(j,C)=>j>-1&&(p.types[j]||y).indexOf(C)};const u={is:(j,C)=>p.token[j]===C,not:(j,C)=>p.token[j]!==C};let g=M.start;let l=-1;let t=0;let O=0;let T=isNaN(a.indentLevel)?0:Number(a.indentLevel);const i=(()=>{const j=M.start>0?Array(M.start).fill(0,0,M.start):[];function C(){let k=g+1;let x=0;if(v.is(k,void 0))return k-1;if(v.is(k,"comment")||g<_-1&&v.idx(k,"attribute")>-1){do{if(v.is(k,"jsx_attribute_start")){x=k;do{if(v.is(k,"jsx_attribute_end")&&p.begin[k]===x)break;k=k+1;}while(k<_)}else if(v.not(k,"comment")&&v.idx(k,"attribute")<0)return k;k=k+1;}while(k<_)}return k}function b(){const k=p.begin[g];let x=g;do{x=x-1;if(u.is(x,"
  • ")&&u.is(x-1,"")&&p.begin[p.begin[x]]===k&&p.begin[x-1]===p.begin[x]+1){x=p.begin[x];}else {return}}while(x>k+1);x=g;do{x=x-1;if(v.is(x+1,"attribute")){j[x]=-10;}else if(u.not(x,"")){j[x]=-20;}}while(x>k+1)}function E(){let k=g;let x=false;if(p.lines[g+1]===0&&e.forceIndent===false){do{if(p.lines[k]>0){x=true;break}k=k-1;}while(k>l);k=g;}else {x=true;}if(x===true){const S=v.is(t,"comment")||v.is(t,"end")||v.is(t,"template_end")?T+1:T;do{j.push(S);k=k-1;}while(k>l);if(S===T+1)j[g]=T;if(v.is(k,"attribute")||v.is(k,"template_attribute")||v.is(k,"jsx_attribute_start")){j[p.begin[k]]=S;}else {j[k]=S;}}else {do{j.push(-20);k=k-1;}while(k>l);j[k]=-20;}l=-1;}function Y(){let k=T;if(e.forceIndent===true||e.forceAttribute===true){j.push(T);return}if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&p.lines[t]>0){j.push(T);k=k+1;if(v.is(g,"singleton")&&g>0&&v.idx(g-1,"attribute")>-1&&v.is(p.begin[g-1],"singleton")){if(p.begin[g]<0||v.is(p.begin[g-1],"singleton")&&p.begin[p.ender[g]-1]!==g){j[g-1]=T;}else {j[g-1]=T+1;}}}else if(g>0&&v.is(g,"singleton")&&v.idx(g-1,"attribute")>-1){j[g-1]=T;O=p.token[g].length;j.push(-10);}else if(p.lines[t]===0){j.push(-20);}else if((a.wrap===0||g<_-2&&p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g+2]!==void 0&&p.token[g].length+p.token[g+1].length+p.token[g+2].length+1>a.wrap&&v.idx(g+2,"attribute")>-1||p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g].length+p.token[g+1].length>a.wrap)&&(v.is(g+1,"singleton")||v.is(g+1,"template"))){j.push(T);}else {O=O+1;j.push(-10);}if(g>0&&v.idx(g-1,"attribute")>-1&&p.lines[g]<1){j[g-1]=-20;}if(O>a.wrap){let x=g;let S=Math.max(p.begin[g],0);if(v.is(g,"content")&&e.preserveText===false){let R=0;const B=p.token[g].replace(/\s+/g,de).split(de);do{x=x-1;if(j[x]<0){R=R+p.token[x].length;if(j[x]===-10)R=R+1;}else {break}}while(x>0);x=0;S=B.length;do{if(B[x].length+R>a.wrap){B[x]=m+B[x];R=B[x].length;}else {B[x]=` ${B[x]}`;R=R+B[x].length;}x=x+1;}while(x0){O=p.token[g].length-p.token[g].lastIndexOf(m);}}else {do{x=x-1;if(j[x]>-1){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;return}if(v.idx(x,"start")>-1){O=0;return}if(p.lines[x+1]>0&&(v.not(x,"attribute")||v.is(x,"attribute")&&v.is(x+1,"attribute"))){if(v.not(x,"singleton")||v.is(x,"attribute")&&v.is(x+1,"attribute")){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;break}}}while(x>S);j[x]=k;}}}function Q(){const k=g;if(p.types[k-1]==="script_start"&&d(p.token[k-1],123)){j[k-1]=-20;}do{if(p.lexer[g+1]===h&&p.begin[g+1]a.wrap){X=G[ce].length;G[ce]=m+G[ce];}else {G[ce]=` ${G[ce]}`;X=X+G[ce].length;}ce=ce+1;}while(ce{if(v.idx(g,"start")>0){let H=g;do{if(p.types[H].indexOf("end")>0&&p.begin[H]===g){if(H<_-1&&v.idx(H+1,"attribute")>-1){R=true;break}}H=H+1;}while(H<_)}else if(g<_-1&&v.idx(g+1,"attribute")>-1){R=true;}if(v.is(t,"end")||v.is(t,"template_end")){return T+(v.is(S,"singleton")?2:1)}if(v.is(S,"singleton"))return T+1;return T})();if(R===false&&v.is(g,"comment_attribute")){j.push(T);j[S]=p.types[S]==="singleton"?T+1:T;return}if(U<1)U=1;do{O=O+p.token[g].length+1;if(p.types[g].indexOf("attribute")>0){if(p.types[g]==="template_attribute_start"){if(e.preserveAttributes===true){j.push(-10);}else {let H=1;do{if(p.lines[g]===0){j.push(-20);}else if(p.lines[g]===1){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else {j.push(U);}if(H===0)break;g=g+1;if(v.is(g,"template_attribute_start")){H=H+1;}else if(v.is(g,"template_attribute_end")){H=H-1;}P=P+1;if(p.token[g]!==void 0){O=O+p.token[g].length+1;N=N+p.token[g].length+1;}}while(g<_)}}else if(p.types[g]==="template_attribute"){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else if(p.types[g]==="comment_attribute"){j.push(U);}else if(p.types[g].indexOf("start")>0){B=true;if(g<_-2&&p.types[g+2].indexOf("attribute")>0){j.push(-20);g=g+1;f[g]=g;}else {if(S===g-1&&R===false){if(r){j.push(-20);}else {j.push(U);}}else {if(r){j.push(-20);}else {j.push(U+1);}}if(p.lexer[g+1]!==h){g=g+1;Q();}}}else if(p.types[g].indexOf("end")>0&&p.types[g].indexOf("template")<0){if(j[g-1]!==-20)j[g-1]=j[p.begin[g]]-1;if(p.lexer[g+1]!==h){j.push(-20);}else {j.push(U);}}else {j.push(U);}}else if(v.is(g,"attribute")){N=N+p.token[g].length+1;if(e.preserveAttributes===true){j.push(-10);}else if(e.forceAttribute===true||e.forceAttribute>=1||B===true||g<_-1&&(v.idx(g+1,"template_attribute_")>-1&&p.lines[g+1]!==-20||v.idx(g+1,"attribute")>0)){if(e.forceAttribute===false&&p.lines[g]===1){if(v.is(g+1,"template_attribute_start")&&p.lines[g+1]>1){j.push(U);}else {j.push(-10);}}else {if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}}else {j.push(-10);}}else if(p.begin[g]0&&v.idx(g,"attribute")>0&&v.not(S,"singleton")&&j[g-1]>0&&R===true){j[g-1]=j[g-1]-1;}if(j[g]!==-20){if(r===true&&v.idx(S,"start")>-1&&v.is(g+1,"script_start")){j[g]=U;}else {if(u.is(g,"/")&&j[g-1]!==10){j[g-1]=-10;}else {j[g]=j[S];}}}if(e.forceAttribute===true){O=0;j[S]=U;}else if(e.forceAttribute>=1){if(P>=e.forceAttribute){j[S]=U;let H=g-1;do{if(v.is(H,"template")&&j[H]===-10){j[H]=U;}else if(v.is(H,"attribute")&&j[H]===-10){j[H]=U;}H=H-1;}while(H>S)}else {j[S]=-10;}}else {j[S]=-10;}if(e.preserveAttributes===true||u.is(S,"<%xml%>")||u.is(S,"")){O=0;return}x=g;if(x>S+1){if(e.selfCloseSpace===false)N=N-1;if(N>a.wrap&&a.wrap>0&&e.forceAttribute===false){if(e.forceLeadAttribute===true){j[S]=U;x=x-1;}O=p.token[g].length;do{if(p.token[x].length>a.wrap&&ue(p.token[x]))k(x);if(v.idx(x,"template")>-1&&j[x]===-10){j[x]=U;}else if(v.is(x,"attribute")&&j[x]===-10){j[x]=U;}x=x-1;}while(x>S)}}else if(a.wrap>0&&v.is(g,"attribute")&&p.token[g].length>a.wrap&&ue(p.token[g])){k(g);}}do{if(p.lexer[g]===h){if(p.token[g].toLowerCase().indexOf("-1){n();}else if(v.is(g,"comment")){if(l<0)l=g;if(v.not(g+1,"comment")||g>0&&v.idx(g-1,"end")>-1)E();}else if(v.not(g,"comment")){t=C();if(v.is(t,"end")){T=T-1;if(u.is(g,"")||u.is(g,"")||u.is(g,""))b();}if(v.is(t,"template_end")){T=T-1;if(v.is(t,"template_end")&&v.is(p.begin[t]+1,"template_else"))T=T-1;}if(v.is(g,"script_end")&&v.is(t,"end")){if(p.lines[t]<1){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if((e.forceIndent===false||e.forceIndent===true&&v.is(t,"script_start"))&&(v.is(g,"content")||v.is(g,"singleton")||v.is(g,"template"))){O=O+p.token[g].length;if(v.is(g,"template")){j.push(T);const k=p.token[g].indexOf(m);if(k>0){const x=[];const S=j[g-1]*a.indentSize+p.token[g].charCodeAt(2)===45?a.indentSize:a.indentSize-1;let R=0;do{x.push(de);R=R+1;}while(R`${B}${x.join(y)}`);}}else if(p.lines[t]>0&&v.is(t,"script_start")){j.push(-10);}else if(a.wrap>0&&(v.idx(g,"template")<0||t<_&&v.idx(g,"template")>-1&&v.idx(g,"template")<0)){Y();}else if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&(p.lines[t]>0||v.idx(g,"template_")>-1)){j.push(T);}else if(p.lines[t]===0){j.push(-20);}else {j.push(T);}}else if(v.is(g,"start")||v.is(g,"template_start")){T=T+1;if(v.is(g,"template_start")&&v.is(t,"template_else")){T=T+1;}if(r===true&&u.is(g+1,"{")){if(p.lines[t]===0){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if(v.is(g,"start")&&v.is(t,"end")){j.push(-20);}else if(v.is(g,"start")&&v.is(t,"script_start")){j.push(-10);}else if(e.forceIndent===true){j.push(T);}else if(v.is(g,"template_start")&&v.is(t,"template_end")){j.push(-20);}else if(p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton")||v.is(g,"start")&&v.is(t,"template"))){j.push(-20);}else {j.push(T);}}else if(e.forceIndent===false&&p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton"))){j.push(-20);}else if(v.is(g+2,"script_end")){j.push(-20);}else if(v.is(g,"template_else")){if(v.is(t,"template_end")){j[g-1]=T+1;}else {j[g-1]=T-1;}j.push(T);}else {j.push(T);}}if(v.not(g,"content")&&v.not(g,"singleton")&&v.not(g,"template")&&v.not(g,"attribute")){O=0;}}else {O=0;Q();}g=g+1;}while(g<_);return j})();return (()=>{const j=[];const C=(()=>{const k=[a.indentChar];const x=a.indentSize-1;let S=0;if(S0){B=0;do{x.push(C);B=B+1;}while(BP.trimStart());const S=i[g-1]>-1?v.is(g,"attribute")?i[g-1]+1:i[g-1]:(()=>{let P=g-1;let N=P>-1&&v.idx(P,"start")>-1;if(i[g]>-1&&v.is(g,"attribute")){return i[g]+1}do{P=P-1;if(i[P]>-1){return v.is(g,"content")&&N===false?i[P]:i[P]+1}if(v.idx(P,"start")>-1)N=true;}while(P>0);return P===-2?0:1})();let R=0;p.lines[g+1]=0;const B=k.length-1;do{if(v.is(g,"comment")){if(k[R]!==y){if(k[R+1].trimStart()!==y){j.push(k[R],b(S));}else {j.push(k[R],pe);}}else {if(k[R+1].trimStart()===y){j.push(pe);}else {j.push(b(S));}}}else {j.push(k[R]);j.push(b(S));}R=R+1;}while(R1){j.push(b(i[g]));}}function Y(){const k=/\/?>$/;const x=p.token[g];const S=k.exec(x);if(S===null)return;let R=g+1;let B=false;let P=e.selfCloseSpace===true&&S!==null&&S[0]==="/>"?de:y;p.token[g]=x.replace(k,y);do{if(v.is(R,"jsx_attribute_end")&&p.begin[p.begin[R]]===g){B=false;}else if(p.begin[R]===g){if(v.is(R,"jsx_attribute_start")){B=true;}else if(v.idx(R,"attribute")<0&&B===false){break}}else if(B===false&&(p.begin[R]-1){Y();}if(u.not(g,void 0)&&p.token[g].indexOf(m)>0&&(v.is(g,"content")&&e.preserveText===false||v.is(g,"comment")||v.is(g,"attribute"))){E();}else {j.push(p.token[g]);if(i[g]===-10&&g<_-1){j.push(de);}else if(i[g]>-1){Q=i[g];j.push(b(i[g]));}}}else {M.start=g;M.end=f[g];a.indentLevel=Q;const k=a.language;const x=d(p.token[g],123)?"liquid":"html";let S=false;if(x==="liquid"&&p.stack[g]in re[x].embed&&"language"in re[x].embed[p.stack[g]]){S=re[x].embed[p.stack[g]].language==="json";}n=M.beautify[p.lexer[g]](a).replace(we,y);j.push(n);if(n.endsWith(pe)){if(Q-1>0)j.push($e(Q-1,C));}else {if(e.forceIndent===true||i[M.iterator]>-1&&f[g]>g){j.push(b(i[M.iterator]));}}g=M.iterator;a.indentLevel=0;if(S)a.language=k;}g=g+1;}while(g<_);M.iterator=_-1;if(j[0]===m||d(j[0],32))j[0]=y;return j.join(y)})()};M.beautify.style=a=>{const f=[];const h=M.data;const p=a.crlf===true?"\r\n":"\n";const r=M.end>0?M.end+1:h.token.length;const m=a.preserveLine+1;const e=(()=>{let O=0;const T=[];do{T.push(a.indentChar);O=O+1;}while(O0?a.wrap:0;let u=M.start;let g=[y,y];function l(O){const T=[];const i=(()=>{if(u===r-1)return 1;if(h.lines[u+1]-1>m)return m;if(h.lines[u+1]>1)return h.lines[u+1]-1;return 1})();let j=0;if(O<0)O=0;do{T.push(p);j=j+1;v=_;}while(j0){j=0;do{T.push(e);j=j+1;}while(jO+1);if(E[1]>Y)Y=E[1];j.push(E);}}else if(h.types[C]==="end"){if(CO);C=j.length;if(C<2)return;do{C=C-1;if(j[C][1]0)}if(a.script.vertical===true&&a.style.compressCSS===false){u=r;do{u=u-1;if(d(h.token[u],125)||d(h.token[u],41))t();}while(u>0);u=M.start;}do{if(h.types[u]==="property")v=_+h.token[u].length;if(h.types[u+1]==="end"||h.types[u+1]==="template_end"||h.types[u+1]==="template_else"){_=_-1;}if(h.types[u]==="template"&&h.lines[u]===0){f.push(h.token[u]);if(h.types[u+1]==="template"&&h.lines[u+1]>0)l(_);}else if(h.types[u]==="template"&&h.lines[u]>0){if(h.types[u-2]!=="property"&&h.types[u-1]!=="colon"){v=_;f.push(h.token[u]);l(_);}else if(h.types[u-2]==="property"&&h.types[u-1]==="colon"&&h.types[u+1]==="separator"&&d(h.token[u+1],44)){v=v+h.token[u].length;if(v>a.wrap)l(_);f.push(h.token[u]);do{u=u+1;f.push(h.token[u]);if(h.lines[u+1]>0)l(_);}while(h.types[u]!=="separator"&&J(h.token[u],59));if(d(h.token[u],59)&&h.types[u]==="separator"){f.push(h.token[u]);if(h.lines[u+1]>0)l(_);u=u+1;continue}}else {v=v+h.token[u].length;if(a.wrap>0&&v>a.wrap){l(_);f.push(h.token[u]);}else {f.push(h.token[u]);}}}else if(h.types[u]==="template_else"){f.push(h.token[u]);_=_+1;l(_);}else if(h.types[u]==="start"||h.types[u]==="template_start"){_=_+1;f.push(h.token[u]);if(h.types[u+1]!=="end"&&h.types[u+1]!=="template_end"&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")){l(_);}}else if(d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")||(h.types[u]==="end"||h.types[u]==="template_end"||h.types[u]==="comment")){f.push(h.token[u]);if(h.types[u+1]==="value"){if(h.lines[u+1]===1){f.push(" ");}else if(h.lines[u+1]>1){l(_);}}else if(h.types[u+1]!=="separator"){if(h.types[u+1]!=="comment"||h.types[u+1]==="comment"&&h.lines[u+1]>1){l(_);}else {f.push(" ");}}}else if(d(h.token[u],58)){f.push(h.token[u]);if(a.style.compressCSS===false)f.push(" ");}else if(h.types[u]==="selector"){if(a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);}if(h.token[u].indexOf("and(")>0){h.token[u]=h.token[u].replace(/and\(/,"and (");f.push(h.token[u]);}else if(h.token[u].indexOf("when(")>0){g=h.token[u].split("when(");f.push(g[0].replace(/\s+$/,y));l(_+1);f.push(`when (${g[1]}`);}else {f.push(h.token[u]);}if(h.types[u+1]==="start"){if(a.script.braceAllman===true){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}}else if(d(h.token[u],44)){f.push(h.token[u]);if(h.types[u+1]==="selector"||h.types[u+1]==="property"){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}else if(h.stack[u]==="map"&&d(h.token[u+1],41)&&u-h.begin[u]>5){f.push(h.token[u]);l(_);}else if(h.token[u]==="x;"){l(_);}else if((h.types[u]==="variable"||h.types[u]==="function")&&a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);f.push(h.token[u]);}else if(J(h.token[u],59)||d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&J(h.token[u+1],125))){f.push(h.token[u]);}u=u+1;}while(u{const f=ye({},a.script);if(a.language==="json"){a.script=ye(a.script,a.json,{quoteCovert:"double"});}const h=new Set(["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]);const m=Ce(null);const e=M.data;const _="script";const v=M.scopes;const u=M.end<1||M.end>e.token.length?e.token.length:M.end+1;const g=(()=>{let t=M.start;let O=isNaN(a.indentLevel)?0:Number(a.indentLevel);let T=false;let i=false;let j="";let C="";let b=e.types[0];let E=e.token[0];const Y=[-1];const Q=[];const n=M.start>0?Array(M.start).fill(0,0,M.start):[];const k=[];const x=[[]];const S=[];const R=[];const B=[];const P=[false];const N=[];const U=[];function H(){G(false,false);const $=a.commentIndent===true?O:0;if(T===false&&/\/\u002a\s*global\s/.test(e.token[t])){const c=e.token[t].replace(/\/\u002a\s*global\s+/,"").replace(/\s*\u002a\/$/,"").split(",");let o=c.length;do{o=o-1;c[o]=c[o].replace(/\s+/g,"");if(c[o]!=="")v.push([c[o],-1]);}while(o>0)}if(e.types[t-1]==="comment"||e.types[t+1]==="comment"){n[t-1]=$;}else if(e.lines[t]<2){let c=t+1;if(e.types[c]==="comment"){do{c=c+1;}while(c0){do{o=o-1;if(v[o][1]===c){v[o][1]=t;}else if(v[o][1]0)}c=c+1;e.begin.splice(c,1);e.ender.splice(c,1);e.lexer.splice(c,1);e.lines.splice(c,1);e.stack.splice(c,1);e.token.splice(c,1);e.types.splice(c,1);o=t+1;do{e.begin[o]=t;e.stack[o]=e.stack[c];o=o+1;}while(o-1&&e.lines[t]<3){e.lines[t]=3;}}if(e.types[t+1]!=="comment")T=true;return}else if(e.token[t-1]===","){n[t-1]=$;}else if(E==="="&&e.types[t-1]!=="comment"&&/^(\/\*\*\s*@[a-z_]+\s)/.test(C)===true){n[t-1]=-10;}else if(E==="{"&&e.types[t-1]!=="comment"&&e.lines[0]<2){if(e.stack[t]==="function"){n[t-1]=$;}else {n[t-1]=/\n/.test(C)?$:-10;}}else {n[t-1]=$;}if(e.types[t+1]!=="comment")T=true;if(e.token[e.begin[t]]==="("){n.push(O+1);}else {n.push(O);}if(n[t]>-1&&e.lines[t]<3){if(e.types[t-1]==="comment"&&C.startsWith("//")){e.lines[t]=2;}else {e.lines[t]=3;}}if(a.script.commentNewline===true&&C.startsWith("//")===false&&e.lines[t]>=3){e.lines[t]=2;}}function G($,c){let o=t-1;let A=$===true?0:1;const L=x[x.length-1]===void 0?[]:x[x.length-1];const w=c===false&&e.stack[t]==="array"&&$===true&&C!=="[";if(R[R.length-1]===false||e.stack[t]==="array"&&a.script.arrayFormat==="inline"||e.stack[t]==="object"&&a.script.objectIndent==="inline"){return}R[R.length-1]=false;do{if(e.types[o]==="end"){A=A+1;}else if(e.types[o]==="start"){A=A-1;}if(e.stack[o]==="global")break;if(A===0){if(e.stack[t]==="class"||e.stack[t]==="map"||w===false&&($===false&&e.token[o]!=="("&&e.token[o]!=="x("||$===true&&e.token[o]===",")){if(e.types[o+1]==="template_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}}else if(e.stack[t]==="array"&&e.types[t]==="operator"){if(e.token[o]===",")n[o]=O;if(o===e.begin[t])break}if($===false)break}if(A<0){if(e.types[o+1]==="template_start"||e.types[o+1]==="template_string_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}break}o=o-1;}while(o>-1)}function oe(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{let o=t;let A=false;const L=e.begin[o];do{o=o-1;if(e.lexer[o]==="markup"){A=true;break}if(e.begin[o]!==L)o=e.begin[o];}while(o>L);if(A===true){o=t;do{o=o-1;if(e.begin[o]!==L){o=e.begin[o];}else if(e.token[o]===","){n[o]=O+1;}}while(o>L);n[L]=O+1;n[t-1]=O;}else {n[t-1]=-20;}};if(C===")"&&e.token[t+1]==="."&&$[$.length-1]>-1&&e.token[$[0]]!==":"){let o=e.begin[t];let A=false;let L=false;do{o=o-1;}while(o>0&&n[o]<-9);A=n[o]===O;o=t+1;do{o=o+1;if(e.token[o]==="{"){L=true;break}if(e.begin[o]===e.begin[t+1]&&(e.types[o]==="separator"||e.types[o]==="end")){break}}while(o1){x[x.length-2].push(e.begin[t]);O=O+1;}}if(b!=="separator")fe();if(e.token[t+1]===","&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.token[e.begin[t]-1]===","&&(e.token[t+1]==="}"||e.token[t+1]==="]")&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.stack[t]!=="attribute"){if(C!==")"&&C!=="x)"&&(e.lexer[t-1]!=="markup"||e.lexer[t-1]==="markup"&&e.token[t-2]!=="return")){O=O-1;}if(C==="}"&&e.stack[t]==="switch"&&a.script.noCaseIndent===false){O=O-1;}}if(C==="}"||C==="x}"){if(e.types[t-1]!=="comment"&&E!=="{"&&E!=="x{"&&b!=="end"&&b!=="string"&&b!=="number"&&b!=="separator"&&E!=="++"&&E!=="--"&&(t<2||e.token[t-2]!==";"||e.token[t-2]!=="x;"||E==="break"||E==="return")){let o=t-1;let A=false;const L=e.begin[t];const w=Q.length;do{if(e.begin[o]===L){if(e.token[o]==="="||e.token[o]===";"||e.token[o]==="x;"){A=true;}if(e.token[o]==="."&&n[o-1]>-1){R[R.length-1]=false;n[L]=O+1;n[t-1]=O;break}if(o>0&&e.token[o]==="return"&&(e.token[o-1]===")"||e.token[o-1]==="x)"||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o-1]==="}"||e.token[o-1]==="x}"||e.token[o-1]===";"||e.token[o-1]==="x;")){O=O-1;n[t-1]=O;break}if(e.token[o]===":"&&k.length===0||e.token[o]===","&&A===false){break}if(o===0||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o]==="for"||e.token[o]==="if"||e.token[o]==="do"||e.token[o]==="function"||e.token[o]==="while"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"||e.token[o]==="with"){if(Q[w-1]===false&&w>1&&(t===u-1||e.token[t+1]!==")"&&e.token[t+1]!=="x)")&&e.stack[t]!=="object"){O=O-1;}break}}else {o=e.begin[o];}o=o-1;}while(o>L)}Y.pop();}if(a.script.bracePadding===false&&C!=="}"&&b!=="markup"){n[t-1]=-20;}if(a.script.bracePadding===true&&b!=="start"&&E!==";"&&(n[e.begin[t]]<-9||R[R.length-1]===true)){n[e.begin[t]]=-10;n[t-1]=-10;n.push(-20);}else if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(O);}else if(e.stack[t]==="array"&&($.length>0||S[S.length-1]===true)){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if((e.stack[t]==="object"||e.begin[t]===0&&C==="}")&&$.length>0){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if(C===")"||C==="x)"){const o=C===")"&&E!=="("&&U.length>0?U.pop()+1:0;const A=e.token[e.begin[t]-1]==="if"?(()=>{let L=t;do{L=L-1;if(e.token[L]===")"&&n[L-1]>-1)return o}while(L>e.begin[t]);return o+5})():o;if(o>0&&(a.language!=="jsx"||a.language==="jsx"&&e.token[e.begin[t]-1]!=="render")){const L=a.wrap;const w=e.begin[t];const z=U.length;let q=t-2;if(A>L){n[e.begin[t]]=O+1;n[t-1]=O;do{if(e.begin[q]===w){if(e.token[q]==="&&"||e.token[q]==="||"){n[q]=O+1;}else if(n[q]>-1&&e.types[q]!=="comment"&&e.token[q+1]!=="."){n[q]=n[q]+1;}}else if(n[q]>-1&&e.token[q+1]!=="."){n[q]=n[q]+1;}q=q-1;}while(q>w)}else if(z>0){U[z-1]=U[z-1]+o;}}else if(C===")"&&t>e.begin[t]+2&&e.lexer[e.begin[t]+1]===_&&e.token[e.begin[t]+1]!=="function"){const L=e.begin[t]<0?0:e.begin[t];const w=a.wrap;const z=$.length;let q=0;let W=0;let se=0;let F=0;let K=0;let V=false;let ne=false;let he=O+1;let le=false;let ae=false;let je=false;if(n[L]<-9){W=L;do{W=W+1;}while(W0&&se0)se=q;W=W-1;}while(W>L&&n[W]<-9);if(e.token[W+1]===".")he=n[W]+1;if(q>w-1&&w>0&&E!=="("&&se!==-1&&R[R.length-2]===false){if(e.token[L-1]==="if"&&Q[Q.length-1]===true||e.token[L-1]!=="if"){n[L]=he;if(e.token[L-1]==="for"){W=L;do{W=W+1;if(e.token[W]===";"&&e.begin[W]===L){n[W]=he;}}while(W=w&&w>0)le=true;}else if(e.types[W]==="markup"&&ae===false){ae=true;}if(n[W]>-9&&e.token[W]!==","&&e.types[W]!=="markup"){q=0;}else {if(n[W]===-10)q=q+1;q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){le=true;}}}else {if(n[W]>-9){q=0;}else {q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){le=true;}}}}while(W>L&&le===false);if(V===false&&e.token[e.begin[t]+1].charAt(0)==="`"){n[e.begin[t]]=-20;n[t-1]=-20;}else if((V===true||ae===true)&&q>=w&&w>0||n[L]>-9){if(je===true){he=n[L];if(e.token[L-1]==="["){W=t;do{W=W+1;if(e.types[W]==="end"||e.token[W]===","||e.token[W]===";"){break}}while(W0&&$[z-1]>W){he=he-z;}R[R.length-1]=false;W=t;do{W=W-1;if(e.begin[W]===L){if(e.token[W].indexOf("=")>-1&&e.types[W]==="operator"&&e.token[W].indexOf("!")<0&&e.token[W].indexOf("==")<0&&e.token[W]!=="<="&&e.token[W].indexOf(">")<0){q=W;do{q=q-1;if(e.begin[q]===L&&(e.token[q]===";"||e.token[q]===","||q===L)){break}}while(q>L)}else if(e.token[W]===","){n[W]=he;}else if(n[W]>-9&&ne===false&&(e.token[L-1]!=="for"||e.token[W+1]==="?"||e.token[W+1]===":")&&(e.token[e.begin[t]]!=="("||e.token[W]!=="+")){n[W]=n[W]+1;}}else if(n[W]>-9&&ne===false){n[W]=n[W]+1;}}while(W>L);n[L]=he;n[t-1]=he-1;}else {n[t-1]=-20;}if(e.token[e.begin[t]-1]==="+"&&n[e.begin[t]]>-9){n[e.begin[t]-1]=-10;}}else if(a.language==="jsx"){c();}else {n[t-1]=-20;}n.push(-20);}else if(R[R.length-1]===true){if(C==="]"&&e.begin[t]-1>0&&e.token[e.begin[e.begin[t]-1]]==="["){R[R.length-2]=false;}if(e.begin[t]-1){n[t-1]=n[e.begin[t]]-1;}else {n[t-1]=-20;}n.push(-20);}else if(e.types[t-1]==="comment"&&e.token[t-1].substring(0,2)==="//"){if(e.token[t-2]==="x}")n[t-3]=O+1;n[t-1]=O;n.push(-20);}else if(e.types[t-1]!=="comment"&&(E==="{"&&C==="}"||E==="["&&C==="]")){n[t-1]=-20;n.push(-20);}else if(C==="]"){if(Q[Q.length-1]===true&&R[R.length-1]===false&&a.script.arrayFormat!=="inline"||E==="]"&&n[t-2]===O+1){n[t-1]=O;n[e.begin[t]]=O+1;}else if(n[t-1]===-10){n[t-1]=-20;}if(e.token[e.begin[t]+1]==="function"){n[t-1]=O;}else if(Q[Q.length-1]===false){if(E==="}"||E==="x}")n[t-1]=O;let o=t-1;let A=1;do{if(e.token[o]==="]")A=A+1;if(e.token[o]==="["){A=A-1;if(A===0){if(o>0&&(e.token[o+1]==="{"||e.token[o+1]==="x{"||e.token[o+1]==="[")){n[o]=O+1;break}if(e.token[o+1]!=="["||i===false){n[o]=-20;break}break}}if(A===1&&e.token[o]==="+"&&n[o]>1){n[o]=n[o]-1;}o=o-1;}while(o>-1)}else if(a.language==="jsx"){c();}if(a.script.arrayFormat==="inline"){let o=t;const A=e.begin[t];do{o=o-1;if(e.types[o]==="end")break}while(o>A);if(o>A){n[e.begin[t]]=O+1;n[t-1]=O;}else {n[e.begin[t]]=-20;n[t-1]=-20;}}else if(n[e.begin[t]]>-1){n[t-1]=n[e.begin[t]]-1;}n.push(-20);}else if(C==="}"||C==="x}"||Q[Q.length-1]===true){if(C==="}"&&E==="x}"&&e.token[t+1]==="else"){n[t-2]=O+2;n.push(-20);}else {n.push(O);}n[t-1]=O;}else {n.push(-20);}if(e.types[t-1]==="comment")n[t-1]=O;ce();i=Q[Q.length-1];Q.pop();x.pop();S.pop();B.pop();N.pop();R.pop();P.pop();}function ce(){let $=0;const c=x[x.length-1];if(c===void 0)return;$=c.length-1;if($<1&&c[$]<0&&(C===";"||C==="x;"||C===")"||C==="x)"||C==="}"||C==="x}")){c.pop();return}if($<0||c[$]<0)return;if(C===":"){if(e.token[c[$]]!=="?"){do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1&&e.token[c[$]]!=="?")}c[$]=t;n[t-1]=O;}else {do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1)}if((e.stack[t]==="array"||C===",")&&c.length<1)c.push(-1);}function X(){const $=t;do{if(e.lexer[t+1]===_&&e.begin[t+1]<$)break;if(e.token[$-1]==="return"&&e.types[t]==="end"&&e.begin[t]===$)break;n.push(0);t=t+1;}while(t0){if(e.token[c-1]==="if"){O=O-2;}else {O=O-1;}}break}}$=$-1;}while($>0&&$>c)}function Oe(){if(e.token[t+1]!==","&&C.indexOf("/>")!==C.length-2||e.token[t+1]===","&&e.token[e.begin[t]-3]!=="React"){G(false,false);}if(E==="return"||E==="?"||E===":"){n[t-1]=-10;n.push(-20);}else if(b==="start"||e.token[t-2]==="return"&&e.stack[t-1]==="method"){n.push(O);}else {n.push(-20);}}function I(){const $=x[x.length-1]===void 0?[]:x[x.length-1];function c(){const o=e.token[t+1];let A=0;let L=0;let w=t;let z=C==="+"?O+2:O;let q=0;if(a.wrap<1){n.push(-10);return}do{w=w-1;if(e.token[e.begin[t]]==="("){if(w===e.begin[t]){q=A;}if(e.token[w]===","&&e.begin[w]===e.begin[t]&&Q[Q.length-1]===true){break}}if(A>a.wrap-1)break;if(n[w]>-9)break;if(e.types[w]==="operator"&&e.token[w]!=="="&&e.token[w]!=="+"&&e.begin[w]===e.begin[t]){break}A=A+e.token[w].length;if(w===e.begin[t]&&e.token[w]==="["&&A-9)break;if(n[w]===-10)A=A+1;}while(w>0);if(q>0)q=q+o.length;A=A+o.length;L=w;if(A>a.wrap-1&&n[w]<-9){do{L=L-1;}while(L>0&&n[L]<-9)}if(e.token[L+1]==="."&&e.begin[t]<=e.begin[L]){z=z+1;}else if(e.types[L]==="operator"){z=n[L];}L=o.length;if(A+L0){w=a.wrap-q;}else {w=a.wrap-A;}if(w>0&&w<5){n.push(z);if(e.token[t].charAt(0)==='"'||e.token[t].charAt(0)==="'"){t=t+1;n.push(-10);}return}if(e.token[e.begin[t]]!=="("||q>a.wrap-1||q===0){if(q>0)A=q;if(A-o.lengtha.wrap-4){n.push(z);return}n.push(-10);return}n.push(z);return}n.push(-10);}fe();if($.length>0&&$[$.length-1]>-1&&e.stack[t]==="array"){S[S.length-1]=true;}if(C!==":"){if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&R.length>0){G(true,false);}if(C!=="?"&&e.token[$[$.length-1]]==="."){let o=0;let A=t;const L=e.begin[A];do{if(e.begin[A]===L){if(e.token[A+1]==="{"||e.token[A+1]==="["||e.token[A]==="function"){break}if(e.token[A]===","||e.token[A]===";"||e.types[A]==="end"||e.token[A]===":"){$.pop();O=O-1;break}if(e.token[A]==="?"||e.token[A]===":"){if(e.token[$[$.length-1]]==="."&&o<2)$[$.length-1]=L+1;break}if(e.token[A]===".")o=o+1;}A=A+1;}while(A-1&&n[o]<-9);$.push(t);O=O+1;if(n[o]===O&&e.token[o+1]!==":"){O=O+1;$.push(t);}n[t-1]=O;if(e.token[e.begin[t]]==="("&&($.length<2||$[0]===$[1])){R[R.length-1]=false;if(t-2===e.begin[t]){n[e.begin[t]]=O-1;}else {n[e.begin[t]]=O;}o=t-2;do{if(e.types[o]==="end"&&n[o-1]>-1)break;if(n[o]>-1)n[o]=n[o]+1;o=o-1;}while(o>e.begin[t])}}n.push(-10);return}if(C===":"){if(e.stack[t]==="map"||e.types[t+1]==="type"||e.types[t+1]==="type_start"){n[t-1]=-20;n.push(-10);return}if(k.length>0&&e.begin[k[k.length-1]]===e.begin[t]){let o=t;const A=e.begin[t];do{o=o-1;if(e.begin[o]===A){if(e.token[o]===","||e.token[o]===";"){n[t-1]=-20;break}if(e.token[o]==="?"){k.pop();ce();if(a.script.ternaryLine===true)n[t-1]=-10;n.push(-10);return}}else if(e.types[o]==="end"){o=e.begin[o];}}while(o>A)}if(e.token[t-2]==="where"&&e.stack[t-2]===e.stack[t]){n[t-1]=-10;n.push(-10);return}if(b==="reference"&&e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("){n[t-1]=-20;n.push(-10);return}if((E===")"||E==="x)")&&e.token[e.begin[t-1]-2]==="function"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(-10);return}if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&(b==="reference"||E===")"||E==="]"||E==="?")&&(e.stack[t]==="map"||e.stack[t]==="class"||e.types[t+1]==="reference")&&(k.length===0||k[k.length-1]-1||e.types[t-2]==="word"&&e.stack[t]!=="switch")){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="switch"&&(k.length<1||k[k.length-1]0){n[t-1]=O;}else {n[t-1]=-10;}n.push(-10);return}if(C==="++"||C==="--"){if(b==="number"||b==="reference"){n[t-1]=-20;n.push(-10);}else if(t-1&&(/\d/.test(o.charAt(1))===true||o.charAt(1)==="."||o.charAt(1)==="-"||o.charAt(1)==="+")){n.push(-20);return}}return c()}if(e.types[t-1]!=="comment"){if(E==="("){n[t-1]=-20;}else if(C==="*"&&e.stack[t]==="object"&&e.types[t+1]==="reference"&&(E==="{"||E===",")){n[t-1]=O;}else if(C!=="?"||k.length===0){n[t-1]=-10;}}if(C.indexOf("=")>-1&&C!=="=="&&C!=="==="&&C!=="!="&&C!=="!=="&&C!==">="&&C!=="<="&&C!=="=>"&&e.stack[t]!=="method"&&e.stack[t]!=="object"){let o=t+1;let A=0;let L=false;let w="";if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&e.token[t+1]!=="function"){return}do{if(e.types[o]==="start"){if(L===true&&e.token[o]!=="["){if(P[P.length-1]===true){P[P.length-1]=false;}break}A=A+1;}if(e.types[o]==="end")A=A-1;if(A<0){if(P[P.length-1]===true){P[P.length-1]=false;}break}if(A===0){w=e.token[o];if(L===true){if(e.types[o]==="operator"||e.token[o]===";"||e.token[o]==="x;"||e.token[o]==="?"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"){if(w!==void 0&&(w==="?"||w.indexOf("=")>-1&&w!=="=="&&w!=="==="&&w!=="!="&&w!=="!=="&&w!==">="&&w!=="<=")){if(P[P.length-1]===false){P[P.length-1]=true;}}if((w===";"||w==="x;"||w==="var"||w==="let"||w==="const")&&P[P.length-1]===true){P[P.length-1]=false;}break}if(P[P.length-1]===true&&(w==="return"||w==="break"||w==="continue"||w==="throw")){P[P.length-1]=false;}}if(w===";"||w==="x;"||w===",")L=true;}o=o+1;}while(o{let c=e.begin[t];if(c<0){v.push([e.token[t],-1]);}else {if(e.stack[c+1]!=="function"){do{c=e.begin[c];}while(c>-1&&e.stack[c+1]!=="function")}v.push([e.token[t],c]);}};if(e.types[t-1]==="comment"){n[t-1]=O;}else if(b==="end"&&E!==")"&&e.token[e.begin[t-1]-1]!==")"){n[t-1]=-10;}else if(b!=="separator"&&b!=="start"&&b!=="end"&&b.indexOf("template_string")<0){if(b==="word"||b==="operator"||b==="property"||b==="type"||b==="reference"){n[t-1]=-10;}else {n[t-1]=-20;}}if(E==="var"&&e.lexer[t-1]===_){$();}else if(E==="function"){v.push([e.token[t],t]);}else if(E==="let"||E==="const"){v.push([e.token[t],t]);}else if(e.stack[t]==="arguments"){v.push([e.token[t],t]);}else if(E===","){let c=t;do{c=c-1;}while(c>e.begin[t]&&e.token[c]!=="var"&&e.token[c]!=="let"&&e.token[c]!=="const");if(e.token[c]==="var"){$();}else if(e.token[c]==="let"||e.token[c]==="const"){v.push([e.token[t],t]);}}n.push(-10);}function ee(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{if(a.script.methodChain>0){let o=t;let A=e.begin[t];const L=[t];const w=e.token[A-1]==="if";do{o=o-1;if(e.types[o]==="end")o=e.begin[o];if(e.begin[o]===A){if(e.types[o]==="string"&&e.token[o].indexOf("${")===e.token[o].length-2){break}if(e.token[o]==="."){if(n[o-1]>0){n[t-1]=w===true?O+1:O;return}L.push(o);}else if(e.token[o]===";"||e.token[o]===","||e.types[o]==="operator"||(e.types[o]==="word"||e.types[o]==="reference")&&(e.types[o-1]==="word"||e.types[o-1]==="reference")){break}}}while(o>A);if(L.length-1)n[o]=n[o]+1;o=o+1;}while(o0){if(e.stack[t]==="object"||e.stack[t]==="array"){G(true,false);}else {G(false,false);}}if(a.script.methodChain===0){n[t-1]=-20;}else if(a.script.methodChain<0){if(e.lines[t]>0){c();}else {n[t-1]=-20;}}else {c();}n.push(-20);return}if(C===","){fe();if(Q[Q.length-1]===false&&(e.stack[t]==="object"||e.stack[t]==="array"||e.stack[t]==="paren"||e.stack[t]==="expression"||e.stack[t]==="method")){Q[Q.length-1]=true;if(e.token[e.begin[t]]==="("){let o=t;do{o=o-1;if(e.begin[o]===e.begin[t]&&e.token[o]==="+"&&n[o]>-9){n[o]=n[o]+2;}}while(o>e.begin[t])}}if(e.stack[t]==="array"&&a.script.arrayFormat==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="array"&&a.script.arrayFormat==="inline"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="object"&&a.script.objectIndent==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="object"&&a.script.objectIndent==="inline"){n[t-1]=-20;n.push(-10);return}if($.length>0){if($[$.length-1]>-1)ce();n[t-1]=-20;n.push(O);return}if(e.token[t-2]===":"&&e.token[t-4]==="where"){n[t-1]=-20;n.push(-10);return}n[t-1]=-20;if(e.types[t+1]!=="end"){B[B.length-1]=B[B.length-1]+1;}if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&a.language!=="jsx"&&e.stack[t]!=="global"&&(e.types[t-1]!=="string"&&e.types[t-1]!=="number"||e.token[t-2]!=="+"||e.types[t-1]==="string"&&e.types[t-1]!=="number"&&e.token[t-2]==="+"&&e.types[t-3]!=="string"&&e.types[t-3]!=="number")){n.push(-10);return}if(b==="reference"&&e.types[t-2]==="word"&&"var-let-const-from".indexOf(e.token[t-2])<0&&(e.types[t-3]==="end"||e.token[t-3]===";")){N[N.length-1]=true;n.push(-10);return}if(N[N.length-1]===true||e.stack[t]==="notation"){n.push(-10);return}if(B[B.length-1]>3&&(e.stack[t]==="array"||e.stack[t]==="object")){if(R[R.length-1]===true)G(true,true);n[t-1]=-20;if(S[S.length-1]===true){n.push(O);return}const o=e.begin[t];let A=t;do{if(e.types[A]==="end"){A=e.begin[A];}else {if(e.token[A]===","&&e.types[A+1]!=="comment"){n[A]=O;}}A=A-1;}while(A>o);n[o]=O;S[S.length-1]=true;return}if(e.stack[t]==="object"){if(R[R.length-1]===true&&e.types[e.begin[t]-1]!=="word"&&e.types[e.begin[t]-1]!=="reference"&&e.token[e.begin[t]-1]!=="("&&e.token[e.begin[t]-1]!=="x("){const o=e.begin[t];let A=t-1;do{if(e.begin[A]===o){if(e.token[A]===",")break;if(e.token[A]===":"){G(true,false);break}}A=A-1;}while(A>o)}}if(R[R.length-1]===false||e.token[t-2]==="+"&&(b==="string"||b==="number")&&n[t-2]>0&&(E.charAt(0)==='"'||E.charAt(0)==="'")){if(e.stack[t]==="method"){if(e.token[t-2]==="+"&&(E.charAt(0)==='"'||E.charAt(0)==="'")&&(e.token[t-3].charAt(0)==='"'||e.token[t-3].charAt(0)==="'")){n.push(O+2);return}if(e.token[t-2]!=="+"){n.push(-10);return}}n.push(O);return}if(R[R.length-1]===true&&e.stack[t]!=="object"){n.push(-10);return}if(B[B.length-1]<4&&(e.stack[t]==="array"||e.stack[t]==="object")){n.push(-10);return}n.push(O);return}if(C===";"||C==="x;"){fe();if(e.token[t+1]!==void 0&&e.types[t+1].indexOf("attribute")>0&&e.types[t+1].indexOf("end")>0){n[t-1]=-20;n.push(O-1);return}if(Y[Y.length-1]>-1&&e.stack[Y[Y.length-1]]!=="expression"){let o=t;do{o=o-1;if(e.token[o]===";")break;if(e.token[o]===","){O=O-1;break}if(e.types[o]==="end")o=e.begin[o];}while(o>0&&o>e.begin[t])}Y[Y.length-1]=-1;ce();if(e.token[e.begin[t]-1]!=="for")G(false,false);N[N.length-1]=false;n[t-1]=-20;if(e.begin[t]>0&&e.token[e.begin[t]-1]==="for"&&e.stack[t]!=="for"){n.push(-10);return}n.push(O);return}n.push(-20);}function Ne(){const $=e.stack[t+1];const c=t===0?e.stack[t]:e.stack[t-1];if(E===")"||(c==="object"||c==="array")&&E!=="]"){if($!=="method"||$==="method"&&e.token[t+1]!==")"&&e.token[t+2]!==")"){if(E===")"&&($!=="function"||e.token[e.begin[e.begin[t-1]-1]]==="("||e.token[e.begin[e.begin[t-1]-1]]==="x(")){G(false,false);}else if(e.types[t+1]!=="end"&&e.types[t+2]!=="end"){G(true,false);}}}Q.push(false);x.push([]);P.push(false);S.push(false);N.push(false);B.push(0);if(a.script.neverFlatten===true||$==="array"&&a.script.arrayFormat==="indent"||$==="attribute"||b==="generic"||$==="class"&&E!=="("&&E!=="x("||C==="["&&e.token[t+1]==="function"){R.push(false);}else {if($==="expression"||$==="method"){R.push(true);}else if(($==="object"||$==="class")&&(E==="("||E==="x("||b==="word"||b==="reference")){R.push(true);}else if($==="array"||C==="("||C==="x("){R.push(true);}else if(C==="{"&&$==="object"&&b!=="operator"&&b!=="start"&&b!=="string"&&b!=="number"&&c!=="object"&&c!=="array"&&t>0){R.push(true);}else {R.push(false);}}if(C!=="("&&C!=="x("&&e.stack[t+1]!=="attribute"){O=O+1;}if(C==="{"||C==="x{"){Y.push(-1);if(e.types[t-1]!=="comment"){if(b==="markup"){n[t-1]=O;}else if(a.script.braceAllman===true&&b!=="operator"&&E!=="return"){n[t-1]=O-1;}else if(e.stack[t+1]!=="block"&&($==="function"||E===")"||E==="x)"||E===","||E==="}"||b==="markup")){n[t-1]=-10;}else if(E==="{"||E==="x{"||E==="["||E==="}"||E==="x}"){n[t-1]=O-1;}}if($==="object"){if(a.script.objectIndent==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.objectIndent==="inline"){R[R.length-1]=true;n.push(-20);return}}if($==="switch"){if(a.script.noCaseIndent===true){n.push(O-1);return}O=O+1;n.push(O);return}if(R[R.length-1]===true){if(b!=="word"&&b!=="reference"){n.push(-20);return}}n.push(O);return}if(C==="("||C==="x("){if(a.wrap>0&&C==="("&&e.token[t+1]!==")"){U.push(1);}if(E==="-"&&(e.token[t-2]==="("||e.token[t-2]==="x(")){n[t-2]=-20;}if(b==="end"&&c!=="if"&&c!=="for"&&c!=="catch"&&c!=="else"&&c!=="do"&&c!=="try"&&c!=="finally"&&c!=="catch"){if(e.types[t-1]==="comment"){n[t-1]=O;}else {n[t-1]=-20;}}if(E==="async"){n[t-1]=-10;}else if($==="method"||e.token[t-2]==="function"&&b==="reference"){if(E==="import"||E==="in"||a.script.functionNameSpace===true){n[t-1]=-10;}else if(E==="}"&&e.stack[t-1]==="function"||b==="word"||b==="reference"||b==="property"){n[t-1]=-20;}else if(c!=="method"&&$!=="method"){n[t-1]=O;}}if(E==="+"&&(e.token[t-2].charAt(0)==='"'||e.token[t-2].charAt(0)==="'")){n.push(O);return}if(E==="}"||E==="x}"){n.push(-20);return}if(E==="-"&&(t<2||e.token[t-2]!==")"&&e.token[t-2]!=="x)"&&e.token[t-2]!=="]"&&e.types[t-2]!=="reference"&&e.types[t-2]!=="string"&&e.types[t-2]!=="number")||a.script.functionSpace===false&&E==="function"){n[t-1]=-20;}n.push(-20);return}if(C==="["){if(E==="[")Q[Q.length-2]=true;if(E==="return"||E==="var"||E==="let"||E==="const"){n[t-1]=-10;}else if(e.types[t-1]!=="comment"&&e.stack[t-1]!=="attribute"&&(b==="end"||b==="word"||b==="reference")){n[t-1]=-20;}else if(E==="["||E==="{"||E==="x{"){n[t-1]=O-1;}if(e.stack[t]==="attribute"){n.push(-20);return}if(a.script.arrayFormat==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.arrayFormat==="inline"){R[R.length-1]=true;n.push(-20);return}if($==="method"||R[R.length-1]===true){n.push(-20);return}let o=t+1;do{if(e.token[o]==="]"){n.push(-20);return}if(e.token[o]===","){n.push(O);return}o=o+1;}while(o0){n[t-1]=O;}}function We(){if(j==="template_else"){n[t-1]=O-1;n.push(O);}else if(j==="template_start"){O=O+1;if(e.lines[t-1]<1)n[t-1]=-20;if(e.lines[t]>0||E.length===1&&b==="string"){n.push(O);}else {n.push(-20);}}else if(j==="template_end"){O=O-1;if(b==="template_start"||e.lines[t-1]<1){n[t-1]=-20;}else {n[t-1]=O;}if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}else if(j==="template"){if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}}function ze(){if(j==="template_string_start"){O=O+1;n.push(O);}else if(j==="template_string_else"){fe();n[t-1]=O-1;n.push(O);}else {fe();O=O-1;n[t-1]=O;n.push(-10);}if(t>2&&(e.types[t-2]==="template_string_else"||e.types[t-2]==="template_string_start")){if(a.script.bracePadding===true){n[t-2]=-10;n[t-1]=-10;}else {n[t-2]=-20;n[t-1]=-20;}}}function Z(){if(e.token[t-1]===","||e.token[t-1]===":"&&e.stack[t-1]!=="data_type"){n[t-1]=-10;}else {n[t-1]=-20;}if(e.types[t]==="type"||e.types[t]==="type_end"){n.push(-10);}if(e.types[t]==="type_start"){n.push(-20);}}function D(){if((E===")"||E==="x)")&&e.stack[t]==="class"&&(e.token[e.begin[t-1]-1]==="static"||e.token[e.begin[t-1]-1]==="final"||e.token[e.begin[t-1]-1]==="void")){n[t-1]=-10;n[e.begin[t-1]-1]=-10;}if(E==="]")n[t-1]=-10;if(C==="else"&&E==="}"){if(e.token[t-2]==="x}")n[t-3]=n[t-3]-1;if(a.script.braceAllman===true||a.script.elseNewline===true){n[t-1]=O;}}if(C==="new"&&h.has(e.token[t+1]));if(C==="from"&&b==="end"&&t>0&&(e.token[e.begin[t-1]-1]==="import"||e.token[e.begin[t-1]-1]===",")){n[t-1]=-10;}if(C==="function"){if(a.script.functionSpace===false&&t1){if(e.types[t-2]==="operator"||e.token[t-2]===","){n[t-1]=-20;}else if(e.types[t-2]==="start"){n[t-2]=-20;n[t-1]=-20;}}else if(C==="while"&&(E==="}"||E==="x}")){let $=t-1;let c=0;do{if(e.token[$]==="}"||e.token[$]==="x}")c=c+1;if(e.token[$]==="{"||e.token[$]==="x{")c=c-1;if(c===0){if(e.token[$-1]==="do"){n[t-1]=-10;break}n[t-1]=O;break}$=$-1;}while($>-1)}else if(C==="in"||(C==="else"&&a.script.elseNewline===false&&a.script.braceAllman===false||C==="catch")&&(E==="}"||E==="x}")){n[t-1]=-10;}else if(C==="var"||C==="let"||C==="const"){Y[Y.length-1]=t;if(b==="end")n[t-1]=O;if(e.token[e.begin[t]-1]!=="for"){let $=t+1;let c=0;do{if(e.types[$]==="end")c=c-1;if(e.types[$]==="start")c=c+1;if(c<0||c===0&&(e.token[$]===";"||e.token[$]===",")){break}$=$+1;}while($0&&e.token[t]!==")"){if(e.types[t]==="comment"&&U[U.length-1]>-1){U[U.length-1]=a.wrap+1;}else if(n[t]>-1||e.token[t].charAt(0)==="`"&&e.token[t].indexOf(pe)>0){U[U.length-1]=-1;}else if(U[U.length-1]>-1){U[U.length-1]=U[U.length-1]+e.token[t].length;if(n[t]===-10)U[U.length-1]=U[U.length-1]+1;}}}else {X();}t=t+1;}while(t{const t=[];const O=(()=>{const n=[];const k=a.indentChar;let x=a.indentSize;if(typeof x!=="number"||x<1)return "";do{n.push(k);x=x-1;}while(x>0);return n.join("")})();const T=a.crlf===true?"\r\n":pe;const i=a.preserveLine+1;const j=["x;","x}","x{","x(","x)"];let C=M.start;let b="";let E=a.indentLevel;function Y(n){const k=[];const x=(()=>{if(C===u-1)return 1;if(e.lines[C+1]-1>i)return i;if(e.lines[C+1]>1)return e.lines[C+1]-1;return 1})();let S=0;if(n<0)n=0;do{k.push(T);S=S+1;}while(S0){S=0;do{k.push(O);S=S+1;}while(S-1&&e.types[B]!=="comment"){if(e.token[B+1]==="."){S=S+a.indentSize*a.indentChar.length;}break}}else if(g[B]>-1){break}if(e.types[B]!=="comment"){if(g[B-1]===-10)S=S+1;S=e.token[B].length+S;}B=B-1;}while(B>N);P=B;if(e.token[P]===","&&e.token[R+1]==="="){do{if(e.types[P]==="end")P=e.begin[P];if(e.begin[P]===N){if(e.token[P]===";"||e.token[P]==="x;")break;if(e.token[P]==="var"||e.token[P]==="const"||e.token[P]==="let"){S=S+a.indentSize*a.indentChar.length;break}}P=P-1;}while(P>N)}if(S>x)x=S;U.push([R,S]);R=B;}else if(e.types[R]==="end"){R=e.begin[R];}R=R-1;}while(R>N);R=U.length;if(R>0){do{R=R-1;B=U[R][1];if(B0)}};C=u;do{C=C-1;if(e.lexer[C]==="script"){if(e.token[C]==="}"&&e.token[C-1]!=="{"&&g[e.begin[C]]>0){n(C);}}else {C=e.begin[C];}}while(C>0)}C=M.start;do{if(e.lexer[C]===_||M.beautify[e.lexer[C]]===void 0){if(e.types[C]==="comment"&&a.commentIndent===true){if(/\n/.test(e.token[C])){const n=e.begin[C]>-1?e.token[C].charAt(2)==="*"?$e(g[C],O)+a.indentChar:$e(g[C],O):a.indentChar;const k=e.token[C].split(/\n/);let x=1;do{k[x]=n+k[x].trimStart();x=x+1;}while(x-1){if((g[C]>-1&&e.token[C]==="{"||g[C]>-1&&e.token[C+1]==="}")&&e.lines[C]<3&&a.script.braceNewline===true){if(e.lines[C+1]<3)t.push(Y(0));}t.push(Y(g[C]));E=g[C];}else if(g[C]===-10){t.push(de);if(e.lexer[C+1]!==_)E=E+1;}}else {if(m[C]===C){t.push(e.token[C]);}else {M.end=m[C];M.start=C;a.indentLevel=E;b=M.beautify[e.lexer[C]](a).replace(we,y);t.push(b);C=M.iterator;if(g[C]===-10){t.push(de);}else if(g[C]>-1){t.push(Y(g[C]));}a.indentLevel=0;}}C=C+1;}while(C" instead of "/>".',lexer:"markup",type:"boolean"},classPadding:{description:"Inserts new line characters between every CSS code block.",default:false,type:"boolean",lexer:"style"},sortSelectors:{default:false,type:"boolean",description:"If comma separated CSS selectors should present on a single line of code.",lexer:"style"},sortProperties:{lexer:"style",description:"This option will alphabetically sort CSS properties contained within classes.",default:false,type:"boolean"},noLeadZero:{lexer:"style",description:"This will eliminate leading zeros from numbers expressed within values.",default:false,type:"boolean"},compressCSS:{lexer:"style",description:"If CSS should be beautified in a style where the properties and values are minifed for faster reading of selectors.",default:false,type:"boolean"},forceValue:{lexer:"style",description:"If CSS selector property values should be indented onto newlines",default:"preserve",type:"select",values:[{rule:"preserve",description:"Preserves property values, output does not augment provided structures"},{rule:"collapse",description:"Collapsed all selector property values onto newlines"},{rule:"wrap",description:"Collapase only selector property values which exceed wrap limit"}]},braceAllman:{lexer:"script",default:false,description:'Determines if opening curly braces will exist on the same line as their condition or be forced onto a new line, otherwise known as "Allman Style" indentation.',type:"boolean"},bracePadding:{default:false,description:"This will create a newline before and after objects values",type:"boolean",lexer:"script"},braceNewline:{default:false,description:"If true an empty line will be inserted after opening curly braces and before closing curly braces.",type:"boolean",lexer:"script"},braceStyle:{default:"none",description:"Emulates JSBeautify's brace_style option using existing Prettify options",type:"select",lexer:"script",values:[{rule:"none",description:"Ignores this option"},{rule:"collapse",description:"Sets formatObject to indent and neverflatten to true."},{rule:"collapse-preserve-inline",description:"Sets formatObject to inline and bracePadding to true"},{rule:"expand",description:"Sets objectIndent to indent and braceNewline + neverflatten to true."}]},arrayFormat:{lexer:"script",description:"Determines if all array indexes should be indented, never indented, or left to the default",type:"select",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},objectSort:{default:false,description:"This option will alphabetically sort object properties in JSON objects",type:"boolean",lexer:"script"},objectIndent:{description:"This option will alphabetically sort object properties in JSON objects",type:"select",lexer:"script",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},functionSpace:{lexer:"script",default:true,type:"boolean",description:"Inserts a space following the function keyword for anonymous functions."},functionNameSpace:{lexer:"script",default:true,type:"boolean",description:"If a space should follow a JavaScript function name."},methodChain:{lexer:"script",default:-1,description:"When to break consecutively chained methods and properties onto separate lines. A negative value disables this option. A value of 0 ensures method chainsare never broken.",type:"number"},caseSpace:{default:false,type:"boolean",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation thereby keeping the case on a single line of code.",lexer:"script"},inlineReturn:{lexer:"script",default:true,type:"boolean",description:"Inlines return statements contained within `if` and `else` conditions. This rules also augments code and will reason about your structure to output the best and most readable results."},elseNewline:{lexer:"script",default:false,type:"boolean",description:'If keyword "else" is forced onto a new line.'},ternaryLine:{lexer:"script",description:"If ternary operators in JavaScript `?` and `:` should remain on the same line.",type:"boolean",default:false},neverFlatten:{lexer:"script",default:true,description:"If destructured lists in script should never be flattend.",type:"boolean"},variableList:{lexer:"script",description:"If consecutive JavaScript variables should be merged into a comma separated list or if variables in a list should be separated. each \u2014 Ensure each reference is a single declaration statement.",type:"select",default:"none",values:[{rule:"none",description:"Ignores this option"},{rule:"each",description:"Ensure each reference is a single declaration statement"},{rule:"list",description:"Ensure consecutive declarations are a comma separated list"}]},vertical:{lexer:"script",description:"If lists of assignments and properties should be vertically aligned",type:"boolean",default:false},noCaseIndent:{lexer:"script",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation, thereby keeping the case on a single line of code.",default:false,type:"boolean"},noSemicolon:{lexer:"script",description:"Removes semicolons that would be inserted by ASI. This option is in conflict with option `attemptCorrection` and takes precedence over conflicting features. Use of this option is a possible security/stability risk.",default:false,type:"boolean"},endComma:{description:"If there should be a trailing comma in arrays and objects.",type:"select",lexer:"script",default:"none",values:[{rule:"none",description:"Ignore this option"},{rule:"always",description:"Always ensure there is a tailing comma"},{rule:"never",description:"Remove trailing commas"}]}};var lt={};at(lt,{format:()=>Fe,formatSync:()=>ht,language:()=>qe,options:()=>Ie,parse:()=>rt});function st(a){const f=a.source.search(et);const h=a.source.search(tt);const p=Re(Se);const r=p.length;let m=0;if(h>-1&&a.source.slice(0,h).trimStart()===y)return false;if(f>-1&&(f===0||`"':`.indexOf(a.source.charAt(f-1))<0)){let n=function(){if(g.charAt(t-1)!=="\\")return false;let k=t;do{k=k-1;}while(k>0&&g.charAt(k)==="\\");return (t-k)%2===0};const v=[];const u=f;const g=a.source;const l=g.length;let t=u;let O=0;let T=y;let i=y;let j=y;let C=y;let b=[];let E=[];let Y;let Q;if(g.charAt(t)==="<"){Q="")break;if(Q==="//"&&g.charAt(t)==="\n")break;if(Q==="/*"&&g.slice(t-1,t+1)==="*/")break;if(Q.charCodeAt(1)===37&&g.slice(t-1,t+1)==="%"&&g.indexOf("endcomment",g.indexOf("{%",Y))>0)break}else if(g.charAt(t)===T&&T!=="${"){T=y;}else if(T==="`"&&g.slice(t,t+2)==="${"){T="${";}else if(T==="${"&&g.charAt(t)==="}"){T="`";}}t=t+1;}while(t0){T=g.slice(O,t+1);if(Q==="","comment");}else if(b[r]==="<"){X();}else if(b[r]==="/"&&(r===C-1||b[r+1]==="*")){N();}else if((s.count<0||i.lines[s.count]>0)&&b[r]==="#"&&b[r+1]==="!"&&(b[r+2]==="/"||b[r+2]==="[")){oe("#!"+b[r+2],"\n","string");}else if(b[r]==="/"&&(r===C-1||b[r+1]==="/")){ce();}else if(d(b[r],96)||d(b[r],125)&&s.structure[s.structure.length-1][0]==="template_string"){if(u>-1)$();m=ze();if(d(m,125)&&m.slice(m.length-2)==="${"){e="template_string_else";ee("template_string");}else if(m.slice(m.length-2)==="${"){e="template_string_start";ee("template_string");}else if(d(m[0],125)){e="template_string_end";ee("");}else {e="string";ee("");}}else if(b[r]==='"'||b[r]==="'"){oe(b[r],b[r],"string");}else if(b[r]==="-"&&(r-1)$();m="-";e="operator";ee("");}else if(u===-1&&(b[r]!=="0"||b[r]==="0"&&b[r+1]!=="b")&&(/\d/.test(b[r])||r!==C-2&&b[r]==="-"&&b[r+1]==="."&&/\d/.test(b[r+2])||r!==C-1&&(b[r]==="-"||b[r]===".")&&/\d/.test(b[r+1]))){if(u>-1)$();if(e==="end"&&b[r]==="-"){m="-";e="operator";}else {m=Oe();e="number";}ee("");}else if(b[r]===":"&&b[r+1]===":"){if(u>-1)$();if(h.script.correct===true)ie();P();r=r+1;m="::";e="separator";ee("");}else if(b[r]===","){if(u>-1)$();if(h.script.correct===true)ie();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(e==="comment"){H();}else if(S.len>-1&&S.count[S.len]===0&&h.script.variableList==="each"){P();m=";";e="separator";ee("");m=S.word[S.len];e="word";ee("");S.index[S.len]=s.count;}else {m=",";e="separator";P();ee("");}}else if(b[r]==="."){if(u>-1)$();k[k.length-1]=false;if(b[r+1]==="."&&b[r+2]==="."){m="...";e="operator";r=r+2;}else {P();m=".";e="separator";}if(/\s/.test(b[r-1])===true)s.linesSpace=1;ee("");}else if(b[r]===";"){if(u>-1)$();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(Q[Q.length-1]===0)Q.pop();if(S.len>-1&&S.count[S.len]===0){if(h.script.variableList==="each"){D();}else {S.index[S.len]=s.count+1;}}if(h.script.correct===true)ie();m=";";e="separator";if(i.token[s.count]==="x}"){B();}else {ee("");}U();}else if(b[r]==="("||b[r]==="["||b[r]==="{"){We(b[r]);}else if(b[r]===")"||b[r]==="]"||b[r]==="}"){G(b[r]);}else if(b[r]==="*"&&i.stack[s.count]==="object"&&u<0&&/\s/.test(b[r+1])===false&&b[r+1]!=="="&&/\d/.test(b[r+1])===false){u=r;}else if(b[r]==="="||b[r]==="&"||b[r]==="<"||b[r]===">"||b[r]==="+"||b[r]==="-"||b[r]==="*"||b[r]==="/"||b[r]==="!"||b[r]==="?"||b[r]==="|"||b[r]==="^"||b[r]===":"||b[r]==="%"||b[r]==="~"){m=I();if(m==="regex"){m=i.token[s.count];}else if(m==="*"&&i.token[s.count]==="function"){i.token[s.count]="function*";}else {e="operator";if(m!=="!"&&m!=="++"&&m!=="--")P();ee("");}}else if(u<0&&b[r]!==""){u=r;}if(S.len>-1&&s.count===S.index[S.len]+1&&i.token[S.index[S.len]]===";"&&m!==S.word[S.len]&&e!=="comment"&&h.script.variableList==="list"){D();}r=r+1;}while(r-1)$();if((i.token[s.count]!=="}"&&i.token[0]==="{"||i.token[0]!=="{")&&(i.token[s.count]!=="]"&&i.token[0]==="["||i.token[0]!=="[")){R(false);}if(n[0]===s.count){m="\n"+n[1];e="string";ee("");}if(i.token[s.count]==="x;"&&(i.token[s.count-1]==="}"||i.token[s.count-1]==="]")&&i.begin[s.count-1]===0){s.pop(i);}h.script=p;return i};var De={markup:"markup",html:"markup",liquid:"markup",xml:"markup",javascript:"script",typescript:"script",jsx:"script",tsx:"script",json:"script",less:"style",scss:"style",sass:"style",css:"style",text:"text"};var nt={html:"HTML",xhtml:"XHTML",liquid:"Liquid",xml:"XML",jsx:"JSX",tsx:"TSX",json:"JSON",yaml:"YAML",css:"CSS",scss:"SCSS",sass:"SASS",less:"LESS",text:"Plain Text",javascript:"JavaScript",typescript:"TypeScript"};function Xe(a){return typeof a!=="string"||a.indexOf("html")>-1||De[a]===void 0?"markup":De[a]}function ut(a){if(typeof a!=="string"||nt[a]===void 0)return a.toUpperCase();return nt[a]}function ke(a){const f={};if(a==="unknown"){f.language=a;f.languageName="Unknown";f.lexer="markup";}else if(a==="xhtml"||a==="markup"){f.language="xml";f.languageName="XHTML";f.lexer="markup";}else {f.language=a;f.languageName=ut(a);f.lexer=Xe(a);}if(M.hooks.language.length>0){for(const h of M.hooks.language){const p=h(f);if(typeof p==="object")ye(f,p);}}return f}qe.reference=ke;qe.listen=function(a){M.hooks.language.push(a);};function qe(a){let f=[];let h=0;const p=/(((var)|(let)|(const)|(function)|(import))\s+(\w|\$)+[a-zA-Z0-9]*)/.test(a)&&/@import/.test(a)===false;const r=/((((final)|(public)|(private))\s+static)|(static\s+void))/.test(a);function m(){if(/\n\s*#+\s+/.test(a)||/^#+\s+/.test(a))return ke("markdown");if(/\$[a-zA-Z]/.test(a)||/\{\s*(\w|\.|\$|#)+\s*\{/.test(a)||/^[.#]?[\w][\w-]+\s+\{(?:\s+[a-z][a-z-]+:\s*\S+;)+\s+[&>+]?\s+[.#:]?[\w][\w-]\s+\{/.test(a)&&/:\s*@[a-zA-Z];/.test(a)===false)return ke("scss");if(/@[a-zA-Z]:/.test(a)||/\.[a-zA-Z]\(\);/.test(a))return ke("less");return ke("css")}function e(){let v=1;let u=y;let g=false;let l=false;const t=/((public)|(private))\s+(static\s+)?(((v|V)oid)|(class)|(final))/.test(a);function O(){if(a.indexOf("(")>-1||a.indexOf("=")>-1||a.indexOf(";")>-1&&a.indexOf("{")>-1){if(r===true||/\w<\w+(,\s+\w+)*>/.test(a))return ke("typescript");if(/(?:var|let|const)\s+\w+\s*:/.test(a)||/=\s*<\w+/.test(a))return ke("typescript");return ke("javascript")}return ke("unknown")}function T(){if(/:\s*(?:number|string|boolean|any|unknown)(?:\[\])?/.test(a)||/(?:public|private)\s+/.test(a)||/(?:export|declare)\s+type\s+\w+\s*=/.test(a)||/(?:namespace|interface|enum|implements|declare)\s+\w+/.test(a)||/(?:typeof|keyof|as)\s+\w+/.test(a)||/\w+\s+as\s+\w+/.test(a)||/\[\w+(?:(?::\s*\w+)|(?:\s+in\s+\w+))\]:/.test(a)||/\):\s*\w+(?:\[\])?\s*(?:=>|\{)\s+/.test(a)||/(var|const|let)\s+\w+:\s*(string|number|boolean|string|any)(\[\])?/.test(a))return ke("typescript");if(/\s(class|var|const|let)\s+\w/.test(a)===false&&/<[a-zA-Z](?:-[a-zA-Z])?/.test(a)&&/<\/[a-zA-Z-](?:-[a-zA-Z])?/.test(a)&&(/\s?\{%/.test(a)||/{{/.test(a)))return ke("liquid");if(/^(\s*[$@])/.test(a)===false&&/([}\]];?\s*)$/.test(a)){if(/^\s*import\s+\*\s+as\s+\w+\s+from\s+['"]/.test(a)||/module\.export\s+=\s+/.test(a)||/export\s+default\s+\{/.test(a)||/[?:]\s*[{[]/.test(a)||/^(?:\s*return;?(?:\s+[{[])?)/.test(a)){return ke("javascript")}}if(/{%/.test(a)&&/{{/.test(a)&&/<\w/.test(a))return ke("liquid");if(/{\s*(?:\w|\.|@|#)+\s*\{/.test(a))return ke("less");if(/\$(\w|-)/.test(a))return ke("scss");if(/[;{:]\s*@\w/.test(a)===true)return ke("less");return ke("css")}if(v-1&&(/^(\s*[\u007b\u0024\u002e#@a-z0-9])/i.test(a)||/^(\s*\/(\*|\/))/.test(a)||/^(\s*\*\s*\{)/.test(a))&&/^(\s*if\s*\()/.test(a)===false&&/=\s*(\{|\[|\()/.test(u)===false&&(/(\+|-|=|\?)=/.test(u)===false||/\/\/\s*=+/.test(u)||/=+('|")?\)/.test(a)&&/;\s*base64/.test(a))&&/function(\s+\w+)*\s*\(/.test(u)===false)return T();return a.indexOf("{%")>-1?ke("liquid"):ke("unknown")}function _(){function v(){return /{%-?\s*(schema|for|if|unless|render|include)/.test(a)||/{%-?\s*end\w+/.test(a)||/{{-?\s*content_for/.test(a)||/{{-?\s*[a-zA-Z0-9_'".[\]]+\s*-?}}/.test(a)||/{%/.test(a)&&/%}/.test(a)&&/{{/.test(a)&&/}}/.test(a)?ke("liquid"):ke("html")}return /^(\s*)/i.test(a)||/^(\s*/i.test(a)&&/<\/ul>/i.test(a)||//.test(a)&&/<\/head>/.test(a)||/^(\s*)/i.test(a))return _();if(/^\s*@(?:charset|import|include|keyframes|media|namespace|page)\b/.test(a))return m();if(r===false&&/=(>|=|-|\+|\*)/.test(a)===false&&/^(?:\s*((if)|(for)|(function))\s*\()/.test(a)===false&&/(?:\s|;|\})((if)|(for)|(function\s*\w*))\s*\(/.test(a)===false&&p===false&&/return\s*\w*\s*(;|\})/.test(a)===false&&(a===void 0||/^(?:\s*#(?!(!\/)))/.test(a)||/\n\s*(\.|@)\w+(\(|(\s*:))/.test(a)&&/>\s*<\w/.test(a)===false||(/^\s*:root\s*\{/.test(a)||/-{2}\w+\s*\{/.test(a)||/^\s*(?:body|button|hr|section|h[1-6]|p|strong|\*)\s+\{\s+/.test(a))))return m();f=a.replace(/\[[a-zA-Z][\w-]*=['"]?[a-zA-Z][\w-]*['"]?\]/g,y).split(y);h=f.length;if(/^(\s*({{|{%|<))/.test(a))return _();if(r===true||/^(?:[\s\w-]*<)/.test(a)===false&&/(?:>[\s\w-]*)$/.test(a)===false)return e();return (/^(?:\s*<\?xml)/.test(a)||/(?:>[\w\s:]*)?<(?:\/|!|#)?[\w\s:\-[]+/.test(a)||/^\s*\s*$/.test(a))&&(/^(?:[\s\w]*<)/.test(a)||/(?:>[\s\w]*)$/.test(a))||/^(?:\s*\s*)$/i.test(a)?/^(?:[\s\w]*<)/.test(a)===false||/(?:>[\s\w]*)$/.test(a)===false?e():_():ke("unknown")}M.lexers.markup=function a(f){const{options:h}=M;const{data:p}=s;const r=h.language==="jsx"||h.language==="tsx";const m=h.language==="html"||h.language==="liquid";const e=h.markup;const _=e.attributeSortList.length;const v={end:0,index:-1,start:0,line:1};const u=f.split(y);const g=u.length;let l=0;let t=false;let O="javascript";let T=m?h.language:"html";let i=0;function j(n){if(m===true&&r===false){if(/(?:{[=#/]|%[>\]])|\}%[>\]]/.test(n))return n;if(e.delimiterSpacing===true){n=n.replace(/{[{%]-?\s*/g,k=>k.replace(/\s*$/," "));n=n.replace(/\s*-?[%}]}/g,k=>k.replace(/^\s*/," "));}return n}return n}function C(n,k,x){if(n===p){if(k.types.indexOf("end")>-1){v.end=v.end+1;}else if(k.types.indexOf("start")>-1){v.start=v.start+1;}}v.index=s.count;v.line=s.lineNumber;s.push(n,k,x);}function b(n){let k=0;let x=y;const S=/^(?:<|{%-?|{{-?)=?\s*/;if(typeof n!=="string")return y;k=n.replace(S,"%").replace(/\s+/," ").indexOf(" ");x=n.replace(S," ");x=k<0?x.slice(1,n.length-1):x.slice(1,k);if(T==="html")x=x.toLowerCase();x=x.replace(/-?[%}]}$/,y);if(x.indexOf("(")>0)x=x.slice(0,x.indexOf("("));if(x==="?xml?")return "xml";return x}function E(n,k){const x=b(n);const S=Je({begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:p.lines[s.count]>0?1:0,stack:s.structure[s.structure.length-1][0],token:``,types:"end"});C(p,S,y);if(le.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x)){do{S.begin=s.structure[s.structure.length-1][1];S.stack=s.structure[s.structure.length-1][0];S.token=``;C(p,S,y);}while(le.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x))}}function Y(n){const k={begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:y,types:y};let x=0;let S=y;let R=y;let B=y;let P=y;let N=y;let U=false;let H=false;let G=false;let oe=false;let ce=false;let X=false;let fe=false;let I=[];let ie=[y,0];function ee(Z){const D=Z.indexOf("=");if(D>0&&(D0||D0)){return [Z.slice(0,D),Z.slice(D+1)]}return [Z,y]}function Ne(){const Z=s.count;const D=P.replace(/(\/)$/,y);const $=e.quoteConvert;let c=0;let o=0;let A=0;let w=y;let z=y;let q=[];let W=I.length;function se(){let F=Le(k.token,5);if(G===true||$==="none"||k.types.indexOf("attribute")<0||F===false&&$==="single"&&k.token.indexOf('"')<0||F===false&&$==="double"&&k.token.indexOf("'")<0){C(p,k,y);}else {let K=0;let V=false;const ne=k.token.split(y);const he=k.token.indexOf("=");const re=ne.length-1;if(J(ne[he+1],34)&&J(ne[ne.length-1],34)&&$==="single"&&F===false){C(p,k,y);}else if(J(ne[he+1],39)&&J(ne[ne.length-1],39)&&$==="double"&&F===false){C(p,k,y);}else {K=he+2;if(F===false){if($==="double"){if(k.token.slice(he+2,re).indexOf('"')>-1)V=true;ne[he+1]='"';ne[ne.length-1]='"';}else if($==="single"){if(k.token.slice(he+2,re).indexOf("'")>-1)V=true;ne[he+1]="'";ne[ne.length-1]="'";}}if(V===true||F===true){F=false;do{if(d(ne[K-1],123)&&(d(ne[K],37)||d(ne[K],123))){F=true;}else if(d(ne[K],125)&&(d(ne[K-1],37)||d(ne[K-1],125))){F=false;}if(F===true){if(d(ne[K],34)&&$==="double"){ne[K]="'";}else if(d(ne[K],39)&&$==="single"){ne[K]='"';}}else {if(d(ne[K],39)&&$==="double"){ne[K]='"';}else if(d(ne[K],34)&&$==="single"){ne[K]="'";}}K=K+1;}while(K$/,"/>");}o=I.length;A=1;if(A0){const F=[];A=0;o=0;W=I.length;do{o=0;do{w=I[o][0].split("=")[0];if(e.attributeSortList[A]===w){F.push(I[o]);I.splice(o,1);W=W-1;break}o=o+1;}while(o0){k.token=q.join(" ");se();}}t=false;if(n==="---"){N="---";B="comment";}else if(d(u[l],60)){if(d(u[l+1],47)){n=">";B="end";}else if(d(u[l+1],33)){if((u[l+2].charCodeAt(0)===100||u[l+2].charCodeAt(0)===68)&&(u[l+3].charCodeAt(0)===111||u[l+3].charCodeAt(0)===79)&&(u[l+4].charCodeAt(0)===99||u[l+4].charCodeAt(0)===67)&&(u[l+5].charCodeAt(0)===116||u[l+5].charCodeAt(0)===84)&&(u[l+6].charCodeAt(0)===121||u[l+6].charCodeAt(0)===89)&&(u[l+7].charCodeAt(0)===112||u[l+7].charCodeAt(0)===80)&&(u[l+8].charCodeAt(0)===101||u[l+8].charCodeAt(0)===69)){n=">";B="doctype";X=true;}else if(d(u[l+2],45)&&d(u[l+3],45)){n="-->";B="comment";N="";}else if(d(u[l],123)&&J(Z[0],123)&&J(n,10)&&(d(u[l+1],123)||d(u[l+1],37))){if(d(u[l+1],123)){w="}}";}else {w=u[l+1]+"}";if(V.length<1&&(I.length<1||ue(u[l-1]))){Z.pop();do{if(d(u[l],10))L=L+1;V.push(u[l]);l=l+1;}while(ln.length+1||d(Z[0],93))&&(r===false||q===0)){if(d(n,10)){if(ue(Z[Z.length-1])){do{Z.pop();l=l-1;}while(ue(Z[Z.length-1]))}break}$=Z.length;D=n.length-1;if(D>-1){do{$=$-1;if(Z[$]!==n.charAt(D))break;D=D-1;}while(D>-1)}if(D<0){if(d(Z[$],62)&&d(u[l],62)&&I.length>0){if(I[I.length-1][1]===0&&d(u[l-1],125)&&ue(u[l+1])){I[I.length-1][1]=d(u[l+1],32)?1:2;}}break}}}else if(u[l].charCodeAt(0)===w.charCodeAt(w.length-1)&&(r&&d(n,125)&&(u[l-1]!=="\\"||he()===false)||(r===false||J(n,125)))){$=0;D=w.length-1;if(D>-1){do{if(u[l-$]!==w.charAt(D))break;$=$+1;D=D-1;}while(D>-1)}if(D<0)w=y;}}l=l+1;}while(l{c=w===y?0:w.split("\n").length;return y};const L=w=>{o=w===y?0:w.split("\n").length;return y};k.begin=s.structure[s.structure.length-1][1];k.ender=s.count+3;k.stack=s.structure[s.structure.length-1][0];k.types="template_start";k.token=Z;C(p,k,"comment");S=D.replace(/^\s*/,A);S=S.replace(/\s*$/,L);k.begin=s.count;k.lines=c;k.stack="comment";k.token=S;k.types="comment";C(p,k,y);k.types="template_end";k.stack="comment";k.lines=o;k.token=$;C(p,k,y);return}k.types=B;U=(()=>{const Z=/(\/>)$/;const D=(c,o)=>{if(!le.html.tags.has(c))return false;if(c===o)return true;if(c==="dd"&&o==="dt")return true;if(c==="dt"&&o==="dd")return true;if(c==="td"&&o==="th")return true;if(c==="th"&&o==="td")return true;if(c==="colgroup"&&(o==="tbody"||o==="tfoot"||o==="thead"||o==="tr"))return true;if(c==="tbody"&&(o==="colgroup"||o==="tfoot"||o==="thead"))return true;if(c==="tfoot"&&(o==="colgroup"||o==="tbody"||o==="thead"))return true;if(c==="thead"&&(o==="colgroup"||o==="tbody"||o==="tfoot"))return true;if(c==="tr"&&o==="colgroup")return true;return false};const $=c=>{k.lines=p.lines[s.count]>0?1:0;k.token=``;k.types="end";C(p,k,y);if(c>0){do{k.begin=s.structure[s.structure.length-1][1];k.stack=s.structure[s.structure.length-1][0];k.token=``;C(p,k,y);c=c-1;}while(c>0)}k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;};if(B==="end"){const c=p.token[s.count];if(p.types[s.count-1]==="singleton"&&c.charCodeAt(c.length-2)!==47&&`/${b(c)}`===P){p.types[s.count-1]="start";}}if(T==="html"){if(d(S[0],60)&&J(S[1],33)&&J(S[1],63)&&(s.count<0||p.types[s.count].indexOf("template")<0))S=S.toLowerCase();if(le.html.tags.has(s.structure[s.structure.length-1][0])&&D(P.slice(1),s.structure[s.structure.length-2][0])){$(0);}else if(s.structure.length>3&&le.html.tags.has(s.structure[s.structure.length-1][0])&&le.html.tags.has(s.structure[s.structure.length-2][0])&&le.html.tags.has(s.structure[s.structure.length-3][0])&&D(P,s.structure[s.structure.length-4][0])){$(3);}else if(s.structure.length>2&&le.html.tags.has(s.structure[s.structure.length-1][0])&&le.html.tags.has(s.structure[s.structure.length-2][0])&&D(P,s.structure[s.structure.length-3][0])){$(2);}else if(s.structure.length>1&&le.html.tags.has(s.structure[s.structure.length-1][0])&&D(P,s.structure[s.structure.length-2][0])){$(1);}else if(D(P,s.structure[s.structure.length-1][0])){$(0);}else if(d(P[0],47)&&le.html.tags.has(s.structure[s.structure.length-1][0])&&s.structure[s.structure.length-1][0]!==P.slice(1)){E(S,false);k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;}if(r===false&&le.html.voids.has(P)){if(e.correct===true&&Z.test(S)===false)S=S.slice(0,S.length-1)+" />";return true}}return false})();if(le.embed("html",P)&&S.slice(S.length-2)!=="/>"||le.embed("liquid",P)&&S.slice(S.length-2)==="%}"){const Z=Le(S,3);let D=I.length-1;let $=y;let c=[];if(D>-1){do{c=ee(I[D][0]);if(c[0]==="type"){$=c[1];if($.charCodeAt(0)===34||$.charCodeAt(0)===39){$=$.slice(1,$.length-1);}break}D=D-1;}while(D>-1)}if(Z===false&&le.embed("html",P)){t=true;if($===y){O=le.html.embed[P].language;}else if(le.html.embed[P].value($)){O=le.html.embed[P].language;}}else if(Z===true&&le.embed("liquid",P)){t=true;if($===y){O=le.liquid.embed[P].language;}else {O=le.liquid.embed[P].language;}}if(t===true){D=l+1;if(D"){B="singleton";}else {B="start";}k.types=B;}if(fe&&X===false&&G&&d(n,62)&&S.slice(S.length-2)!=="/>"){const Z=[];const D=[];if(U===true){B="singleton";}else {I.forEach($=>D.push($[0]));X=true;B="ignore";l=l+1;if(l-1){do{if(J(u[l-o],$.charCodeAt(c)))break;o=o+1;c=c-1;}while(c>-1)}if(c<0)$=y;}l=l+1;}while(l",` ${D.join(" ")}>`);k.token=S;k.types="content-ignore";I=[];}if(k.types.indexOf("template")>-1){if(d(S[0],123)&&d(S[1],37)){if((P==="case"||P==="default")&&(s.structure[s.structure.length-1][0]==="switch"||s.structure[s.structure.length-1][0]==="case")){k.types="template_else";}else if(le.liquid.else.has(P)){k.types="template_else";}else {if(le.liquid.tags.has(P)){k.types="template_start";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100&&le.liquid.tags.has(P.slice(3))){k.types="template_end";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100){k.types="template_end";k.stack=P.slice(3);let Z=0;do{if(p.types[Z]==="template"&&p.stack[Z]===k.stack){p.types[Z]="template_start";v.start=v.start+1;break}else {Z=p.stack.indexOf(k.stack,Z+1);}}while(Z>-1)}else {k.stack=P;}}}else if(k.types==="template"){if(S.indexOf("else")>2)k.types="template_else";}if(k.types==="template_start"||k.types==="template_else"){if(P===y||d(P,37)){P=P+S.slice(1).replace(P,y).replace(/^\s+/,y);P=P.slice(0,P.indexOf("(")).replace(/\s+/,y);}}if(e.quoteConvert==="double"){k.token=k.token.replace(/'/g,'"');}else if(e.quoteConvert==="single"){k.token=k.token.replace(/"/g,"'");}}if(B==="cdata"&&(k.stack==="script"||k.stack==="style")){let Z=s.count;let D=s.count;const $=k.stack;if(p.types[D]==="attribute"){do{Z=Z-1;D=D-1;}while(p.types[D]==="attribute"&&D>-1)}k.begin=Z;k.token="\s*)$/,y);C(p,k,y);s.structure.push(["cdata",s.count]);if($==="script"){M.lexers.script(S);}else {M.lexers.style(S);}k.begin=s.structure[s.structure.length-1][1];k.token="]]>";k.types="cdata_end";C(p,k,y);s.structure.pop();}else {C(p,k,P);}Ne();if(h.wrap>0&&r===true){let Z=0;let D=s.count;let $=0;if(p.types[D].indexOf("attribute")>-1){do{Z=Z+p.token[D].length+1;D=D-1;}while(p.lexer[D]!=="markup"||p.types[D].indexOf("attribute")>-1);if(p.lines[D]===1)Z=Z+p.token[D].length+1;}else if(p.lines[D]===1){Z=p.token[D].length+1;}$=D-1;if(Z>0&&p.types[$]!=="script_end"){if(p.types[$].indexOf("attribute")>-1){do{Z=Z+p.token[$].length+1;$=$-1;}while(p.lexer[$]!=="markup"||p.types[$].indexOf("attribute")>-1);if(p.lines[$]===1)Z=Z+p.token[$].length+1;}else if(p.lines[$]===1){Z=p.token[$].length+1;}}}s.linesSpace=0;}function Q(){const n=l;const k=d(p.token[s.count],123)&&r===true;let x=[];let S=y;let R=s.linesSpace;let B=y;if(t===true){if(k===true){B="script";}else if(s.structure[s.structure.length-1][1]>-1){B=b(p.token[s.structure[s.structure.length-1][1]].toLowerCase());}else if(p.begin[s.count]>1){B=b(p.token[p.begin[s.count]].toLowerCase());}else {B=b(p.token[p.begin[s.count]].toLowerCase());}}const P=p.types[s.count]==="template_start"&&p.token[s.count].indexOf("-1){do{if(u[H]!=="\\")break;G=G+1;H=H-1;}while(H>-1)}return G%2===1}if(l".indexOf(u[l-1])>-1){if(r===false||J(u[l-1],60))G="reg";}}else if((d(u[l],34)||d(u[l],39)||d(u[l],96))&&U()===false){G=u[l];}else if(d(u[l],123)&&k===true){ce=ce+1;}else if(d(u[l],125)&&k===true){if(ce===0){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);M.lexers.script(oe);s.structure[s.structure.length-1][1]+=1;if(p.types[s.count]==="end"&&p.lexer[p.begin[s.count]-1]==="script"){N.lexer="script";N.token=e.correct===true?";":"x;";N.types="separator";C(p,N,y);N.lexer="markup";}N.token="}";N.types="script_end";C(p,N,y);s.structure.pop();break}ce=ce-1;}if(Le(p.token[s.count],3)===false){H=u.slice(l,l+10).join(y).toLowerCase();if(B==="script"){H=l===g-9?H.slice(0,H.length-1):H.slice(0,H.length-2);if(H==="<\/script"){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l-1;if(x.length<1)break;if(/^";C(p,N,y);}else {h.language=O;M.lexers.script(oe);if(O==="json"&&h.json.objectSort===true||O!=="json"&&h.script.objectSort===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}if(B==="style"){if(l===g-8){H=H.slice(0,H.length-1);}else if(l===g-9){H=H.slice(0,H.length-2);}else {H=H.slice(0,H.length-3);}if(H==="$/.test(X)){N.token="";C(p,N,y);}else {h.language=O;M.lexers.style(X);if(h.style.sortProperties===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}}else {if(le.embed("liquid",B)){const X=u.slice(l).join(y);const fe=X.search(new RegExp(`{%-?\\s*end${B}`));x=x.length>0?x.concat(x,u.slice(l,l+fe)):u.slice(l,l+fe);l=l+fe;H=u.slice(l).join(y).toLowerCase();if(le.liquid.embed[B].end(H)){H=H.slice(0,H.indexOf("%}")+2);oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l+H.length-1;if(x.length<1)break;const Oe=De[le.liquid.embed[B].language];h.language=O;M.lexers[Oe](oe);if(O==="json"&&h.json.objectSort===true||O==="javascript"&&h.script.objectSort===true||(O==="css"||O==="scss")&&h.style.sortProperties===true){s.sortCorrection(0,s.count+1);}h.language="liquid";N.token=H;N.types="template_end";C(p,N,y);}break}}}else if(G===u[l]&&(d(G,34)||d(G,39)||d(G,96)||d(G,42)&&d(u[l+1],47))&&U()===false){G=y;}else if(d(G,96)&&u[l]==="$"&&d(u[l+1],123)&&U()===false){G="}";}else if(d(G,125)&&d(u[l],125)&&U()===false){G="`";}else if(d(G,47)&&(d(u[l],10)||u[l]==="\r")){G=y;}else if(G==="reg"&&d(u[l],47)&&U()===false){G=y;}else if(d(G,47)&&d(u[l],60)&&d(u[l-1],45)&&d(u[l-2],45)){H=u.slice(l+1,l+11).join(y).toLowerCase();H=H.slice(0,H.length-2);if(B==="script"&&H==="<\/script")G=y;H=H.slice(0,H.length-1);if(B==="style"&&H==="0&&(d(u[l],60)&&J(u[l+1],61)&&!/\s|\d/.test(u[l+1])||d(u[l],91)&&d(u[l+1],37)||d(u[l],123)&&(r===true||d(u[l+1],123)||d(u[l+1],37)))){l=l-1;if(s.structure[s.structure.length-1][0]==="comment"){S=x.join(y);}else {S=x.join(y).replace(/\s+$/,y);}S=j(S);R=0;N.token=S;if(h.wrap>0&&e.preserveText===false){const{wrap:X}=h;const fe=y;const Oe=y;const I=[];let ie=X;let ee=S.length;const Ne=()=>{if(S.charCodeAt(ie)===32){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;return}do{ie=ie-1;}while(ie>0&&S.charCodeAt(ie)!==32);if(ie>0){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;}else {ie=X;do{ie=ie+1;}while(ie"&&p.token[p.begin[p.begin[s.count]]]==="
  • "&&p.lines[p.begin[s.count]]===0&&s.linesSpace===0&&S.length-1)ie=ie-1;if(p.lines[xe]>0&&p.types[xe].indexOf("attribute")<0)break;xe=xe-1;}while(xe>0&&ie>0);if(ie<1)ie=S.indexOf(" ");}S=x.join(y);S=S.replace(/^\s+/,y).replace(/\s+$/,y).replace(/\s+/g," ");do{Ne();}while(ien&&ln&&ue(u[H]))}else {s.linesSpace=0;}}else if(l!==n||l===n&&t===false){S=x.join(y).replace(/\s+$/,y);R=0;if(N.token!==S){N.token=S;C(p,N,y);s.linesSpace=0;}}t=false;}if(_>0){do{e.attributeSortList[l]=e.attributeSortList[l].replace(/^\s+/,y).replace(/\s+$/,y);l=l+1;}while(l<_);l=0;}if(h.language==="html"||h.language==="liquid")T="html";do{if(ue(u[l])){if(p.types[s.count]==="template_start"&&s.structure[s.structure.length-1][0]==="comment"){Q();}else {l=s.spacer({array:u,end:g,index:l});}}else if(t){Q();}else if(d(u[l],60)){Y(y);}else if(d(u[l],91)&&d(u[l+1],37)){Y("%]");}else if(d(u[l],123)&&(r||d(u[l+1],123)||d(u[l+1],37))){Y(y);}else if(d(u[l],45)&&d(u[l+1],45)&&d(u[l+2],45)){Y("---");}else {Q();}l=l+1;}while(lv.start){const n=v.end-v.start;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more end type${k} than start types`].join("\n");}else {const n=v.start-v.end;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more start type${k} than end types`].join("\n");}}return p};M.beautify.markup=a=>{const f={};const h="markup";const{data:p}=s;const r=a.language==="jsx"||a.language==="tsx";const m=a.crlf===true?String.fromCharCode(13,10):String.fromCharCode(10);const e=a.markup;const _=M.end<1||M.end>p.token.length?p.token.length:M.end+1;const v={is:(j,C)=>p.types[j]===C,not:(j,C)=>p.types[j]!==C,idx:(j,C)=>j>-1&&(p.types[j]||y).indexOf(C)};const u={is:(j,C)=>p.token[j]===C,not:(j,C)=>p.token[j]!==C};let g=M.start;let l=-1;let t=0;let O=0;let T=isNaN(a.indentLevel)?0:Number(a.indentLevel);const i=(()=>{const j=M.start>0?Array(M.start).fill(0,0,M.start):[];function C(){let k=g+1;let x=0;if(v.is(k,void 0))return k-1;if(v.is(k,"comment")||g<_-1&&v.idx(k,"attribute")>-1){do{if(v.is(k,"jsx_attribute_start")){x=k;do{if(v.is(k,"jsx_attribute_end")&&p.begin[k]===x)break;k=k+1;}while(k<_)}else if(v.not(k,"comment")&&v.idx(k,"attribute")<0)return k;k=k+1;}while(k<_)}return k}function b(){const k=p.begin[g];let x=g;do{x=x-1;if(u.is(x,"
  • ")&&u.is(x-1,"")&&p.begin[p.begin[x]]===k&&p.begin[x-1]===p.begin[x]+1){x=p.begin[x];}else {return}}while(x>k+1);x=g;do{x=x-1;if(v.is(x+1,"attribute")){j[x]=-10;}else if(u.not(x,"")){j[x]=-20;}}while(x>k+1)}function E(){let k=g;let x=false;if(p.lines[g+1]===0&&e.forceIndent===false){do{if(p.lines[k]>0){x=true;break}k=k-1;}while(k>l);k=g;}else {x=true;}if(x===true){const S=v.is(t,"comment")||v.is(t,"end")||v.is(t,"template_end")?T+1:T;do{j.push(S);k=k-1;}while(k>l);if(S===T+1)j[g]=T;if(v.is(k,"attribute")||v.is(k,"template_attribute")||v.is(k,"jsx_attribute_start")){j[p.begin[k]]=S;}else {j[k]=S;}}else {do{j.push(-20);k=k-1;}while(k>l);j[k]=-20;}l=-1;}function Y(){let k=T;if(e.forceIndent===true||e.forceAttribute===true){j.push(T);return}if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&p.lines[t]>0){j.push(T);k=k+1;if(v.is(g,"singleton")&&g>0&&v.idx(g-1,"attribute")>-1&&v.is(p.begin[g-1],"singleton")){if(p.begin[g]<0||v.is(p.begin[g-1],"singleton")&&p.begin[p.ender[g]-1]!==g){j[g-1]=T;}else {j[g-1]=T+1;}}}else if(g>0&&v.is(g,"singleton")&&v.idx(g-1,"attribute")>-1){j[g-1]=T;O=p.token[g].length;j.push(-10);}else if(p.lines[t]===0){j.push(-20);}else if((a.wrap===0||g<_-2&&p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g+2]!==void 0&&p.token[g].length+p.token[g+1].length+p.token[g+2].length+1>a.wrap&&v.idx(g+2,"attribute")>-1||p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g].length+p.token[g+1].length>a.wrap)&&(v.is(g+1,"singleton")||v.is(g+1,"template"))){j.push(T);}else {O=O+1;j.push(-10);}if(g>0&&v.idx(g-1,"attribute")>-1&&p.lines[g]<1){j[g-1]=-20;}if(O>a.wrap){let x=g;let S=Math.max(p.begin[g],0);if(v.is(g,"content")&&e.preserveText===false){let R=0;const B=p.token[g].replace(/\s+/g,de).split(de);do{x=x-1;if(j[x]<0){R=R+p.token[x].length;if(j[x]===-10)R=R+1;}else {break}}while(x>0);x=0;S=B.length;do{if(B[x].length+R>a.wrap){B[x]=m+B[x];R=B[x].length;}else {B[x]=` ${B[x]}`;R=R+B[x].length;}x=x+1;}while(x0){O=p.token[g].length-p.token[g].lastIndexOf(m);}}else {do{x=x-1;if(j[x]>-1){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;return}if(v.idx(x,"start")>-1){O=0;return}if(p.lines[x+1]>0&&(v.not(x,"attribute")||v.is(x,"attribute")&&v.is(x+1,"attribute"))){if(v.not(x,"singleton")||v.is(x,"attribute")&&v.is(x+1,"attribute")){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;break}}}while(x>S);j[x]=k;}}}function Q(){const k=g;if(p.types[k-1]==="script_start"&&d(p.token[k-1],123)){j[k-1]=-20;}do{if(p.lexer[g+1]===h&&p.begin[g+1]a.wrap){X=G[ce].length;G[ce]=m+G[ce];}else {G[ce]=` ${G[ce]}`;X=X+G[ce].length;}ce=ce+1;}while(ce{if(v.idx(g,"start")>0){let H=g;do{if(p.types[H].indexOf("end")>0&&p.begin[H]===g){if(H<_-1&&v.idx(H+1,"attribute")>-1){R=true;break}}H=H+1;}while(H<_)}else if(g<_-1&&v.idx(g+1,"attribute")>-1){R=true;}if(v.is(t,"end")||v.is(t,"template_end")){return T+(v.is(S,"singleton")?2:1)}if(v.is(S,"singleton"))return T+1;return T})();if(R===false&&v.is(g,"comment_attribute")){j.push(T);j[S]=p.types[S]==="singleton"?T+1:T;return}if(U<1)U=1;do{O=O+p.token[g].length+1;if(p.types[g].indexOf("attribute")>0){if(p.types[g]==="template_attribute_start"){if(e.preserveAttributes===true){j.push(-10);}else {let H=1;do{if(p.lines[g]===0){j.push(-20);}else if(p.lines[g]===1){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else {j.push(U);}if(H===0)break;g=g+1;if(v.is(g,"template_attribute_start")){H=H+1;}else if(v.is(g,"template_attribute_end")){H=H-1;}P=P+1;if(p.token[g]!==void 0){O=O+p.token[g].length+1;N=N+p.token[g].length+1;}}while(g<_)}}else if(p.types[g]==="template_attribute"){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else if(p.types[g]==="comment_attribute"){j.push(U);}else if(p.types[g].indexOf("start")>0){B=true;if(g<_-2&&p.types[g+2].indexOf("attribute")>0){j.push(-20);g=g+1;f[g]=g;}else {if(S===g-1&&R===false){if(r){j.push(-20);}else {j.push(U);}}else {if(r){j.push(-20);}else {j.push(U+1);}}if(p.lexer[g+1]!==h){g=g+1;Q();}}}else if(p.types[g].indexOf("end")>0&&p.types[g].indexOf("template")<0){if(j[g-1]!==-20)j[g-1]=j[p.begin[g]]-1;if(p.lexer[g+1]!==h){j.push(-20);}else {j.push(U);}}else {j.push(U);}}else if(v.is(g,"attribute")){N=N+p.token[g].length+1;if(e.preserveAttributes===true){j.push(-10);}else if(e.forceAttribute===true||e.forceAttribute>=1||B===true||g<_-1&&(v.idx(g+1,"template_attribute_")>-1&&p.lines[g+1]!==-20||v.idx(g+1,"attribute")>0)){if(e.forceAttribute===false&&p.lines[g]===1){if(v.is(g+1,"template_attribute_start")&&p.lines[g+1]>1){j.push(U);}else {j.push(-10);}}else {if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}}else {j.push(-10);}}else if(p.begin[g]0&&v.idx(g,"attribute")>0&&v.not(S,"singleton")&&j[g-1]>0&&R===true){j[g-1]=j[g-1]-1;}if(j[g]!==-20){if(r===true&&v.idx(S,"start")>-1&&v.is(g+1,"script_start")){j[g]=U;}else {if(u.is(g,"/")&&j[g-1]!==10){j[g-1]=-10;}else {j[g]=j[S];}}}if(e.forceAttribute===true){O=0;j[S]=U;}else if(e.forceAttribute>=1){if(P>=e.forceAttribute){j[S]=U;let H=g-1;do{if(v.is(H,"template")&&j[H]===-10){j[H]=U;}else if(v.is(H,"attribute")&&j[H]===-10){j[H]=U;}H=H-1;}while(H>S)}else {j[S]=-10;}}else {j[S]=-10;}if(e.preserveAttributes===true||u.is(S,"<%xml%>")||u.is(S,"")){O=0;return}x=g;if(x>S+1){if(e.selfCloseSpace===false)N=N-1;if(N>a.wrap&&a.wrap>0&&e.forceAttribute===false){if(e.forceLeadAttribute===true){j[S]=U;x=x-1;}O=p.token[g].length;do{if(p.token[x].length>a.wrap&&ue(p.token[x]))k(x);if(v.idx(x,"template")>-1&&j[x]===-10){j[x]=U;}else if(v.is(x,"attribute")&&j[x]===-10){j[x]=U;}x=x-1;}while(x>S)}}else if(a.wrap>0&&v.is(g,"attribute")&&p.token[g].length>a.wrap&&ue(p.token[g])){k(g);}}do{if(p.lexer[g]===h){if(p.token[g].toLowerCase().indexOf("-1){n();}else if(v.is(g,"comment")){if(l<0)l=g;if(v.not(g+1,"comment")||g>0&&v.idx(g-1,"end")>-1)E();}else if(v.not(g,"comment")){t=C();if(v.is(t,"end")){T=T-1;if(u.is(g,"")||u.is(g,"")||u.is(g,""))b();}if(v.is(t,"template_end")){T=T-1;if(v.is(t,"template_end")&&v.is(p.begin[t]+1,"template_else"))T=T-1;}if(v.is(g,"script_end")&&v.is(t,"end")){if(p.lines[t]<1){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if((e.forceIndent===false||e.forceIndent===true&&v.is(t,"script_start"))&&(v.is(g,"content")||v.is(g,"singleton")||v.is(g,"template"))){O=O+p.token[g].length;if(v.is(g,"template")){j.push(T);const k=p.token[g].indexOf(m);if(k>0){const x=[];const S=j[g-1]*a.indentSize+p.token[g].charCodeAt(2)===45?a.indentSize:a.indentSize-1;let R=0;do{x.push(de);R=R+1;}while(R`${B}${x.join(y)}`);}}else if(p.lines[t]>0&&v.is(t,"script_start")){j.push(-10);}else if(a.wrap>0&&(v.idx(g,"template")<0||t<_&&v.idx(g,"template")>-1&&v.idx(g,"template")<0)){Y();}else if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&(p.lines[t]>0||v.idx(g,"template_")>-1)){j.push(T);}else if(p.lines[t]===0){j.push(-20);}else {j.push(T);}}else if(v.is(g,"start")||v.is(g,"template_start")){T=T+1;if(v.is(g,"template_start")&&v.is(t,"template_else")){T=T+1;}if(r===true&&u.is(g+1,"{")){if(p.lines[t]===0){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if(v.is(g,"start")&&v.is(t,"end")){j.push(-20);}else if(v.is(g,"start")&&v.is(t,"script_start")){j.push(-10);}else if(e.forceIndent===true){j.push(T);}else if(v.is(g,"template_start")&&v.is(t,"template_end")){j.push(-20);}else if(p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton")||v.is(g,"start")&&v.is(t,"template"))){j.push(-20);}else {j.push(T);}}else if(e.forceIndent===false&&p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton"))){j.push(-20);}else if(v.is(g+2,"script_end")){j.push(-20);}else if(v.is(g,"template_else")){if(v.is(t,"template_end")){j[g-1]=T+1;}else {j[g-1]=T-1;}j.push(T);}else {j.push(T);}}if(v.not(g,"content")&&v.not(g,"singleton")&&v.not(g,"template")&&v.not(g,"attribute")){O=0;}}else {O=0;Q();}g=g+1;}while(g<_);return j})();return (()=>{const j=[];const C=(()=>{const k=[a.indentChar];const x=a.indentSize-1;let S=0;if(S0){B=0;do{x.push(C);B=B+1;}while(BP.trimStart());const S=i[g-1]>-1?v.is(g,"attribute")?i[g-1]+1:i[g-1]:(()=>{let P=g-1;let N=P>-1&&v.idx(P,"start")>-1;if(i[g]>-1&&v.is(g,"attribute")){return i[g]+1}do{P=P-1;if(i[P]>-1){return v.is(g,"content")&&N===false?i[P]:i[P]+1}if(v.idx(P,"start")>-1)N=true;}while(P>0);return P===-2?0:1})();let R=0;p.lines[g+1]=0;const B=k.length-1;do{if(v.is(g,"comment")){if(k[R]!==y){if(k[R+1].trimStart()!==y){j.push(k[R],b(S));}else {j.push(k[R],pe);}}else {if(k[R+1].trimStart()===y){j.push(pe);}else {j.push(b(S));}}}else {j.push(k[R]);j.push(b(S));}R=R+1;}while(R1){j.push(b(i[g]));}}function Y(){const k=/\/?>$/;const x=p.token[g];const S=k.exec(x);if(S===null)return;let R=g+1;let B=false;let P=e.selfCloseSpace===true&&S!==null&&S[0]==="/>"?de:y;p.token[g]=x.replace(k,y);do{if(v.is(R,"jsx_attribute_end")&&p.begin[p.begin[R]]===g){B=false;}else if(p.begin[R]===g){if(v.is(R,"jsx_attribute_start")){B=true;}else if(v.idx(R,"attribute")<0&&B===false){break}}else if(B===false&&(p.begin[R]-1){Y();}if(u.not(g,void 0)&&p.token[g].indexOf(m)>0&&(v.is(g,"content")&&e.preserveText===false||v.is(g,"comment")||v.is(g,"attribute"))){E();}else {j.push(p.token[g]);if(i[g]===-10&&g<_-1){j.push(de);}else if(i[g]>-1){Q=i[g];j.push(b(i[g]));}}}else {M.start=g;M.end=f[g];a.indentLevel=Q;const k=a.language;const x=d(p.token[g],123)?"liquid":"html";const S=le[x].embed[p.stack[g]].language==="json";if(S)a.language="json";n=M.beautify[p.lexer[g]](a).replace(we,y);j.push(n);if(n.endsWith(pe)){if(Q-1>0)j.push($e(Q-1,C));}else {if(e.forceIndent===true||i[M.iterator]>-1&&f[g]>g){j.push(b(i[M.iterator]));}}g=M.iterator;a.indentLevel=0;if(S)a.language=k;}g=g+1;}while(g<_);M.iterator=_-1;if(j[0]===m||d(j[0],32))j[0]=y;return j.join(y)})()};M.beautify.style=a=>{const f=[];const h=M.data;const p=a.crlf===true?"\r\n":"\n";const r=M.end>0?M.end+1:h.token.length;const m=a.preserveLine+1;const e=(()=>{let O=0;const T=[];do{T.push(a.indentChar);O=O+1;}while(O0?a.wrap:0;let u=M.start;let g=[y,y];function l(O){const T=[];const i=(()=>{if(u===r-1)return 1;if(h.lines[u+1]-1>m)return m;if(h.lines[u+1]>1)return h.lines[u+1]-1;return 1})();let j=0;if(O<0)O=0;do{T.push(p);j=j+1;v=_;}while(j0){j=0;do{T.push(e);j=j+1;}while(jO+1);if(E[1]>Y)Y=E[1];j.push(E);}}else if(h.types[C]==="end"){if(CO);C=j.length;if(C<2)return;do{C=C-1;if(j[C][1]0)}if(a.script.vertical===true&&a.style.compressCSS===false){u=r;do{u=u-1;if(d(h.token[u],125)||d(h.token[u],41))t();}while(u>0);u=M.start;}do{if(h.types[u]==="property")v=_+h.token[u].length;if(h.types[u+1]==="end"||h.types[u+1]==="template_end"||h.types[u+1]==="template_else"){_=_-1;}if(h.types[u]==="template"&&h.lines[u]===0){f.push(h.token[u]);if(h.types[u+1]==="template"&&h.lines[u+1]>0)l(_);}else if(h.types[u]==="template"&&h.lines[u]>0){if(h.types[u-2]!=="property"&&h.types[u-1]!=="colon"){v=_;f.push(h.token[u]);l(_);}else if(h.types[u-2]==="property"&&h.types[u-1]==="colon"&&h.types[u+1]==="separator"&&d(h.token[u+1],44)){v=v+h.token[u].length;if(v>a.wrap)l(_);f.push(h.token[u]);do{u=u+1;f.push(h.token[u]);if(h.lines[u+1]>0)l(_);}while(h.types[u]!=="separator"&&J(h.token[u],59));if(d(h.token[u],59)&&h.types[u]==="separator"){f.push(h.token[u]);if(h.lines[u+1]>0)l(_);u=u+1;continue}}else {v=v+h.token[u].length;if(a.wrap>0&&v>a.wrap){l(_);f.push(h.token[u]);}else {f.push(h.token[u]);}}}else if(h.types[u]==="template_else"){f.push(h.token[u]);_=_+1;l(_);}else if(h.types[u]==="start"||h.types[u]==="template_start"){_=_+1;f.push(h.token[u]);if(h.types[u+1]!=="end"&&h.types[u+1]!=="template_end"&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")){l(_);}}else if(d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")||(h.types[u]==="end"||h.types[u]==="template_end"||h.types[u]==="comment")){f.push(h.token[u]);if(h.types[u+1]==="value"){if(h.lines[u+1]===1){f.push(" ");}else if(h.lines[u+1]>1){l(_);}}else if(h.types[u+1]!=="separator"){if(h.types[u+1]!=="comment"||h.types[u+1]==="comment"&&h.lines[u+1]>1){l(_);}else {f.push(" ");}}}else if(d(h.token[u],58)){f.push(h.token[u]);if(a.style.compressCSS===false)f.push(" ");}else if(h.types[u]==="selector"){if(a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);}if(h.token[u].indexOf("and(")>0){h.token[u]=h.token[u].replace(/and\(/,"and (");f.push(h.token[u]);}else if(h.token[u].indexOf("when(")>0){g=h.token[u].split("when(");f.push(g[0].replace(/\s+$/,y));l(_+1);f.push(`when (${g[1]}`);}else {f.push(h.token[u]);}if(h.types[u+1]==="start"){if(a.script.braceAllman===true){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}}else if(d(h.token[u],44)){f.push(h.token[u]);if(h.types[u+1]==="selector"||h.types[u+1]==="property"){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}else if(h.stack[u]==="map"&&d(h.token[u+1],41)&&u-h.begin[u]>5){f.push(h.token[u]);l(_);}else if(h.token[u]==="x;"){l(_);}else if((h.types[u]==="variable"||h.types[u]==="function")&&a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);f.push(h.token[u]);}else if(J(h.token[u],59)||d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&J(h.token[u+1],125))){f.push(h.token[u]);}u=u+1;}while(u{const f=ye({},a.script);if(a.language==="json"){a.script=ye(a.script,a.json,{quoteCovert:"double"});}const h=new Set(["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]);const m=Ce(null);const e=M.data;const _="script";const v=M.scopes;const u=M.end<1||M.end>e.token.length?e.token.length:M.end+1;const g=(()=>{let t=M.start;let O=isNaN(a.indentLevel)?0:Number(a.indentLevel);let T=false;let i=false;let j="";let C="";let b=e.types[0];let E=e.token[0];const Y=[-1];const Q=[];const n=M.start>0?Array(M.start).fill(0,0,M.start):[];const k=[];const x=[[]];const S=[];const R=[];const B=[];const P=[false];const N=[];const U=[];function H(){G(false,false);const $=a.commentIndent===true?O:0;if(T===false&&/\/\u002a\s*global\s/.test(e.token[t])){const c=e.token[t].replace(/\/\u002a\s*global\s+/,"").replace(/\s*\u002a\/$/,"").split(",");let o=c.length;do{o=o-1;c[o]=c[o].replace(/\s+/g,"");if(c[o]!=="")v.push([c[o],-1]);}while(o>0)}if(e.types[t-1]==="comment"||e.types[t+1]==="comment"){n[t-1]=$;}else if(e.lines[t]<2){let c=t+1;if(e.types[c]==="comment"){do{c=c+1;}while(c0){do{o=o-1;if(v[o][1]===c){v[o][1]=t;}else if(v[o][1]0)}c=c+1;e.begin.splice(c,1);e.ender.splice(c,1);e.lexer.splice(c,1);e.lines.splice(c,1);e.stack.splice(c,1);e.token.splice(c,1);e.types.splice(c,1);o=t+1;do{e.begin[o]=t;e.stack[o]=e.stack[c];o=o+1;}while(o-1&&e.lines[t]<3){e.lines[t]=3;}}if(e.types[t+1]!=="comment")T=true;return}else if(e.token[t-1]===","){n[t-1]=$;}else if(E==="="&&e.types[t-1]!=="comment"&&/^(\/\*\*\s*@[a-z_]+\s)/.test(C)===true){n[t-1]=-10;}else if(E==="{"&&e.types[t-1]!=="comment"&&e.lines[0]<2){if(e.stack[t]==="function"){n[t-1]=$;}else {n[t-1]=/\n/.test(C)?$:-10;}}else {n[t-1]=$;}if(e.types[t+1]!=="comment")T=true;if(e.token[e.begin[t]]==="("){n.push(O+1);}else {n.push(O);}if(n[t]>-1&&e.lines[t]<3){if(e.types[t-1]==="comment"&&C.startsWith("//")){e.lines[t]=2;}else {e.lines[t]=3;}}if(a.script.commentNewline===true&&C.startsWith("//")===false&&e.lines[t]>=3){e.lines[t]=2;}}function G($,c){let o=t-1;let A=$===true?0:1;const L=x[x.length-1]===void 0?[]:x[x.length-1];const w=c===false&&e.stack[t]==="array"&&$===true&&C!=="[";if(R[R.length-1]===false||e.stack[t]==="array"&&a.script.arrayFormat==="inline"||e.stack[t]==="object"&&a.script.objectIndent==="inline"){return}R[R.length-1]=false;do{if(e.types[o]==="end"){A=A+1;}else if(e.types[o]==="start"){A=A-1;}if(e.stack[o]==="global")break;if(A===0){if(e.stack[t]==="class"||e.stack[t]==="map"||w===false&&($===false&&e.token[o]!=="("&&e.token[o]!=="x("||$===true&&e.token[o]===",")){if(e.types[o+1]==="template_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}}else if(e.stack[t]==="array"&&e.types[t]==="operator"){if(e.token[o]===",")n[o]=O;if(o===e.begin[t])break}if($===false)break}if(A<0){if(e.types[o+1]==="template_start"||e.types[o+1]==="template_string_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}break}o=o-1;}while(o>-1)}function oe(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{let o=t;let A=false;const L=e.begin[o];do{o=o-1;if(e.lexer[o]==="markup"){A=true;break}if(e.begin[o]!==L)o=e.begin[o];}while(o>L);if(A===true){o=t;do{o=o-1;if(e.begin[o]!==L){o=e.begin[o];}else if(e.token[o]===","){n[o]=O+1;}}while(o>L);n[L]=O+1;n[t-1]=O;}else {n[t-1]=-20;}};if(C===")"&&e.token[t+1]==="."&&$[$.length-1]>-1&&e.token[$[0]]!==":"){let o=e.begin[t];let A=false;let L=false;do{o=o-1;}while(o>0&&n[o]<-9);A=n[o]===O;o=t+1;do{o=o+1;if(e.token[o]==="{"){L=true;break}if(e.begin[o]===e.begin[t+1]&&(e.types[o]==="separator"||e.types[o]==="end")){break}}while(o1){x[x.length-2].push(e.begin[t]);O=O+1;}}if(b!=="separator")fe();if(e.token[t+1]===","&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.token[e.begin[t]-1]===","&&(e.token[t+1]==="}"||e.token[t+1]==="]")&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.stack[t]!=="attribute"){if(C!==")"&&C!=="x)"&&(e.lexer[t-1]!=="markup"||e.lexer[t-1]==="markup"&&e.token[t-2]!=="return")){O=O-1;}if(C==="}"&&e.stack[t]==="switch"&&a.script.noCaseIndent===false){O=O-1;}}if(C==="}"||C==="x}"){if(e.types[t-1]!=="comment"&&E!=="{"&&E!=="x{"&&b!=="end"&&b!=="string"&&b!=="number"&&b!=="separator"&&E!=="++"&&E!=="--"&&(t<2||e.token[t-2]!==";"||e.token[t-2]!=="x;"||E==="break"||E==="return")){let o=t-1;let A=false;const L=e.begin[t];const w=Q.length;do{if(e.begin[o]===L){if(e.token[o]==="="||e.token[o]===";"||e.token[o]==="x;"){A=true;}if(e.token[o]==="."&&n[o-1]>-1){R[R.length-1]=false;n[L]=O+1;n[t-1]=O;break}if(o>0&&e.token[o]==="return"&&(e.token[o-1]===")"||e.token[o-1]==="x)"||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o-1]==="}"||e.token[o-1]==="x}"||e.token[o-1]===";"||e.token[o-1]==="x;")){O=O-1;n[t-1]=O;break}if(e.token[o]===":"&&k.length===0||e.token[o]===","&&A===false){break}if(o===0||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o]==="for"||e.token[o]==="if"||e.token[o]==="do"||e.token[o]==="function"||e.token[o]==="while"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"||e.token[o]==="with"){if(Q[w-1]===false&&w>1&&(t===u-1||e.token[t+1]!==")"&&e.token[t+1]!=="x)")&&e.stack[t]!=="object"){O=O-1;}break}}else {o=e.begin[o];}o=o-1;}while(o>L)}Y.pop();}if(a.script.bracePadding===false&&C!=="}"&&b!=="markup"){n[t-1]=-20;}if(a.script.bracePadding===true&&b!=="start"&&E!==";"&&(n[e.begin[t]]<-9||R[R.length-1]===true)){n[e.begin[t]]=-10;n[t-1]=-10;n.push(-20);}else if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(O);}else if(e.stack[t]==="array"&&($.length>0||S[S.length-1]===true)){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if((e.stack[t]==="object"||e.begin[t]===0&&C==="}")&&$.length>0){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if(C===")"||C==="x)"){const o=C===")"&&E!=="("&&U.length>0?U.pop()+1:0;const A=e.token[e.begin[t]-1]==="if"?(()=>{let L=t;do{L=L-1;if(e.token[L]===")"&&n[L-1]>-1)return o}while(L>e.begin[t]);return o+5})():o;if(o>0&&(a.language!=="jsx"||a.language==="jsx"&&e.token[e.begin[t]-1]!=="render")){const L=a.wrap;const w=e.begin[t];const z=U.length;let q=t-2;if(A>L){n[e.begin[t]]=O+1;n[t-1]=O;do{if(e.begin[q]===w){if(e.token[q]==="&&"||e.token[q]==="||"){n[q]=O+1;}else if(n[q]>-1&&e.types[q]!=="comment"&&e.token[q+1]!=="."){n[q]=n[q]+1;}}else if(n[q]>-1&&e.token[q+1]!=="."){n[q]=n[q]+1;}q=q-1;}while(q>w)}else if(z>0){U[z-1]=U[z-1]+o;}}else if(C===")"&&t>e.begin[t]+2&&e.lexer[e.begin[t]+1]===_&&e.token[e.begin[t]+1]!=="function"){const L=e.begin[t]<0?0:e.begin[t];const w=a.wrap;const z=$.length;let q=0;let W=0;let se=0;let F=0;let K=0;let V=false;let ne=false;let he=O+1;let re=false;let ae=false;let je=false;if(n[L]<-9){W=L;do{W=W+1;}while(W0&&se0)se=q;W=W-1;}while(W>L&&n[W]<-9);if(e.token[W+1]===".")he=n[W]+1;if(q>w-1&&w>0&&E!=="("&&se!==-1&&R[R.length-2]===false){if(e.token[L-1]==="if"&&Q[Q.length-1]===true||e.token[L-1]!=="if"){n[L]=he;if(e.token[L-1]==="for"){W=L;do{W=W+1;if(e.token[W]===";"&&e.begin[W]===L){n[W]=he;}}while(W=w&&w>0)re=true;}else if(e.types[W]==="markup"&&ae===false){ae=true;}if(n[W]>-9&&e.token[W]!==","&&e.types[W]!=="markup"){q=0;}else {if(n[W]===-10)q=q+1;q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){re=true;}}}else {if(n[W]>-9){q=0;}else {q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){re=true;}}}}while(W>L&&re===false);if(V===false&&e.token[e.begin[t]+1].charAt(0)==="`"){n[e.begin[t]]=-20;n[t-1]=-20;}else if((V===true||ae===true)&&q>=w&&w>0||n[L]>-9){if(je===true){he=n[L];if(e.token[L-1]==="["){W=t;do{W=W+1;if(e.types[W]==="end"||e.token[W]===","||e.token[W]===";"){break}}while(W0&&$[z-1]>W){he=he-z;}R[R.length-1]=false;W=t;do{W=W-1;if(e.begin[W]===L){if(e.token[W].indexOf("=")>-1&&e.types[W]==="operator"&&e.token[W].indexOf("!")<0&&e.token[W].indexOf("==")<0&&e.token[W]!=="<="&&e.token[W].indexOf(">")<0){q=W;do{q=q-1;if(e.begin[q]===L&&(e.token[q]===";"||e.token[q]===","||q===L)){break}}while(q>L)}else if(e.token[W]===","){n[W]=he;}else if(n[W]>-9&&ne===false&&(e.token[L-1]!=="for"||e.token[W+1]==="?"||e.token[W+1]===":")&&(e.token[e.begin[t]]!=="("||e.token[W]!=="+")){n[W]=n[W]+1;}}else if(n[W]>-9&&ne===false){n[W]=n[W]+1;}}while(W>L);n[L]=he;n[t-1]=he-1;}else {n[t-1]=-20;}if(e.token[e.begin[t]-1]==="+"&&n[e.begin[t]]>-9){n[e.begin[t]-1]=-10;}}else if(a.language==="jsx"){c();}else {n[t-1]=-20;}n.push(-20);}else if(R[R.length-1]===true){if(C==="]"&&e.begin[t]-1>0&&e.token[e.begin[e.begin[t]-1]]==="["){R[R.length-2]=false;}if(e.begin[t]-1){n[t-1]=n[e.begin[t]]-1;}else {n[t-1]=-20;}n.push(-20);}else if(e.types[t-1]==="comment"&&e.token[t-1].substring(0,2)==="//"){if(e.token[t-2]==="x}")n[t-3]=O+1;n[t-1]=O;n.push(-20);}else if(e.types[t-1]!=="comment"&&(E==="{"&&C==="}"||E==="["&&C==="]")){n[t-1]=-20;n.push(-20);}else if(C==="]"){if(Q[Q.length-1]===true&&R[R.length-1]===false&&a.script.arrayFormat!=="inline"||E==="]"&&n[t-2]===O+1){n[t-1]=O;n[e.begin[t]]=O+1;}else if(n[t-1]===-10){n[t-1]=-20;}if(e.token[e.begin[t]+1]==="function"){n[t-1]=O;}else if(Q[Q.length-1]===false){if(E==="}"||E==="x}")n[t-1]=O;let o=t-1;let A=1;do{if(e.token[o]==="]")A=A+1;if(e.token[o]==="["){A=A-1;if(A===0){if(o>0&&(e.token[o+1]==="{"||e.token[o+1]==="x{"||e.token[o+1]==="[")){n[o]=O+1;break}if(e.token[o+1]!=="["||i===false){n[o]=-20;break}break}}if(A===1&&e.token[o]==="+"&&n[o]>1){n[o]=n[o]-1;}o=o-1;}while(o>-1)}else if(a.language==="jsx"){c();}if(a.script.arrayFormat==="inline"){let o=t;const A=e.begin[t];do{o=o-1;if(e.types[o]==="end")break}while(o>A);if(o>A){n[e.begin[t]]=O+1;n[t-1]=O;}else {n[e.begin[t]]=-20;n[t-1]=-20;}}else if(n[e.begin[t]]>-1){n[t-1]=n[e.begin[t]]-1;}n.push(-20);}else if(C==="}"||C==="x}"||Q[Q.length-1]===true){if(C==="}"&&E==="x}"&&e.token[t+1]==="else"){n[t-2]=O+2;n.push(-20);}else {n.push(O);}n[t-1]=O;}else {n.push(-20);}if(e.types[t-1]==="comment")n[t-1]=O;ce();i=Q[Q.length-1];Q.pop();x.pop();S.pop();B.pop();N.pop();R.pop();P.pop();}function ce(){let $=0;const c=x[x.length-1];if(c===void 0)return;$=c.length-1;if($<1&&c[$]<0&&(C===";"||C==="x;"||C===")"||C==="x)"||C==="}"||C==="x}")){c.pop();return}if($<0||c[$]<0)return;if(C===":"){if(e.token[c[$]]!=="?"){do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1&&e.token[c[$]]!=="?")}c[$]=t;n[t-1]=O;}else {do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1)}if((e.stack[t]==="array"||C===",")&&c.length<1)c.push(-1);}function X(){const $=t;do{if(e.lexer[t+1]===_&&e.begin[t+1]<$)break;if(e.token[$-1]==="return"&&e.types[t]==="end"&&e.begin[t]===$)break;n.push(0);t=t+1;}while(t0){if(e.token[c-1]==="if"){O=O-2;}else {O=O-1;}}break}}$=$-1;}while($>0&&$>c)}function Oe(){if(e.token[t+1]!==","&&C.indexOf("/>")!==C.length-2||e.token[t+1]===","&&e.token[e.begin[t]-3]!=="React"){G(false,false);}if(E==="return"||E==="?"||E===":"){n[t-1]=-10;n.push(-20);}else if(b==="start"||e.token[t-2]==="return"&&e.stack[t-1]==="method"){n.push(O);}else {n.push(-20);}}function I(){const $=x[x.length-1]===void 0?[]:x[x.length-1];function c(){const o=e.token[t+1];let A=0;let L=0;let w=t;let z=C==="+"?O+2:O;let q=0;if(a.wrap<1){n.push(-10);return}do{w=w-1;if(e.token[e.begin[t]]==="("){if(w===e.begin[t]){q=A;}if(e.token[w]===","&&e.begin[w]===e.begin[t]&&Q[Q.length-1]===true){break}}if(A>a.wrap-1)break;if(n[w]>-9)break;if(e.types[w]==="operator"&&e.token[w]!=="="&&e.token[w]!=="+"&&e.begin[w]===e.begin[t]){break}A=A+e.token[w].length;if(w===e.begin[t]&&e.token[w]==="["&&A-9)break;if(n[w]===-10)A=A+1;}while(w>0);if(q>0)q=q+o.length;A=A+o.length;L=w;if(A>a.wrap-1&&n[w]<-9){do{L=L-1;}while(L>0&&n[L]<-9)}if(e.token[L+1]==="."&&e.begin[t]<=e.begin[L]){z=z+1;}else if(e.types[L]==="operator"){z=n[L];}L=o.length;if(A+L0){w=a.wrap-q;}else {w=a.wrap-A;}if(w>0&&w<5){n.push(z);if(e.token[t].charAt(0)==='"'||e.token[t].charAt(0)==="'"){t=t+1;n.push(-10);}return}if(e.token[e.begin[t]]!=="("||q>a.wrap-1||q===0){if(q>0)A=q;if(A-o.lengtha.wrap-4){n.push(z);return}n.push(-10);return}n.push(z);return}n.push(-10);}fe();if($.length>0&&$[$.length-1]>-1&&e.stack[t]==="array"){S[S.length-1]=true;}if(C!==":"){if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&R.length>0){G(true,false);}if(C!=="?"&&e.token[$[$.length-1]]==="."){let o=0;let A=t;const L=e.begin[A];do{if(e.begin[A]===L){if(e.token[A+1]==="{"||e.token[A+1]==="["||e.token[A]==="function"){break}if(e.token[A]===","||e.token[A]===";"||e.types[A]==="end"||e.token[A]===":"){$.pop();O=O-1;break}if(e.token[A]==="?"||e.token[A]===":"){if(e.token[$[$.length-1]]==="."&&o<2)$[$.length-1]=L+1;break}if(e.token[A]===".")o=o+1;}A=A+1;}while(A-1&&n[o]<-9);$.push(t);O=O+1;if(n[o]===O&&e.token[o+1]!==":"){O=O+1;$.push(t);}n[t-1]=O;if(e.token[e.begin[t]]==="("&&($.length<2||$[0]===$[1])){R[R.length-1]=false;if(t-2===e.begin[t]){n[e.begin[t]]=O-1;}else {n[e.begin[t]]=O;}o=t-2;do{if(e.types[o]==="end"&&n[o-1]>-1)break;if(n[o]>-1)n[o]=n[o]+1;o=o-1;}while(o>e.begin[t])}}n.push(-10);return}if(C===":"){if(e.stack[t]==="map"||e.types[t+1]==="type"||e.types[t+1]==="type_start"){n[t-1]=-20;n.push(-10);return}if(k.length>0&&e.begin[k[k.length-1]]===e.begin[t]){let o=t;const A=e.begin[t];do{o=o-1;if(e.begin[o]===A){if(e.token[o]===","||e.token[o]===";"){n[t-1]=-20;break}if(e.token[o]==="?"){k.pop();ce();if(a.script.ternaryLine===true)n[t-1]=-10;n.push(-10);return}}else if(e.types[o]==="end"){o=e.begin[o];}}while(o>A)}if(e.token[t-2]==="where"&&e.stack[t-2]===e.stack[t]){n[t-1]=-10;n.push(-10);return}if(b==="reference"&&e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("){n[t-1]=-20;n.push(-10);return}if((E===")"||E==="x)")&&e.token[e.begin[t-1]-2]==="function"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(-10);return}if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&(b==="reference"||E===")"||E==="]"||E==="?")&&(e.stack[t]==="map"||e.stack[t]==="class"||e.types[t+1]==="reference")&&(k.length===0||k[k.length-1]-1||e.types[t-2]==="word"&&e.stack[t]!=="switch")){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="switch"&&(k.length<1||k[k.length-1]0){n[t-1]=O;}else {n[t-1]=-10;}n.push(-10);return}if(C==="++"||C==="--"){if(b==="number"||b==="reference"){n[t-1]=-20;n.push(-10);}else if(t-1&&(/\d/.test(o.charAt(1))===true||o.charAt(1)==="."||o.charAt(1)==="-"||o.charAt(1)==="+")){n.push(-20);return}}return c()}if(e.types[t-1]!=="comment"){if(E==="("){n[t-1]=-20;}else if(C==="*"&&e.stack[t]==="object"&&e.types[t+1]==="reference"&&(E==="{"||E===",")){n[t-1]=O;}else if(C!=="?"||k.length===0){n[t-1]=-10;}}if(C.indexOf("=")>-1&&C!=="=="&&C!=="==="&&C!=="!="&&C!=="!=="&&C!==">="&&C!=="<="&&C!=="=>"&&e.stack[t]!=="method"&&e.stack[t]!=="object"){let o=t+1;let A=0;let L=false;let w="";if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&e.token[t+1]!=="function"){return}do{if(e.types[o]==="start"){if(L===true&&e.token[o]!=="["){if(P[P.length-1]===true){P[P.length-1]=false;}break}A=A+1;}if(e.types[o]==="end")A=A-1;if(A<0){if(P[P.length-1]===true){P[P.length-1]=false;}break}if(A===0){w=e.token[o];if(L===true){if(e.types[o]==="operator"||e.token[o]===";"||e.token[o]==="x;"||e.token[o]==="?"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"){if(w!==void 0&&(w==="?"||w.indexOf("=")>-1&&w!=="=="&&w!=="==="&&w!=="!="&&w!=="!=="&&w!==">="&&w!=="<=")){if(P[P.length-1]===false){P[P.length-1]=true;}}if((w===";"||w==="x;"||w==="var"||w==="let"||w==="const")&&P[P.length-1]===true){P[P.length-1]=false;}break}if(P[P.length-1]===true&&(w==="return"||w==="break"||w==="continue"||w==="throw")){P[P.length-1]=false;}}if(w===";"||w==="x;"||w===",")L=true;}o=o+1;}while(o{let c=e.begin[t];if(c<0){v.push([e.token[t],-1]);}else {if(e.stack[c+1]!=="function"){do{c=e.begin[c];}while(c>-1&&e.stack[c+1]!=="function")}v.push([e.token[t],c]);}};if(e.types[t-1]==="comment"){n[t-1]=O;}else if(b==="end"&&E!==")"&&e.token[e.begin[t-1]-1]!==")"){n[t-1]=-10;}else if(b!=="separator"&&b!=="start"&&b!=="end"&&b.indexOf("template_string")<0){if(b==="word"||b==="operator"||b==="property"||b==="type"||b==="reference"){n[t-1]=-10;}else {n[t-1]=-20;}}if(E==="var"&&e.lexer[t-1]===_){$();}else if(E==="function"){v.push([e.token[t],t]);}else if(E==="let"||E==="const"){v.push([e.token[t],t]);}else if(e.stack[t]==="arguments"){v.push([e.token[t],t]);}else if(E===","){let c=t;do{c=c-1;}while(c>e.begin[t]&&e.token[c]!=="var"&&e.token[c]!=="let"&&e.token[c]!=="const");if(e.token[c]==="var"){$();}else if(e.token[c]==="let"||e.token[c]==="const"){v.push([e.token[t],t]);}}n.push(-10);}function ee(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{if(a.script.methodChain>0){let o=t;let A=e.begin[t];const L=[t];const w=e.token[A-1]==="if";do{o=o-1;if(e.types[o]==="end")o=e.begin[o];if(e.begin[o]===A){if(e.types[o]==="string"&&e.token[o].indexOf("${")===e.token[o].length-2){break}if(e.token[o]==="."){if(n[o-1]>0){n[t-1]=w===true?O+1:O;return}L.push(o);}else if(e.token[o]===";"||e.token[o]===","||e.types[o]==="operator"||(e.types[o]==="word"||e.types[o]==="reference")&&(e.types[o-1]==="word"||e.types[o-1]==="reference")){break}}}while(o>A);if(L.length-1)n[o]=n[o]+1;o=o+1;}while(o0){if(e.stack[t]==="object"||e.stack[t]==="array"){G(true,false);}else {G(false,false);}}if(a.script.methodChain===0){n[t-1]=-20;}else if(a.script.methodChain<0){if(e.lines[t]>0){c();}else {n[t-1]=-20;}}else {c();}n.push(-20);return}if(C===","){fe();if(Q[Q.length-1]===false&&(e.stack[t]==="object"||e.stack[t]==="array"||e.stack[t]==="paren"||e.stack[t]==="expression"||e.stack[t]==="method")){Q[Q.length-1]=true;if(e.token[e.begin[t]]==="("){let o=t;do{o=o-1;if(e.begin[o]===e.begin[t]&&e.token[o]==="+"&&n[o]>-9){n[o]=n[o]+2;}}while(o>e.begin[t])}}if(e.stack[t]==="array"&&a.script.arrayFormat==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="array"&&a.script.arrayFormat==="inline"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="object"&&a.script.objectIndent==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="object"&&a.script.objectIndent==="inline"){n[t-1]=-20;n.push(-10);return}if($.length>0){if($[$.length-1]>-1)ce();n[t-1]=-20;n.push(O);return}if(e.token[t-2]===":"&&e.token[t-4]==="where"){n[t-1]=-20;n.push(-10);return}n[t-1]=-20;if(e.types[t+1]!=="end"){B[B.length-1]=B[B.length-1]+1;}if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&a.language!=="jsx"&&e.stack[t]!=="global"&&(e.types[t-1]!=="string"&&e.types[t-1]!=="number"||e.token[t-2]!=="+"||e.types[t-1]==="string"&&e.types[t-1]!=="number"&&e.token[t-2]==="+"&&e.types[t-3]!=="string"&&e.types[t-3]!=="number")){n.push(-10);return}if(b==="reference"&&e.types[t-2]==="word"&&"var-let-const-from".indexOf(e.token[t-2])<0&&(e.types[t-3]==="end"||e.token[t-3]===";")){N[N.length-1]=true;n.push(-10);return}if(N[N.length-1]===true||e.stack[t]==="notation"){n.push(-10);return}if(B[B.length-1]>3&&(e.stack[t]==="array"||e.stack[t]==="object")){if(R[R.length-1]===true)G(true,true);n[t-1]=-20;if(S[S.length-1]===true){n.push(O);return}const o=e.begin[t];let A=t;do{if(e.types[A]==="end"){A=e.begin[A];}else {if(e.token[A]===","&&e.types[A+1]!=="comment"){n[A]=O;}}A=A-1;}while(A>o);n[o]=O;S[S.length-1]=true;return}if(e.stack[t]==="object"){if(R[R.length-1]===true&&e.types[e.begin[t]-1]!=="word"&&e.types[e.begin[t]-1]!=="reference"&&e.token[e.begin[t]-1]!=="("&&e.token[e.begin[t]-1]!=="x("){const o=e.begin[t];let A=t-1;do{if(e.begin[A]===o){if(e.token[A]===",")break;if(e.token[A]===":"){G(true,false);break}}A=A-1;}while(A>o)}}if(R[R.length-1]===false||e.token[t-2]==="+"&&(b==="string"||b==="number")&&n[t-2]>0&&(E.charAt(0)==='"'||E.charAt(0)==="'")){if(e.stack[t]==="method"){if(e.token[t-2]==="+"&&(E.charAt(0)==='"'||E.charAt(0)==="'")&&(e.token[t-3].charAt(0)==='"'||e.token[t-3].charAt(0)==="'")){n.push(O+2);return}if(e.token[t-2]!=="+"){n.push(-10);return}}n.push(O);return}if(R[R.length-1]===true&&e.stack[t]!=="object"){n.push(-10);return}if(B[B.length-1]<4&&(e.stack[t]==="array"||e.stack[t]==="object")){n.push(-10);return}n.push(O);return}if(C===";"||C==="x;"){fe();if(e.token[t+1]!==void 0&&e.types[t+1].indexOf("attribute")>0&&e.types[t+1].indexOf("end")>0){n[t-1]=-20;n.push(O-1);return}if(Y[Y.length-1]>-1&&e.stack[Y[Y.length-1]]!=="expression"){let o=t;do{o=o-1;if(e.token[o]===";")break;if(e.token[o]===","){O=O-1;break}if(e.types[o]==="end")o=e.begin[o];}while(o>0&&o>e.begin[t])}Y[Y.length-1]=-1;ce();if(e.token[e.begin[t]-1]!=="for")G(false,false);N[N.length-1]=false;n[t-1]=-20;if(e.begin[t]>0&&e.token[e.begin[t]-1]==="for"&&e.stack[t]!=="for"){n.push(-10);return}n.push(O);return}n.push(-20);}function Ne(){const $=e.stack[t+1];const c=t===0?e.stack[t]:e.stack[t-1];if(E===")"||(c==="object"||c==="array")&&E!=="]"){if($!=="method"||$==="method"&&e.token[t+1]!==")"&&e.token[t+2]!==")"){if(E===")"&&($!=="function"||e.token[e.begin[e.begin[t-1]-1]]==="("||e.token[e.begin[e.begin[t-1]-1]]==="x(")){G(false,false);}else if(e.types[t+1]!=="end"&&e.types[t+2]!=="end"){G(true,false);}}}Q.push(false);x.push([]);P.push(false);S.push(false);N.push(false);B.push(0);if(a.script.neverFlatten===true||$==="array"&&a.script.arrayFormat==="indent"||$==="attribute"||b==="generic"||$==="class"&&E!=="("&&E!=="x("||C==="["&&e.token[t+1]==="function"){R.push(false);}else {if($==="expression"||$==="method"){R.push(true);}else if(($==="object"||$==="class")&&(E==="("||E==="x("||b==="word"||b==="reference")){R.push(true);}else if($==="array"||C==="("||C==="x("){R.push(true);}else if(C==="{"&&$==="object"&&b!=="operator"&&b!=="start"&&b!=="string"&&b!=="number"&&c!=="object"&&c!=="array"&&t>0){R.push(true);}else {R.push(false);}}if(C!=="("&&C!=="x("&&e.stack[t+1]!=="attribute"){O=O+1;}if(C==="{"||C==="x{"){Y.push(-1);if(e.types[t-1]!=="comment"){if(b==="markup"){n[t-1]=O;}else if(a.script.braceAllman===true&&b!=="operator"&&E!=="return"){n[t-1]=O-1;}else if(e.stack[t+1]!=="block"&&($==="function"||E===")"||E==="x)"||E===","||E==="}"||b==="markup")){n[t-1]=-10;}else if(E==="{"||E==="x{"||E==="["||E==="}"||E==="x}"){n[t-1]=O-1;}}if($==="object"){if(a.script.objectIndent==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.objectIndent==="inline"){R[R.length-1]=true;n.push(-20);return}}if($==="switch"){if(a.script.noCaseIndent===true){n.push(O-1);return}O=O+1;n.push(O);return}if(R[R.length-1]===true){if(b!=="word"&&b!=="reference"){n.push(-20);return}}n.push(O);return}if(C==="("||C==="x("){if(a.wrap>0&&C==="("&&e.token[t+1]!==")"){U.push(1);}if(E==="-"&&(e.token[t-2]==="("||e.token[t-2]==="x(")){n[t-2]=-20;}if(b==="end"&&c!=="if"&&c!=="for"&&c!=="catch"&&c!=="else"&&c!=="do"&&c!=="try"&&c!=="finally"&&c!=="catch"){if(e.types[t-1]==="comment"){n[t-1]=O;}else {n[t-1]=-20;}}if(E==="async"){n[t-1]=-10;}else if($==="method"||e.token[t-2]==="function"&&b==="reference"){if(E==="import"||E==="in"||a.script.functionNameSpace===true){n[t-1]=-10;}else if(E==="}"&&e.stack[t-1]==="function"||b==="word"||b==="reference"||b==="property"){n[t-1]=-20;}else if(c!=="method"&&$!=="method"){n[t-1]=O;}}if(E==="+"&&(e.token[t-2].charAt(0)==='"'||e.token[t-2].charAt(0)==="'")){n.push(O);return}if(E==="}"||E==="x}"){n.push(-20);return}if(E==="-"&&(t<2||e.token[t-2]!==")"&&e.token[t-2]!=="x)"&&e.token[t-2]!=="]"&&e.types[t-2]!=="reference"&&e.types[t-2]!=="string"&&e.types[t-2]!=="number")||a.script.functionSpace===false&&E==="function"){n[t-1]=-20;}n.push(-20);return}if(C==="["){if(E==="[")Q[Q.length-2]=true;if(E==="return"||E==="var"||E==="let"||E==="const"){n[t-1]=-10;}else if(e.types[t-1]!=="comment"&&e.stack[t-1]!=="attribute"&&(b==="end"||b==="word"||b==="reference")){n[t-1]=-20;}else if(E==="["||E==="{"||E==="x{"){n[t-1]=O-1;}if(e.stack[t]==="attribute"){n.push(-20);return}if(a.script.arrayFormat==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.arrayFormat==="inline"){R[R.length-1]=true;n.push(-20);return}if($==="method"||R[R.length-1]===true){n.push(-20);return}let o=t+1;do{if(e.token[o]==="]"){n.push(-20);return}if(e.token[o]===","){n.push(O);return}o=o+1;}while(o0){n[t-1]=O;}}function We(){if(j==="template_else"){n[t-1]=O-1;n.push(O);}else if(j==="template_start"){O=O+1;if(e.lines[t-1]<1)n[t-1]=-20;if(e.lines[t]>0||E.length===1&&b==="string"){n.push(O);}else {n.push(-20);}}else if(j==="template_end"){O=O-1;if(b==="template_start"||e.lines[t-1]<1){n[t-1]=-20;}else {n[t-1]=O;}if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}else if(j==="template"){if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}}function ze(){if(j==="template_string_start"){O=O+1;n.push(O);}else if(j==="template_string_else"){fe();n[t-1]=O-1;n.push(O);}else {fe();O=O-1;n[t-1]=O;n.push(-10);}if(t>2&&(e.types[t-2]==="template_string_else"||e.types[t-2]==="template_string_start")){if(a.script.bracePadding===true){n[t-2]=-10;n[t-1]=-10;}else {n[t-2]=-20;n[t-1]=-20;}}}function Z(){if(e.token[t-1]===","||e.token[t-1]===":"&&e.stack[t-1]!=="data_type"){n[t-1]=-10;}else {n[t-1]=-20;}if(e.types[t]==="type"||e.types[t]==="type_end"){n.push(-10);}if(e.types[t]==="type_start"){n.push(-20);}}function D(){if((E===")"||E==="x)")&&e.stack[t]==="class"&&(e.token[e.begin[t-1]-1]==="static"||e.token[e.begin[t-1]-1]==="final"||e.token[e.begin[t-1]-1]==="void")){n[t-1]=-10;n[e.begin[t-1]-1]=-10;}if(E==="]")n[t-1]=-10;if(C==="else"&&E==="}"){if(e.token[t-2]==="x}")n[t-3]=n[t-3]-1;if(a.script.braceAllman===true||a.script.elseNewline===true){n[t-1]=O;}}if(C==="new"&&h.has(e.token[t+1]));if(C==="from"&&b==="end"&&t>0&&(e.token[e.begin[t-1]-1]==="import"||e.token[e.begin[t-1]-1]===",")){n[t-1]=-10;}if(C==="function"){if(a.script.functionSpace===false&&t1){if(e.types[t-2]==="operator"||e.token[t-2]===","){n[t-1]=-20;}else if(e.types[t-2]==="start"){n[t-2]=-20;n[t-1]=-20;}}else if(C==="while"&&(E==="}"||E==="x}")){let $=t-1;let c=0;do{if(e.token[$]==="}"||e.token[$]==="x}")c=c+1;if(e.token[$]==="{"||e.token[$]==="x{")c=c-1;if(c===0){if(e.token[$-1]==="do"){n[t-1]=-10;break}n[t-1]=O;break}$=$-1;}while($>-1)}else if(C==="in"||(C==="else"&&a.script.elseNewline===false&&a.script.braceAllman===false||C==="catch")&&(E==="}"||E==="x}")){n[t-1]=-10;}else if(C==="var"||C==="let"||C==="const"){Y[Y.length-1]=t;if(b==="end")n[t-1]=O;if(e.token[e.begin[t]-1]!=="for"){let $=t+1;let c=0;do{if(e.types[$]==="end")c=c-1;if(e.types[$]==="start")c=c+1;if(c<0||c===0&&(e.token[$]===";"||e.token[$]===",")){break}$=$+1;}while($0&&e.token[t]!==")"){if(e.types[t]==="comment"&&U[U.length-1]>-1){U[U.length-1]=a.wrap+1;}else if(n[t]>-1||e.token[t].charAt(0)==="`"&&e.token[t].indexOf(pe)>0){U[U.length-1]=-1;}else if(U[U.length-1]>-1){U[U.length-1]=U[U.length-1]+e.token[t].length;if(n[t]===-10)U[U.length-1]=U[U.length-1]+1;}}}else {X();}t=t+1;}while(t{const t=[];const O=(()=>{const n=[];const k=a.indentChar;let x=a.indentSize;if(typeof x!=="number"||x<1)return "";do{n.push(k);x=x-1;}while(x>0);return n.join("")})();const T=a.crlf===true?"\r\n":pe;const i=a.preserveLine+1;const j=["x;","x}","x{","x(","x)"];let C=M.start;let b="";let E=a.indentLevel;function Y(n){const k=[];const x=(()=>{if(C===u-1)return 1;if(e.lines[C+1]-1>i)return i;if(e.lines[C+1]>1)return e.lines[C+1]-1;return 1})();let S=0;if(n<0)n=0;do{k.push(T);S=S+1;}while(S0){S=0;do{k.push(O);S=S+1;}while(S-1&&e.types[B]!=="comment"){if(e.token[B+1]==="."){S=S+a.indentSize*a.indentChar.length;}break}}else if(g[B]>-1){break}if(e.types[B]!=="comment"){if(g[B-1]===-10)S=S+1;S=e.token[B].length+S;}B=B-1;}while(B>N);P=B;if(e.token[P]===","&&e.token[R+1]==="="){do{if(e.types[P]==="end")P=e.begin[P];if(e.begin[P]===N){if(e.token[P]===";"||e.token[P]==="x;")break;if(e.token[P]==="var"||e.token[P]==="const"||e.token[P]==="let"){S=S+a.indentSize*a.indentChar.length;break}}P=P-1;}while(P>N)}if(S>x)x=S;U.push([R,S]);R=B;}else if(e.types[R]==="end"){R=e.begin[R];}R=R-1;}while(R>N);R=U.length;if(R>0){do{R=R-1;B=U[R][1];if(B0)}};C=u;do{C=C-1;if(e.lexer[C]==="script"){if(e.token[C]==="}"&&e.token[C-1]!=="{"&&g[e.begin[C]]>0){n(C);}}else {C=e.begin[C];}}while(C>0)}C=M.start;do{if(e.lexer[C]===_||M.beautify[e.lexer[C]]===void 0){if(e.types[C]==="comment"&&a.commentIndent===true){if(/\n/.test(e.token[C])){const n=e.begin[C]>-1?e.token[C].charAt(2)==="*"?$e(g[C],O)+a.indentChar:$e(g[C],O):a.indentChar;const k=e.token[C].split(/\n/);let x=1;do{k[x]=n+k[x].trimStart();x=x+1;}while(x-1){if((g[C]>-1&&e.token[C]==="{"||g[C]>-1&&e.token[C+1]==="}")&&e.lines[C]<3&&a.script.braceNewline===true){if(e.lines[C+1]<3)t.push(Y(0));}t.push(Y(g[C]));E=g[C];}else if(g[C]===-10){t.push(de);if(e.lexer[C+1]!==_)E=E+1;}}else {if(m[C]===C){t.push(e.token[C]);}else {M.end=m[C];M.start=C;a.indentLevel=E;b=M.beautify[e.lexer[C]](a).replace(we,y);t.push(b);C=M.iterator;if(g[C]===-10){t.push(de);}else if(g[C]>-1){t.push(Y(g[C]));}a.indentLevel=0;}}C=C+1;}while(C" instead of "/>".',lexer:"markup",type:"boolean"},classPadding:{description:"Inserts new line characters between every CSS code block.",default:false,type:"boolean",lexer:"style"},sortSelectors:{default:false,type:"boolean",description:"If comma separated CSS selectors should present on a single line of code.",lexer:"style"},sortProperties:{lexer:"style",description:"This option will alphabetically sort CSS properties contained within classes.",default:false,type:"boolean"},noLeadZero:{lexer:"style",description:"This will eliminate leading zeros from numbers expressed within values.",default:false,type:"boolean"},compressCSS:{lexer:"style",description:"If CSS should be beautified in a style where the properties and values are minifed for faster reading of selectors.",default:false,type:"boolean"},forceValue:{lexer:"style",description:"If CSS selector property values should be indented onto newlines",default:"preserve",type:"select",values:[{rule:"preserve",description:"Preserves property values, output does not augment provided structures"},{rule:"collapse",description:"Collapsed all selector property values onto newlines"},{rule:"wrap",description:"Collapase only selector property values which exceed wrap limit"}]},braceAllman:{lexer:"script",default:false,description:'Determines if opening curly braces will exist on the same line as their condition or be forced onto a new line, otherwise known as "Allman Style" indentation.',type:"boolean"},bracePadding:{default:false,description:"This will create a newline before and after objects values",type:"boolean",lexer:"script"},braceNewline:{default:false,description:"If true an empty line will be inserted after opening curly braces and before closing curly braces.",type:"boolean",lexer:"script"},braceStyle:{default:"none",description:"Emulates JSBeautify's brace_style option using existing Prettify options",type:"select",lexer:"script",values:[{rule:"none",description:"Ignores this option"},{rule:"collapse",description:"Sets formatObject to indent and neverflatten to true."},{rule:"collapse-preserve-inline",description:"Sets formatObject to inline and bracePadding to true"},{rule:"expand",description:"Sets objectIndent to indent and braceNewline + neverflatten to true."}]},arrayFormat:{lexer:"script",description:"Determines if all array indexes should be indented, never indented, or left to the default",type:"select",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},objectSort:{default:false,description:"This option will alphabetically sort object properties in JSON objects",type:"boolean",lexer:"script"},objectIndent:{description:"This option will alphabetically sort object properties in JSON objects",type:"select",lexer:"script",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},functionSpace:{lexer:"script",default:true,type:"boolean",description:"Inserts a space following the function keyword for anonymous functions."},functionNameSpace:{lexer:"script",default:true,type:"boolean",description:"If a space should follow a JavaScript function name."},methodChain:{lexer:"script",default:-1,description:"When to break consecutively chained methods and properties onto separate lines. A negative value disables this option. A value of 0 ensures method chainsare never broken.",type:"number"},caseSpace:{default:false,type:"boolean",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation thereby keeping the case on a single line of code.",lexer:"script"},inlineReturn:{lexer:"script",default:true,type:"boolean",description:"Inlines return statements contained within `if` and `else` conditions. This rules also augments code and will reason about your structure to output the best and most readable results."},elseNewline:{lexer:"script",default:false,type:"boolean",description:'If keyword "else" is forced onto a new line.'},ternaryLine:{lexer:"script",description:"If ternary operators in JavaScript `?` and `:` should remain on the same line.",type:"boolean",default:false},neverFlatten:{lexer:"script",default:true,description:"If destructured lists in script should never be flattend.",type:"boolean"},variableList:{lexer:"script",description:"If consecutive JavaScript variables should be merged into a comma separated list or if variables in a list should be separated. each \u2014 Ensure each reference is a single declaration statement.",type:"select",default:"none",values:[{rule:"none",description:"Ignores this option"},{rule:"each",description:"Ensure each reference is a single declaration statement"},{rule:"list",description:"Ensure consecutive declarations are a comma separated list"}]},vertical:{lexer:"script",description:"If lists of assignments and properties should be vertically aligned",type:"boolean",default:false},noCaseIndent:{lexer:"script",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation, thereby keeping the case on a single line of code.",default:false,type:"boolean"},noSemicolon:{lexer:"script",description:"Removes semicolons that would be inserted by ASI. This option is in conflict with option `attemptCorrection` and takes precedence over conflicting features. Use of this option is a possible security/stability risk.",default:false,type:"boolean"},endComma:{description:"If there should be a trailing comma in arrays and objects.",type:"select",lexer:"script",default:"none",values:[{rule:"none",description:"Ignore this option"},{rule:"always",description:"Always ensure there is a tailing comma"},{rule:"never",description:"Remove trailing commas"}]}};var lt={};at(lt,{format:()=>Fe,formatSync:()=>ht,language:()=>qe,options:()=>Ie,parse:()=>rt});function st(a){const f=a.source.search(et);const h=a.source.search(tt);const p=Re(Se);const r=p.length;let m=0;if(h>-1&&a.source.slice(0,h).trimStart()===y)return false;if(f>-1&&(f===0||`"':`.indexOf(a.source.charAt(f-1))<0)){let n=function(){if(g.charAt(t-1)!=="\\")return false;let k=t;do{k=k-1;}while(k>0&&g.charAt(k)==="\\");return (t-k)%2===0};const v=[];const u=f;const g=a.source;const l=g.length;let t=u;let O=0;let T=y;let i=y;let j=y;let C=y;let b=[];let E=[];let Y;let Q;if(g.charAt(t)==="<"){Q="")break;if(Q==="//"&&g.charAt(t)==="\n")break;if(Q==="/*"&&g.slice(t-1,t+1)==="*/")break;if(Q.charCodeAt(1)===37&&g.slice(t-1,t+1)==="%"&&g.indexOf("endcomment",g.indexOf("{%",Y))>0)break}else if(g.charAt(t)===T&&T!=="${"){T=y;}else if(T==="`"&&g.slice(t,t+2)==="${"){T="${";}else if(T==="${"&&g.charAt(t)==="}"){T="`";}}t=t+1;}while(t0){T=g.slice(O,t+1);if(Q==="","comment");}else if(b[r]==="<"){X();}else if(b[r]==="/"&&(r===C-1||b[r+1]==="*")){N();}else if((s.count<0||i.lines[s.count]>0)&&b[r]==="#"&&b[r+1]==="!"&&(b[r+2]==="/"||b[r+2]==="[")){oe("#!"+b[r+2],"\n","string");}else if(b[r]==="/"&&(r===C-1||b[r+1]==="/")){ce();}else if(d(b[r],96)||d(b[r],125)&&s.structure[s.structure.length-1][0]==="template_string"){if(u>-1)$();m=ze();if(d(m,125)&&m.slice(m.length-2)==="${"){e="template_string_else";ee("template_string");}else if(m.slice(m.length-2)==="${"){e="template_string_start";ee("template_string");}else if(d(m[0],125)){e="template_string_end";ee("");}else {e="string";ee("");}}else if(b[r]==='"'||b[r]==="'"){oe(b[r],b[r],"string");}else if(b[r]==="-"&&(r-1)$();m="-";e="operator";ee("");}else if(u===-1&&(b[r]!=="0"||b[r]==="0"&&b[r+1]!=="b")&&(/\d/.test(b[r])||r!==C-2&&b[r]==="-"&&b[r+1]==="."&&/\d/.test(b[r+2])||r!==C-1&&(b[r]==="-"||b[r]===".")&&/\d/.test(b[r+1]))){if(u>-1)$();if(e==="end"&&b[r]==="-"){m="-";e="operator";}else {m=Oe();e="number";}ee("");}else if(b[r]===":"&&b[r+1]===":"){if(u>-1)$();if(h.script.correct===true)ie();P();r=r+1;m="::";e="separator";ee("");}else if(b[r]===","){if(u>-1)$();if(h.script.correct===true)ie();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(e==="comment"){H();}else if(S.len>-1&&S.count[S.len]===0&&h.script.variableList==="each"){P();m=";";e="separator";ee("");m=S.word[S.len];e="word";ee("");S.index[S.len]=s.count;}else {m=",";e="separator";P();ee("");}}else if(b[r]==="."){if(u>-1)$();k[k.length-1]=false;if(b[r+1]==="."&&b[r+2]==="."){m="...";e="operator";r=r+2;}else {P();m=".";e="separator";}if(/\s/.test(b[r-1])===true)s.linesSpace=1;ee("");}else if(b[r]===";"){if(u>-1)$();if(k[k.length-1]===true&&i.stack[s.count].indexOf("type")<0){k[k.length-1]=false;}if(Q[Q.length-1]===0)Q.pop();if(S.len>-1&&S.count[S.len]===0){if(h.script.variableList==="each"){D();}else {S.index[S.len]=s.count+1;}}if(h.script.correct===true)ie();m=";";e="separator";if(i.token[s.count]==="x}"){B();}else {ee("");}U();}else if(b[r]==="("||b[r]==="["||b[r]==="{"){We(b[r]);}else if(b[r]===")"||b[r]==="]"||b[r]==="}"){G(b[r]);}else if(b[r]==="*"&&i.stack[s.count]==="object"&&u<0&&/\s/.test(b[r+1])===false&&b[r+1]!=="="&&/\d/.test(b[r+1])===false){u=r;}else if(b[r]==="="||b[r]==="&"||b[r]==="<"||b[r]===">"||b[r]==="+"||b[r]==="-"||b[r]==="*"||b[r]==="/"||b[r]==="!"||b[r]==="?"||b[r]==="|"||b[r]==="^"||b[r]===":"||b[r]==="%"||b[r]==="~"){m=I();if(m==="regex"){m=i.token[s.count];}else if(m==="*"&&i.token[s.count]==="function"){i.token[s.count]="function*";}else {e="operator";if(m!=="!"&&m!=="++"&&m!=="--")P();ee("");}}else if(u<0&&b[r]!==""){u=r;}if(S.len>-1&&s.count===S.index[S.len]+1&&i.token[S.index[S.len]]===";"&&m!==S.word[S.len]&&e!=="comment"&&h.script.variableList==="list"){D();}r=r+1;}while(r-1)$();if((i.token[s.count]!=="}"&&i.token[0]==="{"||i.token[0]!=="{")&&(i.token[s.count]!=="]"&&i.token[0]==="["||i.token[0]!=="[")){R(false);}if(n[0]===s.count){m="\n"+n[1];e="string";ee("");}if(i.token[s.count]==="x;"&&(i.token[s.count-1]==="}"||i.token[s.count-1]==="]")&&i.begin[s.count-1]===0){s.pop(i);}h.script=p;return i};var De={markup:"markup",html:"markup",liquid:"markup",xml:"markup",javascript:"script",typescript:"script",jsx:"script",tsx:"script",json:"script",less:"style",scss:"style",sass:"style",css:"style",text:"text"};var nt={html:"HTML",xhtml:"XHTML",liquid:"Liquid",xml:"XML",jsx:"JSX",tsx:"TSX",json:"JSON",yaml:"YAML",css:"CSS",scss:"SCSS",sass:"SASS",less:"LESS",text:"Plain Text",javascript:"JavaScript",typescript:"TypeScript"};function Xe(a){return typeof a!=="string"||a.indexOf("html")>-1||De[a]===void 0?"markup":De[a]}function ut(a){if(typeof a!=="string"||nt[a]===void 0)return a.toUpperCase();return nt[a]}function ke(a){const f={};if(a==="unknown"){f.language=a;f.languageName="Unknown";f.lexer="markup";}else if(a==="xhtml"||a==="markup"){f.language="xml";f.languageName="XHTML";f.lexer="markup";}else {f.language=a;f.languageName=ut(a);f.lexer=Xe(a);}if(M.hooks.language.length>0){for(const h of M.hooks.language){const p=h(f);if(typeof p==="object")ye(f,p);}}return f}qe.reference=ke;qe.listen=function(a){M.hooks.language.push(a);};function qe(a){let f=[];let h=0;const p=/(((var)|(let)|(const)|(function)|(import))\s+(\w|\$)+[a-zA-Z0-9]*)/.test(a)&&/@import/.test(a)===false;const r=/((((final)|(public)|(private))\s+static)|(static\s+void))/.test(a);function m(){if(/\n\s*#+\s+/.test(a)||/^#+\s+/.test(a))return ke("markdown");if(/\$[a-zA-Z]/.test(a)||/\{\s*(\w|\.|\$|#)+\s*\{/.test(a)||/^[.#]?[\w][\w-]+\s+\{(?:\s+[a-z][a-z-]+:\s*\S+;)+\s+[&>+]?\s+[.#:]?[\w][\w-]\s+\{/.test(a)&&/:\s*@[a-zA-Z];/.test(a)===false)return ke("scss");if(/@[a-zA-Z]:/.test(a)||/\.[a-zA-Z]\(\);/.test(a))return ke("less");return ke("css")}function e(){let v=1;let u=y;let g=false;let l=false;const t=/((public)|(private))\s+(static\s+)?(((v|V)oid)|(class)|(final))/.test(a);function O(){if(a.indexOf("(")>-1||a.indexOf("=")>-1||a.indexOf(";")>-1&&a.indexOf("{")>-1){if(r===true||/\w<\w+(,\s+\w+)*>/.test(a))return ke("typescript");if(/(?:var|let|const)\s+\w+\s*:/.test(a)||/=\s*<\w+/.test(a))return ke("typescript");return ke("javascript")}return ke("unknown")}function T(){if(/:\s*(?:number|string|boolean|any|unknown)(?:\[\])?/.test(a)||/(?:public|private)\s+/.test(a)||/(?:export|declare)\s+type\s+\w+\s*=/.test(a)||/(?:namespace|interface|enum|implements|declare)\s+\w+/.test(a)||/(?:typeof|keyof|as)\s+\w+/.test(a)||/\w+\s+as\s+\w+/.test(a)||/\[\w+(?:(?::\s*\w+)|(?:\s+in\s+\w+))\]:/.test(a)||/\):\s*\w+(?:\[\])?\s*(?:=>|\{)\s+/.test(a)||/(var|const|let)\s+\w+:\s*(string|number|boolean|string|any)(\[\])?/.test(a))return ke("typescript");if(/\s(class|var|const|let)\s+\w/.test(a)===false&&/<[a-zA-Z](?:-[a-zA-Z])?/.test(a)&&/<\/[a-zA-Z-](?:-[a-zA-Z])?/.test(a)&&(/\s?\{%/.test(a)||/{{/.test(a)))return ke("liquid");if(/^(\s*[$@])/.test(a)===false&&/([}\]];?\s*)$/.test(a)){if(/^\s*import\s+\*\s+as\s+\w+\s+from\s+['"]/.test(a)||/module\.export\s+=\s+/.test(a)||/export\s+default\s+\{/.test(a)||/[?:]\s*[{[]/.test(a)||/^(?:\s*return;?(?:\s+[{[])?)/.test(a)){return ke("javascript")}}if(/{%/.test(a)&&/{{/.test(a)&&/<\w/.test(a))return ke("liquid");if(/{\s*(?:\w|\.|@|#)+\s*\{/.test(a))return ke("less");if(/\$(\w|-)/.test(a))return ke("scss");if(/[;{:]\s*@\w/.test(a)===true)return ke("less");return ke("css")}if(v-1&&(/^(\s*[\u007b\u0024\u002e#@a-z0-9])/i.test(a)||/^(\s*\/(\*|\/))/.test(a)||/^(\s*\*\s*\{)/.test(a))&&/^(\s*if\s*\()/.test(a)===false&&/=\s*(\{|\[|\()/.test(u)===false&&(/(\+|-|=|\?)=/.test(u)===false||/\/\/\s*=+/.test(u)||/=+('|")?\)/.test(a)&&/;\s*base64/.test(a))&&/function(\s+\w+)*\s*\(/.test(u)===false)return T();return a.indexOf("{%")>-1?ke("liquid"):ke("unknown")}function _(){function v(){return /{%-?\s*(schema|for|if|unless|render|include)/.test(a)||/{%-?\s*end\w+/.test(a)||/{{-?\s*content_for/.test(a)||/{{-?\s*[a-zA-Z0-9_'".[\]]+\s*-?}}/.test(a)||/{%/.test(a)&&/%}/.test(a)&&/{{/.test(a)&&/}}/.test(a)?ke("liquid"):ke("html")}return /^(\s*)/i.test(a)||/^(\s*/i.test(a)&&/<\/ul>/i.test(a)||//.test(a)&&/<\/head>/.test(a)||/^(\s*)/i.test(a))return _();if(/^\s*@(?:charset|import|include|keyframes|media|namespace|page)\b/.test(a))return m();if(r===false&&/=(>|=|-|\+|\*)/.test(a)===false&&/^(?:\s*((if)|(for)|(function))\s*\()/.test(a)===false&&/(?:\s|;|\})((if)|(for)|(function\s*\w*))\s*\(/.test(a)===false&&p===false&&/return\s*\w*\s*(;|\})/.test(a)===false&&(a===void 0||/^(?:\s*#(?!(!\/)))/.test(a)||/\n\s*(\.|@)\w+(\(|(\s*:))/.test(a)&&/>\s*<\w/.test(a)===false||(/^\s*:root\s*\{/.test(a)||/-{2}\w+\s*\{/.test(a)||/^\s*(?:body|button|hr|section|h[1-6]|p|strong|\*)\s+\{\s+/.test(a))))return m();f=a.replace(/\[[a-zA-Z][\w-]*=['"]?[a-zA-Z][\w-]*['"]?\]/g,y).split(y);h=f.length;if(/^(\s*({{|{%|<))/.test(a))return _();if(r===true||/^(?:[\s\w-]*<)/.test(a)===false&&/(?:>[\s\w-]*)$/.test(a)===false)return e();return (/^(?:\s*<\?xml)/.test(a)||/(?:>[\w\s:]*)?<(?:\/|!|#)?[\w\s:\-[]+/.test(a)||/^\s*\s*$/.test(a))&&(/^(?:[\s\w]*<)/.test(a)||/(?:>[\s\w]*)$/.test(a))||/^(?:\s*\s*)$/i.test(a)?/^(?:[\s\w]*<)/.test(a)===false||/(?:>[\s\w]*)$/.test(a)===false?e():_():ke("unknown")}M.lexers.markup=function a(f){const{options:h}=M;const{data:p}=s;const r=h.language==="jsx"||h.language==="tsx";const m=h.language==="html"||h.language==="liquid";const e=h.markup;const _=e.attributeSortList.length;const v={end:0,index:-1,start:0,line:1};const u=f.split(y);const g=u.length;let l=0;let t=false;let O="javascript";let T=m?h.language:"html";let i=0;function j(n){if(m===true&&r===false){if(/(?:{[=#/]|%[>\]])|\}%[>\]]/.test(n))return n;if(e.delimiterSpacing===true){n=n.replace(/{[{%]-?\s*/g,k=>k.replace(/\s*$/," "));n=n.replace(/\s*-?[%}]}/g,k=>k.replace(/^\s*/," "));}return n}return n}function C(n,k,x){if(n===p){if(k.types.indexOf("end")>-1){v.end=v.end+1;}else if(k.types.indexOf("start")>-1){v.start=v.start+1;}}v.index=s.count;v.line=s.lineNumber;s.push(n,k,x);}function b(n){let k=0;let x=y;const S=/^(?:<|{%-?|{{-?)=?\s*/;if(typeof n!=="string")return y;k=n.replace(S,"%").replace(/\s+/," ").indexOf(" ");x=n.replace(S," ");x=k<0?x.slice(1,n.length-1):x.slice(1,k);if(T==="html")x=x.toLowerCase();x=x.replace(/-?[%}]}$/,y);if(x.indexOf("(")>0)x=x.slice(0,x.indexOf("("));if(x==="?xml?")return "xml";return x}function E(n,k){const x=b(n);const S=Je({begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:p.lines[s.count]>0?1:0,stack:s.structure[s.structure.length-1][0],token:``,types:"end"});C(p,S,y);if(re.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x)){do{S.begin=s.structure[s.structure.length-1][1];S.stack=s.structure[s.structure.length-1][0];S.token=``;C(p,S,y);}while(re.html.tags.has(s.structure[s.structure.length-1][0])&&(k===true&&s.structure.length>1||k===false&&`/${s.structure[s.structure.length-1][0]}`!==x))}}function Y(n){const k={begin:s.structure[s.structure.length-1][1],ender:-1,lexer:"markup",lines:s.linesSpace,stack:s.structure[s.structure.length-1][0],token:y,types:y};let x=0;let S=y;let R=y;let B=y;let P=y;let N=y;let U=false;let H=false;let G=false;let oe=false;let ce=false;let X=false;let fe=false;let I=[];let ie=[y,0];function ee(Z){const D=Z.indexOf("=");if(D>0&&(D0||D0)){return [Z.slice(0,D),Z.slice(D+1)]}return [Z,y]}function Ne(){const Z=s.count;const D=P.replace(/(\/)$/,y);const $=e.quoteConvert;let c=0;let o=0;let A=0;let w=y;let z=y;let q=[];let W=I.length;function se(){let F=Le(k.token,5);if(G===true||$==="none"||k.types.indexOf("attribute")<0||F===false&&$==="single"&&k.token.indexOf('"')<0||F===false&&$==="double"&&k.token.indexOf("'")<0){C(p,k,y);}else {let K=0;let V=false;const ne=k.token.split(y);const he=k.token.indexOf("=");const le=ne.length-1;if(J(ne[he+1],34)&&J(ne[ne.length-1],34)&&$==="single"&&F===false){C(p,k,y);}else if(J(ne[he+1],39)&&J(ne[ne.length-1],39)&&$==="double"&&F===false){C(p,k,y);}else {K=he+2;if(F===false){if($==="double"){if(k.token.slice(he+2,le).indexOf('"')>-1)V=true;ne[he+1]='"';ne[ne.length-1]='"';}else if($==="single"){if(k.token.slice(he+2,le).indexOf("'")>-1)V=true;ne[he+1]="'";ne[ne.length-1]="'";}}if(V===true||F===true){F=false;do{if(d(ne[K-1],123)&&(d(ne[K],37)||d(ne[K],123))){F=true;}else if(d(ne[K],125)&&(d(ne[K-1],37)||d(ne[K-1],125))){F=false;}if(F===true){if(d(ne[K],34)&&$==="double"){ne[K]="'";}else if(d(ne[K],39)&&$==="single"){ne[K]='"';}}else {if(d(ne[K],39)&&$==="double"){ne[K]='"';}else if(d(ne[K],34)&&$==="single"){ne[K]="'";}}K=K+1;}while(K$/,"/>");}o=I.length;A=1;if(A0){const F=[];A=0;o=0;W=I.length;do{o=0;do{w=I[o][0].split("=")[0];if(e.attributeSortList[A]===w){F.push(I[o]);I.splice(o,1);W=W-1;break}o=o+1;}while(o0){k.token=q.join(" ");se();}}t=false;if(n==="---"){N="---";B="comment";}else if(d(u[l],60)){if(d(u[l+1],47)){n=">";B="end";}else if(d(u[l+1],33)){if((u[l+2].charCodeAt(0)===100||u[l+2].charCodeAt(0)===68)&&(u[l+3].charCodeAt(0)===111||u[l+3].charCodeAt(0)===79)&&(u[l+4].charCodeAt(0)===99||u[l+4].charCodeAt(0)===67)&&(u[l+5].charCodeAt(0)===116||u[l+5].charCodeAt(0)===84)&&(u[l+6].charCodeAt(0)===121||u[l+6].charCodeAt(0)===89)&&(u[l+7].charCodeAt(0)===112||u[l+7].charCodeAt(0)===80)&&(u[l+8].charCodeAt(0)===101||u[l+8].charCodeAt(0)===69)){n=">";B="doctype";X=true;}else if(d(u[l+2],45)&&d(u[l+3],45)){n="-->";B="comment";N="";}else if(d(u[l],123)&&J(Z[0],123)&&J(n,10)&&(d(u[l+1],123)||d(u[l+1],37))){if(d(u[l+1],123)){w="}}";}else {w=u[l+1]+"}";if(V.length<1&&(I.length<1||ue(u[l-1]))){Z.pop();do{if(d(u[l],10))L=L+1;V.push(u[l]);l=l+1;}while(ln.length+1||d(Z[0],93))&&(r===false||q===0)){if(d(n,10)){if(ue(Z[Z.length-1])){do{Z.pop();l=l-1;}while(ue(Z[Z.length-1]))}break}$=Z.length;D=n.length-1;if(D>-1){do{$=$-1;if(Z[$]!==n.charAt(D))break;D=D-1;}while(D>-1)}if(D<0){if(d(Z[$],62)&&d(u[l],62)&&I.length>0){if(I[I.length-1][1]===0&&d(u[l-1],125)&&ue(u[l+1])){I[I.length-1][1]=d(u[l+1],32)?1:2;}}break}}}else if(u[l].charCodeAt(0)===w.charCodeAt(w.length-1)&&(r&&d(n,125)&&(u[l-1]!=="\\"||he()===false)||(r===false||J(n,125)))){$=0;D=w.length-1;if(D>-1){do{if(u[l-$]!==w.charAt(D))break;$=$+1;D=D-1;}while(D>-1)}if(D<0)w=y;}}l=l+1;}while(l{c=w===y?0:w.split("\n").length;return y};const L=w=>{o=w===y?0:w.split("\n").length;return y};k.begin=s.structure[s.structure.length-1][1];k.ender=s.count+3;k.stack=s.structure[s.structure.length-1][0];k.types="template_start";k.token=Z;C(p,k,"comment");S=D.replace(/^\s*/,A);S=S.replace(/\s*$/,L);k.begin=s.count;k.lines=c;k.stack="comment";k.token=S;k.types="comment";C(p,k,y);k.types="template_end";k.stack="comment";k.lines=o;k.token=$;C(p,k,y);return}k.types=B;U=(()=>{const Z=/(\/>)$/;const D=(c,o)=>{if(!re.html.tags.has(c))return false;if(c===o)return true;if(c==="dd"&&o==="dt")return true;if(c==="dt"&&o==="dd")return true;if(c==="td"&&o==="th")return true;if(c==="th"&&o==="td")return true;if(c==="colgroup"&&(o==="tbody"||o==="tfoot"||o==="thead"||o==="tr"))return true;if(c==="tbody"&&(o==="colgroup"||o==="tfoot"||o==="thead"))return true;if(c==="tfoot"&&(o==="colgroup"||o==="tbody"||o==="thead"))return true;if(c==="thead"&&(o==="colgroup"||o==="tbody"||o==="tfoot"))return true;if(c==="tr"&&o==="colgroup")return true;return false};const $=c=>{k.lines=p.lines[s.count]>0?1:0;k.token=``;k.types="end";C(p,k,y);if(c>0){do{k.begin=s.structure[s.structure.length-1][1];k.stack=s.structure[s.structure.length-1][0];k.token=``;C(p,k,y);c=c-1;}while(c>0)}k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;};if(B==="end"){const c=p.token[s.count];if(p.types[s.count-1]==="singleton"&&c.charCodeAt(c.length-2)!==47&&`/${b(c)}`===P){p.types[s.count-1]="start";}}if(T==="html"){if(d(S[0],60)&&J(S[1],33)&&J(S[1],63)&&(s.count<0||p.types[s.count].indexOf("template")<0))S=S.toLowerCase();if(re.html.tags.has(s.structure[s.structure.length-1][0])&&D(P.slice(1),s.structure[s.structure.length-2][0])){$(0);}else if(s.structure.length>3&&re.html.tags.has(s.structure[s.structure.length-1][0])&&re.html.tags.has(s.structure[s.structure.length-2][0])&&re.html.tags.has(s.structure[s.structure.length-3][0])&&D(P,s.structure[s.structure.length-4][0])){$(3);}else if(s.structure.length>2&&re.html.tags.has(s.structure[s.structure.length-1][0])&&re.html.tags.has(s.structure[s.structure.length-2][0])&&D(P,s.structure[s.structure.length-3][0])){$(2);}else if(s.structure.length>1&&re.html.tags.has(s.structure[s.structure.length-1][0])&&D(P,s.structure[s.structure.length-2][0])){$(1);}else if(D(P,s.structure[s.structure.length-1][0])){$(0);}else if(d(P[0],47)&&re.html.tags.has(s.structure[s.structure.length-1][0])&&s.structure[s.structure.length-1][0]!==P.slice(1)){E(S,false);k.begin=s.structure[s.structure.length-1][1];k.lines=s.linesSpace;k.stack=s.structure[s.structure.length-1][0];k.token=S;k.types="end";p.lines[s.count-1]=0;}if(r===false&&re.html.voids.has(P)){if(e.correct===true&&Z.test(S)===false)S=S.slice(0,S.length-1)+" />";return true}}return false})();if(re.embed("html",P)&&S.slice(S.length-2)!=="/>"||re.embed("liquid",P)&&S.slice(S.length-2)==="%}"){const Z=Le(S,3);let D=I.length-1;let $=y;let c=[];if(D>-1){do{c=ee(I[D][0]);if(c[0]==="type"){$=c[1];if($.charCodeAt(0)===34||$.charCodeAt(0)===39){$=$.slice(1,$.length-1);}break}D=D-1;}while(D>-1)}if(Z===false&&re.embed("html",P)){t=true;if($===y){O=re.html.embed[P].language;}else if(re.html.embed[P].value($)){O=re.html.embed[P].language;}}else if(Z===true&&re.embed("liquid",P)){t=true;if($===y){O=re.liquid.embed[P].language;}else {O=re.liquid.embed[P].language;}}if(t===true){D=l+1;if(D"){B="singleton";}else {B="start";}k.types=B;}if(fe&&X===false&&G&&d(n,62)&&S.slice(S.length-2)!=="/>"){const Z=[];const D=[];if(U===true){B="singleton";}else {I.forEach($=>D.push($[0]));X=true;B="ignore";l=l+1;if(l-1){do{if(J(u[l-o],$.charCodeAt(c)))break;o=o+1;c=c-1;}while(c>-1)}if(c<0)$=y;}l=l+1;}while(l",` ${D.join(" ")}>`);k.token=S;k.types="content-ignore";I=[];}if(k.types.indexOf("template")>-1){if(d(S[0],123)&&d(S[1],37)){if((P==="case"||P==="default")&&(s.structure[s.structure.length-1][0]==="switch"||s.structure[s.structure.length-1][0]==="case")){k.types="template_else";}else if(re.liquid.else.has(P)){k.types="template_else";}else {if(re.liquid.tags.has(P)){k.types="template_start";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100&&re.liquid.tags.has(P.slice(3))){k.types="template_end";}else if(P.charCodeAt(0)===101&&P.charCodeAt(1)===110&&P.charCodeAt(2)===100){k.types="template_end";k.stack=P.slice(3);let Z=0;do{if(p.types[Z]==="template"&&p.stack[Z]===k.stack){p.types[Z]="template_start";v.start=v.start+1;break}else {Z=p.stack.indexOf(k.stack,Z+1);}}while(Z>-1)}else {k.stack=P;}}}else if(k.types==="template"){if(S.indexOf("else")>2)k.types="template_else";}if(k.types==="template_start"||k.types==="template_else"){if(P===y||d(P,37)){P=P+S.slice(1).replace(P,y).replace(/^\s+/,y);P=P.slice(0,P.indexOf("(")).replace(/\s+/,y);}}if(e.quoteConvert==="double"){k.token=k.token.replace(/'/g,'"');}else if(e.quoteConvert==="single"){k.token=k.token.replace(/"/g,"'");}}if(B==="cdata"&&(k.stack==="script"||k.stack==="style")){let Z=s.count;let D=s.count;const $=k.stack;if(p.types[D]==="attribute"){do{Z=Z-1;D=D-1;}while(p.types[D]==="attribute"&&D>-1)}k.begin=Z;k.token="\s*)$/,y);C(p,k,y);s.structure.push(["cdata",s.count]);if($==="script"){M.lexers.script(S);}else {M.lexers.style(S);}k.begin=s.structure[s.structure.length-1][1];k.token="]]>";k.types="cdata_end";C(p,k,y);s.structure.pop();}else {C(p,k,P);}Ne();if(h.wrap>0&&r===true){let Z=0;let D=s.count;let $=0;if(p.types[D].indexOf("attribute")>-1){do{Z=Z+p.token[D].length+1;D=D-1;}while(p.lexer[D]!=="markup"||p.types[D].indexOf("attribute")>-1);if(p.lines[D]===1)Z=Z+p.token[D].length+1;}else if(p.lines[D]===1){Z=p.token[D].length+1;}$=D-1;if(Z>0&&p.types[$]!=="script_end"){if(p.types[$].indexOf("attribute")>-1){do{Z=Z+p.token[$].length+1;$=$-1;}while(p.lexer[$]!=="markup"||p.types[$].indexOf("attribute")>-1);if(p.lines[$]===1)Z=Z+p.token[$].length+1;}else if(p.lines[$]===1){Z=p.token[$].length+1;}}}s.linesSpace=0;}function Q(){const n=l;const k=d(p.token[s.count],123)&&r===true;let x=[];let S=y;let R=s.linesSpace;let B=y;if(t===true){if(k===true){B="script";}else if(s.structure[s.structure.length-1][1]>-1){B=b(p.token[s.structure[s.structure.length-1][1]].toLowerCase());}else if(p.begin[s.count]>1){B=b(p.token[p.begin[s.count]].toLowerCase());}else {B=b(p.token[p.begin[s.count]].toLowerCase());}}const P=p.types[s.count]==="template_start"&&p.token[s.count].indexOf("-1){do{if(u[H]!=="\\")break;G=G+1;H=H-1;}while(H>-1)}return G%2===1}if(l".indexOf(u[l-1])>-1){if(r===false||J(u[l-1],60))G="reg";}}else if((d(u[l],34)||d(u[l],39)||d(u[l],96))&&U()===false){G=u[l];}else if(d(u[l],123)&&k===true){ce=ce+1;}else if(d(u[l],125)&&k===true){if(ce===0){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);M.lexers.script(oe);s.structure[s.structure.length-1][1]+=1;if(p.types[s.count]==="end"&&p.lexer[p.begin[s.count]-1]==="script"){N.lexer="script";N.token=e.correct===true?";":"x;";N.types="separator";C(p,N,y);N.lexer="markup";}N.token="}";N.types="script_end";C(p,N,y);s.structure.pop();break}ce=ce-1;}if(Le(p.token[s.count],3)===false){H=u.slice(l,l+10).join(y).toLowerCase();if(B==="script"){H=l===g-9?H.slice(0,H.length-1):H.slice(0,H.length-2);if(H==="<\/script"){oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l-1;if(x.length<1)break;if(/^";C(p,N,y);}else {h.language=O;M.lexers.script(oe);if(O==="json"&&h.json.objectSort===true||O!=="json"&&h.script.objectSort===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}if(B==="style"){if(l===g-8){H=H.slice(0,H.length-1);}else if(l===g-9){H=H.slice(0,H.length-2);}else {H=H.slice(0,H.length-3);}if(H==="$/.test(X)){N.token="";C(p,N,y);}else {h.language=O;M.lexers.style(X);if(h.style.sortProperties===true)s.sortCorrection(0,s.count+1);h.language="html";}break}}}else {if(re.embed("liquid",B)){const X=u.slice(l).join(y);const fe=X.search(new RegExp(`{%-?\\s*end${B}`));x=x.length>0?x.concat(x,u.slice(l,l+fe)):u.slice(l,l+fe);l=l+fe;H=u.slice(l).join(y).toLowerCase();if(re.liquid.embed[B].end(H)){H=H.slice(0,H.indexOf("%}")+2);oe=x.join(y).replace(/^\s+/,y).replace(/\s+$/,y);l=l+H.length-1;if(x.length<1)break;const Oe=De[re.liquid.embed[B].language];h.language=O;M.lexers[Oe](oe);if(O==="json"&&h.json.objectSort===true||O==="javascript"&&h.script.objectSort===true||(O==="css"||O==="scss")&&h.style.sortProperties===true){s.sortCorrection(0,s.count+1);}h.language="liquid";N.token=H;N.types="template_end";C(p,N,y);}break}}}else if(G===u[l]&&(d(G,34)||d(G,39)||d(G,96)||d(G,42)&&d(u[l+1],47))&&U()===false){G=y;}else if(d(G,96)&&u[l]==="$"&&d(u[l+1],123)&&U()===false){G="}";}else if(d(G,125)&&d(u[l],125)&&U()===false){G="`";}else if(d(G,47)&&(d(u[l],10)||u[l]==="\r")){G=y;}else if(G==="reg"&&d(u[l],47)&&U()===false){G=y;}else if(d(G,47)&&d(u[l],60)&&d(u[l-1],45)&&d(u[l-2],45)){H=u.slice(l+1,l+11).join(y).toLowerCase();H=H.slice(0,H.length-2);if(B==="script"&&H==="<\/script")G=y;H=H.slice(0,H.length-1);if(B==="style"&&H==="0&&(d(u[l],60)&&J(u[l+1],61)&&!/\s|\d/.test(u[l+1])||d(u[l],91)&&d(u[l+1],37)||d(u[l],123)&&(r===true||d(u[l+1],123)||d(u[l+1],37)))){l=l-1;if(s.structure[s.structure.length-1][0]==="comment"){S=x.join(y);}else {S=x.join(y).replace(/\s+$/,y);}S=j(S);R=0;N.token=S;if(h.wrap>0&&e.preserveText===false){const{wrap:X}=h;const fe=y;const Oe=y;const I=[];let ie=X;let ee=S.length;const Ne=()=>{if(S.charCodeAt(ie)===32){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;return}do{ie=ie-1;}while(ie>0&&S.charCodeAt(ie)!==32);if(ie>0){I.push(S.slice(0,ie));S=S.slice(ie+1);ee=S.length;ie=X;}else {ie=X;do{ie=ie+1;}while(ie"&&p.token[p.begin[p.begin[s.count]]]==="
  • "&&p.lines[p.begin[s.count]]===0&&s.linesSpace===0&&S.length-1)ie=ie-1;if(p.lines[xe]>0&&p.types[xe].indexOf("attribute")<0)break;xe=xe-1;}while(xe>0&&ie>0);if(ie<1)ie=S.indexOf(" ");}S=x.join(y);S=S.replace(/^\s+/,y).replace(/\s+$/,y).replace(/\s+/g," ");do{Ne();}while(ien&&ln&&ue(u[H]))}else {s.linesSpace=0;}}else if(l!==n||l===n&&t===false){S=x.join(y).replace(/\s+$/,y);R=0;if(N.token!==S){N.token=S;C(p,N,y);s.linesSpace=0;}}t=false;}if(_>0){do{e.attributeSortList[l]=e.attributeSortList[l].replace(/^\s+/,y).replace(/\s+$/,y);l=l+1;}while(l<_);l=0;}if(h.language==="html"||h.language==="liquid")T="html";do{if(ue(u[l])){if(p.types[s.count]==="template_start"&&s.structure[s.structure.length-1][0]==="comment"){Q();}else {l=s.spacer({array:u,end:g,index:l});}}else if(t){Q();}else if(d(u[l],60)){Y(y);}else if(d(u[l],91)&&d(u[l+1],37)){Y("%]");}else if(d(u[l],123)&&(r||d(u[l+1],123)||d(u[l+1],37))){Y(y);}else if(d(u[l],45)&&d(u[l+1],45)&&d(u[l+2],45)){Y("---");}else {Q();}l=l+1;}while(lv.start){const n=v.end-v.start;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more end type${k} than start types`].join("\n");}else {const n=v.start-v.end;const k=n===1?y:"s";s.error=["Prettify Error:","",`${n} more start type${k} than end types`].join("\n");}}return p};M.beautify.markup=a=>{const f={};const h="markup";const{data:p}=s;const r=a.language==="jsx"||a.language==="tsx";const m=a.crlf===true?String.fromCharCode(13,10):String.fromCharCode(10);const e=a.markup;const _=M.end<1||M.end>p.token.length?p.token.length:M.end+1;const v={is:(j,C)=>p.types[j]===C,not:(j,C)=>p.types[j]!==C,idx:(j,C)=>j>-1&&(p.types[j]||y).indexOf(C)};const u={is:(j,C)=>p.token[j]===C,not:(j,C)=>p.token[j]!==C};let g=M.start;let l=-1;let t=0;let O=0;let T=isNaN(a.indentLevel)?0:Number(a.indentLevel);const i=(()=>{const j=M.start>0?Array(M.start).fill(0,0,M.start):[];function C(){let k=g+1;let x=0;if(v.is(k,void 0))return k-1;if(v.is(k,"comment")||g<_-1&&v.idx(k,"attribute")>-1){do{if(v.is(k,"jsx_attribute_start")){x=k;do{if(v.is(k,"jsx_attribute_end")&&p.begin[k]===x)break;k=k+1;}while(k<_)}else if(v.not(k,"comment")&&v.idx(k,"attribute")<0)return k;k=k+1;}while(k<_)}return k}function b(){const k=p.begin[g];let x=g;do{x=x-1;if(u.is(x,"
  • ")&&u.is(x-1,"")&&p.begin[p.begin[x]]===k&&p.begin[x-1]===p.begin[x]+1){x=p.begin[x];}else {return}}while(x>k+1);x=g;do{x=x-1;if(v.is(x+1,"attribute")){j[x]=-10;}else if(u.not(x,"")){j[x]=-20;}}while(x>k+1)}function E(){let k=g;let x=false;if(p.lines[g+1]===0&&e.forceIndent===false){do{if(p.lines[k]>0){x=true;break}k=k-1;}while(k>l);k=g;}else {x=true;}if(x===true){const S=v.is(t,"comment")||v.is(t,"end")||v.is(t,"template_end")?T+1:T;do{j.push(S);k=k-1;}while(k>l);if(S===T+1)j[g]=T;if(v.is(k,"attribute")||v.is(k,"template_attribute")||v.is(k,"jsx_attribute_start")){j[p.begin[k]]=S;}else {j[k]=S;}}else {do{j.push(-20);k=k-1;}while(k>l);j[k]=-20;}l=-1;}function Y(){let k=T;if(e.forceIndent===true||e.forceAttribute===true){j.push(T);return}if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&p.lines[t]>0){j.push(T);k=k+1;if(v.is(g,"singleton")&&g>0&&v.idx(g-1,"attribute")>-1&&v.is(p.begin[g-1],"singleton")){if(p.begin[g]<0||v.is(p.begin[g-1],"singleton")&&p.begin[p.ender[g]-1]!==g){j[g-1]=T;}else {j[g-1]=T+1;}}}else if(g>0&&v.is(g,"singleton")&&v.idx(g-1,"attribute")>-1){j[g-1]=T;O=p.token[g].length;j.push(-10);}else if(p.lines[t]===0){j.push(-20);}else if((a.wrap===0||g<_-2&&p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g+2]!==void 0&&p.token[g].length+p.token[g+1].length+p.token[g+2].length+1>a.wrap&&v.idx(g+2,"attribute")>-1||p.token[g]!==void 0&&p.token[g+1]!==void 0&&p.token[g].length+p.token[g+1].length>a.wrap)&&(v.is(g+1,"singleton")||v.is(g+1,"template"))){j.push(T);}else {O=O+1;j.push(-10);}if(g>0&&v.idx(g-1,"attribute")>-1&&p.lines[g]<1){j[g-1]=-20;}if(O>a.wrap){let x=g;let S=Math.max(p.begin[g],0);if(v.is(g,"content")&&e.preserveText===false){let R=0;const B=p.token[g].replace(/\s+/g,de).split(de);do{x=x-1;if(j[x]<0){R=R+p.token[x].length;if(j[x]===-10)R=R+1;}else {break}}while(x>0);x=0;S=B.length;do{if(B[x].length+R>a.wrap){B[x]=m+B[x];R=B[x].length;}else {B[x]=` ${B[x]}`;R=R+B[x].length;}x=x+1;}while(x0){O=p.token[g].length-p.token[g].lastIndexOf(m);}}else {do{x=x-1;if(j[x]>-1){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;return}if(v.idx(x,"start")>-1){O=0;return}if(p.lines[x+1]>0&&(v.not(x,"attribute")||v.is(x,"attribute")&&v.is(x+1,"attribute"))){if(v.not(x,"singleton")||v.is(x,"attribute")&&v.is(x+1,"attribute")){O=p.token[g].length;if(p.lines[g+1]>0)O=O+1;break}}}while(x>S);j[x]=k;}}}function Q(){const k=g;if(p.types[k-1]==="script_start"&&d(p.token[k-1],123)){j[k-1]=-20;}do{if(p.lexer[g+1]===h&&p.begin[g+1]a.wrap){X=G[ce].length;G[ce]=m+G[ce];}else {G[ce]=` ${G[ce]}`;X=X+G[ce].length;}ce=ce+1;}while(ce{if(v.idx(g,"start")>0){let H=g;do{if(p.types[H].indexOf("end")>0&&p.begin[H]===g){if(H<_-1&&v.idx(H+1,"attribute")>-1){R=true;break}}H=H+1;}while(H<_)}else if(g<_-1&&v.idx(g+1,"attribute")>-1){R=true;}if(v.is(t,"end")||v.is(t,"template_end")){return T+(v.is(S,"singleton")?2:1)}if(v.is(S,"singleton"))return T+1;return T})();if(R===false&&v.is(g,"comment_attribute")){j.push(T);j[S]=p.types[S]==="singleton"?T+1:T;return}if(U<1)U=1;do{O=O+p.token[g].length+1;if(p.types[g].indexOf("attribute")>0){if(p.types[g]==="template_attribute_start"){if(e.preserveAttributes===true){j.push(-10);}else {let H=1;do{if(p.lines[g]===0){j.push(-20);}else if(p.lines[g]===1){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else {j.push(U);}if(H===0)break;g=g+1;if(v.is(g,"template_attribute_start")){H=H+1;}else if(v.is(g,"template_attribute_end")){H=H-1;}P=P+1;if(p.token[g]!==void 0){O=O+p.token[g].length+1;N=N+p.token[g].length+1;}}while(g<_)}}else if(p.types[g]==="template_attribute"){if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}else if(p.types[g]==="comment_attribute"){j.push(U);}else if(p.types[g].indexOf("start")>0){B=true;if(g<_-2&&p.types[g+2].indexOf("attribute")>0){j.push(-20);g=g+1;f[g]=g;}else {if(S===g-1&&R===false){if(r){j.push(-20);}else {j.push(U);}}else {if(r){j.push(-20);}else {j.push(U+1);}}if(p.lexer[g+1]!==h){g=g+1;Q();}}}else if(p.types[g].indexOf("end")>0&&p.types[g].indexOf("template")<0){if(j[g-1]!==-20)j[g-1]=j[p.begin[g]]-1;if(p.lexer[g+1]!==h){j.push(-20);}else {j.push(U);}}else {j.push(U);}}else if(v.is(g,"attribute")){N=N+p.token[g].length+1;if(e.preserveAttributes===true){j.push(-10);}else if(e.forceAttribute===true||e.forceAttribute>=1||B===true||g<_-1&&(v.idx(g+1,"template_attribute_")>-1&&p.lines[g+1]!==-20||v.idx(g+1,"attribute")>0)){if(e.forceAttribute===false&&p.lines[g]===1){if(v.is(g+1,"template_attribute_start")&&p.lines[g+1]>1){j.push(U);}else {j.push(-10);}}else {if(e.forceAttribute===true){j.push(U);}else {j.push(-10);}}}else {j.push(-10);}}else if(p.begin[g]0&&v.idx(g,"attribute")>0&&v.not(S,"singleton")&&j[g-1]>0&&R===true){j[g-1]=j[g-1]-1;}if(j[g]!==-20){if(r===true&&v.idx(S,"start")>-1&&v.is(g+1,"script_start")){j[g]=U;}else {if(u.is(g,"/")&&j[g-1]!==10){j[g-1]=-10;}else {j[g]=j[S];}}}if(e.forceAttribute===true){O=0;j[S]=U;}else if(e.forceAttribute>=1){if(P>=e.forceAttribute){j[S]=U;let H=g-1;do{if(v.is(H,"template")&&j[H]===-10){j[H]=U;}else if(v.is(H,"attribute")&&j[H]===-10){j[H]=U;}H=H-1;}while(H>S)}else {j[S]=-10;}}else {j[S]=-10;}if(e.preserveAttributes===true||u.is(S,"<%xml%>")||u.is(S,"")){O=0;return}x=g;if(x>S+1){if(e.selfCloseSpace===false)N=N-1;if(N>a.wrap&&a.wrap>0&&e.forceAttribute===false){if(e.forceLeadAttribute===true){j[S]=U;x=x-1;}O=p.token[g].length;do{if(p.token[x].length>a.wrap&&ue(p.token[x]))k(x);if(v.idx(x,"template")>-1&&j[x]===-10){j[x]=U;}else if(v.is(x,"attribute")&&j[x]===-10){j[x]=U;}x=x-1;}while(x>S)}}else if(a.wrap>0&&v.is(g,"attribute")&&p.token[g].length>a.wrap&&ue(p.token[g])){k(g);}}do{if(p.lexer[g]===h){if(p.token[g].toLowerCase().indexOf("-1){n();}else if(v.is(g,"comment")){if(l<0)l=g;if(v.not(g+1,"comment")||g>0&&v.idx(g-1,"end")>-1)E();}else if(v.not(g,"comment")){t=C();if(v.is(t,"end")){T=T-1;if(u.is(g,"")||u.is(g,"")||u.is(g,""))b();}if(v.is(t,"template_end")){T=T-1;if(v.is(t,"template_end")&&v.is(p.begin[t]+1,"template_else"))T=T-1;}if(v.is(g,"script_end")&&v.is(t,"end")){if(p.lines[t]<1){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if((e.forceIndent===false||e.forceIndent===true&&v.is(t,"script_start"))&&(v.is(g,"content")||v.is(g,"singleton")||v.is(g,"template"))){O=O+p.token[g].length;if(v.is(g,"template")){j.push(T);const k=p.token[g].indexOf(m);if(k>0){const x=[];const S=j[g-1]*a.indentSize+p.token[g].charCodeAt(2)===45?a.indentSize:a.indentSize-1;let R=0;do{x.push(de);R=R+1;}while(R`${B}${x.join(y)}`);}}else if(p.lines[t]>0&&v.is(t,"script_start")){j.push(-10);}else if(a.wrap>0&&(v.idx(g,"template")<0||t<_&&v.idx(g,"template")>-1&&v.idx(g,"template")<0)){Y();}else if(t<_&&(v.idx(t,"end")>-1||v.idx(t,"start")>-1)&&(p.lines[t]>0||v.idx(g,"template_")>-1)){j.push(T);}else if(p.lines[t]===0){j.push(-20);}else {j.push(T);}}else if(v.is(g,"start")||v.is(g,"template_start")){T=T+1;if(v.is(g,"template_start")&&v.is(t,"template_else")){T=T+1;}if(r===true&&u.is(g+1,"{")){if(p.lines[t]===0){j.push(-20);}else if(p.lines[t]>1){j.push(T);}else {j.push(-10);}}else if(v.is(g,"start")&&v.is(t,"end")){j.push(-20);}else if(v.is(g,"start")&&v.is(t,"script_start")){j.push(-10);}else if(e.forceIndent===true){j.push(T);}else if(v.is(g,"template_start")&&v.is(t,"template_end")){j.push(-20);}else if(p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton")||v.is(g,"start")&&v.is(t,"template"))){j.push(-20);}else {j.push(T);}}else if(e.forceIndent===false&&p.lines[t]===0&&(v.is(t,"content")||v.is(t,"singleton"))){j.push(-20);}else if(v.is(g+2,"script_end")){j.push(-20);}else if(v.is(g,"template_else")){if(v.is(t,"template_end")){j[g-1]=T+1;}else {j[g-1]=T-1;}j.push(T);}else {j.push(T);}}if(v.not(g,"content")&&v.not(g,"singleton")&&v.not(g,"template")&&v.not(g,"attribute")){O=0;}}else {O=0;Q();}g=g+1;}while(g<_);return j})();return (()=>{const j=[];const C=(()=>{const k=[a.indentChar];const x=a.indentSize-1;let S=0;if(S0){B=0;do{x.push(C);B=B+1;}while(BP.trimStart());const S=i[g-1]>-1?v.is(g,"attribute")?i[g-1]+1:i[g-1]:(()=>{let P=g-1;let N=P>-1&&v.idx(P,"start")>-1;if(i[g]>-1&&v.is(g,"attribute")){return i[g]+1}do{P=P-1;if(i[P]>-1){return v.is(g,"content")&&N===false?i[P]:i[P]+1}if(v.idx(P,"start")>-1)N=true;}while(P>0);return P===-2?0:1})();let R=0;p.lines[g+1]=0;const B=k.length-1;do{if(v.is(g,"comment")){if(k[R]!==y){if(k[R+1].trimStart()!==y){j.push(k[R],b(S));}else {j.push(k[R],pe);}}else {if(k[R+1].trimStart()===y){j.push(pe);}else {j.push(b(S));}}}else {j.push(k[R]);j.push(b(S));}R=R+1;}while(R1){j.push(b(i[g]));}}function Y(){const k=/\/?>$/;const x=p.token[g];const S=k.exec(x);if(S===null)return;let R=g+1;let B=false;let P=e.selfCloseSpace===true&&S!==null&&S[0]==="/>"?de:y;p.token[g]=x.replace(k,y);do{if(v.is(R,"jsx_attribute_end")&&p.begin[p.begin[R]]===g){B=false;}else if(p.begin[R]===g){if(v.is(R,"jsx_attribute_start")){B=true;}else if(v.idx(R,"attribute")<0&&B===false){break}}else if(B===false&&(p.begin[R]-1){Y();}if(u.not(g,void 0)&&p.token[g].indexOf(m)>0&&(v.is(g,"content")&&e.preserveText===false||v.is(g,"comment")||v.is(g,"attribute"))){E();}else {j.push(p.token[g]);if(i[g]===-10&&g<_-1){j.push(de);}else if(i[g]>-1){Q=i[g];j.push(b(i[g]));}}}else {M.start=g;M.end=f[g];a.indentLevel=Q;const k=a.language;const x=d(p.token[g],123)?"liquid":"html";let S=false;if(x==="liquid"&&p.stack[g]in re[x].embed&&"language"in re[x].embed[p.stack[g]]){S=re[x].embed[p.stack[g]].language==="json";}n=M.beautify[p.lexer[g]](a).replace(we,y);j.push(n);if(n.endsWith(pe)){if(Q-1>0)j.push($e(Q-1,C));}else {if(e.forceIndent===true||i[M.iterator]>-1&&f[g]>g){j.push(b(i[M.iterator]));}}g=M.iterator;a.indentLevel=0;if(S)a.language=k;}g=g+1;}while(g<_);M.iterator=_-1;if(j[0]===m||d(j[0],32))j[0]=y;return j.join(y)})()};M.beautify.style=a=>{const f=[];const h=M.data;const p=a.crlf===true?"\r\n":"\n";const r=M.end>0?M.end+1:h.token.length;const m=a.preserveLine+1;const e=(()=>{let O=0;const T=[];do{T.push(a.indentChar);O=O+1;}while(O0?a.wrap:0;let u=M.start;let g=[y,y];function l(O){const T=[];const i=(()=>{if(u===r-1)return 1;if(h.lines[u+1]-1>m)return m;if(h.lines[u+1]>1)return h.lines[u+1]-1;return 1})();let j=0;if(O<0)O=0;do{T.push(p);j=j+1;v=_;}while(j0){j=0;do{T.push(e);j=j+1;}while(jO+1);if(E[1]>Y)Y=E[1];j.push(E);}}else if(h.types[C]==="end"){if(CO);C=j.length;if(C<2)return;do{C=C-1;if(j[C][1]0)}if(a.script.vertical===true&&a.style.compressCSS===false){u=r;do{u=u-1;if(d(h.token[u],125)||d(h.token[u],41))t();}while(u>0);u=M.start;}do{if(h.types[u]==="property")v=_+h.token[u].length;if(h.types[u+1]==="end"||h.types[u+1]==="template_end"||h.types[u+1]==="template_else"){_=_-1;}if(h.types[u]==="template"&&h.lines[u]===0){f.push(h.token[u]);if(h.types[u+1]==="template"&&h.lines[u+1]>0)l(_);}else if(h.types[u]==="template"&&h.lines[u]>0){if(h.types[u-2]!=="property"&&h.types[u-1]!=="colon"){v=_;f.push(h.token[u]);l(_);}else if(h.types[u-2]==="property"&&h.types[u-1]==="colon"&&h.types[u+1]==="separator"&&d(h.token[u+1],44)){v=v+h.token[u].length;if(v>a.wrap)l(_);f.push(h.token[u]);do{u=u+1;f.push(h.token[u]);if(h.lines[u+1]>0)l(_);}while(h.types[u]!=="separator"&&J(h.token[u],59));if(d(h.token[u],59)&&h.types[u]==="separator"){f.push(h.token[u]);if(h.lines[u+1]>0)l(_);u=u+1;continue}}else {v=v+h.token[u].length;if(a.wrap>0&&v>a.wrap){l(_);f.push(h.token[u]);}else {f.push(h.token[u]);}}}else if(h.types[u]==="template_else"){f.push(h.token[u]);_=_+1;l(_);}else if(h.types[u]==="start"||h.types[u]==="template_start"){_=_+1;f.push(h.token[u]);if(h.types[u+1]!=="end"&&h.types[u+1]!=="template_end"&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")){l(_);}}else if(d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&h.types[u+1]==="selector")||(h.types[u]==="end"||h.types[u]==="template_end"||h.types[u]==="comment")){f.push(h.token[u]);if(h.types[u+1]==="value"){if(h.lines[u+1]===1){f.push(" ");}else if(h.lines[u+1]>1){l(_);}}else if(h.types[u+1]!=="separator"){if(h.types[u+1]!=="comment"||h.types[u+1]==="comment"&&h.lines[u+1]>1){l(_);}else {f.push(" ");}}}else if(d(h.token[u],58)){f.push(h.token[u]);if(a.style.compressCSS===false)f.push(" ");}else if(h.types[u]==="selector"){if(a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);}if(h.token[u].indexOf("and(")>0){h.token[u]=h.token[u].replace(/and\(/,"and (");f.push(h.token[u]);}else if(h.token[u].indexOf("when(")>0){g=h.token[u].split("when(");f.push(g[0].replace(/\s+$/,y));l(_+1);f.push(`when (${g[1]}`);}else {f.push(h.token[u]);}if(h.types[u+1]==="start"){if(a.script.braceAllman===true){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}}else if(d(h.token[u],44)){f.push(h.token[u]);if(h.types[u+1]==="selector"||h.types[u+1]==="property"){l(_);}else if(a.style.compressCSS===false){f.push(" ");}}else if(h.stack[u]==="map"&&d(h.token[u+1],41)&&u-h.begin[u]>5){f.push(h.token[u]);l(_);}else if(h.token[u]==="x;"){l(_);}else if((h.types[u]==="variable"||h.types[u]==="function")&&a.style.classPadding===true&&h.types[u-1]==="end"&&h.lines[u]<3){f.push(p);f.push(h.token[u]);}else if(J(h.token[u],59)||d(h.token[u],59)&&(a.style.compressCSS===false||a.style.compressCSS===true&&J(h.token[u+1],125))){f.push(h.token[u]);}u=u+1;}while(u{const f=ye({},a.script);if(a.language==="json"){a.script=ye(a.script,a.json,{quoteCovert:"double"});}const h=new Set(["ActiveXObject","ArrayBuffer","AudioContext","Canvas","CustomAnimation","DOMParser","DataView","Date","Error","EvalError","FadeAnimation","FileReader","Flash","Float32Array","Float64Array","FormField","Frame","Generator","HotKey","Image","Iterator","Intl","Int16Array","Int32Array","Int8Array","InternalError","Loader","Map","MenuItem","MoveAnimation","Notification","ParallelArray","Point","Promise","Proxy","RangeError","Rectangle","ReferenceError","Reflect","RegExp","ResizeAnimation","RotateAnimation","Set","SQLite","ScrollBar","Set","Shadow","StopIteration","Symbol","SyntaxError","Text","TextArea","Timer","TypeError","URL","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakSet","Web","Window","XMLHttpRequest"]);const m=Ce(null);const e=M.data;const _="script";const v=M.scopes;const u=M.end<1||M.end>e.token.length?e.token.length:M.end+1;const g=(()=>{let t=M.start;let O=isNaN(a.indentLevel)?0:Number(a.indentLevel);let T=false;let i=false;let j="";let C="";let b=e.types[0];let E=e.token[0];const Y=[-1];const Q=[];const n=M.start>0?Array(M.start).fill(0,0,M.start):[];const k=[];const x=[[]];const S=[];const R=[];const B=[];const P=[false];const N=[];const U=[];function H(){G(false,false);const $=a.commentIndent===true?O:0;if(T===false&&/\/\u002a\s*global\s/.test(e.token[t])){const c=e.token[t].replace(/\/\u002a\s*global\s+/,"").replace(/\s*\u002a\/$/,"").split(",");let o=c.length;do{o=o-1;c[o]=c[o].replace(/\s+/g,"");if(c[o]!=="")v.push([c[o],-1]);}while(o>0)}if(e.types[t-1]==="comment"||e.types[t+1]==="comment"){n[t-1]=$;}else if(e.lines[t]<2){let c=t+1;if(e.types[c]==="comment"){do{c=c+1;}while(c0){do{o=o-1;if(v[o][1]===c){v[o][1]=t;}else if(v[o][1]0)}c=c+1;e.begin.splice(c,1);e.ender.splice(c,1);e.lexer.splice(c,1);e.lines.splice(c,1);e.stack.splice(c,1);e.token.splice(c,1);e.types.splice(c,1);o=t+1;do{e.begin[o]=t;e.stack[o]=e.stack[c];o=o+1;}while(o-1&&e.lines[t]<3){e.lines[t]=3;}}if(e.types[t+1]!=="comment")T=true;return}else if(e.token[t-1]===","){n[t-1]=$;}else if(E==="="&&e.types[t-1]!=="comment"&&/^(\/\*\*\s*@[a-z_]+\s)/.test(C)===true){n[t-1]=-10;}else if(E==="{"&&e.types[t-1]!=="comment"&&e.lines[0]<2){if(e.stack[t]==="function"){n[t-1]=$;}else {n[t-1]=/\n/.test(C)?$:-10;}}else {n[t-1]=$;}if(e.types[t+1]!=="comment")T=true;if(e.token[e.begin[t]]==="("){n.push(O+1);}else {n.push(O);}if(n[t]>-1&&e.lines[t]<3){if(e.types[t-1]==="comment"&&C.startsWith("//")){e.lines[t]=2;}else {e.lines[t]=3;}}if(a.script.commentNewline===true&&C.startsWith("//")===false&&e.lines[t]>=3){e.lines[t]=2;}}function G($,c){let o=t-1;let A=$===true?0:1;const L=x[x.length-1]===void 0?[]:x[x.length-1];const w=c===false&&e.stack[t]==="array"&&$===true&&C!=="[";if(R[R.length-1]===false||e.stack[t]==="array"&&a.script.arrayFormat==="inline"||e.stack[t]==="object"&&a.script.objectIndent==="inline"){return}R[R.length-1]=false;do{if(e.types[o]==="end"){A=A+1;}else if(e.types[o]==="start"){A=A-1;}if(e.stack[o]==="global")break;if(A===0){if(e.stack[t]==="class"||e.stack[t]==="map"||w===false&&($===false&&e.token[o]!=="("&&e.token[o]!=="x("||$===true&&e.token[o]===",")){if(e.types[o+1]==="template_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}}else if(e.stack[t]==="array"&&e.types[t]==="operator"){if(e.token[o]===",")n[o]=O;if(o===e.begin[t])break}if($===false)break}if(A<0){if(e.types[o+1]==="template_start"||e.types[o+1]==="template_string_start"){if(e.lines[o]<1){n[o]=-20;}else {n[o]=O-1;}}else if(L.length>0&&L[L.length-1]>-1){n[o]=O-1;}else {n[o]=O;}break}o=o-1;}while(o>-1)}function oe(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{let o=t;let A=false;const L=e.begin[o];do{o=o-1;if(e.lexer[o]==="markup"){A=true;break}if(e.begin[o]!==L)o=e.begin[o];}while(o>L);if(A===true){o=t;do{o=o-1;if(e.begin[o]!==L){o=e.begin[o];}else if(e.token[o]===","){n[o]=O+1;}}while(o>L);n[L]=O+1;n[t-1]=O;}else {n[t-1]=-20;}};if(C===")"&&e.token[t+1]==="."&&$[$.length-1]>-1&&e.token[$[0]]!==":"){let o=e.begin[t];let A=false;let L=false;do{o=o-1;}while(o>0&&n[o]<-9);A=n[o]===O;o=t+1;do{o=o+1;if(e.token[o]==="{"){L=true;break}if(e.begin[o]===e.begin[t+1]&&(e.types[o]==="separator"||e.types[o]==="end")){break}}while(o1){x[x.length-2].push(e.begin[t]);O=O+1;}}if(b!=="separator")fe();if(e.token[t+1]===","&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.token[e.begin[t]-1]===","&&(e.token[t+1]==="}"||e.token[t+1]==="]")&&(e.stack[t]==="object"||e.stack[t]==="array")){G(true,false);}if(e.stack[t]!=="attribute"){if(C!==")"&&C!=="x)"&&(e.lexer[t-1]!=="markup"||e.lexer[t-1]==="markup"&&e.token[t-2]!=="return")){O=O-1;}if(C==="}"&&e.stack[t]==="switch"&&a.script.noCaseIndent===false){O=O-1;}}if(C==="}"||C==="x}"){if(e.types[t-1]!=="comment"&&E!=="{"&&E!=="x{"&&b!=="end"&&b!=="string"&&b!=="number"&&b!=="separator"&&E!=="++"&&E!=="--"&&(t<2||e.token[t-2]!==";"||e.token[t-2]!=="x;"||E==="break"||E==="return")){let o=t-1;let A=false;const L=e.begin[t];const w=Q.length;do{if(e.begin[o]===L){if(e.token[o]==="="||e.token[o]===";"||e.token[o]==="x;"){A=true;}if(e.token[o]==="."&&n[o-1]>-1){R[R.length-1]=false;n[L]=O+1;n[t-1]=O;break}if(o>0&&e.token[o]==="return"&&(e.token[o-1]===")"||e.token[o-1]==="x)"||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o-1]==="}"||e.token[o-1]==="x}"||e.token[o-1]===";"||e.token[o-1]==="x;")){O=O-1;n[t-1]=O;break}if(e.token[o]===":"&&k.length===0||e.token[o]===","&&A===false){break}if(o===0||e.token[o-1]==="{"||e.token[o-1]==="x{"||e.token[o]==="for"||e.token[o]==="if"||e.token[o]==="do"||e.token[o]==="function"||e.token[o]==="while"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"||e.token[o]==="with"){if(Q[w-1]===false&&w>1&&(t===u-1||e.token[t+1]!==")"&&e.token[t+1]!=="x)")&&e.stack[t]!=="object"){O=O-1;}break}}else {o=e.begin[o];}o=o-1;}while(o>L)}Y.pop();}if(a.script.bracePadding===false&&C!=="}"&&b!=="markup"){n[t-1]=-20;}if(a.script.bracePadding===true&&b!=="start"&&E!==";"&&(n[e.begin[t]]<-9||R[R.length-1]===true)){n[e.begin[t]]=-10;n[t-1]=-10;n.push(-20);}else if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(O);}else if(e.stack[t]==="array"&&($.length>0||S[S.length-1]===true)){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if((e.stack[t]==="object"||e.begin[t]===0&&C==="}")&&$.length>0){ce();R[R.length-1]=false;n[e.begin[t]]=O+1;n[t-1]=O;n.push(-20);}else if(C===")"||C==="x)"){const o=C===")"&&E!=="("&&U.length>0?U.pop()+1:0;const A=e.token[e.begin[t]-1]==="if"?(()=>{let L=t;do{L=L-1;if(e.token[L]===")"&&n[L-1]>-1)return o}while(L>e.begin[t]);return o+5})():o;if(o>0&&(a.language!=="jsx"||a.language==="jsx"&&e.token[e.begin[t]-1]!=="render")){const L=a.wrap;const w=e.begin[t];const z=U.length;let q=t-2;if(A>L){n[e.begin[t]]=O+1;n[t-1]=O;do{if(e.begin[q]===w){if(e.token[q]==="&&"||e.token[q]==="||"){n[q]=O+1;}else if(n[q]>-1&&e.types[q]!=="comment"&&e.token[q+1]!=="."){n[q]=n[q]+1;}}else if(n[q]>-1&&e.token[q+1]!=="."){n[q]=n[q]+1;}q=q-1;}while(q>w)}else if(z>0){U[z-1]=U[z-1]+o;}}else if(C===")"&&t>e.begin[t]+2&&e.lexer[e.begin[t]+1]===_&&e.token[e.begin[t]+1]!=="function"){const L=e.begin[t]<0?0:e.begin[t];const w=a.wrap;const z=$.length;let q=0;let W=0;let se=0;let F=0;let K=0;let V=false;let ne=false;let he=O+1;let le=false;let ae=false;let je=false;if(n[L]<-9){W=L;do{W=W+1;}while(W0&&se0)se=q;W=W-1;}while(W>L&&n[W]<-9);if(e.token[W+1]===".")he=n[W]+1;if(q>w-1&&w>0&&E!=="("&&se!==-1&&R[R.length-2]===false){if(e.token[L-1]==="if"&&Q[Q.length-1]===true||e.token[L-1]!=="if"){n[L]=he;if(e.token[L-1]==="for"){W=L;do{W=W+1;if(e.token[W]===";"&&e.begin[W]===L){n[W]=he;}}while(W=w&&w>0)le=true;}else if(e.types[W]==="markup"&&ae===false){ae=true;}if(n[W]>-9&&e.token[W]!==","&&e.types[W]!=="markup"){q=0;}else {if(n[W]===-10)q=q+1;q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){le=true;}}}else {if(n[W]>-9){q=0;}else {q=q+e.token[W].length;if(q>=w&&w>0&&(V===true||ae===true)){le=true;}}}}while(W>L&&le===false);if(V===false&&e.token[e.begin[t]+1].charAt(0)==="`"){n[e.begin[t]]=-20;n[t-1]=-20;}else if((V===true||ae===true)&&q>=w&&w>0||n[L]>-9){if(je===true){he=n[L];if(e.token[L-1]==="["){W=t;do{W=W+1;if(e.types[W]==="end"||e.token[W]===","||e.token[W]===";"){break}}while(W0&&$[z-1]>W){he=he-z;}R[R.length-1]=false;W=t;do{W=W-1;if(e.begin[W]===L){if(e.token[W].indexOf("=")>-1&&e.types[W]==="operator"&&e.token[W].indexOf("!")<0&&e.token[W].indexOf("==")<0&&e.token[W]!=="<="&&e.token[W].indexOf(">")<0){q=W;do{q=q-1;if(e.begin[q]===L&&(e.token[q]===";"||e.token[q]===","||q===L)){break}}while(q>L)}else if(e.token[W]===","){n[W]=he;}else if(n[W]>-9&&ne===false&&(e.token[L-1]!=="for"||e.token[W+1]==="?"||e.token[W+1]===":")&&(e.token[e.begin[t]]!=="("||e.token[W]!=="+")){n[W]=n[W]+1;}}else if(n[W]>-9&&ne===false){n[W]=n[W]+1;}}while(W>L);n[L]=he;n[t-1]=he-1;}else {n[t-1]=-20;}if(e.token[e.begin[t]-1]==="+"&&n[e.begin[t]]>-9){n[e.begin[t]-1]=-10;}}else if(a.language==="jsx"){c();}else {n[t-1]=-20;}n.push(-20);}else if(R[R.length-1]===true){if(C==="]"&&e.begin[t]-1>0&&e.token[e.begin[e.begin[t]-1]]==="["){R[R.length-2]=false;}if(e.begin[t]-1){n[t-1]=n[e.begin[t]]-1;}else {n[t-1]=-20;}n.push(-20);}else if(e.types[t-1]==="comment"&&e.token[t-1].substring(0,2)==="//"){if(e.token[t-2]==="x}")n[t-3]=O+1;n[t-1]=O;n.push(-20);}else if(e.types[t-1]!=="comment"&&(E==="{"&&C==="}"||E==="["&&C==="]")){n[t-1]=-20;n.push(-20);}else if(C==="]"){if(Q[Q.length-1]===true&&R[R.length-1]===false&&a.script.arrayFormat!=="inline"||E==="]"&&n[t-2]===O+1){n[t-1]=O;n[e.begin[t]]=O+1;}else if(n[t-1]===-10){n[t-1]=-20;}if(e.token[e.begin[t]+1]==="function"){n[t-1]=O;}else if(Q[Q.length-1]===false){if(E==="}"||E==="x}")n[t-1]=O;let o=t-1;let A=1;do{if(e.token[o]==="]")A=A+1;if(e.token[o]==="["){A=A-1;if(A===0){if(o>0&&(e.token[o+1]==="{"||e.token[o+1]==="x{"||e.token[o+1]==="[")){n[o]=O+1;break}if(e.token[o+1]!=="["||i===false){n[o]=-20;break}break}}if(A===1&&e.token[o]==="+"&&n[o]>1){n[o]=n[o]-1;}o=o-1;}while(o>-1)}else if(a.language==="jsx"){c();}if(a.script.arrayFormat==="inline"){let o=t;const A=e.begin[t];do{o=o-1;if(e.types[o]==="end")break}while(o>A);if(o>A){n[e.begin[t]]=O+1;n[t-1]=O;}else {n[e.begin[t]]=-20;n[t-1]=-20;}}else if(n[e.begin[t]]>-1){n[t-1]=n[e.begin[t]]-1;}n.push(-20);}else if(C==="}"||C==="x}"||Q[Q.length-1]===true){if(C==="}"&&E==="x}"&&e.token[t+1]==="else"){n[t-2]=O+2;n.push(-20);}else {n.push(O);}n[t-1]=O;}else {n.push(-20);}if(e.types[t-1]==="comment")n[t-1]=O;ce();i=Q[Q.length-1];Q.pop();x.pop();S.pop();B.pop();N.pop();R.pop();P.pop();}function ce(){let $=0;const c=x[x.length-1];if(c===void 0)return;$=c.length-1;if($<1&&c[$]<0&&(C===";"||C==="x;"||C===")"||C==="x)"||C==="}"||C==="x}")){c.pop();return}if($<0||c[$]<0)return;if(C===":"){if(e.token[c[$]]!=="?"){do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1&&e.token[c[$]]!=="?")}c[$]=t;n[t-1]=O;}else {do{c.pop();$=$-1;O=O-1;}while($>-1&&c[$]>-1)}if((e.stack[t]==="array"||C===",")&&c.length<1)c.push(-1);}function X(){const $=t;do{if(e.lexer[t+1]===_&&e.begin[t+1]<$)break;if(e.token[$-1]==="return"&&e.types[t]==="end"&&e.begin[t]===$)break;n.push(0);t=t+1;}while(t0){if(e.token[c-1]==="if"){O=O-2;}else {O=O-1;}}break}}$=$-1;}while($>0&&$>c)}function Oe(){if(e.token[t+1]!==","&&C.indexOf("/>")!==C.length-2||e.token[t+1]===","&&e.token[e.begin[t]-3]!=="React"){G(false,false);}if(E==="return"||E==="?"||E===":"){n[t-1]=-10;n.push(-20);}else if(b==="start"||e.token[t-2]==="return"&&e.stack[t-1]==="method"){n.push(O);}else {n.push(-20);}}function I(){const $=x[x.length-1]===void 0?[]:x[x.length-1];function c(){const o=e.token[t+1];let A=0;let L=0;let w=t;let z=C==="+"?O+2:O;let q=0;if(a.wrap<1){n.push(-10);return}do{w=w-1;if(e.token[e.begin[t]]==="("){if(w===e.begin[t]){q=A;}if(e.token[w]===","&&e.begin[w]===e.begin[t]&&Q[Q.length-1]===true){break}}if(A>a.wrap-1)break;if(n[w]>-9)break;if(e.types[w]==="operator"&&e.token[w]!=="="&&e.token[w]!=="+"&&e.begin[w]===e.begin[t]){break}A=A+e.token[w].length;if(w===e.begin[t]&&e.token[w]==="["&&A-9)break;if(n[w]===-10)A=A+1;}while(w>0);if(q>0)q=q+o.length;A=A+o.length;L=w;if(A>a.wrap-1&&n[w]<-9){do{L=L-1;}while(L>0&&n[L]<-9)}if(e.token[L+1]==="."&&e.begin[t]<=e.begin[L]){z=z+1;}else if(e.types[L]==="operator"){z=n[L];}L=o.length;if(A+L0){w=a.wrap-q;}else {w=a.wrap-A;}if(w>0&&w<5){n.push(z);if(e.token[t].charAt(0)==='"'||e.token[t].charAt(0)==="'"){t=t+1;n.push(-10);}return}if(e.token[e.begin[t]]!=="("||q>a.wrap-1||q===0){if(q>0)A=q;if(A-o.lengtha.wrap-4){n.push(z);return}n.push(-10);return}n.push(z);return}n.push(-10);}fe();if($.length>0&&$[$.length-1]>-1&&e.stack[t]==="array"){S[S.length-1]=true;}if(C!==":"){if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&R.length>0){G(true,false);}if(C!=="?"&&e.token[$[$.length-1]]==="."){let o=0;let A=t;const L=e.begin[A];do{if(e.begin[A]===L){if(e.token[A+1]==="{"||e.token[A+1]==="["||e.token[A]==="function"){break}if(e.token[A]===","||e.token[A]===";"||e.types[A]==="end"||e.token[A]===":"){$.pop();O=O-1;break}if(e.token[A]==="?"||e.token[A]===":"){if(e.token[$[$.length-1]]==="."&&o<2)$[$.length-1]=L+1;break}if(e.token[A]===".")o=o+1;}A=A+1;}while(A-1&&n[o]<-9);$.push(t);O=O+1;if(n[o]===O&&e.token[o+1]!==":"){O=O+1;$.push(t);}n[t-1]=O;if(e.token[e.begin[t]]==="("&&($.length<2||$[0]===$[1])){R[R.length-1]=false;if(t-2===e.begin[t]){n[e.begin[t]]=O-1;}else {n[e.begin[t]]=O;}o=t-2;do{if(e.types[o]==="end"&&n[o-1]>-1)break;if(n[o]>-1)n[o]=n[o]+1;o=o-1;}while(o>e.begin[t])}}n.push(-10);return}if(C===":"){if(e.stack[t]==="map"||e.types[t+1]==="type"||e.types[t+1]==="type_start"){n[t-1]=-20;n.push(-10);return}if(k.length>0&&e.begin[k[k.length-1]]===e.begin[t]){let o=t;const A=e.begin[t];do{o=o-1;if(e.begin[o]===A){if(e.token[o]===","||e.token[o]===";"){n[t-1]=-20;break}if(e.token[o]==="?"){k.pop();ce();if(a.script.ternaryLine===true)n[t-1]=-10;n.push(-10);return}}else if(e.types[o]==="end"){o=e.begin[o];}}while(o>A)}if(e.token[t-2]==="where"&&e.stack[t-2]===e.stack[t]){n[t-1]=-10;n.push(-10);return}if(b==="reference"&&e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("){n[t-1]=-20;n.push(-10);return}if((E===")"||E==="x)")&&e.token[e.begin[t-1]-2]==="function"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="attribute"){n[t-1]=-20;n.push(-10);return}if(e.token[e.begin[t]]!=="("&&e.token[e.begin[t]]!=="x("&&(b==="reference"||E===")"||E==="]"||E==="?")&&(e.stack[t]==="map"||e.stack[t]==="class"||e.types[t+1]==="reference")&&(k.length===0||k[k.length-1]-1||e.types[t-2]==="word"&&e.stack[t]!=="switch")){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="switch"&&(k.length<1||k[k.length-1]0){n[t-1]=O;}else {n[t-1]=-10;}n.push(-10);return}if(C==="++"||C==="--"){if(b==="number"||b==="reference"){n[t-1]=-20;n.push(-10);}else if(t-1&&(/\d/.test(o.charAt(1))===true||o.charAt(1)==="."||o.charAt(1)==="-"||o.charAt(1)==="+")){n.push(-20);return}}return c()}if(e.types[t-1]!=="comment"){if(E==="("){n[t-1]=-20;}else if(C==="*"&&e.stack[t]==="object"&&e.types[t+1]==="reference"&&(E==="{"||E===",")){n[t-1]=O;}else if(C!=="?"||k.length===0){n[t-1]=-10;}}if(C.indexOf("=")>-1&&C!=="=="&&C!=="==="&&C!=="!="&&C!=="!=="&&C!==">="&&C!=="<="&&C!=="=>"&&e.stack[t]!=="method"&&e.stack[t]!=="object"){let o=t+1;let A=0;let L=false;let w="";if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&e.token[t+1]!=="function"){return}do{if(e.types[o]==="start"){if(L===true&&e.token[o]!=="["){if(P[P.length-1]===true){P[P.length-1]=false;}break}A=A+1;}if(e.types[o]==="end")A=A-1;if(A<0){if(P[P.length-1]===true){P[P.length-1]=false;}break}if(A===0){w=e.token[o];if(L===true){if(e.types[o]==="operator"||e.token[o]===";"||e.token[o]==="x;"||e.token[o]==="?"||e.token[o]==="var"||e.token[o]==="let"||e.token[o]==="const"){if(w!==void 0&&(w==="?"||w.indexOf("=")>-1&&w!=="=="&&w!=="==="&&w!=="!="&&w!=="!=="&&w!==">="&&w!=="<=")){if(P[P.length-1]===false){P[P.length-1]=true;}}if((w===";"||w==="x;"||w==="var"||w==="let"||w==="const")&&P[P.length-1]===true){P[P.length-1]=false;}break}if(P[P.length-1]===true&&(w==="return"||w==="break"||w==="continue"||w==="throw")){P[P.length-1]=false;}}if(w===";"||w==="x;"||w===",")L=true;}o=o+1;}while(o{let c=e.begin[t];if(c<0){v.push([e.token[t],-1]);}else {if(e.stack[c+1]!=="function"){do{c=e.begin[c];}while(c>-1&&e.stack[c+1]!=="function")}v.push([e.token[t],c]);}};if(e.types[t-1]==="comment"){n[t-1]=O;}else if(b==="end"&&E!==")"&&e.token[e.begin[t-1]-1]!==")"){n[t-1]=-10;}else if(b!=="separator"&&b!=="start"&&b!=="end"&&b.indexOf("template_string")<0){if(b==="word"||b==="operator"||b==="property"||b==="type"||b==="reference"){n[t-1]=-10;}else {n[t-1]=-20;}}if(E==="var"&&e.lexer[t-1]===_){$();}else if(E==="function"){v.push([e.token[t],t]);}else if(E==="let"||E==="const"){v.push([e.token[t],t]);}else if(e.stack[t]==="arguments"){v.push([e.token[t],t]);}else if(E===","){let c=t;do{c=c-1;}while(c>e.begin[t]&&e.token[c]!=="var"&&e.token[c]!=="let"&&e.token[c]!=="const");if(e.token[c]==="var"){$();}else if(e.token[c]==="let"||e.token[c]==="const"){v.push([e.token[t],t]);}}n.push(-10);}function ee(){const $=x[x.length-1]===void 0?[]:x[x.length-1];const c=()=>{if(a.script.methodChain>0){let o=t;let A=e.begin[t];const L=[t];const w=e.token[A-1]==="if";do{o=o-1;if(e.types[o]==="end")o=e.begin[o];if(e.begin[o]===A){if(e.types[o]==="string"&&e.token[o].indexOf("${")===e.token[o].length-2){break}if(e.token[o]==="."){if(n[o-1]>0){n[t-1]=w===true?O+1:O;return}L.push(o);}else if(e.token[o]===";"||e.token[o]===","||e.types[o]==="operator"||(e.types[o]==="word"||e.types[o]==="reference")&&(e.types[o-1]==="word"||e.types[o-1]==="reference")){break}}}while(o>A);if(L.length-1)n[o]=n[o]+1;o=o+1;}while(o0){if(e.stack[t]==="object"||e.stack[t]==="array"){G(true,false);}else {G(false,false);}}if(a.script.methodChain===0){n[t-1]=-20;}else if(a.script.methodChain<0){if(e.lines[t]>0){c();}else {n[t-1]=-20;}}else {c();}n.push(-20);return}if(C===","){fe();if(Q[Q.length-1]===false&&(e.stack[t]==="object"||e.stack[t]==="array"||e.stack[t]==="paren"||e.stack[t]==="expression"||e.stack[t]==="method")){Q[Q.length-1]=true;if(e.token[e.begin[t]]==="("){let o=t;do{o=o-1;if(e.begin[o]===e.begin[t]&&e.token[o]==="+"&&n[o]>-9){n[o]=n[o]+2;}}while(o>e.begin[t])}}if(e.stack[t]==="array"&&a.script.arrayFormat==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="array"&&a.script.arrayFormat==="inline"){n[t-1]=-20;n.push(-10);return}if(e.stack[t]==="object"&&a.script.objectIndent==="indent"){n[t-1]=-20;n.push(O);return}if(e.stack[t]==="object"&&a.script.objectIndent==="inline"){n[t-1]=-20;n.push(-10);return}if($.length>0){if($[$.length-1]>-1)ce();n[t-1]=-20;n.push(O);return}if(e.token[t-2]===":"&&e.token[t-4]==="where"){n[t-1]=-20;n.push(-10);return}n[t-1]=-20;if(e.types[t+1]!=="end"){B[B.length-1]=B[B.length-1]+1;}if((e.token[e.begin[t]]==="("||e.token[e.begin[t]]==="x(")&&a.language!=="jsx"&&e.stack[t]!=="global"&&(e.types[t-1]!=="string"&&e.types[t-1]!=="number"||e.token[t-2]!=="+"||e.types[t-1]==="string"&&e.types[t-1]!=="number"&&e.token[t-2]==="+"&&e.types[t-3]!=="string"&&e.types[t-3]!=="number")){n.push(-10);return}if(b==="reference"&&e.types[t-2]==="word"&&"var-let-const-from".indexOf(e.token[t-2])<0&&(e.types[t-3]==="end"||e.token[t-3]===";")){N[N.length-1]=true;n.push(-10);return}if(N[N.length-1]===true||e.stack[t]==="notation"){n.push(-10);return}if(B[B.length-1]>3&&(e.stack[t]==="array"||e.stack[t]==="object")){if(R[R.length-1]===true)G(true,true);n[t-1]=-20;if(S[S.length-1]===true){n.push(O);return}const o=e.begin[t];let A=t;do{if(e.types[A]==="end"){A=e.begin[A];}else {if(e.token[A]===","&&e.types[A+1]!=="comment"){n[A]=O;}}A=A-1;}while(A>o);n[o]=O;S[S.length-1]=true;return}if(e.stack[t]==="object"){if(R[R.length-1]===true&&e.types[e.begin[t]-1]!=="word"&&e.types[e.begin[t]-1]!=="reference"&&e.token[e.begin[t]-1]!=="("&&e.token[e.begin[t]-1]!=="x("){const o=e.begin[t];let A=t-1;do{if(e.begin[A]===o){if(e.token[A]===",")break;if(e.token[A]===":"){G(true,false);break}}A=A-1;}while(A>o)}}if(R[R.length-1]===false||e.token[t-2]==="+"&&(b==="string"||b==="number")&&n[t-2]>0&&(E.charAt(0)==='"'||E.charAt(0)==="'")){if(e.stack[t]==="method"){if(e.token[t-2]==="+"&&(E.charAt(0)==='"'||E.charAt(0)==="'")&&(e.token[t-3].charAt(0)==='"'||e.token[t-3].charAt(0)==="'")){n.push(O+2);return}if(e.token[t-2]!=="+"){n.push(-10);return}}n.push(O);return}if(R[R.length-1]===true&&e.stack[t]!=="object"){n.push(-10);return}if(B[B.length-1]<4&&(e.stack[t]==="array"||e.stack[t]==="object")){n.push(-10);return}n.push(O);return}if(C===";"||C==="x;"){fe();if(e.token[t+1]!==void 0&&e.types[t+1].indexOf("attribute")>0&&e.types[t+1].indexOf("end")>0){n[t-1]=-20;n.push(O-1);return}if(Y[Y.length-1]>-1&&e.stack[Y[Y.length-1]]!=="expression"){let o=t;do{o=o-1;if(e.token[o]===";")break;if(e.token[o]===","){O=O-1;break}if(e.types[o]==="end")o=e.begin[o];}while(o>0&&o>e.begin[t])}Y[Y.length-1]=-1;ce();if(e.token[e.begin[t]-1]!=="for")G(false,false);N[N.length-1]=false;n[t-1]=-20;if(e.begin[t]>0&&e.token[e.begin[t]-1]==="for"&&e.stack[t]!=="for"){n.push(-10);return}n.push(O);return}n.push(-20);}function Ne(){const $=e.stack[t+1];const c=t===0?e.stack[t]:e.stack[t-1];if(E===")"||(c==="object"||c==="array")&&E!=="]"){if($!=="method"||$==="method"&&e.token[t+1]!==")"&&e.token[t+2]!==")"){if(E===")"&&($!=="function"||e.token[e.begin[e.begin[t-1]-1]]==="("||e.token[e.begin[e.begin[t-1]-1]]==="x(")){G(false,false);}else if(e.types[t+1]!=="end"&&e.types[t+2]!=="end"){G(true,false);}}}Q.push(false);x.push([]);P.push(false);S.push(false);N.push(false);B.push(0);if(a.script.neverFlatten===true||$==="array"&&a.script.arrayFormat==="indent"||$==="attribute"||b==="generic"||$==="class"&&E!=="("&&E!=="x("||C==="["&&e.token[t+1]==="function"){R.push(false);}else {if($==="expression"||$==="method"){R.push(true);}else if(($==="object"||$==="class")&&(E==="("||E==="x("||b==="word"||b==="reference")){R.push(true);}else if($==="array"||C==="("||C==="x("){R.push(true);}else if(C==="{"&&$==="object"&&b!=="operator"&&b!=="start"&&b!=="string"&&b!=="number"&&c!=="object"&&c!=="array"&&t>0){R.push(true);}else {R.push(false);}}if(C!=="("&&C!=="x("&&e.stack[t+1]!=="attribute"){O=O+1;}if(C==="{"||C==="x{"){Y.push(-1);if(e.types[t-1]!=="comment"){if(b==="markup"){n[t-1]=O;}else if(a.script.braceAllman===true&&b!=="operator"&&E!=="return"){n[t-1]=O-1;}else if(e.stack[t+1]!=="block"&&($==="function"||E===")"||E==="x)"||E===","||E==="}"||b==="markup")){n[t-1]=-10;}else if(E==="{"||E==="x{"||E==="["||E==="}"||E==="x}"){n[t-1]=O-1;}}if($==="object"){if(a.script.objectIndent==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.objectIndent==="inline"){R[R.length-1]=true;n.push(-20);return}}if($==="switch"){if(a.script.noCaseIndent===true){n.push(O-1);return}O=O+1;n.push(O);return}if(R[R.length-1]===true){if(b!=="word"&&b!=="reference"){n.push(-20);return}}n.push(O);return}if(C==="("||C==="x("){if(a.wrap>0&&C==="("&&e.token[t+1]!==")"){U.push(1);}if(E==="-"&&(e.token[t-2]==="("||e.token[t-2]==="x(")){n[t-2]=-20;}if(b==="end"&&c!=="if"&&c!=="for"&&c!=="catch"&&c!=="else"&&c!=="do"&&c!=="try"&&c!=="finally"&&c!=="catch"){if(e.types[t-1]==="comment"){n[t-1]=O;}else {n[t-1]=-20;}}if(E==="async"){n[t-1]=-10;}else if($==="method"||e.token[t-2]==="function"&&b==="reference"){if(E==="import"||E==="in"||a.script.functionNameSpace===true){n[t-1]=-10;}else if(E==="}"&&e.stack[t-1]==="function"||b==="word"||b==="reference"||b==="property"){n[t-1]=-20;}else if(c!=="method"&&$!=="method"){n[t-1]=O;}}if(E==="+"&&(e.token[t-2].charAt(0)==='"'||e.token[t-2].charAt(0)==="'")){n.push(O);return}if(E==="}"||E==="x}"){n.push(-20);return}if(E==="-"&&(t<2||e.token[t-2]!==")"&&e.token[t-2]!=="x)"&&e.token[t-2]!=="]"&&e.types[t-2]!=="reference"&&e.types[t-2]!=="string"&&e.types[t-2]!=="number")||a.script.functionSpace===false&&E==="function"){n[t-1]=-20;}n.push(-20);return}if(C==="["){if(E==="[")Q[Q.length-2]=true;if(E==="return"||E==="var"||E==="let"||E==="const"){n[t-1]=-10;}else if(e.types[t-1]!=="comment"&&e.stack[t-1]!=="attribute"&&(b==="end"||b==="word"||b==="reference")){n[t-1]=-20;}else if(E==="["||E==="{"||E==="x{"){n[t-1]=O-1;}if(e.stack[t]==="attribute"){n.push(-20);return}if(a.script.arrayFormat==="indent"){R[R.length-1]=false;n.push(O);return}if(a.script.arrayFormat==="inline"){R[R.length-1]=true;n.push(-20);return}if($==="method"||R[R.length-1]===true){n.push(-20);return}let o=t+1;do{if(e.token[o]==="]"){n.push(-20);return}if(e.token[o]===","){n.push(O);return}o=o+1;}while(o0){n[t-1]=O;}}function We(){if(j==="template_else"){n[t-1]=O-1;n.push(O);}else if(j==="template_start"){O=O+1;if(e.lines[t-1]<1)n[t-1]=-20;if(e.lines[t]>0||E.length===1&&b==="string"){n.push(O);}else {n.push(-20);}}else if(j==="template_end"){O=O-1;if(b==="template_start"||e.lines[t-1]<1){n[t-1]=-20;}else {n[t-1]=O;}if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}else if(j==="template"){if(e.lines[t]>0){n.push(O);}else {n.push(-20);}}}function ze(){if(j==="template_string_start"){O=O+1;n.push(O);}else if(j==="template_string_else"){fe();n[t-1]=O-1;n.push(O);}else {fe();O=O-1;n[t-1]=O;n.push(-10);}if(t>2&&(e.types[t-2]==="template_string_else"||e.types[t-2]==="template_string_start")){if(a.script.bracePadding===true){n[t-2]=-10;n[t-1]=-10;}else {n[t-2]=-20;n[t-1]=-20;}}}function Z(){if(e.token[t-1]===","||e.token[t-1]===":"&&e.stack[t-1]!=="data_type"){n[t-1]=-10;}else {n[t-1]=-20;}if(e.types[t]==="type"||e.types[t]==="type_end"){n.push(-10);}if(e.types[t]==="type_start"){n.push(-20);}}function D(){if((E===")"||E==="x)")&&e.stack[t]==="class"&&(e.token[e.begin[t-1]-1]==="static"||e.token[e.begin[t-1]-1]==="final"||e.token[e.begin[t-1]-1]==="void")){n[t-1]=-10;n[e.begin[t-1]-1]=-10;}if(E==="]")n[t-1]=-10;if(C==="else"&&E==="}"){if(e.token[t-2]==="x}")n[t-3]=n[t-3]-1;if(a.script.braceAllman===true||a.script.elseNewline===true){n[t-1]=O;}}if(C==="new"&&h.has(e.token[t+1]));if(C==="from"&&b==="end"&&t>0&&(e.token[e.begin[t-1]-1]==="import"||e.token[e.begin[t-1]-1]===",")){n[t-1]=-10;}if(C==="function"){if(a.script.functionSpace===false&&t1){if(e.types[t-2]==="operator"||e.token[t-2]===","){n[t-1]=-20;}else if(e.types[t-2]==="start"){n[t-2]=-20;n[t-1]=-20;}}else if(C==="while"&&(E==="}"||E==="x}")){let $=t-1;let c=0;do{if(e.token[$]==="}"||e.token[$]==="x}")c=c+1;if(e.token[$]==="{"||e.token[$]==="x{")c=c-1;if(c===0){if(e.token[$-1]==="do"){n[t-1]=-10;break}n[t-1]=O;break}$=$-1;}while($>-1)}else if(C==="in"||(C==="else"&&a.script.elseNewline===false&&a.script.braceAllman===false||C==="catch")&&(E==="}"||E==="x}")){n[t-1]=-10;}else if(C==="var"||C==="let"||C==="const"){Y[Y.length-1]=t;if(b==="end")n[t-1]=O;if(e.token[e.begin[t]-1]!=="for"){let $=t+1;let c=0;do{if(e.types[$]==="end")c=c-1;if(e.types[$]==="start")c=c+1;if(c<0||c===0&&(e.token[$]===";"||e.token[$]===",")){break}$=$+1;}while($0&&e.token[t]!==")"){if(e.types[t]==="comment"&&U[U.length-1]>-1){U[U.length-1]=a.wrap+1;}else if(n[t]>-1||e.token[t].charAt(0)==="`"&&e.token[t].indexOf(pe)>0){U[U.length-1]=-1;}else if(U[U.length-1]>-1){U[U.length-1]=U[U.length-1]+e.token[t].length;if(n[t]===-10)U[U.length-1]=U[U.length-1]+1;}}}else {X();}t=t+1;}while(t{const t=[];const O=(()=>{const n=[];const k=a.indentChar;let x=a.indentSize;if(typeof x!=="number"||x<1)return "";do{n.push(k);x=x-1;}while(x>0);return n.join("")})();const T=a.crlf===true?"\r\n":pe;const i=a.preserveLine+1;const j=["x;","x}","x{","x(","x)"];let C=M.start;let b="";let E=a.indentLevel;function Y(n){const k=[];const x=(()=>{if(C===u-1)return 1;if(e.lines[C+1]-1>i)return i;if(e.lines[C+1]>1)return e.lines[C+1]-1;return 1})();let S=0;if(n<0)n=0;do{k.push(T);S=S+1;}while(S0){S=0;do{k.push(O);S=S+1;}while(S-1&&e.types[B]!=="comment"){if(e.token[B+1]==="."){S=S+a.indentSize*a.indentChar.length;}break}}else if(g[B]>-1){break}if(e.types[B]!=="comment"){if(g[B-1]===-10)S=S+1;S=e.token[B].length+S;}B=B-1;}while(B>N);P=B;if(e.token[P]===","&&e.token[R+1]==="="){do{if(e.types[P]==="end")P=e.begin[P];if(e.begin[P]===N){if(e.token[P]===";"||e.token[P]==="x;")break;if(e.token[P]==="var"||e.token[P]==="const"||e.token[P]==="let"){S=S+a.indentSize*a.indentChar.length;break}}P=P-1;}while(P>N)}if(S>x)x=S;U.push([R,S]);R=B;}else if(e.types[R]==="end"){R=e.begin[R];}R=R-1;}while(R>N);R=U.length;if(R>0){do{R=R-1;B=U[R][1];if(B0)}};C=u;do{C=C-1;if(e.lexer[C]==="script"){if(e.token[C]==="}"&&e.token[C-1]!=="{"&&g[e.begin[C]]>0){n(C);}}else {C=e.begin[C];}}while(C>0)}C=M.start;do{if(e.lexer[C]===_||M.beautify[e.lexer[C]]===void 0){if(e.types[C]==="comment"&&a.commentIndent===true){if(/\n/.test(e.token[C])){const n=e.begin[C]>-1?e.token[C].charAt(2)==="*"?$e(g[C],O)+a.indentChar:$e(g[C],O):a.indentChar;const k=e.token[C].split(/\n/);let x=1;do{k[x]=n+k[x].trimStart();x=x+1;}while(x-1){if((g[C]>-1&&e.token[C]==="{"||g[C]>-1&&e.token[C+1]==="}")&&e.lines[C]<3&&a.script.braceNewline===true){if(e.lines[C+1]<3)t.push(Y(0));}t.push(Y(g[C]));E=g[C];}else if(g[C]===-10){t.push(de);if(e.lexer[C+1]!==_)E=E+1;}}else {if(m[C]===C){t.push(e.token[C]);}else {M.end=m[C];M.start=C;a.indentLevel=E;b=M.beautify[e.lexer[C]](a).replace(we,y);t.push(b);C=M.iterator;if(g[C]===-10){t.push(de);}else if(g[C]>-1){t.push(Y(g[C]));}a.indentLevel=0;}}C=C+1;}while(C" instead of "/>".',lexer:"markup",type:"boolean"},classPadding:{description:"Inserts new line characters between every CSS code block.",default:false,type:"boolean",lexer:"style"},sortSelectors:{default:false,type:"boolean",description:"If comma separated CSS selectors should present on a single line of code.",lexer:"style"},sortProperties:{lexer:"style",description:"This option will alphabetically sort CSS properties contained within classes.",default:false,type:"boolean"},noLeadZero:{lexer:"style",description:"This will eliminate leading zeros from numbers expressed within values.",default:false,type:"boolean"},compressCSS:{lexer:"style",description:"If CSS should be beautified in a style where the properties and values are minifed for faster reading of selectors.",default:false,type:"boolean"},forceValue:{lexer:"style",description:"If CSS selector property values should be indented onto newlines",default:"preserve",type:"select",values:[{rule:"preserve",description:"Preserves property values, output does not augment provided structures"},{rule:"collapse",description:"Collapsed all selector property values onto newlines"},{rule:"wrap",description:"Collapase only selector property values which exceed wrap limit"}]},braceAllman:{lexer:"script",default:false,description:'Determines if opening curly braces will exist on the same line as their condition or be forced onto a new line, otherwise known as "Allman Style" indentation.',type:"boolean"},bracePadding:{default:false,description:"This will create a newline before and after objects values",type:"boolean",lexer:"script"},braceNewline:{default:false,description:"If true an empty line will be inserted after opening curly braces and before closing curly braces.",type:"boolean",lexer:"script"},braceStyle:{default:"none",description:"Emulates JSBeautify's brace_style option using existing Prettify options",type:"select",lexer:"script",values:[{rule:"none",description:"Ignores this option"},{rule:"collapse",description:"Sets formatObject to indent and neverflatten to true."},{rule:"collapse-preserve-inline",description:"Sets formatObject to inline and bracePadding to true"},{rule:"expand",description:"Sets objectIndent to indent and braceNewline + neverflatten to true."}]},arrayFormat:{lexer:"script",description:"Determines if all array indexes should be indented, never indented, or left to the default",type:"select",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},objectSort:{default:false,description:"This option will alphabetically sort object properties in JSON objects",type:"boolean",lexer:"script"},objectIndent:{description:"This option will alphabetically sort object properties in JSON objects",type:"select",lexer:"script",default:"default",values:[{rule:"default",description:"Default formatting"},{rule:"indent",description:"Always indent each index of an array"},{rule:"inline",description:"Ensure all array indexes appear on a single line"}]},functionSpace:{lexer:"script",default:true,type:"boolean",description:"Inserts a space following the function keyword for anonymous functions."},functionNameSpace:{lexer:"script",default:true,type:"boolean",description:"If a space should follow a JavaScript function name."},methodChain:{lexer:"script",default:-1,description:"When to break consecutively chained methods and properties onto separate lines. A negative value disables this option. A value of 0 ensures method chainsare never broken.",type:"number"},caseSpace:{default:false,type:"boolean",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation thereby keeping the case on a single line of code.",lexer:"script"},inlineReturn:{lexer:"script",default:true,type:"boolean",description:"Inlines return statements contained within `if` and `else` conditions. This rules also augments code and will reason about your structure to output the best and most readable results."},elseNewline:{lexer:"script",default:false,type:"boolean",description:'If keyword "else" is forced onto a new line.'},ternaryLine:{lexer:"script",description:"If ternary operators in JavaScript `?` and `:` should remain on the same line.",type:"boolean",default:false},neverFlatten:{lexer:"script",default:true,description:"If destructured lists in script should never be flattend.",type:"boolean"},variableList:{lexer:"script",description:"If consecutive JavaScript variables should be merged into a comma separated list or if variables in a list should be separated. each \u2014 Ensure each reference is a single declaration statement.",type:"select",default:"none",values:[{rule:"none",description:"Ignores this option"},{rule:"each",description:"Ensure each reference is a single declaration statement"},{rule:"list",description:"Ensure consecutive declarations are a comma separated list"}]},vertical:{lexer:"script",description:"If lists of assignments and properties should be vertically aligned",type:"boolean",default:false},noCaseIndent:{lexer:"script",description:"If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation, thereby keeping the case on a single line of code.",default:false,type:"boolean"},noSemicolon:{lexer:"script",description:"Removes semicolons that would be inserted by ASI. This option is in conflict with option `attemptCorrection` and takes precedence over conflicting features. Use of this option is a possible security/stability risk.",default:false,type:"boolean"},endComma:{description:"If there should be a trailing comma in arrays and objects.",type:"select",lexer:"script",default:"none",values:[{rule:"none",description:"Ignore this option"},{rule:"always",description:"Always ensure there is a tailing comma"},{rule:"never",description:"Remove trailing commas"}]}};var lt={};at(lt,{format:()=>Fe,formatSync:()=>ht,language:()=>qe,options:()=>Ie,parse:()=>rt});function st(a){const f=a.source.search(et);const h=a.source.search(tt);const p=Re(Se);const r=p.length;let m=0;if(h>-1&&a.source.slice(0,h).trimStart()===y)return false;if(f>-1&&(f===0||`"':`.indexOf(a.source.charAt(f-1))<0)){let n=function(){if(g.charAt(t-1)!=="\\")return false;let k=t;do{k=k-1;}while(k>0&&g.charAt(k)==="\\");return (t-k)%2===0};const v=[];const u=f;const g=a.source;const l=g.length;let t=u;let O=0;let T=y;let i=y;let j=y;let C=y;let b=[];let E=[];let Y;let Q;if(g.charAt(t)==="<"){Q="")break;if(Q==="//"&&g.charAt(t)==="\n")break;if(Q==="/*"&&g.slice(t-1,t+1)==="*/")break;if(Q.charCodeAt(1)===37&&g.slice(t-1,t+1)==="%"&&g.indexOf("endcomment",g.indexOf("{%",Y))>0)break}else if(g.charAt(t)===T&&T!=="${"){T=y;}else if(T==="`"&&g.slice(t,t+2)==="${"){T="${";}else if(T==="${"&&g.charAt(t)==="}"){T="`";}}t=t+1;}while(t0){T=g.slice(O,t+1);if(Q==="