n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 21.1 kB
JavaScript
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(e){}}(),System.register(["./chunk-legacy-TXBRODOR.js"],(function(e,n){var t;return{setters:[function(e){t=e.t}],execute:function(){try{n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(i=(new n.Error).stack)&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="a55703a4-3088-4650-8aad-a42bbb635ac5",n._sentryDebugIdIdentifier="sentry-dbid-a55703a4-3088-4650-8aad-a42bbb635ac5")}catch(n){}var n,i;e("t",t(((e,n)=>{function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{const i=e[n],o=typeof i;"object"!==o&&"function"!==o||Object.isFrozen(i)||t(i)})),e}var i=class{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){const t=Object.create(null);for(const i in e)t[i]=e[i];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}var s=e=>!!e.scope,a=(e={})=>{const n={children:[]};return Object.assign(n,e),n},c=class e{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n=a({scope:e});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(n){"string"!=typeof n&&n.children&&(n.children.every((e=>"string"==typeof e))?n.children=[n.children.join("")]:n.children.forEach((n=>{e._collapse(n)})))}},l=class extends c{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,n){const t=e.root;n&&(t.scope=`language:${n}`),this.add(t)}toHTML(){return new class{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!s(e))return;const n=((e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const t=e.split(".");return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ")}return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)}closeNode(e){s(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function u(e){return e?"string"==typeof e?e:e.source:null}function g(e){return f("(?=",e,")")}function d(e){return f("(?:",e,")*")}function h(e){return f("(?:",e,")?")}function f(...e){return e.map((e=>u(e))).join("")}function p(...e){return"("+(function(e){const n=e[e.length-1];return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}(e).capture?"":"?:")+e.map((e=>u(e))).join("|")+")"}function b(e){return new RegExp(e.toString()+"|").exec("").length-1}var m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t;let i=u(e),o="";for(;i.length>0;){const e=m.exec(i);if(!e){o+=i;break}o+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+n):(o+=e[0],"("===e[0]&&t++)}return o})).map((e=>`(${e})`)).join(n)}var E="[a-zA-Z]\\w*",y="[a-zA-Z_]\\w*",x="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",v="\\b(0b[01]+)",S={begin:"\\\\[\\s\\S]",relevance:0},O={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[S]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[S]},N=function(e,n,t={}){const i=r({scope:"comment",begin:e,end:n,contains:[]},t);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=p("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 i.contains.push({begin:f(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},M=N("//","$"),R=N("/\\*","\\*/"),A=N("#","$"),j={scope:"number",begin:x,relevance:0},I={scope:"number",begin:_,relevance:0},T={scope:"number",begin:v,relevance:0},L={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[S,{begin:/\[/,end:/\]/,relevance:0,contains:[S]}]}]},B={scope:"title",begin:E,relevance:0},D={scope:"title",begin:y,relevance:0},H={begin:"\\.\\s*"+y,relevance:0},P=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:E,UNDERSCORE_IDENT_RE:y,NUMBER_RE:x,C_NUMBER_RE:_,BINARY_NUMBER_RE:v,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=f(n,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:S,APOS_STRING_MODE:O,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{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/},COMMENT:N,C_LINE_COMMENT_MODE:M,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:A,NUMBER_MODE:j,C_NUMBER_MODE:I,BINARY_NUMBER_MODE:T,REGEXP_MODE:L,TITLE_MODE:B,UNDERSCORE_TITLE_MODE:D,METHOD_GUARD:H,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})}});function C(e,n){"."===e.input[e.index-1]&&n.ignoreMatch()}function $(e,n){void 0!==e.className&&(e.scope=e.className,delete e.className)}function U(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=C,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function z(e,n){Array.isArray(e.illegal)&&(e.illegal=p(...e.illegal))}function W(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function X(e,n){void 0===e.relevance&&(e.relevance=1)}var G=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n]})),e.keywords=t.keywords,e.begin=f(t.beforeMatch,g(t.begin)),e.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},e.relevance=0,delete t.beforeMatch},K=["of","and","for","in","not","or","if","then","parent","list","value"];function F(e,n,t="keyword"){const i=Object.create(null);return"string"==typeof e?o(t,e.split(" ")):Array.isArray(e)?o(t,e):Object.keys(e).forEach((function(t){Object.assign(i,F(e[t],n,t))})),i;function o(e,t){n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((function(n){const t=n.split("|");i[t[0]]=[e,Z(t[0],t[1])]}))}}function Z(e,n){return n?Number(n):function(e){return K.includes(e.toLowerCase())}(e)?0:1}var V={},J=e=>{console.error(e)},Y=(e,...n)=>{console.log(`WARN: ${e}`,...n)},q=(e,n)=>{V[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),V[`${e}/${n}`]=!0)},Q=new Error;function ee(e,n,{key:t}){let i=0;const o=e[t],r={},s={};for(let a=1;a<=n.length;a++)s[a+i]=o[a],r[a+i]=!0,i+=b(n[a-1]);e[t]=s,e[t]._emit=r,e[t]._multi=!0}function ne(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Q;if("object"!=typeof e.beginScope||null===e.beginScope)throw J("beginScope must be object"),Q;ee(e,e.begin,{key:"beginScope"}),e.begin=w(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Q;if("object"!=typeof e.endScope||null===e.endScope)throw J("endScope must be object"),Q;ee(e,e.end,{key:"endScope"}),e.end=w(e.end,{joinWith:""})}}(e)}function te(e){function n(n,t){return new RegExp(u(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null),this.matcherRe=n(w(this.regexes.map((e=>e[1])),{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),i=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))),n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;let t=n.exec(e);if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&this.considerAll()),t}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=r(e.classNameAliases||{}),function t(o,s){const a=o;if(o.isCompiled)return a;[$,W,ne,G].forEach((e=>e(o,s))),e.compilerExtensions.forEach((e=>e(o,s))),o.__beforeBegin=null,[U,z,X].forEach((e=>e(o,s))),o.isCompiled=!0;let c=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=F(o.keywords,e.case_insensitive)),a.keywordPatternRe=n(c,!0),s&&(o.begin||(o.begin=/\B|\b/),a.beginRe=n(a.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(a.endRe=n(a.end)),a.terminatorEnd=u(a.end)||"",o.endsWithParent&&s.terminatorEnd&&(a.terminatorEnd+=(o.end?"|":"")+s.terminatorEnd)),o.illegal&&(a.illegalRe=n(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(n){return r(e,{variants:null},n)}))),e.cachedVariants?e.cachedVariants:ie(e)?r(e,{starts:e.starts?r(e.starts):null}):Object.isFrozen(e)?r(e):e}("self"===e?o:e)}))),o.contains.forEach((function(e){t(e,a)})),o.starts&&t(o.starts,s),a.matcher=function(e){const n=new i;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(a),a}(e)}function ie(e){return!!e&&(e.endsWithParent||ie(e.starts))}var oe=class extends Error{constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}},re=o,se=r,ae=Symbol("nomatch"),ce=function(e){const n=Object.create(null),o=Object.create(null),r=[];let s=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let u={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function b(e){return u.noHighlightRe.test(e)}function m(e,n,t){let i="",o="";"object"==typeof n?(i=e,t=n.ignoreIllegals,o=n.language):(q("10.7.0","highlight(lang, code, ...args) has been deprecated."),q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,i=n),void 0===t&&(t=!0);const r={code:i,language:o};k("before:highlight",r);const s=r.result?r.result:w(r.language,r.code,t);return s.code=r.code,k("after:highlight",s),s}function w(e,t,o,r){const c=Object.create(null);function l(){if(!k.keywords)return void M.addText(R);let e=0;k.keywordPatternRe.lastIndex=0;let n=k.keywordPatternRe.exec(R),t="";for(;n;){t+=R.substring(e,n.index);const o=_.case_insensitive?n[0].toLowerCase():n[0],r=(i=o,k.keywords[i]);if(r){const[e,i]=r;if(M.addText(t),t="",c[o]=(c[o]||0)+1,c[o]<=7&&(A+=i),e.startsWith("_"))t+=n[0];else{const t=_.classNameAliases[e]||e;d(n[0],t)}}else t+=n[0];e=k.keywordPatternRe.lastIndex,n=k.keywordPatternRe.exec(R)}var i;t+=R.substring(e),M.addText(t)}function g(){null!=k.subLanguage?function(){if(""===R)return;let e=null;if("string"==typeof k.subLanguage){if(!n[k.subLanguage])return void M.addText(R);e=w(k.subLanguage,R,!0,N[k.subLanguage]),N[k.subLanguage]=e._top}else e=E(R,k.subLanguage.length?k.subLanguage:null);k.relevance>0&&(A+=e.relevance),M.__addSublanguage(e._emitter,e.language)}():l(),R=""}function d(e,n){""!==e&&(M.startScope(n),M.addText(e),M.endScope())}function h(e,n){let t=1;const i=n.length-1;for(;t<=i;){if(!e._emit[t]){t++;continue}const i=_.classNameAliases[e[t]]||e[t],o=n[t];i?d(o,i):(R=o,l(),R=""),t++}}function f(e,n){return e.scope&&"string"==typeof e.scope&&M.openNode(_.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(d(R,_.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),R=""):e.beginScope._multi&&(h(e.beginScope,n),R="")),k=Object.create(e,{parent:{value:k}}),k}function p(e,n,t){let o=function(e,n){const t=e&&e.exec(n);return t&&0===t.index}(e.endRe,t);if(o){if(e["on:end"]){const t=new i(e);e["on:end"](n,t),t.isMatchIgnored&&(o=!1)}if(o){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return p(e.parent,n,t)}function b(e){return 0===k.matcher.regexIndex?(R+=e[0],1):(T=!0,0)}function m(e){const n=e[0],i=t.substring(e.index),o=p(k,e,i);if(!o)return ae;const r=k;k.endScope&&k.endScope._wrap?(g(),d(n,k.endScope._wrap)):k.endScope&&k.endScope._multi?(g(),h(k.endScope,e)):r.skip?R+=n:(r.returnEnd||r.excludeEnd||(R+=n),g(),r.excludeEnd&&(R=n));do{k.scope&&M.closeNode(),k.skip||k.subLanguage||(A+=k.relevance),k=k.parent}while(k!==o.parent);return o.starts&&f(o.starts,e),r.returnEnd?0:n.length}let y={};function x(n,r){const a=r&&r[0];if(R+=n,null==a)return g(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===a){if(R+=t.slice(r.index,r.index+1),!s){const n=new Error(`0 width match regex (${e})`);throw n.languageName=e,n.badRule=y.rule,n}return 1}if(y=r,"begin"===r.type)return function(e){const n=e[0],t=e.rule,o=new i(t),r=[t.__beforeBegin,t["on:begin"]];for(const i of r)if(i&&(i(e,o),o.isMatchIgnored))return b(n);return t.skip?R+=n:(t.excludeBegin&&(R+=n),g(),t.returnBegin||t.excludeBegin||(R=n)),f(t,e),t.returnBegin?0:n.length}(r);if("illegal"===r.type&&!o){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(k.scope||"<unnamed>")+'"');throw e.mode=k,e}if("end"===r.type){const e=m(r);if(e!==ae)return e}if("illegal"===r.type&&""===a)return 1;if(I>1e5&&I>3*r.index)throw new Error("potential infinite loop, way more iterations than matches");return R+=a,a.length}const _=v(e);if(!_)throw J(a.replace("{}",e)),new Error('Unknown language: "'+e+'"');const S=te(_);let O="",k=r||S;const N={},M=new u.__emitter(u);!function(){const e=[];for(let n=k;n!==_;n=n.parent)n.scope&&e.unshift(n.scope);e.forEach((e=>M.openNode(e)))}();let R="",A=0,j=0,I=0,T=!1;try{if(_.__emitTokens)_.__emitTokens(t,M);else{for(k.matcher.considerAll();;){I++,T?T=!1:k.matcher.considerAll(),k.matcher.lastIndex=j;const e=k.matcher.exec(t);if(!e)break;const n=x(t.substring(j,e.index),e);j=e.index+n}x(t.substring(j))}return M.finalize(),O=M.toHTML(),{language:e,value:O,relevance:A,illegal:!1,_emitter:M,_top:k}}catch(L){if(L.message&&L.message.includes("Illegal"))return{language:e,value:re(t),illegal:!0,relevance:0,_illegalBy:{message:L.message,index:j,context:t.slice(j-100,j+100),mode:L.mode,resultSoFar:O},_emitter:M};if(s)return{language:e,value:re(t),illegal:!1,relevance:0,errorRaised:L,_emitter:M,_top:k};throw L}}function E(e,t){t=t||u.languages||Object.keys(n);const i=function(e){const n={value:re(e),illegal:!1,relevance:0,_top:c,_emitter:new u.__emitter(u)};return n._emitter.addText(e),n}(e),o=t.filter(v).filter(O).map((n=>w(n,e,!1)));o.unshift(i);const[r,s]=o.sort(((e,n)=>{if(e.relevance!==n.relevance)return n.relevance-e.relevance;if(e.language&&n.language){if(v(e.language).supersetOf===n.language)return 1;if(v(n.language).supersetOf===e.language)return-1}return 0})),a=r;return a.secondBest=s,a}function y(e){let n=null;const t=function(e){let n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=u.languageDetectRe.exec(n);if(t){const n=v(t[1]);return n||(Y(a.replace("{}",t[1])),Y("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"}return n.split(/\s+/).find((e=>b(e)||v(e)))}(e);if(b(t))return;if(k("before:highlightElement",{el:e,language:t}),e.children.length>0&&(u.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(e)),u.throwUnescapedHTML))throw new oe("One of your code blocks includes unescaped HTML.",e.innerHTML);n=e;const i=n.textContent,r=t?m(i,{language:t,ignoreIllegals:!0}):E(i);e.innerHTML=r.value,function(e,n,t){const i=n&&o[n]||t;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,t,r.language),e.result={language:r.language,re:r.relevance,relevance:r.relevance},r.secondBest&&(e.secondBest={language:r.secondBest.language,relevance:r.secondBest.relevance}),k("after:highlightElement",{el:e,result:r,text:i})}let x=!1;function _(){"loading"!==document.readyState?document.querySelectorAll(u.cssSelector).forEach(y):x=!0}function v(e){return e=(e||"").toLowerCase(),n[e]||n[o[e]]}function S(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{o[e.toLowerCase()]=n}))}function O(e){const n=v(e);return n&&!n.disableAutodetect}function k(e,n){const t=e;r.forEach((function(e){e[t]&&e[t](n)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){x&&_()}),!1),Object.assign(e,{highlight:m,highlightAuto:E,highlightAll:_,highlightElement:y,highlightBlock:function(e){return q("10.7.0","highlightBlock will be removed entirely in v12.0"),q("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){u=se(u,e)},initHighlighting:()=>{_(),q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){_(),q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(t,i){let o=null;try{o=i(e)}catch(r){if(J("Language definition for '{}' could not be registered.".replace("{}",t)),!s)throw r;J(r),o=c}o.name||(o.name=t),n[t]=o,o.rawDefinition=i.bind(null,e),o.aliases&&S(o.aliases,{languageName:t})},unregisterLanguage:function(e){delete n[e];for(const n of Object.keys(o))o[n]===e&&delete o[n]},listLanguages:function(){return Object.keys(n)},getLanguage:v,registerAliases:S,autoDetection:O,inherit:se,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{e["before:highlightBlock"](Object.assign({block:n.el},n))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{e["after:highlightBlock"](Object.assign({block:n.el},n))})}(e),r.push(e)},removePlugin:function(e){const n=r.indexOf(e);-1!==n&&r.splice(n,1)}}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString="11.8.0",e.regex={concat:f,lookahead:g,either:p,optional:h,anyNumberOfTimes:d};for(const i in P)"object"==typeof P[i]&&t(P[i]);return Object.assign(e,P),e},le=ce({});le.newInstance=()=>ce({}),n.exports=le,le.HighlightJS=le,le.default=le})))}}}));
//# sourceMappingURL=core-legacy-CZLxebsG.js.map