{
"version": 3,
"sources": ["../../../src/mermaidUtils.ts", "../../../src/parser.ts", "../../../../../node_modules/.pnpm/@zenuml+core@3.35.2/node_modules/@zenuml/core/dist/zenuml.esm.mjs", "../../../src/zenumlRenderer.ts", "../../../src/zenuml-definition.ts"],
"sourcesContent": ["import type { MermaidConfig } from 'mermaid';\n\nconst warning = (s: string) => {\n // Todo remove debug code\n // eslint-disable-next-line no-console\n console.error('Log function was called before initialization', s);\n};\n\nexport type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';\n\nexport const LEVELS: Record For context dependent predicates, we must pass in a local context so that\n * references such as $arg evaluate properly as _localctx.arg. We only\n * capture context dependent predicates in the context in which we begin\n * prediction, so we passed in the outer context here in case of context\n * dependent predicate evaluation. \n * The evaluation of predicates by this context is short-circuiting, but\n * unordered. \n * The evaluation of predicates by this context is short-circuiting, but\n * unordered. \n * Since tokens on hidden channels (e.g. whitespace or comments) are not\n * added to the parse trees, they will not appear in the output of this\n * method.\n */\n getText() {\n return this.getChildCount() === 0 ? \"\" : this.children.map(function(e) {\n return e.getText();\n }).join(\"\");\n }\n /**\n * For rule associated with this parse tree internal node, return\n * the outer alternative number used to match the input. Default\n * implementation does not compute nor store this alt num. Create\n * a subclass of ParserRuleContext with backing field and set\n * option contextSuperClass.\n * to set it.\n */\n getAltNumber() {\n return 0;\n }\n /**\n * Set the outer alternative number for this context node. Default\n * implementation does nothing to avoid backing field overhead for\n * trees that don't need it. Create\n * a subclass of ParserRuleContext with backing field and set\n * option contextSuperClass.\n */\n setAltNumber(e) {\n }\n getChild(e) {\n return null;\n }\n getChildCount() {\n return 0;\n }\n accept(e) {\n return e.visitChildren(this);\n }\n /**\n * Print out a whole tree, not just a node, in LISP format\n * (root child1 .. childN). Print just a node if this is a leaf.\n */\n toStringTree(e, t) {\n return T4.toStringTree(this, e, t);\n }\n toString(e, t) {\n e = e || null, t = t || null;\n let n = this, s = \"[\";\n for (; n !== null && n !== t; ) {\n if (e === null)\n n.isEmpty() || (s += n.invokingState);\n else {\n const l = n.ruleIndex, c = l >= 0 && l < e.length ? e[l] : \"\" + l;\n s += c;\n }\n n.parentCtx !== null && (e !== null || !n.parentCtx.isEmpty()) && (s += \" \"), n = n.parentCtx;\n }\n return s += \"]\", s;\n }\n}\nclass t1 {\n constructor(e) {\n this.cachedHashCode = e;\n }\n /**\n * Stores the computed hash code of this {@link PredictionContext}. The hash\n * code is computed in parts to match the following reference algorithm.\n *\n * If {@code ctx} is {@code null} and the end of the rule containing\n * {@code s} is reached, {@link Token//EPSILON} is added to the result set.\n * If {@code ctx} is not {@code null} and the end of the outermost rule is\n * reached, {@link Token//EOF} is added to the result set. If {@code ctx} is {@code null} and {@code stopState} or the end of the\n * rule containing {@code s} is reached, {@link Token//EPSILON} is added to\n * the result set. If {@code ctx} is not {@code null} and {@code addEOF} is\n * {@code true} and {@code stopState} or the end of the outermost rule is\n * reached, {@link Token//EOF} is added to the result set. If {@code context} is {@code null}, it is treated as\n * {@link ParserRuleContext//EMPTY}. This action is implemented by calling {@link Lexer//setChannel} with the\n * value provided by {@link //getChannel}. Custom actions are implemented by calling {@link Lexer//action} with the\n * appropriate rule and action indexes. This action is implemented by calling {@link Lexer//popMode}. This action is implemented by calling {@link Lexer//pushMode} with the\n * value provided by {@link //getMode}. This action is implemented by calling {@link Lexer//popMode}. This action is implemented by calling {@link Lexer//mode} with the\n * value provided by {@link //getMode}.\n *
\n */\n evalPrecedence(e, t) {\n return this;\n }\n static andContext(e, t) {\n if (e === null || e === g1.NONE)\n return t;\n if (t === null || t === g1.NONE)\n return e;\n const n = new F5(e, t);\n return n.opnds.length === 1 ? n.opnds[0] : n;\n }\n static orContext(e, t) {\n if (e === null)\n return t;\n if (t === null)\n return e;\n if (e === g1.NONE || t === g1.NONE)\n return g1.NONE;\n const n = new U5(e, t);\n return n.opnds.length === 1 ? n.opnds[0] : n;\n }\n}\nclass F5 extends g1 {\n /**\n * A semantic context which is true whenever none of the contained contexts\n * is false\n */\n constructor(e, t) {\n super();\n const n = new N3();\n e instanceof F5 ? e.opnds.map(function(l) {\n n.add(l);\n }) : n.add(e), t instanceof F5 ? t.opnds.map(function(l) {\n n.add(l);\n }) : n.add(t);\n const s = sE(n);\n if (s.length > 0) {\n let l = null;\n s.map(function(c) {\n (l === null || c.precedence < l.precedence) && (l = c);\n }), n.add(l);\n }\n this.opnds = Array.from(n.values());\n }\n equals(e) {\n return this === e ? !0 : e instanceof F5 ? C0(this.opnds, e.opnds) : !1;\n }\n updateHashCode(e) {\n e.update(this.opnds, \"AND\");\n }\n /**\n * {@inheritDoc}\n *\n * \n * private int referenceHashCode() {\n * int hash = {@link MurmurHash//initialize MurmurHash.initialize}({@link\n * //INITIAL_HASH});\n *\n * for (int i = 0; i < {@link //size()}; i++) {\n * hash = {@link MurmurHash//update MurmurHash.update}(hash, {@link //getParent\n * getParent}(i));\n * }\n *\n * for (int i = 0; i < {@link //size()}; i++) {\n * hash = {@link MurmurHash//update MurmurHash.update}(hash, {@link\n * //getReturnState getReturnState}(i));\n * }\n *\n * hash = {@link MurmurHash//finish MurmurHash.finish}(hash, 2// {@link\n * //size()});\n * return hash;\n * }\n * \n * This means only the {@link //EMPTY} context is in set.\n */\n isEmpty() {\n return this === t1.EMPTY;\n }\n hasEmptyPath() {\n return this.getReturnState(this.length - 1) === t1.EMPTY_RETURN_STATE;\n }\n hashCode() {\n return this.cachedHashCode;\n }\n updateHashCode(e) {\n e.update(this.cachedHashCode);\n }\n}\nt1.EMPTY = null;\nt1.EMPTY_RETURN_STATE = 2147483647;\nt1.globalNodeCount = 1;\nt1.id = t1.globalNodeCount;\nclass x4 extends t1 {\n constructor(e, t) {\n const n = new D3();\n n.update(e, t);\n const s = n.finish();\n return super(s), this.parents = e, this.returnStates = t, this;\n }\n isEmpty() {\n return this.returnStates[0] === t1.EMPTY_RETURN_STATE;\n }\n getParent(e) {\n return this.parents[e];\n }\n getReturnState(e) {\n return this.returnStates[e];\n }\n equals(e) {\n return this === e ? !0 : e instanceof x4 ? this.hashCode() !== e.hashCode() ? !1 : C0(this.returnStates, e.returnStates) && C0(this.parents, e.parents) : !1;\n }\n toString() {\n if (this.isEmpty())\n return \"[]\";\n {\n let e = \"[\";\n for (let t = 0; t < this.returnStates.length; t++) {\n if (t > 0 && (e = e + \", \"), this.returnStates[t] === t1.EMPTY_RETURN_STATE) {\n e = e + \"$\";\n continue;\n }\n e = e + this.returnStates[t], this.parents[t] !== null ? e = e + \" \" + this.parents[t] : e = e + \"null\";\n }\n return e + \"]\";\n }\n }\n get length() {\n return this.returnStates.length;\n }\n}\nclass We extends t1 {\n constructor(e, t) {\n let n = 0;\n const s = new D3();\n e !== null ? s.update(e, t) : s.update(1), n = s.finish(), super(n), this.parentCtx = e, this.returnState = t;\n }\n getParent(e) {\n return this.parentCtx;\n }\n getReturnState(e) {\n return this.returnState;\n }\n equals(e) {\n return this === e ? !0 : e instanceof We ? this.hashCode() !== e.hashCode() || this.returnState !== e.returnState ? !1 : this.parentCtx == null ? e.parentCtx == null : this.parentCtx.equals(e.parentCtx) : !1;\n }\n toString() {\n const e = this.parentCtx === null ? \"\" : this.parentCtx.toString();\n return e.length === 0 ? this.returnState === t1.EMPTY_RETURN_STATE ? \"$\" : \"\" + this.returnState : \"\" + this.returnState + \" \" + e;\n }\n get length() {\n return 1;\n }\n static create(e, t) {\n return t === t1.EMPTY_RETURN_STATE && e === null ? t1.EMPTY : new We(e, t);\n }\n}\nclass Sl extends We {\n constructor() {\n super(null, t1.EMPTY_RETURN_STATE);\n }\n isEmpty() {\n return !0;\n }\n getParent(e) {\n return null;\n }\n getReturnState(e) {\n return this.returnState;\n }\n equals(e) {\n return this === e;\n }\n toString() {\n return \"$\";\n }\n}\nt1.EMPTY = new Sl();\nconst b5 = \"h-\";\nclass nn {\n constructor(e, t) {\n this.data = {}, this.hashFunction = e || rE, this.equalsFunction = t || aE;\n }\n set(e, t) {\n const n = b5 + this.hashFunction(e);\n if (n in this.data) {\n const s = this.data[n];\n for (let l = 0; l < s.length; l++) {\n const c = s[l];\n if (this.equalsFunction(e, c.key)) {\n const L = c.value;\n return c.value = t, L;\n }\n }\n return s.push({ key: e, value: t }), t;\n } else\n return this.data[n] = [{ key: e, value: t }], t;\n }\n containsKey(e) {\n const t = b5 + this.hashFunction(e);\n if (t in this.data) {\n const n = this.data[t];\n for (let s = 0; s < n.length; s++) {\n const l = n[s];\n if (this.equalsFunction(e, l.key))\n return !0;\n }\n }\n return !1;\n }\n get(e) {\n const t = b5 + this.hashFunction(e);\n if (t in this.data) {\n const n = this.data[t];\n for (let s = 0; s < n.length; s++) {\n const l = n[s];\n if (this.equalsFunction(e, l.key))\n return l.value;\n }\n }\n return null;\n }\n entries() {\n return Object.keys(this.data).filter((e) => e.startsWith(b5)).flatMap((e) => this.data[e], this);\n }\n getKeys() {\n return this.entries().map((e) => e.key);\n }\n getValues() {\n return this.entries().map((e) => e.value);\n }\n toString() {\n return \"[\" + this.entries().map((t) => \"{\" + t.key + \":\" + t.value + \"}\").join(\", \") + \"]\";\n }\n get length() {\n return Object.keys(this.data).filter((e) => e.startsWith(b5)).map((e) => this.data[e].length, this).reduce((e, t) => e + t, 0);\n }\n}\nfunction _c(i, e) {\n if (e == null && (e = _0.EMPTY), e.parentCtx === null || e === _0.EMPTY)\n return t1.EMPTY;\n const t = _c(i, e.parentCtx), s = i.states[e.invokingState].transitions[0];\n return We.create(t, s.followState.stateNumber);\n}\nfunction cE(i, e, t) {\n if (i.isEmpty())\n return i;\n let n = t.get(i) || null;\n if (n !== null)\n return n;\n if (n = e.get(i), n !== null)\n return t.set(i, n), n;\n let s = !1, l = [];\n for (let L = 0; L < l.length; L++) {\n const d = cE(i.getParent(L), e, t);\n if (s || d !== i.getParent(L)) {\n if (!s) {\n l = [];\n for (let _ = 0; _ < i.length; _++)\n l[_] = i.getParent(_);\n s = !0;\n }\n l[L] = d;\n }\n }\n if (!s)\n return e.add(i), t.set(i, i), i;\n let c = null;\n return l.length === 0 ? c = t1.EMPTY : l.length === 1 ? c = We.create(l[0], i.getReturnState(0)) : c = new x4(l, i.returnStates), e.add(c), t.set(c, c), t.set(i, c), c;\n}\nfunction gc(i, e, t, n) {\n if (i === e)\n return i;\n if (i instanceof We && e instanceof We)\n return Xb(i, e, t, n);\n if (t) {\n if (i instanceof Sl)\n return i;\n if (e instanceof Sl)\n return e;\n }\n return i instanceof We && (i = new x4([i.getParent()], [i.returnState])), e instanceof We && (e = new x4([e.getParent()], [e.returnState])), Qb(i, e, t, n);\n}\nfunction Qb(i, e, t, n) {\n if (n !== null) {\n let p = n.get(i, e);\n if (p !== null || (p = n.get(e, i), p !== null))\n return p;\n }\n let s = 0, l = 0, c = 0, L = [], d = [];\n for (; s < i.returnStates.length && l < e.returnStates.length; ) {\n const p = i.parents[s], m = e.parents[l];\n if (i.returnStates[s] === e.returnStates[l]) {\n const f = i.returnStates[s];\n f === t1.EMPTY_RETURN_STATE && p === null && m === null || p !== null && m !== null && p === m ? (d[c] = p, L[c] = f) : (d[c] = gc(p, m, t, n), L[c] = f), s += 1, l += 1;\n } else i.returnStates[s] < e.returnStates[l] ? (d[c] = p, L[c] = i.returnStates[s], s += 1) : (d[c] = m, L[c] = e.returnStates[l], l += 1);\n c += 1;\n }\n if (s < i.returnStates.length)\n for (let p = s; p < i.returnStates.length; p++)\n d[c] = i.parents[p], L[c] = i.returnStates[p], c += 1;\n else\n for (let p = l; p < e.returnStates.length; p++)\n d[c] = e.parents[p], L[c] = e.returnStates[p], c += 1;\n if (c < d.length) {\n if (c === 1) {\n const p = We.create(\n d[0],\n L[0]\n );\n return n !== null && n.set(i, e, p), p;\n }\n d = d.slice(0, c), L = L.slice(0, c);\n }\n const _ = new x4(d, L);\n return _ === i ? (n !== null && n.set(i, e, i), i) : _ === e ? (n !== null && n.set(i, e, e), e) : (jb(d), n !== null && n.set(i, e, _), _);\n}\nfunction jb(i) {\n const e = new nn();\n for (let t = 0; t < i.length; t++) {\n const n = i[t];\n e.containsKey(n) || e.set(n, n);\n }\n for (let t = 0; t < i.length; t++)\n i[t] = e.get(i[t]);\n}\nfunction Xb(i, e, t, n) {\n if (n !== null) {\n let l = n.get(i, e);\n if (l !== null || (l = n.get(e, i), l !== null))\n return l;\n }\n const s = Jb(i, e, t);\n if (s !== null)\n return n !== null && n.set(i, e, s), s;\n if (i.returnState === e.returnState) {\n const l = gc(i.parentCtx, e.parentCtx, t, n);\n if (l === i.parentCtx)\n return i;\n if (l === e.parentCtx)\n return e;\n const c = We.create(l, i.returnState);\n return n !== null && n.set(i, e, c), c;\n } else {\n let l = null;\n if ((i === e || i.parentCtx !== null && i.parentCtx === e.parentCtx) && (l = i.parentCtx), l !== null) {\n const _ = [i.returnState, e.returnState];\n i.returnState > e.returnState && (_[0] = e.returnState, _[1] = i.returnState);\n const p = [l, l], m = new x4(p, _);\n return n !== null && n.set(i, e, m), m;\n }\n const c = [i.returnState, e.returnState];\n let L = [i.parentCtx, e.parentCtx];\n i.returnState > e.returnState && (c[0] = e.returnState, c[1] = i.returnState, L = [e.parentCtx, i.parentCtx]);\n const d = new x4(L, c);\n return n !== null && n.set(i, e, d), d;\n }\n}\nfunction Jb(i, e, t) {\n if (t) {\n if (i === t1.EMPTY || e === t1.EMPTY)\n return t1.EMPTY;\n } else {\n if (i === t1.EMPTY && e === t1.EMPTY)\n return t1.EMPTY;\n if (i === t1.EMPTY) {\n const n = [\n e.returnState,\n t1.EMPTY_RETURN_STATE\n ], s = [e.parentCtx, null];\n return new x4(s, n);\n } else if (e === t1.EMPTY) {\n const n = [i.returnState, t1.EMPTY_RETURN_STATE], s = [i.parentCtx, null];\n return new x4(s, n);\n }\n }\n return null;\n}\nclass R4 {\n constructor() {\n this.data = [];\n }\n add(e) {\n this.data[e] = !0;\n }\n or(e) {\n Object.keys(e.data).map((t) => this.add(t), this);\n }\n remove(e) {\n delete this.data[e];\n }\n has(e) {\n return this.data[e] === !0;\n }\n values() {\n return Object.keys(this.data);\n }\n minValue() {\n return Math.min.apply(null, this.values());\n }\n hashCode() {\n return D3.hashStuff(this.values());\n }\n equals(e) {\n return e instanceof R4 && C0(this.data, e.data);\n }\n toString() {\n return \"{\" + this.values().join(\", \") + \"}\";\n }\n get length() {\n return this.values().length;\n }\n}\nclass g0 {\n constructor(e) {\n this.atn = e;\n }\n /**\n * Calculates the SLL(1) expected lookahead set for each outgoing transition\n * of an {@link ATNState}. The returned array has one element for each\n * outgoing transition in {@code s}. If the closure from transition\n * i leads to a semantic predicate before matching a symbol, the\n * element at index i of the result will be {@code null}.\n *\n * @param s the ATN state\n * @return the expected symbols for each outgoing transition of {@code s}.\n */\n getDecisionLookahead(e) {\n if (e === null)\n return null;\n const t = e.transitions.length, n = [];\n for (let s = 0; s < t; s++) {\n n[s] = new $3();\n const l = new N3();\n this._LOOK(\n e.transition(s).target,\n null,\n t1.EMPTY,\n n[s],\n l,\n new R4(),\n !1,\n !1\n ), (n[s].length === 0 || n[s].contains(g0.HIT_PRED)) && (n[s] = null);\n }\n return n;\n }\n /**\n * Compute set of tokens that can follow {@code s} in the ATN in the\n * specified {@code ctx}.\n *\n *
\n * If {@code oldToken} is also a {@link CommonToken} instance, the newly\n * constructed token will share a reference to the {@link //text} field and\n * the {@link Pair} stored in {@link //source}. Otherwise, {@link //text} will\n * be assigned the result of calling {@link //getText}, and {@link //source}\n * will be constructed from the result of {@link Token//getTokenSource} and\n * {@link Token//getInputStream}.
\n *\n * @param oldToken The token to copy.\n */\n clone() {\n const e = new E9(this.source, this.type, this.channel, this.start, this.stop);\n return e.tokenIndex = this.tokenIndex, e.line = this.line, e.column = this.column, e.text = this.text, e;\n }\n toString() {\n let e = this.text;\n return e !== null ? e = e.replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\").replace(/\\t/g, \"\\\\t\") : e = \"If the set of expected tokens is not known and could not be computed,\n * this method returns {@code null}.
\n *\n * @return The set of token types that could potentially follow the current\n * state in the ATN, or {@code null} if the information is not available.\n */\n getExpectedTokens() {\n return this.recognizer !== null ? this.recognizer.atn.getExpectedTokens(this.offendingState, this.ctx) : null;\n }\n //If the state number is not known, this method returns -1.
\n toString() {\n return this.message;\n }\n}\nclass Sc extends Gt {\n constructor(e, t, n, s) {\n super({ message: \"\", recognizer: e, input: t, ctx: null }), this.startIndex = n, this.deadEndConfigs = s;\n }\n toString() {\n let e = \"\";\n return this.startIndex >= 0 && this.startIndex < this.input.size && (e = this.input.getText(new _1(this.startIndex, this.startIndex))), \"LexerNoViableAltException\" + e;\n }\n}\nlet $e = class At extends C6 {\n constructor(e) {\n super(), this._input = e, this._factory = xl.DEFAULT, this._tokenFactorySourcePair = [this, e], this._interp = null, this._token = null, this._tokenStartCharIndex = -1, this._tokenStartLine = -1, this._tokenStartColumn = -1, this._hitEOF = !1, this._channel = m2.DEFAULT_CHANNEL, this._type = m2.INVALID_TYPE, this._modeStack = [], this._mode = At.DEFAULT_MODE, this._text = null;\n }\n reset() {\n this._input !== null && this._input.seek(0), this._token = null, this._type = m2.INVALID_TYPE, this._channel = m2.DEFAULT_CHANNEL, this._tokenStartCharIndex = -1, this._tokenStartColumn = -1, this._tokenStartLine = -1, this._text = null, this._hitEOF = !1, this._mode = At.DEFAULT_MODE, this._modeStack = [], this._interp.reset();\n }\n // Return a token from this source; i.e., match a token on the char stream.\n nextToken() {\n if (this._input === null)\n throw \"nextToken requires a non-null input stream.\";\n const e = this._input.mark();\n try {\n for (; ; ) {\n if (this._hitEOF)\n return this.emitEOF(), this._token;\n this._token = null, this._channel = m2.DEFAULT_CHANNEL, this._tokenStartCharIndex = this._input.index, this._tokenStartColumn = this._interp.column, this._tokenStartLine = this._interp.line, this._text = null;\n let t = !1;\n for (; ; ) {\n this._type = m2.INVALID_TYPE;\n let n = At.SKIP;\n try {\n n = this._interp.match(this._input, this._mode);\n } catch (s) {\n if (s instanceof Gt)\n this.notifyListeners(s), this.recover(s);\n else\n throw console.log(s.stack), s;\n }\n if (this._input.LA(1) === m2.EOF && (this._hitEOF = !0), this._type === m2.INVALID_TYPE && (this._type = n), this._type === At.SKIP) {\n t = !0;\n break;\n }\n if (this._type !== At.MORE)\n break;\n }\n if (!t)\n return this._token === null && this.emit(), this._token;\n }\n } finally {\n this._input.release(e);\n }\n }\n /**\n * Instruct the lexer to skip creating a token for current lexer rule\n * and look for another token. nextToken() knows to keep looking when\n * a lexer rule finishes with token set to SKIP_TOKEN. Recall that\n * if token==null at end of any token rule, it creates one for you\n * and emits it.\n */\n skip() {\n this._type = At.SKIP;\n }\n more() {\n this._type = At.MORE;\n }\n mode(e) {\n this._mode = e;\n }\n pushMode(e) {\n this._interp.debug && console.log(\"pushMode \" + e), this._modeStack.push(this._mode), this.mode(e);\n }\n popMode() {\n if (this._modeStack.length === 0)\n throw \"Empty Stack\";\n return this._interp.debug && console.log(\"popMode back to \" + this._modeStack.slice(0, -1)), this.mode(this._modeStack.pop()), this._mode;\n }\n /**\n * By default does not support multiple emits per nextToken invocation\n * for efficiency reasons. Subclass and override this method, nextToken,\n * and getToken (to push tokens into a list and pull from that list\n * rather than a single variable as this implementation does).\n */\n emitToken(e) {\n this._token = e;\n }\n /**\n * The standard method called to automatically emit a token at the\n * outermost lexical rule. The token object should point into the\n * char buffer start..stop. If there is a text override in 'text',\n * use that to set the token's text. Override this method to emit\n * custom Token objects or provide a new factory.\n */\n emit() {\n const e = this._factory.create(\n this._tokenFactorySourcePair,\n this._type,\n this._text,\n this._channel,\n this._tokenStartCharIndex,\n this.getCharIndex() - 1,\n this._tokenStartLine,\n this._tokenStartColumn\n );\n return this.emitToken(e), e;\n }\n emitEOF() {\n const e = this.column, t = this.line, n = this._factory.create(\n this._tokenFactorySourcePair,\n m2.EOF,\n null,\n m2.DEFAULT_CHANNEL,\n this._input.index,\n this._input.index - 1,\n t,\n e\n );\n return this.emitToken(n), n;\n }\n // What is the index of the current character of lookahead?///\n getCharIndex() {\n return this._input.index;\n }\n /**\n * Return a list of all Token objects in input char stream.\n * Forces load of all tokens. Does not include EOF token.\n */\n getAllTokens() {\n const e = [];\n let t = this.nextToken();\n for (; t.type !== m2.EOF; )\n e.push(t), t = this.nextToken();\n return e;\n }\n notifyListeners(e) {\n const t = this._tokenStartCharIndex, n = this._input.index, s = this._input.getText(t, n), l = \"token recognition error at: '\" + this.getErrorDisplay(s) + \"'\";\n this.getErrorListenerDispatch().syntaxError(\n this,\n null,\n this._tokenStartLine,\n this._tokenStartColumn,\n l,\n e\n );\n }\n getErrorDisplay(e) {\n const t = [];\n for (let n = 0; n < e.length; n++)\n t.push(e[n]);\n return t.join(\"\");\n }\n getErrorDisplayForChar(e) {\n return e.charCodeAt(0) === m2.EOF ? \"This method updates {@link //dipsIntoOuterContext} and\n * {@link //hasSemanticContext} when necessary.
\n */\n add(e, t) {\n if (t === void 0 && (t = null), this.readOnly)\n throw \"This set is readonly\";\n e.semanticContext !== g1.NONE && (this.hasSemanticContext = !0), e.reachesIntoOuterContext > 0 && (this.dipsIntoOuterContext = !0);\n const n = this.configLookup.add(e);\n if (n === e)\n return this.cachedHashCode = -1, this.configs.push(e), !0;\n const s = !this.fullCtx, l = gc(n.context, e.context, s, t);\n return n.reachesIntoOuterContext = Math.max(n.reachesIntoOuterContext, e.reachesIntoOuterContext), e.precedenceFilterSuppressed && (n.precedenceFilterSuppressed = !0), n.context = l, !0;\n }\n getStates() {\n const e = new N3();\n for (let t = 0; t < this.configs.length; t++)\n e.add(this.configs[t].state);\n return e;\n }\n getPredicates() {\n const e = [];\n for (let t = 0; t < this.configs.length; t++) {\n const n = this.configs[t].semanticContext;\n n !== g1.NONE && e.push(n.semanticContext);\n }\n return e;\n }\n optimizeConfigs(e) {\n if (this.readOnly)\n throw \"This set is readonly\";\n if (this.configLookup.length !== 0)\n for (let t = 0; t < this.configs.length; t++) {\n const n = this.configs[t];\n n.context = e.getCachedContext(n.context);\n }\n }\n addAll(e) {\n for (let t = 0; t < e.length; t++)\n this.add(e[t]);\n return !1;\n }\n equals(e) {\n return this === e || e instanceof Ve && C0(this.configs, e.configs) && this.fullCtx === e.fullCtx && this.uniqueAlt === e.uniqueAlt && this.conflictingAlts === e.conflictingAlts && this.hasSemanticContext === e.hasSemanticContext && this.dipsIntoOuterContext === e.dipsIntoOuterContext;\n }\n hashCode() {\n const e = new D3();\n return e.update(this.configs), e.finish();\n }\n updateHashCode(e) {\n this.readOnly ? (this.cachedHashCode === -1 && (this.cachedHashCode = this.hashCode()), e.update(this.cachedHashCode)) : e.update(this.hashCode());\n }\n isEmpty() {\n return this.configs.length === 0;\n }\n contains(e) {\n if (this.configLookup === null)\n throw \"This method is not implemented for readonly sets.\";\n return this.configLookup.contains(e);\n }\n containsFast(e) {\n if (this.configLookup === null)\n throw \"This method is not implemented for readonly sets.\";\n return this.configLookup.containsFast(e);\n }\n clear() {\n if (this.readOnly)\n throw \"This set is readonly\";\n this.configs = [], this.cachedHashCode = -1, this.configLookup = new N3();\n }\n setReadonly(e) {\n this.readOnly = e, e && (this.configLookup = null);\n }\n toString() {\n return It(this.configs) + (this.hasSemanticContext ? \",hasSemanticContext=\" + this.hasSemanticContext : \"\") + (this.uniqueAlt !== G1.INVALID_ALT_NUMBER ? \",uniqueAlt=\" + this.uniqueAlt : \"\") + (this.conflictingAlts !== null ? \",conflictingAlts=\" + this.conflictingAlts : \"\") + (this.dipsIntoOuterContext ? \",dipsIntoOuterContext\" : \"\");\n }\n get items() {\n return this.configs;\n }\n get length() {\n return this.configs.length;\n }\n}\nclass V4 {\n constructor(e, t) {\n return e === null && (e = -1), t === null && (t = new Ve()), this.stateNumber = e, this.configs = t, this.edges = null, this.isAcceptState = !1, this.prediction = 0, this.lexerActionExecutor = null, this.requiresFullContext = !1, this.predicates = null, this;\n }\n /**\n * Get the set of all alts mentioned by all ATN configurations in this\n * DFA state.\n */\n getAltSet() {\n const e = new N3();\n if (this.configs !== null)\n for (let t = 0; t < this.configs.length; t++) {\n const n = this.configs[t];\n e.add(n.alt);\n }\n return e.length === 0 ? null : e;\n }\n /**\n * Two {@link DFAState} instances are equal if their ATN configuration sets\n * are the same. This method is used to see if a state already exists.\n *\n *Because the number of alternatives and number of ATN configurations are\n * finite, there is a finite number of DFA states that can be processed.\n * This is necessary to show that the algorithm terminates.
\n *\n *Cannot test the DFA state numbers here because in\n * {@link ParserATNSimulator//addDFAState} we need to know if any other state\n * exists that has this exact set of ATN configurations. The\n * {@link //stateNumber} is irrelevant.
\n */\n equals(e) {\n return this === e || e instanceof V4 && this.configs.equals(e.configs);\n }\n toString() {\n let e = \"\" + this.stateNumber + \":\" + this.configs;\n return this.isAcceptState && (e = e + \"=>\", this.predicates !== null ? e = e + this.predicates : e = e + this.prediction), e;\n }\n hashCode() {\n const e = new D3();\n return e.update(this.configs), e.finish();\n }\n}\nclass v4 {\n constructor(e, t) {\n return this.atn = e, this.sharedContextCache = t, this;\n }\n getCachedContext(e) {\n if (this.sharedContextCache === null)\n return e;\n const t = new nn();\n return cE(e, this.sharedContextCache, t);\n }\n}\nv4.ERROR = new V4(2147483647, new Ve());\nclass w_ extends Ve {\n constructor() {\n super(), this.configLookup = new N3();\n }\n}\nclass u3 extends X1 {\n constructor(e, t) {\n super(e, t);\n const n = e.lexerActionExecutor || null;\n return this.lexerActionExecutor = n || (t !== null ? t.lexerActionExecutor : null), this.passedThroughNonGreedyDecision = t !== null ? this.checkNonGreedyDecision(t, this.state) : !1, this.hashCodeForConfigSet = u3.prototype.hashCode, this.equalsForConfigSet = u3.prototype.equals, this;\n }\n updateHashCode(e) {\n e.update(this.state.stateNumber, this.alt, this.context, this.semanticContext, this.passedThroughNonGreedyDecision, this.lexerActionExecutor);\n }\n equals(e) {\n return this === e || e instanceof u3 && this.passedThroughNonGreedyDecision === e.passedThroughNonGreedyDecision && (this.lexerActionExecutor ? this.lexerActionExecutor.equals(e.lexerActionExecutor) : !e.lexerActionExecutor) && super.equals(e);\n }\n checkNonGreedyDecision(e, t) {\n return e.passedThroughNonGreedyDecision || t instanceof S0 && t.nonGreedy;\n }\n}\nclass Z5 extends Q4 {\n constructor(e, t) {\n super(t.actionType), this.offset = e, this.action = t, this.isPositionDependent = !0;\n }\n /**\n *This method calls {@link //execute} on the result of {@link //getAction}\n * using the provided {@code lexer}.
\n */\n execute(e) {\n this.action.execute(e);\n }\n updateHashCode(e) {\n e.update(this.actionType, this.offset, this.action);\n }\n equals(e) {\n return this === e ? !0 : e instanceof Z5 ? this.offset === e.offset && this.action === e.action : !1;\n }\n}\nclass o0 {\n /**\n * Represents an executor for a sequence of lexer actions which traversed during\n * the matching operation of a lexer rule (token).\n *\n *The executor tracks position information for position-dependent lexer actions\n * efficiently, ensuring that actions appearing only at the end of the rule do\n * not cause bloating of the {@link DFA} created for the lexer.
\n */\n constructor(e) {\n return this.lexerActions = e === null ? [] : e, this.cachedHashCode = D3.hashStuff(e), this;\n }\n /**\n * Creates a {@link LexerActionExecutor} which encodes the current offset\n * for position-dependent lexer actions.\n *\n *Normally, when the executor encounters lexer actions where\n * {@link LexerAction//isPositionDependent} returns {@code true}, it calls\n * {@link IntStream//seek} on the input {@link CharStream} to set the input\n * position to the end of the current token. This behavior provides\n * for efficient DFA representation of lexer actions which appear at the end\n * of a lexer rule, even when the lexer rule matches a variable number of\n * characters.
\n *\n *Prior to traversing a match transition in the ATN, the current offset\n * from the token start index is assigned to all position-dependent lexer\n * actions which have not already been assigned a fixed offset. By storing\n * the offsets relative to the token start index, the DFA representation of\n * lexer actions which appear in the middle of tokens remains efficient due\n * to sharing among tokens of the same length, regardless of their absolute\n * position in the input stream.
\n *\n *If the current executor already has offsets assigned to all\n * position-dependent lexer actions, the method returns {@code this}.
\n *\n * @param offset The current offset to assign to all position-dependent\n * lexer actions which do not already have offsets assigned.\n *\n * @return {LexerActionExecutor} A {@link LexerActionExecutor} which stores input stream offsets\n * for all position-dependent lexer actions.\n */\n fixOffsetBeforeMatch(e) {\n let t = null;\n for (let n = 0; n < this.lexerActions.length; n++)\n this.lexerActions[n].isPositionDependent && !(this.lexerActions[n] instanceof Z5) && (t === null && (t = this.lexerActions.concat([])), t[n] = new Z5(\n e,\n this.lexerActions[n]\n ));\n return t === null ? this : new o0(t);\n }\n /**\n * Execute the actions encapsulated by this executor within the context of a\n * particular {@link Lexer}.\n *\n *This method calls {@link IntStream//seek} to set the position of the\n * {@code input} {@link CharStream} prior to calling\n * {@link LexerAction//execute} on a position-dependent action. Before the\n * method returns, the input position will be restored to the same position\n * it was in when the method was invoked.
\n *\n * @param lexer The lexer instance.\n * @param input The input stream which is the source for the current token.\n * When this method is called, the current {@link IntStream//index} for\n * {@code input} should be the start of the following token, i.e. 1\n * character past the end of the current token.\n * @param startIndex The token start index. This value may be passed to\n * {@link IntStream//seek} to set the {@code input} position to the beginning\n * of the token.\n */\n execute(e, t, n) {\n let s = !1;\n const l = t.index;\n try {\n for (let c = 0; c < this.lexerActions.length; c++) {\n let L = this.lexerActions[c];\n if (L instanceof Z5) {\n const d = L.offset;\n t.seek(n + d), L = L.action, s = n + d !== l;\n } else L.isPositionDependent && (t.seek(l), s = !1);\n L.execute(e);\n }\n } finally {\n s && t.seek(l);\n }\n }\n hashCode() {\n return this.cachedHashCode;\n }\n updateHashCode(e) {\n e.update(this.cachedHashCode);\n }\n equals(e) {\n if (this === e)\n return !0;\n if (e instanceof o0) {\n if (this.cachedHashCode != e.cachedHashCode)\n return !1;\n if (this.lexerActions.length != e.lexerActions.length)\n return !1;\n {\n const t = this.lexerActions.length;\n for (let n = 0; n < t; ++n)\n if (!this.lexerActions[n].equals(e.lexerActions[n]))\n return !1;\n return !0;\n }\n } else return !1;\n }\n /**\n * Creates a {@link LexerActionExecutor} which executes the actions for\n * the input {@code lexerActionExecutor} followed by a specified\n * {@code lexerAction}.\n *\n * @param lexerActionExecutor The executor for actions already traversed by\n * the lexer while matching a token within a particular\n * {@link LexerATNConfig}. If this is {@code null}, the method behaves as\n * though it were an empty executor.\n * @param lexerAction The lexer action to execute after the actions\n * specified in {@code lexerActionExecutor}.\n *\n * @return {LexerActionExecutor} A {@link LexerActionExecutor} for executing the combine actions\n * of {@code lexerActionExecutor} and {@code lexerAction}.\n */\n static append(e, t) {\n if (e === null)\n return new o0([t]);\n const n = e.lexerActions.concat([t]);\n return new o0(n);\n }\n}\nfunction M_(i) {\n i.index = -1, i.line = 0, i.column = -1, i.dfaState = null;\n}\nclass sx {\n constructor() {\n M_(this);\n }\n reset() {\n M_(this);\n }\n}\nclass q1 extends v4 {\n /**\n * When we hit an accept state in either the DFA or the ATN, we\n * have to notify the character stream to start buffering characters\n * via {@link IntStream//mark} and record the current state. The current sim state\n * includes the current index into the input, the current line,\n * and current character position in that line. Note that the Lexer is\n * tracking the starting line and characterization of the token. These\n * variables track the \"state\" of the simulator when it hits an accept state.\n *\n *We track these variables separately for the DFA and ATN simulation\n * because the DFA simulation often has to fail over to the ATN\n * simulation. If the ATN simulation fails, we need the DFA to fall\n * back to its previously accepted state, if any. If the ATN succeeds,\n * then the ATN does the accept and the DFA simulator that invoked it\n * can simply return the predicted token type.
\n */\n constructor(e, t, n, s) {\n super(t, s), this.decisionToDFA = n, this.recog = e, this.startIndex = -1, this.line = 1, this.column = 0, this.mode = $e.DEFAULT_MODE, this.prevAccept = new sx();\n }\n copyState(e) {\n this.column = e.column, this.line = e.line, this.mode = e.mode, this.startIndex = e.startIndex;\n }\n match(e, t) {\n this.mode = t;\n const n = e.mark();\n try {\n this.startIndex = e.index, this.prevAccept.reset();\n const s = this.decisionToDFA[t];\n return s.s0 === null ? this.matchATN(e) : this.execATN(e, s.s0);\n } finally {\n e.release(n);\n }\n }\n reset() {\n this.prevAccept.reset(), this.startIndex = -1, this.line = 1, this.column = 0, this.mode = $e.DEFAULT_MODE;\n }\n matchATN(e) {\n const t = this.atn.modeToStartState[this.mode];\n q1.debug && console.log(\"matchATN mode \" + this.mode + \" start: \" + t);\n const n = this.mode, s = this.computeStartState(e, t), l = s.hasSemanticContext;\n s.hasSemanticContext = !1;\n const c = this.addDFAState(s);\n l || (this.decisionToDFA[this.mode].s0 = c);\n const L = this.execATN(e, c);\n return q1.debug && console.log(\"DFA after matchATN: \" + this.decisionToDFA[n].toLexerString()), L;\n }\n execATN(e, t) {\n q1.debug && console.log(\"start state closure=\" + t.configs), t.isAcceptState && this.captureSimState(this.prevAccept, e, t);\n let n = e.LA(1), s = t;\n for (; ; ) {\n q1.debug && console.log(\"execATN loop starting closure: \" + s.configs);\n let l = this.getExistingTargetState(s, n);\n if (l === null && (l = this.computeTargetState(e, s, n)), l === v4.ERROR || (n !== m2.EOF && this.consume(e), l.isAcceptState && (this.captureSimState(this.prevAccept, e, l), n === m2.EOF)))\n break;\n n = e.LA(1), s = l;\n }\n return this.failOrAccept(this.prevAccept, e, s.configs, n);\n }\n /**\n * Get an existing target state for an edge in the DFA. If the target state\n * for the edge has not yet been computed or is otherwise not available,\n * this method returns {@code null}.\n *\n * @param s The current DFA state\n * @param t The next input symbol\n * @return The existing target DFA state for the given input symbol\n * {@code t}, or {@code null} if the target state for this edge is not\n * already cached\n */\n getExistingTargetState(e, t) {\n if (e.edges === null || t < q1.MIN_DFA_EDGE || t > q1.MAX_DFA_EDGE)\n return null;\n let n = e.edges[t - q1.MIN_DFA_EDGE];\n return n === void 0 && (n = null), q1.debug && n !== null && console.log(\"reuse state \" + e.stateNumber + \" edge to \" + n.stateNumber), n;\n }\n /**\n * Compute a target state for an edge in the DFA, and attempt to add the\n * computed state and corresponding edge to the DFA.\n *\n * @param input The input stream\n * @param s The current DFA state\n * @param t The next input symbol\n *\n * @return The computed target DFA state for the given input symbol\n * {@code t}. If {@code t} does not lead to a valid DFA state, this method\n * returns {@link //ERROR}.\n */\n computeTargetState(e, t, n) {\n const s = new w_();\n return this.getReachableConfigSet(e, t.configs, s, n), s.items.length === 0 ? (s.hasSemanticContext || this.addDFAEdge(t, n, v4.ERROR), v4.ERROR) : this.addDFAEdge(t, n, null, s);\n }\n failOrAccept(e, t, n, s) {\n if (this.prevAccept.dfaState !== null) {\n const l = e.dfaState.lexerActionExecutor;\n return this.accept(\n t,\n l,\n this.startIndex,\n e.index,\n e.line,\n e.column\n ), e.dfaState.prediction;\n } else {\n if (s === m2.EOF && t.index === this.startIndex)\n return m2.EOF;\n throw new Sc(this.recog, t, this.startIndex, n);\n }\n }\n /**\n * Given a starting configuration set, figure out all ATN configurations\n * we can reach upon input {@code t}. Parameter {@code reach} is a return\n * parameter.\n */\n getReachableConfigSet(e, t, n, s) {\n let l = G1.INVALID_ALT_NUMBER;\n for (let c = 0; c < t.items.length; c++) {\n const L = t.items[c], d = L.alt === l;\n if (!(d && L.passedThroughNonGreedyDecision)) {\n q1.debug && console.log(`testing %s at %s\n`, this.getTokenName(s), L.toString(this.recog, !0));\n for (let _ = 0; _ < L.state.transitions.length; _++) {\n const p = L.state.transitions[_], m = this.getReachableTarget(p, s);\n if (m !== null) {\n let f = L.lexerActionExecutor;\n f !== null && (f = f.fixOffsetBeforeMatch(e.index - this.startIndex));\n const h = s === m2.EOF, R = new u3({ state: m, lexerActionExecutor: f }, L);\n this.closure(\n e,\n R,\n n,\n d,\n !0,\n h\n ) && (l = L.alt);\n }\n }\n }\n }\n }\n accept(e, t, n, s, l, c) {\n q1.debug && console.log(`ACTION %s\n`, t), e.seek(s), this.line = l, this.column = c, t !== null && this.recog !== null && t.execute(this.recog, e, n);\n }\n getReachableTarget(e, t) {\n return e.matches(t, 0, $e.MAX_CHAR_VALUE) ? e.target : null;\n }\n computeStartState(e, t) {\n const n = t1.EMPTY, s = new w_();\n for (let l = 0; l < t.transitions.length; l++) {\n const c = t.transitions[l].target, L = new u3({ state: c, alt: l + 1, context: n }, null);\n this.closure(e, L, s, !1, !1, !1);\n }\n return s;\n }\n /**\n * Since the alternatives within any lexer decision are ordered by\n * preference, this method stops pursuing the closure as soon as an accept\n * state is reached. After the first accept state is reached by depth-first\n * search from {@code config}, all other (potentially reachable) states for\n * this rule would have a lower priority.\n *\n * @return {Boolean} {@code true} if an accept state is reached, otherwise\n * {@code false}.\n */\n closure(e, t, n, s, l, c) {\n let L = null;\n if (q1.debug && console.log(\"closure(\" + t.toString(this.recog, !0) + \")\"), t.state instanceof qe) {\n if (q1.debug && (this.recog !== null ? console.log(`closure at %s rule stop %s\n`, this.recog.ruleNames[t.state.ruleIndex], t) : console.log(`closure at rule stop %s\n`, t)), t.context === null || t.context.hasEmptyPath()) {\n if (t.context === null || t.context.isEmpty())\n return n.add(t), !0;\n n.add(new u3({ state: t.state, context: t1.EMPTY }, t)), s = !0;\n }\n if (t.context !== null && !t.context.isEmpty()) {\n for (let d = 0; d < t.context.length; d++)\n if (t.context.getReturnState(d) !== t1.EMPTY_RETURN_STATE) {\n const _ = t.context.getParent(d), p = this.atn.states[t.context.getReturnState(d)];\n L = new u3({ state: p, context: _ }, t), s = this.closure(\n e,\n L,\n n,\n s,\n l,\n c\n );\n }\n }\n return s;\n }\n t.state.epsilonOnlyTransitions || (!s || !t.passedThroughNonGreedyDecision) && n.add(t);\n for (let d = 0; d < t.state.transitions.length; d++) {\n const _ = t.state.transitions[d];\n L = this.getEpsilonTarget(e, t, _, n, l, c), L !== null && (s = this.closure(\n e,\n L,\n n,\n s,\n l,\n c\n ));\n }\n return s;\n }\n // side-effect: can alter configs.hasSemanticContext\n getEpsilonTarget(e, t, n, s, l, c) {\n let L = null;\n if (n.serializationType === x2.RULE) {\n const d = We.create(t.context, n.followState.stateNumber);\n L = new u3({ state: n.target, context: d }, t);\n } else {\n if (n.serializationType === x2.PRECEDENCE)\n throw \"Precedence predicates are not supported in lexers.\";\n if (n.serializationType === x2.PREDICATE)\n q1.debug && console.log(\"EVAL rule \" + n.ruleIndex + \":\" + n.predIndex), s.hasSemanticContext = !0, this.evaluatePredicate(e, n.ruleIndex, n.predIndex, l) && (L = new u3({ state: n.target }, t));\n else if (n.serializationType === x2.ACTION)\n if (t.context === null || t.context.hasEmptyPath()) {\n const d = o0.append(\n t.lexerActionExecutor,\n this.atn.lexerActions[n.actionIndex]\n );\n L = new u3({ state: n.target, lexerActionExecutor: d }, t);\n } else\n L = new u3({ state: n.target }, t);\n else n.serializationType === x2.EPSILON ? L = new u3({ state: n.target }, t) : (n.serializationType === x2.ATOM || n.serializationType === x2.RANGE || n.serializationType === x2.SET) && c && n.matches(m2.EOF, 0, $e.MAX_CHAR_VALUE) && (L = new u3({ state: n.target }, t));\n }\n return L;\n }\n /**\n * Evaluate a predicate specified in the lexer.\n *\n *If {@code speculative} is {@code true}, this method was called before\n * {@link //consume} for the matched character. This method should call\n * {@link //consume} before evaluating the predicate to ensure position\n * sensitive values, including {@link Lexer//getText}, {@link Lexer//getLine},\n * and {@link Lexer//getcolumn}, properly reflect the current\n * lexer state. This method should restore {@code input} and the simulator\n * to the original state before returning (i.e. undo the actions made by the\n * call to {@link //consume}.
\n *\n * @param input The input stream.\n * @param ruleIndex The rule containing the predicate.\n * @param predIndex The index of the predicate within the rule.\n * @param speculative {@code true} if the current index in {@code input} is\n * one character before the predicate's location.\n *\n * @return {@code true} if the specified predicate evaluates to\n * {@code true}.\n */\n evaluatePredicate(e, t, n, s) {\n if (this.recog === null)\n return !0;\n if (!s)\n return this.recog.sempred(null, t, n);\n const l = this.column, c = this.line, L = e.index, d = e.mark();\n try {\n return this.consume(e), this.recog.sempred(null, t, n);\n } finally {\n this.column = l, this.line = c, e.seek(L), e.release(d);\n }\n }\n captureSimState(e, t, n) {\n e.index = t.index, e.line = this.line, e.column = this.column, e.dfaState = n;\n }\n addDFAEdge(e, t, n, s) {\n if (n === void 0 && (n = null), s === void 0 && (s = null), n === null && s !== null) {\n const l = s.hasSemanticContext;\n if (s.hasSemanticContext = !1, n = this.addDFAState(s), l)\n return n;\n }\n return t < q1.MIN_DFA_EDGE || t > q1.MAX_DFA_EDGE || (q1.debug && console.log(\"EDGE \" + e + \" -> \" + n + \" upon \" + t), e.edges === null && (e.edges = []), e.edges[t - q1.MIN_DFA_EDGE] = n), n;\n }\n /**\n * Add a new DFA state if there isn't one with this set of\n * configurations already. This method also detects the first\n * configuration containing an ATN rule stop state. Later, when\n * traversing the DFA, we will know which rule to accept.\n */\n addDFAState(e) {\n const t = new V4(null, e);\n let n = null;\n for (let L = 0; L < e.items.length; L++) {\n const d = e.items[L];\n if (d.state instanceof qe) {\n n = d;\n break;\n }\n }\n n !== null && (t.isAcceptState = !0, t.lexerActionExecutor = n.lexerActionExecutor, t.prediction = this.atn.ruleToTokenType[n.state.ruleIndex]);\n const s = this.decisionToDFA[this.mode], l = s.states.get(t);\n if (l !== null)\n return l;\n const c = t;\n return c.stateNumber = s.states.length, e.setReadonly(!0), c.configs = e, s.states.add(c), c;\n }\n getDFA(e) {\n return this.decisionToDFA[e];\n }\n // Get the text matched so far for the current token.\n getText(e) {\n return e.getText(this.startIndex, e.index - 1);\n }\n consume(e) {\n e.LA(1) === 10 ? (this.line += 1, this.column = 0) : this.column += 1, e.consume();\n }\n getTokenName(e) {\n return e === -1 ? \"EOF\" : \"'\" + String.fromCharCode(e) + \"'\";\n }\n}\nq1.debug = !1;\nq1.dfa_debug = !1;\nq1.MIN_DFA_EDGE = 0;\nq1.MAX_DFA_EDGE = 127;\nclass CE {\n constructor(e, t) {\n this.alt = t, this.pred = e;\n }\n toString() {\n return \"(\" + this.pred + \", \" + this.alt + \")\";\n }\n}\nclass ox {\n constructor() {\n this.data = {};\n }\n get(e) {\n return this.data[\"k-\" + e] || null;\n }\n set(e, t) {\n this.data[\"k-\" + e] = t;\n }\n values() {\n return Object.keys(this.data).filter((e) => e.startsWith(\"k-\")).map((e) => this.data[e], this);\n }\n}\nconst A1 = {\n /**\n * The SLL(*) prediction mode. This prediction mode ignores the current\n * parser context when making predictions. This is the fastest prediction\n * mode, and provides correct results for many grammars. This prediction\n * mode is more powerful than the prediction mode provided by ANTLR 3, but\n * may result in syntax errors for grammar and input combinations which are\n * not SLL.\n *\n *\n * When using this prediction mode, the parser will either return a correct\n * parse tree (i.e. the same parse tree that would be returned with the\n * {@link //LL} prediction mode), or it will report a syntax error. If a\n * syntax error is encountered when using the {@link //SLL} prediction mode,\n * it may be due to either an actual syntax error in the input or indicate\n * that the particular combination of grammar and input requires the more\n * powerful {@link //LL} prediction abilities to complete successfully.
\n *\n *\n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.
\n */\n SLL: 0,\n /**\n * The LL(*) prediction mode. This prediction mode allows the current parser\n * context to be used for resolving SLL conflicts that occur during\n * prediction. This is the fastest prediction mode that guarantees correct\n * parse results for all combinations of grammars with syntactically correct\n * inputs.\n *\n *\n * When using this prediction mode, the parser will make correct decisions\n * for all syntactically-correct grammar and input combinations. However, in\n * cases where the grammar is truly ambiguous this prediction mode might not\n * report a precise answer for exactly which alternatives are\n * ambiguous.
\n *\n *\n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.
\n */\n LL: 1,\n /**\n *\n * The LL(*) prediction mode with exact ambiguity detection. In addition to\n * the correctness guarantees provided by the {@link //LL} prediction mode,\n * this prediction mode instructs the prediction algorithm to determine the\n * complete and exact set of ambiguous alternatives for every ambiguous\n * decision encountered while parsing.\n *\n *\n * This prediction mode may be used for diagnosing ambiguities during\n * grammar development. Due to the performance overhead of calculating sets\n * of ambiguous alternatives, this prediction mode should be avoided when\n * the exact results are not necessary.
\n *\n *\n * This prediction mode does not provide any guarantees for prediction\n * behavior for syntactically-incorrect inputs.
\n */\n LL_EXACT_AMBIG_DETECTION: 2,\n /**\n *\n * Computes the SLL prediction termination condition.\n *\n *\n * This method computes the SLL prediction termination condition for both of\n * the following cases.
\n *\n *COMBINED SLL+LL PARSING
\n *\n *When LL-fallback is enabled upon SLL conflict, correct predictions are\n * ensured regardless of how the termination condition is computed by this\n * method. Due to the substantially higher cost of LL prediction, the\n * prediction should only fall back to LL when the additional lookahead\n * cannot lead to a unique SLL prediction.
\n *\n *Assuming combined SLL+LL parsing, an SLL configuration set with only\n * conflicting subsets should fall back to full LL, even if the\n * configuration sets don't resolve to the same alternative (e.g.\n * {@code {1,2}} and {@code {3,4}}. If there is at least one non-conflicting\n * configuration, SLL could continue with the hopes that more lookahead will\n * resolve via one of those non-conflicting configurations.
\n *\n *Here's the prediction termination rule them: SLL (for SLL+LL parsing)\n * stops when it sees only conflicting configuration subsets. In contrast,\n * full LL keeps going when there is uncertainty.
\n *\n *HEURISTIC
\n *\n *As a heuristic, we stop prediction when we see any conflicting subset\n * unless we see a state that only has one alternative associated with it.\n * The single-alt-state thing lets prediction continue upon rules like\n * (otherwise, it would admit defeat too soon):
\n *\n *{@code [12|1|[], 6|2|[], 12|2|[]]. s : (ID | ID ID?) ';' ;}
\n *\n *When the ATN simulation reaches the state before {@code ';'}, it has a\n * DFA state that looks like: {@code [12|1|[], 6|2|[], 12|2|[]]}. Naturally\n * {@code 12|1|[]} and {@code 12|2|[]} conflict, but we cannot stop\n * processing this node because alternative to has another way to continue,\n * via {@code [6|2|[]]}.
\n *\n *It also let's us continue for this rule:
\n *\n *{@code [1|1|[], 1|2|[], 8|3|[]] a : A | A | A B ;}
\n *\n *After matching input A, we reach the stop state for rule A, state 1.\n * State 8 is the state right before B. Clearly alternatives 1 and 2\n * conflict and no amount of further lookahead will separate the two.\n * However, alternative 3 will be able to continue and so we do not stop\n * working on this state. In the previous example, we're concerned with\n * states associated with the conflicting alternatives. Here alt 3 is not\n * associated with the conflicting configs, but since we can continue\n * looking for input reasonably, don't declare the state done.
\n *\n *PURE SLL PARSING
\n *\n *To handle pure SLL parsing, all we have to do is make sure that we\n * combine stack contexts for configurations that differ only by semantic\n * predicate. From there, we can do the usual SLL termination heuristic.
\n *\n *PREDICATES IN SLL+LL PARSING
\n *\n *SLL decisions don't evaluate predicates until after they reach DFA stop\n * states because they need to create the DFA cache that works in all\n * semantic situations. In contrast, full LL evaluates predicates collected\n * during start state computation so it can ignore predicates thereafter.\n * This means that SLL termination detection can totally ignore semantic\n * predicates.
\n *\n *Implementation-wise, {@link ATNConfigSet} combines stack contexts but not\n * semantic predicate contexts so we might see two configurations like the\n * following.
\n *\n *{@code (s, 1, x, {}), (s, 1, x', {p})}
\n *\n *Before testing these configurations against others, we have to merge\n * {@code x} and {@code x'} (without modifying the existing configurations).\n * For example, we test {@code (x+x')==x''} when looking for conflicts in\n * the following configurations.
\n *\n *{@code (s, 1, x, {}), (s, 1, x', {p}), (s, 2, x'', {})}
\n *\n *If the configuration set has predicates (as indicated by\n * {@link ATNConfigSet//hasSemanticContext}), this algorithm makes a copy of\n * the configurations to strip out all of the predicates so that a standard\n * {@link ATNConfigSet} will merge everything ignoring predicates.
\n */\n hasSLLConflictTerminatingPrediction: function(i, e) {\n if (A1.allConfigsInRuleStopStates(e))\n return !0;\n if (i === A1.SLL && e.hasSemanticContext) {\n const n = new Ve();\n for (let s = 0; s < e.items.length; s++) {\n let l = e.items[s];\n l = new X1({ semanticContext: g1.NONE }, l), n.add(l);\n }\n e = n;\n }\n const t = A1.getConflictingAltSubsets(e);\n return A1.hasConflictingAltSet(t) && !A1.hasStateAssociatedWithOneAlt(e);\n },\n /**\n * Checks if any configuration in {@code configs} is in a\n * {@link RuleStopState}. Configurations meeting this condition have reached\n * the end of the decision rule (local context) or end of start rule (full\n * context).\n *\n * @param configs the configuration set to test\n * @return {@code true} if any configuration in {@code configs} is in a\n * {@link RuleStopState}, otherwise {@code false}\n */\n hasConfigInRuleStopState: function(i) {\n for (let e = 0; e < i.items.length; e++)\n if (i.items[e].state instanceof qe)\n return !0;\n return !1;\n },\n /**\n * Checks if all configurations in {@code configs} are in a\n * {@link RuleStopState}. Configurations meeting this condition have reached\n * the end of the decision rule (local context) or end of start rule (full\n * context).\n *\n * @param configs the configuration set to test\n * @return {@code true} if all configurations in {@code configs} are in a\n * {@link RuleStopState}, otherwise {@code false}\n */\n allConfigsInRuleStopStates: function(i) {\n for (let e = 0; e < i.items.length; e++)\n if (!(i.items[e].state instanceof qe))\n return !1;\n return !0;\n },\n /**\n *\n * Full LL prediction termination.\n *\n *Can we stop looking ahead during ATN simulation or is there some\n * uncertainty as to which alternative we will ultimately pick, after\n * consuming more input? Even if there are partial conflicts, we might know\n * that everything is going to resolve to the same minimum alternative. That\n * means we can stop since no more lookahead will change that fact. On the\n * other hand, there might be multiple conflicts that resolve to different\n * minimums. That means we need more look ahead to decide which of those\n * alternatives we should predict.
\n *\n *The basic idea is to split the set of configurations {@code C}, into\n * conflicting subsets {@code (s, _, ctx, _)} and singleton subsets with\n * non-conflicting configurations. Two configurations conflict if they have\n * identical {@link ATNConfig//state} and {@link ATNConfig//context} values\n * but different {@link ATNConfig//alt} value, e.g. {@code (s, i, ctx, _)}\n * and {@code (s, j, ctx, _)} for {@code i!=j}.
\n *\n *Reduce these configuration subsets to the set of possible alternatives.\n * You can compute the alternative subsets in one pass as follows:
\n *\n *{@code A_s,ctx = {i | (s, i, ctx, _)}} for each configuration in\n * {@code C} holding {@code s} and {@code ctx} fixed.
\n *\n *Or in pseudo-code, for each configuration {@code c} in {@code C}:
\n *\n *\n * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n * alt and not pred\n * \n *\n * The values in {@code map} are the set of {@code A_s,ctx} sets.
\n *\n *If {@code |A_s,ctx|=1} then there is no conflict associated with\n * {@code s} and {@code ctx}.
\n *\n *Reduce the subsets to singletons by choosing a minimum of each subset. If\n * the union of these alternative subsets is a singleton, then no amount of\n * more lookahead will help us. We will always pick that alternative. If,\n * however, there is more than one alternative, then we are uncertain which\n * alternative to predict and must continue looking for resolution. We may\n * or may not discover an ambiguity in the future, even if there are no\n * conflicting subsets this round.
\n *\n *The biggest sin is to terminate early because it means we've made a\n * decision but were uncertain as to the eventual outcome. We haven't used\n * enough lookahead. On the other hand, announcing a conflict too late is no\n * big deal; you will still have the conflict. It's just inefficient. It\n * might even look until the end of file.
\n *\n *No special consideration for semantic predicates is required because\n * predicates are evaluated on-the-fly for full LL prediction, ensuring that\n * no configuration contains a semantic context during the termination\n * check.
\n *\n *CONFLICTING CONFIGS
\n *\n *Two configurations {@code (s, i, x)} and {@code (s, j, x')}, conflict\n * when {@code i!=j} but {@code x=x'}. Because we merge all\n * {@code (s, i, _)} configurations together, that means that there are at\n * most {@code n} configurations associated with state {@code s} for\n * {@code n} possible alternatives in the decision. The merged stacks\n * complicate the comparison of configuration contexts {@code x} and\n * {@code x'}. Sam checks to see if one is a subset of the other by calling\n * merge and checking to see if the merged result is either {@code x} or\n * {@code x'}. If the {@code x} associated with lowest alternative {@code i}\n * is the superset, then {@code i} is the only possible prediction since the\n * others resolve to {@code min(i)} as well. However, if {@code x} is\n * associated with {@code j>i} then at least one stack configuration for\n * {@code j} is not in conflict with alternative {@code i}. The algorithm\n * should keep going, looking for more lookahead due to the uncertainty.
\n *\n *For simplicity, I'm doing a equality check between {@code x} and\n * {@code x'} that lets the algorithm continue to consume lookahead longer\n * than necessary. The reason I like the equality is of course the\n * simplicity but also because that is the test you need to detect the\n * alternatives that are actually in conflict.
\n *\n *CONTINUE/STOP RULE
\n *\n *Continue if union of resolved alternative sets from non-conflicting and\n * conflicting alternative subsets has more than one alternative. We are\n * uncertain about which alternative to predict.
\n *\n *The complete set of alternatives, {@code [i for (_,i,_)]}, tells us which\n * alternatives are still in the running for the amount of input we've\n * consumed at this point. The conflicting sets let us to strip away\n * configurations that won't lead to more states because we resolve\n * conflicts to the configuration with a minimum alternate for the\n * conflicting set.
\n *\n *CASES
\n *\n *EXACT AMBIGUITY DETECTION
\n *\n *If all states report the same conflicting set of alternatives, then we\n * know we have the exact ambiguity set.
\n *\n *|A_i|>1 and\n * A_i = A_j for all i, j.
In other words, we continue examining lookahead until all {@code A_i}\n * have more than one alternative and all {@code A_i} are the same. If\n * {@code A={{1,2}, {1,3}}}, then regular LL prediction would terminate\n * because the resolved set is {@code {1}}. To determine what the real\n * ambiguity is, we have to know whether the ambiguity is between one and\n * two or one and three so we keep going. We can only stop prediction when\n * we need exact ambiguity detection when the sets look like\n * {@code A={{1,2}}} or {@code {{1,2},{1,2}}}, etc...
\n */\n resolvesToJustOneViableAlt: function(i) {\n return A1.getSingleViableAlt(i);\n },\n /**\n * Determines if every alternative subset in {@code altsets} contains more\n * than one alternative.\n *\n * @param altsets a collection of alternative subsets\n * @return {@code true} if every {@link BitSet} in {@code altsets} has\n * {@link BitSet//cardinality cardinality} > 1, otherwise {@code false}\n */\n allSubsetsConflict: function(i) {\n return !A1.hasNonConflictingAltSet(i);\n },\n /**\n * Determines if any single alternative subset in {@code altsets} contains\n * exactly one alternative.\n *\n * @param altsets a collection of alternative subsets\n * @return {@code true} if {@code altsets} contains a {@link BitSet} with\n * {@link BitSet//cardinality cardinality} 1, otherwise {@code false}\n */\n hasNonConflictingAltSet: function(i) {\n for (let e = 0; e < i.length; e++)\n if (i[e].length === 1)\n return !0;\n return !1;\n },\n /**\n * Determines if any single alternative subset in {@code altsets} contains\n * more than one alternative.\n *\n * @param altsets a collection of alternative subsets\n * @return {@code true} if {@code altsets} contains a {@link BitSet} with\n * {@link BitSet//cardinality cardinality} > 1, otherwise {@code false}\n */\n hasConflictingAltSet: function(i) {\n for (let e = 0; e < i.length; e++)\n if (i[e].length > 1)\n return !0;\n return !1;\n },\n /**\n * Determines if every alternative subset in {@code altsets} is equivalent.\n *\n * @param altsets a collection of alternative subsets\n * @return {@code true} if every member of {@code altsets} is equal to the\n * others, otherwise {@code false}\n */\n allSubsetsEqual: function(i) {\n let e = null;\n for (let t = 0; t < i.length; t++) {\n const n = i[t];\n if (e === null)\n e = n;\n else if (n !== e)\n return !1;\n }\n return !0;\n },\n /**\n * Returns the unique alternative predicted by all alternative subsets in\n * {@code altsets}. If no such alternative exists, this method returns\n * {@link ATN//INVALID_ALT_NUMBER}.\n *\n * @param altsets a collection of alternative subsets\n */\n getUniqueAlt: function(i) {\n const e = A1.getAlts(i);\n return e.length === 1 ? e.minValue() : G1.INVALID_ALT_NUMBER;\n },\n /**\n * Gets the complete set of represented alternatives for a collection of\n * alternative subsets. This method returns the union of each {@link BitSet}\n * in {@code altsets}.\n *\n * @param altsets a collection of alternative subsets\n * @return the set of represented alternatives in {@code altsets}\n */\n getAlts: function(i) {\n const e = new R4();\n return i.map(function(t) {\n e.or(t);\n }), e;\n },\n /**\n * This function gets the conflicting alt subsets from a configuration set.\n * For each configuration {@code c} in {@code configs}:\n *\n *\n * map[c] U= c.{@link ATNConfig//alt alt} // map hash/equals uses s and x, not\n * alt and not pred\n * \n */\n getConflictingAltSubsets: function(i) {\n const e = new nn();\n return e.hashFunction = function(t) {\n D3.hashStuff(t.state.stateNumber, t.context);\n }, e.equalsFunction = function(t, n) {\n return t.state.stateNumber === n.state.stateNumber && t.context.equals(n.context);\n }, i.items.map(function(t) {\n let n = e.get(t);\n n === null && (n = new R4(), e.set(t, n)), n.add(t.alt);\n }), e.getValues();\n },\n /**\n * Get a map from state to alt subset from a configuration set. For each\n * configuration {@code c} in {@code configs}:\n *\n * \n * map[c.{@link ATNConfig//state state}] U= c.{@link ATNConfig//alt alt}\n * \n */\n getStateToAltMap: function(i) {\n const e = new ox();\n return i.items.map(function(t) {\n let n = e.get(t.state);\n n === null && (n = new R4(), e.set(t.state, n)), n.add(t.alt);\n }), e;\n },\n hasStateAssociatedWithOneAlt: function(i) {\n const e = A1.getStateToAltMap(i).values();\n for (let t = 0; t < e.length; t++)\n if (e[t].length === 1)\n return !0;\n return !1;\n },\n getSingleViableAlt: function(i) {\n let e = null;\n for (let t = 0; t < i.length; t++) {\n const s = i[t].minValue();\n if (e === null)\n e = s;\n else if (e !== s)\n return G1.INVALID_ALT_NUMBER;\n }\n return e;\n }\n};\nclass Tc extends Gt {\n constructor(e, t, n, s, l, c) {\n c = c || e._ctx, s = s || e.getCurrentToken(), n = n || e.getCurrentToken(), t = t || e.getInputStream(), super({ message: \"\", recognizer: e, input: t, ctx: c }), this.deadEndConfigs = l, this.startToken = n, this.offendingToken = s;\n }\n}\nclass lx {\n constructor(e) {\n this.defaultMapCtor = e || nn, this.cacheMap = new this.defaultMapCtor();\n }\n get(e, t) {\n const n = this.cacheMap.get(e) || null;\n return n === null ? null : n.get(t) || null;\n }\n set(e, t, n) {\n let s = this.cacheMap.get(e) || null;\n s === null && (s = new this.defaultMapCtor(), this.cacheMap.set(e, s)), s.set(t, n);\n }\n}\nclass cx extends v4 {\n constructor(e, t, n, s) {\n super(t, s), this.parser = e, this.decisionToDFA = n, this.predictionMode = A1.LL, this._input = null, this._startIndex = 0, this._outerContext = null, this._dfa = null, this.mergeCache = null, this.debug = !1, this.debug_closure = !1, this.debug_add = !1, this.debug_list_atn_decisions = !1, this.dfa_debug = !1, this.retry_debug = !1;\n }\n reset() {\n }\n adaptivePredict(e, t, n) {\n (this.debug || this.debug_list_atn_decisions) && console.log(\"adaptivePredict decision \" + t + \" exec LA(1)==\" + this.getLookaheadName(e) + \" line \" + e.LT(1).line + \":\" + e.LT(1).column), this._input = e, this._startIndex = e.index, this._outerContext = n;\n const s = this.decisionToDFA[t];\n this._dfa = s;\n const l = e.mark(), c = e.index;\n try {\n let L;\n if (s.precedenceDfa ? L = s.getPrecedenceStartState(this.parser.getPrecedence()) : L = s.s0, L === null) {\n n === null && (n = _0.EMPTY), (this.debug || this.debug_list_atn_decisions) && console.log(\"predictATN decision \" + s.decision + \" exec LA(1)==\" + this.getLookaheadName(e) + \", outerContext=\" + n.toString(this.parser.ruleNames));\n let p = this.computeStartState(s.atnStartState, _0.EMPTY, !1);\n s.precedenceDfa ? (s.s0.configs = p, p = this.applyPrecedenceFilter(p), L = this.addDFAState(s, new V4(null, p)), s.setPrecedenceStartState(this.parser.getPrecedence(), L)) : (L = this.addDFAState(s, new V4(null, p)), s.s0 = L);\n }\n const d = this.execATN(s, L, e, c, n);\n return this.debug && console.log(\"DFA after predictATN: \" + s.toString(this.parser.literalNames, this.parser.symbolicNames)), d;\n } finally {\n this._dfa = null, this.mergeCache = null, e.seek(c), e.release(l);\n }\n }\n /**\n * Performs ATN simulation to compute a predicted alternative based\n * upon the remaining input, but also updates the DFA cache to avoid\n * having to traverse the ATN again for the same input sequence.\n *\n * There are some key conditions we're looking for after computing a new\n * set of ATN configs (proposed DFA state):\n * if the set is empty, there is no viable alternative for current symbol\n * does the state uniquely predict an alternative?\n * does the state have a conflict that would prevent us from\n * putting it on the work list?\n *\n * We also have some key operations to do:\n * add an edge from previous DFA state to potentially new DFA state, D,\n * upon current symbol but only if adding to work list, which means in all\n * cases except no viable alternative (and possibly non-greedy decisions?)\n * collecting predicates and adding semantic context to DFA accept states\n * adding rule context to context-sensitive DFA accept states\n * consuming an input symbol\n * reporting a conflict\n * reporting an ambiguity\n * reporting a context sensitivity\n * reporting insufficient predicates\n *\n * cover these cases:\n * dead end\n * single alt\n * single alt + preds\n * conflict\n * conflict + preds\n *\n */\n execATN(e, t, n, s, l) {\n (this.debug || this.debug_list_atn_decisions) && console.log(\"execATN decision \" + e.decision + \" exec LA(1)==\" + this.getLookaheadName(n) + \" line \" + n.LT(1).line + \":\" + n.LT(1).column);\n let c, L = t;\n this.debug && console.log(\"s0 = \" + t);\n let d = n.LA(1);\n for (; ; ) {\n let _ = this.getExistingTargetState(L, d);\n if (_ === null && (_ = this.computeTargetState(e, L, d)), _ === v4.ERROR) {\n const p = this.noViableAlt(n, l, L.configs, s);\n if (n.seek(s), c = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(L.configs, l), c !== G1.INVALID_ALT_NUMBER)\n return c;\n throw p;\n }\n if (_.requiresFullContext && this.predictionMode !== A1.SLL) {\n let p = null;\n if (_.predicates !== null) {\n this.debug && console.log(\"DFA state has preds in DFA sim LL failover\");\n const h = n.index;\n if (h !== s && n.seek(s), p = this.evalSemanticContext(_.predicates, l, !0), p.length === 1)\n return this.debug && console.log(\"Full LL avoided\"), p.minValue();\n h !== s && n.seek(h);\n }\n this.dfa_debug && console.log(\"ctx sensitive state \" + l + \" in \" + _);\n const f = this.computeStartState(e.atnStartState, l, !0);\n return this.reportAttemptingFullContext(e, p, _.configs, s, n.index), c = this.execATNWithFullContext(e, _, f, n, s, l), c;\n }\n if (_.isAcceptState) {\n if (_.predicates === null)\n return _.prediction;\n const p = n.index;\n n.seek(s);\n const m = this.evalSemanticContext(_.predicates, l, !0);\n if (m.length === 0)\n throw this.noViableAlt(n, l, _.configs, s);\n return m.length === 1 || this.reportAmbiguity(e, _, s, p, !1, m, _.configs), m.minValue();\n }\n L = _, d !== m2.EOF && (n.consume(), d = n.LA(1));\n }\n }\n /**\n * Get an existing target state for an edge in the DFA. If the target state\n * for the edge has not yet been computed or is otherwise not available,\n * this method returns {@code null}.\n *\n * @param previousD The current DFA state\n * @param t The next input symbol\n * @return The existing target DFA state for the given input symbol\n * {@code t}, or {@code null} if the target state for this edge is not\n * already cached\n */\n getExistingTargetState(e, t) {\n const n = e.edges;\n return n === null ? null : n[t + 1] || null;\n }\n /**\n * Compute a target state for an edge in the DFA, and attempt to add the\n * computed state and corresponding edge to the DFA.\n *\n * @param dfa The DFA\n * @param previousD The current DFA state\n * @param t The next input symbol\n *\n * @return The computed target DFA state for the given input symbol\n * {@code t}. If {@code t} does not lead to a valid DFA state, this method\n * returns {@link //ERROR\n */\n computeTargetState(e, t, n) {\n const s = this.computeReachSet(t.configs, n, !1);\n if (s === null)\n return this.addDFAEdge(e, t, n, v4.ERROR), v4.ERROR;\n let l = new V4(null, s);\n const c = this.getUniqueAlt(s);\n if (this.debug) {\n const L = A1.getConflictingAltSubsets(s);\n console.log(\"SLL altSubSets=\" + It(L) + /*\", previous=\" + previousD.configs + */\n \", configs=\" + s + \", predict=\" + c + \", allSubsetsConflict=\" + A1.allSubsetsConflict(L) + \", conflictingAlts=\" + this.getConflictingAlts(s));\n }\n return c !== G1.INVALID_ALT_NUMBER ? (l.isAcceptState = !0, l.configs.uniqueAlt = c, l.prediction = c) : A1.hasSLLConflictTerminatingPrediction(this.predictionMode, s) && (l.configs.conflictingAlts = this.getConflictingAlts(s), l.requiresFullContext = !0, l.isAcceptState = !0, l.prediction = l.configs.conflictingAlts.minValue()), l.isAcceptState && l.configs.hasSemanticContext && (this.predicateDFAState(l, this.atn.getDecisionState(e.decision)), l.predicates !== null && (l.prediction = G1.INVALID_ALT_NUMBER)), l = this.addDFAEdge(e, t, n, l), l;\n }\n predicateDFAState(e, t) {\n const n = t.transitions.length, s = this.getConflictingAltsOrUniqueAlt(e.configs), l = this.getPredsForAmbigAlts(s, e.configs, n);\n l !== null ? (e.predicates = this.getPredicatePredictions(s, l), e.prediction = G1.INVALID_ALT_NUMBER) : e.prediction = s.minValue();\n }\n // comes back with reach.uniqueAlt set to a valid alt\n execATNWithFullContext(e, t, n, s, l, c) {\n (this.debug || this.debug_list_atn_decisions) && console.log(\"execATNWithFullContext \" + n);\n const L = !0;\n let d = !1, _, p = n;\n s.seek(l);\n let m = s.LA(1), f = -1;\n for (; ; ) {\n if (_ = this.computeReachSet(p, m, L), _ === null) {\n const R = this.noViableAlt(s, c, p, l);\n s.seek(l);\n const b = this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(p, c);\n if (b !== G1.INVALID_ALT_NUMBER)\n return b;\n throw R;\n }\n const h = A1.getConflictingAltSubsets(_);\n if (this.debug && console.log(\"LL altSubSets=\" + h + \", predict=\" + A1.getUniqueAlt(h) + \", resolvesToJustOneViableAlt=\" + A1.resolvesToJustOneViableAlt(h)), _.uniqueAlt = this.getUniqueAlt(_), _.uniqueAlt !== G1.INVALID_ALT_NUMBER) {\n f = _.uniqueAlt;\n break;\n } else if (this.predictionMode !== A1.LL_EXACT_AMBIG_DETECTION) {\n if (f = A1.resolvesToJustOneViableAlt(h), f !== G1.INVALID_ALT_NUMBER)\n break;\n } else if (A1.allSubsetsConflict(h) && A1.allSubsetsEqual(h)) {\n d = !0, f = A1.getSingleViableAlt(h);\n break;\n }\n p = _, m !== m2.EOF && (s.consume(), m = s.LA(1));\n }\n return _.uniqueAlt !== G1.INVALID_ALT_NUMBER ? (this.reportContextSensitivity(e, f, _, l, s.index), f) : (this.reportAmbiguity(e, t, l, s.index, d, null, _), f);\n }\n computeReachSet(e, t, n) {\n this.debug && console.log(\"in computeReachSet, starting closure: \" + e), this.mergeCache === null && (this.mergeCache = new lx());\n const s = new Ve(n);\n let l = null;\n for (let L = 0; L < e.items.length; L++) {\n const d = e.items[L];\n if (this.debug && console.log(\"testing \" + this.getTokenName(t) + \" at \" + d), d.state instanceof qe) {\n (n || t === m2.EOF) && (l === null && (l = []), l.push(d), this.debug_add && console.log(\"added \" + d + \" to skippedStopStates\"));\n continue;\n }\n for (let _ = 0; _ < d.state.transitions.length; _++) {\n const p = d.state.transitions[_], m = this.getReachableTarget(p, t);\n if (m !== null) {\n const f = new X1({ state: m }, d);\n s.add(f, this.mergeCache), this.debug_add && console.log(\"added \" + f + \" to intermediate\");\n }\n }\n }\n let c = null;\n if (l === null && t !== m2.EOF && (s.items.length === 1 || this.getUniqueAlt(s) !== G1.INVALID_ALT_NUMBER) && (c = s), c === null) {\n c = new Ve(n);\n const L = new N3(), d = t === m2.EOF;\n for (let _ = 0; _ < s.items.length; _++)\n this.closure(s.items[_], c, L, !1, n, d);\n }\n if (t === m2.EOF && (c = this.removeAllConfigsNotInRuleStopState(c, c === s)), l !== null && (!n || !A1.hasConfigInRuleStopState(c)))\n for (let L = 0; L < l.length; L++)\n c.add(l[L], this.mergeCache);\n return c.items.length === 0 ? null : c;\n }\n /**\n * Return a configuration set containing only the configurations from\n * {@code configs} which are in a {@link RuleStopState}. If all\n * configurations in {@code configs} are already in a rule stop state, this\n * method simply returns {@code configs}.\n *\n * When {@code lookToEndOfRule} is true, this method uses\n * {@link ATN//nextTokens} for each configuration in {@code configs} which is\n * not already in a rule stop state to see if a rule stop state is reachable\n * from the configuration via epsilon-only transitions.
\n *\n * @param configs the configuration set to update\n * @param lookToEndOfRule when true, this method checks for rule stop states\n * reachable by epsilon-only transitions from each configuration in\n * {@code configs}.\n *\n * @return {@code configs} if all configurations in {@code configs} are in a\n * rule stop state, otherwise return a new configuration set containing only\n * the configurations from {@code configs} which are in a rule stop state\n */\n removeAllConfigsNotInRuleStopState(e, t) {\n if (A1.allConfigsInRuleStopStates(e))\n return e;\n const n = new Ve(e.fullCtx);\n for (let s = 0; s < e.items.length; s++) {\n const l = e.items[s];\n if (l.state instanceof qe) {\n n.add(l, this.mergeCache);\n continue;\n }\n if (t && l.state.epsilonOnlyTransitions && this.atn.nextTokens(l.state).contains(m2.EPSILON)) {\n const L = this.atn.ruleToStopState[l.state.ruleIndex];\n n.add(new X1({ state: L }, l), this.mergeCache);\n }\n }\n return n;\n }\n computeStartState(e, t, n) {\n const s = _c(this.atn, t), l = new Ve(n);\n for (let c = 0; c < e.transitions.length; c++) {\n const L = e.transitions[c].target, d = new X1({ state: L, alt: c + 1, context: s }, null), _ = new N3();\n this.closure(d, l, _, !0, n, !1);\n }\n return l;\n }\n /**\n * This method transforms the start state computed by\n * {@link //computeStartState} to the special start state used by a\n * precedence DFA for a particular precedence value. The transformation\n * process applies the following changes to the start state's configuration\n * set.\n *\n *\n * The prediction context must be considered by this filter to address\n * situations like the following.\n *
\n *\n * \n * grammar TA;\n * prog: statement* EOF;\n * statement: letterA | statement letterA 'b' ;\n * letterA: 'a';\n *
\n * \n * \n * If the above grammar, the ATN state immediately before the token\n * reference {@code 'a'} in {@code letterA} is reachable from the left edge\n * of both the primary and closure blocks of the left-recursive rule\n * {@code statement}. The prediction context associated with each of these\n * configurations distinguishes between them, and prevents the alternative\n * which stepped out to {@code prog} (and then back in to {@code statement}\n * from being eliminated by the filter.\n *
\n *\n * @param configs The configuration set computed by\n * {@link //computeStartState} as the start state for the DFA.\n * @return The transformed configuration set representing the start state\n * for a precedence DFA at a particular precedence level (determined by\n * calling {@link Parser//getPrecedence})\n */\n applyPrecedenceFilter(e) {\n let t;\n const n = [], s = new Ve(e.fullCtx);\n for (let l = 0; l < e.items.length; l++) {\n if (t = e.items[l], t.alt !== 1)\n continue;\n const c = t.semanticContext.evalPrecedence(this.parser, this._outerContext);\n c !== null && (n[t.state.stateNumber] = t.context, c !== t.semanticContext ? s.add(new X1({ semanticContext: c }, t), this.mergeCache) : s.add(t, this.mergeCache));\n }\n for (let l = 0; l < e.items.length; l++)\n if (t = e.items[l], t.alt !== 1) {\n if (!t.precedenceFilterSuppressed) {\n const c = n[t.state.stateNumber] || null;\n if (c !== null && c.equals(t.context))\n continue;\n }\n s.add(t, this.mergeCache);\n }\n return s;\n }\n getReachableTarget(e, t) {\n return e.matches(t, 0, this.atn.maxTokenType) ? e.target : null;\n }\n getPredsForAmbigAlts(e, t, n) {\n let s = [];\n for (let c = 0; c < t.items.length; c++) {\n const L = t.items[c];\n e.has(L.alt) && (s[L.alt] = g1.orContext(s[L.alt] || null, L.semanticContext));\n }\n let l = 0;\n for (let c = 1; c < n + 1; c++) {\n const L = s[c] || null;\n L === null ? s[c] = g1.NONE : L !== g1.NONE && (l += 1);\n }\n return l === 0 && (s = null), this.debug && console.log(\"getPredsForAmbigAlts result \" + It(s)), s;\n }\n getPredicatePredictions(e, t) {\n const n = [];\n let s = !1;\n for (let l = 1; l < t.length; l++) {\n const c = t[l];\n e !== null && e.has(l) && n.push(new CE(c, l)), c !== g1.NONE && (s = !0);\n }\n return s ? n : null;\n }\n /**\n * This method is used to improve the localization of error messages by\n * choosing an alternative rather than throwing a\n * {@link NoViableAltException} in particular prediction scenarios where the\n * {@link //ERROR} state was reached during ATN simulation.\n *\n *\n * The default implementation of this method uses the following\n * algorithm to identify an ATN configuration which successfully parsed the\n * decision entry rule. Choosing such an alternative ensures that the\n * {@link ParserRuleContext} returned by the calling rule will be complete\n * and valid, and the syntax error will be reported later at a more\n * localized location.
\n *\n *\n * In some scenarios, the algorithm described above could predict an\n * alternative which will result in a {@link FailedPredicateException} in\n * the parser. Specifically, this could occur if the only configuration\n * capable of successfully parsing to the end of the decision rule is\n * blocked by a semantic predicate. By choosing this alternative within\n * {@link //adaptivePredict} instead of throwing a\n * {@link NoViableAltException}, the resulting\n * {@link FailedPredicateException} in the parser will identify the specific\n * predicate which is preventing the parser from successfully parsing the\n * decision rule, which helps developers identify and correct logic errors\n * in semantic predicates.\n *
\n *\n * @param configs The ATN configurations which were valid immediately before\n * the {@link //ERROR} state was reached\n * @param outerContext The is the \\gamma_0 initial parser context from the paper\n * or the parser stack at the instant before prediction commences.\n *\n * @return The value to return from {@link //adaptivePredict}, or\n * {@link ATN//INVALID_ALT_NUMBER} if a suitable alternative was not\n * identified and {@link //adaptivePredict} should report an error instead\n */\n getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(e, t) {\n const n = this.splitAccordingToSemanticValidity(e, t), s = n[0], l = n[1];\n let c = this.getAltThatFinishedDecisionEntryRule(s);\n return c !== G1.INVALID_ALT_NUMBER || l.items.length > 0 && (c = this.getAltThatFinishedDecisionEntryRule(l), c !== G1.INVALID_ALT_NUMBER) ? c : G1.INVALID_ALT_NUMBER;\n }\n getAltThatFinishedDecisionEntryRule(e) {\n const t = [];\n for (let n = 0; n < e.items.length; n++) {\n const s = e.items[n];\n (s.reachesIntoOuterContext > 0 || s.state instanceof qe && s.context.hasEmptyPath()) && t.indexOf(s.alt) < 0 && t.push(s.alt);\n }\n return t.length === 0 ? G1.INVALID_ALT_NUMBER : Math.min.apply(null, t);\n }\n /**\n * Walk the list of configurations and split them according to\n * those that have preds evaluating to true/false. If no pred, assume\n * true pred and include in succeeded set. Returns Pair of sets.\n *\n * Create a new set so as not to alter the incoming parameter.\n *\n * Assumption: the input stream has been restored to the starting point\n * prediction, which is where predicates need to evaluate.*/\n splitAccordingToSemanticValidity(e, t) {\n const n = new Ve(e.fullCtx), s = new Ve(e.fullCtx);\n for (let l = 0; l < e.items.length; l++) {\n const c = e.items[l];\n c.semanticContext !== g1.NONE ? c.semanticContext.evaluate(this.parser, t) ? n.add(c) : s.add(c) : n.add(c);\n }\n return [n, s];\n }\n /**\n * Look through a list of predicate/alt pairs, returning alts for the\n * pairs that win. A {@code NONE} predicate indicates an alt containing an\n * unpredicated config which behaves as \"always true.\" If !complete\n * then we stop at the first predicate that evaluates to true. This\n * includes pairs with null predicates.\n */\n evalSemanticContext(e, t, n) {\n const s = new R4();\n for (let l = 0; l < e.length; l++) {\n const c = e[l];\n if (c.pred === g1.NONE) {\n if (s.add(c.alt), !n)\n break;\n continue;\n }\n const L = c.pred.evaluate(this.parser, t);\n if ((this.debug || this.dfa_debug) && console.log(\"eval pred \" + c + \"=\" + L), L && ((this.debug || this.dfa_debug) && console.log(\"PREDICT \" + c.alt), s.add(c.alt), !n))\n break;\n }\n return s;\n }\n // TODO: If we are doing predicates, there is no point in pursuing\n // closure operations if we reach a DFA state that uniquely predicts\n // alternative. We will not be caching that DFA state and it is a\n // waste to pursue the closure. Might have to advance when we do\n // ambig detection thought :(\n //\n closure(e, t, n, s, l, c) {\n this.closureCheckingStopState(\n e,\n t,\n n,\n s,\n l,\n 0,\n c\n );\n }\n closureCheckingStopState(e, t, n, s, l, c, L) {\n if ((this.debug || this.debug_closure) && (console.log(\"closure(\" + e.toString(this.parser, !0) + \")\"), e.reachesIntoOuterContext > 50))\n throw \"problem\";\n if (e.state instanceof qe)\n if (e.context.isEmpty())\n if (l) {\n t.add(e, this.mergeCache);\n return;\n } else\n this.debug && console.log(\"FALLING off rule \" + this.getRuleName(e.state.ruleIndex));\n else {\n for (let d = 0; d < e.context.length; d++) {\n if (e.context.getReturnState(d) === t1.EMPTY_RETURN_STATE) {\n if (l) {\n t.add(new X1({ state: e.state, context: t1.EMPTY }, e), this.mergeCache);\n continue;\n } else\n this.debug && console.log(\"FALLING off rule \" + this.getRuleName(e.state.ruleIndex)), this.closure_(\n e,\n t,\n n,\n s,\n l,\n c,\n L\n );\n continue;\n }\n const _ = this.atn.states[e.context.getReturnState(d)], p = e.context.getParent(d), m = { state: _, alt: e.alt, context: p, semanticContext: e.semanticContext }, f = new X1(m, null);\n f.reachesIntoOuterContext = e.reachesIntoOuterContext, this.closureCheckingStopState(f, t, n, s, l, c - 1, L);\n }\n return;\n }\n this.closure_(e, t, n, s, l, c, L);\n }\n // Do the actual work of walking epsilon edges//\n closure_(e, t, n, s, l, c, L) {\n const d = e.state;\n d.epsilonOnlyTransitions || t.add(e, this.mergeCache);\n for (let _ = 0; _ < d.transitions.length; _++) {\n if (_ === 0 && this.canDropLoopEntryEdgeInLeftRecursiveRule(e))\n continue;\n const p = d.transitions[_], m = s && !(p instanceof uE), f = this.getEpsilonTarget(e, p, m, c === 0, l, L);\n if (f !== null) {\n let h = c;\n if (e.state instanceof qe) {\n if (this._dfa !== null && this._dfa.precedenceDfa && p.outermostPrecedenceReturn === this._dfa.atnStartState.ruleIndex && (f.precedenceFilterSuppressed = !0), f.reachesIntoOuterContext += 1, n.add(f) !== f)\n continue;\n t.dipsIntoOuterContext = !0, h -= 1, this.debug && console.log(\"dips into outer ctx: \" + f);\n } else {\n if (!p.isEpsilon && n.add(f) !== f)\n continue;\n p instanceof H8 && h >= 0 && (h += 1);\n }\n this.closureCheckingStopState(f, t, n, m, l, h, L);\n }\n }\n }\n canDropLoopEntryEdgeInLeftRecursiveRule(e) {\n const t = e.state;\n if (t.stateType !== O2.STAR_LOOP_ENTRY || t.stateType !== O2.STAR_LOOP_ENTRY || !t.isPrecedenceDecision || e.context.isEmpty() || e.context.hasEmptyPath())\n return !1;\n const n = e.context.length;\n for (let L = 0; L < n; L++)\n if (this.atn.states[e.context.getReturnState(L)].ruleIndex !== t.ruleIndex)\n return !1;\n const l = t.transitions[0].target.endState.stateNumber, c = this.atn.states[l];\n for (let L = 0; L < n; L++) {\n const d = e.context.getReturnState(L), _ = this.atn.states[d];\n if (_.transitions.length !== 1 || !_.transitions[0].isEpsilon)\n return !1;\n const p = _.transitions[0].target;\n if (!(_.stateType === O2.BLOCK_END && p === t) && _ !== c && p !== c && !(p.stateType === O2.BLOCK_END && p.transitions.length === 1 && p.transitions[0].isEpsilon && p.transitions[0].target === t))\n return !1;\n }\n return !0;\n }\n getRuleName(e) {\n return this.parser !== null && e >= 0 ? this.parser.ruleNames[e] : \"If {@code to} is {@code null}, this method returns {@code null}.\n * Otherwise, this method returns the {@link DFAState} returned by calling\n * {@link //addDFAState} for the {@code to} state.
\n *\n * @param dfa The DFA\n * @param from_ The source state for the edge\n * @param t The input symbol\n * @param to The target state for the edge\n *\n * @return If {@code to} is {@code null}, this method returns {@code null};\n * otherwise this method returns the result of calling {@link //addDFAState}\n * on {@code to}\n */\n addDFAEdge(e, t, n, s) {\n if (this.debug && console.log(\"EDGE \" + t + \" -> \" + s + \" upon \" + this.getTokenName(n)), s === null)\n return null;\n if (s = this.addDFAState(e, s), t === null || n < -1 || n > this.atn.maxTokenType)\n return s;\n if (t.edges === null && (t.edges = []), t.edges[n + 1] = s, this.debug) {\n const l = this.parser === null ? null : this.parser.literalNames, c = this.parser === null ? null : this.parser.symbolicNames;\n console.log(`DFA=\n` + e.toString(l, c));\n }\n return s;\n }\n /**\n * Add state {@code D} to the DFA if it is not already present, and return\n * the actual instance stored in the DFA. If a state equivalent to {@code D}\n * is already in the DFA, the existing state is returned. Otherwise this\n * method returns {@code D} after adding it to the DFA.\n *\n *If {@code D} is {@link //ERROR}, this method returns {@link //ERROR} and\n * does not change the DFA.
\n *\n * @param dfa The dfa\n * @param D The DFA state to add\n * @return The state stored in the DFA. This will be either the existing\n * state if {@code D} is already in the DFA, or {@code D} itself if the\n * state was not already present\n */\n addDFAState(e, t) {\n if (t === v4.ERROR)\n return t;\n const n = e.states.get(t);\n return n !== null ? n : (t.stateNumber = e.states.length, t.configs.readOnly || (t.configs.optimizeConfigs(this), t.configs.setReadonly(!0)), e.states.add(t), this.debug && console.log(\"adding new DFA state: \" + t), t);\n }\n reportAttemptingFullContext(e, t, n, s, l) {\n if (this.debug || this.retry_debug) {\n const c = new _1(s, l + 1);\n console.log(\"reportAttemptingFullContext decision=\" + e.decision + \":\" + n + \", input=\" + this.parser.getTokenStream().getText(c));\n }\n this.parser !== null && this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser, e, s, l, t, n);\n }\n reportContextSensitivity(e, t, n, s, l) {\n if (this.debug || this.retry_debug) {\n const c = new _1(s, l + 1);\n console.log(\"reportContextSensitivity decision=\" + e.decision + \":\" + n + \", input=\" + this.parser.getTokenStream().getText(c));\n }\n this.parser !== null && this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser, e, s, l, t, n);\n }\n // If context sensitive parsing, we know it's ambiguity not conflict//\n reportAmbiguity(e, t, n, s, l, c, L) {\n if (this.debug || this.retry_debug) {\n const d = new _1(n, s + 1);\n console.log(\"reportAmbiguity \" + c + \":\" + L + \", input=\" + this.parser.getTokenStream().getText(d));\n }\n this.parser !== null && this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser, e, n, s, l, c, L);\n }\n}\nconst ux = { ATN: G1, ATNDeserializer: dE, LexerATNSimulator: q1, ParserATNSimulator: cx, PredictionMode: A1 };\nclass vc {\n constructor(e, t, n) {\n this.dfa = e, this.literalNames = t || [], this.symbolicNames = n || [];\n }\n toString() {\n if (this.dfa.s0 === null)\n return null;\n let e = \"\";\n const t = this.dfa.sortedStates();\n for (let n = 0; n < t.length; n++) {\n const s = t[n];\n if (s.edges !== null) {\n const l = s.edges.length;\n for (let c = 0; c < l; c++) {\n const L = s.edges[c] || null;\n L !== null && L.stateNumber !== 2147483647 && (e = e.concat(this.getStateString(s)), e = e.concat(\"-\"), e = e.concat(this.getEdgeLabel(c)), e = e.concat(\"->\"), e = e.concat(this.getStateString(L)), e = e.concat(`\n`));\n }\n }\n }\n return e.length === 0 ? null : e;\n }\n getEdgeLabel(e) {\n return e === 0 ? \"EOF\" : this.literalNames !== null || this.symbolicNames !== null ? this.literalNames[e - 1] || this.symbolicNames[e - 1] : String.fromCharCode(e - 1);\n }\n getStateString(e) {\n const t = (e.isAcceptState ? \":\" : \"\") + \"s\" + e.stateNumber + (e.requiresFullContext ? \"^\" : \"\");\n return e.isAcceptState ? e.predicates !== null ? t + \"=>\" + It(e.predicates) : t + \"=>\" + e.prediction.toString() : t;\n }\n}\nclass _E extends vc {\n constructor(e) {\n super(e, null);\n }\n getEdgeLabel(e) {\n return \"'\" + String.fromCharCode(e) + \"'\";\n }\n}\nclass Lx {\n constructor(e, t) {\n if (t === void 0 && (t = 0), this.atnStartState = e, this.decision = t, this._states = new N3(), this.s0 = null, this.precedenceDfa = !1, e instanceof L9 && e.isPrecedenceDecision) {\n this.precedenceDfa = !0;\n const n = new V4(null, new Ve());\n n.edges = [], n.isAcceptState = !1, n.requiresFullContext = !1, this.s0 = n;\n }\n }\n /**\n * Get the start state for a specific precedence value.\n *\n * @param precedence The current precedence.\n * @return The start state corresponding to the specified precedence, or\n * {@code null} if no start state exists for the specified precedence.\n *\n * @throws IllegalStateException if this is not a precedence DFA.\n * @see //isPrecedenceDfa()\n */\n getPrecedenceStartState(e) {\n if (!this.precedenceDfa)\n throw \"Only precedence DFAs may contain a precedence start state.\";\n return e < 0 || e >= this.s0.edges.length ? null : this.s0.edges[e] || null;\n }\n /**\n * Set the start state for a specific precedence value.\n *\n * @param precedence The current precedence.\n * @param startState The start state corresponding to the specified\n * precedence.\n *\n * @throws IllegalStateException if this is not a precedence DFA.\n * @see //isPrecedenceDfa()\n */\n setPrecedenceStartState(e, t) {\n if (!this.precedenceDfa)\n throw \"Only precedence DFAs may contain a precedence start state.\";\n e < 0 || (this.s0.edges[e] = t);\n }\n /**\n * Sets whether this is a precedence DFA. If the specified value differs\n * from the current DFA configuration, the following actions are taken;\n * otherwise no changes are made to the current DFA.\n *\n *The default implementation simply calls {@link //endErrorCondition} to\n * ensure that the handler is not in error recovery mode.
\n */\n reset(e) {\n this.endErrorCondition(e);\n }\n /**\n * This method is called to enter error recovery mode when a recognition\n * exception is reported.\n *\n * @param recognizer the parser instance\n */\n beginErrorCondition(e) {\n this.errorRecoveryMode = !0;\n }\n inErrorRecoveryMode(e) {\n return this.errorRecoveryMode;\n }\n /**\n * This method is called to leave error recovery mode after recovering from\n * a recognition exception.\n * @param recognizer\n */\n endErrorCondition(e) {\n this.errorRecoveryMode = !1, this.lastErrorStates = null, this.lastErrorIndex = -1;\n }\n /**\n * {@inheritDoc}\n *The default implementation simply calls {@link //endErrorCondition}.
\n */\n reportMatch(e) {\n this.endErrorCondition(e);\n }\n /**\n * {@inheritDoc}\n *\n *The default implementation returns immediately if the handler is already\n * in error recovery mode. Otherwise, it calls {@link //beginErrorCondition}\n * and dispatches the reporting task based on the runtime type of {@code e}\n * according to the following table.
\n *\n *The default implementation resynchronizes the parser by consuming tokens\n * until we find one in the resynchronization set--loosely the set of tokens\n * that can follow the current rule.
\n *\n */\n recover(e, t) {\n this.lastErrorIndex === e.getInputStream().index && this.lastErrorStates !== null && this.lastErrorStates.indexOf(e.state) >= 0 && e.consume(), this.lastErrorIndex = e._input.index, this.lastErrorStates === null && (this.lastErrorStates = []), this.lastErrorStates.push(e.state);\n const n = this.getErrorRecoverySet(e);\n this.consumeUntil(e, n);\n }\n /**\n * The default implementation of {@link ANTLRErrorStrategy//sync} makes sure\n * that the current lookahead symbol is consistent with what were expecting\n * at this point in the ATN. You can call this anytime but ANTLR only\n * generates code to check before subrules/loops and each iteration.\n *\n *Implements Jim Idle's magic sync mechanism in closures and optional\n * subrules. E.g.,
\n *\n *\n * a : sync ( stuff sync )* ;\n * sync : {consume to what can follow sync} ;\n * \n *\n * At the start of a sub rule upon error, {@link //sync} performs single\n * token deletion, if possible. If it can't do that, it bails on the current\n * rule and uses the default error recovery, which consumes until the\n * resynchronization set of the current rule.\n *\n * If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block\n * with an empty alternative), then the expected set includes what follows\n * the subrule.
\n *\n *During loop iteration, it consumes until it sees a token that can start a\n * sub rule or what follows loop. Yes, that is pretty aggressive. We opt to\n * stay in the loop as long as possible.
\n *\n *ORIGINS
\n *\n *Previous versions of ANTLR did a poor job of their recovery within loops.\n * A single mismatch token or missing token would force the parser to bail\n * out of the entire rules surrounding the loop. So, for rule
\n *\n *\n * classDef : 'class' ID '{' member* '}'\n * \n *\n * input with an extra token between members would force the parser to\n * consume until it found the next class definition rather than the next\n * member definition of the current class.\n *\n * This functionality cost a little bit of effort because the parser has to\n * compare token set at the start of the loop and at each iteration. If for\n * some reason speed is suffering for you, you can turn off this\n * functionality by simply overriding this method as a blank { }.
\n *\n */\n sync(e) {\n if (this.inErrorRecoveryMode(e))\n return;\n const t = e._interp.atn.states[e.state], n = e.getTokenStream().LA(1), s = e.atn.nextTokens(t);\n if (s.contains(n)) {\n this.nextTokensContext = null, this.nextTokenState = O2.INVALID_STATE_NUMBER;\n return;\n } else if (s.contains(m2.EPSILON)) {\n this.nextTokensContext === null && (this.nextTokensContext = e._ctx, this.nextTokensState = e._stateNumber);\n return;\n }\n switch (t.stateType) {\n case O2.BLOCK_START:\n case O2.STAR_BLOCK_START:\n case O2.PLUS_BLOCK_START:\n case O2.STAR_LOOP_ENTRY:\n if (this.singleTokenDeletion(e) !== null)\n return;\n throw new B5(e);\n case O2.PLUS_LOOP_BACK:\n case O2.STAR_LOOP_BACK:\n {\n this.reportUnwantedToken(e);\n const l = new $3();\n l.addSet(e.getExpectedTokens());\n const c = l.addSet(this.getErrorRecoverySet(e));\n this.consumeUntil(e, c);\n }\n break;\n }\n }\n /**\n * This is called by {@link //reportError} when the exception is a\n * {@link NoViableAltException}.\n *\n * @see //reportError\n *\n * @param recognizer the parser instance\n * @param e the recognition exception\n */\n reportNoViableAlternative(e, t) {\n const n = e.getTokenStream();\n let s;\n n !== null ? t.startToken.type === m2.EOF ? s = \"This method is called when {@link //singleTokenDeletion} identifies\n * single-token deletion as a viable recovery strategy for a mismatched\n * input error.
\n *\n *The default implementation simply returns if the handler is already in\n * error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to\n * enter error recovery mode, followed by calling\n * {@link Parser//notifyErrorListeners}.
\n *\n * @param recognizer the parser instance\n *\n */\n reportUnwantedToken(e) {\n if (this.inErrorRecoveryMode(e))\n return;\n this.beginErrorCondition(e);\n const t = e.getCurrentToken(), n = this.getTokenErrorDisplay(t), s = this.getExpectedTokens(e), l = \"extraneous input \" + n + \" expecting \" + s.toString(e.literalNames, e.symbolicNames);\n e.notifyErrorListeners(l, t, null);\n }\n /**\n * This method is called to report a syntax error which requires the\n * insertion of a missing token into the input stream. At the time this\n * method is called, the missing token has not yet been inserted. When this\n * method returns, {@code recognizer} is in error recovery mode.\n *\n *This method is called when {@link //singleTokenInsertion} identifies\n * single-token insertion as a viable recovery strategy for a mismatched\n * input error.
\n *\n *The default implementation simply returns if the handler is already in\n * error recovery mode. Otherwise, it calls {@link //beginErrorCondition} to\n * enter error recovery mode, followed by calling\n * {@link Parser//notifyErrorListeners}.
\n *\n * @param recognizer the parser instance\n */\n reportMissingToken(e) {\n if (this.inErrorRecoveryMode(e))\n return;\n this.beginErrorCondition(e);\n const t = e.getCurrentToken(), s = \"missing \" + this.getExpectedTokens(e).toString(e.literalNames, e.symbolicNames) + \" at \" + this.getTokenErrorDisplay(t);\n e.notifyErrorListeners(s, t, null);\n }\n /**\n *The default implementation attempts to recover from the mismatched input\n * by using single token insertion and deletion as described below. If the\n * recovery attempt fails, this method throws an\n * {@link InputMismatchException}.
\n *\n *EXTRA TOKEN (single token deletion)
\n *\n *{@code LA(1)} is not what we are looking for. If {@code LA(2)} has the\n * right token, however, then assume {@code LA(1)} is some extra spurious\n * token and delete it. Then consume and return the next token (which was\n * the {@code LA(2)} token) as the successful result of the match operation.
\n *\n *This recovery strategy is implemented by {@link\n * //singleTokenDeletion}.
\n *\n *MISSING TOKEN (single token insertion)
\n *\n *If current token (at {@code LA(1)}) is consistent with what could come\n * after the expected {@code LA(1)} token, then assume the token is missing\n * and use the parser's {@link TokenFactory} to create it on the fly. The\n * \"insertion\" is performed by returning the created token as the successful\n * result of the match operation.
\n *\n *This recovery strategy is implemented by {@link\n * //singleTokenInsertion}.
\n *\n *EXAMPLE
\n *\n *For example, Input {@code i=(3;} is clearly missing the {@code ')'}. When\n * the parser returns from the nested call to {@code expr}, it will have\n * call chain:
\n *\n *\n * stat → expr → atom\n *\n *\n * and it will be trying to match the {@code ')'} at this point in the\n * derivation:\n *\n *
\n * => ID '=' '(' INT ')' ('+' atom)* ';'\n * ^\n * \n *\n * The attempt to match {@code ')'} will fail when it sees {@code ';'} and\n * call {@link //recoverInline}. To recover, it sees that {@code LA(1)==';'}\n * is in the set of tokens that can follow the {@code ')'} token reference\n * in rule {@code atom}. It can assume that you forgot the {@code ')'}.\n */\n recoverInline(e) {\n const t = this.singleTokenDeletion(e);\n if (t !== null)\n return e.consume(), t;\n if (this.singleTokenInsertion(e))\n return this.getMissingSymbol(e);\n throw new B5(e);\n }\n /**\n * This method implements the single-token insertion inline error recovery\n * strategy. It is called by {@link //recoverInline} if the single-token\n * deletion strategy fails to recover from the mismatched input. If this\n * method returns {@code true}, {@code recognizer} will be in error recovery\n * mode.\n *\n * This method determines whether or not single-token insertion is viable by\n * checking if the {@code LA(1)} input symbol could be successfully matched\n * if it were instead the {@code LA(2)} symbol. If this method returns\n * {@code true}, the caller is responsible for creating and inserting a\n * token with the correct type to produce this behavior.
\n *\n * @param recognizer the parser instance\n * @return {@code true} if single-token insertion is a viable recovery\n * strategy for the current mismatched input, otherwise {@code false}\n */\n singleTokenInsertion(e) {\n const t = e.getTokenStream().LA(1), n = e._interp.atn, l = n.states[e.state].transitions[0].target;\n return n.nextTokens(l, e._ctx).contains(t) ? (this.reportMissingToken(e), !0) : !1;\n }\n /**\n * This method implements the single-token deletion inline error recovery\n * strategy. It is called by {@link //recoverInline} to attempt to recover\n * from mismatched input. If this method returns null, the parser and error\n * handler state will not have changed. If this method returns non-null,\n * {@code recognizer} will not be in error recovery mode since the\n * returned token was a successful match.\n *\n *If the single-token deletion is successful, this method calls\n * {@link //reportUnwantedToken} to report the error, followed by\n * {@link Parser//consume} to actually \"delete\" the extraneous token. Then,\n * before returning {@link //reportMatch} is called to signal a successful\n * match.
\n *\n * @param recognizer the parser instance\n * @return the successfully matched {@link Token} instance if single-token\n * deletion successfully recovers from the mismatched input, otherwise\n * {@code null}\n */\n singleTokenDeletion(e) {\n const t = e.getTokenStream().LA(2);\n if (this.getExpectedTokens(e).contains(t)) {\n this.reportUnwantedToken(e), e.consume();\n const s = e.getCurrentToken();\n return this.reportMatch(e), s;\n } else\n return null;\n }\n /**\n * Conjure up a missing token during error recovery.\n *\n * The recognizer attempts to recover from single missing\n * symbols. But, actions might refer to that missing symbol.\n * For example, x=ID {f($x);}. The action clearly assumes\n * that there has been an identifier matched previously and that\n * $x points at that token. If that token is missing, but\n * the next token in the stream is what we want we assume that\n * this token is missing and we keep going. Because we\n * have to return some token to replace the missing token,\n * we have to conjure one up. This method gives the user control\n * over the tokens returned for missing tokens. Mostly,\n * you will want to create something special for identifier\n * tokens. For literals such as '{' and ',', the default\n * action in the parser or tree parser works. It simply creates\n * a CommonToken of the appropriate type. The text will be the token.\n * If you change what tokens must be created by the lexer,\n * override this method to create the appropriate tokens.\n *\n */\n getMissingSymbol(e) {\n const t = e.getCurrentToken(), s = this.getExpectedTokens(e).first();\n let l;\n s === m2.EOF ? l = \"For example, {@link CommonTokenStream} overrides this method to ensure\n * that\n * the seek target is always an on-channel token.
\n *\n * @param {Number} i The target token index.\n * @return {Number} The adjusted target token index.\n */\n adjustSeekIndex(e) {\n return e;\n }\n lazyInit() {\n this.index === -1 && this.setup();\n }\n setup() {\n this.sync(0), this.index = this.adjustSeekIndex(0);\n }\n // Reset this token stream by setting its token source.///\n setTokenSource(e) {\n this.tokenSource = e, this.tokens = [], this.index = -1, this.fetchedEOF = !1;\n }\n /**\n * Given a starting index, return the index of the next token on channel.\n * Return i if tokens[i] is on channel. Return -1 if there are no tokens\n * on channel between i and EOF.\n */\n nextTokenOnChannel(e, t) {\n if (this.sync(e), e >= this.tokens.length)\n return -1;\n let n = this.tokens[e];\n for (; n.channel !== this.channel; ) {\n if (n.type === m2.EOF)\n return -1;\n e += 1, this.sync(e), n = this.tokens[e];\n }\n return e;\n }\n /**\n * Given a starting index, return the index of the previous token on channel.\n * Return i if tokens[i] is on channel. Return -1 if there are no tokens\n * on channel between i and 0.\n */\n previousTokenOnChannel(e, t) {\n for (; e >= 0 && this.tokens[e].channel !== t; )\n e -= 1;\n return e;\n }\n /**\n * Collect all tokens on specified channel to the right of\n * the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or\n * EOF. If channel is -1, find any non default channel token.\n */\n getHiddenTokensToRight(e, t) {\n if (t === void 0 && (t = -1), this.lazyInit(), e < 0 || e >= this.tokens.length)\n throw \"\" + e + \" not in 0..\" + this.tokens.length - 1;\n const n = this.nextTokenOnChannel(e + 1, $e.DEFAULT_TOKEN_CHANNEL), s = e + 1, l = n === -1 ? this.tokens.length - 1 : n;\n return this.filterForChannel(s, l, t);\n }\n /**\n * Collect all tokens on specified channel to the left of\n * the current token up until we see a token on DEFAULT_TOKEN_CHANNEL.\n * If channel is -1, find any non default channel token.\n */\n getHiddenTokensToLeft(e, t) {\n if (t === void 0 && (t = -1), this.lazyInit(), e < 0 || e >= this.tokens.length)\n throw \"\" + e + \" not in 0..\" + this.tokens.length - 1;\n const n = this.previousTokenOnChannel(e - 1, $e.DEFAULT_TOKEN_CHANNEL);\n if (n === e - 1)\n return null;\n const s = n + 1, l = e - 1;\n return this.filterForChannel(s, l, t);\n }\n filterForChannel(e, t, n) {\n const s = [];\n for (let l = e; l < t + 1; l++) {\n const c = this.tokens[l];\n n === -1 ? c.channel !== $e.DEFAULT_TOKEN_CHANNEL && s.push(c) : c.channel === n && s.push(c);\n }\n return s.length === 0 ? null : s;\n }\n getSourceName() {\n return this.tokenSource.getSourceName();\n }\n // Get the text of all tokens in this buffer.///\n getText(e) {\n this.lazyInit(), this.fill(), e == null && (e = new _1(0, this.tokens.length - 1));\n let t = e.start;\n t instanceof m2 && (t = t.tokenIndex);\n let n = e.stop;\n if (n instanceof m2 && (n = n.tokenIndex), t === null || n === null || t < 0 || n < 0)\n return \"\";\n n >= this.tokens.length && (n = this.tokens.length - 1);\n let s = \"\";\n for (let l = t; l < n + 1; l++) {\n const c = this.tokens[l];\n if (c.type === m2.EOF)\n break;\n s = s + c.text;\n }\n return s;\n }\n // Get all tokens from lexer until EOF///\n fill() {\n for (this.lazyInit(); this.fetch(1e3) === 1e3; )\n ;\n }\n}\nclass Rx extends vx {\n constructor(e, t) {\n super(e), this.channel = t === void 0 ? m2.DEFAULT_CHANNEL : t;\n }\n adjustSeekIndex(e) {\n return this.nextTokenOnChannel(e, this.channel);\n }\n LB(e) {\n if (e === 0 || this.index - e < 0)\n return null;\n let t = this.index, n = 1;\n for (; n <= e; )\n t = this.previousTokenOnChannel(t - 1, this.channel), n += 1;\n return t < 0 ? null : this.tokens[t];\n }\n LT(e) {\n if (this.lazyInit(), e === 0)\n return null;\n if (e < 0)\n return this.LB(-e);\n let t = this.index, n = 1;\n for (; n < e; )\n this.sync(t + 1) && (t = this.nextTokenOnChannel(t + 1, this.channel)), n += 1;\n return this.tokens[t];\n }\n // Count EOF just once.\n getNumberOfOnChannelTokens() {\n let e = 0;\n this.fill();\n for (let t = 0; t < this.tokens.length; t++) {\n const n = this.tokens[t];\n if (n.channel === this.channel && (e += 1), n.type === m2.EOF)\n break;\n }\n return e;\n }\n}\nclass bx extends gE {\n constructor(e) {\n super(), this.parser = e;\n }\n enterEveryRule(e) {\n console.log(\"enter \" + this.parser.ruleNames[e.ruleIndex] + \", LT(1)=\" + this.parser._input.LT(1).text);\n }\n visitTerminal(e) {\n console.log(\"consume \" + e.symbol + \" rule \" + this.parser.ruleNames[this.parser._ctx.ruleIndex]);\n }\n exitEveryRule(e) {\n console.log(\"exit \" + this.parser.ruleNames[e.ruleIndex] + \", LT(1)=\" + this.parser._input.LT(1).text);\n }\n}\nlet mE = class extends C6 {\n /**\n * this is all the parsing support code essentially; most of it is error\n * recovery stuff.\n */\n constructor(e) {\n super(), this._input = null, this._errHandler = new bc(), this._precedenceStack = [], this._precedenceStack.push(0), this._ctx = null, this.buildParseTrees = !0, this._tracer = null, this._parseListeners = null, this._syntaxErrors = 0, this.setInputStream(e);\n }\n // reset the parser's state\n reset() {\n this._input !== null && this._input.seek(0), this._errHandler.reset(this), this._ctx = null, this._syntaxErrors = 0, this.setTrace(!1), this._precedenceStack = [], this._precedenceStack.push(0), this._interp !== null && this._interp.reset();\n }\n /**\n * Match current input symbol against {@code ttype}. If the symbol type\n * matches, {@link ANTLRErrorStrategy//reportMatch} and {@link //consume} are\n * called to complete the match process.\n *\n *If the symbol type does not match,\n * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n * strategy to attempt recovery. If {@link //getBuildParseTree} is\n * {@code true} and the token index of the symbol returned by\n * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to\n * the parse tree by calling {@link ParserRuleContext//addErrorNode}.
\n *\n * @param ttype the token type to match\n * @return the matched symbol\n * @throws RecognitionException if the current input symbol did not match\n * {@code ttype} and the error strategy could not recover from the\n * mismatched symbol\n */\n match(e) {\n let t = this.getCurrentToken();\n return t.type === e ? (this._errHandler.reportMatch(this), this.consume()) : (t = this._errHandler.recoverInline(this), this.buildParseTrees && t.tokenIndex === -1 && this._ctx.addErrorNode(t)), t;\n }\n /**\n * Match current input symbol as a wildcard. If the symbol type matches\n * (i.e. has a value greater than 0), {@link ANTLRErrorStrategy//reportMatch}\n * and {@link //consume} are called to complete the match process.\n *\n *If the symbol type does not match,\n * {@link ANTLRErrorStrategy//recoverInline} is called on the current error\n * strategy to attempt recovery. If {@link //getBuildParseTree} is\n * {@code true} and the token index of the symbol returned by\n * {@link ANTLRErrorStrategy//recoverInline} is -1, the symbol is added to\n * the parse tree by calling {@link ParserRuleContext//addErrorNode}.
\n *\n * @return the matched symbol\n * @throws RecognitionException if the current input symbol did not match\n * a wildcard and the error strategy could not recover from the mismatched\n * symbol\n */\n matchWildcard() {\n let e = this.getCurrentToken();\n return e.type > 0 ? (this._errHandler.reportMatch(this), this.consume()) : (e = this._errHandler.recoverInline(this), this._buildParseTrees && e.tokenIndex === -1 && this._ctx.addErrorNode(e)), e;\n }\n getParseListeners() {\n return this._parseListeners || [];\n }\n /**\n * Registers {@code listener} to receive events during the parsing process.\n *\n *To support output-preserving grammar transformations (including but not\n * limited to left-recursion removal, automated left-factoring, and\n * optimized code generation), calls to listener methods during the parse\n * may differ substantially from calls made by\n * {@link ParseTreeWalker//DEFAULT} used after the parse is complete. In\n * particular, rule entry and exit events may occur in a different order\n * during the parse than after the parser. In addition, calls to certain\n * rule entry methods may be omitted.
\n *\n *With the following specific exceptions, calls to listener events are\n * deterministic, i.e. for identical input the calls to listener\n * methods will be the same.
\n *\n *If {@code listener} is {@code null} or has not been added as a parse\n * listener, this method does nothing.
\n * @param listener the listener to remove\n */\n removeParseListener(e) {\n if (this._parseListeners !== null) {\n const t = this._parseListeners.indexOf(e);\n t >= 0 && this._parseListeners.splice(t, 1), this._parseListeners.length === 0 && (this._parseListeners = null);\n }\n }\n // Remove all parse listeners.\n removeParseListeners() {\n this._parseListeners = null;\n }\n // Notify any parse listeners of an enter rule event.\n triggerEnterRuleEvent() {\n if (this._parseListeners !== null) {\n const e = this._ctx;\n this._parseListeners.forEach(function(t) {\n t.enterEveryRule(e), e.enterRule(t);\n });\n }\n }\n /**\n * Notify any parse listeners of an exit rule event.\n * @see //addParseListener\n */\n triggerExitRuleEvent() {\n if (this._parseListeners !== null) {\n const e = this._ctx;\n this._parseListeners.slice(0).reverse().forEach(function(t) {\n e.exitRule(t), t.exitEveryRule(e);\n });\n }\n }\n getTokenFactory() {\n return this._input.tokenSource._factory;\n }\n // Tell our token source and error strategy about a new way to create tokens.\n setTokenFactory(e) {\n this._input.tokenSource._factory = e;\n }\n /**\n * The ATN with bypass alternatives is expensive to create so we create it\n * lazily.\n *\n * @throws UnsupportedOperationException if the current parser does not\n * implement the {@link //getSerializedATN()} method.\n */\n getATNWithBypassAlts() {\n const e = this.getSerializedATN();\n if (e === null)\n throw \"The current parser does not support an ATN with bypass alternatives.\";\n let t = this.bypassAltsAtnCache[e];\n if (t === null) {\n const n = new $5();\n n.generateRuleBypassTransitions = !0, t = new dE(n).deserialize(e), this.bypassAltsAtnCache[e] = t;\n }\n return t;\n }\n getInputStream() {\n return this.getTokenStream();\n }\n setInputStream(e) {\n this.setTokenStream(e);\n }\n getTokenStream() {\n return this._input;\n }\n // Set the token stream and reset the parser.\n setTokenStream(e) {\n this._input = null, this.reset(), this._input = e;\n }\n /**\n * Match needs to return the current input symbol, which gets put\n * into the label for the associated token ref; e.g., x=ID.\n */\n getCurrentToken() {\n return this._input.LT(1);\n }\n notifyErrorListeners(e, t, n) {\n t = t || null, n = n || null, t === null && (t = this.getCurrentToken()), this._syntaxErrors += 1;\n const s = t.line, l = t.column;\n this.getErrorListenerDispatch().syntaxError(this, t, s, l, e, n);\n }\n /**\n * Consume and return the {@linkplain //getCurrentToken current symbol}.\n *\n *E.g., given the following input with {@code A} being the current\n * lookahead symbol, this function moves the cursor to {@code B} and returns\n * {@code A}.
\n *\n *\n * A B\n * ^\n *\n *\n * If the parser is not in error recovery mode, the consumed symbol is added\n * to the parse tree using {@link ParserRuleContext//addChild(Token)}, and\n * {@link ParseTreeListener//visitTerminal} is called on any parse listeners.\n * If the parser is in error recovery mode, the consumed symbol is\n * added to the parse tree using\n * {@link ParserRuleContext//addErrorNode(Token)}, and\n * {@link ParseTreeListener//visitErrorNode} is called on any parse\n * listeners.\n */\n consume() {\n const e = this.getCurrentToken();\n e.type !== m2.EOF && this.getInputStream().consume();\n const t = this._parseListeners !== null && this._parseListeners.length > 0;\n if (this.buildParseTrees || t) {\n let n;\n this._errHandler.inErrorRecoveryMode(this) ? n = this._ctx.addErrorNode(e) : n = this._ctx.addTokenNode(e), n.invokingState = this.state, t && this._parseListeners.forEach(function(s) {\n n instanceof c6 || n.isErrorNode !== void 0 && n.isErrorNode() ? s.visitErrorNode(n) : n instanceof W4 && s.visitTerminal(n);\n });\n }\n return e;\n }\n addContextToParseTree() {\n this._ctx.parentCtx !== null && this._ctx.parentCtx.addChild(this._ctx);\n }\n /**\n * Always called by generated parsers upon entry to a rule. Access field\n * {@link //_ctx} get the current context.\n */\n enterRule(e, t, n) {\n this.state = t, this._ctx = e, this._ctx.start = this._input.LT(1), this.buildParseTrees && this.addContextToParseTree(), this.triggerEnterRuleEvent();\n }\n exitRule() {\n this._ctx.stop = this._input.LT(-1), this.triggerExitRuleEvent(), this.state = this._ctx.invokingState, this._ctx = this._ctx.parentCtx;\n }\n enterOuterAlt(e, t) {\n e.setAltNumber(t), this.buildParseTrees && this._ctx !== e && this._ctx.parentCtx !== null && (this._ctx.parentCtx.removeLastChild(), this._ctx.parentCtx.addChild(e)), this._ctx = e;\n }\n /**\n * Get the precedence level for the top-most precedence rule.\n *\n * @return The precedence level for the top-most precedence rule, or -1 if\n * the parser context is not nested within a precedence rule.\n */\n getPrecedence() {\n return this._precedenceStack.length === 0 ? -1 : this._precedenceStack[this._precedenceStack.length - 1];\n }\n enterRecursionRule(e, t, n, s) {\n this.state = t, this._precedenceStack.push(s), this._ctx = e, this._ctx.start = this._input.LT(1), this.triggerEnterRuleEvent();\n }\n // Like {@link //enterRule} but for recursive rules.\n pushNewRecursionContext(e, t, n) {\n const s = this._ctx;\n s.parentCtx = e, s.invokingState = t, s.stop = this._input.LT(-1), this._ctx = e, this._ctx.start = s.start, this.buildParseTrees && this._ctx.addChild(s), this.triggerEnterRuleEvent();\n }\n unrollRecursionContexts(e) {\n this._precedenceStack.pop(), this._ctx.stop = this._input.LT(-1);\n const t = this._ctx, n = this.getParseListeners();\n if (n !== null && n.length > 0)\n for (; this._ctx !== e; )\n this.triggerExitRuleEvent(), this._ctx = this._ctx.parentCtx;\n else\n this._ctx = e;\n t.parentCtx = e, this.buildParseTrees && e !== null && e.addChild(t);\n }\n getInvokingContext(e) {\n let t = this._ctx;\n for (; t !== null; ) {\n if (t.ruleIndex === e)\n return t;\n t = t.parentCtx;\n }\n return null;\n }\n precpred(e, t) {\n return t >= this._precedenceStack[this._precedenceStack.length - 1];\n }\n inContext(e) {\n return !1;\n }\n /**\n * Checks whether or not {@code symbol} can follow the current state in the\n * ATN. The behavior of this method is equivalent to the following, but is\n * implemented such that the complete context-sensitive follow set does not\n * need to be explicitly constructed.\n *\n *
\n * return getExpectedTokens().contains(symbol);\n *\n *\n * @param symbol the symbol type to check\n * @return {@code true} if {@code symbol} can follow the current state in\n * the ATN, otherwise {@code false}.\n */\n isExpectedToken(e) {\n const t = this._interp.atn;\n let n = this._ctx;\n const s = t.states[this.state];\n let l = t.nextTokens(s);\n if (l.contains(e))\n return !0;\n if (!l.contains(m2.EPSILON))\n return !1;\n for (; n !== null && n.invokingState >= 0 && l.contains(m2.EPSILON); ) {\n const L = t.states[n.invokingState].transitions[0];\n if (l = t.nextTokens(L.followState), l.contains(e))\n return !0;\n n = n.parentCtx;\n }\n return !!(l.contains(m2.EPSILON) && e === m2.EOF);\n }\n /**\n * Computes the set of input symbols which could follow the current parser\n * state and context, as given by {@link //getState} and {@link //getContext},\n * respectively.\n *\n * @see ATN//getExpectedTokens(int, RuleContext)\n */\n getExpectedTokens() {\n return this._interp.atn.getExpectedTokens(this.state, this._ctx);\n }\n getExpectedTokensWithinCurrentRule() {\n const e = this._interp.atn, t = e.states[this.state];\n return e.nextTokens(t);\n }\n // Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.\n getRuleIndex(e) {\n const t = this.getRuleIndexMap()[e];\n return t !== null ? t : -1;\n }\n /**\n * Return List<String> of the rule names in your parser instance\n * leading up to a call to the current rule. You could override if\n * you want more details such as the file/line info of where\n * in the ATN a rule is invoked.\n *\n * this is very useful for error messages.\n */\n getRuleInvocationStack(e) {\n e = e || null, e === null && (e = this._ctx);\n const t = [];\n for (; e !== null; ) {\n const n = e.ruleIndex;\n n < 0 ? t.push(\"n/a\") : t.push(this.ruleNames[n]), e = e.parentCtx;\n }\n return t;\n }\n // For debugging and other purposes.\n getDFAStrings() {\n return this._interp.decisionToDFA.toString();\n }\n // For debugging and other purposes.\n dumpDFA() {\n let e = !1;\n for (let t = 0; t < this._interp.decisionToDFA.length; t++) {\n const n = this._interp.decisionToDFA[t];\n n.states.length > 0 && (e && console.log(), this.printer.println(\"Decision \" + n.decision + \":\"), this.printer.print(n.toString(this.literalNames, this.symbolicNames)), e = !0);\n }\n }\n /*\n \"\t\t\tprinter = function() {\\r\\n\" +\n \"\t\t\t\tthis.println = function(s) { document.getElementById('output') += s + '\\\\n'; }\\r\\n\" +\n \"\t\t\t\tthis.print = function(s) { document.getElementById('output') += s; }\\r\\n\" +\n \"\t\t\t};\\r\\n\" +\n */\n getSourceName() {\n return this._input.sourceName;\n }\n /**\n * During a parse is sometimes useful to listen in on the rule entry and exit\n * events as well as token matches. this is for quick and dirty debugging.\n */\n setTrace(e) {\n e ? (this._tracer !== null && this.removeParseListener(this._tracer), this._tracer = new bx(this), this.addParseListener(this._tracer)) : (this.removeParseListener(this._tracer), this._tracer = null);\n }\n};\nmE.bypassAltsAtnCache = {};\nclass xx {\n constructor() {\n this.cache = new nn();\n }\n /**\n * Add a context to the cache and return it. If the context already exists,\n * return that one instead and do not add a new context to the cache.\n * Protect shared cache from unsafe thread access.\n */\n add(e) {\n if (e === t1.EMPTY)\n return t1.EMPTY;\n const t = this.cache.get(e) || null;\n return t !== null ? t : (this.cache.set(e, e), e);\n }\n get(e) {\n return this.cache.get(e) || null;\n }\n get length() {\n return this.cache.length;\n }\n}\nclass hE extends W4 {\n constructor(e) {\n super(), this.parentCtx = null, this.symbol = e;\n }\n getChild(e) {\n return null;\n }\n getSymbol() {\n return this.symbol;\n }\n getParent() {\n return this.parentCtx;\n }\n getPayload() {\n return this.symbol;\n }\n getSourceInterval() {\n if (this.symbol === null)\n return _1.INVALID_INTERVAL;\n const e = this.symbol.tokenIndex;\n return new _1(e, e);\n }\n getChildCount() {\n return 0;\n }\n accept(e) {\n return e.visitTerminal(this);\n }\n getText() {\n return this.symbol.text;\n }\n toString() {\n return this.symbol.type === m2.EOF ? \"
' + (n ? e : Pe(e, !0)) + `\n` : \"\" + (n ? e : Pe(e, !0)) + `\n`;\n }\n /**\n * @param {string} quote\n */\n blockquote(e) {\n return `\n${e}\n`;\n }\n html(e) {\n return e;\n }\n /**\n * @param {string} text\n * @param {string} level\n * @param {string} raw\n * @param {any} slugger\n */\n heading(e, t, n, s) {\n if (this.options.headerIds) {\n const l = this.options.headerPrefix + s.slug(n);\n return `
${e}
\n`;\n }\n /**\n * @param {string} header\n * @param {string} body\n */\n table(e, t) {\n return t && (t = `${t}`), `${e}`;\n }\n br() {\n return this.options.xhtml ? \"An error occurred:
\" + Pe(n.message + \"\", !0) + \"\";\n if (e)\n return Promise.resolve(s);\n if (t) {\n t(null, s);\n return;\n }\n return s;\n }\n if (e)\n return Promise.reject(n);\n if (t) {\n t(n);\n return;\n }\n throw n;\n };\n}\nfunction iv(i, e) {\n return (t, n, s) => {\n typeof n == \"function\" && (s = n, n = null);\n const l = { ...n };\n n = { ...U2.defaults, ...l };\n const c = nH(n.silent, n.async, s);\n if (typeof t > \"u\" || t === null)\n return c(new Error(\"marked(): input parameter is undefined or null\"));\n if (typeof t != \"string\")\n return c(new Error(\"marked(): input parameter is of type \" + Object.prototype.toString.call(t) + \", string expected\"));\n if (Jz(n), n.hooks && (n.hooks.options = n), s) {\n const L = n.highlight;\n let d;\n try {\n n.hooks && (t = n.hooks.preprocess(t)), d = i(t, n);\n } catch (m) {\n return c(m);\n }\n const _ = function(m) {\n let f;\n if (!m)\n try {\n n.walkTokens && U2.walkTokens(d, n.walkTokens), f = e(d, n), n.hooks && (f = n.hooks.postprocess(f));\n } catch (h) {\n m = h;\n }\n return n.highlight = L, m ? c(m) : s(null, f);\n };\n if (!L || L.length < 3 || (delete n.highlight, !d.length)) return _();\n let p = 0;\n U2.walkTokens(d, function(m) {\n m.type === \"code\" && (p++, setTimeout(() => {\n L(m.text, m.lang, function(f, h) {\n if (f)\n return _(f);\n h != null && h !== m.text && (m.text = h, m.escaped = !0), p--, p === 0 && _();\n });\n }, 0));\n }), p === 0 && _();\n return;\n }\n if (n.async)\n return Promise.resolve(n.hooks ? n.hooks.preprocess(t) : t).then((L) => i(L, n)).then((L) => n.walkTokens ? Promise.all(U2.walkTokens(L, n.walkTokens)).then(() => L) : L).then((L) => e(L, n)).then((L) => n.hooks ? n.hooks.postprocess(L) : L).catch(c);\n try {\n n.hooks && (t = n.hooks.preprocess(t));\n const L = i(t, n);\n n.walkTokens && U2.walkTokens(L, n.walkTokens);\n let d = e(L, n);\n return n.hooks && (d = n.hooks.postprocess(d)), d;\n } catch (L) {\n return c(L);\n }\n };\n}\nfunction U2(i, e, t) {\n return iv(Zt.lex, Bt.parse)(i, e, t);\n}\nU2.options = U2.setOptions = function(i) {\n return U2.defaults = { ...U2.defaults, ...i }, Bz(U2.defaults), U2;\n};\nU2.getDefaults = jT;\nU2.defaults = R9;\nU2.use = function(...i) {\n const e = U2.defaults.extensions || { renderers: {}, childTokens: {} };\n i.forEach((t) => {\n const n = { ...t };\n if (n.async = U2.defaults.async || n.async || !1, t.extensions && (t.extensions.forEach((s) => {\n if (!s.name)\n throw new Error(\"extension name required\");\n if (s.renderer) {\n const l = e.renderers[s.name];\n l ? e.renderers[s.name] = function(...c) {\n let L = s.renderer.apply(this, c);\n return L === !1 && (L = l.apply(this, c)), L;\n } : e.renderers[s.name] = s.renderer;\n }\n if (s.tokenizer) {\n if (!s.level || s.level !== \"block\" && s.level !== \"inline\")\n throw new Error(\"extension level must be 'block' or 'inline'\");\n e[s.level] ? e[s.level].unshift(s.tokenizer) : e[s.level] = [s.tokenizer], s.start && (s.level === \"block\" ? e.startBlock ? e.startBlock.push(s.start) : e.startBlock = [s.start] : s.level === \"inline\" && (e.startInline ? e.startInline.push(s.start) : e.startInline = [s.start]));\n }\n s.childTokens && (e.childTokens[s.name] = s.childTokens);\n }), n.extensions = e), t.renderer) {\n const s = U2.defaults.renderer || new Zu();\n for (const l in t.renderer) {\n const c = s[l];\n s[l] = (...L) => {\n let d = t.renderer[l].apply(s, L);\n return d === !1 && (d = c.apply(s, L)), d;\n };\n }\n n.renderer = s;\n }\n if (t.tokenizer) {\n const s = U2.defaults.tokenizer || new Uu();\n for (const l in t.tokenizer) {\n const c = s[l];\n s[l] = (...L) => {\n let d = t.tokenizer[l].apply(s, L);\n return d === !1 && (d = c.apply(s, L)), d;\n };\n }\n n.tokenizer = s;\n }\n if (t.hooks) {\n const s = U2.defaults.hooks || new l6();\n for (const l in t.hooks) {\n const c = s[l];\n l6.passThroughHooks.has(l) ? s[l] = (L) => {\n if (U2.defaults.async)\n return Promise.resolve(t.hooks[l].call(s, L)).then((_) => c.call(s, _));\n const d = t.hooks[l].call(s, L);\n return c.call(s, d);\n } : s[l] = (...L) => {\n let d = t.hooks[l].apply(s, L);\n return d === !1 && (d = c.apply(s, L)), d;\n };\n }\n n.hooks = s;\n }\n if (t.walkTokens) {\n const s = U2.defaults.walkTokens;\n n.walkTokens = function(l) {\n let c = [];\n return c.push(t.walkTokens.call(this, l)), s && (c = c.concat(s.call(this, l))), c;\n };\n }\n U2.setOptions(n);\n });\n};\nU2.walkTokens = function(i, e) {\n let t = [];\n for (const n of i)\n switch (t = t.concat(e.call(U2, n)), n.type) {\n case \"table\": {\n for (const s of n.header)\n t = t.concat(U2.walkTokens(s.tokens, e));\n for (const s of n.rows)\n for (const l of s)\n t = t.concat(U2.walkTokens(l.tokens, e));\n break;\n }\n case \"list\": {\n t = t.concat(U2.walkTokens(n.items, e));\n break;\n }\n default:\n U2.defaults.extensions && U2.defaults.extensions.childTokens && U2.defaults.extensions.childTokens[n.type] ? U2.defaults.extensions.childTokens[n.type].forEach(function(s) {\n t = t.concat(U2.walkTokens(n[s], e));\n }) : n.tokens && (t = t.concat(U2.walkTokens(n.tokens, e)));\n }\n return t;\n};\nU2.parseInline = iv(Zt.lexInline, Bt.parseInline);\nU2.Parser = Bt;\nU2.parser = Bt.parse;\nU2.Renderer = Zu;\nU2.TextRenderer = tv;\nU2.Lexer = Zt;\nU2.lexer = Zt.lex;\nU2.Tokenizer = Uu;\nU2.Slugger = nv;\nU2.Hooks = l6;\nU2.parse = U2;\nU2.options;\nU2.setOptions;\nU2.use;\nU2.walkTokens;\nU2.parseInline;\nBt.parse;\nZt.lex;\n/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */\nconst {\n entries: rv,\n setPrototypeOf: np,\n isFrozen: iH,\n getPrototypeOf: rH,\n getOwnPropertyDescriptor: aH\n} = Object;\nlet {\n freeze: je,\n seal: Q3,\n create: av\n} = Object, {\n apply: tc,\n construct: nc\n} = typeof Reflect < \"u\" && Reflect;\nje || (je = function(e) {\n return e;\n});\nQ3 || (Q3 = function(e) {\n return e;\n});\ntc || (tc = function(e, t, n) {\n return e.apply(t, n);\n});\nnc || (nc = function(e, t) {\n return new e(...t);\n});\nconst y8 = Xe(Array.prototype.forEach), sH = Xe(Array.prototype.lastIndexOf), ip = Xe(Array.prototype.pop), A5 = Xe(Array.prototype.push), oH = Xe(Array.prototype.splice), Z8 = Xe(String.prototype.toLowerCase), Dr = Xe(String.prototype.toString), rp = Xe(String.prototype.match), y5 = Xe(String.prototype.replace), lH = Xe(String.prototype.indexOf), cH = Xe(String.prototype.trim), l4 = Xe(Object.prototype.hasOwnProperty), Ye = Xe(RegExp.prototype.test), N5 = uH(TypeError);\nfunction Xe(i) {\n return function(e) {\n e instanceof RegExp && (e.lastIndex = 0);\n for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)\n n[s - 1] = arguments[s];\n return tc(i, e, n);\n };\n}\nfunction uH(i) {\n return function() {\n for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)\n t[n] = arguments[n];\n return nc(i, t);\n };\n}\nfunction c1(i, e) {\n let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Z8;\n np && np(i, null);\n let n = e.length;\n for (; n--; ) {\n let s = e[n];\n if (typeof s == \"string\") {\n const l = t(s);\n l !== s && (iH(e) || (e[n] = l), s = l);\n }\n i[s] = !0;\n }\n return i;\n}\nfunction LH(i) {\n for (let e = 0; e < i.length; e++)\n l4(i, e) || (i[e] = null);\n return i;\n}\nfunction d9(i) {\n const e = av(null);\n for (const [t, n] of rv(i))\n l4(i, t) && (Array.isArray(n) ? e[t] = LH(n) : n && typeof n == \"object\" && n.constructor === Object ? e[t] = d9(n) : e[t] = n);\n return e;\n}\nfunction O5(i, e) {\n for (; i !== null; ) {\n const n = aH(i, e);\n if (n) {\n if (n.get)\n return Xe(n.get);\n if (typeof n.value == \"function\")\n return Xe(n.value);\n }\n i = rH(i);\n }\n function t() {\n return null;\n }\n return t;\n}\nconst ap = je([\"a\", \"abbr\", \"acronym\", \"address\", \"area\", \"article\", \"aside\", \"audio\", \"b\", \"bdi\", \"bdo\", \"big\", \"blink\", \"blockquote\", \"body\", \"br\", \"button\", \"canvas\", \"caption\", \"center\", \"cite\", \"code\", \"col\", \"colgroup\", \"content\", \"data\", \"datalist\", \"dd\", \"decorator\", \"del\", \"details\", \"dfn\", \"dialog\", \"dir\", \"div\", \"dl\", \"dt\", \"element\", \"em\", \"fieldset\", \"figcaption\", \"figure\", \"font\", \"footer\", \"form\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"head\", \"header\", \"hgroup\", \"hr\", \"html\", \"i\", \"img\", \"input\", \"ins\", \"kbd\", \"label\", \"legend\", \"li\", \"main\", \"map\", \"mark\", \"marquee\", \"menu\", \"menuitem\", \"meter\", \"nav\", \"nobr\", \"ol\", \"optgroup\", \"option\", \"output\", \"p\", \"picture\", \"pre\", \"progress\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"section\", \"select\", \"shadow\", \"small\", \"source\", \"spacer\", \"span\", \"strike\", \"strong\", \"style\", \"sub\", \"summary\", \"sup\", \"table\", \"tbody\", \"td\", \"template\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"time\", \"tr\", \"track\", \"tt\", \"u\", \"ul\", \"var\", \"video\", \"wbr\"]), kr = je([\"svg\", \"a\", \"altglyph\", \"altglyphdef\", \"altglyphitem\", \"animatecolor\", \"animatemotion\", \"animatetransform\", \"circle\", \"clippath\", \"defs\", \"desc\", \"ellipse\", \"filter\", \"font\", \"g\", \"glyph\", \"glyphref\", \"hkern\", \"image\", \"line\", \"lineargradient\", \"marker\", \"mask\", \"metadata\", \"mpath\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialgradient\", \"rect\", \"stop\", \"style\", \"switch\", \"symbol\", \"text\", \"textpath\", \"title\", \"tref\", \"tspan\", \"view\", \"vkern\"]), Pr = je([\"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feDropShadow\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\"]), dH = je([\"animate\", \"color-profile\", \"cursor\", \"discard\", \"font-face\", \"font-face-format\", \"font-face-name\", \"font-face-src\", \"font-face-uri\", \"foreignobject\", \"hatch\", \"hatchpath\", \"mesh\", \"meshgradient\", \"meshpatch\", \"meshrow\", \"missing-glyph\", \"script\", \"set\", \"solidcolor\", \"unknown\", \"use\"]), Fr = je([\"math\", \"menclose\", \"merror\", \"mfenced\", \"mfrac\", \"mglyph\", \"mi\", \"mlabeledtr\", \"mmultiscripts\", \"mn\", \"mo\", \"mover\", \"mpadded\", \"mphantom\", \"mroot\", \"mrow\", \"ms\", \"mspace\", \"msqrt\", \"mstyle\", \"msub\", \"msup\", \"msubsup\", \"mtable\", \"mtd\", \"mtext\", \"mtr\", \"munder\", \"munderover\", \"mprescripts\"]), CH = je([\"maction\", \"maligngroup\", \"malignmark\", \"mlongdiv\", \"mscarries\", \"mscarry\", \"msgroup\", \"mstack\", \"msline\", \"msrow\", \"semantics\", \"annotation\", \"annotation-xml\", \"mprescripts\", \"none\"]), sp = je([\"#text\"]), op = je([\"accept\", \"action\", \"align\", \"alt\", \"autocapitalize\", \"autocomplete\", \"autopictureinpicture\", \"autoplay\", \"background\", \"bgcolor\", \"border\", \"capture\", \"cellpadding\", \"cellspacing\", \"checked\", \"cite\", \"class\", \"clear\", \"color\", \"cols\", \"colspan\", \"controls\", \"controlslist\", \"coords\", \"crossorigin\", \"datetime\", \"decoding\", \"default\", \"dir\", \"disabled\", \"disablepictureinpicture\", \"disableremoteplayback\", \"download\", \"draggable\", \"enctype\", \"enterkeyhint\", \"face\", \"for\", \"headers\", \"height\", \"hidden\", \"high\", \"href\", \"hreflang\", \"id\", \"inputmode\", \"integrity\", \"ismap\", \"kind\", \"label\", \"lang\", \"list\", \"loading\", \"loop\", \"low\", \"max\", \"maxlength\", \"media\", \"method\", \"min\", \"minlength\", \"multiple\", \"muted\", \"name\", \"nonce\", \"noshade\", \"novalidate\", \"nowrap\", \"open\", \"optimum\", \"pattern\", \"placeholder\", \"playsinline\", \"popover\", \"popovertarget\", \"popovertargetaction\", \"poster\", \"preload\", \"pubdate\", \"radiogroup\", \"readonly\", \"rel\", \"required\", \"rev\", \"reversed\", \"role\", \"rows\", \"rowspan\", \"spellcheck\", \"scope\", \"selected\", \"shape\", \"size\", \"sizes\", \"span\", \"srclang\", \"start\", \"src\", \"srcset\", \"step\", \"style\", \"summary\", \"tabindex\", \"title\", \"translate\", \"type\", \"usemap\", \"valign\", \"value\", \"width\", \"wrap\", \"xmlns\", \"slot\"]), Ur = je([\"accent-height\", \"accumulate\", \"additive\", \"alignment-baseline\", \"amplitude\", \"ascent\", \"attributename\", \"attributetype\", \"azimuth\", \"basefrequency\", \"baseline-shift\", \"begin\", \"bias\", \"by\", \"class\", \"clip\", \"clippathunits\", \"clip-path\", \"clip-rule\", \"color\", \"color-interpolation\", \"color-interpolation-filters\", \"color-profile\", \"color-rendering\", \"cx\", \"cy\", \"d\", \"dx\", \"dy\", \"diffuseconstant\", \"direction\", \"display\", \"divisor\", \"dur\", \"edgemode\", \"elevation\", \"end\", \"exponent\", \"fill\", \"fill-opacity\", \"fill-rule\", \"filter\", \"filterunits\", \"flood-color\", \"flood-opacity\", \"font-family\", \"font-size\", \"font-size-adjust\", \"font-stretch\", \"font-style\", \"font-variant\", \"font-weight\", \"fx\", \"fy\", \"g1\", \"g2\", \"glyph-name\", \"glyphref\", \"gradientunits\", \"gradienttransform\", \"height\", \"href\", \"id\", \"image-rendering\", \"in\", \"in2\", \"intercept\", \"k\", \"k1\", \"k2\", \"k3\", \"k4\", \"kerning\", \"keypoints\", \"keysplines\", \"keytimes\", \"lang\", \"lengthadjust\", \"letter-spacing\", \"kernelmatrix\", \"kernelunitlength\", \"lighting-color\", \"local\", \"marker-end\", \"marker-mid\", \"marker-start\", \"markerheight\", \"markerunits\", \"markerwidth\", \"maskcontentunits\", \"maskunits\", \"max\", \"mask\", \"media\", \"method\", \"mode\", \"min\", \"name\", \"numoctaves\", \"offset\", \"operator\", \"opacity\", \"order\", \"orient\", \"orientation\", \"origin\", \"overflow\", \"paint-order\", \"path\", \"pathlength\", \"patterncontentunits\", \"patterntransform\", \"patternunits\", \"points\", \"preservealpha\", \"preserveaspectratio\", \"primitiveunits\", \"r\", \"rx\", \"ry\", \"radius\", \"refx\", \"refy\", \"repeatcount\", \"repeatdur\", \"restart\", \"result\", \"rotate\", \"scale\", \"seed\", \"shape-rendering\", \"slope\", \"specularconstant\", \"specularexponent\", \"spreadmethod\", \"startoffset\", \"stddeviation\", \"stitchtiles\", \"stop-color\", \"stop-opacity\", \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\", \"stroke-miterlimit\", \"stroke-opacity\", \"stroke\", \"stroke-width\", \"style\", \"surfacescale\", \"systemlanguage\", \"tabindex\", \"tablevalues\", \"targetx\", \"targety\", \"transform\", \"transform-origin\", \"text-anchor\", \"text-decoration\", \"text-rendering\", \"textlength\", \"type\", \"u1\", \"u2\", \"unicode\", \"values\", \"viewbox\", \"visibility\", \"version\", \"vert-adv-y\", \"vert-origin-x\", \"vert-origin-y\", \"width\", \"word-spacing\", \"wrap\", \"writing-mode\", \"xchannelselector\", \"ychannelselector\", \"x\", \"x1\", \"x2\", \"xmlns\", \"y\", \"y1\", \"y2\", \"z\", \"zoomandpan\"]), lp = je([\"accent\", \"accentunder\", \"align\", \"bevelled\", \"close\", \"columnsalign\", \"columnlines\", \"columnspan\", \"denomalign\", \"depth\", \"dir\", \"display\", \"displaystyle\", \"encoding\", \"fence\", \"frame\", \"height\", \"href\", \"id\", \"largeop\", \"length\", \"linethickness\", \"lspace\", \"lquote\", \"mathbackground\", \"mathcolor\", \"mathsize\", \"mathvariant\", \"maxsize\", \"minsize\", \"movablelimits\", \"notation\", \"numalign\", \"open\", \"rowalign\", \"rowlines\", \"rowspacing\", \"rowspan\", \"rspace\", \"rquote\", \"scriptlevel\", \"scriptminsize\", \"scriptsizemultiplier\", \"selection\", \"separator\", \"separators\", \"stretchy\", \"subscriptshift\", \"supscriptshift\", \"symmetric\", \"voffset\", \"width\", \"xmlns\"]), N8 = je([\"xlink:href\", \"xml:id\", \"xlink:title\", \"xml:space\", \"xmlns:xlink\"]), _H = Q3(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm), gH = Q3(/<%[\\w\\W]*|[\\w\\W]*%>/gm), pH = Q3(/\\$\\{[\\w\\W]*/gm), mH = Q3(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/), hH = Q3(/^aria-[\\-\\w]+$/), sv = Q3(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i\n // eslint-disable-line no-useless-escape\n), fH = Q3(/^(?:\\w+script|data):/i), EH = Q3(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g\n // eslint-disable-line no-control-regex\n), ov = Q3(/^html$/i), SH = Q3(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\nvar cp = /* @__PURE__ */ Object.freeze({\n __proto__: null,\n ARIA_ATTR: hH,\n ATTR_WHITESPACE: EH,\n CUSTOM_ELEMENT: SH,\n DATA_ATTR: mH,\n DOCTYPE_NAME: ov,\n ERB_EXPR: gH,\n IS_ALLOWED_URI: sv,\n IS_SCRIPT_OR_DATA: fH,\n MUSTACHE_EXPR: _H,\n TMPLIT_EXPR: pH\n});\nconst I5 = {\n element: 1,\n text: 3,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9\n}, TH = function() {\n return typeof window > \"u\" ? null : window;\n}, vH = function(e, t) {\n if (typeof e != \"object\" || typeof e.createPolicy != \"function\")\n return null;\n let n = null;\n const s = \"data-tt-policy-suffix\";\n t && t.hasAttribute(s) && (n = t.getAttribute(s));\n const l = \"dompurify\" + (n ? \"#\" + n : \"\");\n try {\n return e.createPolicy(l, {\n createHTML(c) {\n return c;\n },\n createScriptURL(c) {\n return c;\n }\n });\n } catch {\n return console.warn(\"TrustedTypes policy \" + l + \" could not be created.\"), null;\n }\n}, up = function() {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: []\n };\n};\nfunction lv() {\n let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : TH();\n const e = (D2) => lv(D2);\n if (e.version = \"3.2.5\", e.removed = [], !i || !i.document || i.document.nodeType !== I5.document || !i.Element)\n return e.isSupported = !1, e;\n let {\n document: t\n } = i;\n const n = t, s = n.currentScript, {\n DocumentFragment: l,\n HTMLTemplateElement: c,\n Node: L,\n Element: d,\n NodeFilter: _,\n NamedNodeMap: p = i.NamedNodeMap || i.MozNamedAttrMap,\n HTMLFormElement: m,\n DOMParser: f,\n trustedTypes: h\n } = i, R = d.prototype, b = O5(R, \"cloneNode\"), M = O5(R, \"remove\"), w = O5(R, \"nextSibling\"), O = O5(R, \"childNodes\"), D = O5(R, \"parentNode\");\n if (typeof c == \"function\") {\n const D2 = t.createElement(\"template\");\n D2.content && D2.content.ownerDocument && (t = D2.content.ownerDocument);\n }\n let N, F = \"\";\n const {\n implementation: U,\n createNodeIterator: k,\n createDocumentFragment: n2,\n getElementsByTagName: K\n } = t, {\n importNode: X\n } = n;\n let r2 = up();\n e.isSupported = typeof rv == \"function\" && typeof D == \"function\" && U && U.createHTMLDocument !== void 0;\n const {\n MUSTACHE_EXPR: t2,\n ERB_EXPR: g2,\n TMPLIT_EXPR: R2,\n DATA_ATTR: H,\n ARIA_ATTR: A,\n IS_SCRIPT_OR_DATA: B,\n ATTR_WHITESPACE: e2,\n CUSTOM_ELEMENT: u2\n } = cp;\n let {\n IS_ALLOWED_URI: y\n } = cp, q = null;\n const s2 = c1({}, [...ap, ...kr, ...Pr, ...Fr, ...sp]);\n let i2 = null;\n const a2 = c1({}, [...op, ...Ur, ...lp, ...N8]);\n let _2 = Object.seal(av(null, {\n tagNameCheck: {\n writable: !0,\n configurable: !1,\n enumerable: !0,\n value: null\n },\n attributeNameCheck: {\n writable: !0,\n configurable: !1,\n enumerable: !0,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: !0,\n configurable: !1,\n enumerable: !0,\n value: !1\n }\n })), f2 = null, V2 = null, q2 = !0, v1 = !0, p1 = !1, P1 = !0, z1 = !1, he = !0, de = !1, g3 = !1, we = !1, O1 = !1, J3 = !1, k3 = !1, t3 = !0, fe = !1;\n const et = \"user-content-\";\n let e4 = !0, p3 = !1, m3 = {}, le = null;\n const W1 = c1({}, [\"annotation-xml\", \"audio\", \"colgroup\", \"desc\", \"foreignobject\", \"head\", \"iframe\", \"math\", \"mi\", \"mn\", \"mo\", \"ms\", \"mtext\", \"noembed\", \"noframes\", \"noscript\", \"plaintext\", \"script\", \"style\", \"svg\", \"template\", \"thead\", \"title\", \"video\", \"xmp\"]);\n let Me = null;\n const $1 = c1({}, [\"audio\", \"video\", \"img\", \"source\", \"image\", \"track\"]);\n let P3 = null;\n const C4 = c1({}, [\"alt\", \"class\", \"for\", \"id\", \"label\", \"name\", \"pattern\", \"placeholder\", \"role\", \"summary\", \"title\", \"value\", \"style\", \"xmlns\"]), K1 = \"http://www.w3.org/1998/Math/MathML\", r1 = \"http://www.w3.org/2000/svg\", te = \"http://www.w3.org/1999/xhtml\";\n let ne = te, F3 = !1, U3 = null;\n const Y = c1({}, [K1, r1, te], Dr);\n let o2 = c1({}, [\"mi\", \"mo\", \"mn\", \"ms\", \"mtext\"]), E2 = c1({}, [\"annotation-xml\"]);\n const k2 = c1({}, [\"title\", \"style\", \"font\", \"a\", \"script\"]);\n let Q2 = null;\n const u1 = [\"application/xhtml+xml\", \"text/html\"], I1 = \"text/html\";\n let p2 = null, v2 = null;\n const H2 = t.createElement(\"form\"), W2 = function(Z) {\n return Z instanceof RegExp || Z instanceof Function;\n }, E1 = function() {\n let Z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n if (!(v2 && v2 === Z)) {\n if ((!Z || typeof Z != \"object\") && (Z = {}), Z = d9(Z), Q2 = // eslint-disable-next-line unicorn/prefer-includes\n u1.indexOf(Z.PARSER_MEDIA_TYPE) === -1 ? I1 : Z.PARSER_MEDIA_TYPE, p2 = Q2 === \"application/xhtml+xml\" ? Dr : Z8, q = l4(Z, \"ALLOWED_TAGS\") ? c1({}, Z.ALLOWED_TAGS, p2) : s2, i2 = l4(Z, \"ALLOWED_ATTR\") ? c1({}, Z.ALLOWED_ATTR, p2) : a2, U3 = l4(Z, \"ALLOWED_NAMESPACES\") ? c1({}, Z.ALLOWED_NAMESPACES, Dr) : Y, P3 = l4(Z, \"ADD_URI_SAFE_ATTR\") ? c1(d9(C4), Z.ADD_URI_SAFE_ATTR, p2) : C4, Me = l4(Z, \"ADD_DATA_URI_TAGS\") ? c1(d9($1), Z.ADD_DATA_URI_TAGS, p2) : $1, le = l4(Z, \"FORBID_CONTENTS\") ? c1({}, Z.FORBID_CONTENTS, p2) : W1, f2 = l4(Z, \"FORBID_TAGS\") ? c1({}, Z.FORBID_TAGS, p2) : {}, V2 = l4(Z, \"FORBID_ATTR\") ? c1({}, Z.FORBID_ATTR, p2) : {}, m3 = l4(Z, \"USE_PROFILES\") ? Z.USE_PROFILES : !1, q2 = Z.ALLOW_ARIA_ATTR !== !1, v1 = Z.ALLOW_DATA_ATTR !== !1, p1 = Z.ALLOW_UNKNOWN_PROTOCOLS || !1, P1 = Z.ALLOW_SELF_CLOSE_IN_ATTR !== !1, z1 = Z.SAFE_FOR_TEMPLATES || !1, he = Z.SAFE_FOR_XML !== !1, de = Z.WHOLE_DOCUMENT || !1, O1 = Z.RETURN_DOM || !1, J3 = Z.RETURN_DOM_FRAGMENT || !1, k3 = Z.RETURN_TRUSTED_TYPE || !1, we = Z.FORCE_BODY || !1, t3 = Z.SANITIZE_DOM !== !1, fe = Z.SANITIZE_NAMED_PROPS || !1, e4 = Z.KEEP_CONTENT !== !1, p3 = Z.IN_PLACE || !1, y = Z.ALLOWED_URI_REGEXP || sv, ne = Z.NAMESPACE || te, o2 = Z.MATHML_TEXT_INTEGRATION_POINTS || o2, E2 = Z.HTML_INTEGRATION_POINTS || E2, _2 = Z.CUSTOM_ELEMENT_HANDLING || {}, Z.CUSTOM_ELEMENT_HANDLING && W2(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (_2.tagNameCheck = Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck), Z.CUSTOM_ELEMENT_HANDLING && W2(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (_2.attributeNameCheck = Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), Z.CUSTOM_ELEMENT_HANDLING && typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == \"boolean\" && (_2.allowCustomizedBuiltInElements = Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), z1 && (v1 = !1), J3 && (O1 = !0), m3 && (q = c1({}, sp), i2 = [], m3.html === !0 && (c1(q, ap), c1(i2, op)), m3.svg === !0 && (c1(q, kr), c1(i2, Ur), c1(i2, N8)), m3.svgFilters === !0 && (c1(q, Pr), c1(i2, Ur), c1(i2, N8)), m3.mathMl === !0 && (c1(q, Fr), c1(i2, lp), c1(i2, N8))), Z.ADD_TAGS && (q === s2 && (q = d9(q)), c1(q, Z.ADD_TAGS, p2)), Z.ADD_ATTR && (i2 === a2 && (i2 = d9(i2)), c1(i2, Z.ADD_ATTR, p2)), Z.ADD_URI_SAFE_ATTR && c1(P3, Z.ADD_URI_SAFE_ATTR, p2), Z.FORBID_CONTENTS && (le === W1 && (le = d9(le)), c1(le, Z.FORBID_CONTENTS, p2)), e4 && (q[\"#text\"] = !0), de && c1(q, [\"html\", \"head\", \"body\"]), q.table && (c1(q, [\"tbody\"]), delete f2.tbody), Z.TRUSTED_TYPES_POLICY) {\n if (typeof Z.TRUSTED_TYPES_POLICY.createHTML != \"function\")\n throw N5('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n if (typeof Z.TRUSTED_TYPES_POLICY.createScriptURL != \"function\")\n throw N5('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n N = Z.TRUSTED_TYPES_POLICY, F = N.createHTML(\"\");\n } else\n N === void 0 && (N = vH(h, s)), N !== null && typeof F == \"string\" && (F = N.createHTML(\"\"));\n je && je(Z), v2 = Z;\n }\n }, ie = c1({}, [...kr, ...Pr, ...dH]), F1 = c1({}, [...Fr, ...CH]), re = function(Z) {\n let C2 = D(Z);\n (!C2 || !C2.tagName) && (C2 = {\n namespaceURI: ne,\n tagName: \"template\"\n });\n const T2 = Z8(Z.tagName), s1 = Z8(C2.tagName);\n return U3[Z.namespaceURI] ? Z.namespaceURI === r1 ? C2.namespaceURI === te ? T2 === \"svg\" : C2.namespaceURI === K1 ? T2 === \"svg\" && (s1 === \"annotation-xml\" || o2[s1]) : !!ie[T2] : Z.namespaceURI === K1 ? C2.namespaceURI === te ? T2 === \"math\" : C2.namespaceURI === r1 ? T2 === \"math\" && E2[s1] : !!F1[T2] : Z.namespaceURI === te ? C2.namespaceURI === r1 && !E2[s1] || C2.namespaceURI === K1 && !o2[s1] ? !1 : !F1[T2] && (k2[T2] || !ie[T2]) : !!(Q2 === \"application/xhtml+xml\" && U3[Z.namespaceURI]) : !1;\n }, ce = function(Z) {\n A5(e.removed, {\n element: Z\n });\n try {\n D(Z).removeChild(Z);\n } catch {\n M(Z);\n }\n }, t4 = function(Z, C2) {\n try {\n A5(e.removed, {\n attribute: C2.getAttributeNode(Z),\n from: C2\n });\n } catch {\n A5(e.removed, {\n attribute: null,\n from: C2\n });\n }\n if (C2.removeAttribute(Z), Z === \"is\")\n if (O1 || J3)\n try {\n ce(C2);\n } catch {\n }\n else\n try {\n C2.setAttribute(Z, \"\");\n } catch {\n }\n }, Vt = function(Z) {\n let C2 = null, T2 = null;\n if (we)\n Z = \"
`\n };\n return { Component: o2, VuePlugin: {\n install(k2) {\n k2.component(\"highlightjs\", o2);\n }\n } };\n }\n const m3 = {\n \"after:highlightElement\": ({ el: Y, result: o2, text: E2 }) => {\n const k2 = W1(Y);\n if (!k2.length) return;\n const Q2 = document.createElement(\"div\");\n Q2.innerHTML = o2.value, o2.value = Me(k2, W1(Q2), E2);\n }\n };\n function le(Y) {\n return Y.nodeName.toLowerCase();\n }\n function W1(Y) {\n const o2 = [];\n return function E2(k2, Q2) {\n for (let u1 = k2.firstChild; u1; u1 = u1.nextSibling)\n u1.nodeType === 3 ? Q2 += u1.nodeValue.length : u1.nodeType === 1 && (o2.push({\n event: \"start\",\n offset: Q2,\n node: u1\n }), Q2 = E2(u1, Q2), le(u1).match(/br|hr|img|input/) || o2.push({\n event: \"stop\",\n offset: Q2,\n node: u1\n }));\n return Q2;\n }(Y, 0), o2;\n }\n function Me(Y, o2, E2) {\n let k2 = 0, Q2 = \"\";\n const u1 = [];\n function I1() {\n return !Y.length || !o2.length ? Y.length ? Y : o2 : Y[0].offset !== o2[0].offset ? Y[0].offset < o2[0].offset ? Y : o2 : o2[0].event === \"start\" ? Y : o2;\n }\n function p2(W2) {\n function E1(ie) {\n return \" \" + ie.nodeName + '=\"' + s(ie.value) + '\"';\n }\n Q2 += \"<\" + le(W2) + [].map.call(W2.attributes, E1).join(\"\") + \">\";\n }\n function v2(W2) {\n Q2 += \"\" + le(W2) + \">\";\n }\n function H2(W2) {\n (W2.event === \"start\" ? p2 : v2)(W2.node);\n }\n for (; Y.length || o2.length; ) {\n let W2 = I1();\n if (Q2 += s(E2.substring(k2, W2[0].offset)), k2 = W2[0].offset, W2 === Y) {\n u1.reverse().forEach(v2);\n do\n H2(W2.splice(0, 1)[0]), W2 = I1();\n while (W2 === Y && W2.length && W2[0].offset === k2);\n u1.reverse().forEach(p2);\n } else\n W2[0].event === \"start\" ? u1.push(W2[0].node) : u1.pop(), H2(W2.splice(0, 1)[0]);\n }\n return Q2 + s(E2.substr(k2));\n }\n const $1 = {}, P3 = (Y) => {\n console.error(Y);\n }, C4 = (Y, ...o2) => {\n console.log(`WARN: ${Y}`, ...o2);\n }, K1 = (Y, o2) => {\n $1[`${Y}/${o2}`] || (console.log(`Deprecated as of ${Y}. ${o2}`), $1[`${Y}/${o2}`] = !0);\n }, r1 = s, te = l, ne = Symbol(\"nomatch\");\n var U3 = function(Y) {\n const o2 = /* @__PURE__ */ Object.create(null), E2 = /* @__PURE__ */ Object.create(null), k2 = [];\n let Q2 = !0;\n const u1 = /(^(<[^>]+>|\\t|)+|\\n)/gm, I1 = \"Could not find the language '{}', did you forget to load/include a language module?\", p2 = { disableAutodetect: !0, name: \"Plain text\", contains: [] };\n let v2 = {\n noHighlightRe: /^(no-?highlight)$/i,\n languageDetectRe: /\\blang(?:uage)?-([\\w-]+)\\b/i,\n classPrefix: \"hljs-\",\n tabReplace: null,\n useBR: !1,\n languages: null,\n // beta configuration options, subject to change, welcome to discuss\n // https://github.com/highlightjs/highlight.js/issues/1086\n __emitter: p\n };\n function H2(d2) {\n return v2.noHighlightRe.test(d2);\n }\n function W2(d2) {\n let b2 = d2.className + \" \";\n b2 += d2.parentNode ? d2.parentNode.className : \"\";\n const n1 = v2.languageDetectRe.exec(b2);\n if (n1) {\n const m1 = s1(n1[1]);\n return m1 || (C4(I1.replace(\"{}\", n1[1])), C4(\"Falling back to no-highlight mode for this block.\", d2)), m1 ? n1[1] : \"no-highlight\";\n }\n return b2.split(/\\s+/).find((m1) => H2(m1) || s1(m1));\n }\n function E1(d2, b2, n1, m1) {\n let ae = \"\", n4 = \"\";\n typeof b2 == \"object\" ? (ae = d2, n1 = b2.ignoreIllegals, n4 = b2.language, m1 = void 0) : (K1(\"10.7.0\", \"highlight(lang, code, ...args) has been deprecated.\"), K1(\"10.7.0\", `Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277`), n4 = d2, ae = b2);\n const Z1 = {\n code: ae,\n language: n4\n };\n Ie(\"before:highlight\", Z1);\n const r3 = Z1.result ? Z1.result : ie(Z1.language, Z1.code, n1, m1);\n return r3.code = Z1.code, Ie(\"after:highlight\", r3), r3;\n }\n function ie(d2, b2, n1, m1) {\n function ae(M2, F2) {\n const $2 = i4.case_insensitive ? F2[0].toLowerCase() : F2[0];\n return Object.prototype.hasOwnProperty.call(M2.keywords, $2) && M2.keywords[$2];\n }\n function n4() {\n if (!X2.keywords) {\n _e.addText(D1);\n return;\n }\n let M2 = 0;\n X2.keywordPatternRe.lastIndex = 0;\n let F2 = X2.keywordPatternRe.exec(D1), $2 = \"\";\n for (; F2; ) {\n $2 += D1.substring(M2, F2.index);\n const e1 = ae(X2, F2);\n if (e1) {\n const [k1, g4] = e1;\n if (_e.addText($2), $2 = \"\", N4 += g4, k1.startsWith(\"_\"))\n $2 += F2[0];\n else {\n const rt = i4.classNameAliases[k1] || k1;\n _e.addKeyword(F2[0], rt);\n }\n } else\n $2 += F2[0];\n M2 = X2.keywordPatternRe.lastIndex, F2 = X2.keywordPatternRe.exec(D1);\n }\n $2 += D1.substr(M2), _e.addText($2);\n }\n function Z1() {\n if (D1 === \"\") return;\n let M2 = null;\n if (typeof X2.subLanguage == \"string\") {\n if (!o2[X2.subLanguage]) {\n _e.addText(D1);\n return;\n }\n M2 = ie(X2.subLanguage, D1, !0, r4[X2.subLanguage]), r4[X2.subLanguage] = /** @type {CompiledMode} */\n M2.top;\n } else\n M2 = re(D1, X2.subLanguage.length ? X2.subLanguage : null);\n X2.relevance > 0 && (N4 += M2.relevance), _e.addSublanguage(M2.emitter, M2.language);\n }\n function r3() {\n X2.subLanguage != null ? Z1() : n4(), D1 = \"\";\n }\n function E3(M2) {\n return M2.className && _e.openNode(i4.classNameAliases[M2.className] || M2.className), X2 = Object.create(M2, { parent: { value: X2 } }), X2;\n }\n function a3(M2, F2, $2) {\n let e1 = M(M2.endRe, $2);\n if (e1) {\n if (M2[\"on:end\"]) {\n const k1 = new n(M2);\n M2[\"on:end\"](F2, k1), k1.isMatchIgnored && (e1 = !1);\n }\n if (e1) {\n for (; M2.endsParent && M2.parent; )\n M2 = M2.parent;\n return M2;\n }\n }\n if (M2.endsWithParent)\n return a3(M2.parent, F2, $2);\n }\n function A0(M2) {\n return X2.matcher.regexIndex === 0 ? (D1 += M2[0], 1) : (it = !0, 0);\n }\n function Wt(M2) {\n const F2 = M2[0], $2 = M2.rule, e1 = new n($2), k1 = [$2.__beforeBegin, $2[\"on:begin\"]];\n for (const g4 of k1)\n if (g4 && (g4(M2, e1), e1.isMatchIgnored))\n return A0(F2);\n return $2 && $2.endSameAsBegin && ($2.endRe = m(F2)), $2.skip ? D1 += F2 : ($2.excludeBegin && (D1 += F2), r3(), !$2.returnBegin && !$2.excludeBegin && (D1 = F2)), E3($2), $2.returnBegin ? 0 : F2.length;\n }\n function gn(M2) {\n const F2 = M2[0], $2 = b2.substr(M2.index), e1 = a3(X2, M2, $2);\n if (!e1)\n return ne;\n const k1 = X2;\n k1.skip ? D1 += F2 : (k1.returnEnd || k1.excludeEnd || (D1 += F2), r3(), k1.excludeEnd && (D1 = F2));\n do\n X2.className && _e.closeNode(), !X2.skip && !X2.subLanguage && (N4 += X2.relevance), X2 = X2.parent;\n while (X2 !== e1.parent);\n return e1.starts && (e1.endSameAsBegin && (e1.starts.endRe = e1.endRe), E3(e1.starts)), k1.returnEnd ? 0 : F2.length;\n }\n function ze() {\n const M2 = [];\n for (let F2 = X2; F2 !== i4; F2 = F2.parent)\n F2.className && M2.unshift(F2.className);\n M2.forEach((F2) => _e.openNode(F2));\n }\n let y4 = {};\n function x9(M2, F2) {\n const $2 = F2 && F2[0];\n if (D1 += M2, $2 == null)\n return r3(), 0;\n if (y4.type === \"begin\" && F2.type === \"end\" && y4.index === F2.index && $2 === \"\") {\n if (D1 += b2.slice(F2.index, F2.index + 1), !Q2) {\n const e1 = new Error(\"0 width match regex\");\n throw e1.languageName = d2, e1.badRule = y4.rule, e1;\n }\n return 1;\n }\n if (y4 = F2, F2.type === \"begin\")\n return Wt(F2);\n if (F2.type === \"illegal\" && !n1) {\n const e1 = new Error('Illegal lexeme \"' + $2 + '\" for mode \"' + (X2.className || \"