(()=>{var Dn=Object.defineProperty;var Pt=Object.getOwnPropertySymbols;var Mn=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable;var Bt=Math.pow,Ut=(s,G,N)=>G in s?Dn(s,G,{enumerable:!0,configurable:!0,writable:!0,value:N}):s[G]=N,pt=(s,G)=>{for(var N in G||(G={}))Mn.call(G,N)&&Ut(s,N,G[N]);if(Pt)for(var N of Pt(G))Pn.call(G,N)&&Ut(s,N,G[N]);return s};(()=>{var s=Object.create,G=Object.defineProperty,N=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,p=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,l=(f,B)=>()=>(B||f((B={exports:{}}).exports,B),B.exports),H=(f,B,Q,ee)=>{if(B&&typeof B=="object"||typeof B=="function")for(let ne of m(B))!w.call(f,ne)&&ne!==Q&&G(f,ne,{get:()=>B[ne],enumerable:!(ee=N(B,ne))||ee.enumerable});return f},P=(f,B,Q)=>(Q=f!=null?s(p(f)):{},H(B||!f||!f.__esModule?G(Q,"default",{value:f,enumerable:!0}):Q,f)),W=l((f,B)=>{function Q(n){return n instanceof Map?n.clear=n.delete=n.set=function(){throw new Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=function(){throw new Error("set is read-only")}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach(v=>{let j=n[v],Z=typeof j;(Z==="object"||Z==="function")&&!Object.isFrozen(j)&&Q(j)}),n}var ee=class{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function ne(n){return n.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ie(n,...v){let j=Object.create(null);for(let Z in n)j[Z]=n[Z];return v.forEach(function(Z){for(let de in Z)j[de]=Z[de]}),j}var se="",le=n=>!!n.scope,ce=(n,{prefix:v})=>{if(n.startsWith("language:"))return n.replace("language:","language-");if(n.includes(".")){let j=n.split(".");return[`${v}${j.shift()}`,...j.map((Z,de)=>`${Z}${"_".repeat(de+1)}`)].join(" ")}return`${v}${n}`},ge=class{constructor(n,v){this.buffer="",this.classPrefix=v.classPrefix,n.walk(this)}addText(n){this.buffer+=ne(n)}openNode(n){if(!le(n))return;let v=ce(n.scope,{prefix:this.classPrefix});this.span(v)}closeNode(n){le(n)&&(this.buffer+=se)}value(){return this.buffer}span(n){this.buffer+=``}},Ie=(n={})=>{let v={children:[]};return Object.assign(v,n),v},Me=class Ht{constructor(){this.rootNode=Ie(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(v){this.top.children.push(v)}openNode(v){let j=Ie({scope:v});this.add(j),this.stack.push(j)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(v){return this.constructor._walk(v,this.rootNode)}static _walk(v,j){return typeof j=="string"?v.addText(j):j.children&&(v.openNode(j),j.children.forEach(Z=>this._walk(v,Z)),v.closeNode(j)),v}static _collapse(v){typeof v!="string"&&v.children&&(v.children.every(j=>typeof j=="string")?v.children=[v.children.join("")]:v.children.forEach(j=>{Ht._collapse(j)}))}},Le=class extends Me{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,v){let j=n.root;v&&(j.scope=`language:${v}`),this.add(j)}toHTML(){return new ge(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function me(n){return n?typeof n=="string"?n:n.source:null}function Ce(n){return Te("(?=",n,")")}function ke(n){return Te("(?:",n,")*")}function Pe(n){return Te("(?:",n,")?")}function Te(...n){return n.map(v=>me(v)).join("")}function De(n){let v=n[n.length-1];return typeof v=="object"&&v.constructor===Object?(n.splice(n.length-1,1),v):{}}function ve(...n){return"("+(De(n).capture?"":"?:")+n.map(v=>me(v)).join("|")+")"}function xe(n){return new RegExp(n.toString()+"|").exec("").length-1}function he(n,v){let j=n&&n.exec(v);return j&&j.index===0}var we=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ae(n,{joinWith:v}){let j=0;return n.map(Z=>{j+=1;let de=j,ue=me(Z),$="";for(;ue.length>0;){let V=we.exec(ue);if(!V){$+=ue;break}$+=ue.substring(0,V.index),ue=ue.substring(V.index+V[0].length),V[0][0]==="\\"&&V[1]?$+="\\"+String(Number(V[1])+de):($+=V[0],V[0]==="("&&j++)}return $}).map(Z=>`(${Z})`).join(v)}var Ge=/\b\B/,_e="[a-zA-Z]\\w*",je="[a-zA-Z_]\\w*",Xe="\\b\\d+(\\.\\d+)?",Ke="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ye="\\b(0b[01]+)",Ne="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ue=(n={})=>{let v=/^#![ ]*\//;return n.binary&&(n.begin=Te(v,/.*\b/,n.binary,/\b.*/)),ie({scope:"meta",begin:v,end:/$/,relevance:0,"on:begin":(j,Z)=>{j.index!==0&&Z.ignoreMatch()}},n)},qe={begin:"\\\\[\\s\\S]",relevance:0},Se={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[qe]},Ve={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[qe]},Qe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},$e=function(n,v,j={}){let Z=ie({scope:"comment",begin:n,end:v,contains:[]},j);Z.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let de=ve("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Z.contains.push({begin:Te(/[ ]+/,"(",de,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Z},nt=$e("//","$"),it=$e("/\\*","\\*/"),Wt=$e("#","$"),Ft={scope:"number",begin:Xe,relevance:0},Gt={scope:"number",begin:Ke,relevance:0},jt={scope:"number",begin:ye,relevance:0},Vt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[qe,{begin:/\[/,end:/\]/,relevance:0,contains:[qe]}]},$t={scope:"title",begin:_e,relevance:0},zt={scope:"title",begin:je,relevance:0},Yt={begin:"\\.\\s*"+je,relevance:0},Xt=function(n){return Object.assign(n,{"on:begin":(v,j)=>{j.data._beginMatch=v[1]},"on:end":(v,j)=>{j.data._beginMatch!==v[1]&&j.ignoreMatch()}})},at=Object.freeze({__proto__:null,APOS_STRING_MODE:Se,BACKSLASH_ESCAPE:qe,BINARY_NUMBER_MODE:jt,BINARY_NUMBER_RE:ye,COMMENT:$e,C_BLOCK_COMMENT_MODE:it,C_LINE_COMMENT_MODE:nt,C_NUMBER_MODE:Gt,C_NUMBER_RE:Ke,END_SAME_AS_BEGIN:Xt,HASH_COMMENT_MODE:Wt,IDENT_RE:_e,MATCH_NOTHING_RE:Ge,METHOD_GUARD:Yt,NUMBER_MODE:Ft,NUMBER_RE:Xe,PHRASAL_WORDS_MODE:Qe,QUOTE_STRING_MODE:Ve,REGEXP_MODE:Vt,RE_STARTERS_RE:Ne,SHEBANG:Ue,TITLE_MODE:$t,UNDERSCORE_IDENT_RE:je,UNDERSCORE_TITLE_MODE:zt});function Kt(n,v){n.input[n.index-1]==="."&&v.ignoreMatch()}function qt(n,v){n.className!==void 0&&(n.scope=n.className,delete n.className)}function Qt(n,v){v&&n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",n.__beforeBegin=Kt,n.keywords=n.keywords||n.beginKeywords,delete n.beginKeywords,n.relevance===void 0&&(n.relevance=0))}function Zt(n,v){Array.isArray(n.illegal)&&(n.illegal=ve(...n.illegal))}function Jt(n,v){if(n.match){if(n.begin||n.end)throw new Error("begin & end are not supported with match");n.begin=n.match,delete n.match}}function en(n,v){n.relevance===void 0&&(n.relevance=1)}var tn=(n,v)=>{if(!n.beforeMatch)return;if(n.starts)throw new Error("beforeMatch cannot be used with starts");let j=Object.assign({},n);Object.keys(n).forEach(Z=>{delete n[Z]}),n.keywords=j.keywords,n.begin=Te(j.beforeMatch,Ce(j.begin)),n.starts={relevance:0,contains:[Object.assign(j,{endsParent:!0})]},n.relevance=0,delete j.beforeMatch},nn=["of","and","for","in","not","or","if","then","parent","list","value"],sn="keyword";function Rt(n,v,j=sn){let Z=Object.create(null);return typeof n=="string"?de(j,n.split(" ")):Array.isArray(n)?de(j,n):Object.keys(n).forEach(function(ue){Object.assign(Z,Rt(n[ue],v,ue))}),Z;function de(ue,$){v&&($=$.map(V=>V.toLowerCase())),$.forEach(function(V){let X=V.split("|");Z[X[0]]=[ue,an(X[0],X[1])]})}}function an(n,v){return v?Number(v):rn(n)?0:1}function rn(n){return nn.includes(n.toLowerCase())}var Lt={},Ze=n=>{console.error(n)},Nt=(n,...v)=>{console.log(`WARN: ${n}`,...v)},et=(n,v)=>{Lt[`${n}/${v}`]||(console.log(`Deprecated as of ${n}. ${v}`),Lt[`${n}/${v}`]=!0)},rt=new Error;function _t(n,v,{key:j}){let Z=0,de=n[j],ue={},$={};for(let V=1;V<=v.length;V++)$[V+Z]=de[V],ue[V+Z]=!0,Z+=xe(v[V-1]);n[j]=$,n[j]._emit=ue,n[j]._multi=!0}function on(n){if(Array.isArray(n.begin)){if(n.skip||n.excludeBegin||n.returnBegin)throw Ze("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),rt;if(typeof n.beginScope!="object"||n.beginScope===null)throw Ze("beginScope must be object"),rt;_t(n,n.begin,{key:"beginScope"}),n.begin=Ae(n.begin,{joinWith:""})}}function ln(n){if(Array.isArray(n.end)){if(n.skip||n.excludeEnd||n.returnEnd)throw Ze("skip, excludeEnd, returnEnd not compatible with endScope: {}"),rt;if(typeof n.endScope!="object"||n.endScope===null)throw Ze("endScope must be object"),rt;_t(n,n.end,{key:"endScope"}),n.end=Ae(n.end,{joinWith:""})}}function cn(n){n.scope&&typeof n.scope=="object"&&n.scope!==null&&(n.beginScope=n.scope,delete n.scope)}function dn(n){cn(n),typeof n.beginScope=="string"&&(n.beginScope={_wrap:n.beginScope}),typeof n.endScope=="string"&&(n.endScope={_wrap:n.endScope}),on(n),ln(n)}function un(n){function v($,V){return new RegExp(me($),"m"+(n.case_insensitive?"i":"")+(n.unicodeRegex?"u":"")+(V?"g":""))}class j{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(V,X){X.position=this.position++,this.matchIndexes[this.matchAt]=X,this.regexes.push([X,V]),this.matchAt+=xe(V)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let V=this.regexes.map(X=>X[1]);this.matcherRe=v(Ae(V,{joinWith:"|"}),!0),this.lastIndex=0}exec(V){this.matcherRe.lastIndex=this.lastIndex;let X=this.matcherRe.exec(V);if(!X)return null;let fe=X.findIndex((st,Et)=>Et>0&&st!==void 0),pe=this.matchIndexes[fe];return X.splice(0,fe),Object.assign(X,pe)}}class Z{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(V){if(this.multiRegexes[V])return this.multiRegexes[V];let X=new j;return this.rules.slice(V).forEach(([fe,pe])=>X.addRule(fe,pe)),X.compile(),this.multiRegexes[V]=X,X}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(V,X){this.rules.push([V,X]),X.type==="begin"&&this.count++}exec(V){let X=this.getMatcher(this.regexIndex);X.lastIndex=this.lastIndex;let fe=X.exec(V);if(this.resumingScanAtSamePosition()&&!(fe&&fe.index===this.lastIndex)){let pe=this.getMatcher(0);pe.lastIndex=this.lastIndex+1,fe=pe.exec(V)}return fe&&(this.regexIndex+=fe.position+1,this.regexIndex===this.count&&this.considerAll()),fe}}function de($){let V=new Z;return $.contains.forEach(X=>V.addRule(X.begin,{rule:X,type:"begin"})),$.terminatorEnd&&V.addRule($.terminatorEnd,{type:"end"}),$.illegal&&V.addRule($.illegal,{type:"illegal"}),V}function ue($,V){let X=$;if($.isCompiled)return X;[qt,Jt,dn,tn].forEach(pe=>pe($,V)),n.compilerExtensions.forEach(pe=>pe($,V)),$.__beforeBegin=null,[Qt,Zt,en].forEach(pe=>pe($,V)),$.isCompiled=!0;let fe=null;return typeof $.keywords=="object"&&$.keywords.$pattern&&($.keywords=Object.assign({},$.keywords),fe=$.keywords.$pattern,delete $.keywords.$pattern),fe=fe||/\w+/,$.keywords&&($.keywords=Rt($.keywords,n.case_insensitive)),X.keywordPatternRe=v(fe,!0),V&&($.begin||($.begin=/\B|\b/),X.beginRe=v(X.begin),!$.end&&!$.endsWithParent&&($.end=/\B|\b/),$.end&&(X.endRe=v(X.end)),X.terminatorEnd=me(X.end)||"",$.endsWithParent&&V.terminatorEnd&&(X.terminatorEnd+=($.end?"|":"")+V.terminatorEnd)),$.illegal&&(X.illegalRe=v($.illegal)),$.contains||($.contains=[]),$.contains=[].concat(...$.contains.map(function(pe){return pn(pe==="self"?$:pe)})),$.contains.forEach(function(pe){ue(pe,X)}),$.starts&&ue($.starts,V),X.matcher=de(X),X}if(n.compilerExtensions||(n.compilerExtensions=[]),n.contains&&n.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return n.classNameAliases=ie(n.classNameAliases||{}),ue(n)}function St(n){return n?n.endsWithParent||St(n.starts):!1}function pn(n){return n.variants&&!n.cachedVariants&&(n.cachedVariants=n.variants.map(function(v){return ie(n,{variants:null},v)})),n.cachedVariants?n.cachedVariants:St(n)?ie(n,{starts:n.starts?ie(n.starts):null}):Object.isFrozen(n)?ie(n):n}var hn="11.11.1",En=class extends Error{constructor(n,v){super(n),this.name="HTMLInjectionError",this.html=v}},ht=ne,At=ie,yt=Symbol("nomatch"),gn=7,Ot=function(n){let v=Object.create(null),j=Object.create(null),Z=[],de=!0,ue="Could not find the language '{}', did you forget to load/include a language module?",$={disableAutodetect:!0,name:"Plain text",contains:[]},V={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Le};function X(D){return V.noHighlightRe.test(D)}function fe(D){let Y=D.className+" ";Y+=D.parentNode?D.parentNode.className:"";let te=V.languageDetectRe.exec(Y);if(te){let re=ze(te[1]);return re||(Nt(ue.replace("{}",te[1])),Nt("Falling back to no-highlight mode for this block.",D)),re?te[1]:"no-highlight"}return Y.split(/\s+/).find(re=>X(re)||ze(re))}function pe(D,Y,te){let re="",Ee="";typeof Y=="object"?(re=D,te=Y.ignoreIllegals,Ee=Y.language):(et("10.7.0","highlight(lang, code, ...args) has been deprecated."),et("10.7.0",`Please use highlight(code, options) instead. https://github.com/highlightjs/highlight.js/issues/2277`),Ee=D,re=Y),te===void 0&&(te=!0);let Be={code:re,language:Ee};lt("before:highlight",Be);let Ye=Be.result?Be.result:st(Be.language,Be.code,te);return Ye.code=Be.code,lt("after:highlight",Ye),Ye}function st(D,Y,te,re){let Ee=Object.create(null);function Be(F,z){return F.keywords[z]}function Ye(){if(!q.keywords){be.addText(oe);return}let F=0;q.keywordPatternRe.lastIndex=0;let z=q.keywordPatternRe.exec(oe),J="";for(;z;){J+=oe.substring(F,z.index);let ae=We.case_insensitive?z[0].toLowerCase():z[0],Re=Be(q,ae);if(Re){let[Fe,wn]=Re;if(be.addText(J),J="",Ee[ae]=(Ee[ae]||0)+1,Ee[ae]<=gn&&(ut+=wn),Fe.startsWith("_"))J+=z[0];else{let kn=We.classNameAliases[Fe]||Fe;He(z[0],kn)}}else J+=z[0];F=q.keywordPatternRe.lastIndex,z=q.keywordPatternRe.exec(oe)}J+=oe.substring(F),be.addText(J)}function ct(){if(oe==="")return;let F=null;if(typeof q.subLanguage=="string"){if(!v[q.subLanguage]){be.addText(oe);return}F=st(q.subLanguage,oe,!0,Mt[q.subLanguage]),Mt[q.subLanguage]=F._top}else F=gt(oe,q.subLanguage.length?q.subLanguage:null);q.relevance>0&&(ut+=F.relevance),be.__addSublanguage(F._emitter,F.language)}function Oe(){q.subLanguage!=null?ct():Ye(),oe=""}function He(F,z){F!==""&&(be.startScope(z),be.addText(F),be.endScope())}function xt(F,z){let J=1,ae=z.length-1;for(;J<=ae;){if(!F._emit[J]){J++;continue}let Re=We.classNameAliases[F[J]]||F[J],Fe=z[J];Re?He(Fe,Re):(oe=Fe,Ye(),oe=""),J++}}function wt(F,z){return F.scope&&typeof F.scope=="string"&&be.openNode(We.classNameAliases[F.scope]||F.scope),F.beginScope&&(F.beginScope._wrap?(He(oe,We.classNameAliases[F.beginScope._wrap]||F.beginScope._wrap),oe=""):F.beginScope._multi&&(xt(F.beginScope,z),oe="")),q=Object.create(F,{parent:{value:q}}),q}function kt(F,z,J){let ae=he(F.endRe,J);if(ae){if(F["on:end"]){let Re=new ee(F);F["on:end"](z,Re),Re.isMatchIgnored&&(ae=!1)}if(ae){for(;F.endsParent&&F.parent;)F=F.parent;return F}}if(F.endsWithParent)return kt(F.parent,z,J)}function On(F){return q.matcher.regexIndex===0?(oe+=F[0],1):(Tt=!0,0)}function In(F){let z=F[0],J=F.rule,ae=new ee(J),Re=[J.__beforeBegin,J["on:begin"]];for(let Fe of Re)if(Fe&&(Fe(F,ae),ae.isMatchIgnored))return On(z);return J.skip?oe+=z:(J.excludeBegin&&(oe+=z),Oe(),!J.returnBegin&&!J.excludeBegin&&(oe=z)),wt(J,F),J.returnBegin?0:z.length}function Cn(F){let z=F[0],J=Y.substring(F.index),ae=kt(q,F,J);if(!ae)return yt;let Re=q;q.endScope&&q.endScope._wrap?(Oe(),He(z,q.endScope._wrap)):q.endScope&&q.endScope._multi?(Oe(),xt(q.endScope,F)):Re.skip?oe+=z:(Re.returnEnd||Re.excludeEnd||(oe+=z),Oe(),Re.excludeEnd&&(oe=z));do q.scope&&be.closeNode(),!q.skip&&!q.subLanguage&&(ut+=q.relevance),q=q.parent;while(q!==ae.parent);return ae.starts&&wt(ae.starts,F),Re.returnEnd?0:z.length}function vn(){let F=[];for(let z=q;z!==We;z=z.parent)z.scope&&F.unshift(z.scope);F.forEach(z=>be.openNode(z))}let dt={};function Dt(F,z){let J=z&&z[0];if(oe+=F,J==null)return Oe(),0;if(dt.type==="begin"&&z.type==="end"&&dt.index===z.index&&J===""){if(oe+=Y.slice(z.index,z.index+1),!de){let ae=new Error(`0 width match regex (${D})`);throw ae.languageName=D,ae.badRule=dt.rule,ae}return 1}if(dt=z,z.type==="begin")return In(z);if(z.type==="illegal"&&!te){let ae=new Error('Illegal lexeme "'+J+'" for mode "'+(q.scope||"")+'"');throw ae.mode=q,ae}else if(z.type==="end"){let ae=Cn(z);if(ae!==yt)return ae}if(z.type==="illegal"&&J==="")return oe+=` `,1;if(bt>1e5&&bt>z.index*3)throw new Error("potential infinite loop, way more iterations than matches");return oe+=J,J.length}let We=ze(D);if(!We)throw Ze(ue.replace("{}",D)),new Error('Unknown language: "'+D+'"');let xn=un(We),ft="",q=re||xn,Mt={},be=new V.__emitter(V);vn();let oe="",ut=0,Je=0,bt=0,Tt=!1;try{if(We.__emitTokens)We.__emitTokens(Y,be);else{for(q.matcher.considerAll();;){bt++,Tt?Tt=!1:q.matcher.considerAll(),q.matcher.lastIndex=Je;let F=q.matcher.exec(Y);if(!F)break;let z=Y.substring(Je,F.index),J=Dt(z,F);Je=F.index+J}Dt(Y.substring(Je))}return be.finalize(),ft=be.toHTML(),{language:D,value:ft,relevance:ut,illegal:!1,_emitter:be,_top:q}}catch(F){if(F.message&&F.message.includes("Illegal"))return{language:D,value:ht(Y),illegal:!0,relevance:0,_illegalBy:{message:F.message,index:Je,context:Y.slice(Je-100,Je+100),mode:F.mode,resultSoFar:ft},_emitter:be};if(de)return{language:D,value:ht(Y),illegal:!1,relevance:0,errorRaised:F,_emitter:be,_top:q};throw F}}function Et(D){let Y={value:ht(D),illegal:!1,relevance:0,_top:$,_emitter:new V.__emitter(V)};return Y._emitter.addText(D),Y}function gt(D,Y){Y=Y||V.languages||Object.keys(v);let te=Et(D),re=Y.filter(ze).filter(vt).map(Oe=>st(Oe,D,!1));re.unshift(te);let Ee=re.sort((Oe,He)=>{if(Oe.relevance!==He.relevance)return He.relevance-Oe.relevance;if(Oe.language&&He.language){if(ze(Oe.language).supersetOf===He.language)return 1;if(ze(He.language).supersetOf===Oe.language)return-1}return 0}),[Be,Ye]=Ee,ct=Be;return ct.secondBest=Ye,ct}function mn(D,Y,te){let re=Y&&j[Y]||te;D.classList.add("hljs"),D.classList.add(`language-${re}`)}function mt(D){let Y=null,te=fe(D);if(X(te))return;if(lt("before:highlightElement",{el:D,language:te}),D.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",D);return}if(D.children.length>0&&(V.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(D)),V.throwUnescapedHTML))throw new En("One of your code blocks includes unescaped HTML.",D.innerHTML);Y=D;let re=Y.textContent,Ee=te?pe(re,{language:te,ignoreIllegals:!0}):gt(re);D.innerHTML=Ee.value,D.dataset.highlighted="yes",mn(D,te,Ee.language),D.result={language:Ee.language,re:Ee.relevance,relevance:Ee.relevance},Ee.secondBest&&(D.secondBest={language:Ee.secondBest.language,relevance:Ee.secondBest.relevance}),lt("after:highlightElement",{el:D,result:Ee,text:re})}function fn(D){V=At(V,D)}let bn=()=>{ot(),et("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Tn(){ot(),et("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let It=!1;function ot(){function D(){ot()}if(document.readyState==="loading"){It||window.addEventListener("DOMContentLoaded",D,!1),It=!0;return}document.querySelectorAll(V.cssSelector).forEach(mt)}function Rn(D,Y){let te=null;try{te=Y(n)}catch(re){if(Ze("Language definition for '{}' could not be registered.".replace("{}",D)),de)Ze(re);else throw re;te=$}te.name||(te.name=D),v[D]=te,te.rawDefinition=Y.bind(null,n),te.aliases&&Ct(te.aliases,{languageName:D})}function Ln(D){delete v[D];for(let Y of Object.keys(j))j[Y]===D&&delete j[Y]}function Nn(){return Object.keys(v)}function ze(D){return D=(D||"").toLowerCase(),v[D]||v[j[D]]}function Ct(D,{languageName:Y}){typeof D=="string"&&(D=[D]),D.forEach(te=>{j[te.toLowerCase()]=Y})}function vt(D){let Y=ze(D);return Y&&!Y.disableAutodetect}function _n(D){D["before:highlightBlock"]&&!D["before:highlightElement"]&&(D["before:highlightElement"]=Y=>{D["before:highlightBlock"](Object.assign({block:Y.el},Y))}),D["after:highlightBlock"]&&!D["after:highlightElement"]&&(D["after:highlightElement"]=Y=>{D["after:highlightBlock"](Object.assign({block:Y.el},Y))})}function Sn(D){_n(D),Z.push(D)}function An(D){let Y=Z.indexOf(D);Y!==-1&&Z.splice(Y,1)}function lt(D,Y){let te=D;Z.forEach(function(re){re[te]&&re[te](Y)})}function yn(D){return et("10.7.0","highlightBlock will be removed entirely in v12.0"),et("10.7.0","Please use highlightElement now."),mt(D)}Object.assign(n,{highlight:pe,highlightAuto:gt,highlightAll:ot,highlightElement:mt,highlightBlock:yn,configure:fn,initHighlighting:bn,initHighlightingOnLoad:Tn,registerLanguage:Rn,unregisterLanguage:Ln,listLanguages:Nn,getLanguage:ze,registerAliases:Ct,autoDetection:vt,inherit:At,addPlugin:Sn,removePlugin:An}),n.debugMode=function(){de=!1},n.safeMode=function(){de=!0},n.versionString=hn,n.regex={concat:Te,lookahead:Ce,either:ve,optional:Pe,anyNumberOfTimes:ke};for(let D in at)typeof at[D]=="object"&&Q(at[D]);return Object.assign(n,at),n},tt=Ot({});tt.newInstance=()=>Ot({}),B.exports=tt,tt.HighlightJS=tt,tt.default=tt}),h=P(W(),1),e=h.default;function t(f){let B=f.regex,Q=/(?![A-Za-z0-9])(?![$])/,ee=B.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,Q),ne=B.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,Q),ie=B.concat(/[A-Z]+/,Q),se={scope:"variable",match:"\\$+"+ee},le={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},ce={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},ge=f.inherit(f.APOS_STRING_MODE,{illegal:null}),Ie=f.inherit(f.QUOTE_STRING_MODE,{illegal:null,contains:f.QUOTE_STRING_MODE.contains.concat(ce)}),Me={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:f.QUOTE_STRING_MODE.contains.concat(ce),"on:begin":(ye,Ne)=>{Ne.data._beginMatch=ye[1]||ye[2]},"on:end":(ye,Ne)=>{Ne.data._beginMatch!==ye[1]&&Ne.ignoreMatch()}},Le=f.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),me=`[ ]`,Ce={scope:"string",variants:[Ie,ge,Me,Le]},ke={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},Pe=["false","null","true"],Te=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],De=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],ve={keyword:Te,literal:(ye=>{let Ne=[];return ye.forEach(Ue=>{Ne.push(Ue),Ue.toLowerCase()===Ue?Ne.push(Ue.toUpperCase()):Ne.push(Ue.toLowerCase())}),Ne})(Pe),built_in:De},xe=ye=>ye.map(Ne=>Ne.replace(/\|\d+$/,"")),he={variants:[{match:[/new/,B.concat(me,"+"),B.concat("(?!",xe(De).join("\\b|"),"\\b)"),ne],scope:{1:"keyword",4:"title.class"}}]},we=B.concat(ee,"\\b(?!\\()"),Ae={variants:[{match:[B.concat(/::/,B.lookahead(/(?!class\b)/)),we],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[ne,B.concat(/::/,B.lookahead(/(?!class\b)/)),we],scope:{1:"title.class",3:"variable.constant"}},{match:[ne,B.concat("::",B.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[ne,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},Ge={scope:"attr",match:B.concat(ee,B.lookahead(":"),B.lookahead(/(?!::)/))},_e={relevance:0,begin:/\(/,end:/\)/,keywords:ve,contains:[Ge,se,Ae,f.C_BLOCK_COMMENT_MODE,Ce,ke,he]},je={relevance:0,match:[/\b/,B.concat("(?!fn\\b|function\\b|",xe(Te).join("\\b|"),"|",xe(De).join("\\b|"),"\\b)"),ee,B.concat(me,"*"),B.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[_e]};_e.contains.push(je);let Xe=[Ge,Ae,f.C_BLOCK_COMMENT_MODE,Ce,ke,he],Ke={begin:B.concat(/#\[\s*\\?/,B.either(ne,ie)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:Pe,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:Pe,keyword:["new","array"]},contains:["self",...Xe]},...Xe,{scope:"meta",variants:[{match:ne},{match:ie}]}]};return{case_insensitive:!1,keywords:ve,contains:[Ke,f.HASH_COMMENT_MODE,f.COMMENT("//","$"),f.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:f.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},le,{scope:"variable.language",match:/\$this\b/},se,je,Ae,{match:[/const/,/\s/,ee],scope:{1:"keyword",3:"variable.constant"}},he,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},f.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:ve,contains:["self",Ke,se,Ae,f.C_BLOCK_COMMENT_MODE,Ce,ke]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},f.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[f.inherit(f.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},f.UNDERSCORE_TITLE_MODE]},Ce,ke]}}function a(f){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},f.inherit(f.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),f.inherit(f.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}var L="[A-Za-z$_][0-9A-Za-z$_]*",A=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],I=["true","false","null","undefined","NaN","Infinity"],C=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],y=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],b=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],S=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],R=[].concat(b,C,y);function g(f){let B=f.regex,Q=(Se,{after:Ve})=>{let Qe="",end:""},ie=/<[A-Za-z0-9\\._:-]+\s*\/>/,se={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Se,Ve)=>{let Qe=Se[0].length+Se.index,$e=Se.input[Qe];if($e==="<"||$e===","){Ve.ignoreMatch();return}$e===">"&&(Q(Se,{after:Qe})||Ve.ignoreMatch());let nt,it=Se.input.substring(Qe);if(nt=it.match(/^\s*=/)){Ve.ignoreMatch();return}if((nt=it.match(/^\s+extends\s+/))&&nt.index===0){Ve.ignoreMatch();return}}},le={$pattern:L,keyword:A,literal:I,built_in:R,"variable.language":S},ce="[0-9](_?[0-9])*",ge=`\\.(${ce})`,Ie="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",Me={className:"number",variants:[{begin:`(\\b(${Ie})((${ge})|\\.)?|(${ge}))[eE][+-]?(${ce})\\b`},{begin:`\\b(${Ie})\\b((${ge})\\b|\\.)?|(${ge})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},Le={className:"subst",begin:"\\$\\{",end:"\\}",keywords:le,contains:[]},me={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,Le],subLanguage:"xml"}},Ce={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,Le],subLanguage:"css"}},ke={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[f.BACKSLASH_ESCAPE,Le],subLanguage:"graphql"}},Pe={className:"string",begin:"`",end:"`",contains:[f.BACKSLASH_ESCAPE,Le]},Te={className:"comment",variants:[f.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:ee+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),f.C_BLOCK_COMMENT_MODE,f.C_LINE_COMMENT_MODE]},De=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,me,Ce,ke,Pe,{match:/\$\d+/},Me];Le.contains=De.concat({begin:/\{/,end:/\}/,keywords:le,contains:["self"].concat(De)});let ve=[].concat(Te,Le.contains),xe=ve.concat([{begin:/(\s*)\(/,end:/\)/,keywords:le,contains:["self"].concat(ve)}]),he={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:le,contains:xe},we={variants:[{match:[/class/,/\s+/,ee,/\s+/,/extends/,/\s+/,B.concat(ee,"(",B.concat(/\./,ee),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,ee],scope:{1:"keyword",3:"title.class"}}]},Ae={relevance:0,match:B.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...C,...y]}},Ge={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_e={variants:[{match:[/function/,/\s+/,ee,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[he],illegal:/%/},je={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Xe(Se){return B.concat("(?!",Se.join("|"),")")}let Ke={match:B.concat(/\b/,Xe([...b,"super","import"].map(Se=>`${Se}\\s*\\(`)),ee,B.lookahead(/\s*\(/)),className:"title.function",relevance:0},ye={begin:B.concat(/\./,B.lookahead(B.concat(ee,/(?![0-9A-Za-z$_(])/))),end:ee,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Ne={match:[/get|set/,/\s+/,ee,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},he]},Ue="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+f.UNDERSCORE_IDENT_RE+")\\s*=>",qe={match:[/const|var|let/,/\s+/,ee,/\s*/,/=\s*/,/(async\s*)?/,B.lookahead(Ue)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[he]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:le,exports:{PARAMS_CONTAINS:xe,CLASS_REFERENCE:Ae},illegal:/#(?![$_A-z])/,contains:[f.SHEBANG({label:"shebang",binary:"node",relevance:5}),Ge,f.APOS_STRING_MODE,f.QUOTE_STRING_MODE,me,Ce,ke,Pe,Te,{match:/\$\d+/},Me,Ae,{scope:"attr",match:ee+B.lookahead(":"),relevance:0},qe,{begin:"("+f.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[Te,f.REGEXP_MODE,{className:"function",begin:Ue,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:f.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:le,contains:xe}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:ne.begin,end:ne.end},{match:ie},{begin:se.begin,"on:begin":se.isTrulyOpeningTag,end:se.end}],subLanguage:"xml",contains:[{begin:se.begin,end:se.end,skip:!0,contains:["self"]}]}]},_e,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+f.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[he,f.inherit(f.TITLE_MODE,{begin:ee,className:"title.function"})]},{match:/\.\.\./,relevance:0},ye,{match:"\\$"+ee,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[he]},Ke,je,we,Ne,{match:/\$[(.]/}]}}function O(f){let B=f.regex,Q=f.COMMENT("--","$"),ee={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},ne={begin:/"/,end:/"/,contains:[{match:/""/}]},ie=["true","false","unknown"],se=["double precision","large object","with timezone","without timezone"],le=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],ce=["add","asc","collation","desc","final","first","last","view"],ge=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],Ie=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],Me=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],Le=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],me=Ie,Ce=[...ge,...ce].filter(he=>!Ie.includes(he)),ke={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},Pe={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},Te={match:B.concat(/\b/,B.either(...me),/\s*\(/),relevance:0,keywords:{built_in:me}};function De(he){return B.concat(/\b/,B.either(...he.map(we=>we.replace(/\s+/,"\\s+"))),/\b/)}let ve={scope:"keyword",match:De(Le),relevance:0};function xe(he,{exceptions:we,when:Ae}={}){let Ge=Ae;return we=we||[],he.map(_e=>_e.match(/\|\d+$/)||we.includes(_e)?_e:Ge(_e)?`${_e}|0`:_e)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:xe(Ce,{when:he=>he.length<3}),literal:ie,type:le,built_in:Me},contains:[{scope:"type",match:De(se)},ve,Te,ke,ee,ne,f.C_NUMBER_MODE,f.C_BLOCK_COMMENT_MODE,Q,Pe]}}function o(f){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}var d=f=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:f.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:f.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),c=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],E=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],k=[...c,...E],_=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),M=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),U=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function T(f){let B=f.regex,Q=d(f),ee={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},ne="and or not only",ie=/@-?\w[\w]*(-\w+)*/,se="[a-zA-Z-][a-zA-Z0-9_-]*",le=[f.APOS_STRING_MODE,f.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[Q.BLOCK_COMMENT,ee,Q.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+se,relevance:0},Q.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+i.join("|")+")"},{begin:":(:)?("+M.join("|")+")"}]},Q.CSS_VARIABLE,{className:"attribute",begin:"\\b("+U.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[Q.BLOCK_COMMENT,Q.HEXCOLOR,Q.IMPORTANT,Q.CSS_NUMBER_MODE,...le,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...le,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},Q.FUNCTION_DISPATCH]},{begin:B.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:ie},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:ne,attribute:_.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...le,Q.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+k.join("|")+")\\b"}]}}function r(f){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function u(f){let B=f.regex,Q=B.concat(/[\p{L}_]/u,B.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),ee=/[\p{L}0-9._:-]+/u,ne={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},ie={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},se=f.inherit(ie,{begin:/\(/,end:/\)/}),le=f.inherit(f.APOS_STRING_MODE,{className:"string"}),ce=f.inherit(f.QUOTE_STRING_MODE,{className:"string"}),ge={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[ie,ce,le,se,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[ie,se,ce,le]}]}]},f.COMMENT(//,{relevance:10}),{begin://,relevance:10},ne,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[ce]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[ge],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[ge],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:B.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:Q,relevance:0,starts:ge}]},{className:"tag",begin:B.concat(/<\//,B.lookahead(B.concat(Q,/>/))),contains:[{className:"name",begin:Q,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function x(f){let B="true false yes no null",Q="[\\w#;/?:@&=+$,.~*'()[\\]]+",ee={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},ne={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},ie={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},se={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[f.BACKSLASH_ESCAPE,ne]},le=f.inherit(se,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),ce={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},ge={end:",",endsWithParent:!0,excludeEnd:!0,keywords:B,relevance:0},Ie={begin:/\{/,end:/\}/,contains:[ge],illegal:"\\n",relevance:0},Me={begin:"\\[",end:"\\]",contains:[ge],illegal:"\\n",relevance:0},Le=[ee,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+Q},{className:"type",begin:"!<"+Q+">"},{className:"type",begin:"!"+Q},{className:"type",begin:"!!"+Q},{className:"meta",begin:"&"+f.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+f.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},f.HASH_COMMENT_MODE,{beginKeywords:B,keywords:{literal:B}},ce,{className:"number",begin:f.C_NUMBER_RE+"\\b",relevance:0},Ie,Me,ie,se],me=[...Le];return me.pop(),me.push(le),ge.contains=me,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:Le}}e.registerLanguage("php",t),e.registerLanguage("php-template",a),e.registerLanguage("javascript",g),e.registerLanguage("sql",O),e.registerLanguage("shell",o),e.registerLanguage("css",T),e.registerLanguage("plaintext",r),e.registerLanguage("xml",u),e.registerLanguage("yaml",x);var K=e.getLanguage("sql");K.keywords.keyword=Array.from(new Set([...K.keywords.keyword,"if","ifnull","limit","aes_decrypt","aes_encrypt","ascii","bin","bit_and","bit_count","bit_length","bit_or","bit_xor","coercibility","concat","group_concat","concat_ws","connection_id","conv","curdate","curtime","database","date_add","date_format","date_sub","dayname","dayofmonth","dayofweek","dayofyear","elt","export_set","field","find_in_set","format","from_base64","from_days","from_unixtime","get_lock","greatest","hex","ifnull","inet_aton","inet_ntoa","instr","isnull","last_insert_id","least","lpad","ltrim","make_set","md5","monthname","now","oct","ord","password","quote","release_lock","repeat","replace","reverse","rpad","rtrim","sec_to_time","sha1","sha2","sleep","soundex","space","straight_join","strcmp","str_to_date","substr","sysdate","time_format","time_to_sec","to_base64","to_days","unix_timestamp","updatexml","version","week","weekday","yearweek","length","substring_index","json_unquote","json_extract","json_contains"])),K.keywords.type=Array.from(new Set([...K.keywords.type,"longtext"])),e.configure({classPrefix:"phpdebugbar-hljs-"}),globalThis.phpdebugbar_hljs=e.default})();(()=>{var s=Object.create,G=Object.defineProperty,N=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,p=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,l=(o,d)=>()=>(d||o((d={exports:{}}).exports,d),d.exports),H=(o,d,c,E)=>{if(d&&typeof d=="object"||typeof d=="function")for(let k of m(d))!w.call(o,k)&&k!==c&&G(o,k,{get:()=>d[k],enumerable:!(E=N(d,k))||E.enumerable});return o},P=(o,d,c)=>(c=o!=null?s(p(o)):{},H(d||!o||!o.__esModule?G(c,"default",{value:o,enumerable:!0}):c,o)),W=l(o=>{"use strict";o.__esModule=!0;var d=/[\\^$.*+?()[\]{}|]/g,c=RegExp(d.source);function E(k){return k&&c.test(k)?k.replace(d,"\\$&"):k||""}o.default=E}),h=l(o=>{"use strict";o.__esModule=!0,o.TokenTypes=void 0;var d;(function(c){c.WHITESPACE="whitespace",c.WORD="word",c.STRING="string",c.RESERVED="reserved",c.RESERVED_TOP_LEVEL="reserved-top-level",c.RESERVED_TOP_LEVEL_NO_INDENT="reserved-top-level-no-indent",c.RESERVED_NEWLINE="reserved-newline",c.OPERATOR="operator",c.NO_SPACE_OPERATOR="no-space-operator",c.OPEN_PAREN="open-paren",c.CLOSE_PAREN="close-paren",c.LINE_COMMENT="line-comment",c.BLOCK_COMMENT="block-comment",c.NUMBER="number",c.PLACEHOLDER="placeholder",c.SERVERVARIABLE="servervariable"})(d=o.TokenTypes||(o.TokenTypes={}))}),e=l(o=>{"use strict";var d=o&&o.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};o.__esModule=!0;var c=d(W()),E=h(),k=(function(){function _(i){this.WHITESPACE_REGEX=/^(\s+)/u,this.NUMBER_REGEX=/^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+|([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}))\b/u,this.AMBIGUOS_OPERATOR_REGEX=/^(\?\||\?&)/u,this.OPERATOR_REGEX=/^(!=|<>|>>|<<|==|<=|>=|!<|!>|\|\|\/|\|\/|\|\||~~\*|~~|!~~\*|!~~|~\*|!~\*|!~|:=|=>|&&|@>|<@|#-|@@|@|.)/u,this.NO_SPACE_OPERATOR_REGEX=/^(::|->>|->|#>>|#>)/u,this.BLOCK_COMMENT_REGEX=/^(\/\*[^]*?(?:\*\/|$))/u,this.LINE_COMMENT_REGEX=this.createLineCommentRegex(i.lineCommentTypes),this.RESERVED_TOP_LEVEL_REGEX=this.createReservedWordRegex(i.reservedTopLevelWords),this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX=this.createReservedWordRegex(i.reservedTopLevelWordsNoIndent),this.RESERVED_NEWLINE_REGEX=this.createReservedWordRegex(i.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=this.createReservedWordRegex(i.reservedWords),this.WORD_REGEX=this.createWordRegex(i.specialWordChars),this.STRING_REGEX=this.createStringRegex(i.stringTypes),this.OPEN_PAREN_REGEX=this.createParenRegex(i.openParens),this.CLOSE_PAREN_REGEX=this.createParenRegex(i.closeParens),this.INDEXED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(i.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(i.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=this.createPlaceholderRegex(i.namedPlaceholderTypes,this.createStringPattern(i.stringTypes))}return _.prototype.createLineCommentRegex=function(i){var M="((?|(?:[^>]))";return new RegExp("^((?:".concat(i.map(function(U){return(0,c.default)(U)}).join("|"),")").concat(M,`.*?(?:\r |\r| |$))`),"u")},_.prototype.createReservedWordRegex=function(i){var M=i.join("|").replace(/ /gu,"\\s+");return new RegExp("^(".concat(M,")\\b"),"iu")},_.prototype.createWordRegex=function(i){return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(i.join(""),"]+)"),"u")},_.prototype.createStringRegex=function(i){return new RegExp("^("+this.createStringPattern(i)+")","u")},_.prototype.createStringPattern=function(i){var M={"``":"((`[^`]*($|`))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)","E''":"(((E|e)'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)"};return i.map(function(U){return M[U]}).join("|")},_.prototype.createParenRegex=function(i){var M=this;return new RegExp("^("+i.map(function(U){return M.escapeParen(U)}).join("|")+")","iu")},_.prototype.escapeParen=function(i){return i.length===1?(0,c.default)(i):"\\b"+i+"\\b"},_.prototype.createPlaceholderRegex=function(i,M){if(!i||i.length===0)return null;var U=i.map(c.default).join("|");return new RegExp("^((?:".concat(U,")(?:").concat(M,"))"),"u")},_.prototype.tokenize=function(i){if(!i)return[];for(var M=[],U;i.length;)U=this.getNextToken(i,U),i=i.substring(U.value.length),M.push(U);return M},_.prototype.getNextToken=function(i,M){return this.getWhitespaceToken(i)||this.getCommentToken(i)||this.getStringToken(i)||this.getOpenParenToken(i)||this.getCloseParenToken(i)||this.getAmbiguosOperatorToken(i)||this.getNoSpaceOperatorToken(i)||this.getServerVariableToken(i)||this.getPlaceholderToken(i)||this.getNumberToken(i)||this.getReservedWordToken(i,M)||this.getWordToken(i)||this.getOperatorToken(i)},_.prototype.getWhitespaceToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.WHITESPACE,regex:this.WHITESPACE_REGEX})},_.prototype.getCommentToken=function(i){return this.getLineCommentToken(i)||this.getBlockCommentToken(i)},_.prototype.getLineCommentToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})},_.prototype.getBlockCommentToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})},_.prototype.getStringToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.STRING,regex:this.STRING_REGEX})},_.prototype.getOpenParenToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})},_.prototype.getCloseParenToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})},_.prototype.getPlaceholderToken=function(i){return this.getIdentNamedPlaceholderToken(i)||this.getStringNamedPlaceholderToken(i)||this.getIndexedPlaceholderToken(i)},_.prototype.getServerVariableToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.SERVERVARIABLE,regex:/(^@@\w+)/iu})},_.prototype.getIdentNamedPlaceholderToken=function(i){return this.getPlaceholderTokenWithKey({input:i,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(M){return M.slice(1)}})},_.prototype.getStringNamedPlaceholderToken=function(i){var M=this;return this.getPlaceholderTokenWithKey({input:i,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(U){return M.getEscapedPlaceholderKey({key:U.slice(2,-1),quoteChar:U.slice(-1)})}})},_.prototype.getIndexedPlaceholderToken=function(i){return this.getPlaceholderTokenWithKey({input:i,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(M){return M.slice(1)}})},_.prototype.getPlaceholderTokenWithKey=function(i){var M=i.input,U=i.regex,T=i.parseKey,r=this.getTokenOnFirstMatch({input:M,regex:U,type:E.TokenTypes.PLACEHOLDER});return r&&(r.key=T(r.value)),r},_.prototype.getEscapedPlaceholderKey=function(i){var M=i.key,U=i.quoteChar;return M.replace(new RegExp((0,c.default)("\\"+U),"gu"),U)},_.prototype.getNumberToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.NUMBER,regex:this.NUMBER_REGEX})},_.prototype.getOperatorToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.OPERATOR,regex:this.OPERATOR_REGEX})},_.prototype.getAmbiguosOperatorToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.OPERATOR,regex:this.AMBIGUOS_OPERATOR_REGEX})},_.prototype.getNoSpaceOperatorToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.NO_SPACE_OPERATOR,regex:this.NO_SPACE_OPERATOR_REGEX})},_.prototype.getReservedWordToken=function(i,M){if(!(M&&M.value&&M.value==="."))return this.getToplevelReservedToken(i)||this.getNewlineReservedToken(i)||this.getTopLevelReservedTokenNoIndent(i)||this.getPlainReservedToken(i)},_.prototype.getToplevelReservedToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.RESERVED_TOP_LEVEL,regex:this.RESERVED_TOP_LEVEL_REGEX})},_.prototype.getNewlineReservedToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})},_.prototype.getPlainReservedToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.RESERVED,regex:this.RESERVED_PLAIN_REGEX})},_.prototype.getTopLevelReservedTokenNoIndent=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.RESERVED_TOP_LEVEL_NO_INDENT,regex:this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX})},_.prototype.getWordToken=function(i){return this.getTokenOnFirstMatch({input:i,type:E.TokenTypes.WORD,regex:this.WORD_REGEX})},_.prototype.getTokenOnFirstMatch=function(i){var M=i.input,U=i.type,T=i.regex,r=M.match(T);if(r)return{type:U,value:r[1]}},_})();o.default=k}),t=l(o=>{"use strict";o.__esModule=!0;var d=function(c){return c===void 0&&(c=[]),c[c.length-1]};o.default=d}),a=l(o=>{"use strict";var d=o&&o.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};o.__esModule=!0;var c=d(t()),E="top-level",k="block-level",_=(function(){function i(M){this.indent=M,this.indentTypes=[],this.indent=M||" "}return i.prototype.getIndent=function(){return new Array(this.indentTypes.length).fill(this.indent).join("")},i.prototype.increaseTopLevel=function(){this.indentTypes.push(E)},i.prototype.increaseBlockLevel=function(){this.indentTypes.push(k)},i.prototype.decreaseTopLevel=function(){(0,c.default)(this.indentTypes)===E&&this.indentTypes.pop()},i.prototype.decreaseBlockLevel=function(){for(;this.indentTypes.length>0;){var M=this.indentTypes.pop();if(M!==E)break}},i.prototype.resetIndentation=function(){this.indentTypes=[]},i})();o.default=_}),L=l(o=>{"use strict";o.__esModule=!0;var d=h(),c=50,E=(function(){function k(){this.level=0}return k.prototype.beginIfPossible=function(_,i){this.level===0&&this.isInlineBlock(_,i)?this.level=1:this.level>0?this.level++:this.level=0},k.prototype.end=function(){this.level--},k.prototype.isActive=function(){return this.level>0},k.prototype.isInlineBlock=function(_,i){for(var M=0,U=0,T=i;T<_.length;T++){var r=_[T];if(M+=r.value.length,M>c)return!1;if(r.type===d.TokenTypes.OPEN_PAREN)U++;else if(r.type===d.TokenTypes.CLOSE_PAREN&&(U--,U===0))return!0;if(this.isForbiddenToken(r))return!1}return!1},k.prototype.isForbiddenToken=function(_){var i=_.type,M=_.value;return i===d.TokenTypes.RESERVED_TOP_LEVEL||i===d.TokenTypes.RESERVED_NEWLINE||i===d.TokenTypes.LINE_COMMENT||i===d.TokenTypes.BLOCK_COMMENT||M===";"},k})();o.default=E}),A=l(o=>{"use strict";o.__esModule=!0;var d=(function(){function c(E){this.params=E,this.index=0,this.params=E}return c.prototype.get=function(E){var k=E.key,_=E.value;return this.params?k?this.params[k]:this.params[this.index++]:_},c})();o.default=d}),I=l(o=>{"use strict";var d=o&&o.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};o.__esModule=!0;var c=h(),E=d(a()),k=d(L()),_=d(A()),i=[" "," "],M=function(T){for(var r=T.length-1;r>=0&&i.includes(T[r]);)r--;return T.substring(0,r+1)},U=(function(){function T(r,u,x){this.cfg=r,this.tokenizer=u,this.tokenOverride=x,this.tokens=[],this.previousReservedWord={type:null,value:null},this.previousNonWhiteSpace={type:null,value:null},this.index=0,this.indentation=new E.default(this.cfg.indent),this.inlineBlock=new k.default,this.params=new _.default(this.cfg.params)}return T.prototype.format=function(r){this.tokens=this.tokenizer.tokenize(r);var u=this.getFormattedQueryFromTokens();return u.trim()},T.prototype.getFormattedQueryFromTokens=function(){var r=this,u="";return this.tokens.forEach(function(x,K){r.index=K,r.tokenOverride&&(x=r.tokenOverride(x,r.previousReservedWord)||x),x.type===c.TokenTypes.WHITESPACE?u=r.formatWhitespace(x,u):x.type===c.TokenTypes.LINE_COMMENT?u=r.formatLineComment(x,u):x.type===c.TokenTypes.BLOCK_COMMENT?u=r.formatBlockComment(x,u):x.type===c.TokenTypes.RESERVED_TOP_LEVEL||x.type===c.TokenTypes.RESERVED_TOP_LEVEL_NO_INDENT||x.type===c.TokenTypes.RESERVED_NEWLINE||x.type===c.TokenTypes.RESERVED?u=r.formatReserved(x,u):x.type===c.TokenTypes.OPEN_PAREN?u=r.formatOpeningParentheses(x,u):x.type===c.TokenTypes.CLOSE_PAREN?u=r.formatClosingParentheses(x,u):x.type===c.TokenTypes.NO_SPACE_OPERATOR?u=r.formatWithoutSpaces(x,u):x.type===c.TokenTypes.PLACEHOLDER||x.type===c.TokenTypes.SERVERVARIABLE?u=r.formatPlaceholder(x,u):x.value===","?u=r.formatComma(x,u):x.value===":"?u=r.formatWithSpaceAfter(x,u):x.value==="."?u=r.formatWithoutSpaces(x,u):x.value===";"?u=r.formatQuerySeparator(x,u):u=r.formatWithSpaces(x,u),x.type!==c.TokenTypes.WHITESPACE&&(r.previousNonWhiteSpace=x)}),u},T.prototype.formatWhitespace=function(r,u){return this.cfg.linesBetweenQueries==="preserve"&&/((\r\n|\n)(\r\n|\n)+)/u.test(r.value)&&this.previousToken().value===";"?u.replace(/(\n|\r\n)$/u,"")+r.value:u},T.prototype.formatReserved=function(r,u){return r.type===c.TokenTypes.RESERVED_NEWLINE&&this.previousReservedWord&&this.previousReservedWord.value&&r.value.toUpperCase()==="AND"&&this.previousReservedWord.value.toUpperCase()==="BETWEEN"&&(r.type=c.TokenTypes.RESERVED),r.type===c.TokenTypes.RESERVED_TOP_LEVEL?u=this.formatTopLevelReservedWord(r,u):r.type===c.TokenTypes.RESERVED_TOP_LEVEL_NO_INDENT?u=this.formatTopLevelReservedWordNoIndent(r,u):r.type===c.TokenTypes.RESERVED_NEWLINE?u=this.formatNewlineReservedWord(r,u):u=this.formatWithSpaces(r,u),this.previousReservedWord=r,u},T.prototype.formatLineComment=function(r,u){return this.addNewline(u+r.value)},T.prototype.formatBlockComment=function(r,u){return this.addNewline(this.addNewline(u)+this.indentComment(r.value))},T.prototype.indentComment=function(r){return r.replace(/\n[ \t]*/gu,` `+this.indentation.getIndent()+" ")},T.prototype.formatTopLevelReservedWordNoIndent=function(r,u){return this.indentation.decreaseTopLevel(),u=this.addNewline(u)+this.equalizeWhitespace(this.formatReservedWord(r.value)),this.addNewline(u)},T.prototype.formatTopLevelReservedWord=function(r,u){var x=this.previousNonWhiteSpace.value!==","&&!["GRANT"].includes("".concat(this.previousNonWhiteSpace.value).toUpperCase());return x&&(this.indentation.decreaseTopLevel(),u=this.addNewline(u)),u=u+this.equalizeWhitespace(this.formatReservedWord(r.value))+" ",x&&this.indentation.increaseTopLevel(),u},T.prototype.formatNewlineReservedWord=function(r,u){return this.addNewline(u)+this.equalizeWhitespace(this.formatReservedWord(r.value))+" "},T.prototype.equalizeWhitespace=function(r){return r.replace(/\s+/gu," ")},T.prototype.formatOpeningParentheses=function(r,u){r.value=this.formatCase(r.value);var x=this.previousToken().type;return x!==c.TokenTypes.WHITESPACE&&x!==c.TokenTypes.OPEN_PAREN&&x!==c.TokenTypes.LINE_COMMENT&&(u=M(u)),u+=r.value,this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),u=this.addNewline(u)),u},T.prototype.formatClosingParentheses=function(r,u){return r.value=this.formatCase(r.value),this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(r,u)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(r,this.addNewline(u)))},T.prototype.formatPlaceholder=function(r,u){return u+this.params.get(r)+" "},T.prototype.formatComma=function(r,u){return u=M(u)+r.value+" ",this.inlineBlock.isActive()||/^LIMIT$/iu.test(this.previousReservedWord.value)?u:this.addNewline(u)},T.prototype.formatWithSpaceAfter=function(r,u){return M(u)+r.value+" "},T.prototype.formatWithoutSpaces=function(r,u){return M(u)+r.value},T.prototype.formatWithSpaces=function(r,u){var x=r.type===c.TokenTypes.RESERVED?this.formatReservedWord(r.value):r.value;return u+x+" "},T.prototype.formatReservedWord=function(r){return this.formatCase(r)},T.prototype.formatQuerySeparator=function(r,u){this.indentation.resetIndentation();var x=` `;return this.cfg.linesBetweenQueries!=="preserve"&&(x=` `.repeat(this.cfg.linesBetweenQueries||1)),M(u)+r.value+x},T.prototype.addNewline=function(r){return r=M(r),r.endsWith(` `)||(r+=` `),r+this.indentation.getIndent()},T.prototype.previousToken=function(){return this.tokens[this.index-1]||{type:null,value:null}},T.prototype.formatCase=function(r){return this.cfg.reservedWordCase==="upper"?r.toUpperCase():this.cfg.reservedWordCase==="lower"?r.toLowerCase():r},T})();o.default=U}),C=l(o=>{"use strict";var d=o&&o.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};o.__esModule=!0;var c=d(e()),E=d(I()),k=(function(){function _(i){this.cfg=i}return _.prototype.format=function(i){return new E.default(this.cfg,this.tokenizer(),this.tokenOverride).format(i)},_.prototype.tokenize=function(i){return this.tokenizer().tokenize(i)},_.prototype.tokenizer=function(){return new c.default(this.getTokenizerConfig())},_})();o.default=k}),y=l(o=>{"use strict";var d=o&&o.__extends||(function(){var T=function(r,u){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,K){x.__proto__=K}||function(x,K){for(var f in K)Object.prototype.hasOwnProperty.call(K,f)&&(x[f]=K[f])},T(r,u)};return function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");T(r,u);function x(){this.constructor=r}r.prototype=u===null?Object.create(u):(x.prototype=u.prototype,new x)}})(),c=o&&o.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};o.__esModule=!0;var E=c(C()),k=(function(T){d(r,T);function r(){return T!==null&&T.apply(this,arguments)||this}return r.prototype.getTokenizerConfig=function(){return{reservedWords:_,reservedTopLevelWords:i,reservedNewlineWords:U,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]}},r})(E.default);o.default=k;var _=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],i=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],M=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],U=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"]}),b=l(o=>{"use strict";var d=o&&o.__extends||(function(){var T=function(r,u){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,K){x.__proto__=K}||function(x,K){for(var f in K)Object.prototype.hasOwnProperty.call(K,f)&&(x[f]=K[f])},T(r,u)};return function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");T(r,u);function x(){this.constructor=r}r.prototype=u===null?Object.create(u):(x.prototype=u.prototype,new x)}})(),c=o&&o.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};o.__esModule=!0;var E=c(C()),k=(function(T){d(r,T);function r(){return T!==null&&T.apply(this,arguments)||this}return r.prototype.getTokenizerConfig=function(){return{reservedWords:_,reservedTopLevelWords:i,reservedNewlineWords:U,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"],specialWordChars:[]}},r})(E.default);o.default=k;var _=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],i=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],M=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],U=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"]}),S=l(o=>{"use strict";var d=o&&o.__extends||(function(){var r=function(u,x){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,f){K.__proto__=f}||function(K,f){for(var B in f)Object.prototype.hasOwnProperty.call(f,B)&&(K[B]=f[B])},r(u,x)};return function(u,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");r(u,x);function K(){this.constructor=u}u.prototype=x===null?Object.create(x):(K.prototype=x.prototype,new K)}})(),c=o&&o.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};o.__esModule=!0;var E=c(C()),k=h(),_=(function(r){d(u,r);function u(){var x=r!==null&&r.apply(this,arguments)||this;return x.tokenOverride=function(K,f){if(K.type===k.TokenTypes.RESERVED_TOP_LEVEL&&f.value&&K.value.toUpperCase()==="SET"&&f.value.toUpperCase()==="BY")return K.type=k.TokenTypes.RESERVED,K},x}return u.prototype.getTokenizerConfig=function(){return{reservedWords:i,reservedTopLevelWords:M,reservedNewlineWords:T,reservedTopLevelWordsNoIndent:U,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]}},u})(E.default);o.default=_;var i=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],M=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],U=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],T=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"]}),R=l(o=>{"use strict";var d=o&&o.__extends||(function(){var T=function(r,u){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,K){x.__proto__=K}||function(x,K){for(var f in K)Object.prototype.hasOwnProperty.call(K,f)&&(x[f]=K[f])},T(r,u)};return function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");T(r,u);function x(){this.constructor=r}r.prototype=u===null?Object.create(u):(x.prototype=u.prototype,new x)}})(),c=o&&o.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};o.__esModule=!0;var E=c(C()),k=(function(T){d(r,T);function r(){return T!==null&&T.apply(this,arguments)||this}return r.prototype.getTokenizerConfig=function(){return{reservedWords:_,reservedTopLevelWords:i,reservedNewlineWords:U,reservedTopLevelWordsNoIndent:M,stringTypes:['""',"N''","''","``","[]","E''"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":","%","$"],lineCommentTypes:["#","--"],specialWordChars:[]}},r})(E.default);o.default=k;var _=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CASE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","END","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRIGGER","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WHEN","WITH","WORK","WRITE","YEAR_MONTH"],i=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CREATE OR REPLACE","DECLARE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GO","GRANT","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","MODIFY","ORDER BY","RETURNING","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],M=["INTERSECT ALL","INTERSECT","MINUS","UNION ALL","UNION"],U=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","FULL JOIN","FULL OUTER JOIN","LEFT JOIN","LEFT OUTER JOIN","NATURAL JOIN","OR","OUTER APPLY","OUTER JOIN","RENAME","RIGHT JOIN","RIGHT OUTER JOIN","JOIN","WHEN","XOR"]}),g=l(o=>{"use strict";var d=o&&o.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};o.__esModule=!0,o.tokenize=o.format=void 0;var c=d(y()),E=d(b()),k=d(S()),_=d(R()),i=function(U,T){switch(T===void 0&&(T={}),T.language){case"db2":return new c.default(T).format(U);case"n1ql":return new E.default(T).format(U);case"pl/sql":return new k.default(T).format(U);default:return new _.default(T).format(U)}};o.format=i;var M=function(U,T){return T===void 0&&(T={}),new _.default(T).tokenize(U)};o.tokenize=M,o.default={format:o.format,tokenize:o.tokenize}}),O=P(g(),1);globalThis.phpdebugbar_sqlformatter=O.default.default})();window.PhpDebugBar=window.PhpDebugBar||{};(function(){const s=window.PhpDebugBar;s.utils=s.utils||{};const G=s.utils.getDictValue=function(h,e,t){if(h==null)return t;const a=String(e).split(".");let L=h;for(const A of a)if(L==null||(L=L[A],L===void 0))return t;return L};s.utils.csscls=function(h,e){const t=String(h).trim();return t.includes(" ")?t.split(/\s+/).filter(Boolean).map(a=>s.utils.csscls(a,e)).join(" "):t.startsWith(".")?`.${e}${t.slice(1)}`:e+t},s.utils.makecsscls=function(h){return e=>s.utils.csscls(e,h)};const N=s.utils.makecsscls("phpdebugbar-");s.utils.sfDump=function(h){typeof window.Sfdump=="function"&&h.querySelectorAll("pre.sf-dump[id]").forEach(e=>{window.Sfdump(e.id,{maxDepth:0})})},s.utils.schedule=function(h){return window.requestIdleCallback?window.requestIdleCallback(h,{timeout:1e3}):setTimeout(h,0)};class m{get tagName(){return"div"}constructor(e={}){this._attributes=pt({},this.defaults),this._boundAttributes={},this.el=document.createElement(this.tagName),this.className&&this.el.classList.add(...this.className.split(" ")),this.initialize(e),this.render()}initialize(e){this.set(e)}render(){}set(e,t){const a=typeof e=="string"?{[e]:t}:e,L=[];for(const A in a)if(t=a[A],this._attributes[A]=t,this._boundAttributes[A])for(const I of this._boundAttributes[A])L.includes(I)||(I.call(this,t),L.push(I))}has(e){return this._attributes[e]!==void 0&&this._attributes[e]!==null}get(e){return this._attributes[e]}bindAttr(e,t){if(Array.isArray(e)){for(const a of e)this.bindAttr(a,t);return}if(this._boundAttributes[e]||(this._boundAttributes[e]=[]),t instanceof HTMLElement){const a=t;t=L=>a.textContent=L||""}this._boundAttributes[e].push(t),this.has(e)&&t.call(this,this._attributes[e])}static extend(e){const t=this;class a extends t{}for(const L in e){const A=Object.getOwnPropertyDescriptor(e,L);A&&Object.defineProperty(a.prototype,L,A)}return Object.assign(a,t),a.__super__=t.prototype,a}}m.prototype.defaults={},s.Widget=m;class p extends m{get className(){return N("panel")}render(){this.active=!1,this.tab=document.createElement("a"),this.tab.classList.add(N("tab")),this.icon=document.createElement("i"),this.tab.append(this.icon),this.bindAttr("icon",function(t){t?this.icon.className=`phpdebugbar-icon phpdebugbar-icon-${t}`:this.icon.className=""});const e=document.createElement("span");e.classList.add(N("text")),this.tab.append(e),this.bindAttr("title",e),this.badge=document.createElement("span"),this.badge.classList.add(N("badge")),this.tab.append(this.badge),this.bindAttr("badge",function(t){t!==null?(this.badge.textContent=t,this.badge.classList.add(N("visible"))):this.badge.classList.remove(N("visible"))}),this.bindAttr("widget",function(t){this.el.innerHTML="",this.el.append(t.el)}),this.widgetRendered=!1,this.bindAttr("data",function(t){this.has("widget")&&(this.tab.setAttribute("data-empty",Object.keys(t).length===0||t.count===0),!this.widgetRendered&&this.active&&t!=null?this.renderWidgetData():this.widgetRendered=!1)})}renderWidgetData(){const e=this.get("data"),t=this.get("widget");e==null||!t||(t.set("data",e),s.utils.schedule(()=>{s.utils.sfDump(t.el)}),this.widgetRendered=!0)}show(){const e=N("active");this.tab.classList.add(e),this.tab.hidden=!1,this.el.classList.add(e),this.el.hidden=!1,this.active=!0,this.widgetRendered||this.renderWidgetData()}hide(){const e=N("active");this.tab.classList.remove(e),this.el.classList.remove(e),this.el.hidden=!0,this.active=!1}}class w extends m{get tagName(){return"span"}get className(){return N("indicator")}render(){this.icon=document.createElement("i"),this.el.append(this.icon),this.bindAttr("icon",function(t){t?this.icon.className=`phpdebugbar-icon phpdebugbar-icon-${t}`:this.icon.className=""}),this.bindAttr("link",function(t){t?(this.el.addEventListener("click",()=>{this.get("debugbar").showTab(t)}),this.el.style.cursor="pointer"):this.el.style.cursor=""});const e=document.createElement("span");e.classList.add(N("text")),this.el.append(e),this.bindAttr(["title","data"],e),this.tooltip=document.createElement("span"),this.tooltip.classList.add(N("tooltip"),N("disabled")),this.el.append(this.tooltip),this.bindAttr("tooltip",function(t){if(t)if(Array.isArray(t)||typeof t=="object"){const a=document.createElement("dl");for(const[L,A]of Object.entries(t)){const I=document.createElement("dt");I.textContent=L,a.append(I);const C=document.createElement("dd");C.textContent=A,a.append(C)}this.tooltip.innerHTML="",this.tooltip.append(a),this.tooltip.classList.remove(N("disabled"))}else this.tooltip.textContent=t,this.tooltip.classList.remove(N("disabled"));else this.tooltip.classList.add(N("disabled"))})}}class l extends m{get tagName(){return"form"}get className(){return N("settings")}initialize(e){this.set(e);const t=this.get("debugbar");this.settings=JSON.parse(localStorage.getItem("phpdebugbar-settings"))||{};for(const a in t.options)a in this.settings&&(t.options[a]=this.settings[a]),a==="theme"?t.setTheme(t.options[a]):t.el.setAttribute(`data-${a}`,t.options[a])}clearSettings(){const e=this.get("debugbar");if(localStorage.removeItem("phpdebugbar-settings"),localStorage.removeItem("phpdebugbar-ajaxhandler-autoshow"),this.settings={},e.options=pt({},e.defaultOptions),e.ajaxHandler){const t=e.ajaxHandler.defaultAutoShow;e.ajaxHandler.setAutoShow(t),this.set("autoshow",t),e.controls.__datasets&&e.controls.__datasets.get("widget").set("autoshow",this.autoshow.checked)}this.initialize(e.options)}storeSetting(e,t){this.settings[e]=t;const a=this.get("debugbar");a.options[e]=t,e!=="theme"&&a.el.setAttribute(`data-${e}`,t),localStorage.setItem("phpdebugbar-settings",JSON.stringify(this.settings))}render(){this.el.innerHTML="";const e=this.get("debugbar"),t=this,a={},L=document.createElement("select");L.innerHTML='',L.value=e.options.theme,L.addEventListener("change",function(){t.storeSetting("theme",this.value),e.setTheme(this.value)}),a.Theme=L;const A=document.createElement("select");A.innerHTML='',A.value=e.options.openBtnPosition,A.addEventListener("change",function(){t.storeSetting("openBtnPosition",this.value),this.value==="topLeft"||this.value==="topRight"?t.storeSetting("toolbarPosition","top"):t.storeSetting("toolbarPosition","bottom"),t.get("debugbar").recomputeBottomOffset()}),a["Toolbar Position"]=A,this.hideEmptyTabs=document.createElement("input"),this.hideEmptyTabs.type="checkbox",this.hideEmptyTabs.checked=e.options.hideEmptyTabs,this.hideEmptyTabs.addEventListener("click",function(){t.storeSetting("hideEmptyTabs",this.checked),t.get("debugbar").respCSSSize=0,t.get("debugbar").resize()});const I=document.createElement("label");I.append(this.hideEmptyTabs,"Hide empty tabs until they have data"),a["Hide Empty Tabs"]=I;const C=document.createElement("input");C.type="checkbox",C.checked=e.options.showFullscreenBtn,C.addEventListener("click",function(){t.storeSetting("showFullscreenBtn",this.checked),e.toggleFullscreenBtn(this.checked)});const y=document.createElement("label");y.append(C,"Show fullscreen button in toolbar"),a.Fullscreen=y,this.autoshow=document.createElement("input"),this.autoshow.type="checkbox",this.autoshow.checked=e.ajaxHandler&&e.ajaxHandler.autoShow,this.autoshow.addEventListener("click",function(){e.ajaxHandler&&e.ajaxHandler.setAutoShow(this.checked),e.controls.__datasets&&e.controls.__datasets.get("widget").set("autoshow",this.checked),e.datasetSwitcherWidget&&e.datasetSwitcherWidget.set("autoshow",this.checked)}),this.bindAttr("autoshow",function(){this.autoshow.checked=this.get("autoshow");const R=this.autoshow.closest(`.${N("form-row")}`);R&&(R.style.display="")});const b=document.createElement("label");b.append(this.autoshow,"Automatically show new incoming Ajax requests"),a.Autoshow=b;const S=document.createElement("button");S.textContent="Reset settings",S.addEventListener("click",R=>{R.preventDefault(),t.clearSettings(),t.render()}),a["Reset to defaults"]=S;for(const[R,g]of Object.entries(a)){const O=document.createElement("div");O.classList.add(N("form-row"));const o=document.createElement("div");o.classList.add(N("form-label")),o.textContent=R,O.append(o);const d=document.createElement("div");d.classList.add(N("form-input")),g instanceof HTMLElement?d.append(g):d.innerHTML=g,O.append(d),t.el.append(O)}e.ajaxHandler||(this.autoshow.closest(`.${N("form-row")}`).style.display="none")}}class H{constructor(e){this.debugbar=e}format(e,t,a,L){if(a=a?` ${a}`:"",L=L||Object.keys(this.debugbar.datasets).length,t.__meta===void 0)return`#${L}${a}`;const A=t.__meta.uri.split("/");let I=A.pop();I||(I=`${A.pop()||""}/`),A.length&&!Number.isNaN(I)&&(I=`${A.pop()}/${I}`);const C=150;return I.length>C&&(I=`${I.substr(0,C)}...`),`#${L} ${I}${a} (${t.__meta.datetime.split(" ")[1]})`}}s.DatasetTitleFormater=H;class P extends m{get className(){return"phpdebugbar"}initialize(e={}){this.options=Object.assign({bodyBottomInset:!0,theme:"auto",toolbarPosition:"bottom",openBtnPosition:"bottomLeft",hideEmptyTabs:!1,showFullscreenBtn:!1,spaNavigationEvents:[]},e),this.defaultOptions=pt({},this.options),this.controls={},this.dataMap={},this.datasets={},this.firstTabName=null,this.activePanelName=null,this.activeDatasetId=null,this.pendingDataSetId=null,this.datesetTitleFormater=new H(this);const t=window.getComputedStyle(document.body);this.bodyPaddingBottomHeight=Number.parseInt(t.paddingBottom),this.bodyPaddingTopHeight=Number.parseInt(t.paddingTop);try{this.isIframe=window.self!==window.top&&window.top.PhpDebugBar&&window.top.PhpDebugBar}catch(a){this.isIframe=!1}this.registerResizeHandler(),this.registerMediaListener(),this.registerNavigationListener(),this.settingsControl=new s.DebugBar.Tab({icon:"adjustments-horizontal",title:"Settings",widget:new l({debugbar:this})})}registerResizeHandler(){if(this.resize.bind===void 0||this.isIframe)return;const e=this.resize.bind(this);this.respCSSSize=0,window.addEventListener("resize",e),setTimeout(e,20)}registerMediaListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.options.theme==="auto"&&this.setTheme("auto")})}registerNavigationListener(){const e=this.options.spaNavigationEvents;if(!(!e||!e.length))for(const t of e)document.addEventListener(t,()=>{this.recalculateBodyPadding()})}recalculateBodyPadding(){if(!this.options.bodyBottomInset)return;document.body.style.paddingTop="",document.body.style.paddingBottom="";const e=window.getComputedStyle(document.body);this.bodyPaddingTopHeight=Number.parseFloat(e.paddingTop),this.bodyPaddingBottomHeight=Number.parseFloat(e.paddingBottom),this.recomputeBottomOffset()}setTheme(e){this.options.theme=e,e==="auto"&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),this.el.setAttribute("data-theme",e),this.openHandler&&this.openHandler.el.setAttribute("data-theme",e),this.datasetSwitcherWidget&&this.datasetSwitcherWidget.panel&&this.datasetSwitcherWidget.panel.setAttribute("data-theme",e)}resize(){if(this.isIframe)return;let e=this.respCSSSize;if(this.respCSSSize===0){const I=Array.from(this.header.children).filter(C=>C.offsetParent!==null);for(const C of I){const y=window.getComputedStyle(C);e+=C.offsetWidth+Number.parseFloat(y.marginLeft)+Number.parseFloat(y.marginRight)}}const t=this.header.offsetWidth,a=N("mini-design"),L=this.header.classList.contains(a);t<=e&&!L?(this.respCSSSize=e,this.header.classList.add(a)):e{e.close()}),this.headerLeft=document.createElement("div"),this.headerLeft.classList.add(N("header-left")),this.header.append(this.headerLeft),this.headerRight=document.createElement("div"),this.headerRight.classList.add(N("header-right")),this.header.append(this.headerRight),this.body=document.createElement("div"),this.body.classList.add(N("body")),this.el.append(this.body),this.recomputeBottomOffset(),this.resizeHandleBottom=document.createElement("div"),this.resizeHandleBottom.classList.add(N("resize-handle")),this.resizeHandleBottom.classList.add(N("resize-handle-bottom")),this.el.append(this.resizeHandleBottom);let t,a;const L=C=>{const y=a+(t-C.pageY);e.setHeight(y)},A=C=>{const y=a-(t-C.pageY);e.setHeight(y)},I=()=>{document.removeEventListener("mousemove",L),document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",I),e.dragCapture.style.display="none"};this.resizeHandle.addEventListener("mousedown",C=>{a=e.body.offsetHeight,t=C.pageY,document.addEventListener("mousemove",L),document.addEventListener("mouseup",I),e.dragCapture.style.display="",C.preventDefault()}),this.resizeHandleBottom.addEventListener("mousedown",C=>{a=e.body.offsetHeight,t=C.pageY,document.addEventListener("mousemove",A),document.addEventListener("mouseup",I),e.dragCapture.style.display="",C.preventDefault()}),this.closebtn=document.createElement("a"),this.closebtn.classList.add(N("close-btn")),this.headerRight.append(this.closebtn),this.closebtn.addEventListener("click",()=>{e.close()}),this.fullscreenbtn=document.createElement("a"),this.fullscreenbtn.classList.add(N("fullscreen-btn")),this.fullscreenbtn.hidden=!this.options.showFullscreenBtn,this.headerRight.append(this.fullscreenbtn),this.fullscreenbtn.addEventListener("click",()=>{e.toggleFullscreen()}),this.minimizebtn=document.createElement("a"),this.minimizebtn.classList.add(N("minimize-btn")),this.minimizebtn.hidden=!this.isMinimized(),this.headerRight.append(this.minimizebtn),this.minimizebtn.addEventListener("click",()=>{e.minimize()}),this.maximizebtn=document.createElement("a"),this.maximizebtn.classList.add(N("maximize-btn")),this.maximizebtn.hidden=this.isMinimized(),this.headerRight.append(this.maximizebtn),this.maximizebtn.addEventListener("click",()=>{e.restore()}),this.restorebtn=document.createElement("a"),this.restorebtn.classList.add(N("restore-btn")),this.restorebtn.hidden=!0,this.el.append(this.restorebtn),this.restorebtn.addEventListener("click",()=>{e.restore()}),this.openbtn=document.createElement("a"),this.openbtn.classList.add(N("open-btn")),this.openbtn.hidden=!0,this.headerRight.append(this.openbtn),this.openbtn.addEventListener("click",()=>{e.openHandler.show((C,y)=>{e.addDataSet(y,C,"(opened)")})}),this.datasetsSelectSpan=document.createElement("span"),this.datasetsSelectSpan.classList.add(N("datasets-switcher")),this.datasetsSelectSpan.setAttribute("name","datasets-switcher"),this.datasetsSelect=document.createElement("select"),this.datasetsSelect.hidden=!0,this.datasetsSelectSpan.append(this.datasetsSelect),this.headerRight.append(this.datasetsSelectSpan),this.datasetsSelect.addEventListener("change",function(){e.showDataSet(this.value)}),this.controls.__settings=this.settingsControl,this.settingsControl.tab.classList.add(N("tab-settings")),this.settingsControl.tab.setAttribute("data-collector","__settings"),this.settingsControl.el.setAttribute("data-collector","__settings"),this.settingsControl.el.hidden=!0,this.maximizebtn.after(this.settingsControl.tab),this.settingsControl.tab.hidden=!1,this.settingsControl.tab.addEventListener("click",()=>{!this.isMinimized()&&this.activePanelName==="__settings"&&!this.isFullscreen()?this.minimize():(this.showTab("__settings"),this.settingsControl.get("widget").render())}),this.body.append(this.settingsControl.el)}setHeight(e){if(this.isFullscreen())return;const t=40,a=window.innerHeight-this.header.offsetHeight-10;e=Math.min(e,a),e=Math.max(e,t),this.body.style.height=`${e}px`,localStorage.setItem("phpdebugbar-height",e),this.recomputeBottomOffset()}restoreState(){if(this.isIframe)return;const e=localStorage.getItem("phpdebugbar-height");this.setHeight(Number.parseInt(e)||this.body.offsetHeight);const t=localStorage.getItem("phpdebugbar-open");if(t&&t==="0")this.close();else{const a=localStorage.getItem("phpdebugbar-visible");if(a&&a==="1"){const L=localStorage.getItem("phpdebugbar-tab");this.isTab(L)?this.showTab(L):this.showTab()}else this.minimize()}this.options.showFullscreenBtn&&sessionStorage.getItem("phpdebugbar-fullscreen")==="1"&&this.toggleFullscreen()}createTab(e,t,a){const L=new p({title:a||e.replace(/[_-]/g," ").charAt(0).toUpperCase()+e.slice(1),widget:t});return this.addTab(e,L)}addTab(e,t){if(this.isControl(e))throw new Error(`${e} already exists`);const a=this;return this.headerLeft.append(t.tab),t.tab.addEventListener("click",()=>{!a.isMinimized()&&a.activePanelName===e&&!a.isFullscreen()?a.minimize():(a.restore(),a.showTab(e))}),t.tab.setAttribute("data-empty",!0),t.tab.setAttribute("data-collector",e),t.el.setAttribute("data-collector",e),this.body.append(t.el),this.controls[e]=t,this.firstTabName===null&&(this.firstTabName=e),t}createIndicator(e,t,a,L){const A=new w({icon:t,tooltip:a});return this.addIndicator(e,A,L)}addIndicator(e,t,a){if(this.isControl(e))throw new Error(`${e} already exists`);return t.set("debugbar",this),a==="left"?this.headerLeft.prepend(t.el):this.headerRight.append(t.el),this.controls[e]=t,t}getControl(e){if(this.isControl(e))return this.controls[e]}isControl(e){return this.controls[e]!==void 0}isTab(e){return this.isControl(e)&&this.controls[e]instanceof p}isIndicator(e){return this.isControl(e)&&this.controls[e]instanceof w}reset(){this.minimize();for(const[e,t]of Object.entries(this.controls))this.isTab(e)&&t.tab.remove(),t.el.remove();this.controls={}}showTab(e){if(e||(this.activePanelName?e=this.activePanelName:e=this.firstTabName),!this.isTab(e))throw new Error(`Unknown tab '${e}'`);this.body.hidden=!1,this.recomputeBottomOffset();for(const[t,a]of Object.entries(this.controls))a instanceof p&&(t===e?a.show():a.hide());this.activePanelName=e,this.el.classList.remove(N("minimized")),localStorage.setItem("phpdebugbar-visible","1"),localStorage.setItem("phpdebugbar-tab",e),this.maximize()}minimize(){this.exitFullscreen();const e=N("active"),t=this.header.querySelectorAll(`:scope > div > .${e}`);for(const a of t)a.classList.remove(e);this.body.hidden=!0,this.minimizebtn.hidden=!0,this.maximizebtn.hidden=!1,this.recomputeBottomOffset(),localStorage.setItem("phpdebugbar-visible","0"),this.el.classList.add(N("minimized")),this.resize()}maximize(){this.header.hidden=!1,this.restorebtn.hidden=!0,this.body.hidden=!1,this.minimizebtn.hidden=!1,this.maximizebtn.hidden=!0,this.recomputeBottomOffset(),localStorage.setItem("phpdebugbar-visible","1"),localStorage.setItem("phpdebugbar-open","1"),this.el.classList.remove(N("minimized")),this.el.classList.remove(N("closed")),this.resize()}isMinimized(){return this.el.classList.contains(N("minimized"))}toggleFullscreen(){this.isFullscreen()?this.exitFullscreen():(this._preFullscreenHeight=this.body.offsetHeight,this.el.classList.add(N("fullscreen")),this.body.style.height="",sessionStorage.setItem("phpdebugbar-fullscreen","1"),this.recomputeBottomOffset())}exitFullscreen(){this.isFullscreen()&&(this.el.classList.remove(N("fullscreen")),this._preFullscreenHeight&&(this.body.style.height=`${this._preFullscreenHeight}px`),sessionStorage.removeItem("phpdebugbar-fullscreen"),this.recomputeBottomOffset())}isFullscreen(){return this.el.classList.contains(N("fullscreen"))}toggleFullscreenBtn(e){this.fullscreenbtn.hidden=!e,e||this.exitFullscreen()}close(){this.exitFullscreen(),this.header.hidden=!0,this.body.hidden=!0,this.restorebtn.hidden=!1,localStorage.setItem("phpdebugbar-open","0"),this.el.classList.add(N("closed")),this.recomputeBottomOffset()}isClosed(){return this.el.classList.contains(N("closed"))}restore(){const e=localStorage.getItem("phpdebugbar-tab");this.pendingDataSetId&&(this.dataChangeHandler(this.datasets[this.pendingDataSetId]),this.pendingDataSetId=null),this.isTab(e)?this.showTab(e):this.showTab()}recomputeBottomOffset(){if(this.options.bodyBottomInset){if(this.isClosed()){document.body.style.paddingBottom=this.bodyPaddingBottomHeight?`${this.bodyPaddingBottomHeight}px`:"",document.body.style.paddingTop=this.bodyPaddingTopHeight?`${this.bodyPaddingTopHeight}px`:"";return}if(this.options.toolbarPosition==="top"){const e=this.el.offsetHeight+(this.bodyPaddingTopHeight||0);document.body.style.paddingTop=`${e}px`,document.body.style.paddingBottom=this.bodyPaddingBottomHeight?`${this.bodyPaddingBottomHeight}px`:""}else{const e=this.el.offsetHeight+(this.bodyPaddingBottomHeight||0);document.body.style.paddingBottom=`${e}px`,document.body.style.paddingTop=this.bodyPaddingTopHeight?`${this.bodyPaddingTopHeight}px`:""}}}setDataMap(e){this.dataMap=e}addDataMap(e){Object.assign(this.dataMap,e)}setData(e){return this.datasets={},this.addDataSet(e)}addDataSet(e,t,a,L){if(!e||!e.__meta)return;if(this.isIframe&&window.top.PhpDebugBar&&window.top.PhpDebugBar.instance){window.top.PhpDebugBar.instance.addDataSet(e,t,`(iframe)${a||""}`,L);return}const A=Object.keys(this.datasets).length+1;t=t||A,e.__meta.nb=A,e.__meta.suffix=a,this.datasets[t]=e;const I=this.datesetTitleFormater.format(t,this.datasets[t],a,A);if(this.datasetSwitcherWidget)this.datasetSwitcherWidget.set("data",this.datasets);else{const C=document.createElement("option");C.value=t,C.textContent=I,this.datasetsSelect.append(C),this.datasetsSelect.hidden=!1}return(L===void 0||L)&&this.showDataSet(t),this.resize(),t}loadDataSet(e,t,a,L){if(!this.openHandler)throw new Error("loadDataSet() needs an open handler");const A=this;this.openHandler.load(e,I=>{A.addDataSet(I,e,t,L),A.resize(),a&&a(I)})}getDataSet(e){return this.datasets[e]}showDataSet(e){this.activeDatasetId=e,this.isClosed()?this.pendingDataSetId=e:(this.dataChangeHandler(this.datasets[e]),this.pendingDataSetId=null),this.datasetSwitcherWidget?this.datasetSwitcherWidget.set("activeId",e):this.datasetsSelect.value=e}dataChangeHandler(e){for(const[t,a]of Object.entries(this.dataMap)){const L=G(e,a[0],a[1]);if(t.includes(":")){const A=t.split(":");this.getControl(A[0]).set(A[1],L)}else this.getControl(t).set("data",L)}this.isMinimized()||this.showTab(),this.resize()}setOpenHandler(e){this.openHandler=e,this.openHandler.el.setAttribute("data-theme",this.el.getAttribute("data-theme")),this.openbtn.hidden=e==null}getOpenHandler(){return this.openHandler}enableAjaxHandlerTab(){this.datasetsSelectSpan&&(this.datasetsSelectSpan.hidden=!0),this.datasetSwitcherWidget=new s.Widgets.DatasetWidget({debugbar:this}),this.openbtn.after(this.datasetSwitcherWidget.el)}}s.DebugBar=P,P.Tab=p,P.Indicator=w;class W{constructor(e,t,a){this.debugbar=e,this.headerName=t||"phpdebugbar",this.autoShow=a===void 0?!0:a,this.defaultAutoShow=this.autoShow,localStorage.getItem("phpdebugbar-ajaxhandler-autoshow")!==null&&(this.autoShow=localStorage.getItem("phpdebugbar-ajaxhandler-autoshow")==="1"),e.controls.__settings&&e.controls.__settings.get("widget").set("autoshow",this.autoShow)}handle(e){const t=this.getHeader(e,`${this.headerName}-stack`);return t&&JSON.parse(t).forEach(L=>{this.debugbar.loadDataSet(L," (stacked)",null,!1)}),!!(this.loadFromId(e)||this.loadFromData(e))}getHeader(e,t){return e instanceof Response?e.headers.get(t):e instanceof XMLHttpRequest?e.getResponseHeader(t):null}setAutoShow(e){this.autoShow=e,localStorage.setItem("phpdebugbar-ajaxhandler-autoshow",e?"1":"0")}loadFromId(e){const t=this.extractIdFromHeaders(e);return t&&this.debugbar.openHandler?(this.debugbar.loadDataSet(t,"(ajax)",void 0,this.autoShow),!0):!1}extractIdFromHeaders(e){return this.getHeader(e,`${this.headerName}-id`)}loadFromData(e){const t=this.extractDataFromHeaders(e);if(!t)return!1;const a=this.parseHeaders(t);if(a.error)throw new Error(`Error loading debugbar data: ${a.error}`);return a.data&&this.debugbar.addDataSet(a.data,a.id,"(ajax)",this.autoShow),!0}extractDataFromHeaders(e){let t=this.getHeader(e,this.headerName);if(t){for(let a=1;;a++){const L=this.getHeader(e,`${this.headerName}-${a}`);if(!L)break;t+=L}return decodeURIComponent(t)}}parseHeaders(e){return JSON.parse(e)}bindToFetch(){const e=this,t=window.fetch.__debugbar_original||window.fetch,a=t.bind(window);function L(...A){var C;const I=a(...A);return(C=I==null?void 0:I.then)==null||C.call(I,y=>e.handle(y)).catch(()=>{}),I}L.__debugbar_wrapped=!0,L.__debugbar_original=t,window.fetch=L}bindToXHR(){const e=this,t=XMLHttpRequest.prototype,a=(t.open||{}).__debugbar_original||t.open;if(typeof a!="function")return;function L(A,I,C=!0,y=null,b=null){return this.__debugbar_listener_attached||(this.__debugbar_listener_attached=!0,this.addEventListener("readystatechange",()=>{this.readyState===4&&e.handle(this)})),a.call(this,A,I,C,y,b)}L.__debugbar_wrapped=!0,L.__debugbar_original=a,t.open=L}}s.AjaxHandler=W})();(function(){PhpDebugBar.Widgets={};const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-"),G=PhpDebugBar.Widgets.htmlize=function(y){return y.replace(/\n/g,"
").replace(/\s/g," ")};let N;const m=PhpDebugBar.Widgets.renderValue=function(y,b){return y&&typeof y=="object"?(N||(N=new PhpDebugBar.Widgets.VarDumpRenderer),N.render(y)):typeof y!="string"?b?G(JSON.stringify(y,void 0,2)):JSON.stringify(y):y};PhpDebugBar.Widgets.renderValueInto=function(y,b,S){const R=m(b,S);R instanceof Node?y.append(R):y.insertAdjacentHTML("beforeend",R)};const p=PhpDebugBar.Widgets.editorLink=function(y){const b=document.createElement("span"),S=y.line?`#${y.line}`:"";if(b.classList.add(s("filename")),b.textContent=y.filename+S,y.path&&b.setAttribute("title",y.path+S),y.url){const R=document.createElement("a");R.classList.add(s("editor-link")),R.setAttribute(R.ajax?"title":"href",y.url),R.addEventListener("click",g=>{g.stopPropagation(),y.ajax&&(fetch(stmt.xdebug_link.url),g.preventDefault())}),b.append(R)}return b},w=PhpDebugBar.Widgets.highlight=function(y,b){if(typeof phpdebugbar_hljs=="undefined")return G(y);const S=phpdebugbar_hljs;return b&&S.getLanguage(b)?S.highlight(y,{language:b}).value:S.highlightAuto(y).value},l=PhpDebugBar.Widgets.createCodeBlock=function(y,b,S,R){const g=document.createElement("pre");g.classList.add(s("code-block"));const O=document.createElement("code");if(O.innerHTML=w(`${y} `,b),g.append(O),!Number.isNaN(Number.parseFloat(S))){const o=y.split(` `).length,d=document.createElement("ul");g.prepend(d);const c=Array.from(g.children);for(const E of c)E.classList.add(s("numbered-code"));for(let E=S;E100&&(o=`${o.substr(0,100)}...`);let d=null;S.textContent=o,S.addEventListener("click",()=>{if(window.getSelection().type==="Range")return"";S.classList.contains(s("pretty"))?(S.textContent=o,S.classList.remove(s("pretty"))):(d=d||l(g),S.classList.add(s("pretty")),S.innerHTML="",S.append(d))})}}PhpDebugBar.Widgets.VariableListWidget=h;class e extends W{get className(){return s("kvlist htmlvarlist")}itemRenderer(b,S,R,g){const O=document.createElement("i");O.innerHTML=R!=null?R:"";const o=document.createElement("span");o.setAttribute("title",O.textContent),o.innerHTML=R!=null?R:"",b.append(o),S.innerHTML=g&&g.value||g,g!=null&&g.xdebug_link&&S.append(p(g.xdebug_link))}}PhpDebugBar.Widgets.HtmlVariableListWidget=e;class t extends PhpDebugBar.Widget{get tagName(){return"div"}get className(){return s("tablevarlist")}render(){this.bindAttr("data",function(b){var E,k,_;if(this.el.innerHTML="",!this.has("data"))return;this.table=document.createElement("table"),this.table.classList.add(s("tablevar")),this.el.append(this.table);const S=document.createElement("tr");S.classList.add(s("header"));const R=document.createElement("td");S.append(R),this.table.append(S);let g=b.key_map||{value:"Value"};Array.isArray(g)&&(g=Object.fromEntries(g.map(i=>[i,null])));for(const[i,M]of Object.entries(g)){const U=document.createElement("td");if(U.textContent=M!=null?M:i,S.append(U),b.badges&&b.badges[i]){const T=document.createElement("span");T.textContent=b.badges[i],T.classList.add(s("badge")),U.append(T)}}const O=this;if(!b.data)return;let o=!1;for(const[i,M]of Object.entries(b.data)){const U=document.createElement("tr");U.classList.add(s("item")),O.table.append(U);const T=document.createElement("td");if(T.classList.add(s("key")),T.textContent=i,U.append(T),typeof M!="object"||M===null){const r=document.createElement("td");r.classList.add(s("value")),r.textContent=M!=null?M:"",U.append(r);continue}for(const r of Object.keys(g)){const u=document.createElement("td");u.classList.add(s("value")),u.textContent=(E=M[r])!=null?E:"",U.append(u)}if(M.xdebug_link){const r=document.createElement("td");r.classList.add(s("editor")),r.append(p(M.xdebug_link)),U.append(r),o||(o=!0,S.append(document.createElement("td")))}}if(!b.summary)return;const d=document.createElement("tr");d.classList.add(s("summary")),O.table.append(d);const c=document.createElement("td");if(c.classList.add(s("key")),d.append(c),typeof b.summary!="object"||b.summary===null){const i=document.createElement("td");i.classList.add(s("value")),i.textContent=(k=b.summary)!=null?k:"",d.append(i)}else for(const i of Object.keys(g)){const M=document.createElement("td");M.classList.add(s("value")),M.textContent=(_=b.summary[i])!=null?_:"",d.append(M)}o&&d.append(document.createElement("td"))})}}PhpDebugBar.Widgets.TableVariableListWidget=t;class a extends PhpDebugBar.Widget{get tagName(){return"iframe"}get className(){return s("iframe")}render(){this.el.setAttribute("seamless","seamless"),this.el.setAttribute("border","0"),this.el.setAttribute("width","100%"),this.el.setAttribute("height","100%"),this.bindAttr("data",function(b){this.el.setAttribute("src",b)})}}PhpDebugBar.Widgets.IFrameWidget=a;class L extends PhpDebugBar.Widget{get className(){return s("messages")}render(){const b=this;this.list=new P({itemRenderer(R,g){let O;if(g.message_json)O=document.createElement("span"),O.classList.add(s("value")),PhpDebugBar.Widgets.renderValueInto(O,g.message_json),R.append(O);else if(g.message_html)O=document.createElement("span"),O.classList.add(s("value")),O.innerHTML=g.message_html,R.append(O);else{const o=g.message;if(O=document.createElement("span"),O.classList.add(s("value")),O.textContent=o,O.classList.add(s("truncated")),R.append(O),!g.is_string||O.scrollWidth>O.clientWidth){let d=g.message;g.is_string||(d=null),R.style.cursor="pointer",R.addEventListener("click",()=>{if(window.getSelection().type==="Range")return"";O.classList.contains(s("pretty"))?(O.textContent=o,O.classList.remove(s("pretty")),O.classList.add(s("truncated"))):(d=d||l(g.message),O.classList.add(s("pretty")),O.classList.remove(s("truncated")),O.innerHTML="",O.append(d))})}}if(g.collector){const o=document.createElement("span");o.classList.add(s("collector")),o.textContent=g.collector,R.prepend(o)}if(g.label){O.classList.add(s(g.label));const o=document.createElement("span");o.classList.add(s("label")),o.textContent=g.label,R.prepend(o)}if(g.context&&Object.keys(g.context).length>0){const o=document.createElement("span");o.setAttribute("title","Context"),o.classList.add(s("context-count")),o.textContent=Object.keys(g.context).length,R.prepend(o);const d=document.createElement("table");d.classList.add(s("params")),d.hidden=!0,d.innerHTML='Context';const c=g.context_json||{};for(const E in g.context)if(typeof g.context[E]!="function"){const k=document.createElement("tr"),_=document.createElement("td");_.classList.add(s("name")),_.textContent=E,k.append(_);const i=document.createElement("td");i.classList.add(s("value")),c[E]?PhpDebugBar.Widgets.renderValueInto(i,c[E]):i.innerHTML=g.context[E],k.append(i),d.append(k)}R.append(d),R.style.cursor="pointer",R.addEventListener("click",E=>{window.getSelection().type==="Range"||E.target.closest(".sf-dump")||(d.hidden=!d.hidden)})}g.xdebug_link&&R.prepend(p(g.xdebug_link))}}),this.el.append(this.list.el),this.toolbar=document.createElement("div"),this.toolbar.classList.add(s("toolbar")),this.toolbar.innerHTML='',this.el.append(this.toolbar);const S=document.createElement("input");S.type="text",S.name="search",S.setAttribute("aria-label","Search"),S.placeholder="Search",S.addEventListener("change",function(){b.set("search",this.value)}),this.toolbar.append(S),this.bindAttr("data",function(R){this.set({excludelabel:[],excludecollector:[],search:""});const g=this.toolbar.querySelectorAll(`.${s("filter")}`);for(const k of g)k.remove();const O=[],o=[],d=this,c=function(k,_){const i=document.createElement("a");i.classList.add(s("filter")),i.classList.add(s(k)),i.textContent=_,i.setAttribute("rel",_),i.addEventListener("click",function(){d.onFilterClick(this,k)}),d.toolbar.append(i)};if(R.forEach(k=>{O.includes(k.label||"none")||O.push(k.label||"none"),o.includes(k.collector||"none")||o.push(k.collector||"none")}),O.length>1&&O.forEach(k=>c("label",k)),o.length===1)return;const E=document.createElement("a");E.classList.add(s("filter")),E.style.visibility="hidden",d.toolbar.append(E),o.forEach(k=>c("collector",k))}),this.bindAttr(["excludelabel","excludecollector","search"],function(){const R=this.get("excludelabel")||[],g=this.get("excludecollector")||[],O=this.get("search");let o=!1;const d=[];O&&O===O.toLowerCase()&&(o=!0),this.get("data").forEach(c=>{let E=c.message;c.message_json?E=JSON.stringify(c.message_json):c.message_html&&(E=c.message_html.replace(/<[^>]*>/g,"")),o&&(E=E.toLowerCase()),!R.includes(c.label||void 0)&&!g.includes(c.collector||void 0)&&(!O||E.includes(O))&&d.push(c)}),this.list.set("data",d)})}onFilterClick(b,S){b.classList.toggle(s("excluded"));const R=[],g=`.${s("filter")}.${s("excluded")}.${s(S)}`,O=this.toolbar.querySelectorAll(g);for(const o of O)R.push(o.rel==="none"||!o.rel?void 0:o.rel);this.set(`exclude${S}`,R)}}PhpDebugBar.Widgets.MessagesWidget=L;class A extends PhpDebugBar.Widget{get tagName(){return"ul"}get className(){return s("timeline")}render(){this.bindAttr("data",function(b){const S=function(g){return g<.001?`${(g*1e6).toFixed()}\u03BCs`:g<.1?`${(g*1e3).toFixed(2)}ms`:g<1?`${(g*1e3).toFixed()}ms`:`${g.toFixed(2)}s`},R=function(O){if(O===0||O===null)return"0B";const o=O<0?"-":"",d=Math.abs(O),c=Math.log(d)/Math.log(1024),E=["B","KB","MB","GB","TB"];return o+Math.round(Bt(1024,c-Math.floor(c))*100)/100+E[Math.floor(c)]};if(this.el.innerHTML="",b.measures){let g={};for(let d=0;d1?k.length+"x ":"")+c.label.replace(/\s+/g," ")+(c.duration?` (${c.duration_str}${c.memory?`/${c.memory_str}`:""})`:""),_.append(M),c.collector){const U=document.createElement("span");U.classList.add(s("collector")),U.textContent=c.collector,_.append(U)}if(i.append(_),this.el.append(i),c.params&&Object.keys(c.params).length>0){const U=document.createElement("table");U.classList.add(s("params")),U.hidden=!0,U.innerHTML='Params';for(const T in c.params)if(typeof c.params[T]!="function"){const r=document.createElement("tr"),u=document.createElement("td");u.className=s("name"),u.textContent=T,r.append(u);const x=document.createElement("td");x.className=s("value"),PhpDebugBar.Widgets.renderValueInto(x,c.params[T]),r.append(x),U.append(r)}i.append(U),i.style.cursor="pointer",i.addEventListener("click",function(T){if(window.getSelection().type==="Range"||T.target.closest(".sf-dump"))return"";const r=this.querySelector("table");r.hidden=!r.hidden})}}g=Object.entries(g).map(([d,c])=>({label:d,data:c})).sort((d,c)=>c.data.duration-d.data.duration);const O=document.createElement("table");O.classList.add(s("params"));for(const d of g){const c=Math.min((d.data.duration*100/b.duration).toFixed(2),100),E=document.createElement("i");E.textContent=d.label.replace(/\s+/g," ");const k=E.innerHTML,_=document.createElement("tr");_.innerHTML=`${d.data.count} x ${k} (${c}%)
${S(d.data.duration)}${d.data.memory?`/${R(d.data.memory)}`:""}
`,O.append(_);const i=_.querySelector(`span.${s("value")}`);i.style.width=`${c}%`}const o=document.createElement("li");o.append(O),this.el.append(o)}})}}PhpDebugBar.Widgets.TimelineWidget=A;class I extends PhpDebugBar.Widget{get className(){return s("exceptions")}render(){this.list=new P({itemRenderer(b,S){const R=document.createElement("span");if(R.classList.add(s("message")),R.textContent=S.message,S.count>1){const g=document.createElement("span");g.classList.add(s("badge")),g.textContent=`${S.count}x`,R.prepend(g)}if(b.append(R),S.file&&b.append(p(S.xdebug_link||{filename:S.file,line:S.line})),S.type){const g=document.createElement("span");g.classList.add(s("type")),g.textContent=S.type,b.append(g)}if(S.surrounding_lines){const g=S.line-3<=0?1:S.line-3,O=l(S.surrounding_lines.join(""),"php",g,S.line);O.classList.add(s("file")),O.hidden=!0,b.append(O),b.addEventListener("click",o=>{window.getSelection().type==="Range"||o.target.closest(".sf-dump")||(O.hidden=!O.hidden)})}if(S.stack_trace_json||S.stack_trace_html){const g=document.createElement("span");if(g.classList.add(s("filename")),S.stack_trace_json){const o=S.stack_trace_json,d=o._sd;o._sd=0,PhpDebugBar.Widgets.renderValueInto(g,o),o._sd=d}else g.innerHTML=S.stack_trace_html;const O=g.querySelector(".sf-dump-note");O&&(O.innerHTML=`${O.innerHTML.replace(/^array:/,'Stack Trace: ')} lines`),b.append(g)}else S.stack_trace&&S.stack_trace.split(` `).forEach(g=>{const O=document.createElement("div"),o=document.createElement("span");o.classList.add(s("filename")),o.textContent=g,O.append(o),b.append(O)})}}),this.el.append(this.list.el),this.bindAttr("data",function(b){if(this.list.set("data",b),b.length===1){const S=this.list.el.children[0];if(S){const R=S.querySelector(`.${s("file")}`);R&&(R.hidden=!1)}}})}}PhpDebugBar.Widgets.ExceptionsWidget=I;class C extends PhpDebugBar.Widget{get className(){return s("datasets-switcher-widget")}initialize(b){this.set(b);const S=this,R=this.get("debugbar");this.badge=document.createElement("div"),this.badge.classList.add(s("datasets-badge")),this.badge.hidden=!0,this.badgeCount=document.createElement("span"),this.badgeCount.classList.add(s("datasets-badge-count")),this.badge.append(this.badgeCount),this.badgeUrl=document.createElement("span"),this.badgeUrl.classList.add(s("datasets-badge-url")),this.badge.append(this.badgeUrl),this.panel=document.createElement("div"),this.panel.classList.add(s("datasets-panel")),this.panel.hidden=!0,R.el&&this.panel.setAttribute("data-theme",R.el.getAttribute("data-theme"));const g=document.createElement("div");g.classList.add(s("datasets-panel-toolbar"));const O=document.createElement("label");O.classList.add(s("datasets-autoshow")),this.autoshowCheckbox=document.createElement("input"),this.autoshowCheckbox.type="checkbox";const o=localStorage.getItem("phpdebugbar-ajaxhandler-autoshow");this.autoshowCheckbox.checked=o!==null?o==="1":R.ajaxHandler?R.ajaxHandler.autoShow:!0,this.autoshowCheckbox.addEventListener("change",function(){R.ajaxHandler&&R.ajaxHandler.setAutoShow(this.checked),R.controls.__settings&&R.controls.__settings.get("widget").set("autoshow",this.checked),R.controls.__datasets&&R.controls.__datasets.get("widget").set("autoshow",this.checked)}),O.append(this.autoshowCheckbox),O.append(document.createTextNode(" Autoshow")),g.append(O),this.refreshBtn=document.createElement("a"),this.refreshBtn.tabIndex=0,this.refreshBtn.classList.add(s("datasets-refresh-btn")),this.refreshBtn.innerHTML='',this.refreshBtn.title="Auto-scan for new datasets",this.isScanning=!1,this.refreshBtn.addEventListener("click",E=>{E.stopPropagation(),this.isScanning?(this.isScanning=!1,this.refreshBtn.classList.remove(s("active")),this.refreshBtn.title="Auto-scan for new datasets"):(this.isScanning=!0,this.refreshBtn.classList.add(s("active")),this.refreshBtn.title="Stop auto-scanning",this.scanForNewDatasets())}),g.append(this.refreshBtn);const d=document.createElement("a");d.tabIndex=0,d.classList.add(s("datasets-clear-btn")),d.textContent="Clear",d.addEventListener("click",()=>{const E=R.activeDatasetId,k=R.datasets[E];R.datasets={},k&&R.addDataSet(k,E,k.__meta.suffix,!0),this.panel.hidden=!0}),g.append(d),this.searchInput=document.createElement("input"),this.searchInput.type="search",this.searchInput.placeholder="Search",this.searchInput.classList.add(s("datasets-search")),this.searchInput.addEventListener("input",()=>{S.applySearchFilter()}),g.append(this.searchInput),this.panel.append(g),this.list=document.createElement("div"),this.list.classList.add(s("datasets-list")),this.panel.append(this.list),this.el.append(this.badge),document.body.append(this.panel);const c=()=>{const E=this.badge.getBoundingClientRect(),k=E.top,_=window.innerHeight-E.bottom,i=_>k;this.panel.style.position="fixed",this.panel.style.right=`${window.innerWidth-E.right}px`,this.panel.style.left="auto",i?(this.panel.style.top=`${E.bottom}px`,this.panel.style.bottom="auto",this.panel.style.maxHeight=`${_}px`):(this.panel.style.bottom=`${window.innerHeight-E.top}px`,this.panel.style.top="auto",this.panel.style.maxHeight=`${k}px`),this.refreshBtn.hidden=!R.openHandler};this.badge.addEventListener("click",E=>{E.target!==this.panel&&!this.panel.contains(E.target)&&(this.panel.hidden&&c(),this.panel.hidden=!this.panel.hidden)}),document.addEventListener("click",E=>{!this.badge.contains(E.target)&&!this.panel.contains(E.target)&&(this.panel.hidden=!0)})}render(){this.bindAttr("data",function(){this.updateBadge()}),this.bindAttr("activeId",function(){this.updateBadge()}),this.bindAttr("autoshow",function(){this.autoshowCheckbox&&(this.autoshowCheckbox.checked=this.get("autoshow"))})}updateBadge(){const b=this.get("debugbar"),S=this.get("data")||b.datasets,R=this.get("activeId")||b.activeDatasetId;if(!S){this.badge.hidden=!0;return}const g=Object.keys(S).length;if(g>=1){this.badge.hidden=!1;const O=S[R];if(O&&O.__meta){const d=O.__meta.uri||"",c=O.__meta.method||"GET";this.badgeUrl.textContent=`${c} ${d}`}g>1?(this.badgeCount.textContent=g,this.badgeCount.hidden=!1):this.badgeCount.hidden=!0,this.list.innerHTML="";const o=Object.keys(S).sort((d,c)=>{var _,i;const E=((_=S[d].__meta)==null?void 0:_.utime)||0;return(((i=S[c].__meta)==null?void 0:i.utime)||0)-E});for(const d of o){const c=S[d],E=document.createElement("div");E.classList.add(s("datasets-list-item"));const k=c.__meta.uri||"",_=c.__meta.method||"GET";E.setAttribute("data-url",k),E.setAttribute("data-method",_),d===R&&E.classList.add(s("active"));const i=document.createElement("span");i.classList.add(s("datasets-item-nb")),i.textContent=`#${c.__meta.nb}`,E.append(i);const M=document.createElement("span");M.classList.add(s("datasets-item-time")),M.textContent=c.__meta.datetime?c.__meta.datetime.split(" ")[1]:"",E.append(M);const U=document.createElement("div");U.classList.add(s("datasets-item-request"));const T=document.createElement("span");T.classList.add(s("datasets-item-method")),T.textContent=_,U.append(T);const r=document.createElement("span");if(r.classList.add(s("datasets-item-url")),r.textContent=k,U.append(r),c.__meta.suffix){const K=document.createElement("span");K.classList.add(s("datasets-item-suffix")),K.textContent=` ${c.__meta.suffix}`,U.append(K)}E.append(U);const u=document.createElement("div");u.classList.add(s("datasets-item-badges"));for(const[K,f]of Object.entries(b.dataMap)){const B=H(c,f[0],f[1]);if(K.includes(":")){const Q=K.split(":"),ee=Q[0];if(Q[1]==="badge"&&B>0){const ie=b.getControl(ee);if(ie){const se=document.createElement("span");if(se.classList.add(s("datasets-item-badge")),se.setAttribute("title",ie.get("title")),se.dataset.tab=ee,ie.icon){const ce=ie.icon.cloneNode(!0);ce.style.width="12px",ce.style.height="12px",se.append(ce)}const le=document.createElement("span");le.textContent=B,se.append(le),u.append(se),se.addEventListener("click",ce=>{ce.stopPropagation(),b.showDataSet(d),b.showTab(ee),this.panel.hidden=!0})}}}}E.append(u);const x=document.createElement("a");x.classList.add(s("datasets-item-copy-id")),x.title=`Copy Request ID: ${d}`,x.innerHTML='',x.addEventListener("click",K=>{K.stopPropagation();const f=document.createElement("textarea");f.value=d,f.style.position="fixed",f.style.opacity="0",document.body.append(f),f.select(),document.execCommand("copy"),f.remove();const B=x.querySelector("i");B.className="phpdebugbar-icon phpdebugbar-icon-circle-check",x.classList.add(s("copied")),setTimeout(()=>{B.className="phpdebugbar-icon phpdebugbar-icon-copy",x.classList.remove(s("copied"))},2e3)}),E.append(x),E.addEventListener("click",()=>{b.showDataSet(d),this.panel.hidden=!0}),this.list.append(E)}this.applySearchFilter()}else this.badge.hidden=!0}applySearchFilter(){const b=this.searchInput.value.toLowerCase().trim(),S=this.list.querySelectorAll(`.${s("datasets-list-item")}`);for(const R of S)if(b==="")R.hidden=!1;else{const g=R.getAttribute("data-url").toLowerCase(),o=`${R.getAttribute("data-method").toLowerCase()} ${g}`,c=b.split(/\s+/).filter(E=>E.length>0).every(E=>o.includes(E));R.hidden=!c}}scanForNewDatasets(){const b=this.get("debugbar");if(!this.isScanning||!b.openHandler)return;const S=b.datasets,R=Object.values(S).reduce((O,o)=>{var d;return Math.max(O,((d=o.__meta)==null?void 0:d.utime)||0)},0),g=()=>{this.isScanning&&setTimeout(()=>this.scanForNewDatasets(),1e3)};b.openHandler.find({utime:R},0,(O,o)=>{if(o){console.error("scanForNewDatasets: find() failed",o),this.isScanning=!1,this.refreshBtn.classList.remove(s("active")),this.refreshBtn.title="Error scanning";return}try{const d=O.filter(E=>E.utime>R&&!S[E.id]);d.reverse();const c=(E=0)=>{if(E>=d.length){g();return}const{id:k}=d[E],_=E===d.length-1;b.loadDataSet(k,"(scan)",()=>c(E+1),this.autoshowCheckbox.checked&&_)};d.length?c():g()}catch(d){console.error("scanForNewDatasets: unexpected error",d),this.refreshBtn.classList.remove(s("active")),this.refreshBtn.title="Error scanning",this.isScanning=!1}})}}PhpDebugBar.Widgets.DatasetWidget=C})();(function(){const s=function(G){return PhpDebugBar.utils.csscls(G,"phpdebugbar-openhandler-")};PhpDebugBar.OpenHandler=PhpDebugBar.Widget.extend({className:"phpdebugbar-openhandler",defaults:{items_per_page:20},render(){const G=this;document.body.append(this.el),this.el.style.display="none",this.closebtn=document.createElement("a"),this.closebtn.classList.add(s("closebtn")),this.closebtn.innerHTML='',this.brand=document.createElement("span"),this.brand.classList.add(s("brand")),this.brand.innerHTML='',this.table=document.createElement("tbody");const N=document.createElement("div");N.classList.add(s("header")),N.textContent="PHP DebugBar | Open",N.prepend(this.brand),N.append(this.closebtn),this.el.append(N);const m=document.createElement("table");m.innerHTML='IDDateMethodURLIPFilter data',m.append(this.table),this.el.append(m),this.actions=document.createElement("div"),this.actions.classList.add(s("actions")),this.el.append(this.actions),this.closebtn.addEventListener("click",()=>{G.hide()}),this.loadmorebtn=document.createElement("a"),this.loadmorebtn.textContent="Load more",this.actions.append(this.loadmorebtn),this.loadmorebtn.addEventListener("click",()=>{G.find(G.last_find_request,G.last_find_request.offset+G.get("items_per_page"),G.handleFind.bind(G))}),this.showonlycurrentbtn=document.createElement("a"),this.showonlycurrentbtn.textContent="Show only current URL",this.actions.append(this.showonlycurrentbtn),this.showonlycurrentbtn.addEventListener("click",()=>{G.uriInput.value=window.location.pathname,G.searchBtn.click()}),this.refreshbtn=document.createElement("a"),this.refreshbtn.textContent="Refresh",this.actions.append(this.refreshbtn),this.refreshbtn.addEventListener("click",()=>{G.refresh()}),this.clearbtn=document.createElement("a"),this.clearbtn.textContent="Clear storage",this.actions.append(this.clearbtn),this.clearbtn.addEventListener("click",()=>{G.clear(()=>{G.hide()})}),this.addSearch(),this.overlay=document.createElement("div"),this.overlay.classList.add(s("overlay")),this.overlay.style.display="none",document.body.append(this.overlay),this.overlay.addEventListener("click",()=>{G.hide()})},refresh(){this.table.innerHTML="",this.loadmorebtn.style.display="",this.find({},0,this.handleFind.bind(this))},addSearch(){const G=this,N=this.searchBtn=document.createElement("button");N.textContent="Search",N.type="submit",N.addEventListener("click",function(w){G.table.innerHTML="";const l={},H=new FormData(this.parentElement);for(const[P,W]of H.entries())W&&(l[P]=W);G.find(l,0,G.handleFind.bind(G)),w.preventDefault()});const m=document.createElement("form");m.innerHTML='
Filter results
',this.uriInput=document.createElement("input"),this.uriInput.type="text",this.uriInput.name="uri",this.uriInput.placeholder="URI, eg '/user/*'",m.append(this.uriInput),this.ipInput=document.createElement("input"),this.ipInput.type="text",this.ipInput.name="ip",this.ipInput.placeholder="IP",m.append(this.ipInput);const p=document.createElement("button");p.textContent="Reset",p.type="button",p.addEventListener("click",()=>{m.reset(),N.click()}),m.append(N),m.append(p),this.actions.append(m)},handleFind(G){const N=this;for(const m of G){const p=document.createElement("a");p.textContent="Load dataset",p.addEventListener("click",y=>{N.hide(),N.load(m.id,b=>{N.callback(m.id,b)}),y.preventDefault()});const w=document.createElement("a");w.textContent=m.method,w.addEventListener("click",y=>{N.table.innerHTML="",N.find({method:m.method},0,N.handleFind.bind(N)),y.preventDefault()});const l=document.createElement("a");l.textContent=m.uri,l.addEventListener("click",y=>{N.hide(),N.load(m.id,b=>{N.callback(m.id,b)}),y.preventDefault()});const H=document.createElement("a");H.textContent=m.ip,H.addEventListener("click",y=>{N.ipInput.value=m.ip,N.searchBtn.click(),y.preventDefault()});const P=document.createElement("a");P.textContent="Show URL",P.addEventListener("click",y=>{N.uriInput.value=m.uri,N.searchBtn.click(),y.preventDefault()});const W=document.createElement("tr"),h=document.createElement("td");h.classList.add(s("id-cell"));const e=document.createElement("span");e.classList.add(s("id-text")),e.textContent=m.id,e.title=m.id,h.append(e);const t=document.createElement("a");t.classList.add(s("copy-id")),t.title="Copy Request ID",t.innerHTML='',t.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault();const b=document.createElement("textarea");b.value=m.id,b.style.position="fixed",b.style.opacity="0",document.body.append(b),b.select(),document.execCommand("copy"),b.remove();const S=t.querySelector("i");S.className="phpdebugbar-icon phpdebugbar-icon-circle-check",t.classList.add(s("copied")),setTimeout(()=>{S.className="phpdebugbar-icon phpdebugbar-icon-copy",t.classList.remove(s("copied"))},2e3)}),h.append(t),W.append(h);const a=document.createElement("td");a.textContent=m.datetime,W.append(a);const L=document.createElement("td");L.textContent=m.method,W.append(L);const A=document.createElement("td");A.append(l),W.append(A);const I=document.createElement("td");I.append(H),W.append(I);const C=document.createElement("td");C.append(P),W.append(C),N.table.append(W)}G.lengthp.json()).then(N).catch(p=>{N(null,p)})}})})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("mails")}render(){this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer(m,p){const w=document.createElement("span");w.classList.add(s("subject")),w.textContent=p.subject,m.append(w);const l=document.createElement("span");if(l.classList.add(s("to")),l.textContent=p.to,m.append(l),p.body||p.html){const H=document.createElement("span");H.classList.add(s("filename")),H.textContent="";const P=document.createElement("a");P.setAttribute("title","Mail Preview"),P.textContent="View Mail",P.classList.add(s("editor-link")),P.addEventListener("click",()=>{const h=window.open("about:blank","Mail Preview","width=650,height=440,scrollbars=yes").document;let e="";if(p.headers){const A=document.createElement("pre");A.style.border="1px solid #ddd",A.style.padding="5px";const I=document.createElement("code");I.textContent=p.headers,A.append(I),e=A.outerHTML}const t=document.createElement("pre");t.style.border="1px solid #ddd",t.style.padding="5px",t.textContent=p.body;let a=t.outerHTML,L="";if(p.html){const A=document.createElement("details"),I=document.createElement("summary");I.textContent="Text version",A.append(I),A.append(t),a=A.outerHTML;const C=document.createElement("iframe");C.setAttribute("width","100%"),C.setAttribute("height","400px"),C.setAttribute("sandbox",""),C.setAttribute("referrerpolicy","no-referrer"),C.setAttribute("srcdoc",p.html),L=C.outerHTML}h.open(),h.write(e+a+L),h.close()}),H.append(P),m.append(H)}if(p.headers){const H=document.createElement("pre");H.classList.add(s("headers"));const P=document.createElement("code");P.textContent=p.headers,H.append(P),H.hidden=!0,m.append(H),m.addEventListener("click",()=>{H.hidden=!H.hidden})}}}),this.el.append(this.list.el),this.bindAttr("data",function(m){this.list.set("data",m)})}}PhpDebugBar.Widgets.MailsWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("sqlqueries")}onFilterClick(m){m.classList.toggle(s("excluded"));const p=m.getAttribute("rel"),w=this.list.el.querySelectorAll(`li[connection="${p}"]`);for(const l of w)l.hidden=!l.hidden}onCopyToClipboard(m){const p=m.parentElement.querySelector("code"),w=function(){try{document.execCommand("copy")&&(m.classList.add(s("copy-clipboard-check")),setTimeout(()=>{m.classList.remove(s("copy-clipboard-check"))},2e3))}catch(H){console.log("Oops, unable to copy")}};(function(H){if(document.selection){const P=document.body.createTextRange();P.moveToElementText(H),P.select()}else if(window.getSelection){const P=document.createRange();P.selectNodeContents(H),window.getSelection().removeAllRanges(),window.getSelection().addRange(P)}w(),window.getSelection().removeAllRanges()})(p)}renderList(m,p,w){var h;const l=document.createElement("thead"),H=document.createElement("tr"),P=document.createElement("th");P.colSpan=2,P.classList.add(s("name")),P.innerHTML=p,H.append(P),l.append(H),m.append(l);const W=document.createElement("tbody");for(const e in w){const t=typeof w[e]=="function"?`${w[e].name} {}`:w[e],a=document.createElement("tr");if(typeof t=="object"&&t!==null){const L=document.createElement("td");L.classList.add("phpdebugbar-text-muted"),L.textContent=t.index||e,a.append(L);const A=document.createElement("td");if(t.namespace&&A.append(`${t.namespace}::`),A.append(t.name||t.file),t.line){const I=document.createElement("span");I.classList.add("phpdebugbar-text-muted"),I.textContent=`:${t.line}`,A.append(I)}if((h=t.xdebug_link)!=null&&h.url){const I=PhpDebugBar.Widgets.editorLink(t.xdebug_link);A.append(I.querySelector("a"))}a.append(A)}else{const L=document.createElement("td");L.classList.add("phpdebugbar-text-muted"),L.textContent=e,a.append(L);const A=document.createElement("td");A.textContent=t,a.append(A)}W.append(a)}m.append(W)}itemRenderer(m,p){if(p.type=p.type||"query",p.slow&&m.classList.add(s("sql-slow")),p.width_percent){const l=document.createElement("div");l.classList.add(s("bg-measure"));const H=document.createElement("div");H.classList.add(s("value")),H.style.left=`${p.start_percent}%`,H.style.width=`${Math.max(p.width_percent,.01)}%`,l.append(H),m.append(l)}if(p.duration_str){const l=document.createElement("span");l.setAttribute("title","Duration"),l.classList.add(s("duration")),l.textContent=p.duration_str,m.append(l)}if(p.memory_str){const l=document.createElement("span");l.setAttribute("title","Memory usage"),l.classList.add(s("memory")),l.textContent=p.memory_str,m.append(l)}if(typeof p.row_count!="undefined"){const l=document.createElement("span");l.setAttribute("title","Row count"),l.classList.add(s("row-count")),l.textContent=p.row_count,m.append(l)}if(typeof p.stmt_id!="undefined"&&p.stmt_id){const l=document.createElement("span");l.setAttribute("title","Prepared statement ID"),l.classList.add(s("stmt-id")),l.textContent=p.stmt_id,m.append(l)}if(p.connection){const l=document.createElement("span");if(l.setAttribute("title","Connection"),l.classList.add(s("database")),l.textContent=p.connection,m.append(l),m.setAttribute("connection",p.connection),!this.filters.includes(p.connection)){this.filters.push(p.connection);const H=document.createElement("a");H.classList.add(s("filter")),H.textContent=p.connection,H.setAttribute("rel",p.connection),H.addEventListener("click",()=>{this.onFilterClick(H)}),this.toolbar.append(H),this.filters.length>1&&(this.toolbar.hidden=!1)}}if(p.type==="query"){const l=document.createElement("span");l.setAttribute("title","Copy to clipboard"),l.classList.add(s("copy-clipboard")),l.style.cursor="pointer",l.innerHTML="​",l.addEventListener("click",H=>{this.onCopyToClipboard(l),H.stopPropagation()}),m.append(l)}if(p.xdebug_link?m.prepend(PhpDebugBar.Widgets.editorLink(p.xdebug_link)):typeof p.filename!="undefined"&&p.filename&&m.prepend(PhpDebugBar.Widgets.editorLink(p)),p.type!=="query"){const l=document.createElement("strong");l.classList.add(s("sql"),s(p.type)),l.textContent=p.sql,m.append(l)}else{const l=document.createElement("code");l.classList.add(s("sql")),l.innerHTML=PhpDebugBar.Widgets.highlight(p.sql,"sql"),m.append(l)}if(typeof p.is_success!="undefined"&&!p.is_success){m.classList.add(s("error"));const l=document.createElement("span");l.classList.add(s("error")),l.textContent=`[${p.error_code}] ${p.error_message}`,m.append(l)}if(p.type!=="query")return;const w=document.createElement("table");w.classList.add(s("params")),w.hidden=!0,p.params&&Object.keys(p.params).length>0&&this.renderList(w,"Params",p.params),p.backtrace&&Object.keys(p.backtrace).length>0&&this.renderList(w,"Backtrace",p.backtrace),w.querySelectorAll("tr").length||(w.style.display="none"),m.append(w),m.style.cursor="pointer",m.addEventListener("click",l=>{if(window.getSelection().type==="Range"||l.target.closest(".sf-dump"))return"";w.hidden=!w.hidden;const H=m.querySelector("code");if(H&&typeof phpdebugbar_sqlformatter!="undefined"){let P=p.sql;w.hidden||(P=phpdebugbar_sqlformatter.format(p.sql)),H.innerHTML=PhpDebugBar.Widgets.highlight(P,"sql")}})}render(){this.status=document.createElement("div"),this.status.classList.add(s("status")),this.el.append(this.status),this.toolbar=document.createElement("div"),this.toolbar.classList.add(s("toolbar")),this.el.append(this.toolbar),this.filters=[];let m="none",p=null;this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer:(w,l)=>this.itemRenderer(w,l)}),this.list.bindAttr("data",function(w){const l={};let H=0;for(let P=0;P0&&(W+=JSON.stringify(w[P].params)),w[P].connection&&(W+=`@${w[P].connection}`),l[W]=l[W]||{keys:[]},l[W].keys.push(P)}for(const P in l)if(l[P].keys.length>1){H+=l[P].keys.length;for(let W=0;W{h.classList.toggle("shown-duplicated"),h.textContent=h.classList.contains("shown-duplicated")?"Show All":W;const e=`.${s("list-item")}:not(.${s("sql-duplicate")})`,t=this.list.el.querySelectorAll(e);for(const a of t)a.hidden=!a.hidden}),P.append(h)}if(w.accumulated_duration_str){const h=document.createElement("span");h.setAttribute("title","Accumulated duration"),h.classList.add(s("duration")),h.textContent=w.accumulated_duration_str;const e=document.createElement("span");e.classList.add(s("sort-icon")),e.style.cursor="pointer",e.style.marginLeft="5px",e.textContent="Sort \u21C5",e.setAttribute("title","Sort by duration"),e.addEventListener("click",()=>{if(m==="none"?(m="desc",e.textContent="\u2193",p=[...w.statements],w.statements.sort((t,a)=>(a.duration||0)-(t.duration||0))):m==="desc"?(m="asc",e.textContent="\u2191",w.statements.sort((t,a)=>(t.duration||0)-(a.duration||0))):(m="none",e.textContent="\u21C5",p&&(w.statements=p,p=null)),this.list.set("data",w.statements),this.list.get("duplicate")){const t=P.querySelector("a."+s("duplicates"));t.textContent=W,t.classList.remove("shown-duplicated")}}),h.append(e),this.status.append(h)}if(w.memory_usage_str){const h=document.createElement("span");h.setAttribute("title","Memory usage"),h.classList.add(s("memory")),h.textContent=w.memory_usage_str,this.status.append(h)}})}}PhpDebugBar.Widgets.SQLQueriesWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("templates")}render(){this.status=document.createElement("div"),this.status.classList.add(s("status")),this.el.append(this.status),this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer(m,p){const w=document.createElement("span");if(w.classList.add(s("name")),p.html?w.innerHTML=p.html:w.textContent=p.name,m.append(w),p.xdebug_link&&m.append(PhpDebugBar.Widgets.editorLink(p.xdebug_link)),p.render_time_str){const l=document.createElement("span");l.setAttribute("title","Render time"),l.classList.add(s("render-time")),l.textContent=p.render_time_str,m.append(l)}if(p.memory_str){const l=document.createElement("span");l.setAttribute("title","Memory usage"),l.classList.add(s("memory")),l.textContent=p.memory_str,m.append(l)}if(typeof p.param_count!="undefined"){const l=document.createElement("span");l.setAttribute("title","Parameter count"),l.classList.add(s("param-count")),l.textContent=p.param_count,m.append(l)}if(typeof p.type!="undefined"&&p.type){const l=document.createElement("span");l.setAttribute("title","Type"),l.classList.add(s("type")),l.textContent=p.type,m.append(l)}if(typeof p.editorLink!="undefined"&&p.editorLink){const l=document.createElement("a");l.setAttribute("href",p.editorLink),l.classList.add(s("editor-link")),l.textContent="file",l.addEventListener("click",H=>{H.stopPropagation()}),m.append(l)}if(p.params&&Object.keys(p.params).length>0){const l=document.createElement("table");l.classList.add(s("params"));const H=document.createElement("thead");H.innerHTML='Params';const P=document.createElement("tbody");l.append(H,P);for(const W in p.params)if(typeof p.params[W]!="function"){const h=document.createElement("tr"),e=document.createElement("td");e.className=s("name"),e.textContent=W,h.append(e);const t=document.createElement("td");t.className=s("value"),PhpDebugBar.Widgets.renderValueInto(t,p.params[W]),h.append(t),P.append(h)}l.hidden=!0,m.append(l),m.style.cursor="pointer",m.addEventListener("click",W=>{window.getSelection().type==="Range"||W.target.closest(".sf-dump")||(l.hidden=!l.hidden)})}}}),this.el.append(this.list.el),this.callgraph=document.createElement("div"),this.callgraph.classList.add(s("callgraph")),this.el.append(this.callgraph),this.bindAttr("data",function(m){this.list.set("data",m.templates),this.status.innerHTML="",this.callgraph.innerHTML="";const p=m.sentence||"templates were rendered",w=document.createElement("span");if(w.textContent=`${m.nb_templates} ${p}`,this.status.append(w),m.accumulated_render_time_str){const l=document.createElement("span");l.setAttribute("title","Accumulated render time"),l.classList.add(s("render-time")),l.textContent=m.accumulated_render_time_str,this.status.append(l)}if(m.memory_usage_str){const l=document.createElement("span");l.setAttribute("title","Memory usage"),l.classList.add(s("memory")),l.textContent=m.memory_usage_str,this.status.append(l)}if(m.nb_blocks>0){const l=document.createElement("div");l.textContent=`${m.nb_blocks} blocks were rendered`,this.status.append(l)}if(m.nb_macros>0){const l=document.createElement("div");l.textContent=`${m.nb_macros} macros were rendered`,this.status.append(l)}typeof m.callgraph!="undefined"&&(this.callgraph.innerHTML=m.callgraph)})}}PhpDebugBar.Widgets.TemplatesWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-");class G extends PhpDebugBar.Widget{get className(){return s("httpclient")}render(){this.list=new PhpDebugBar.Widgets.ListWidget({itemRenderer(m,p){const w=document.createElement("div");w.classList.add(s("request-summary")),w.style.display="flex",w.style.gap="10px",w.style.alignItems="center";const l=document.createElement("span");l.classList.add(s("method")),l.textContent=p.method,l.style.fontWeight="bold",l.style.minWidth="60px",w.append(l);const H=document.createElement("span");H.classList.add(s("url")),H.textContent=p.url,H.style.flex="1",H.style.overflow="hidden",H.style.textOverflow="ellipsis",H.style.whiteSpace="nowrap",w.append(H);const P=document.createElement("span");if(P.classList.add(s("status")),P.textContent=p.status,P.style.minWidth="40px",P.style.textAlign="center",typeof p.status=="number"&&(p.status>=200&&p.status<300?P.style.color="#4caf50":p.status>=300&&p.status<400?P.style.color="#ff9800":p.status>=400&&(P.style.color="#f44336")),w.append(P),p.duration!==null&&typeof p.duration!="undefined"){const W=document.createElement("span");W.classList.add(s("duration")),W.textContent=p.duration,W.style.minWidth="60px",W.style.textAlign="right",w.append(W)}if(m.append(w),p.details&&Object.keys(p.details).length>0){const W=document.createElement("table");W.classList.add(s("params"));const h=document.createElement("thead");h.innerHTML='Details';const e=document.createElement("tbody");W.append(h,e);for(const t in p.details)if(typeof p.details[t]!="function"){const a=document.createElement("tr"),L=document.createElement("td");L.className=s("name"),L.textContent=t,a.append(L);const A=document.createElement("td");A.className=s("value"),PhpDebugBar.Widgets.renderValueInto(A,p.details[t]),a.append(A),e.append(a)}W.hidden=!0,m.append(W),m.style.cursor="pointer",m.addEventListener("click",t=>{window.getSelection().type==="Range"||t.target.closest(".sf-dump")||(W.hidden=!W.hidden)})}}}),this.el.append(this.list.el),this.bindAttr("data",function(m){this.list.set("data",m)})}}PhpDebugBar.Widgets.HttpWidget=G})();(function(){const s=PhpDebugBar.utils.makecsscls("phpdebugbar-widgets-"),G=new Map;let N=0;const m={"&":"&","<":"<",">":">",'"':"""},p=/[&<>"]/g;class w{constructor(h){this.expandedDepth=h&&h.expandedDepth!==void 0?h.expandedDepth:0}render(h){const e=document.createElement("pre");e.className="sf-dump";const t=this.expandedDepth;return this.expandedDepth=0,e.innerHTML=this.toHtml(h,0)+` `,this.expandedDepth=t,e}toHtml(h,e){if(h===null)return"null";switch(typeof h){case"boolean":return""+h+"";case"number":return""+this.esc(String(h))+"";case"string":return'"'+this.esc(h)+'"';case"object":return this.containerToHtml(h,e);default:return this.esc(String(h))}}containerToHtml(h,e){const t=Array.isArray(h),a=!t&&h._vd,L=!t&&h._cut||0,A=t?null:Object.keys(h),I=!t&&(a||L)?A.filter(b=>b!=="_vd"&&b!=="_cut"):A,y=(t?h.length:I.length)+L;return a?this.objectToHtml(h,I,a,L,y,e):this.arrayToHtml(h,t,I,L,y,e)}arrayToHtml(h,e,t,a,L,A){if(L===0)return"[]";const I=A [";if(C+=""+(I?"\u25BC":"\u25B6")+"",C+=' ',C+=this.arrayPreview(h,e,t,a)+" ]",I)C+="",C+=this.arrayChildren(h,e,t,a,A),C+="";else{const y=++N;G.set(y,{v:h,arr:e,k:t,c:a,d:A,r:this,ed:this.expandedDepth}),C+=""}return C+=']',C}arrayPreview(h,e,t,a){const L=e?h.length:t.length,A=Math.min(L,8),I=[];for(let y=0;yA||a>0)&&(C+=", \u2026"),C}arrayChildren(h,e,t,a,L){const A=e?h.length:t.length;let I="";for(let C=0;C0&&(I+=` `),e?(I+=""+C+" => ",I+=this.toHtml(h[C],L+1)):(I+='"'+this.esc(t[C])+'" => ',I+=this.toHtml(h[t[C]],L+1));return a>0&&(I+=` \u2026`+a),I}objectToHtml(h,e,t,a,L,A){const I=t[1]||0,C=t[2]||null,y=t[3]||null,b=t[0]===5;if(L===0&&!I)return(C?this.esc(C)+" ":"")+"{}";const S=A {":(C&&(R+=""+this.esc(C)+" "),R+="{",I&&(g="#"+I+" ")),L===0)return R+g+"}";R+=""+g+""+(S?"\u25BC":"\u25B6")+"",R+=' ';const O=Math.min(e.length,8),o=[];for(let c=0;cO||a>0)&&(d+=", \u2026"),R+=d+" }",S)R+="",R+=this.objectChildren(h,e,y,a,A),R+="";else{const c=++N;G.set(c,{v:h,obj:!0,k:e,p:y,c:a,d:A,r:this,ed:this.expandedDepth}),R+=""}return R+='}',R}objectChildren(h,e,t,a,L){let A="";for(let I=0;I0&&(A+=` `);const C=t?t[I]:null,y=this.esc(e[I]);C?C==="+"?A+='+"'+y+'": ':C==="~"?A+=""+y+": ":C==="*"?A+='#'+y+": ":A+='-'+y+": ":A+='+'+y+": ",A+=this.toHtml(h[e[I]],L+1)}return a>0&&(A+=` \u2026`+a),A}previewValue(h){return h===null?"null":typeof h=="string"?'"'+this.esc(h.length>40?h.substring(0,40)+"\u2026":h)+'"':typeof h=="boolean"||typeof h=="number"?String(h):typeof h=="object"?h._vd?(h._vd[2]||"")+" {\u2026}":Array.isArray(h)?"[\u2026]":"{\u2026}":"\u2026"}esc(h){return String(h).replace(p,e=>m[e])}}PhpDebugBar.Widgets.VarDumpRenderer=w;function l(W){const h=+W.dataset.lazy;delete W.dataset.lazy;const e=G.get(h);if(!e)return;G.delete(h);const t=e.r,a=t.expandedDepth;t.expandedDepth=e.ed,e.obj?W.innerHTML=t.objectChildren(e.v,e.k,e.p,e.c,e.d):W.innerHTML=t.arrayChildren(e.v,e.arr,e.k,e.c,e.d),t.expandedDepth=a}function H(W,h){const e=W.previousElementSibling,t=W.nextElementSibling;e&&e.classList.toggle("sf-dump-hidden",h),t&&t.classList.toggle("sf-dump-hidden",!h)}document.addEventListener("click",function(W){var L,A;const h=W.target.closest("a.sf-dump-toggle")||((L=W.target.closest(".sf-dump-preview"))==null?void 0:L.previousElementSibling);if(!h)return;const e=h.closest("pre.sf-dump");if(!e||e.id)return;const t=(A=h.nextElementSibling)==null?void 0:A.nextElementSibling;if(!t||t.tagName!=="SAMP")return;W.preventDefault();const a=t.classList.contains("sf-dump-compact");if(a&&t.dataset.lazy&&l(t),W.ctrlKey||W.metaKey)if(a){let I;for(;(I=t.querySelectorAll("[data-lazy]")).length;)I.forEach(l);t.querySelectorAll("samp.sf-dump-compact").forEach(function(C){var b;C.classList.replace("sf-dump-compact","sf-dump-expanded");const y=(b=C.previousElementSibling)==null?void 0:b.previousElementSibling;y&&y.classList.contains("sf-dump-toggle")&&(y.lastElementChild.textContent="\u25BC"),H(C,!0)})}else t.querySelectorAll("samp.sf-dump-expanded").forEach(function(I){var y;I.classList.replace("sf-dump-expanded","sf-dump-compact");const C=(y=I.previousElementSibling)==null?void 0:y.previousElementSibling;C&&C.classList.contains("sf-dump-toggle")&&(C.lastElementChild.textContent="\u25B6"),H(I,!1)});t.classList.toggle("sf-dump-compact",!a),t.classList.toggle("sf-dump-expanded",a),h.lastElementChild.textContent=a?"\u25BC":"\u25B6",H(t,a)});class P extends PhpDebugBar.Widgets.KVListWidget{get className(){return s("kvlist jsonvarlist")}itemRenderer(h,e,t,a){const L=document.createElement("span");L.setAttribute("title",t),L.textContent=t,h.appendChild(L);const A=a&&a.value!==void 0?a.value:a;PhpDebugBar.Widgets.renderValueInto(e,A),a&&a.xdebug_link&&e.appendChild(PhpDebugBar.Widgets.editorLink(a.xdebug_link))}}PhpDebugBar.Widgets.JsonVariableListWidget=P})();})(); (function () { const csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); /** * Widget for displaying sql queries with Laravel-specific features. * Extends the base SQLQueriesWidget to add EXPLAIN functionality. * * Options: * - data */ class LaravelQueriesWidget extends PhpDebugBar.Widgets.SQLQueriesWidget { buildTable(rows, opts = {}) { const headings = []; for (const key in rows[0]) { const th = document.createElement('th'); th.textContent = key; headings.push(th); } const values = []; for (const row of rows) { const tr = document.createElement('tr'); for (const key in row) { const td = document.createElement('td'); const text = row[key] == null ? '' : String(row[key]); td.textContent = text; if (!opts.expanded) { td.title = text; td.addEventListener('click', (e) => { e.stopPropagation(); td.classList.toggle(csscls('cell-expanded')); if (td.classList.contains(csscls('cell-expanded'))) { const selection = window.getSelection(); const range = document.createRange(); range.selectNodeContents(td); selection.removeAllRanges(); selection.addRange(range); } }); } tr.append(td); } values.push(tr); } const table = document.createElement('table'); table.classList.add(csscls('explain')); if (opts.expanded) { table.classList.add(csscls('explain-full')); } const thead = document.createElement('thead'); const tbody = document.createElement('tbody'); const headerRow = document.createElement('tr'); headerRow.append(...headings); thead.append(headerRow); tbody.append(...values); table.append(thead, tbody); return table; } buildPgsqlTable(rows, opts = {}) { const values = []; for (const row of rows) { const tr = document.createElement('tr'); const td = document.createElement('td'); td.textContent = row; tr.append(td); values.push(tr); } const table = document.createElement('table'); table.classList.add(csscls('explain')); if (opts.expanded) { table.classList.add(csscls('explain-full')); } const tbody = document.createElement('tbody'); tbody.append(...values); table.append(tbody); return table; } actionButton(label, onClick) { const btn = document.createElement('button'); btn.textContent = label; btn.classList.add(csscls('explain-btn')); btn.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); onClick(e); }); return btn; } fetchQuery(statement, mode, format) { const body = { id: PhpDebugBar.instance.activeDatasetId, hash: statement.explain.hash, mode: mode, }; if (format) { body.format = format; } return fetch(statement.explain.url, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify(body), }).then((response) => response.json().then((json) => { if (!response.ok) throw new Error(json.message || 'Request failed'); return json; }) ); } renderResult(container, statement, data, btnBar) { container.innerHTML = ''; const result = data.result; if (Array.isArray(result) && result.length > 0 && typeof result[0] === 'object') { const wrapper = document.createElement('div'); wrapper.classList.add(csscls('explain-scroll')); wrapper.append(this.buildTable(result)); container.append(wrapper); btnBar.append(this.actionButton('Expand', () => { this.showPopup(statement.explain.query, this.buildTable(result, { expanded: true })); })); } else { const empty = document.createElement('em'); empty.textContent = 'No results'; container.append(empty); } container.prepend(btnBar); } renderDump(container, statement, data, btnBar) { container.innerHTML = ''; PhpDebugBar.Widgets.renderValueInto(container, data.result); PhpDebugBar.utils.sfDump(container); container.prepend(btnBar); } renderExplain(container, statement, data, driver, btnBar) { container.innerHTML = ''; const rows = data; const buildFn = driver === 'pgsql' ? 'buildPgsqlTable' : 'buildTable'; const wrapper = document.createElement('div'); wrapper.classList.add(csscls('explain-scroll')); wrapper.append(this[buildFn](rows)); container.append(wrapper); btnBar.append(this.actionButton('Expand', () => { this.showPopup(statement.explain.query, this[buildFn](rows, { expanded: true })); })); container.prepend(btnBar); } showPopup(query, contentEl) { const overlay = document.createElement('div'); overlay.classList.add(csscls('explain-overlay')); const popup = document.createElement('div'); popup.classList.add(csscls('explain-popup')); const header = document.createElement('div'); header.classList.add(csscls('explain-popup-header')); const title = document.createElement('span'); title.innerHTML = PhpDebugBar.Widgets.highlight(query.length > 120 ? query.substring(0, 120) + '...' : query, 'sql'); title.classList.add(csscls('explain-popup-title')); const closeBtn = document.createElement('button'); closeBtn.textContent = '\u2715'; closeBtn.classList.add(csscls('explain-popup-close')); closeBtn.addEventListener('click', () => overlay.remove()); header.append(title, closeBtn); const body = document.createElement('div'); body.classList.add(csscls('explain-popup-body')); body.append(contentEl); popup.append(header, body); overlay.append(popup); overlay.addEventListener('click', (e) => { if (e.target === overlay) overlay.remove(); }); document.addEventListener('keydown', function onEsc(e) { if (e.key === 'Escape') { overlay.remove(); document.removeEventListener('keydown', onEsc); } }); document.querySelector('div.phpdebugbar').append(overlay); } itemRenderer(li, stmt, filters) { // Call parent's item renderer first super.itemRenderer(li, stmt, filters); // Add explain button if available if (stmt.explain) { let table = li.querySelector(`.${csscls('params')}`); table.style.display = ''; if (stmt.explain.modes.includes('result')) { this.renderDetailSection(table, 'Result', stmt, 'result'); } if (stmt.explain.modes.includes('explain')) { this.renderDetailSection(table, 'Performance', stmt, 'explain'); } } } renderDetailSection(table, caption, statement, mode) { const thead = document.createElement('thead'); const tr = document.createElement('tr'); const th = document.createElement('th'); th.colSpan = 2; th.classList.add(csscls('name')); th.textContent = caption; tr.append(th); thead.append(tr); table.append(thead); const tbody = document.createElement('tbody'); const bodyTr = document.createElement('tr'); const td = document.createElement('td'); td.colSpan = 2; const driver = statement.explain.driver; if (mode === 'result') { const makeBtnBar = () => { const bar = document.createElement('div'); bar.classList.add(csscls('explain-btnbar')); bar.append( this.actionButton('Run SELECT', () => { const btnBar = makeBtnBar(); this.fetchQuery(statement, 'result').then((json) => { this.renderResult(td, statement, json.data, btnBar); }).catch((e) => alert(e.message)); // eslint-disable-line no-alert }), this.actionButton('Run SELECT (dump)', () => { const btnBar = makeBtnBar(); this.fetchQuery(statement, 'result', 'dump').then((json) => { this.renderDump(td, statement, json.data, btnBar); }).catch((e) => alert(e.message)); // eslint-disable-line no-alert }) ); return bar; }; td.append(makeBtnBar()); } else { const run = () => { this.fetchQuery(statement, 'explain').then((json) => { const btnBar = document.createElement('div'); btnBar.classList.add(csscls('explain-btnbar')); btnBar.append(this.actionButton('Re-run EXPLAIN', run)); if (json.visual) { btnBar.append(this.buildVisualExplainButton(statement, json.visual.confirm)); } this.renderExplain(td, statement, json.data, driver, btnBar); }).catch((e) => alert(e.message)); // eslint-disable-line no-alert }; td.append(this.actionButton('Run EXPLAIN', run)); } bodyTr.append(td); tbody.append(bodyTr); table.append(tbody); } buildVisualExplainButton(statement, confirmMessage) { const linkContainer = document.createElement('span'); linkContainer.classList.add(csscls('visual-link')); const btn = this.actionButton('Visual Explain', () => { if (!confirm(confirmMessage)) // eslint-disable-line no-alert return; this.fetchQuery(statement, 'visual').then((json) => { linkContainer.innerHTML = ''; const link = document.createElement('a'); link.href = json.data; link.textContent = json.data; link.target = '_blank'; link.rel = 'noopener'; linkContainer.append(link); window.open(json.data, '_blank', 'noopener'); }).catch((e) => alert(e.message)); // eslint-disable-line no-alert }); const wrapper = document.createDocumentFragment(); wrapper.append(btn, linkContainer); return wrapper; } } PhpDebugBar.Widgets.LaravelQueriesWidget = LaravelQueriesWidget; })(); (function () { const csscls = PhpDebugBar.utils.makecsscls('phpdebugbar-widgets-'); /** * Widget for the displaying cache events * * Options: * - data */ class LaravelCacheWidget extends PhpDebugBar.Widgets.TimelineWidget { get tagName() { return 'ul'; } get className() { return csscls('timeline cache'); } onForgetClick(e, el) { e.stopPropagation(); fetch(el.getAttribute('data-url'), { method: 'DELETE' }).then((response) => { if (response.ok) { el.style.transition = 'opacity 200ms'; el.style.opacity = '0'; setTimeout(() => el.remove(), 200); } }).catch((err) => { console.error('Failed to forget cache key:', err); }); } render() { super.render(); this.bindAttr('data', function (data) { if (data.measures) { const lines = this.el.querySelectorAll(`.${csscls('measure')}`); for (let i = 0; i < data.measures.length; i++) { const measure = data.measures[i]; const m = lines[i]; if (measure.params && Object.keys(measure.params).length > 0) { if (measure.params.delete) { const nextElement = m.nextElementSibling; if (nextElement) { const deleteRow = Array.from(nextElement.querySelectorAll('td.phpdebugbar-widgets-name')) .find(td => td.textContent.includes('delete')); if (deleteRow) { deleteRow.closest('tr')?.remove(); } } } if (measure.delete_url && measure.params.key) { const forgetLink = document.createElement('a'); forgetLink.className = csscls('forget'); forgetLink.textContent = 'forget'; forgetLink.setAttribute('data-url', measure.delete_url); forgetLink.addEventListener('click', (e) => { this.onForgetClick(e, forgetLink); }, { once: true }); m.appendChild(forgetLink); } } } } }); } } PhpDebugBar.Widgets.LaravelCacheWidget = LaravelCacheWidget; })();