export default (() => { { let I = "[A-Za-z$_][0-9A-Za-z$_]*", x = ["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"], O = ["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"], M = ["Error", "EvalError", "InternalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError"], T = ["setInterval", "setTimeout", "clearInterval", "clearTimeout", "require", "exports", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "unescape"], B = ["arguments", "this", "super", "console", "window", "document", "localStorage", "sessionStorage", "module", "global"], $ = [].concat(T, C, M); return e => { const n = e.regex, a = I, t = /<[A-Za-z0-9\\._:-]+/, s = /\/[A-Za-z0-9\\._:-]+>|\/>/, r = (e, n) => { var a, t, s = e[0].length + e.index, r = e.input[s]; ("<" === r || "," === r || (">" === r && ([r, a] = [e, { after: s }.after], t = "", k = { match: [/const|var|let/, /\s+/, a, /\s*/, /=\s*/, /(async\s*)?/, n.lookahead(R)], keywords: "async", className: { 1: "keyword", 3: "title.function" }, contains: [_] }; return { name: "JavaScript", aliases: ["js", "jsx", "mjs", "cjs"], keywords: c, exports: { PARAMS_CONTAINS: N, CLASS_REFERENCE: f }, illegal: /#(?![$_A-z])/, contains: [e.SHEBANG({ label: "shebang", binary: "node", relevance: 5 }), { label: "use_strict", className: "meta", relevance: 10, begin: /^\s*['"]use (strict|asm)['"]/ }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, g, u, m, E, A, { match: /\$\d+/ }, b, f, { className: "attr", begin: a + n.lookahead(":"), relevance: 0 }, k, { begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*", keywords: "return throw case", relevance: 0, contains: [A, e.REGEXP_MODE, { className: "function", begin: R, returnBegin: !0, end: "\\s*=>", contains: [{ className: "params", variants: [{ begin: e.UNDERSCORE_IDENT_RE, relevance: 0 }, { className: null, begin: /\(\s*\)/, skip: !0 }, { begin: /\(/, end: /\)/, excludeBegin: !0, excludeEnd: !0, keywords: c, contains: N }] }] }, { begin: /,/, relevance: 0 }, { match: /\s+/, relevance: 0 }, { variants: [{ begin: "<>", end: "" }, { match: /<[A-Za-z0-9\\._:-]+\s*\/>/ }, { begin: t, "on:begin": r, end: s }], subLanguage: "xml", contains: [{ begin: t, end: s, skip: !0, contains: ["self"] }] }] }, S, { beginKeywords: "while if switch catch for" }, { begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", returnBegin: !0, label: "func.def", contains: [_, e.inherit(e.TITLE_MODE, { begin: a, className: "title.function" })] }, { match: /\.\.\./, relevance: 0 }, p, { match: "\\$" + a, relevance: 0 }, { match: [/\bconstructor(?=\s*\()/], className: { 1: "title.function" }, contains: [_] }, v, { relevance: 0, match: /\b[A-Z][A-Z_0-9]+\b/, className: "variable.constant" }, h, w, { match: /\$[(.]/ }] }; }; } });