/* Copyright (c) 2006, Ivan Sagalaev. All rights reserved. SPDX-License-Identifier: BSD-3-Clause */ 'use strict';const IDENT_RE$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript="[A-Za-z$_][0-9A-Za-z$_]*"; const KEYWORDS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=["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"]; const LITERALS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=["true","false","null","undefined","NaN","Infinity"]; const TYPES$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"]; const ERROR_TYPES$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"];const BUILT_IN_GLOBALS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"]; const BUILT_IN_VARIABLES$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=["arguments","this","super","console","window","document","localStorage","module","global"]; const BUILT_INS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript=[].concat(BUILT_IN_GLOBALS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,BUILT_IN_VARIABLES$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,TYPES$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,ERROR_TYPES$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript); var module$third_party$javascript$highlightjs$src$languages$lib$ecmascript={};module$third_party$javascript$highlightjs$src$languages$lib$ecmascript.BUILT_INS=BUILT_INS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript;module$third_party$javascript$highlightjs$src$languages$lib$ecmascript.IDENT_RE=IDENT_RE$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript;module$third_party$javascript$highlightjs$src$languages$lib$ecmascript.KEYWORDS=KEYWORDS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript; module$third_party$javascript$highlightjs$src$languages$lib$ecmascript.LITERALS=LITERALS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript;function escape$$module$third_party$javascript$highlightjs$src$lib$regex(value){return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function source$$module$third_party$javascript$highlightjs$src$lib$regex(re){if(!re)return null;if(typeof re==="string")return re;return re.source}function lookahead$$module$third_party$javascript$highlightjs$src$lib$regex(re){return concat$$module$third_party$javascript$highlightjs$src$lib$regex("(?=",re,")")} function anyNumberOfTimes$$module$third_party$javascript$highlightjs$src$lib$regex(re){return concat$$module$third_party$javascript$highlightjs$src$lib$regex("(",re,")*")}function optional$$module$third_party$javascript$highlightjs$src$lib$regex(re){return concat$$module$third_party$javascript$highlightjs$src$lib$regex("(",re,")?")} function concat$$module$third_party$javascript$highlightjs$src$lib$regex(...args){const joined=args.map(x=>{return source$$module$third_party$javascript$highlightjs$src$lib$regex(x)}).join("");return joined}function either$$module$third_party$javascript$highlightjs$src$lib$regex(...args){const joined="("+args.map(x=>{return source$$module$third_party$javascript$highlightjs$src$lib$regex(x)}).join("|")+")";return joined} function countMatchGroups$$module$third_party$javascript$highlightjs$src$lib$regex(re){return(new RegExp(re.toString()+"|")).exec("").length-1}function startsWith$$module$third_party$javascript$highlightjs$src$lib$regex(re,lexeme){const match=re&&re.exec(lexeme);return match&&match.index===0} function join$$module$third_party$javascript$highlightjs$src$lib$regex(regexps,separator="|"){const backreferenceRe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let numCaptures=0;let ret="";for(let i=0;i0)ret=ret+separator;ret=ret+"(";for(;re.length>0;){const match=backreferenceRe.exec(re);if(match==null){ret=ret+re;break}ret=ret+re.substring(0, match.index);re=re.substring(match.index+match[0].length);if(match[0][0]==="\\"&&match[1])ret=ret+("\\"+String(Number(match[1])+offset));else{ret=ret+match[0];if(match[0]==="(")numCaptures++}}ret=ret+")"}return ret}var module$third_party$javascript$highlightjs$src$lib$regex={};module$third_party$javascript$highlightjs$src$lib$regex.anyNumberOfTimes=anyNumberOfTimes$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.concat=concat$$module$third_party$javascript$highlightjs$src$lib$regex; module$third_party$javascript$highlightjs$src$lib$regex.countMatchGroups=countMatchGroups$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.either=either$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.escape=escape$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.join=join$$module$third_party$javascript$highlightjs$src$lib$regex; module$third_party$javascript$highlightjs$src$lib$regex.lookahead=lookahead$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.optional=optional$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.source=source$$module$third_party$javascript$highlightjs$src$lib$regex;module$third_party$javascript$highlightjs$src$lib$regex.startsWith=startsWith$$module$third_party$javascript$highlightjs$src$lib$regex;var $jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$javascript=function(hljs){const hasClosingTag=(match,{after})=>{const tag="",end:""};const XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(match,response)=>{const afterMatchIndex= match[0].length+match.index;const nextChar=match.input[afterMatchIndex];if(nextChar==="<"){response.ignoreMatch();return}if(nextChar===">")if(!hasClosingTag(match,{after:afterMatchIndex}))response.ignoreMatch()}};const KEYWORDS={$pattern:IDENT_RE$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,keyword:KEYWORDS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,literal:LITERALS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,built_in:BUILT_INS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript}; const decimalDigits="[0-9](_?[0-9])*";const frac=`\\.(${decimalDigits})`;const decimalInteger=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;const NUMBER={className:"number",variants:[{begin:`(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))`+`[eE][+-]?(${decimalDigits})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\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};const SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS,contains:[]};const HTML_TEMPLATE={begin:"html`",end:"",starts:{end:"`",returnEnd:false,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}};const CSS_TEMPLATE={begin:"css`",end:"",starts:{end:"`",returnEnd:false,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}};const TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]};const JSDOC_COMMENT= hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:IDENT_RE+"(?=\\s*(-)|$)",endsParent:true,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]});const COMMENT={className:"comment",variants:[JSDOC_COMMENT,hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]};const SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,TEMPLATE_STRING, NUMBER,hljs.REGEXP_MODE];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains);const PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat([{begin:/\(/,end:/\)/,keywords:KEYWORDS,contains:["self"].concat(SUBST_AND_COMMENTS)}]);const PARAMS={className:"params",begin:/\(/,end:/\)/,excludeBegin:true,excludeEnd:true,keywords:KEYWORDS,contains:PARAMS_CONTAINS};return{name:"Javascript",aliases:["js", "jsx","mjs","cjs"],keywords:KEYWORDS,exports:{PARAMS_CONTAINS},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,TEMPLATE_STRING,COMMENT,NUMBER,{begin:concat$$module$third_party$javascript$highlightjs$src$lib$regex(/[{,\n]\s*/,lookahead$$module$third_party$javascript$highlightjs$src$lib$regex(concat$$module$third_party$javascript$highlightjs$src$lib$regex(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/, IDENT_RE+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:IDENT_RE+lookahead$$module$third_party$javascript$highlightjs$src$lib$regex("\\s*:"),relevance:0}]},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:"(\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:true,end:"\\s*=>",contains:[{className:"params",variants:[{begin:hljs.UNDERSCORE_IDENT_RE, relevance:0},{className:null,begin:/\(\s*\)/,skip:true},{begin:/\(/,end:/\)/,excludeBegin:true,excludeEnd:true,keywords:KEYWORDS,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:true},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:true,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function", end:/[{;]/,excludeEnd:true,keywords:KEYWORDS,contains:["self",hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE}),PARAMS],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:hljs.UNDERSCORE_IDENT_RE+"\\("+"[^()]*(\\("+"[^()]*(\\("+"[^()]*"+"\\)[^()]*)*"+"\\)[^()]*)*"+"\\)\\s*\\{",returnBegin:true,contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE})]},{variants:[{begin:"\\."+IDENT_RE},{begin:"\\$"+IDENT_RE}],relevance:0},{className:"class",beginKeywords:"class", end:/[{;=]/,excludeEnd:true,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},hljs.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:true,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE}),"self",PARAMS]},{begin:"(get|set)\\s+(?="+IDENT_RE+"\\()",end:/\{/,keywords:"get set",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE}),{begin:/\(\)/},PARAMS]},{begin:/\$[(.]/}]}};var module$third_party$javascript$highlightjs$src$languages$javascript={}; module$third_party$javascript$highlightjs$src$languages$javascript.default=$jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$javascript;var $jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$typescript=function(hljs){const IDENT_RE=IDENT_RE$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript;const NAMESPACE={beginKeywords:"namespace",end:/\{/,excludeEnd:true};const INTERFACE={beginKeywords:"interface",end:/\{/,excludeEnd:true,keywords:"interface extends"};const USE_STRICT={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/};const TYPES=["any","void","number","boolean","string", "object","never","enum"];const TS_SPECIFIC_KEYWORDS=["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"];const KEYWORDS={$pattern:IDENT_RE$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,keyword:KEYWORDS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript.concat(TS_SPECIFIC_KEYWORDS),literal:LITERALS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript,built_in:BUILT_INS$$module$third_party$javascript$highlightjs$src$languages$lib$ecmascript.concat(TYPES)}; const DECORATOR={className:"meta",begin:"@"+IDENT_RE};const swapMode=(mode,label,replacement)=>{const indx=mode.contains.findIndex(m=>{return m.label===label});if(indx===-1)throw new Error("can not find mode to replace");mode.contains.splice(indx,1,replacement)};const tsLanguage=$jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$javascript(hljs);Object.assign(tsLanguage.keywords,KEYWORDS);tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);tsLanguage.contains=tsLanguage.contains.concat([DECORATOR, NAMESPACE,INTERFACE]);swapMode(tsLanguage,"shebang",hljs.SHEBANG());swapMode(tsLanguage,"use_strict",USE_STRICT);const functionDeclaration=tsLanguage.contains.find(m=>{return m.className==="function"});functionDeclaration.relevance=0;Object.assign(tsLanguage,{name:"TypeScript",aliases:["ts"]});return tsLanguage};var module$third_party$javascript$highlightjs$src$languages$typescript={};module$third_party$javascript$highlightjs$src$languages$typescript.default=$jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$typescript;globalThis.hljs_typescript=$jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$typescript;globalThis.hljs_javascript=$jscompDefaultExport$$module$third_party$javascript$highlightjs$src$languages$javascript;var module$third_party$javascript$highlightjs$export_shims$export_typescript={};