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