diff --git a/babel_asttool.js b/babel_asttool.js new file mode 100644 index 0000000..61d5bcd --- /dev/null +++ b/babel_asttool.js @@ -0,0 +1,32262 @@ +!function() { + return function e(t, n, r) { + function i(a, o) { + var l, c, p; + if (!n[a]) { + if (!t[a]) { + l = "function" == typeof require && require; + if (!o && l) return l(a, !0); + if (s) return s(a, !0); + throw (c = new Error("Cannot find module '" + a + "'")).code = "MODULE_NOT_FOUND", + c; + } + p = n[a] = { + exports: {} + }; + t[a][0].call(p.exports, function(e) { + return i(t[a][1][e] || e); + }, p, p.exports, e, t, n, r); + } + return n[a].exports; + } + for (var s = "function" == typeof require && require, a = 0; a < r.length; a++) i(r[a]); + return i; + }; +}()({ + 1: [ function(e, t, n) { + (function(t) { + (function() { + t.parser = e("@babel/parser"); + t.traverse = e("@babel/traverse").default; + t.t = e("@babel/types"); + t.generator = e("@babel/generator").default; + }).call(this); + }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); + }, { + "@babel/generator": 16, + "@babel/parser": 30, + "@babel/traverse": 42, + "@babel/types": 108 + } ], + 2: [ function(e, t, n) { + (function(t) { + (function() { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.codeFrameColumns = a; + n.default = function(e, n, r, s = {}) { + if (!i) { + i = !0; + const e = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (t.emitWarning) t.emitWarning(e, "DeprecationWarning"); else { + const t = new Error(e); + t.name = "DeprecationWarning"; + console.warn(new Error(e)); + } + } + r = Math.max(r, 0); + return a(e, { + start: { + column: r, + line: n + } + }, s); + }; + var r = e("@babel/highlight"); + let i = !1; + const s = /\r\n|[\n\r\u2028\u2029]/; + function a(e, t, n = {}) { + const i = (n.highlightCode || n.forceColor) && (0, r.shouldHighlight)(n); + const a = (0, r.getChalk)(n); + const o = function(e) { + return { + gutter: e.grey, + marker: e.red.bold, + message: e.red.bold + }; + }(a); + const l = (e, t) => i ? e(t) : t; + const c = e.split(s); + const {start: p, end: u, markerLines: d} = function(e, t, n) { + const r = Object.assign({ + column: 0, + line: -1 + }, e.start); + const i = Object.assign({}, r, e.end); + const {linesAbove: s = 2, linesBelow: a = 3} = n || {}; + const o = r.line; + const l = r.column; + const c = i.line; + const p = i.column; + let u = Math.max(o - (s + 1), 0); + let d = Math.min(t.length, c + a); + -1 === o && (u = 0); + -1 === c && (d = t.length); + const h = c - o; + const f = {}; + if (h) for (let e = 0; e <= h; e++) { + const n = e + o; + if (l) if (0 === e) { + const e = t[n - 1].length; + f[n] = [ l, e - l + 1 ]; + } else if (e === h) f[n] = [ 0, p ]; else { + const r = t[n - e].length; + f[n] = [ 0, r ]; + } else f[n] = !0; + } else f[o] = l === p ? !l || [ l, 0 ] : [ l, p - l ]; + return { + start: u, + end: d, + markerLines: f + }; + }(t, c, n); + const h = t.start && "number" == typeof t.start.column; + const f = String(u).length; + let m = (i ? (0, r.default)(e, n) : e).split(s).slice(p, u).map((e, t) => { + const r = p + 1 + t; + const i = ` ${` ${r}`.slice(-f)} |`; + const s = d[r]; + const a = !d[r + 1]; + if (s) { + let t = ""; + if (Array.isArray(s)) { + const r = e.slice(0, Math.max(s[0] - 1, 0)).replace(/[^\t]/g, " "); + const c = s[1] || 1; + t = [ "\n ", l(o.gutter, i.replace(/\d/g, " ")), " ", r, l(o.marker, "^").repeat(c) ].join(""); + a && n.message && (t += " " + l(o.message, n.message)); + } + return [ l(o.marker, ">"), l(o.gutter, i), e.length > 0 ? ` ${e}` : "", t ].join(""); + } + return ` ${l(o.gutter, i)}${e.length > 0 ? ` ${e}` : ""}`; + }).join("\n"); + n.message && !h && (m = `${" ".repeat(f + 1)}${n.message}\n${m}`); + return i ? a.reset(m) : m; + } + }).call(this); + }).call(this, e("_process")); + }, { + "@babel/highlight": 29, + _process: 160 + } ], + 3: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + const r = /^[ \t]+$/; + n.default = class { + constructor(e) { + this._map = null; + this._buf = ""; + this._last = 0; + this._queue = []; + this._position = { + line: 1, + column: 0 + }; + this._sourcePosition = { + identifierName: null, + line: null, + column: null, + filename: null + }; + this._disallowedPop = null; + this._map = e; + } + get() { + this._flush(); + const e = this._map; + const t = { + code: this._buf.trimRight(), + map: null, + rawMappings: null == e ? void 0 : e.getRawMappings() + }; + e && Object.defineProperty(t, "map", { + configurable: !0, + enumerable: !0, + get() { + return this.map = e.get(); + }, + set(e) { + Object.defineProperty(this, "map", { + value: e, + writable: !0 + }); + } + }); + return t; + } + append(e) { + this._flush(); + const {line: t, column: n, filename: r, identifierName: i, force: s} = this._sourcePosition; + this._append(e, t, n, i, r, s); + } + queue(e) { + if ("\n" === e) for (;this._queue.length > 0 && r.test(this._queue[0][0]); ) this._queue.shift(); + const {line: t, column: n, filename: i, identifierName: s, force: a} = this._sourcePosition; + this._queue.unshift([ e, t, n, s, i, a ]); + } + _flush() { + let e; + for (;e = this._queue.pop(); ) this._append(...e); + } + _append(e, t, n, r, i, s) { + this._buf += e; + this._last = e.charCodeAt(e.length - 1); + let a = e.indexOf("\n"); + let o = 0; + 0 !== a && this._mark(t, n, r, i, s); + for (;-1 !== a; ) { + this._position.line++; + this._position.column = 0; + (o = a + 1) < e.length && this._mark(++t, 0, r, i, s); + a = e.indexOf("\n", o); + } + this._position.column += e.length - o; + } + _mark(e, t, n, r, i) { + var s; + null == (s = this._map) || s.mark(this._position.line, this._position.column, e, t, n, r, i); + } + removeTrailingNewline() { + this._queue.length > 0 && "\n" === this._queue[0][0] && this._queue.shift(); + } + removeLastSemicolon() { + this._queue.length > 0 && ";" === this._queue[0][0] && this._queue.shift(); + } + getLastChar() { + let e; + return e = this._queue.length > 0 ? this._queue[0][0].charCodeAt(0) : this._last; + } + endsWithCharAndNewline() { + const e = this._queue; + if (e.length > 0) { + if (10 !== e[0][0].charCodeAt(0)) return; + return e.length > 1 ? e[1][0].charCodeAt(0) : this._last; + } + } + hasContent() { + return this._queue.length > 0 || !!this._last; + } + exactSource(e, t) { + this.source("start", e, !0); + t(); + this.source("end", e); + this._disallowPop("start", e); + } + source(e, t, n) { + e && !t || this._normalizePosition(e, t, this._sourcePosition, n); + } + withSource(e, t, n) { + if (!this._map) return n(); + const r = this._sourcePosition.line; + const i = this._sourcePosition.column; + const s = this._sourcePosition.filename; + const a = this._sourcePosition.identifierName; + this.source(e, t); + n(); + if (!(this._sourcePosition.force && this._sourcePosition.line === r && this._sourcePosition.column === i && this._sourcePosition.filename === s || this._disallowedPop && this._disallowedPop.line === r && this._disallowedPop.column === i && this._disallowedPop.filename === s)) { + this._sourcePosition.line = r; + this._sourcePosition.column = i; + this._sourcePosition.filename = s; + this._sourcePosition.identifierName = a; + this._sourcePosition.force = !1; + this._disallowedPop = null; + } + } + _disallowPop(e, t) { + e && !t || (this._disallowedPop = this._normalizePosition(e, t)); + } + _normalizePosition(e, t, n, r) { + const i = t ? t[e] : null; + void 0 === n && (n = { + identifierName: null, + line: null, + column: null, + filename: null, + force: !1 + }); + const s = n.line; + const a = n.column; + const o = n.filename; + n.identifierName = "start" === e && (null == t ? void 0 : t.identifierName) || null; + n.line = null == i ? void 0 : i.line; + n.column = null == i ? void 0 : i.column; + n.filename = null == t ? void 0 : t.filename; + (r || n.line !== s || n.column !== a || n.filename !== o) && (n.force = r); + return n; + } + getCurrentColumn() { + const e = this._queue.reduce((e, t) => t[0] + e, ""); + const t = e.lastIndexOf("\n"); + return -1 === t ? this._position.column + e.length : e.length - 1 - t; + } + getCurrentLine() { + const e = this._queue.reduce((e, t) => t[0] + e, ""); + let t = 0; + for (let n = 0; n < e.length; n++) "\n" === e[n] && t++; + return this._position.line + t; + } + }; + }, {} ], + 4: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.File = function(e) { + e.program && this.print(e.program.interpreter, e); + this.print(e.program, e); + }; + n.Program = function(e) { + this.printInnerComments(e, !1); + this.printSequence(e.directives, e); + e.directives && e.directives.length && this.newline(); + this.printSequence(e.body, e); + }; + n.BlockStatement = function(e) { + var t; + this.token("{"); + this.printInnerComments(e); + const n = null == (t = e.directives) ? void 0 : t.length; + if (e.body.length || n) { + this.newline(); + this.printSequence(e.directives, e, { + indent: !0 + }); + n && this.newline(); + this.printSequence(e.body, e, { + indent: !0 + }); + this.removeTrailingNewline(); + this.source("end", e.loc); + this.endsWith(10) || this.newline(); + this.rightBrace(); + } else { + this.source("end", e.loc); + this.token("}"); + } + }; + n.Directive = function(e) { + this.print(e.value, e); + this.semicolon(); + }; + n.DirectiveLiteral = function(e) { + const t = this.getPossibleRaw(e); + if (null != t) { + this.token(t); + return; + } + const {value: n} = e; + if (i.test(n)) { + if (r.test(n)) throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes."); + this.token(`'${n}'`); + } else this.token(`"${n}"`); + }; + n.InterpreterDirective = function(e) { + this.token(`#!${e.value}\n`); + }; + n.Placeholder = function(e) { + this.token("%%"); + this.print(e.name); + this.token("%%"); + "Statement" === e.expectedNode && this.semicolon(); + }; + const r = /(?:^|[^\\])(?:\\\\)*'/; + const i = /(?:^|[^\\])(?:\\\\)*"/; + }, {} ], + 5: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.ClassExpression = n.ClassDeclaration = function(e, t) { + this.format.decoratorsBeforeExport && (i(t) || s(t)) || this.printJoin(e.decorators, e); + if (e.declare) { + this.word("declare"); + this.space(); + } + if (e.abstract) { + this.word("abstract"); + this.space(); + } + this.word("class"); + if (e.id) { + this.space(); + this.print(e.id, e); + } + this.print(e.typeParameters, e); + if (e.superClass) { + this.space(); + this.word("extends"); + this.space(); + this.print(e.superClass, e); + this.print(e.superTypeParameters, e); + } + if (e.implements) { + this.space(); + this.word("implements"); + this.space(); + this.printList(e.implements, e); + } + this.space(); + this.print(e.body, e); + }; + n.ClassBody = function(e) { + this.token("{"); + this.printInnerComments(e); + if (0 === e.body.length) this.token("}"); else { + this.newline(); + this.indent(); + this.printSequence(e.body, e); + this.dedent(); + this.endsWith(10) || this.newline(); + this.rightBrace(); + } + }; + n.ClassProperty = function(e) { + this.printJoin(e.decorators, e); + this.source("end", e.key.loc); + this.tsPrintClassMemberModifiers(e, !0); + if (e.computed) { + this.token("["); + this.print(e.key, e); + this.token("]"); + } else { + this._variance(e); + this.print(e.key, e); + } + e.optional && this.token("?"); + e.definite && this.token("!"); + this.print(e.typeAnnotation, e); + if (e.value) { + this.space(); + this.token("="); + this.space(); + this.print(e.value, e); + } + this.semicolon(); + }; + n.ClassPrivateProperty = function(e) { + this.printJoin(e.decorators, e); + if (e.static) { + this.word("static"); + this.space(); + } + this.print(e.key, e); + this.print(e.typeAnnotation, e); + if (e.value) { + this.space(); + this.token("="); + this.space(); + this.print(e.value, e); + } + this.semicolon(); + }; + n.ClassMethod = function(e) { + this._classMethodHead(e); + this.space(); + this.print(e.body, e); + }; + n.ClassPrivateMethod = function(e) { + this._classMethodHead(e); + this.space(); + this.print(e.body, e); + }; + n._classMethodHead = function(e) { + this.printJoin(e.decorators, e); + this.source("end", e.key.loc); + this.tsPrintClassMemberModifiers(e, !1); + this._methodHead(e); + }; + n.StaticBlock = function(e) { + this.word("static"); + this.space(); + this.token("{"); + if (0 === e.body.length) this.token("}"); else { + this.newline(); + this.printSequence(e.body, e, { + indent: !0 + }); + this.rightBrace(); + } + }; + var r = e("@babel/types"); + const {isExportDefaultDeclaration: i, isExportNamedDeclaration: s} = r; + }, { + "@babel/types": 108 + } ], + 6: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.UnaryExpression = function(e) { + if ("void" === e.operator || "delete" === e.operator || "typeof" === e.operator || "throw" === e.operator) { + this.word(e.operator); + this.space(); + } else this.token(e.operator); + this.print(e.argument, e); + }; + n.DoExpression = function(e) { + if (e.async) { + this.word("async"); + this.space(); + } + this.word("do"); + this.space(); + this.print(e.body, e); + }; + n.ParenthesizedExpression = function(e) { + this.token("("); + this.print(e.expression, e); + this.token(")"); + }; + n.UpdateExpression = function(e) { + if (e.prefix) { + this.token(e.operator); + this.print(e.argument, e); + } else { + this.startTerminatorless(!0); + this.print(e.argument, e); + this.endTerminatorless(); + this.token(e.operator); + } + }; + n.ConditionalExpression = function(e) { + this.print(e.test, e); + this.space(); + this.token("?"); + this.space(); + this.print(e.consequent, e); + this.space(); + this.token(":"); + this.space(); + this.print(e.alternate, e); + }; + n.NewExpression = function(e, t) { + this.word("new"); + this.space(); + this.print(e.callee, e); + if (this.format.minified && 0 === e.arguments.length && !e.optional && !s(t, { + callee: e + }) && !o(t) && !l(t)) return; + this.print(e.typeArguments, e); + this.print(e.typeParameters, e); + e.optional && this.token("?."); + this.token("("); + this.printList(e.arguments, e); + this.token(")"); + }; + n.SequenceExpression = function(e) { + this.printList(e.expressions, e); + }; + n.ThisExpression = function() { + this.word("this"); + }; + n.Super = function() { + this.word("super"); + }; + n.Decorator = function(e) { + this.token("@"); + this.print(e.expression, e); + this.newline(); + }; + n.OptionalMemberExpression = function(e) { + this.print(e.object, e); + if (!e.computed && o(e.property)) throw new TypeError("Got a MemberExpression for MemberExpression property"); + let t = e.computed; + a(e.property) && "number" == typeof e.property.value && (t = !0); + e.optional && this.token("?."); + if (t) { + this.token("["); + this.print(e.property, e); + this.token("]"); + } else { + e.optional || this.token("."); + this.print(e.property, e); + } + }; + n.OptionalCallExpression = function(e) { + this.print(e.callee, e); + this.print(e.typeArguments, e); + this.print(e.typeParameters, e); + e.optional && this.token("?."); + this.token("("); + this.printList(e.arguments, e); + this.token(")"); + }; + n.CallExpression = function(e) { + this.print(e.callee, e); + this.print(e.typeArguments, e); + this.print(e.typeParameters, e); + this.token("("); + this.printList(e.arguments, e); + this.token(")"); + }; + n.Import = function() { + this.word("import"); + }; + n.EmptyStatement = function() { + this.semicolon(!0); + }; + n.ExpressionStatement = function(e) { + this.print(e.expression, e); + this.semicolon(); + }; + n.AssignmentPattern = function(e) { + this.print(e.left, e); + e.left.optional && this.token("?"); + this.print(e.left.typeAnnotation, e); + this.space(); + this.token("="); + this.space(); + this.print(e.right, e); + }; + n.LogicalExpression = n.BinaryExpression = n.AssignmentExpression = function(e, t) { + const n = this.inForStatementInitCounter && "in" === e.operator && !i.needsParens(e, t); + n && this.token("("); + this.print(e.left, e); + this.space(); + "in" === e.operator || "instanceof" === e.operator ? this.word(e.operator) : this.token(e.operator); + this.space(); + this.print(e.right, e); + n && this.token(")"); + }; + n.BindExpression = function(e) { + this.print(e.object, e); + this.token("::"); + this.print(e.callee, e); + }; + n.MemberExpression = function(e) { + this.print(e.object, e); + if (!e.computed && o(e.property)) throw new TypeError("Got a MemberExpression for MemberExpression property"); + let t = e.computed; + a(e.property) && "number" == typeof e.property.value && (t = !0); + if (t) { + this.token("["); + this.print(e.property, e); + this.token("]"); + } else { + this.token("."); + this.print(e.property, e); + } + }; + n.MetaProperty = function(e) { + this.print(e.meta, e); + this.token("."); + this.print(e.property, e); + }; + n.PrivateName = function(e) { + this.token("#"); + this.print(e.id, e); + }; + n.V8IntrinsicIdentifier = function(e) { + this.token("%"); + this.word(e.name); + }; + n.ModuleExpression = function(e) { + this.word("module"); + this.space(); + this.token("{"); + if (0 === e.body.body.length) this.token("}"); else { + this.newline(); + this.printSequence(e.body.body, e, { + indent: !0 + }); + this.rightBrace(); + } + }; + n.AwaitExpression = n.YieldExpression = void 0; + r = e("@babel/types"); + i = e("../node"); + const {isCallExpression: s, isLiteral: a, isMemberExpression: o, isNewExpression: l} = r; + function c(e) { + return function(t) { + this.word(e); + t.delegate && this.token("*"); + if (t.argument) { + this.space(); + const e = this.startTerminatorless(); + this.print(t.argument, t); + this.endTerminatorless(e); + } + }; + } + const p = c("yield"); + n.YieldExpression = p; + const u = c("await"); + n.AwaitExpression = u; + }, { + "../node": 17, + "@babel/types": 108 + } ], + 7: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.AnyTypeAnnotation = function() { + this.word("any"); + }; + n.ArrayTypeAnnotation = function(e) { + this.print(e.elementType, e); + this.token("["); + this.token("]"); + }; + n.BooleanTypeAnnotation = function() { + this.word("boolean"); + }; + n.BooleanLiteralTypeAnnotation = function(e) { + this.word(e.value ? "true" : "false"); + }; + n.NullLiteralTypeAnnotation = function() { + this.word("null"); + }; + n.DeclareClass = function(e, t) { + if (!a(t)) { + this.word("declare"); + this.space(); + } + this.word("class"); + this.space(); + this._interfaceish(e); + }; + n.DeclareFunction = function(e, t) { + if (!a(t)) { + this.word("declare"); + this.space(); + } + this.word("function"); + this.space(); + this.print(e.id, e); + this.print(e.id.typeAnnotation.typeAnnotation, e); + if (e.predicate) { + this.space(); + this.print(e.predicate, e); + } + this.semicolon(); + }; + n.InferredPredicate = function() { + this.token("%"); + this.word("checks"); + }; + n.DeclaredPredicate = function(e) { + this.token("%"); + this.word("checks"); + this.token("("); + this.print(e.value, e); + this.token(")"); + }; + n.DeclareInterface = function(e) { + this.word("declare"); + this.space(); + this.InterfaceDeclaration(e); + }; + n.DeclareModule = function(e) { + this.word("declare"); + this.space(); + this.word("module"); + this.space(); + this.print(e.id, e); + this.space(); + this.print(e.body, e); + }; + n.DeclareModuleExports = function(e) { + this.word("declare"); + this.space(); + this.word("module"); + this.token("."); + this.word("exports"); + this.print(e.typeAnnotation, e); + }; + n.DeclareTypeAlias = function(e) { + this.word("declare"); + this.space(); + this.TypeAlias(e); + }; + n.DeclareOpaqueType = function(e, t) { + if (!a(t)) { + this.word("declare"); + this.space(); + } + this.OpaqueType(e); + }; + n.DeclareVariable = function(e, t) { + if (!a(t)) { + this.word("declare"); + this.space(); + } + this.word("var"); + this.space(); + this.print(e.id, e); + this.print(e.id.typeAnnotation, e); + this.semicolon(); + }; + n.DeclareExportDeclaration = function(e) { + this.word("declare"); + this.space(); + this.word("export"); + this.space(); + if (e.default) { + this.word("default"); + this.space(); + } + (function(e) { + if (e.declaration) { + const t = e.declaration; + this.print(t, e); + o(t) || this.semicolon(); + } else { + this.token("{"); + if (e.specifiers.length) { + this.space(); + this.printList(e.specifiers, e); + this.space(); + } + this.token("}"); + if (e.source) { + this.space(); + this.word("from"); + this.space(); + this.print(e.source, e); + } + this.semicolon(); + } + }).apply(this, arguments); + }; + n.DeclareExportAllDeclaration = function() { + this.word("declare"); + this.space(); + i.ExportAllDeclaration.apply(this, arguments); + }; + n.EnumDeclaration = function(e) { + const {id: t, body: n} = e; + this.word("enum"); + this.space(); + this.print(t, e); + this.print(n, e); + }; + n.EnumBooleanBody = function(e) { + const {explicitType: t} = e; + l(this, "boolean", t); + c(this, e); + }; + n.EnumNumberBody = function(e) { + const {explicitType: t} = e; + l(this, "number", t); + c(this, e); + }; + n.EnumStringBody = function(e) { + const {explicitType: t} = e; + l(this, "string", t); + c(this, e); + }; + n.EnumSymbolBody = function(e) { + l(this, "symbol", !0); + c(this, e); + }; + n.EnumDefaultedMember = function(e) { + const {id: t} = e; + this.print(t, e); + this.token(","); + }; + n.EnumBooleanMember = function(e) { + p(this, e); + }; + n.EnumNumberMember = function(e) { + p(this, e); + }; + n.EnumStringMember = function(e) { + p(this, e); + }; + n.ExistsTypeAnnotation = function() { + this.token("*"); + }; + n.FunctionTypeAnnotation = function(e, t) { + this.print(e.typeParameters, e); + this.token("("); + if (e.this) { + this.word("this"); + this.token(":"); + this.space(); + this.print(e.this.typeAnnotation, e); + if (e.params.length || e.rest) { + this.token(","); + this.space(); + } + } + this.printList(e.params, e); + if (e.rest) { + if (e.params.length) { + this.token(","); + this.space(); + } + this.token("..."); + this.print(e.rest, e); + } + this.token(")"); + if ("ObjectTypeCallProperty" === t.type || "DeclareFunction" === t.type || "ObjectTypeProperty" === t.type && t.method) this.token(":"); else { + this.space(); + this.token("=>"); + } + this.space(); + this.print(e.returnType, e); + }; + n.FunctionTypeParam = function(e) { + this.print(e.name, e); + e.optional && this.token("?"); + if (e.name) { + this.token(":"); + this.space(); + } + this.print(e.typeAnnotation, e); + }; + n.GenericTypeAnnotation = n.ClassImplements = n.InterfaceExtends = function(e) { + this.print(e.id, e); + this.print(e.typeParameters, e); + }; + n._interfaceish = function(e) { + var t; + this.print(e.id, e); + this.print(e.typeParameters, e); + if (null != (t = e.extends) && t.length) { + this.space(); + this.word("extends"); + this.space(); + this.printList(e.extends, e); + } + if (e.mixins && e.mixins.length) { + this.space(); + this.word("mixins"); + this.space(); + this.printList(e.mixins, e); + } + if (e.implements && e.implements.length) { + this.space(); + this.word("implements"); + this.space(); + this.printList(e.implements, e); + } + this.space(); + this.print(e.body, e); + }; + n._variance = function(e) { + e.variance && ("plus" === e.variance.kind ? this.token("+") : "minus" === e.variance.kind && this.token("-")); + }; + n.InterfaceDeclaration = function(e) { + this.word("interface"); + this.space(); + this._interfaceish(e); + }; + n.InterfaceTypeAnnotation = function(e) { + this.word("interface"); + if (e.extends && e.extends.length) { + this.space(); + this.word("extends"); + this.space(); + this.printList(e.extends, e); + } + this.space(); + this.print(e.body, e); + }; + n.IntersectionTypeAnnotation = function(e) { + this.printJoin(e.types, e, { + separator: u + }); + }; + n.MixedTypeAnnotation = function() { + this.word("mixed"); + }; + n.EmptyTypeAnnotation = function() { + this.word("empty"); + }; + n.NullableTypeAnnotation = function(e) { + this.token("?"); + this.print(e.typeAnnotation, e); + }; + n.NumberTypeAnnotation = function() { + this.word("number"); + }; + n.StringTypeAnnotation = function() { + this.word("string"); + }; + n.ThisTypeAnnotation = function() { + this.word("this"); + }; + n.TupleTypeAnnotation = function(e) { + this.token("["); + this.printList(e.types, e); + this.token("]"); + }; + n.TypeofTypeAnnotation = function(e) { + this.word("typeof"); + this.space(); + this.print(e.argument, e); + }; + n.TypeAlias = function(e) { + this.word("type"); + this.space(); + this.print(e.id, e); + this.print(e.typeParameters, e); + this.space(); + this.token("="); + this.space(); + this.print(e.right, e); + this.semicolon(); + }; + n.TypeAnnotation = function(e) { + this.token(":"); + this.space(); + e.optional && this.token("?"); + this.print(e.typeAnnotation, e); + }; + n.TypeParameterDeclaration = n.TypeParameterInstantiation = function(e) { + this.token("<"); + this.printList(e.params, e, {}); + this.token(">"); + }; + n.TypeParameter = function(e) { + this._variance(e); + this.word(e.name); + e.bound && this.print(e.bound, e); + if (e.default) { + this.space(); + this.token("="); + this.space(); + this.print(e.default, e); + } + }; + n.OpaqueType = function(e) { + this.word("opaque"); + this.space(); + this.word("type"); + this.space(); + this.print(e.id, e); + this.print(e.typeParameters, e); + if (e.supertype) { + this.token(":"); + this.space(); + this.print(e.supertype, e); + } + if (e.impltype) { + this.space(); + this.token("="); + this.space(); + this.print(e.impltype, e); + } + this.semicolon(); + }; + n.ObjectTypeAnnotation = function(e) { + e.exact ? this.token("{|") : this.token("{"); + const t = [ ...e.properties, ...e.callProperties || [], ...e.indexers || [], ...e.internalSlots || [] ]; + if (t.length) { + this.space(); + this.printJoin(t, e, { + addNewlines(e) { + if (e && !t[0]) return 1; + }, + indent: !0, + statement: !0, + iterator: () => { + if (1 !== t.length || e.inexact) { + this.token(","); + this.space(); + } + } + }); + this.space(); + } + if (e.inexact) { + this.indent(); + this.token("..."); + t.length && this.newline(); + this.dedent(); + } + e.exact ? this.token("|}") : this.token("}"); + }; + n.ObjectTypeInternalSlot = function(e) { + if (e.static) { + this.word("static"); + this.space(); + } + this.token("["); + this.token("["); + this.print(e.id, e); + this.token("]"); + this.token("]"); + e.optional && this.token("?"); + if (!e.method) { + this.token(":"); + this.space(); + } + this.print(e.value, e); + }; + n.ObjectTypeCallProperty = function(e) { + if (e.static) { + this.word("static"); + this.space(); + } + this.print(e.value, e); + }; + n.ObjectTypeIndexer = function(e) { + if (e.static) { + this.word("static"); + this.space(); + } + this._variance(e); + this.token("["); + if (e.id) { + this.print(e.id, e); + this.token(":"); + this.space(); + } + this.print(e.key, e); + this.token("]"); + this.token(":"); + this.space(); + this.print(e.value, e); + }; + n.ObjectTypeProperty = function(e) { + if (e.proto) { + this.word("proto"); + this.space(); + } + if (e.static) { + this.word("static"); + this.space(); + } + if ("get" === e.kind || "set" === e.kind) { + this.word(e.kind); + this.space(); + } + this._variance(e); + this.print(e.key, e); + e.optional && this.token("?"); + if (!e.method) { + this.token(":"); + this.space(); + } + this.print(e.value, e); + }; + n.ObjectTypeSpreadProperty = function(e) { + this.token("..."); + this.print(e.argument, e); + }; + n.QualifiedTypeIdentifier = function(e) { + this.print(e.qualification, e); + this.token("."); + this.print(e.id, e); + }; + n.SymbolTypeAnnotation = function() { + this.word("symbol"); + }; + n.UnionTypeAnnotation = function(e) { + this.printJoin(e.types, e, { + separator: d + }); + }; + n.TypeCastExpression = function(e) { + this.token("("); + this.print(e.expression, e); + this.print(e.typeAnnotation, e); + this.token(")"); + }; + n.Variance = function(e) { + "plus" === e.kind ? this.token("+") : this.token("-"); + }; + n.VoidTypeAnnotation = function() { + this.word("void"); + }; + n.IndexedAccessType = function(e) { + this.print(e.objectType, e); + this.token("["); + this.print(e.indexType, e); + this.token("]"); + }; + n.OptionalIndexedAccessType = function(e) { + this.print(e.objectType, e); + e.optional && this.token("?."); + this.token("["); + this.print(e.indexType, e); + this.token("]"); + }; + Object.defineProperty(n, "NumberLiteralTypeAnnotation", { + enumerable: !0, + get: function() { + return s.NumericLiteral; + } + }); + Object.defineProperty(n, "StringLiteralTypeAnnotation", { + enumerable: !0, + get: function() { + return s.StringLiteral; + } + }); + r = e("@babel/types"); + i = e("./modules"); + s = e("./types"); + const {isDeclareExportDeclaration: a, isStatement: o} = r; + function l(e, t, n) { + if (n) { + e.space(); + e.word("of"); + e.space(); + e.word(t); + } + e.space(); + } + function c(e, t) { + const {members: n} = t; + e.token("{"); + e.indent(); + e.newline(); + for (const r of n) { + e.print(r, t); + e.newline(); + } + if (t.hasUnknownMembers) { + e.token("..."); + e.newline(); + } + e.dedent(); + e.token("}"); + } + function p(e, t) { + const {id: n, init: r} = t; + e.print(n, t); + e.space(); + e.token("="); + e.space(); + e.print(r, t); + e.token(","); + } + function u() { + this.space(); + this.token("&"); + this.space(); + } + function d() { + this.space(); + this.token("|"); + this.space(); + } + }, { + "./modules": 11, + "./types": 14, + "@babel/types": 108 + } ], + 8: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o, l, c, p, u, d, h; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + r = e("./template-literals"); + Object.keys(r).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === r[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return r[e]; + } + })); + }); + i = e("./expressions"); + Object.keys(i).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === i[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return i[e]; + } + })); + }); + s = e("./statements"); + Object.keys(s).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === s[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return s[e]; + } + })); + }); + a = e("./classes"); + Object.keys(a).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === a[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return a[e]; + } + })); + }); + o = e("./methods"); + Object.keys(o).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === o[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return o[e]; + } + })); + }); + l = e("./modules"); + Object.keys(l).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === l[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return l[e]; + } + })); + }); + c = e("./types"); + Object.keys(c).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === c[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return c[e]; + } + })); + }); + p = e("./flow"); + Object.keys(p).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === p[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return p[e]; + } + })); + }); + u = e("./base"); + Object.keys(u).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === u[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return u[e]; + } + })); + }); + d = e("./jsx"); + Object.keys(d).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === d[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return d[e]; + } + })); + }); + h = e("./typescript"); + Object.keys(h).forEach(function(e) { + "default" !== e && "__esModule" !== e && (e in n && n[e] === h[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return h[e]; + } + })); + }); + }, { + "./base": 4, + "./classes": 5, + "./expressions": 6, + "./flow": 7, + "./jsx": 9, + "./methods": 10, + "./modules": 11, + "./statements": 12, + "./template-literals": 13, + "./types": 14, + "./typescript": 15 + } ], + 9: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.JSXAttribute = function(e) { + this.print(e.name, e); + if (e.value) { + this.token("="); + this.print(e.value, e); + } + }; + n.JSXIdentifier = function(e) { + this.word(e.name); + }; + n.JSXNamespacedName = function(e) { + this.print(e.namespace, e); + this.token(":"); + this.print(e.name, e); + }; + n.JSXMemberExpression = function(e) { + this.print(e.object, e); + this.token("."); + this.print(e.property, e); + }; + n.JSXSpreadAttribute = function(e) { + this.token("{"); + this.token("..."); + this.print(e.argument, e); + this.token("}"); + }; + n.JSXExpressionContainer = function(e) { + this.token("{"); + this.print(e.expression, e); + this.token("}"); + }; + n.JSXSpreadChild = function(e) { + this.token("{"); + this.token("..."); + this.print(e.expression, e); + this.token("}"); + }; + n.JSXText = function(e) { + const t = this.getPossibleRaw(e); + null != t ? this.token(t) : this.token(e.value); + }; + n.JSXElement = function(e) { + const t = e.openingElement; + this.print(t, e); + if (t.selfClosing) return; + this.indent(); + for (const t of e.children) this.print(t, e); + this.dedent(); + this.print(e.closingElement, e); + }; + n.JSXOpeningElement = function(e) { + this.token("<"); + this.print(e.name, e); + this.print(e.typeParameters, e); + if (e.attributes.length > 0) { + this.space(); + this.printJoin(e.attributes, e, { + separator: r + }); + } + if (e.selfClosing) { + this.space(); + this.token("/>"); + } else this.token(">"); + }; + n.JSXClosingElement = function(e) { + this.token(""); + }; + n.JSXEmptyExpression = function(e) { + this.printInnerComments(e); + }; + n.JSXFragment = function(e) { + this.print(e.openingFragment, e); + this.indent(); + for (const t of e.children) this.print(t, e); + this.dedent(); + this.print(e.closingFragment, e); + }; + n.JSXOpeningFragment = function() { + this.token("<"); + this.token(">"); + }; + n.JSXClosingFragment = function() { + this.token(""); + }; + function r() { + this.space(); + } + }, {} ], + 10: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n._params = function(e) { + this.print(e.typeParameters, e); + this.token("("); + this._parameters(e.params, e); + this.token(")"); + this.print(e.returnType, e); + }; + n._parameters = function(e, t) { + for (let n = 0; n < e.length; n++) { + this._param(e[n], t); + if (n < e.length - 1) { + this.token(","); + this.space(); + } + } + }; + n._param = function(e, t) { + this.printJoin(e.decorators, e); + this.print(e, t); + e.optional && this.token("?"); + this.print(e.typeAnnotation, e); + }; + n._methodHead = function(e) { + const t = e.kind; + const n = e.key; + if ("get" === t || "set" === t) { + this.word(t); + this.space(); + } + if (e.async) { + this._catchUp("start", n.loc); + this.word("async"); + this.space(); + } + "method" !== t && "init" !== t || e.generator && this.token("*"); + if (e.computed) { + this.token("["); + this.print(n, e); + this.token("]"); + } else this.print(n, e); + e.optional && this.token("?"); + this._params(e); + }; + n._predicate = function(e) { + if (e.predicate) { + e.returnType || this.token(":"); + this.space(); + this.print(e.predicate, e); + } + }; + n._functionHead = function(e) { + if (e.async) { + this.word("async"); + this.space(); + } + this.word("function"); + e.generator && this.token("*"); + this.space(); + e.id && this.print(e.id, e); + this._params(e); + this._predicate(e); + }; + n.FunctionDeclaration = n.FunctionExpression = function(e) { + this._functionHead(e); + this.space(); + this.print(e.body, e); + }; + n.ArrowFunctionExpression = function(e) { + if (e.async) { + this.word("async"); + this.space(); + } + const t = e.params[0]; + this.format.retainLines || this.format.auxiliaryCommentBefore || this.format.auxiliaryCommentAfter || 1 !== e.params.length || !i(t) || function(e, t) { + var n, r; + return !!(e.typeParameters || e.returnType || e.predicate || t.typeAnnotation || t.optional || null != (n = t.leadingComments) && n.length || null != (r = t.trailingComments) && r.length); + }(e, t) ? this._params(e) : this.print(t, e); + this._predicate(e); + this.space(); + this.token("=>"); + this.space(); + this.print(e.body, e); + }; + var r = e("@babel/types"); + const {isIdentifier: i} = r; + }, { + "@babel/types": 108 + } ], + 11: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.ImportSpecifier = function(e) { + if ("type" === e.importKind || "typeof" === e.importKind) { + this.word(e.importKind); + this.space(); + } + this.print(e.imported, e); + if (e.local && e.local.name !== e.imported.name) { + this.space(); + this.word("as"); + this.space(); + this.print(e.local, e); + } + }; + n.ImportDefaultSpecifier = function(e) { + this.print(e.local, e); + }; + n.ExportDefaultSpecifier = function(e) { + this.print(e.exported, e); + }; + n.ExportSpecifier = function(e) { + this.print(e.local, e); + if (e.exported && e.local.name !== e.exported.name) { + this.space(); + this.word("as"); + this.space(); + this.print(e.exported, e); + } + }; + n.ExportNamespaceSpecifier = function(e) { + this.token("*"); + this.space(); + this.word("as"); + this.space(); + this.print(e.exported, e); + }; + n.ExportAllDeclaration = function(e) { + this.word("export"); + this.space(); + if ("type" === e.exportKind) { + this.word("type"); + this.space(); + } + this.token("*"); + this.space(); + this.word("from"); + this.space(); + this.print(e.source, e); + this.printAssertions(e); + this.semicolon(); + }; + n.ExportNamedDeclaration = function(e) { + this.format.decoratorsBeforeExport && i(e.declaration) && this.printJoin(e.declaration.decorators, e); + this.word("export"); + this.space(); + p.apply(this, arguments); + }; + n.ExportDefaultDeclaration = function(e) { + this.format.decoratorsBeforeExport && i(e.declaration) && this.printJoin(e.declaration.decorators, e); + this.word("export"); + this.space(); + this.word("default"); + this.space(); + p.apply(this, arguments); + }; + n.ImportDeclaration = function(e) { + this.word("import"); + this.space(); + if ("type" === e.importKind || "typeof" === e.importKind) { + this.word(e.importKind); + this.space(); + } + const t = e.specifiers.slice(0); + if (null != t && t.length) { + for (;;) { + const n = t[0]; + if (!o(n) && !l(n)) break; + this.print(t.shift(), e); + if (t.length) { + this.token(","); + this.space(); + } + } + if (t.length) { + this.token("{"); + this.space(); + this.printList(t, e); + this.space(); + this.token("}"); + } + this.space(); + this.word("from"); + this.space(); + } + this.print(e.source, e); + this.printAssertions(e); + var n; + if (null != (n = e.attributes) && n.length) { + this.space(); + this.word("with"); + this.space(); + this.printList(e.attributes, e); + } + this.semicolon(); + }; + n.ImportAttribute = function(e) { + this.print(e.key); + this.token(":"); + this.space(); + this.print(e.value); + }; + n.ImportNamespaceSpecifier = function(e) { + this.token("*"); + this.space(); + this.word("as"); + this.space(); + this.print(e.local, e); + }; + var r = e("@babel/types"); + const {isClassDeclaration: i, isExportDefaultSpecifier: s, isExportNamespaceSpecifier: a, isImportDefaultSpecifier: o, isImportNamespaceSpecifier: l, isStatement: c} = r; + function p(e) { + if (e.declaration) { + const t = e.declaration; + this.print(t, e); + c(t) || this.semicolon(); + } else { + if ("type" === e.exportKind) { + this.word("type"); + this.space(); + } + const t = e.specifiers.slice(0); + let n = !1; + for (;;) { + const r = t[0]; + if (!s(r) && !a(r)) break; + n = !0; + this.print(t.shift(), e); + if (t.length) { + this.token(","); + this.space(); + } + } + if (t.length || !t.length && !n) { + this.token("{"); + if (t.length) { + this.space(); + this.printList(t, e); + this.space(); + } + this.token("}"); + } + if (e.source) { + this.space(); + this.word("from"); + this.space(); + this.print(e.source, e); + this.printAssertions(e); + } + this.semicolon(); + } + } + }, { + "@babel/types": 108 + } ], + 12: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.WithStatement = function(e) { + this.word("with"); + this.space(); + this.token("("); + this.print(e.object, e); + this.token(")"); + this.printBlock(e); + }; + n.IfStatement = function(e) { + this.word("if"); + this.space(); + this.token("("); + this.print(e.test, e); + this.token(")"); + this.space(); + const t = e.alternate && a(function e(t) { + if (!o(t.body)) return t; + return e(t.body); + }(e.consequent)); + if (t) { + this.token("{"); + this.newline(); + this.indent(); + } + this.printAndIndentOnComments(e.consequent, e); + if (t) { + this.dedent(); + this.newline(); + this.token("}"); + } + if (e.alternate) { + this.endsWith(125) && this.space(); + this.word("else"); + this.space(); + this.printAndIndentOnComments(e.alternate, e); + } + }; + n.ForStatement = function(e) { + this.word("for"); + this.space(); + this.token("("); + this.inForStatementInitCounter++; + this.print(e.init, e); + this.inForStatementInitCounter--; + this.token(";"); + if (e.test) { + this.space(); + this.print(e.test, e); + } + this.token(";"); + if (e.update) { + this.space(); + this.print(e.update, e); + } + this.token(")"); + this.printBlock(e); + }; + n.WhileStatement = function(e) { + this.word("while"); + this.space(); + this.token("("); + this.print(e.test, e); + this.token(")"); + this.printBlock(e); + }; + n.DoWhileStatement = function(e) { + this.word("do"); + this.space(); + this.print(e.body, e); + this.space(); + this.word("while"); + this.space(); + this.token("("); + this.print(e.test, e); + this.token(")"); + this.semicolon(); + }; + n.LabeledStatement = function(e) { + this.print(e.label, e); + this.token(":"); + this.space(); + this.print(e.body, e); + }; + n.TryStatement = function(e) { + this.word("try"); + this.space(); + this.print(e.block, e); + this.space(); + e.handlers ? this.print(e.handlers[0], e) : this.print(e.handler, e); + if (e.finalizer) { + this.space(); + this.word("finally"); + this.space(); + this.print(e.finalizer, e); + } + }; + n.CatchClause = function(e) { + this.word("catch"); + this.space(); + if (e.param) { + this.token("("); + this.print(e.param, e); + this.print(e.param.typeAnnotation, e); + this.token(")"); + this.space(); + } + this.print(e.body, e); + }; + n.SwitchStatement = function(e) { + this.word("switch"); + this.space(); + this.token("("); + this.print(e.discriminant, e); + this.token(")"); + this.space(); + this.token("{"); + this.printSequence(e.cases, e, { + indent: !0, + addNewlines(t, n) { + if (!t && e.cases[e.cases.length - 1] === n) return -1; + } + }); + this.token("}"); + }; + n.SwitchCase = function(e) { + if (e.test) { + this.word("case"); + this.space(); + this.print(e.test, e); + this.token(":"); + } else { + this.word("default"); + this.token(":"); + } + if (e.consequent.length) { + this.newline(); + this.printSequence(e.consequent, e, { + indent: !0 + }); + } + }; + n.DebuggerStatement = function() { + this.word("debugger"); + this.semicolon(); + }; + n.VariableDeclaration = function(e, t) { + if (e.declare) { + this.word("declare"); + this.space(); + } + this.word(e.kind); + this.space(); + let n = !1; + if (!i(t)) for (const t of e.declarations) t.init && (n = !0); + let r; + n && (r = "const" === e.kind ? g : y); + this.printList(e.declarations, e, { + separator: r + }); + if (i(t)) if (s(t)) { + if (t.init === e) return; + } else if (t.left === e) return; + this.semicolon(); + }; + n.VariableDeclarator = function(e) { + this.print(e.id, e); + e.definite && this.token("!"); + this.print(e.id.typeAnnotation, e); + if (e.init) { + this.space(); + this.token("="); + this.space(); + this.print(e.init, e); + } + }; + n.ThrowStatement = n.BreakStatement = n.ReturnStatement = n.ContinueStatement = n.ForOfStatement = n.ForInStatement = void 0; + var r = e("@babel/types"); + const {isFor: i, isForStatement: s, isIfStatement: a, isStatement: o} = r; + const l = function(e) { + return function(t) { + this.word("for"); + this.space(); + if ("of" === e && t.await) { + this.word("await"); + this.space(); + } + this.token("("); + this.print(t.left, t); + this.space(); + this.word(e); + this.space(); + this.print(t.right, t); + this.token(")"); + this.printBlock(t); + }; + }; + const c = l("in"); + n.ForInStatement = c; + const p = l("of"); + n.ForOfStatement = p; + function u(e, t = "label") { + return function(n) { + this.word(e); + const r = n[t]; + if (r) { + this.space(); + const e = "label" == t; + const i = this.startTerminatorless(e); + this.print(r, n); + this.endTerminatorless(i); + } + this.semicolon(); + }; + } + const d = u("continue"); + n.ContinueStatement = d; + const h = u("return", "argument"); + n.ReturnStatement = h; + const f = u("break"); + n.BreakStatement = f; + const m = u("throw", "argument"); + n.ThrowStatement = m; + function y() { + this.token(","); + this.newline(); + if (this.endsWith(10)) for (let e = 0; e < 4; e++) this.space(!0); + } + function g() { + this.token(","); + this.newline(); + if (this.endsWith(10)) for (let e = 0; e < 6; e++) this.space(!0); + } + }, { + "@babel/types": 108 + } ], + 13: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.TaggedTemplateExpression = function(e) { + this.print(e.tag, e); + this.print(e.typeParameters, e); + this.print(e.quasi, e); + }; + n.TemplateElement = function(e, t) { + const n = t.quasis[0] === e; + const r = t.quasis[t.quasis.length - 1] === e; + const i = (n ? "`" : "}") + e.value.raw + (r ? "`" : "${"); + this.token(i); + }; + n.TemplateLiteral = function(e) { + const t = e.quasis; + for (let n = 0; n < t.length; n++) { + this.print(t[n], e); + n + 1 < t.length && this.print(e.expressions[n], e); + } + }; + }, {} ], + 14: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.Identifier = function(e) { + this.exactSource(e.loc, () => { + this.word(e.name); + }); + }; + n.ArgumentPlaceholder = function() { + this.token("?"); + }; + n.SpreadElement = n.RestElement = function(e) { + this.token("..."); + this.print(e.argument, e); + }; + n.ObjectPattern = n.ObjectExpression = function(e) { + const t = e.properties; + this.token("{"); + this.printInnerComments(e); + if (t.length) { + this.space(); + this.printList(t, e, { + indent: !0, + statement: !0 + }); + this.space(); + } + this.token("}"); + }; + n.ObjectMethod = function(e) { + this.printJoin(e.decorators, e); + this._methodHead(e); + this.space(); + this.print(e.body, e); + }; + n.ObjectProperty = function(e) { + this.printJoin(e.decorators, e); + if (e.computed) { + this.token("["); + this.print(e.key, e); + this.token("]"); + } else { + if (s(e.value) && a(e.key) && e.key.name === e.value.left.name) { + this.print(e.value, e); + return; + } + this.print(e.key, e); + if (e.shorthand && a(e.key) && a(e.value) && e.key.name === e.value.name) return; + } + this.token(":"); + this.space(); + this.print(e.value, e); + }; + n.ArrayPattern = n.ArrayExpression = function(e) { + const t = e.elements; + const n = t.length; + this.token("["); + this.printInnerComments(e); + for (let r = 0; r < t.length; r++) { + const i = t[r]; + if (i) { + r > 0 && this.space(); + this.print(i, e); + r < n - 1 && this.token(","); + } else this.token(","); + } + this.token("]"); + }; + n.RecordExpression = function(e) { + const t = e.properties; + let n; + let r; + if ("bar" === this.format.recordAndTupleSyntaxType) { + n = "{|"; + r = "|}"; + } else { + if ("hash" !== this.format.recordAndTupleSyntaxType) throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`); + n = "#{"; + r = "}"; + } + this.token(n); + this.printInnerComments(e); + if (t.length) { + this.space(); + this.printList(t, e, { + indent: !0, + statement: !0 + }); + this.space(); + } + this.token(r); + }; + n.TupleExpression = function(e) { + const t = e.elements; + const n = t.length; + let r; + let i; + if ("bar" === this.format.recordAndTupleSyntaxType) { + r = "[|"; + i = "|]"; + } else { + if ("hash" !== this.format.recordAndTupleSyntaxType) throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`); + r = "#["; + i = "]"; + } + this.token(r); + this.printInnerComments(e); + for (let r = 0; r < t.length; r++) { + const i = t[r]; + if (i) { + r > 0 && this.space(); + this.print(i, e); + r < n - 1 && this.token(","); + } + } + this.token(i); + }; + n.RegExpLiteral = function(e) { + this.word(`/${e.pattern}/${e.flags}`); + }; + n.BooleanLiteral = function(e) { + this.word(e.value ? "true" : "false"); + }; + n.NullLiteral = function() { + this.word("null"); + }; + n.NumericLiteral = function(e) { + const t = this.getPossibleRaw(e); + const n = this.format.jsescOption; + const r = e.value + ""; + n.numbers ? this.number(i(e.value, n)) : null == t ? this.number(r) : this.format.minified ? this.number(t.length < r.length ? t : r) : this.number(t); + }; + n.StringLiteral = function(e) { + const t = this.getPossibleRaw(e); + if (!this.format.minified && null != t) { + this.token(t); + return; + } + const n = i(e.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && { + json: !0 + })); + return this.token(n); + }; + n.BigIntLiteral = function(e) { + const t = this.getPossibleRaw(e); + if (!this.format.minified && null != t) { + this.word(t); + return; + } + this.word(e.value + "n"); + }; + n.DecimalLiteral = function(e) { + const t = this.getPossibleRaw(e); + if (!this.format.minified && null != t) { + this.word(t); + return; + } + this.word(e.value + "m"); + }; + n.TopicReference = function() { + const {topicToken: e} = this.format; + switch (e) { + case "#": + this.token("#"); + break; + + default: + { + const t = JSON.stringify(e); + const n = `The "topicToken" generator option must be "#" (${t} received instead).`; + throw new Error(n); + } + } + }; + n.PipelineTopicExpression = function(e) { + this.print(e.expression, e); + }; + n.PipelineBareFunction = function(e) { + this.print(e.callee, e); + }; + n.PipelinePrimaryTopicReference = function() { + this.token("#"); + }; + r = e("@babel/types"); + i = e("jsesc"); + const {isAssignmentPattern: s, isIdentifier: a} = r; + }, { + "@babel/types": 108, + jsesc: 158 + } ], + 15: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.TSTypeAnnotation = function(e) { + this.token(":"); + this.space(); + e.optional && this.token("?"); + this.print(e.typeAnnotation, e); + }; + n.TSTypeParameterDeclaration = n.TSTypeParameterInstantiation = function(e) { + this.token("<"); + this.printList(e.params, e, {}); + this.token(">"); + }; + n.TSTypeParameter = function(e) { + this.word(e.name); + if (e.constraint) { + this.space(); + this.word("extends"); + this.space(); + this.print(e.constraint, e); + } + if (e.default) { + this.space(); + this.token("="); + this.space(); + this.print(e.default, e); + } + }; + n.TSParameterProperty = function(e) { + if (e.accessibility) { + this.word(e.accessibility); + this.space(); + } + if (e.readonly) { + this.word("readonly"); + this.space(); + } + this._param(e.parameter); + }; + n.TSDeclareFunction = function(e) { + if (e.declare) { + this.word("declare"); + this.space(); + } + this._functionHead(e); + this.token(";"); + }; + n.TSDeclareMethod = function(e) { + this._classMethodHead(e); + this.token(";"); + }; + n.TSQualifiedName = function(e) { + this.print(e.left, e); + this.token("."); + this.print(e.right, e); + }; + n.TSCallSignatureDeclaration = function(e) { + this.tsPrintSignatureDeclarationBase(e); + this.token(";"); + }; + n.TSConstructSignatureDeclaration = function(e) { + this.word("new"); + this.space(); + this.tsPrintSignatureDeclarationBase(e); + this.token(";"); + }; + n.TSPropertySignature = function(e) { + const {readonly: t, initializer: n} = e; + if (t) { + this.word("readonly"); + this.space(); + } + this.tsPrintPropertyOrMethodName(e); + this.print(e.typeAnnotation, e); + if (n) { + this.space(); + this.token("="); + this.space(); + this.print(n, e); + } + this.token(";"); + }; + n.tsPrintPropertyOrMethodName = function(e) { + e.computed && this.token("["); + this.print(e.key, e); + e.computed && this.token("]"); + e.optional && this.token("?"); + }; + n.TSMethodSignature = function(e) { + const {kind: t} = e; + if ("set" === t || "get" === t) { + this.word(t); + this.space(); + } + this.tsPrintPropertyOrMethodName(e); + this.tsPrintSignatureDeclarationBase(e); + this.token(";"); + }; + n.TSIndexSignature = function(e) { + const {readonly: t, static: n} = e; + if (n) { + this.word("static"); + this.space(); + } + if (t) { + this.word("readonly"); + this.space(); + } + this.token("["); + this._parameters(e.parameters, e); + this.token("]"); + this.print(e.typeAnnotation, e); + this.token(";"); + }; + n.TSAnyKeyword = function() { + this.word("any"); + }; + n.TSBigIntKeyword = function() { + this.word("bigint"); + }; + n.TSUnknownKeyword = function() { + this.word("unknown"); + }; + n.TSNumberKeyword = function() { + this.word("number"); + }; + n.TSObjectKeyword = function() { + this.word("object"); + }; + n.TSBooleanKeyword = function() { + this.word("boolean"); + }; + n.TSStringKeyword = function() { + this.word("string"); + }; + n.TSSymbolKeyword = function() { + this.word("symbol"); + }; + n.TSVoidKeyword = function() { + this.word("void"); + }; + n.TSUndefinedKeyword = function() { + this.word("undefined"); + }; + n.TSNullKeyword = function() { + this.word("null"); + }; + n.TSNeverKeyword = function() { + this.word("never"); + }; + n.TSIntrinsicKeyword = function() { + this.word("intrinsic"); + }; + n.TSThisType = function() { + this.word("this"); + }; + n.TSFunctionType = function(e) { + this.tsPrintFunctionOrConstructorType(e); + }; + n.TSConstructorType = function(e) { + if (e.abstract) { + this.word("abstract"); + this.space(); + } + this.word("new"); + this.space(); + this.tsPrintFunctionOrConstructorType(e); + }; + n.tsPrintFunctionOrConstructorType = function(e) { + const {typeParameters: t, parameters: n} = e; + this.print(t, e); + this.token("("); + this._parameters(n, e); + this.token(")"); + this.space(); + this.token("=>"); + this.space(); + this.print(e.typeAnnotation.typeAnnotation, e); + }; + n.TSTypeReference = function(e) { + this.print(e.typeName, e); + this.print(e.typeParameters, e); + }; + n.TSTypePredicate = function(e) { + if (e.asserts) { + this.word("asserts"); + this.space(); + } + this.print(e.parameterName); + if (e.typeAnnotation) { + this.space(); + this.word("is"); + this.space(); + this.print(e.typeAnnotation.typeAnnotation); + } + }; + n.TSTypeQuery = function(e) { + this.word("typeof"); + this.space(); + this.print(e.exprName); + }; + n.TSTypeLiteral = function(e) { + this.tsPrintTypeLiteralOrInterfaceBody(e.members, e); + }; + n.tsPrintTypeLiteralOrInterfaceBody = function(e, t) { + this.tsPrintBraced(e, t); + }; + n.tsPrintBraced = function(e, t) { + this.token("{"); + if (e.length) { + this.indent(); + this.newline(); + for (const n of e) { + this.print(n, t); + this.newline(); + } + this.dedent(); + this.rightBrace(); + } else this.token("}"); + }; + n.TSArrayType = function(e) { + this.print(e.elementType, e); + this.token("[]"); + }; + n.TSTupleType = function(e) { + this.token("["); + this.printList(e.elementTypes, e); + this.token("]"); + }; + n.TSOptionalType = function(e) { + this.print(e.typeAnnotation, e); + this.token("?"); + }; + n.TSRestType = function(e) { + this.token("..."); + this.print(e.typeAnnotation, e); + }; + n.TSNamedTupleMember = function(e) { + this.print(e.label, e); + e.optional && this.token("?"); + this.token(":"); + this.space(); + this.print(e.elementType, e); + }; + n.TSUnionType = function(e) { + this.tsPrintUnionOrIntersectionType(e, "|"); + }; + n.TSIntersectionType = function(e) { + this.tsPrintUnionOrIntersectionType(e, "&"); + }; + n.tsPrintUnionOrIntersectionType = function(e, t) { + this.printJoin(e.types, e, { + separator() { + this.space(); + this.token(t); + this.space(); + } + }); + }; + n.TSConditionalType = function(e) { + this.print(e.checkType); + this.space(); + this.word("extends"); + this.space(); + this.print(e.extendsType); + this.space(); + this.token("?"); + this.space(); + this.print(e.trueType); + this.space(); + this.token(":"); + this.space(); + this.print(e.falseType); + }; + n.TSInferType = function(e) { + this.token("infer"); + this.space(); + this.print(e.typeParameter); + }; + n.TSParenthesizedType = function(e) { + this.token("("); + this.print(e.typeAnnotation, e); + this.token(")"); + }; + n.TSTypeOperator = function(e) { + this.word(e.operator); + this.space(); + this.print(e.typeAnnotation, e); + }; + n.TSIndexedAccessType = function(e) { + this.print(e.objectType, e); + this.token("["); + this.print(e.indexType, e); + this.token("]"); + }; + n.TSMappedType = function(e) { + const {nameType: t, optional: n, readonly: i, typeParameter: s} = e; + this.token("{"); + this.space(); + if (i) { + r(this, i); + this.word("readonly"); + this.space(); + } + this.token("["); + this.word(s.name); + this.space(); + this.word("in"); + this.space(); + this.print(s.constraint, s); + if (t) { + this.space(); + this.word("as"); + this.space(); + this.print(t, e); + } + this.token("]"); + if (n) { + r(this, n); + this.token("?"); + } + this.token(":"); + this.space(); + this.print(e.typeAnnotation, e); + this.space(); + this.token("}"); + }; + n.TSLiteralType = function(e) { + this.print(e.literal, e); + }; + n.TSExpressionWithTypeArguments = function(e) { + this.print(e.expression, e); + this.print(e.typeParameters, e); + }; + n.TSInterfaceDeclaration = function(e) { + const {declare: t, id: n, typeParameters: r, extends: i, body: s} = e; + if (t) { + this.word("declare"); + this.space(); + } + this.word("interface"); + this.space(); + this.print(n, e); + this.print(r, e); + if (null != i && i.length) { + this.space(); + this.word("extends"); + this.space(); + this.printList(i, e); + } + this.space(); + this.print(s, e); + }; + n.TSInterfaceBody = function(e) { + this.tsPrintTypeLiteralOrInterfaceBody(e.body, e); + }; + n.TSTypeAliasDeclaration = function(e) { + const {declare: t, id: n, typeParameters: r, typeAnnotation: i} = e; + if (t) { + this.word("declare"); + this.space(); + } + this.word("type"); + this.space(); + this.print(n, e); + this.print(r, e); + this.space(); + this.token("="); + this.space(); + this.print(i, e); + this.token(";"); + }; + n.TSAsExpression = function(e) { + const {expression: t, typeAnnotation: n} = e; + this.print(t, e); + this.space(); + this.word("as"); + this.space(); + this.print(n, e); + }; + n.TSTypeAssertion = function(e) { + const {typeAnnotation: t, expression: n} = e; + this.token("<"); + this.print(t, e); + this.token(">"); + this.space(); + this.print(n, e); + }; + n.TSEnumDeclaration = function(e) { + const {declare: t, const: n, id: r, members: i} = e; + if (t) { + this.word("declare"); + this.space(); + } + if (n) { + this.word("const"); + this.space(); + } + this.word("enum"); + this.space(); + this.print(r, e); + this.space(); + this.tsPrintBraced(i, e); + }; + n.TSEnumMember = function(e) { + const {id: t, initializer: n} = e; + this.print(t, e); + if (n) { + this.space(); + this.token("="); + this.space(); + this.print(n, e); + } + this.token(","); + }; + n.TSModuleDeclaration = function(e) { + const {declare: t, id: n} = e; + if (t) { + this.word("declare"); + this.space(); + } + if (!e.global) { + this.word("Identifier" === n.type ? "namespace" : "module"); + this.space(); + } + this.print(n, e); + if (!e.body) { + this.token(";"); + return; + } + let r = e.body; + for (;"TSModuleDeclaration" === r.type; ) { + this.token("."); + this.print(r.id, r); + r = r.body; + } + this.space(); + this.print(r, e); + }; + n.TSModuleBlock = function(e) { + this.tsPrintBraced(e.body, e); + }; + n.TSImportType = function(e) { + const {argument: t, qualifier: n, typeParameters: r} = e; + this.word("import"); + this.token("("); + this.print(t, e); + this.token(")"); + if (n) { + this.token("."); + this.print(n, e); + } + r && this.print(r, e); + }; + n.TSImportEqualsDeclaration = function(e) { + const {isExport: t, id: n, moduleReference: r} = e; + if (t) { + this.word("export"); + this.space(); + } + this.word("import"); + this.space(); + this.print(n, e); + this.space(); + this.token("="); + this.space(); + this.print(r, e); + this.token(";"); + }; + n.TSExternalModuleReference = function(e) { + this.token("require("); + this.print(e.expression, e); + this.token(")"); + }; + n.TSNonNullExpression = function(e) { + this.print(e.expression, e); + this.token("!"); + }; + n.TSExportAssignment = function(e) { + this.word("export"); + this.space(); + this.token("="); + this.space(); + this.print(e.expression, e); + this.token(";"); + }; + n.TSNamespaceExportDeclaration = function(e) { + this.word("export"); + this.space(); + this.word("as"); + this.space(); + this.word("namespace"); + this.space(); + this.print(e.id, e); + }; + n.tsPrintSignatureDeclarationBase = function(e) { + const {typeParameters: t, parameters: n} = e; + this.print(t, e); + this.token("("); + this._parameters(n, e); + this.token(")"); + this.print(e.typeAnnotation, e); + }; + n.tsPrintClassMemberModifiers = function(e, t) { + if (t && e.declare) { + this.word("declare"); + this.space(); + } + if (e.accessibility) { + this.word(e.accessibility); + this.space(); + } + if (e.static) { + this.word("static"); + this.space(); + } + if (e.override) { + this.word("override"); + this.space(); + } + if (e.abstract) { + this.word("abstract"); + this.space(); + } + if (t && e.readonly) { + this.word("readonly"); + this.space(); + } + }; + function r(e, t) { + !0 !== t && e.token(t); + } + }, {} ], + 16: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + return new s(e, t, n).generate(); + }; + n.CodeGenerator = void 0; + r = e("./source-map"); + i = e("./printer"); + class s extends i.default { + constructor(e, t = {}, n) { + super(function(e, t) { + const n = { + auxiliaryCommentBefore: t.auxiliaryCommentBefore, + auxiliaryCommentAfter: t.auxiliaryCommentAfter, + shouldPrintComment: t.shouldPrintComment, + retainLines: t.retainLines, + retainFunctionParens: t.retainFunctionParens, + comments: null == t.comments || t.comments, + compact: t.compact, + minified: t.minified, + concise: t.concise, + indent: { + adjustMultilineComment: !0, + style: " ", + base: 0 + }, + decoratorsBeforeExport: !!t.decoratorsBeforeExport, + jsescOption: Object.assign({ + quotes: "double", + wrap: !0, + minimal: !1 + }, t.jsescOption), + recordAndTupleSyntaxType: t.recordAndTupleSyntaxType, + topicToken: t.topicToken + }; + n.jsonCompatibleStrings = t.jsonCompatibleStrings; + if (n.minified) { + n.compact = !0; + n.shouldPrintComment = n.shouldPrintComment || (() => n.comments); + } else n.shouldPrintComment = n.shouldPrintComment || (e => n.comments || e.indexOf("@license") >= 0 || e.indexOf("@preserve") >= 0); + if ("auto" === n.compact) { + n.compact = e.length > 5e5; + n.compact && console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${t.filename} as it exceeds the max of 500KB.`); + } + n.compact && (n.indent.adjustMultilineComment = !1); + return n; + }(n, t), t.sourceMaps ? new r.default(t, n) : null); + this.ast = void 0; + this.ast = e; + } + generate() { + return super.generate(this.ast); + } + } + n.CodeGenerator = class { + constructor(e, t, n) { + this._generator = void 0; + this._generator = new s(e, t, n); + } + generate() { + return this._generator.generate(); + } + }; + }, { + "./printer": 20, + "./source-map": 21 + } ], + 17: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.needsWhitespace = y; + n.needsWhitespaceBefore = function(e, t) { + return y(e, t, "before"); + }; + n.needsWhitespaceAfter = function(e, t) { + return y(e, t, "after"); + }; + n.needsParens = function(e, t, n) { + if (!t) return !1; + if (p(t) && t.callee === e && function e(t) { + if (o(t)) return !0; + return c(t) && e(t.object); + }(e)) return !0; + return m(d, e, t, n); + }; + r = e("./whitespace"); + i = e("./parentheses"); + s = e("@babel/types"); + const {FLIPPED_ALIAS_KEYS: a, isCallExpression: o, isExpressionStatement: l, isMemberExpression: c, isNewExpression: p} = s; + function u(e) { + const t = {}; + function n(e, n) { + const r = t[e]; + t[e] = r ? function(e, t, i) { + const s = r(e, t, i); + return null == s ? n(e, t, i) : s; + } : n; + } + for (const t of Object.keys(e)) { + const r = a[t]; + if (r) for (const i of r) n(i, e[t]); else n(t, e[t]); + } + return t; + } + const d = u(i); + const h = u(r.nodes); + const f = u(r.list); + function m(e, t, n, r) { + const i = e[t.type]; + return i ? i(t, n, r) : null; + } + function y(e, t, n) { + if (!e) return 0; + l(e) && (e = e.expression); + let r = m(h, e, t); + if (!r) { + const i = m(f, e, t); + if (i) for (let t = 0; t < i.length && !(r = y(i[t], e, n)); t++) ; + } + return "object" == typeof r && null !== r && r[n] || 0; + } + }, { + "./parentheses": 18, + "./whitespace": 19, + "@babel/types": 108 + } ], + 18: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.NullableTypeAnnotation = function(e, t) { + return i(t); + }; + n.FunctionTypeAnnotation = function(e, t, n) { + return X(t) || v(t) || i(t) || Y(t) && s(n[n.length - 3]); + }; + n.UpdateExpression = function(e, t) { + return Z(e, t) || Q(e, t); + }; + n.ObjectExpression = function(e, t, n) { + return ne(n, { + expressionStatement: !0, + arrowBody: !0 + }); + }; + n.DoExpression = function(e, t, n) { + return !e.async && ne(n, { + expressionStatement: !0 + }); + }; + n.Binary = function(e, t) { + if ("**" === e.operator && c(t, { + operator: "**" + })) return t.left === e; + if (Q(e, t)) return !0; + if (Z(e, t) || J(t) || o(t)) return !0; + if (l(t)) { + const n = t.operator; + const r = z[n]; + const i = e.operator; + const s = z[i]; + if (r === s && t.right === e && !A(t) || r > s) return !0; + } + }; + n.IntersectionTypeAnnotation = n.UnionTypeAnnotation = function(e, t) { + return i(t) || I(t) || v(t) || X(t); + }; + n.OptionalIndexedAccessType = function(e, t) { + return P(t, { + objectType: e + }); + }; + n.TSAsExpression = function() { + return !0; + }; + n.TSTypeAssertion = function() { + return !0; + }; + n.TSIntersectionType = n.TSUnionType = function(e, t) { + return L(t) || R(t) || F(t) || K(t) || U(t); + }; + n.TSInferType = function(e, t) { + return L(t) || R(t); + }; + n.BinaryExpression = function(e, t) { + return "in" === e.operator && (G(t) || T(t)); + }; + n.SequenceExpression = function(e, t) { + if (x(t) || q(t) || D(t) || E(t) && t.test === e || H(t) && t.test === e || b(t) && t.right === e || _(t) && t.discriminant === e || g(t) && t.expression === e) return !1; + return !0; + }; + n.AwaitExpression = n.YieldExpression = function(e, t) { + return l(t) || J(t) || Z(e, t) || o(t) && $(e) || f(t) && e === t.test || Q(e, t); + }; + n.ClassExpression = function(e, t, n) { + return ne(n, { + expressionStatement: !0, + exportDefault: !0 + }); + }; + n.UnaryLike = ee; + n.FunctionExpression = function(e, t, n) { + return ne(n, { + expressionStatement: !0, + exportDefault: !0 + }); + }; + n.ArrowFunctionExpression = function(e, t) { + return m(t) || te(e, t); + }; + n.ConditionalExpression = te; + n.OptionalCallExpression = n.OptionalMemberExpression = function(e, t) { + return p(t, { + callee: e + }) || w(t, { + object: e + }); + }; + n.AssignmentExpression = function(e, t) { + return !!O(e.left) || te(e, t); + }; + n.LogicalExpression = function(e, t) { + switch (e.operator) { + case "||": + return !!A(t) && ("??" === t.operator || "&&" === t.operator); + + case "&&": + return A(t, { + operator: "??" + }); + + case "??": + return A(t) && "??" !== t.operator; + } + }; + n.Identifier = function(e, t, n) { + if ("let" === e.name) { + const r = w(t, { + object: e, + computed: !0 + }) || k(t, { + object: e, + computed: !0, + optional: !1 + }); + return ne(n, { + expressionStatement: r, + forHead: r, + forInHead: r, + forOfHead: !0 + }); + } + return "async" === e.name && S(t) && e === t.left; + }; + var r = e("@babel/types"); + const {isArrayTypeAnnotation: i, isArrowFunctionExpression: s, isAssignmentExpression: a, isAwaitExpression: o, isBinary: l, isBinaryExpression: c, isCallExpression: p, isClassDeclaration: u, isClassExpression: d, isConditional: h, isConditionalExpression: f, isExportDeclaration: m, isExportDefaultDeclaration: y, isExpressionStatement: g, isFor: T, isForInStatement: b, isForOfStatement: S, isForStatement: x, isIfStatement: E, isIndexedAccessType: P, isIntersectionTypeAnnotation: v, isLogicalExpression: A, isMemberExpression: w, isNewExpression: C, isNullableTypeAnnotation: I, isObjectPattern: O, isOptionalCallExpression: N, isOptionalMemberExpression: k, isReturnStatement: D, isSequenceExpression: M, isSwitchStatement: _, isTSArrayType: L, isTSAsExpression: j, isTSIntersectionType: F, isTSNonNullExpression: B, isTSOptionalType: R, isTSRestType: U, isTSTypeAssertion: V, isTSUnionType: K, isTaggedTemplateExpression: W, isThrowStatement: q, isTypeAnnotation: Y, isUnaryLike: J, isUnionTypeAnnotation: X, isVariableDeclarator: G, isWhileStatement: H, isYieldExpression: $} = r; + const z = { + "||": 0, + "??": 0, + "&&": 1, + "|": 2, + "^": 3, + "&": 4, + "==": 5, + "===": 5, + "!=": 5, + "!==": 5, + "<": 6, + ">": 6, + "<=": 6, + ">=": 6, + in: 6, + instanceof: 6, + ">>": 7, + "<<": 7, + ">>>": 7, + "+": 8, + "-": 8, + "*": 9, + "/": 9, + "%": 9, + "**": 10 + }; + const Q = (e, t) => (u(t) || d(t)) && t.superClass === e; + const Z = (e, t) => (w(t) || k(t)) && t.object === e || (p(t) || N(t) || C(t)) && t.callee === e || W(t) && t.tag === e || B(t); + function ee(e, t) { + return Z(e, t) || c(t, { + operator: "**", + left: e + }) || Q(e, t); + } + function te(e, t) { + return !!(J(t) || l(t) || f(t, { + test: e + }) || o(t) || V(t) || j(t)) || ee(e, t); + } + function ne(e, {expressionStatement: t = !1, arrowBody: n = !1, exportDefault: r = !1, forHead: i = !1, forInHead: o = !1, forOfHead: c = !1}) { + let p = e.length - 1; + let u = e[p]; + let d = e[--p]; + for (;p >= 0; ) { + if (t && g(d, { + expression: u + }) || r && y(d, { + declaration: u + }) || n && s(d, { + body: u + }) || i && x(d, { + init: u + }) || o && b(d, { + left: u + }) || c && S(d, { + left: u + })) return !0; + if (!(Z(u, d) && !C(d) || M(d) && d.expressions[0] === u || h(d, { + test: u + }) || l(d, { + left: u + }) || a(d, { + left: u + }))) return !1; + u = d; + d = e[--p]; + } + return !1; + } + }, { + "@babel/types": 108 + } ], + 19: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.list = n.nodes = void 0; + var r = e("@babel/types"); + const {FLIPPED_ALIAS_KEYS: i, isArrayExpression: s, isAssignmentExpression: a, isBinary: o, isBlockStatement: l, isCallExpression: c, isFunction: p, isIdentifier: u, isLiteral: d, isMemberExpression: h, isObjectExpression: f, isOptionalCallExpression: m, isOptionalMemberExpression: y, isStringLiteral: g} = r; + function T(e, t = {}) { + if (h(e) || y(e)) { + T(e.object, t); + e.computed && T(e.property, t); + } else if (o(e) || a(e)) { + T(e.left, t); + T(e.right, t); + } else if (c(e) || m(e)) { + t.hasCall = !0; + T(e.callee, t); + } else p(e) ? t.hasFunction = !0 : u(e) && (t.hasHelper = t.hasHelper || b(e.callee)); + return t; + } + function b(e) { + return h(e) ? b(e.object) || b(e.property) : u(e) ? "require" === e.name || "_" === e.name[0] : c(e) ? b(e.callee) : !(!o(e) && !a(e)) && (u(e.left) && b(e.left) || b(e.right)); + } + function S(e) { + return d(e) || f(e) || s(e) || u(e) || h(e); + } + const x = { + AssignmentExpression(e) { + const t = T(e.right); + if (t.hasCall && t.hasHelper || t.hasFunction) return { + before: t.hasFunction, + after: !0 + }; + }, + SwitchCase: (e, t) => ({ + before: !!e.consequent.length || t.cases[0] === e, + after: !e.consequent.length && t.cases[t.cases.length - 1] === e + }), + LogicalExpression(e) { + if (p(e.left) || p(e.right)) return { + after: !0 + }; + }, + Literal(e) { + if (g(e) && "use strict" === e.value) return { + after: !0 + }; + }, + CallExpression(e) { + if (p(e.callee) || b(e)) return { + before: !0, + after: !0 + }; + }, + OptionalCallExpression(e) { + if (p(e.callee)) return { + before: !0, + after: !0 + }; + }, + VariableDeclaration(e) { + for (let t = 0; t < e.declarations.length; t++) { + const n = e.declarations[t]; + let r = b(n.id) && !S(n.init); + if (!r) { + const e = T(n.init); + r = b(n.init) && e.hasCall || e.hasFunction; + } + if (r) return { + before: !0, + after: !0 + }; + } + }, + IfStatement(e) { + if (l(e.consequent)) return { + before: !0, + after: !0 + }; + } + }; + n.nodes = x; + x.ObjectProperty = x.ObjectTypeProperty = x.ObjectMethod = function(e, t) { + if (t.properties[0] === e) return { + before: !0 + }; + }; + x.ObjectTypeCallProperty = function(e, t) { + var n; + if (t.callProperties[0] === e && (null == (n = t.properties) || !n.length)) return { + before: !0 + }; + }; + x.ObjectTypeIndexer = function(e, t) { + var n, r; + if (!(t.indexers[0] !== e || null != (n = t.properties) && n.length || null != (r = t.callProperties) && r.length)) return { + before: !0 + }; + }; + x.ObjectTypeInternalSlot = function(e, t) { + var n, r, i; + if (!(t.internalSlots[0] !== e || null != (n = t.properties) && n.length || null != (r = t.callProperties) && r.length || null != (i = t.indexers) && i.length)) return { + before: !0 + }; + }; + const E = { + VariableDeclaration: e => e.declarations.map(e => e.init), + ArrayExpression: e => e.elements, + ObjectExpression: e => e.properties + }; + n.list = E; + [ [ "Function", !0 ], [ "Class", !0 ], [ "Loop", !0 ], [ "LabeledStatement", !0 ], [ "SwitchStatement", !0 ], [ "TryStatement", !0 ] ].forEach(function([e, t]) { + "boolean" == typeof t && (t = { + after: t, + before: t + }); + [ e ].concat(i[e] || []).forEach(function(e) { + x[e] = function() { + return t; + }; + }); + }); + }, { + "@babel/types": 108 + } ], + 20: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("./buffer"); + i = e("./node"); + s = e("@babel/types"); + a = e("./generators"); + const {isProgram: l, isFile: c, isEmptyStatement: p} = s; + const u = /e/i; + const d = /\.0+$/; + const h = /^0[box]/; + const f = /^\s*[@#]__PURE__\s*$/; + const {needsParens: m, needsWhitespaceAfter: y, needsWhitespaceBefore: g} = i; + class T { + constructor(e, t) { + this.inForStatementInitCounter = 0; + this._printStack = []; + this._indent = 0; + this._insideAux = !1; + this._parenPushNewlineState = null; + this._noLineTerminator = !1; + this._printAuxAfterOnNextUserNode = !1; + this._printedComments = new WeakSet(); + this._endsWithInteger = !1; + this._endsWithWord = !1; + this.format = e; + this._buf = new r.default(t); + } + generate(e) { + this.print(e); + this._maybeAddAuxComment(); + return this._buf.get(); + } + indent() { + this.format.compact || this.format.concise || this._indent++; + } + dedent() { + this.format.compact || this.format.concise || this._indent--; + } + semicolon(e = !1) { + this._maybeAddAuxComment(); + this._append(";", !e); + } + rightBrace() { + this.format.minified && this._buf.removeLastSemicolon(); + this.token("}"); + } + space(e = !1) { + if (!this.format.compact) if (e) this._space(); else if (this._buf.hasContent()) { + const e = this.getLastChar(); + 32 !== e && 10 !== e && this._space(); + } + } + word(e) { + (this._endsWithWord || this.endsWith(47) && 47 === e.charCodeAt(0)) && this._space(); + this._maybeAddAuxComment(); + this._append(e); + this._endsWithWord = !0; + } + number(e) { + this.word(e); + this._endsWithInteger = Number.isInteger(+e) && !h.test(e) && !u.test(e) && !d.test(e) && 46 !== e.charCodeAt(e.length - 1); + } + token(e) { + const t = this.getLastChar(); + const n = e.charCodeAt(0); + ("--" === e && 33 === t || 43 === n && 43 === t || 45 === n && 45 === t || 46 === n && this._endsWithInteger) && this._space(); + this._maybeAddAuxComment(); + this._append(e); + } + newline(e = 1) { + if (this.format.retainLines || this.format.compact) return; + if (this.format.concise) { + this.space(); + return; + } + const t = this.endsWithCharAndNewline(); + if (10 !== t) { + 123 !== t && 58 !== t || e--; + if (!(e <= 0)) for (let t = 0; t < e; t++) this._newline(); + } + } + endsWith(e) { + return this.getLastChar() === e; + } + getLastChar() { + return this._buf.getLastChar(); + } + endsWithCharAndNewline() { + return this._buf.endsWithCharAndNewline(); + } + removeTrailingNewline() { + this._buf.removeTrailingNewline(); + } + exactSource(e, t) { + this._catchUp("start", e); + this._buf.exactSource(e, t); + } + source(e, t) { + this._catchUp(e, t); + this._buf.source(e, t); + } + withSource(e, t, n) { + this._catchUp(e, t); + this._buf.withSource(e, t, n); + } + _space() { + this._append(" ", !0); + } + _newline() { + this._append("\n", !0); + } + _append(e, t = !1) { + this._maybeAddParen(e); + this._maybeIndent(e); + t ? this._buf.queue(e) : this._buf.append(e); + this._endsWithWord = !1; + this._endsWithInteger = !1; + } + _maybeIndent(e) { + this._indent && this.endsWith(10) && 10 !== e.charCodeAt(0) && this._buf.queue(this._getIndent()); + } + _maybeAddParen(e) { + const t = this._parenPushNewlineState; + if (!t) return; + let n; + for (n = 0; n < e.length && " " === e[n]; n++) continue; + if (n === e.length) return; + const r = e[n]; + if ("\n" !== r) { + if ("/" !== r || n + 1 === e.length) { + this._parenPushNewlineState = null; + return; + } + const t = e[n + 1]; + if ("*" === t) { + if (f.test(e.slice(n + 2, e.length - 2))) return; + } else if ("/" !== t) { + this._parenPushNewlineState = null; + return; + } + } + this.token("("); + this.indent(); + t.printed = !0; + } + _catchUp(e, t) { + if (!this.format.retainLines) return; + const n = t ? t[e] : null; + if (null != (null == n ? void 0 : n.line)) { + const e = n.line - this._buf.getCurrentLine(); + for (let t = 0; t < e; t++) this._newline(); + } + } + _getIndent() { + return this.format.indent.style.repeat(this._indent); + } + startTerminatorless(e = !1) { + if (e) { + this._noLineTerminator = !0; + return null; + } + return this._parenPushNewlineState = { + printed: !1 + }; + } + endTerminatorless(e) { + this._noLineTerminator = !1; + if (null != e && e.printed) { + this.dedent(); + this.newline(); + this.token(")"); + } + } + print(e, t) { + if (!e) return; + const n = this.format.concise; + e._compact && (this.format.concise = !0); + const r = this[e.type]; + if (!r) throw new ReferenceError(`unknown node of type ${JSON.stringify(e.type)} with constructor ${JSON.stringify(null == e ? void 0 : e.constructor.name)}`); + this._printStack.push(e); + const i = this._insideAux; + this._insideAux = !e.loc; + this._maybeAddAuxComment(this._insideAux && !i); + let s = m(e, t, this._printStack); + this.format.retainFunctionParens && "FunctionExpression" === e.type && e.extra && e.extra.parenthesized && (s = !0); + s && this.token("("); + this._printLeadingComments(e); + const a = l(e) || c(e) ? null : e.loc; + this.withSource("start", a, () => { + r.call(this, e, t); + }); + this._printTrailingComments(e); + s && this.token(")"); + this._printStack.pop(); + this.format.concise = n; + this._insideAux = i; + } + _maybeAddAuxComment(e) { + e && this._printAuxBeforeComment(); + this._insideAux || this._printAuxAfterComment(); + } + _printAuxBeforeComment() { + if (this._printAuxAfterOnNextUserNode) return; + this._printAuxAfterOnNextUserNode = !0; + const e = this.format.auxiliaryCommentBefore; + e && this._printComment({ + type: "CommentBlock", + value: e + }); + } + _printAuxAfterComment() { + if (!this._printAuxAfterOnNextUserNode) return; + this._printAuxAfterOnNextUserNode = !1; + const e = this.format.auxiliaryCommentAfter; + e && this._printComment({ + type: "CommentBlock", + value: e + }); + } + getPossibleRaw(e) { + const t = e.extra; + if (t && null != t.raw && null != t.rawValue && e.value === t.rawValue) return t.raw; + } + printJoin(e, t, n = {}) { + if (null == e || !e.length) return; + n.indent && this.indent(); + const r = { + addNewlines: n.addNewlines + }; + for (let i = 0; i < e.length; i++) { + const s = e[i]; + if (s) { + n.statement && this._printNewline(!0, s, t, r); + this.print(s, t); + n.iterator && n.iterator(s, i); + n.separator && i < e.length - 1 && n.separator.call(this); + n.statement && this._printNewline(!1, s, t, r); + } + } + n.indent && this.dedent(); + } + printAndIndentOnComments(e, t) { + const n = e.leadingComments && e.leadingComments.length > 0; + n && this.indent(); + this.print(e, t); + n && this.dedent(); + } + printBlock(e) { + const t = e.body; + p(t) || this.space(); + this.print(t, e); + } + _printTrailingComments(e) { + this._printComments(this._getComments(!1, e)); + } + _printLeadingComments(e) { + this._printComments(this._getComments(!0, e), !0); + } + printInnerComments(e, t = !0) { + var n; + if (null != (n = e.innerComments) && n.length) { + t && this.indent(); + this._printComments(e.innerComments); + t && this.dedent(); + } + } + printSequence(e, t, n = {}) { + n.statement = !0; + return this.printJoin(e, t, n); + } + printList(e, t, n = {}) { + null == n.separator && (n.separator = b); + return this.printJoin(e, t, n); + } + _printNewline(e, t, n, r) { + if (this.format.retainLines || this.format.compact) return; + if (this.format.concise) { + this.space(); + return; + } + let i = 0; + if (this._buf.hasContent()) { + e || i++; + r.addNewlines && (i += r.addNewlines(e, t) || 0); + (e ? g : y)(t, n) && i++; + } + this.newline(Math.min(2, i)); + } + _getComments(e, t) { + return t && (e ? t.leadingComments : t.trailingComments) || []; + } + _printComment(e, t) { + if (!this.format.shouldPrintComment(e.value)) return; + if (e.ignore) return; + if (this._printedComments.has(e)) return; + this._printedComments.add(e); + const n = "CommentBlock" === e.type; + const r = n && !t && !this._noLineTerminator; + r && this._buf.hasContent() && this.newline(1); + const i = this.getLastChar(); + 91 !== i && 123 !== i && this.space(); + let s = n || this._noLineTerminator ? `/*${e.value}*/` : `//${e.value}\n`; + if (n && this.format.indent.adjustMultilineComment) { + var a; + const t = null == (a = e.loc) ? void 0 : a.start.column; + if (t) { + const e = new RegExp("\\n\\s{1," + t + "}", "g"); + s = s.replace(e, "\n"); + } + const n = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn()); + s = s.replace(/\n(?!$)/g, `\n${" ".repeat(n)}`); + } + this.endsWith(47) && this._space(); + this.withSource("start", e.loc, () => { + this._append(s); + }); + r && this.newline(1); + } + _printComments(e, t) { + if (null != e && e.length) if (t && 1 === e.length && f.test(e[0].value)) this._printComment(e[0], this._buf.hasContent() && !this.endsWith(10)); else for (const t of e) this._printComment(t); + } + printAssertions(e) { + var t; + if (null != (t = e.assertions) && t.length) { + this.space(); + this.word("assert"); + this.space(); + this.token("{"); + this.space(); + this.printList(e.assertions, e); + this.space(); + this.token("}"); + } + } + } + Object.assign(T.prototype, a); + T.prototype.Noop = function() {}; + o = T; + n.default = o; + function b() { + this.token(","); + this.space(); + } + }, { + "./buffer": 3, + "./generators": 8, + "./node": 17, + "@babel/types": 108 + } ], + 21: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + var r = e("source-map"); + n.default = class { + constructor(e, t) { + this._cachedMap = void 0; + this._code = void 0; + this._opts = void 0; + this._rawMappings = void 0; + this._lastGenLine = void 0; + this._lastSourceLine = void 0; + this._lastSourceColumn = void 0; + this._cachedMap = null; + this._code = t; + this._opts = e; + this._rawMappings = []; + } + get() { + if (!this._cachedMap) { + const e = this._cachedMap = new r.SourceMapGenerator({ + sourceRoot: this._opts.sourceRoot + }); + const t = this._code; + "string" == typeof t ? e.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), t) : "object" == typeof t && Object.keys(t).forEach(n => { + e.setSourceContent(n.replace(/\\/g, "/"), t[n]); + }); + this._rawMappings.forEach(t => e.addMapping(t), e); + } + return this._cachedMap.toJSON(); + } + getRawMappings() { + return this._rawMappings.slice(); + } + mark(e, t, n, r, i, s, a) { + if ((this._lastGenLine === e || null !== n) && (a || this._lastGenLine !== e || this._lastSourceLine !== n || this._lastSourceColumn !== r)) { + this._cachedMap = null; + this._lastGenLine = e; + this._lastSourceLine = n; + this._lastSourceColumn = r; + this._rawMappings.push({ + name: i || void 0, + generated: { + line: e, + column: t + }, + source: null == n ? void 0 : (s || this._opts.sourceFileName).replace(/\\/g, "/"), + original: null == n ? void 0 : { + line: n, + column: r + } + }); + } + } + }; + }, { + "source-map": 171 + } ], + 22: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function({node: e, parent: t, scope: n, id: i}, s = !1) { + if (e.id) return; + if (!m(t) && !f(t, { + kind: "method" + }) || t.computed && !d(t.key)) { + if (T(t)) { + i = t.id; + if (u(i) && !s) { + const t = n.parent.getBinding(i.name); + if (t && t.constant && n.getBinding(i.name) === t) { + e.id = o(i); + e.id[a] = !0; + return; + } + } + } else if (c(t, { + operator: "=" + })) i = t.left; else if (!i) return; + } else i = t.key; + let P; + i && d(i) ? P = function(e) { + if (h(e)) return "null"; + if (y(e)) return `_${e.pattern}_${e.flags}`; + if (g(e)) return e.quasis.map(e => e.value.raw).join(""); + if (void 0 !== e.value) return e.value + ""; + return ""; + }(i) : i && u(i) && (P = i.name); + if (void 0 === P) return; + P = b(P); + (i = l(P))[a] = !0; + return function(e, t, n, i) { + if (e.selfReference) { + if (!i.hasBinding(n.name) || i.hasGlobal(n.name)) { + if (!p(t)) return; + let e = S; + t.generator && (e = x); + const s = e({ + FUNCTION: t, + FUNCTION_ID: n, + FUNCTION_KEY: i.generateUidIdentifier(n.name) + }).expression; + const a = s.callee.body.body[0].params; + for (let e = 0, n = (0, r.default)(t); e < n; e++) a.push(i.generateUidIdentifier("x")); + return s; + } + i.rename(n.name); + } + t.id = n; + i.getProgramParent().references[n.name] = !0; + }(function(e, t, n) { + const r = { + selfAssignment: !1, + selfReference: !1, + outerDeclar: n.getBindingIdentifier(t), + references: [], + name: t + }; + const i = n.getOwnBinding(t); + i ? "param" === i.kind && (r.selfReference = !0) : (r.outerDeclar || n.hasGlobal(t)) && n.traverse(e, E, r); + return r; + }(e, P, n), e, i, n) || e; + }; + r = e("@babel/helper-get-function-arity"); + i = e("@babel/template"); + s = e("@babel/types"); + const {NOT_LOCAL_BINDING: a, cloneNode: o, identifier: l, isAssignmentExpression: c, isFunction: p, isIdentifier: u, isLiteral: d, isNullLiteral: h, isObjectMethod: f, isObjectProperty: m, isRegExpLiteral: y, isTemplateLiteral: g, isVariableDeclarator: T, toBindingIdentifierName: b} = s; + const S = (0, i.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); + const x = (0, i.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"); + const E = { + "ReferencedIdentifier|BindingIdentifier"(e, t) { + if (e.node.name !== t.name) return; + if (e.scope.getBindingIdentifier(t.name) === t.outerDeclar) { + t.selfReference = !0; + e.stop(); + } + } + }; + }, { + "@babel/helper-get-function-arity": 23, + "@babel/template": 33, + "@babel/types": 108 + } ], + 23: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + const t = e.params; + for (let e = 0; e < t.length; e++) { + const n = t[e]; + if (i(n) || s(n)) return e; + } + return t.length; + }; + var r = e("@babel/types"); + const {isAssignmentPattern: i, isRestElement: s} = r; + }, { + "@babel/types": 108 + } ], + 24: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n = "var") { + e.traverse(o, { + kind: n, + emit: t + }); + }; + var r = e("@babel/types"); + const {assignmentExpression: i, expressionStatement: s, identifier: a} = r; + const o = { + Scope(e, t) { + "let" === t.kind && e.skip(); + }, + FunctionParent(e) { + e.skip(); + }, + VariableDeclaration(e, t) { + if (t.kind && e.node.kind !== t.kind) return; + const n = []; + const r = e.get("declarations"); + let o; + for (const e of r) { + o = e.node.id; + e.node.init && n.push(s(i("=", e.node.id, e.node.init))); + for (const n of Object.keys(e.getBindingIdentifiers())) t.emit(a(n), n, null !== e.node.init); + } + e.parentPath.isFor({ + left: e.node + }) ? e.replaceWith(o) : e.replaceWithMultiple(n); + } + }; + }, { + "@babel/types": 108 + } ], + 25: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + if (!e.isExportDeclaration()) throw new Error("Only export declarations can be split."); + const t = e.isExportDefaultDeclaration(); + const n = e.get("declaration"); + const r = n.isClassDeclaration(); + if (t) { + const t = n.isFunctionDeclaration() || r; + const p = n.isScope() ? n.scope.parent : n.scope; + let u = n.node.id; + let d = !1; + if (!u) { + d = !0; + u = p.generateUidIdentifier("default"); + (t || n.isFunctionExpression() || n.isClassExpression()) && (n.node.id = i(u)); + } + const h = t ? n : l("var", [ c(i(u), n.node) ]); + const f = s(null, [ a(i(u), o("default")) ]); + e.insertAfter(f); + e.replaceWith(h); + d && p.registerDeclaration(e); + return e; + } + if (e.get("specifiers").length > 0) throw new Error("It doesn't make sense to split exported specifiers."); + const p = n.getOuterBindingIdentifiers(); + const u = Object.keys(p).map(e => a(o(e), o(e))); + const d = s(null, u); + e.insertAfter(d); + e.replaceWith(n.node); + return e; + }; + var r = e("@babel/types"); + const {cloneNode: i, exportNamedDeclaration: s, exportSpecifier: a, identifier: o, variableDeclaration: l, variableDeclarator: c} = r; + }, { + "@babel/types": 108 + } ], + 26: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.isIdentifierStart = p; + n.isIdentifierChar = u; + n.isIdentifierName = function(e) { + let t = !0; + for (let n = 0; n < e.length; n++) { + let r = e.charCodeAt(n); + if (55296 == (64512 & r) && n + 1 < e.length) { + const t = e.charCodeAt(++n); + 56320 == (64512 & t) && (r = 65536 + ((1023 & r) << 10) + (1023 & t)); + } + if (t) { + t = !1; + if (!p(r)) return !1; + } else if (!u(r)) return !1; + } + return !t; + }; + let r = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; + let i = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_"; + const s = new RegExp("[" + r + "]"); + const a = new RegExp("[" + r + i + "]"); + r = i = null; + const o = [ 0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938 ]; + const l = [ 509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239 ]; + function c(e, t) { + let n = 65536; + for (let r = 0, i = t.length; r < i; r += 2) { + if ((n += t[r]) > e) return !1; + if ((n += t[r + 1]) >= e) return !0; + } + return !1; + } + function p(e) { + return e < 65 ? 36 === e : e <= 90 || (e < 97 ? 95 === e : e <= 122 || (e <= 65535 ? e >= 170 && s.test(String.fromCharCode(e)) : c(e, o))); + } + function u(e) { + return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e <= 90 || (e < 97 ? 95 === e : e <= 122 || (e <= 65535 ? e >= 170 && a.test(String.fromCharCode(e)) : c(e, o) || c(e, l)))); + } + }, {} ], + 27: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + Object.defineProperty(n, "isIdentifierName", { + enumerable: !0, + get: function() { + return r.isIdentifierName; + } + }); + Object.defineProperty(n, "isIdentifierChar", { + enumerable: !0, + get: function() { + return r.isIdentifierChar; + } + }); + Object.defineProperty(n, "isIdentifierStart", { + enumerable: !0, + get: function() { + return r.isIdentifierStart; + } + }); + Object.defineProperty(n, "isReservedWord", { + enumerable: !0, + get: function() { + return i.isReservedWord; + } + }); + Object.defineProperty(n, "isStrictBindOnlyReservedWord", { + enumerable: !0, + get: function() { + return i.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(n, "isStrictBindReservedWord", { + enumerable: !0, + get: function() { + return i.isStrictBindReservedWord; + } + }); + Object.defineProperty(n, "isStrictReservedWord", { + enumerable: !0, + get: function() { + return i.isStrictReservedWord; + } + }); + Object.defineProperty(n, "isKeyword", { + enumerable: !0, + get: function() { + return i.isKeyword; + } + }); + r = e("./identifier"); + i = e("./keyword"); + }, { + "./identifier": 26, + "./keyword": 28 + } ], + 28: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.isReservedWord = l; + n.isStrictReservedWord = c; + n.isStrictBindOnlyReservedWord = p; + n.isStrictBindReservedWord = function(e, t) { + return c(e, t) || p(e); + }; + n.isKeyword = function(e) { + return s.has(e); + }; + const r = [ "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield" ], i = [ "eval", "arguments" ]; + const s = new Set([ "break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete" ]); + const a = new Set(r); + const o = new Set(i); + function l(e, t) { + return t && "await" === e || "enum" === e; + } + function c(e, t) { + return l(e, t) || a.has(e); + } + function p(e) { + return o.has(e); + } + }, {} ], + 29: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.shouldHighlight = p; + n.getChalk = u; + n.default = function(e, t = {}) { + if (p(t)) { + const n = u(t); + const r = { + keyword: (n = n).cyan, + capitalized: n.yellow, + jsxIdentifier: n.yellow, + punctuator: n.yellow, + number: n.magenta, + string: n.green, + regex: n.magenta, + comment: n.grey, + invalid: n.white.bgRed.bold + }; + return function(e, t) { + let n = ""; + for (const {type: r, value: i} of c(t)) { + const t = e[r]; + n += t ? i.split(o).map(e => t(e)).join("\n") : i; + } + return n; + }(r, e); + } + return e; + var n; + }; + r = e("js-tokens"); + i = e("@babel/helper-validator-identifier"); + s = e("chalk"); + const a = new Set([ "as", "async", "from", "get", "of", "set" ]); + const o = /\r\n|[\n\r\u2028\u2029]/; + const l = /^[()[\]{}]$/; + let c; + { + const e = /^[a-z][\w-]*$/i; + const t = function(t, n, r) { + if ("name" === t.type) { + if ((0, i.isKeyword)(t.value) || (0, i.isStrictReservedWord)(t.value, !0) || a.has(t.value)) return "keyword"; + if (e.test(t.value) && ("<" === r[n - 1] || " 0; ) r = t[--i]; + null === r || r.start > n.start ? T(e, n.comments) : g(r, n.comments); + } + class S extends y { + addComment(e) { + this.filename && (e.loc.filename = this.filename); + this.state.comments.push(e); + } + processComment(e) { + const {commentStack: t} = this.state; + const n = t.length; + if (0 === n) return; + let r = n - 1; + const i = t[r]; + if (i.start === e.end) { + i.leadingNode = e; + r--; + } + const {start: s} = e; + for (;r >= 0; r--) { + const n = t[r]; + const i = n.end; + if (!(i > s)) { + i === s && (n.trailingNode = e); + break; + } + n.containingNode = e; + this.finalizeComment(n); + t.splice(r, 1); + } + } + finalizeComment(e) { + const {comments: t} = e; + if (null !== e.leadingNode || null !== e.trailingNode) { + null !== e.leadingNode && g(e.leadingNode, t); + null !== e.trailingNode && (e.trailingNode.leadingComments = t); + } else { + const {containingNode: n, start: r} = e; + if (44 === this.input.charCodeAt(r - 1)) switch (n.type) { + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + b(n, n.properties, e); + break; + + case "CallExpression": + case "OptionalCallExpression": + b(n, n.arguments, e); + break; + + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "ObjectMethod": + case "ClassMethod": + case "ClassPrivateMethod": + b(n, n.params, e); + break; + + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + b(n, n.elements, e); + break; + + case "ExportNamedDeclaration": + case "ImportDeclaration": + b(n, n.specifiers, e); + break; + + default: + T(n, t); + } else T(n, t); + } + } + finalizeRemainingComments() { + const {commentStack: e} = this.state; + for (let t = e.length - 1; t >= 0; t--) this.finalizeComment(e[t]); + this.state.commentStack = []; + } + resetPreviousNodeTrailingComments(e) { + const {commentStack: t} = this.state; + const {length: n} = t; + if (0 === n) return; + const r = t[n - 1]; + r.leadingNode === e && (r.leadingNode = null); + } + } + const x = Object.freeze({ + SyntaxError: "BABEL_PARSER_SYNTAX_ERROR", + SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" + }); + const E = v({ + AccessorIsGenerator: "A %0ter cannot be a generator.", + ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", + AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", + AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", + AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", + AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", + AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", + BadGetterArity: "A 'get' accesor must not have any formal parameters.", + BadSetterArity: "A 'set' accesor must have exactly one formal parameter.", + BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.", + ConstructorClassField: "Classes may not have a field named 'constructor'.", + ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", + ConstructorIsAccessor: "Class constructor may not be an accessor.", + ConstructorIsAsync: "Constructor can't be an async function.", + ConstructorIsGenerator: "Constructor can't be a generator.", + DeclarationMissingInitializer: "'%0' require an initialization value.", + DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.", + DecoratorSemicolon: "Decorators must not be followed by a semicolon.", + DecoratorStaticBlock: "Decorators can't be used with a static block.", + DeletePrivateField: "Deleting a private field is not allowed.", + DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + DuplicateConstructor: "Duplicate constructor in the same class.", + DuplicateDefaultExport: "Only one default export allowed per module.", + DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.", + DuplicateProto: "Redefinition of __proto__ property.", + DuplicateRegExpFlags: "Duplicate regular expression flag.", + ElementAfterRest: "Rest element must be last element.", + EscapedCharNotAnIdentifier: "Invalid Unicode escape.", + ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?", + ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", + ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.", + ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", + ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", + GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", + IllegalBreakContinue: "Unsyntactic %0.", + IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", + IllegalReturn: "'return' outside of function.", + ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?', + ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.", + ImportCallArity: "`import()` requires exactly %0.", + ImportCallNotNewExpression: "Cannot use new with import(...).", + ImportCallSpreadArgument: "`...` is not allowed in `import()`.", + InvalidBigIntLiteral: "Invalid BigIntLiteral.", + InvalidCodePoint: "Code point out of bounds.", + InvalidDecimal: "Invalid decimal.", + InvalidDigit: "Expected number in radix %0.", + InvalidEscapeSequence: "Bad character escape sequence.", + InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", + InvalidEscapedReservedWord: "Escape sequence in keyword %0.", + InvalidIdentifier: "Invalid identifier %0.", + InvalidLhs: "Invalid left-hand side in %0.", + InvalidLhsBinding: "Binding invalid left-hand side in %0.", + InvalidNumber: "Invalid number.", + InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", + InvalidOrUnexpectedToken: "Unexpected character '%0'.", + InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", + InvalidPrivateFieldResolution: "Private name #%0 is not defined.", + InvalidPropertyBindingPattern: "Binding member expression.", + InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", + InvalidRestAssignmentPattern: "Invalid rest operator's argument.", + LabelRedeclaration: "Label '%0' is already declared.", + LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.", + LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", + MalformedRegExpFlags: "Invalid regular expression flag.", + MissingClassName: "A class name is required.", + MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", + MissingSemicolon: "Missing semicolon.", + MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", + MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", + ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", + ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", + ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.', + ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.", + ModuleExportUndefined: "Export '%0' is not defined.", + MultipleDefaultsInSwitch: "Multiple default clauses.", + NewlineAfterThrow: "Illegal newline after throw.", + NoCatchOrFinally: "Missing catch or finally clause.", + NumberIdentifier: "Identifier directly after number.", + NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", + ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", + OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", + OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", + OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", + ParamDupe: "Argument name clash.", + PatternHasAccessor: "Object pattern can't contain getter or setter.", + PatternHasMethod: "Object pattern can't contain methods.", + PipeBodyIsTighter: "Unexpected %0 after pipeline body; any %0 expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", + PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', + PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", + PipeTopicUnconfiguredToken: 'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "%0" }.', + PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", + PipeUnparenthesizedBody: "Hack-style pipe body cannot be an unparenthesized %0 expression; please wrap it in parentheses.", + PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.', + PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.", + PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.", + PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.", + PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.", + PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.', + PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).", + PrivateNameRedeclaration: "Duplicate private name #%0.", + RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + RecordNoProto: "'__proto__' is not allowed in Record expressions.", + RestTrailingComma: "Unexpected trailing comma after rest element.", + SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", + StaticPrototype: "Classes may not have static property named prototype.", + StrictDelete: "Deleting local variable in strict mode.", + StrictEvalArguments: "Assigning to '%0' in strict mode.", + StrictEvalArgumentsBinding: "Binding '%0' in strict mode.", + StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", + StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", + StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", + StrictWith: "'with' in strict mode.", + SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", + SuperPrivateField: "Private fields can't be accessed on super.", + TrailingDecorator: "Decorators must be attached to a class element.", + TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", + UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.', + UnexpectedDigitAfterHash: "Unexpected digit after hash token.", + UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", + UnexpectedKeyword: "Unexpected keyword '%0'.", + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", + UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", + UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", + UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).", + UnexpectedReservedWord: "Unexpected reserved word '%0'.", + UnexpectedSuper: "'super' is only allowed in object methods and classes.", + UnexpectedToken: "Unexpected token '%0'.", + UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", + UnsupportedBind: "Binding should be performed on object property.", + UnsupportedDecoratorExport: "A decorated export must export a class declaration.", + UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", + UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", + UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.", + UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", + UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", + UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", + UnterminatedComment: "Unterminated comment.", + UnterminatedRegExp: "Unterminated regular expression.", + UnterminatedString: "Unterminated string constant.", + UnterminatedTemplate: "Unterminated template.", + VarRedeclaration: "Identifier '%0' has already been declared.", + YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", + YieldInParameter: "Yield expression is not allowed in formal parameters.", + ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." + }, x.SyntaxError); + const P = v({ + ImportMetaOutsideModule: "import.meta may appear only with 'sourceType: \"module\"'", + ImportOutsideModule: "'import' and 'export' may appear only with 'sourceType: \"module\"'" + }, x.SourceTypeModuleError); + function v(e, t, n) { + const r = {}; + Object.keys(e).forEach(i => { + r[i] = Object.freeze({ + code: t, + reasonCode: function(e, t) { + return "flow" === t && "PatternIsOptional" === e ? "OptionalBindingPattern" : e; + }(i, n), + template: e[i] + }); + }); + return Object.freeze(r); + } + class A extends S { + getLocationForPosition(e) { + let t; + return t = e === this.state.start ? this.state.startLoc : e === this.state.lastTokStart ? this.state.lastTokStartLoc : e === this.state.end ? this.state.endLoc : e === this.state.lastTokEnd ? this.state.lastTokEndLoc : function(e, t) { + let n = 1; + let r = 0; + let i; + c.lastIndex = 0; + for (;(i = c.exec(e)) && i.index < t; ) { + n++; + r = c.lastIndex; + } + return new f(n, t - r); + }(this.input, e); + } + raise(e, {code: t, reasonCode: n, template: r}, ...i) { + return this.raiseWithData(e, { + code: t, + reasonCode: n + }, r, ...i); + } + raiseOverwrite(e, {code: t, template: n}, ...r) { + const i = this.getLocationForPosition(e); + const s = n.replace(/%(\d+)/g, (e, t) => r[t]) + ` (${i.line}:${i.column})`; + if (this.options.errorRecovery) { + const t = this.state.errors; + for (let n = t.length - 1; n >= 0; n--) { + const r = t[n]; + if (r.pos === e) return Object.assign(r, { + message: s + }); + if (r.pos < e) break; + } + } + return this._raise({ + code: t, + loc: i, + pos: e + }, s); + } + raiseWithData(e, t, n, ...r) { + const i = this.getLocationForPosition(e); + const s = n.replace(/%(\d+)/g, (e, t) => r[t]) + ` (${i.line}:${i.column})`; + return this._raise(Object.assign({ + loc: i, + pos: e + }, t), s); + } + _raise(e, t) { + const n = new SyntaxError(t); + Object.assign(n, e); + if (this.options.errorRecovery) { + this.isLookahead || this.state.errors.push(n); + return n; + } + throw n; + } + } + r = (e => (class extends e { + parseRegExpLiteral({pattern: e, flags: t}) { + let n = null; + try { + n = new RegExp(e, t); + } catch (e) {} + const r = this.estreeParseLiteral(n); + r.regex = { + pattern: e, + flags: t + }; + return r; + } + parseBigIntLiteral(e) { + let t; + try { + t = BigInt(e); + } catch (e) { + t = null; + } + const n = this.estreeParseLiteral(t); + n.bigint = String(n.value || e); + return n; + } + parseDecimalLiteral(e) { + const t = this.estreeParseLiteral(null); + t.decimal = String(t.value || e); + return t; + } + estreeParseLiteral(e) { + return this.parseLiteral(e, "Literal"); + } + parseStringLiteral(e) { + return this.estreeParseLiteral(e); + } + parseNumericLiteral(e) { + return this.estreeParseLiteral(e); + } + parseNullLiteral() { + return this.estreeParseLiteral(null); + } + parseBooleanLiteral(e) { + return this.estreeParseLiteral(e); + } + directiveToStmt(e) { + const t = e.value; + const n = this.startNodeAt(e.start, e.loc.start); + const r = this.startNodeAt(t.start, t.loc.start); + r.value = t.extra.expressionValue; + r.raw = t.extra.raw; + n.expression = this.finishNodeAt(r, "Literal", t.end, t.loc.end); + n.directive = t.extra.raw.slice(1, -1); + return this.finishNodeAt(n, "ExpressionStatement", e.end, e.loc.end); + } + initFunction(e, t) { + super.initFunction(e, t); + e.expression = !1; + } + checkDeclaration(e) { + null != e && this.isObjectProperty(e) ? this.checkDeclaration(e.value) : super.checkDeclaration(e); + } + getObjectOrClassMethodParams(e) { + return e.value.params; + } + isValidDirective(e) { + var t; + return "ExpressionStatement" === e.type && "Literal" === e.expression.type && "string" == typeof e.expression.value && !(null != (t = e.expression.extra) && t.parenthesized); + } + stmtToDirective(e) { + const t = e.expression.value; + const n = super.stmtToDirective(e); + this.addExtra(n.value, "expressionValue", t); + return n; + } + parseBlockBody(e, ...t) { + super.parseBlockBody(e, ...t); + const n = e.directives.map(e => this.directiveToStmt(e)); + e.body = n.concat(e.body); + delete e.directives; + } + pushClassMethod(e, t, n, r, i, s) { + this.parseMethod(t, n, r, i, s, "ClassMethod", !0); + if (t.typeParameters) { + t.value.typeParameters = t.typeParameters; + delete t.typeParameters; + } + e.body.push(t); + } + parsePrivateName() { + const e = super.parsePrivateName(); + return this.getPluginOption("estree", "classFeatures") ? this.convertPrivateNameToPrivateIdentifier(e) : e; + } + convertPrivateNameToPrivateIdentifier(e) { + const t = super.getPrivateNameSV(e); + delete (e = e).id; + e.name = t; + e.type = "PrivateIdentifier"; + return e; + } + isPrivateName(e) { + return this.getPluginOption("estree", "classFeatures") ? "PrivateIdentifier" === e.type : super.isPrivateName(e); + } + getPrivateNameSV(e) { + return this.getPluginOption("estree", "classFeatures") ? e.name : super.getPrivateNameSV(e); + } + parseLiteral(e, t) { + const n = super.parseLiteral(e, t); + n.raw = n.extra.raw; + delete n.extra; + return n; + } + parseFunctionBody(e, t, n = !1) { + super.parseFunctionBody(e, t, n); + e.expression = "BlockStatement" !== e.body.type; + } + parseMethod(e, t, n, r, i, s, a = !1) { + let o = this.startNode(); + o.kind = e.kind; + (o = super.parseMethod(o, t, n, r, i, s, a)).type = "FunctionExpression"; + delete o.kind; + e.value = o; + "ClassPrivateMethod" === s && (e.computed = !1); + s = "MethodDefinition"; + return this.finishNode(e, s); + } + parseClassProperty(...e) { + const t = super.parseClassProperty(...e); + this.getPluginOption("estree", "classFeatures") && (t.type = "PropertyDefinition"); + return t; + } + parseClassPrivateProperty(...e) { + const t = super.parseClassPrivateProperty(...e); + if (this.getPluginOption("estree", "classFeatures")) { + t.type = "PropertyDefinition"; + t.computed = !1; + } + return t; + } + parseObjectMethod(e, t, n, r, i) { + const s = super.parseObjectMethod(e, t, n, r, i); + if (s) { + s.type = "Property"; + "method" === s.kind && (s.kind = "init"); + s.shorthand = !1; + } + return s; + } + parseObjectProperty(e, t, n, r, i) { + const s = super.parseObjectProperty(e, t, n, r, i); + if (s) { + s.kind = "init"; + s.type = "Property"; + } + return s; + } + isAssignable(e, t) { + return null != e && this.isObjectProperty(e) ? this.isAssignable(e.value, t) : super.isAssignable(e, t); + } + toAssignable(e, t = !1) { + if (null != e && this.isObjectProperty(e)) { + this.toAssignable(e.value, t); + return e; + } + return super.toAssignable(e, t); + } + toAssignableObjectExpressionProp(e, ...t) { + "get" === e.kind || "set" === e.kind ? this.raise(e.key.start, E.PatternHasAccessor) : e.method ? this.raise(e.key.start, E.PatternHasMethod) : super.toAssignableObjectExpressionProp(e, ...t); + } + finishCallExpression(e, t) { + super.finishCallExpression(e, t); + if ("Import" === e.callee.type) { + e.type = "ImportExpression"; + e.source = e.arguments[0]; + if (this.hasPlugin("importAssertions")) { + var n; + e.attributes = null != (n = e.arguments[1]) ? n : null; + } + delete e.arguments; + delete e.callee; + } + return e; + } + toReferencedArguments(e) { + "ImportExpression" !== e.type && super.toReferencedArguments(e); + } + parseExport(e) { + super.parseExport(e); + switch (e.type) { + case "ExportAllDeclaration": + e.exported = null; + break; + + case "ExportNamedDeclaration": + if (1 === e.specifiers.length && "ExportNamespaceSpecifier" === e.specifiers[0].type) { + e.type = "ExportAllDeclaration"; + e.exported = e.specifiers[0].exported; + delete e.specifiers; + } + } + return e; + } + parseSubscript(e, t, n, r, i) { + const s = super.parseSubscript(e, t, n, r, i); + if (i.optionalChainMember) { + "OptionalMemberExpression" !== s.type && "OptionalCallExpression" !== s.type || (s.type = s.type.substring(8)); + if (i.stop) { + const e = this.startNodeAtNode(s); + e.expression = s; + return this.finishNode(e, "ChainExpression"); + } + } else "MemberExpression" !== s.type && "CallExpression" !== s.type || (s.optional = !1); + return s; + } + hasPropertyAsPrivateName(e) { + "ChainExpression" === e.type && (e = e.expression); + return super.hasPropertyAsPrivateName(e); + } + isOptionalChain(e) { + return "ChainExpression" === e.type; + } + isObjectProperty(e) { + return "Property" === e.type && "init" === e.kind && !e.method; + } + isObjectMethod(e) { + return e.method || "get" === e.kind || "set" === e.kind; + } + })); + class w { + constructor(e, t) { + this.token = void 0; + this.preserveSpace = void 0; + this.token = e; + this.preserveSpace = !!t; + } + } + const C = { + brace: new w("{"), + template: new w("`", !0) + }; + const I = !0; + class O { + constructor(e, t = {}) { + this.label = void 0; + this.keyword = void 0; + this.beforeExpr = void 0; + this.startsExpr = void 0; + this.rightAssociative = void 0; + this.isLoop = void 0; + this.isAssign = void 0; + this.prefix = void 0; + this.postfix = void 0; + this.binop = void 0; + this.label = e; + this.keyword = t.keyword; + this.beforeExpr = !!t.beforeExpr; + this.startsExpr = !!t.startsExpr; + this.rightAssociative = !!t.rightAssociative; + this.isLoop = !!t.isLoop; + this.isAssign = !!t.isAssign; + this.prefix = !!t.prefix; + this.postfix = !!t.postfix; + this.binop = null != t.binop ? t.binop : null; + this.updateContext = null; + } + } + const N = new Map(); + function k(e, t = {}) { + t.keyword = e; + const n = U(e, t); + N.set(e, n); + return n; + } + function D(e, t) { + return U(e, { + beforeExpr: I, + binop: t + }); + } + let M = -1; + const _ = []; + const L = []; + const j = []; + const F = []; + const B = []; + const R = []; + function U(e, t = {}) { + var n, r, i, s; + ++M; + L.push(e); + j.push(null != (n = t.binop) ? n : -1); + F.push(null != (r = t.beforeExpr) && r); + B.push(null != (i = t.startsExpr) && i); + R.push(null != (s = t.prefix) && s); + _.push(new O(e, t)); + return M; + } + const V = { + num: U("num", { + startsExpr: !0 + }), + bigint: U("bigint", { + startsExpr: !0 + }), + decimal: U("decimal", { + startsExpr: !0 + }), + regexp: U("regexp", { + startsExpr: !0 + }), + string: U("string", { + startsExpr: !0 + }), + name: U("name", { + startsExpr: !0 + }), + privateName: U("#name", { + startsExpr: !0 + }), + eof: U("eof"), + bracketL: U("[", { + beforeExpr: I, + startsExpr: !0 + }), + bracketHashL: U("#[", { + beforeExpr: I, + startsExpr: !0 + }), + bracketBarL: U("[|", { + beforeExpr: I, + startsExpr: !0 + }), + bracketR: U("]"), + bracketBarR: U("|]"), + braceL: U("{", { + beforeExpr: I, + startsExpr: !0 + }), + braceBarL: U("{|", { + beforeExpr: I, + startsExpr: !0 + }), + braceHashL: U("#{", { + beforeExpr: I, + startsExpr: !0 + }), + braceR: U("}", { + beforeExpr: I + }), + braceBarR: U("|}"), + parenL: U("(", { + beforeExpr: I, + startsExpr: !0 + }), + parenR: U(")"), + comma: U(",", { + beforeExpr: I + }), + semi: U(";", { + beforeExpr: I + }), + colon: U(":", { + beforeExpr: I + }), + doubleColon: U("::", { + beforeExpr: I + }), + dot: U("."), + question: U("?", { + beforeExpr: I + }), + questionDot: U("?."), + arrow: U("=>", { + beforeExpr: I + }), + template: U("template"), + ellipsis: U("...", { + beforeExpr: I + }), + backQuote: U("`", { + startsExpr: !0 + }), + dollarBraceL: U("${", { + beforeExpr: I, + startsExpr: !0 + }), + at: U("@"), + hash: U("#", { + startsExpr: !0 + }), + interpreterDirective: U("#!..."), + eq: U("=", { + beforeExpr: I, + isAssign: !0 + }), + assign: U("_=", { + beforeExpr: I, + isAssign: !0 + }), + slashAssign: U("_=", { + beforeExpr: I, + isAssign: !0 + }), + moduloAssign: U("_=", { + beforeExpr: I, + isAssign: !0 + }), + incDec: U("++/--", { + prefix: !0, + postfix: !0, + startsExpr: !0 + }), + bang: U("!", { + beforeExpr: I, + prefix: !0, + startsExpr: !0 + }), + tilde: U("~", { + beforeExpr: I, + prefix: !0, + startsExpr: !0 + }), + pipeline: D("|>", 0), + nullishCoalescing: D("??", 1), + logicalOR: D("||", 1), + logicalAND: D("&&", 2), + bitwiseOR: D("|", 3), + bitwiseXOR: D("^", 4), + bitwiseAND: D("&", 5), + equality: D("==/!=/===/!==", 6), + relational: D("/<=/>=", 7), + bitShift: D("<>/>>>", 8), + plusMin: U("+/-", { + beforeExpr: I, + binop: 9, + prefix: !0, + startsExpr: !0 + }), + modulo: U("%", { + binop: 10, + startsExpr: !0 + }), + star: U("*", { + binop: 10 + }), + slash: D("/", 10), + exponent: U("**", { + beforeExpr: I, + binop: 11, + rightAssociative: !0 + }), + _in: k("in", { + beforeExpr: I, + binop: 7 + }), + _instanceof: k("instanceof", { + beforeExpr: I, + binop: 7 + }), + _break: k("break"), + _case: k("case", { + beforeExpr: I + }), + _catch: k("catch"), + _continue: k("continue"), + _debugger: k("debugger"), + _default: k("default", { + beforeExpr: I + }), + _else: k("else", { + beforeExpr: I + }), + _finally: k("finally"), + _function: k("function", { + startsExpr: !0 + }), + _if: k("if"), + _return: k("return", { + beforeExpr: I + }), + _switch: k("switch"), + _throw: k("throw", { + beforeExpr: I, + prefix: !0, + startsExpr: !0 + }), + _try: k("try"), + _var: k("var"), + _const: k("const"), + _with: k("with"), + _new: k("new", { + beforeExpr: I, + startsExpr: !0 + }), + _this: k("this", { + startsExpr: !0 + }), + _super: k("super", { + startsExpr: !0 + }), + _class: k("class", { + startsExpr: !0 + }), + _extends: k("extends", { + beforeExpr: I + }), + _export: k("export"), + _import: k("import", { + startsExpr: !0 + }), + _null: k("null", { + startsExpr: !0 + }), + _true: k("true", { + startsExpr: !0 + }), + _false: k("false", { + startsExpr: !0 + }), + _typeof: k("typeof", { + beforeExpr: I, + prefix: !0, + startsExpr: !0 + }), + _void: k("void", { + beforeExpr: I, + prefix: !0, + startsExpr: !0 + }), + _delete: k("delete", { + beforeExpr: I, + prefix: !0, + startsExpr: !0 + }), + _do: k("do", { + isLoop: !0, + beforeExpr: I + }), + _for: k("for", { + isLoop: !0 + }), + _while: k("while", { + isLoop: !0 + }), + jsxName: U("jsxName"), + jsxText: U("jsxText", { + beforeExpr: !0 + }), + jsxTagStart: U("jsxTagStart", { + startsExpr: !0 + }), + jsxTagEnd: U("jsxTagEnd"), + placeholder: U("%%", { + startsExpr: !0 + }) + }; + function K(e) { + return B[e]; + } + function W(e) { + return e >= 57 && e <= 91; + } + function q(e) { + return L[e]; + } + function Y(e) { + return j[e]; + } + function J(e) { + return _[e]; + } + _[16].updateContext = (e => { + e.pop(); + }); + _[13].updateContext = _[15].updateContext = _[31].updateContext = (e => { + e.push(C.brace); + }); + _[30].updateContext = (e => { + e[e.length - 1] === C.template ? e.pop() : e.push(C.template); + }); + _[94].updateContext = (e => { + e.push(C.j_expr, C.j_oTag); + }); + let X = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; + let G = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_"; + const H = new RegExp("[" + X + "]"); + const $ = new RegExp("[" + X + G + "]"); + X = G = null; + const z = [ 0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938 ]; + const Q = [ 509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239 ]; + function Z(e, t) { + let n = 65536; + for (let r = 0, i = t.length; r < i; r += 2) { + if ((n += t[r]) > e) return !1; + if ((n += t[r + 1]) >= e) return !0; + } + return !1; + } + function ee(e) { + return e < 65 ? 36 === e : e <= 90 || (e < 97 ? 95 === e : e <= 122 || (e <= 65535 ? e >= 170 && H.test(String.fromCharCode(e)) : Z(e, z))); + } + function te(e) { + return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e <= 90 || (e < 97 ? 95 === e : e <= 122 || (e <= 65535 ? e >= 170 && $.test(String.fromCharCode(e)) : Z(e, z) || Z(e, Q)))); + } + const ne = [ "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield" ], re = [ "eval", "arguments" ]; + const ie = new Set([ "break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete" ]); + const se = new Set(ne); + const ae = new Set(re); + function oe(e, t) { + return t && "await" === e || "enum" === e; + } + function le(e, t) { + return oe(e, t) || se.has(e); + } + function ce(e) { + return ae.has(e); + } + function pe(e, t) { + return le(e, t) || ce(e); + } + function ue(e) { + return ie.has(e); + } + const de = new Set([ "break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await" ]); + const he = 0, fe = 1, me = 2, ye = 4, ge = 8, Te = 16, be = 32, Se = 64, xe = 128, Ee = fe | me | 256; + const Pe = 1, ve = 2, Ae = 4, we = 8, Ce = 16, Ie = 128, Oe = 256, Ne = 512, ke = 1024, De = 2048; + const Me = Pe | ve | we | Ie, _e = 0 | Pe | we | 0, Le = 0 | Pe | Ae | 0, je = 0 | Pe | Ce | 0, Fe = 0 | ve | Ie, Be = 0 | ve, Re = Pe | ve | we | Oe, Ue = 0 | ke, Ve = 64, Ke = 64 | Pe, We = Re | Ne, qe = 0 | ke, Ye = De; + const Je = 4, Xe = 3; + const Ge = 2 | Je, He = 1 | Je, $e = 2, ze = 1, Qe = 0; + class Ze { + constructor(e) { + this.var = new Set(); + this.lexical = new Set(); + this.functions = new Set(); + this.flags = e; + } + } + class et { + constructor(e, t) { + this.scopeStack = []; + this.undefinedExports = new Map(); + this.undefinedPrivateNames = new Map(); + this.raise = e; + this.inModule = t; + } + get inFunction() { + return (this.currentVarScopeFlags() & me) > 0; + } + get allowSuper() { + return (this.currentThisScopeFlags() & Te) > 0; + } + get allowDirectSuper() { + return (this.currentThisScopeFlags() & be) > 0; + } + get inClass() { + return (this.currentThisScopeFlags() & Se) > 0; + } + get inClassAndNotInNonArrowFunction() { + const e = this.currentThisScopeFlags(); + return (e & Se) > 0 && 0 == (e & me); + } + get inStaticBlock() { + for (let e = this.scopeStack.length - 1; ;e--) { + const {flags: t} = this.scopeStack[e]; + if (t & xe) return !0; + if (t & (Ee | Se)) return !1; + } + } + get inNonArrowFunction() { + return (this.currentThisScopeFlags() & me) > 0; + } + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + createScope(e) { + return new Ze(e); + } + enter(e) { + this.scopeStack.push(this.createScope(e)); + } + exit() { + this.scopeStack.pop(); + } + treatFunctionsAsVarInScope(e) { + return !!(e.flags & me || !this.inModule && e.flags & fe); + } + declareName(e, t, n) { + let r = this.currentScope(); + if (t & we || t & Ce) { + this.checkRedeclarationInScope(r, e, t, n); + t & Ce ? r.functions.add(e) : r.lexical.add(e); + t & we && this.maybeExportDefined(r, e); + } else if (t & Ae) for (let i = this.scopeStack.length - 1; i >= 0; --i) { + r = this.scopeStack[i]; + this.checkRedeclarationInScope(r, e, t, n); + r.var.add(e); + this.maybeExportDefined(r, e); + if (r.flags & Ee) break; + } + this.inModule && r.flags & fe && this.undefinedExports.delete(e); + } + maybeExportDefined(e, t) { + this.inModule && e.flags & fe && this.undefinedExports.delete(t); + } + checkRedeclarationInScope(e, t, n, r) { + this.isRedeclaredInScope(e, t, n) && this.raise(r, E.VarRedeclaration, t); + } + isRedeclaredInScope(e, t, n) { + return !!(n & Pe) && (n & we ? e.lexical.has(t) || e.functions.has(t) || e.var.has(t) : n & Ce ? e.lexical.has(t) || !this.treatFunctionsAsVarInScope(e) && e.var.has(t) : e.lexical.has(t) && !(e.flags & ge && e.lexical.values().next().value === t) || !this.treatFunctionsAsVarInScope(e) && e.functions.has(t)); + } + checkLocalExport(e) { + const {name: t} = e; + const n = this.scopeStack[0]; + n.lexical.has(t) || n.var.has(t) || n.functions.has(t) || this.undefinedExports.set(t, e.start); + } + currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + } + currentVarScopeFlags() { + for (let e = this.scopeStack.length - 1; ;e--) { + const {flags: t} = this.scopeStack[e]; + if (t & Ee) return t; + } + } + currentThisScopeFlags() { + for (let e = this.scopeStack.length - 1; ;e--) { + const {flags: t} = this.scopeStack[e]; + if (t & (Ee | Se) && !(t & ye)) return t; + } + } + } + class tt extends Ze { + constructor(...e) { + super(...e); + this.declareFunctions = new Set(); + } + } + class nt extends et { + createScope(e) { + return new tt(e); + } + declareName(e, t, n) { + const r = this.currentScope(); + if (t & De) { + this.checkRedeclarationInScope(r, e, t, n); + this.maybeExportDefined(r, e); + r.declareFunctions.add(e); + } else super.declareName(...arguments); + } + isRedeclaredInScope(e, t, n) { + return !!super.isRedeclaredInScope(...arguments) || !!(n & De) && (!e.declareFunctions.has(t) && (e.lexical.has(t) || e.functions.has(t))); + } + checkLocalExport(e) { + this.scopeStack[0].declareFunctions.has(e.name) || super.checkLocalExport(e); + } + } + class rt { + constructor() { + this.strict = void 0; + this.curLine = void 0; + this.startLoc = void 0; + this.endLoc = void 0; + this.errors = []; + this.potentialArrowAt = -1; + this.noArrowAt = []; + this.noArrowParamsConversionAt = []; + this.maybeInArrowParameters = !1; + this.inType = !1; + this.noAnonFunctionType = !1; + this.inPropertyName = !1; + this.hasFlowComment = !1; + this.isAmbientContext = !1; + this.inAbstractClass = !1; + this.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + this.soloAwait = !1; + this.inFSharpPipelineDirectBody = !1; + this.labels = []; + this.decoratorStack = [ [] ]; + this.comments = []; + this.commentStack = []; + this.pos = 0; + this.lineStart = 0; + this.type = 7; + this.value = null; + this.start = 0; + this.end = 0; + this.lastTokEndLoc = null; + this.lastTokStartLoc = null; + this.lastTokStart = 0; + this.lastTokEnd = 0; + this.context = [ C.brace ]; + this.exprAllowed = !0; + this.containsEsc = !1; + this.strictErrors = new Map(); + this.tokensLength = 0; + } + init(e) { + this.strict = !1 !== e.strictMode && (!0 === e.strictMode || "module" === e.sourceType); + this.curLine = e.startLine; + this.startLoc = this.endLoc = this.curPosition(); + } + curPosition() { + return new f(this.curLine, this.pos - this.lineStart); + } + clone(e) { + const t = new rt(); + const n = Object.keys(this); + for (let r = 0, i = n.length; r < i; r++) { + const i = n[r]; + let s = this[i]; + !e && Array.isArray(s) && (s = s.slice()); + t[i] = s; + } + return t; + } + } + i = function(e) { + return e >= 48 && e <= 57; + }; + const it = new Set([ 103, 109, 115, 105, 121, 117, 100 ]); + const st = { + decBinOct: [ 46, 66, 69, 79, 95, 98, 101, 111 ], + hex: [ 46, 88, 95, 120 ] + }; + const at = {}; + at.bin = [ 48, 49 ]; + at.oct = [ ...at.bin, 50, 51, 52, 53, 54, 55 ]; + at.dec = [ ...at.oct, 56, 57 ]; + at.hex = [ ...at.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102 ]; + class ot { + constructor(e) { + this.type = e.type; + this.value = e.value; + this.start = e.start; + this.end = e.end; + this.loc = new m(e.startLoc, e.endLoc); + } + } + class lt extends A { + constructor(e, t) { + super(); + this.isLookahead = void 0; + this.tokens = []; + this.state = new rt(); + this.state.init(e); + this.input = t; + this.length = t.length; + this.isLookahead = !1; + } + pushToken(e) { + this.tokens.length = this.state.tokensLength; + this.tokens.push(e); + ++this.state.tokensLength; + } + next() { + this.checkKeywordEscapes(); + this.options.tokens && this.pushToken(new ot(this.state)); + this.state.lastTokEnd = this.state.end; + this.state.lastTokStart = this.state.start; + this.state.lastTokEndLoc = this.state.endLoc; + this.state.lastTokStartLoc = this.state.startLoc; + this.nextToken(); + } + eat(e) { + if (this.match(e)) { + this.next(); + return !0; + } + return !1; + } + match(e) { + return this.state.type === e; + } + createLookaheadState(e) { + return { + pos: e.pos, + value: null, + type: e.type, + start: e.start, + end: e.end, + lastTokEnd: e.end, + context: [ this.curContext() ], + inType: e.inType + }; + } + lookahead() { + const e = this.state; + this.state = this.createLookaheadState(e); + this.isLookahead = !0; + this.nextToken(); + this.isLookahead = !1; + const t = this.state; + this.state = e; + return t; + } + nextTokenStart() { + return this.nextTokenStartSince(this.state.pos); + } + nextTokenStartSince(e) { + u.lastIndex = e; + return u.test(this.input) ? u.lastIndex : e; + } + lookaheadCharCode() { + return this.input.charCodeAt(this.nextTokenStart()); + } + codePointAtPos(e) { + let t = this.input.charCodeAt(e); + if (55296 == (64512 & t) && ++e < this.input.length) { + const n = this.input.charCodeAt(e); + 56320 == (64512 & n) && (t = 65536 + ((1023 & t) << 10) + (1023 & n)); + } + return t; + } + setStrict(e) { + this.state.strict = e; + if (e) { + this.state.strictErrors.forEach((e, t) => this.raise(t, e)); + this.state.strictErrors.clear(); + } + } + curContext() { + return this.state.context[this.state.context.length - 1]; + } + nextToken() { + const e = this.curContext(); + e.preserveSpace || this.skipSpace(); + this.state.start = this.state.pos; + this.isLookahead || (this.state.startLoc = this.state.curPosition()); + this.state.pos >= this.length ? this.finishToken(7) : e === C.template ? this.readTmplToken() : this.getTokenFromCode(this.codePointAtPos(this.state.pos)); + } + skipBlockComment() { + let e; + this.isLookahead || (e = this.state.curPosition()); + const t = this.state.pos; + const n = this.input.indexOf("*/", t + 2); + if (-1 === n) throw this.raise(t, E.UnterminatedComment); + this.state.pos = n + 2; + c.lastIndex = t + 2; + for (;c.test(this.input) && c.lastIndex <= n; ) { + ++this.state.curLine; + this.state.lineStart = c.lastIndex; + } + if (this.isLookahead) return; + const r = { + type: "CommentBlock", + value: this.input.slice(t + 2, n), + start: t, + end: n + 2, + loc: new m(e, this.state.curPosition()) + }; + this.options.tokens && this.pushToken(r); + return r; + } + skipLineComment(e) { + const t = this.state.pos; + let n; + this.isLookahead || (n = this.state.curPosition()); + let r = this.input.charCodeAt(this.state.pos += e); + if (this.state.pos < this.length) for (;!p(r) && ++this.state.pos < this.length; ) r = this.input.charCodeAt(this.state.pos); + if (this.isLookahead) return; + const i = this.state.pos; + const s = { + type: "CommentLine", + value: this.input.slice(t + e, i), + start: t, + end: i, + loc: new m(n, this.state.curPosition()) + }; + this.options.tokens && this.pushToken(s); + return s; + } + skipSpace() { + const e = this.state.pos; + const t = []; + e: for (;this.state.pos < this.length; ) { + const n = this.input.charCodeAt(this.state.pos); + switch (n) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + + case 13: + 10 === this.input.charCodeAt(this.state.pos + 1) && ++this.state.pos; + + case 10: + case 8232: + case 8233: + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + break; + + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: + { + const e = this.skipBlockComment(); + if (void 0 !== e) { + this.addComment(e); + this.options.attachComment && t.push(e); + } + break; + } + + case 47: + { + const e = this.skipLineComment(2); + if (void 0 !== e) { + this.addComment(e); + this.options.attachComment && t.push(e); + } + break; + } + + default: + break e; + } + break; + + default: + if (h(n)) ++this.state.pos; else if (45 !== n || this.inModule) { + if (60 !== n || this.inModule) break e; + { + const e = this.state.pos; + if (33 !== this.input.charCodeAt(e + 1) || 45 !== this.input.charCodeAt(e + 2) || 45 !== this.input.charCodeAt(e + 3)) break e; + { + const e = this.skipLineComment(4); + if (void 0 !== e) { + this.addComment(e); + this.options.attachComment && t.push(e); + } + } + } + } else { + const n = this.state.pos; + if (45 !== this.input.charCodeAt(n + 1) || 62 !== this.input.charCodeAt(n + 2) || !(0 === e || this.state.lineStart > e)) break e; + { + const e = this.skipLineComment(3); + if (void 0 !== e) { + this.addComment(e); + this.options.attachComment && t.push(e); + } + } + } + } + } + if (t.length > 0) { + const n = { + start: e, + end: this.state.pos, + comments: t, + leadingNode: null, + trailingNode: null, + containingNode: null + }; + this.state.commentStack.push(n); + } + } + finishToken(e, t) { + this.state.end = this.state.pos; + const n = this.state.type; + this.state.type = e; + this.state.value = t; + if (!this.isLookahead) { + this.state.endLoc = this.state.curPosition(); + this.updateContext(n); + } + } + readToken_numberSign() { + if (0 === this.state.pos && this.readToken_interpreter()) return; + const e = this.state.pos + 1; + const t = this.codePointAtPos(e); + if (t >= 48 && t <= 57) throw this.raise(this.state.pos, E.UnexpectedDigitAfterHash); + if (123 === t || 91 === t && this.hasPlugin("recordAndTuple")) { + this.expectPlugin("recordAndTuple"); + if ("hash" !== this.getPluginOption("recordAndTuple", "syntaxType")) throw this.raise(this.state.pos, 123 === t ? E.RecordExpressionHashIncorrectStartSyntaxType : E.TupleExpressionHashIncorrectStartSyntaxType); + this.state.pos += 2; + 123 === t ? this.finishToken(15) : this.finishToken(9); + } else if (ee(t)) { + ++this.state.pos; + this.finishToken(6, this.readWord1(t)); + } else if (92 === t) { + ++this.state.pos; + this.finishToken(6, this.readWord1()); + } else this.finishOp(33, 1); + } + readToken_dot() { + const e = this.input.charCodeAt(this.state.pos + 1); + if (e >= 48 && e <= 57) this.readNumber(!0); else if (46 === e && 46 === this.input.charCodeAt(this.state.pos + 2)) { + this.state.pos += 3; + this.finishToken(29); + } else { + ++this.state.pos; + this.finishToken(24); + } + } + readToken_slash() { + 61 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(37, 2) : this.finishOp(55, 1); + } + readToken_interpreter() { + if (0 !== this.state.pos || this.length < 2) return !1; + let e = this.input.charCodeAt(this.state.pos + 1); + if (33 !== e) return !1; + const t = this.state.pos; + this.state.pos += 1; + for (;!p(e) && ++this.state.pos < this.length; ) e = this.input.charCodeAt(this.state.pos); + const n = this.input.slice(t + 2, this.state.pos); + this.finishToken(34, n); + return !0; + } + readToken_mult_modulo(e) { + let t = 42 === e ? 54 : 53; + let n = 1; + let r = this.input.charCodeAt(this.state.pos + 1); + if (42 === e && 42 === r) { + n++; + r = this.input.charCodeAt(this.state.pos + 2); + t = 56; + } + if (61 === r && !this.state.inType) { + n++; + t = 37 === e ? 38 : 36; + } + this.finishOp(t, n); + } + readToken_pipe_amp(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + if (t !== e) { + if (124 === e) { + if (62 === t) { + this.finishOp(42, 2); + return; + } + if (this.hasPlugin("recordAndTuple") && 125 === t) { + if ("bar" !== this.getPluginOption("recordAndTuple", "syntaxType")) throw this.raise(this.state.pos, E.RecordExpressionBarIncorrectEndSyntaxType); + this.state.pos += 2; + this.finishToken(17); + return; + } + if (this.hasPlugin("recordAndTuple") && 93 === t) { + if ("bar" !== this.getPluginOption("recordAndTuple", "syntaxType")) throw this.raise(this.state.pos, E.TupleExpressionBarIncorrectEndSyntaxType); + this.state.pos += 2; + this.finishToken(12); + return; + } + } + 61 !== t ? this.finishOp(124 === e ? 46 : 48, 1) : this.finishOp(36, 2); + } else 61 === this.input.charCodeAt(this.state.pos + 2) ? this.finishOp(36, 3) : this.finishOp(124 === e ? 44 : 45, 2); + } + readToken_caret() { + 61 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(36, 2) : this.finishOp(47, 1); + } + readToken_plus_min(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + t !== e ? 61 === t ? this.finishOp(36, 2) : this.finishOp(52, 1) : this.finishOp(39, 2); + } + readToken_lt_gt(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + let n = 1; + if (t !== e) { + 61 === t && (n = 2); + this.finishOp(50, n); + } else { + n = 62 === e && 62 === this.input.charCodeAt(this.state.pos + 2) ? 3 : 2; + if (61 === this.input.charCodeAt(this.state.pos + n)) { + this.finishOp(36, n + 1); + return; + } + this.finishOp(51, n); + } + } + readToken_eq_excl(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + if (61 !== t) if (61 !== e || 62 !== t) this.finishOp(61 === e ? 35 : 40, 1); else { + this.state.pos += 2; + this.finishToken(27); + } else this.finishOp(49, 61 === this.input.charCodeAt(this.state.pos + 2) ? 3 : 2); + } + readToken_question() { + const e = this.input.charCodeAt(this.state.pos + 1); + const t = this.input.charCodeAt(this.state.pos + 2); + if (63 === e) 61 === t ? this.finishOp(36, 3) : this.finishOp(43, 2); else if (46 !== e || t >= 48 && t <= 57) { + ++this.state.pos; + this.finishToken(25); + } else { + this.state.pos += 2; + this.finishToken(26); + } + } + getTokenFromCode(e) { + switch (e) { + case 46: + this.readToken_dot(); + return; + + case 40: + ++this.state.pos; + this.finishToken(18); + return; + + case 41: + ++this.state.pos; + this.finishToken(19); + return; + + case 59: + ++this.state.pos; + this.finishToken(21); + return; + + case 44: + ++this.state.pos; + this.finishToken(20); + return; + + case 91: + if (this.hasPlugin("recordAndTuple") && 124 === this.input.charCodeAt(this.state.pos + 1)) { + if ("bar" !== this.getPluginOption("recordAndTuple", "syntaxType")) throw this.raise(this.state.pos, E.TupleExpressionBarIncorrectStartSyntaxType); + this.state.pos += 2; + this.finishToken(10); + } else { + ++this.state.pos; + this.finishToken(8); + } + return; + + case 93: + ++this.state.pos; + this.finishToken(11); + return; + + case 123: + if (this.hasPlugin("recordAndTuple") && 124 === this.input.charCodeAt(this.state.pos + 1)) { + if ("bar" !== this.getPluginOption("recordAndTuple", "syntaxType")) throw this.raise(this.state.pos, E.RecordExpressionBarIncorrectStartSyntaxType); + this.state.pos += 2; + this.finishToken(14); + } else { + ++this.state.pos; + this.finishToken(13); + } + return; + + case 125: + ++this.state.pos; + this.finishToken(16); + return; + + case 58: + if (this.hasPlugin("functionBind") && 58 === this.input.charCodeAt(this.state.pos + 1)) this.finishOp(23, 2); else { + ++this.state.pos; + this.finishToken(22); + } + return; + + case 63: + this.readToken_question(); + return; + + case 96: + ++this.state.pos; + this.finishToken(30); + return; + + case 48: + { + const e = this.input.charCodeAt(this.state.pos + 1); + if (120 === e || 88 === e) { + this.readRadixNumber(16); + return; + } + if (111 === e || 79 === e) { + this.readRadixNumber(8); + return; + } + if (98 === e || 66 === e) { + this.readRadixNumber(2); + return; + } + } + + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(!1); + return; + + case 34: + case 39: + this.readString(e); + return; + + case 47: + this.readToken_slash(); + return; + + case 37: + case 42: + this.readToken_mult_modulo(e); + return; + + case 124: + case 38: + this.readToken_pipe_amp(e); + return; + + case 94: + this.readToken_caret(); + return; + + case 43: + case 45: + this.readToken_plus_min(e); + return; + + case 60: + case 62: + this.readToken_lt_gt(e); + return; + + case 61: + case 33: + this.readToken_eq_excl(e); + return; + + case 126: + this.finishOp(41, 1); + return; + + case 64: + ++this.state.pos; + this.finishToken(32); + return; + + case 35: + this.readToken_numberSign(); + return; + + case 92: + this.readWord(); + return; + + default: + if (ee(e)) { + this.readWord(e); + return; + } + } + throw this.raise(this.state.pos, E.InvalidOrUnexpectedToken, String.fromCodePoint(e)); + } + finishOp(e, t) { + const n = this.input.slice(this.state.pos, this.state.pos + t); + this.state.pos += t; + this.finishToken(e, n); + } + readRegexp() { + const e = this.state.start + 1; + let t, n; + let {pos: r} = this.state; + for (;;++r) { + if (r >= this.length) throw this.raise(e, E.UnterminatedRegExp); + const i = this.input.charCodeAt(r); + if (p(i)) throw this.raise(e, E.UnterminatedRegExp); + if (t) t = !1; else { + if (91 === i) n = !0; else if (93 === i && n) n = !1; else if (47 === i && !n) break; + t = 92 === i; + } + } + const i = this.input.slice(e, r); + ++r; + let s = ""; + for (;r < this.length; ) { + const e = this.codePointAtPos(r); + const t = String.fromCharCode(e); + if (it.has(e)) s.includes(t) && this.raise(r + 1, E.DuplicateRegExpFlags); else { + if (!te(e) && 92 !== e) break; + this.raise(r + 1, E.MalformedRegExpFlags); + } + ++r; + s += t; + } + this.state.pos = r; + this.finishToken(3, { + pattern: i, + flags: s + }); + } + readInt(e, t, n, r = !0) { + const s = this.state.pos; + const a = 16 === e ? st.hex : st.decBinOct; + const o = 16 === e ? at.hex : 10 === e ? at.dec : 8 === e ? at.oct : at.bin; + let l = !1; + let c = 0; + for (let s = 0, p = null == t ? 1 / 0 : t; s < p; ++s) { + const t = this.input.charCodeAt(this.state.pos); + let p; + if (95 !== t) { + if ((p = t >= 97 ? t - 97 + 10 : t >= 65 ? t - 65 + 10 : i(t) ? t - 48 : 1 / 0) >= e) if (this.options.errorRecovery && p <= 9) { + p = 0; + this.raise(this.state.start + s + 2, E.InvalidDigit, e); + } else { + if (!n) break; + p = 0; + l = !0; + } + ++this.state.pos; + c = c * e + p; + } else { + const e = this.input.charCodeAt(this.state.pos - 1); + const t = this.input.charCodeAt(this.state.pos + 1); + -1 === o.indexOf(t) ? this.raise(this.state.pos, E.UnexpectedNumericSeparator) : (a.indexOf(e) > -1 || a.indexOf(t) > -1 || Number.isNaN(t)) && this.raise(this.state.pos, E.UnexpectedNumericSeparator); + r || this.raise(this.state.pos, E.NumericSeparatorInEscapeSequence); + ++this.state.pos; + } + } + return this.state.pos === s || null != t && this.state.pos - s !== t || l ? null : c; + } + readRadixNumber(e) { + const t = this.state.pos; + let n = !1; + this.state.pos += 2; + const r = this.readInt(e); + null == r && this.raise(this.state.start + 2, E.InvalidDigit, e); + const i = this.input.charCodeAt(this.state.pos); + if (110 === i) { + ++this.state.pos; + n = !0; + } else if (109 === i) throw this.raise(t, E.InvalidDecimal); + if (ee(this.codePointAtPos(this.state.pos))) throw this.raise(this.state.pos, E.NumberIdentifier); + if (n) { + const e = this.input.slice(t, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(1, e); + } else this.finishToken(0, r); + } + readNumber(e) { + const t = this.state.pos; + let n = !1; + let r = !1; + let i = !1; + let s = !1; + let a = !1; + e || null !== this.readInt(10) || this.raise(t, E.InvalidNumber); + const o = this.state.pos - t >= 2 && 48 === this.input.charCodeAt(t); + if (o) { + const e = this.input.slice(t, this.state.pos); + this.recordStrictModeErrors(t, E.StrictOctalLiteral); + if (!this.state.strict) { + const n = e.indexOf("_"); + n > 0 && this.raise(n + t, E.ZeroDigitNumericSeparator); + } + a = o && !/[89]/.test(e); + } + let l = this.input.charCodeAt(this.state.pos); + if (46 === l && !a) { + ++this.state.pos; + this.readInt(10); + n = !0; + l = this.input.charCodeAt(this.state.pos); + } + if ((69 === l || 101 === l) && !a) { + 43 !== (l = this.input.charCodeAt(++this.state.pos)) && 45 !== l || ++this.state.pos; + null === this.readInt(10) && this.raise(t, E.InvalidOrMissingExponent); + n = !0; + s = !0; + l = this.input.charCodeAt(this.state.pos); + } + if (110 === l) { + (n || o) && this.raise(t, E.InvalidBigIntLiteral); + ++this.state.pos; + r = !0; + } + if (109 === l) { + this.expectPlugin("decimal", this.state.pos); + (s || o) && this.raise(t, E.InvalidDecimal); + ++this.state.pos; + i = !0; + } + if (ee(this.codePointAtPos(this.state.pos))) throw this.raise(this.state.pos, E.NumberIdentifier); + const c = this.input.slice(t, this.state.pos).replace(/[_mn]/g, ""); + if (r) { + this.finishToken(1, c); + return; + } + if (i) { + this.finishToken(2, c); + return; + } + const p = a ? parseInt(c, 8) : parseFloat(c); + this.finishToken(0, p); + } + readCodePoint(e) { + let t; + if (123 === this.input.charCodeAt(this.state.pos)) { + const n = ++this.state.pos; + t = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, !0, e); + ++this.state.pos; + if (null !== t && t > 1114111) { + if (!e) return null; + this.raise(n, E.InvalidCodePoint); + } + } else t = this.readHexChar(4, !1, e); + return t; + } + readString(e) { + let t = "", n = ++this.state.pos; + for (;;) { + if (this.state.pos >= this.length) throw this.raise(this.state.start, E.UnterminatedString); + const r = this.input.charCodeAt(this.state.pos); + if (r === e) break; + if (92 === r) { + t += this.input.slice(n, this.state.pos); + t += this.readEscapedChar(!1); + n = this.state.pos; + } else if (8232 === r || 8233 === r) { + ++this.state.pos; + ++this.state.curLine; + this.state.lineStart = this.state.pos; + } else { + if (p(r)) throw this.raise(this.state.start, E.UnterminatedString); + ++this.state.pos; + } + } + t += this.input.slice(n, this.state.pos++); + this.finishToken(4, t); + } + readTmplToken() { + let e = "", t = this.state.pos, n = !1; + for (;;) { + if (this.state.pos >= this.length) throw this.raise(this.state.start, E.UnterminatedTemplate); + const r = this.input.charCodeAt(this.state.pos); + if (96 === r || 36 === r && 123 === this.input.charCodeAt(this.state.pos + 1)) { + if (this.state.pos === this.state.start && this.match(28)) { + if (36 === r) { + this.state.pos += 2; + this.finishToken(31); + return; + } + ++this.state.pos; + this.finishToken(30); + return; + } + e += this.input.slice(t, this.state.pos); + this.finishToken(28, n ? null : e); + return; + } + if (92 === r) { + e += this.input.slice(t, this.state.pos); + const r = this.readEscapedChar(!0); + null === r ? n = !0 : e += r; + t = this.state.pos; + } else if (p(r)) { + e += this.input.slice(t, this.state.pos); + ++this.state.pos; + switch (r) { + case 13: + 10 === this.input.charCodeAt(this.state.pos) && ++this.state.pos; + + case 10: + e += "\n"; + break; + + default: + e += String.fromCharCode(r); + } + ++this.state.curLine; + this.state.lineStart = this.state.pos; + t = this.state.pos; + } else ++this.state.pos; + } + } + recordStrictModeErrors(e, t) { + this.state.strict && !this.state.strictErrors.has(e) ? this.raise(e, t) : this.state.strictErrors.set(e, t); + } + readEscapedChar(e) { + const t = !e; + const n = this.input.charCodeAt(++this.state.pos); + ++this.state.pos; + switch (n) { + case 110: + return "\n"; + + case 114: + return "\r"; + + case 120: + { + const e = this.readHexChar(2, !1, t); + return null === e ? null : String.fromCharCode(e); + } + + case 117: + { + const e = this.readCodePoint(t); + return null === e ? null : String.fromCodePoint(e); + } + + case 116: + return "\t"; + + case 98: + return "\b"; + + case 118: + return "\v"; + + case 102: + return "\f"; + + case 13: + 10 === this.input.charCodeAt(this.state.pos) && ++this.state.pos; + + case 10: + this.state.lineStart = this.state.pos; + ++this.state.curLine; + + case 8232: + case 8233: + return ""; + + case 56: + case 57: + if (e) return null; + this.recordStrictModeErrors(this.state.pos - 1, E.StrictNumericEscape); + + default: + if (n >= 48 && n <= 55) { + const t = this.state.pos - 1; + let n = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; + let r = parseInt(n, 8); + if (r > 255) { + n = n.slice(0, -1); + r = parseInt(n, 8); + } + this.state.pos += n.length - 1; + const i = this.input.charCodeAt(this.state.pos); + if ("0" !== n || 56 === i || 57 === i) { + if (e) return null; + this.recordStrictModeErrors(t, E.StrictNumericEscape); + } + return String.fromCharCode(r); + } + return String.fromCharCode(n); + } + } + readHexChar(e, t, n) { + const r = this.state.pos; + const i = this.readInt(16, e, t, !1); + null === i && (n ? this.raise(r, E.InvalidEscapeSequence) : this.state.pos = r - 1); + return i; + } + readWord1(e) { + this.state.containsEsc = !1; + let t = ""; + const n = this.state.pos; + let r = this.state.pos; + void 0 !== e && (this.state.pos += e <= 65535 ? 1 : 2); + for (;this.state.pos < this.length; ) { + const e = this.codePointAtPos(this.state.pos); + if (te(e)) this.state.pos += e <= 65535 ? 1 : 2; else { + if (92 !== e) break; + { + this.state.containsEsc = !0; + t += this.input.slice(r, this.state.pos); + const e = this.state.pos; + const i = this.state.pos === n ? ee : te; + if (117 !== this.input.charCodeAt(++this.state.pos)) { + this.raise(this.state.pos, E.MissingUnicodeEscape); + r = this.state.pos - 1; + continue; + } + ++this.state.pos; + const s = this.readCodePoint(!0); + if (null !== s) { + i(s) || this.raise(e, E.EscapedCharNotAnIdentifier); + t += String.fromCodePoint(s); + } + r = this.state.pos; + } + } + } + return t + this.input.slice(r, this.state.pos); + } + readWord(e) { + const t = this.readWord1(e); + const n = N.get(t) || 5; + this.finishToken(n, t); + } + checkKeywordEscapes() { + const {type: e} = this.state; + W(e) && this.state.containsEsc && this.raise(this.state.start, E.InvalidEscapedReservedWord, q(e)); + } + updateContext(e) { + const {context: t, type: n} = this.state; + switch (n) { + case 16: + t.pop(); + break; + + case 13: + case 15: + case 31: + t.push(C.brace); + break; + + case 30: + t[t.length - 1] === C.template ? t.pop() : t.push(C.template); + } + } + } + class ct { + constructor() { + this.privateNames = new Set(); + this.loneAccessors = new Map(); + this.undefinedPrivateNames = new Map(); + } + } + class pt { + constructor(e) { + this.stack = []; + this.undefinedPrivateNames = new Map(); + this.raise = e; + } + current() { + return this.stack[this.stack.length - 1]; + } + enter() { + this.stack.push(new ct()); + } + exit() { + const e = this.stack.pop(); + const t = this.current(); + for (const [n, r] of Array.from(e.undefinedPrivateNames)) t ? t.undefinedPrivateNames.has(n) || t.undefinedPrivateNames.set(n, r) : this.raise(r, E.InvalidPrivateFieldResolution, n); + } + declarePrivateName(e, t, n) { + const r = this.current(); + let i = r.privateNames.has(e); + if (t & Xe) { + const n = i && r.loneAccessors.get(e); + if (n) { + (i = (n & Xe) === (t & Xe) || (n & Je) !== (t & Je)) || r.loneAccessors.delete(e); + } else i || r.loneAccessors.set(e, t); + } + i && this.raise(n, E.PrivateNameRedeclaration, e); + r.privateNames.add(e); + r.undefinedPrivateNames.delete(e); + } + usePrivateName(e, t) { + let n; + for (n of this.stack) if (n.privateNames.has(e)) return; + n ? n.undefinedPrivateNames.set(e, t) : this.raise(t, E.InvalidPrivateFieldResolution, e); + } + } + const ut = 0, dt = 1, ht = 2, ft = 3; + class mt { + constructor(e = ut) { + this.type = void 0; + this.type = e; + } + canBeArrowParameterDeclaration() { + return this.type === ht || this.type === dt; + } + isCertainlyParameterDeclaration() { + return this.type === ft; + } + } + class yt extends mt { + constructor(e) { + super(e); + this.errors = new Map(); + } + recordDeclarationError(e, t) { + this.errors.set(e, t); + } + clearDeclarationError(e) { + this.errors.delete(e); + } + iterateErrors(e) { + this.errors.forEach(e); + } + } + class gt { + constructor(e) { + this.stack = [ new mt() ]; + this.raise = e; + } + enter(e) { + this.stack.push(e); + } + exit() { + this.stack.pop(); + } + recordParameterInitializerError(e, t) { + const {stack: n} = this; + let r = n.length - 1; + let i = n[r]; + for (;!i.isCertainlyParameterDeclaration(); ) { + if (!i.canBeArrowParameterDeclaration()) return; + i.recordDeclarationError(e, t); + i = n[--r]; + } + this.raise(e, t); + } + recordParenthesizedIdentifierError(e, t) { + const {stack: n} = this; + const r = n[n.length - 1]; + if (r.isCertainlyParameterDeclaration()) this.raise(e, t); else { + if (!r.canBeArrowParameterDeclaration()) return; + r.recordDeclarationError(e, t); + } + } + recordAsyncArrowParametersError(e, t) { + const {stack: n} = this; + let r = n.length - 1; + let i = n[r]; + for (;i.canBeArrowParameterDeclaration(); ) { + i.type === ht && i.recordDeclarationError(e, t); + i = n[--r]; + } + } + validateAsPattern() { + const {stack: e} = this; + const t = e[e.length - 1]; + t.canBeArrowParameterDeclaration() && t.iterateErrors((t, n) => { + this.raise(n, t); + let r = e.length - 2; + let i = e[r]; + for (;i.canBeArrowParameterDeclaration(); ) { + i.clearDeclarationError(n); + i = e[--r]; + } + }); + } + } + function Tt() { + return new mt(); + } + const bt = 0, St = 1, xt = 2, Et = 4, Pt = 8; + class vt { + constructor() { + this.stacks = []; + } + enter(e) { + this.stacks.push(e); + } + exit() { + this.stacks.pop(); + } + currentFlags() { + return this.stacks[this.stacks.length - 1]; + } + get hasAwait() { + return (this.currentFlags() & xt) > 0; + } + get hasYield() { + return (this.currentFlags() & St) > 0; + } + get hasReturn() { + return (this.currentFlags() & Et) > 0; + } + get hasIn() { + return (this.currentFlags() & Pt) > 0; + } + } + function At(e, t) { + return (e ? xt : 0) | (t ? St : 0); + } + class wt extends lt { + addExtra(e, t, n) { + if (!e) return; + (e.extra = e.extra || {})[t] = n; + } + isRelational(e) { + return this.match(50) && this.state.value === e; + } + expectRelational(e) { + this.isRelational(e) ? this.next() : this.unexpected(null, 50); + } + isContextual(e) { + return this.match(5) && this.state.value === e && !this.state.containsEsc; + } + isUnparsedContextual(e, t) { + const n = e + t.length; + if (this.input.slice(e, n) === t) { + const e = this.input.charCodeAt(n); + return !(te(e) || 55296 == (64512 & e)); + } + return !1; + } + isLookaheadContextual(e) { + const t = this.nextTokenStart(); + return this.isUnparsedContextual(t, e); + } + eatContextual(e) { + return this.isContextual(e) && this.eat(5); + } + expectContextual(e, t) { + this.eatContextual(e) || this.unexpected(null, t); + } + canInsertSemicolon() { + return this.match(7) || this.match(16) || this.hasPrecedingLineBreak(); + } + hasPrecedingLineBreak() { + return l.test(this.input.slice(this.state.lastTokEnd, this.state.start)); + } + hasFollowingLineBreak() { + d.lastIndex = this.state.end; + return d.test(this.input); + } + isLineTerminator() { + return this.eat(21) || this.canInsertSemicolon(); + } + semicolon(e = !0) { + (e ? this.isLineTerminator() : this.eat(21)) || this.raise(this.state.lastTokEnd, E.MissingSemicolon); + } + expect(e, t) { + this.eat(e) || this.unexpected(t, e); + } + assertNoSpace(e = "Unexpected space.") { + this.state.start > this.state.lastTokEnd && this.raise(this.state.lastTokEnd, { + code: x.SyntaxError, + reasonCode: "UnexpectedSpace", + template: e + }); + } + unexpected(e, t = { + code: x.SyntaxError, + reasonCode: "UnexpectedToken", + template: "Unexpected token" + }) { + "number" == typeof t && (t = { + code: x.SyntaxError, + reasonCode: "UnexpectedToken", + template: `Unexpected token, expected "${q(t)}"` + }); + throw this.raise(null != e ? e : this.state.start, t); + } + expectPlugin(e, t) { + if (!this.hasPlugin(e)) throw this.raiseWithData(null != t ? t : this.state.start, { + missingPlugin: [ e ] + }, `This experimental syntax requires enabling the parser plugin: '${e}'`); + return !0; + } + expectOnePlugin(e, t) { + if (!e.some(e => this.hasPlugin(e))) throw this.raiseWithData(null != t ? t : this.state.start, { + missingPlugin: e + }, `This experimental syntax requires enabling one of the following parser plugin(s): '${e.join(", ")}'`); + } + tryParse(e, t = this.state.clone()) { + const n = { + node: null + }; + try { + const r = e((e = null) => { + n.node = e; + throw n; + }); + if (this.state.errors.length > t.errors.length) { + const e = this.state; + this.state = t; + this.state.tokensLength = e.tokensLength; + return { + node: r, + error: e.errors[t.errors.length], + thrown: !1, + aborted: !1, + failState: e + }; + } + return { + node: r, + error: null, + thrown: !1, + aborted: !1, + failState: null + }; + } catch (e) { + const r = this.state; + this.state = t; + if (e instanceof SyntaxError) return { + node: null, + error: e, + thrown: !0, + aborted: !1, + failState: r + }; + if (e === n) return { + node: n.node, + error: null, + thrown: !1, + aborted: !0, + failState: r + }; + throw e; + } + } + checkExpressionErrors(e, t) { + if (!e) return !1; + const {shorthandAssign: n, doubleProto: r, optionalParameters: i} = e; + if (!t) return n >= 0 || r >= 0 || i >= 0; + n >= 0 && this.unexpected(n); + r >= 0 && this.raise(r, E.DuplicateProto); + i >= 0 && this.unexpected(i); + } + isLiteralPropertyName() { + return this.match(5) || W(this.state.type) || this.match(4) || this.match(0) || this.match(1) || this.match(2); + } + isPrivateName(e) { + return "PrivateName" === e.type; + } + getPrivateNameSV(e) { + return e.id.name; + } + hasPropertyAsPrivateName(e) { + return ("MemberExpression" === e.type || "OptionalMemberExpression" === e.type) && this.isPrivateName(e.property); + } + isOptionalChain(e) { + return "OptionalMemberExpression" === e.type || "OptionalCallExpression" === e.type; + } + isObjectProperty(e) { + return "ObjectProperty" === e.type; + } + isObjectMethod(e) { + return "ObjectMethod" === e.type; + } + initializeScopes(e = "module" === this.options.sourceType) { + const t = this.state.labels; + this.state.labels = []; + const n = this.exportedIdentifiers; + this.exportedIdentifiers = new Set(); + const r = this.inModule; + this.inModule = e; + const i = this.scope; + const s = this.getScopeHandler(); + this.scope = new s(this.raise.bind(this), this.inModule); + const a = this.prodParam; + this.prodParam = new vt(); + const o = this.classScope; + this.classScope = new pt(this.raise.bind(this)); + const l = this.expressionScope; + this.expressionScope = new gt(this.raise.bind(this)); + return () => { + this.state.labels = t; + this.exportedIdentifiers = n; + this.inModule = r; + this.scope = i; + this.prodParam = a; + this.classScope = o; + this.expressionScope = l; + }; + } + enterInitialScopes() { + let e = bt; + this.inModule && (e |= xt); + this.scope.enter(fe); + this.prodParam.enter(e); + } + } + class Ct { + constructor() { + this.shorthandAssign = -1; + this.doubleProto = -1; + this.optionalParameters = -1; + } + } + class It { + constructor(e, t, n) { + this.type = ""; + this.start = t; + this.end = 0; + this.loc = new m(n); + null != e && e.options.ranges && (this.range = [ t, 0 ]); + null != e && e.filename && (this.loc.filename = e.filename); + } + } + const Ot = It.prototype; + Ot.__clone = function() { + const e = new It(); + const t = Object.keys(this); + for (let n = 0, r = t.length; n < r; n++) { + const r = t[n]; + "leadingComments" !== r && "trailingComments" !== r && "innerComments" !== r && (e[r] = this[r]); + } + return e; + }; + function Nt(e) { + const {type: t, start: n, end: r, loc: i, range: s, extra: a, name: o} = e; + const l = Object.create(Ot); + l.type = t; + l.start = n; + l.end = r; + l.loc = i; + l.range = s; + l.extra = a; + l.name = o; + "Placeholder" === t && (l.expectedNode = e.expectedNode); + return l; + } + function kt(e) { + const {type: t, start: n, end: r, loc: i, range: s, extra: a} = e; + if ("Placeholder" === t) return function(e) { + return Nt(e); + }(e); + const o = Object.create(Ot); + o.type = "StringLiteral"; + o.start = n; + o.end = r; + o.loc = i; + o.range = s; + o.extra = a; + o.value = e.value; + return o; + } + class Dt extends wt { + startNode() { + return new It(this, this.state.start, this.state.startLoc); + } + startNodeAt(e, t) { + return new It(this, e, t); + } + startNodeAtNode(e) { + return this.startNodeAt(e.start, e.loc.start); + } + finishNode(e, t) { + return this.finishNodeAt(e, t, this.state.lastTokEnd, this.state.lastTokEndLoc); + } + finishNodeAt(e, t, n, r) { + e.type = t; + e.end = n; + e.loc.end = r; + this.options.ranges && (e.range[1] = n); + this.options.attachComment && this.processComment(e); + return e; + } + resetStartLocation(e, t, n) { + e.start = t; + e.loc.start = n; + this.options.ranges && (e.range[0] = t); + } + resetEndLocation(e, t = this.state.lastTokEnd, n = this.state.lastTokEndLoc) { + e.end = t; + e.loc.end = n; + this.options.ranges && (e.range[1] = t); + } + resetStartLocationFromNode(e, t) { + this.resetStartLocation(e, t.start, t.loc.start); + } + } + const Mt = new Set([ "_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void" ]); + const _t = v({ + AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", + AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", + AssignReservedType: "Cannot overwrite reserved type %0.", + DeclareClassElement: "The `declare` modifier can only appear on class fields.", + DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", + DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", + EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.", + EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.", + EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.", + EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.", + EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.", + EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.", + EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.", + EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.", + EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.", + EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.", + EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.", + GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", + ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", + InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", + InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", + InexactVariance: "Explicit inexact syntax cannot have variance.", + InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", + MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", + NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", + NestedFlowComment: "Cannot have a flow comment inside another flow comment.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", + SpreadVariance: "Spread properties cannot have variance.", + ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", + ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", + ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", + ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", + ThisParamNoDefault: "The `this` parameter may not have a default value.", + TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", + UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", + UnexpectedReservedType: "Unexpected reserved type %0.", + UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", + UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", + UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", + UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".', + UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", + UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.", + UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.", + UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", + UnterminatedFlowComment: "Unterminated flow-comment." + }, x.SyntaxError, "flow"); + function Lt(e) { + return "type" === e.importKind || "typeof" === e.importKind; + } + function jt(e) { + return (5 === e.type || W(e.type)) && "from" !== e.value; + } + const Ft = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" + }; + const Bt = /\*?\s*@((?:no)?flow)\b/; + s = (e => (class extends e { + constructor(...e) { + super(...e); + this.flowPragma = void 0; + } + getScopeHandler() { + return nt; + } + shouldParseTypes() { + return this.getPluginOption("flow", "all") || "flow" === this.flowPragma; + } + shouldParseEnums() { + return !!this.getPluginOption("flow", "enums"); + } + finishToken(e, t) { + 4 !== e && 21 !== e && 34 !== e && void 0 === this.flowPragma && (this.flowPragma = null); + return super.finishToken(e, t); + } + addComment(e) { + if (void 0 === this.flowPragma) { + const t = Bt.exec(e.value); + if (t) if ("flow" === t[1]) this.flowPragma = "flow"; else { + if ("noflow" !== t[1]) throw new Error("Unexpected flow pragma"); + this.flowPragma = "noflow"; + } else ; + } + return super.addComment(e); + } + flowParseTypeInitialiser(e) { + const t = this.state.inType; + this.state.inType = !0; + this.expect(e || 22); + const n = this.flowParseType(); + this.state.inType = t; + return n; + } + flowParsePredicate() { + const e = this.startNode(); + const t = this.state.start; + this.next(); + this.expectContextual("checks"); + this.state.lastTokStart > t + 1 && this.raise(t, _t.UnexpectedSpaceBetweenModuloChecks); + if (this.eat(18)) { + e.value = this.parseExpression(); + this.expect(19); + return this.finishNode(e, "DeclaredPredicate"); + } + return this.finishNode(e, "InferredPredicate"); + } + flowParseTypeAndPredicateInitialiser() { + const e = this.state.inType; + this.state.inType = !0; + this.expect(22); + let t = null; + let n = null; + if (this.match(53)) { + this.state.inType = e; + n = this.flowParsePredicate(); + } else { + t = this.flowParseType(); + this.state.inType = e; + this.match(53) && (n = this.flowParsePredicate()); + } + return [ t, n ]; + } + flowParseDeclareClass(e) { + this.next(); + this.flowParseInterfaceish(e, !0); + return this.finishNode(e, "DeclareClass"); + } + flowParseDeclareFunction(e) { + this.next(); + const t = e.id = this.parseIdentifier(); + const n = this.startNode(); + const r = this.startNode(); + this.isRelational("<") ? n.typeParameters = this.flowParseTypeParameterDeclaration() : n.typeParameters = null; + this.expect(18); + const i = this.flowParseFunctionTypeParams(); + n.params = i.params; + n.rest = i.rest; + n.this = i._this; + this.expect(19); + [n.returnType, e.predicate] = this.flowParseTypeAndPredicateInitialiser(); + r.typeAnnotation = this.finishNode(n, "FunctionTypeAnnotation"); + t.typeAnnotation = this.finishNode(r, "TypeAnnotation"); + this.resetEndLocation(t); + this.semicolon(); + this.scope.declareName(e.id.name, Ye, e.id.start); + return this.finishNode(e, "DeclareFunction"); + } + flowParseDeclare(e, t) { + if (this.match(79)) return this.flowParseDeclareClass(e); + if (this.match(67)) return this.flowParseDeclareFunction(e); + if (this.match(73)) return this.flowParseDeclareVariable(e); + if (this.eatContextual("module")) { + if (this.match(24)) return this.flowParseDeclareModuleExports(e); + t && this.raise(this.state.lastTokStart, _t.NestedDeclareModule); + return this.flowParseDeclareModule(e); + } + if (this.isContextual("type")) return this.flowParseDeclareTypeAlias(e); + if (this.isContextual("opaque")) return this.flowParseDeclareOpaqueType(e); + if (this.isContextual("interface")) return this.flowParseDeclareInterface(e); + if (this.match(81)) return this.flowParseDeclareExportDeclaration(e, t); + throw this.unexpected(); + } + flowParseDeclareVariable(e) { + this.next(); + e.id = this.flowParseTypeAnnotatableIdentifier(!0); + this.scope.declareName(e.id.name, Le, e.id.start); + this.semicolon(); + return this.finishNode(e, "DeclareVariable"); + } + flowParseDeclareModule(e) { + this.scope.enter(he); + this.match(4) ? e.id = this.parseExprAtom() : e.id = this.parseIdentifier(); + const t = e.body = this.startNode(); + const n = t.body = []; + this.expect(13); + for (;!this.match(16); ) { + let e = this.startNode(); + if (this.match(82)) { + this.next(); + this.isContextual("type") || this.match(86) || this.raise(this.state.lastTokStart, _t.InvalidNonTypeImportInDeclareModule); + this.parseImport(e); + } else { + this.expectContextual("declare", _t.UnsupportedStatementInDeclareModule); + e = this.flowParseDeclare(e, !0); + } + n.push(e); + } + this.scope.exit(); + this.expect(16); + this.finishNode(t, "BlockStatement"); + let r = null; + let i = !1; + n.forEach(e => { + if ("DeclareExportAllDeclaration" === (e = e).type || "DeclareExportDeclaration" === e.type && (!e.declaration || "TypeAlias" !== e.declaration.type && "InterfaceDeclaration" !== e.declaration.type)) { + "CommonJS" === r && this.raise(e.start, _t.AmbiguousDeclareModuleKind); + r = "ES"; + } else if ("DeclareModuleExports" === e.type) { + i && this.raise(e.start, _t.DuplicateDeclareModuleExports); + "ES" === r && this.raise(e.start, _t.AmbiguousDeclareModuleKind); + r = "CommonJS"; + i = !0; + } + }); + var s; + e.kind = r || "CommonJS"; + return this.finishNode(e, "DeclareModule"); + } + flowParseDeclareExportDeclaration(e, t) { + this.expect(81); + if (this.eat(64)) { + if (this.match(67) || this.match(79)) e.declaration = this.flowParseDeclare(this.startNode()); else { + e.declaration = this.flowParseType(); + this.semicolon(); + } + e.default = !0; + return this.finishNode(e, "DeclareExportDeclaration"); + } + if (this.match(74) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !t) { + const e = this.state.value; + const t = Ft[e]; + throw this.raise(this.state.start, _t.UnsupportedDeclareExportKind, e, t); + } + if (this.match(73) || this.match(67) || this.match(79) || this.isContextual("opaque")) { + e.declaration = this.flowParseDeclare(this.startNode()); + e.default = !1; + return this.finishNode(e, "DeclareExportDeclaration"); + } + if (this.match(54) || this.match(13) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { + if ("ExportNamedDeclaration" === (e = this.parseExport(e)).type) { + e.type = "ExportDeclaration"; + e.default = !1; + delete e.exportKind; + } + e.type = "Declare" + e.type; + return e; + } + throw this.unexpected(); + } + flowParseDeclareModuleExports(e) { + this.next(); + this.expectContextual("exports"); + e.typeAnnotation = this.flowParseTypeAnnotation(); + this.semicolon(); + return this.finishNode(e, "DeclareModuleExports"); + } + flowParseDeclareTypeAlias(e) { + this.next(); + this.flowParseTypeAlias(e); + e.type = "DeclareTypeAlias"; + return e; + } + flowParseDeclareOpaqueType(e) { + this.next(); + this.flowParseOpaqueType(e, !0); + e.type = "DeclareOpaqueType"; + return e; + } + flowParseDeclareInterface(e) { + this.next(); + this.flowParseInterfaceish(e); + return this.finishNode(e, "DeclareInterface"); + } + flowParseInterfaceish(e, t = !1) { + e.id = this.flowParseRestrictedIdentifier(!t, !0); + this.scope.declareName(e.id.name, t ? je : _e, e.id.start); + this.isRelational("<") ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null; + e.extends = []; + e.implements = []; + e.mixins = []; + if (this.eat(80)) do { + e.extends.push(this.flowParseInterfaceExtends()); + } while (!t && this.eat(20)); + if (this.isContextual("mixins")) { + this.next(); + do { + e.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(20)); + } + if (this.isContextual("implements")) { + this.next(); + do { + e.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(20)); + } + e.body = this.flowParseObjectType({ + allowStatic: t, + allowExact: !1, + allowSpread: !1, + allowProto: t, + allowInexact: !1 + }); + } + flowParseInterfaceExtends() { + const e = this.startNode(); + e.id = this.flowParseQualifiedTypeIdentifier(); + this.isRelational("<") ? e.typeParameters = this.flowParseTypeParameterInstantiation() : e.typeParameters = null; + return this.finishNode(e, "InterfaceExtends"); + } + flowParseInterface(e) { + this.flowParseInterfaceish(e); + return this.finishNode(e, "InterfaceDeclaration"); + } + checkNotUnderscore(e) { + "_" === e && this.raise(this.state.start, _t.UnexpectedReservedUnderscore); + } + checkReservedType(e, t, n) { + Mt.has(e) && this.raise(t, n ? _t.AssignReservedType : _t.UnexpectedReservedType, e); + } + flowParseRestrictedIdentifier(e, t) { + this.checkReservedType(this.state.value, this.state.start, t); + return this.parseIdentifier(e); + } + flowParseTypeAlias(e) { + e.id = this.flowParseRestrictedIdentifier(!1, !0); + this.scope.declareName(e.id.name, _e, e.id.start); + this.isRelational("<") ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null; + e.right = this.flowParseTypeInitialiser(35); + this.semicolon(); + return this.finishNode(e, "TypeAlias"); + } + flowParseOpaqueType(e, t) { + this.expectContextual("type"); + e.id = this.flowParseRestrictedIdentifier(!0, !0); + this.scope.declareName(e.id.name, _e, e.id.start); + this.isRelational("<") ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null; + e.supertype = null; + this.match(22) && (e.supertype = this.flowParseTypeInitialiser(22)); + e.impltype = null; + t || (e.impltype = this.flowParseTypeInitialiser(35)); + this.semicolon(); + return this.finishNode(e, "OpaqueType"); + } + flowParseTypeParameter(e = !1) { + const t = this.state.start; + const n = this.startNode(); + const r = this.flowParseVariance(); + const i = this.flowParseTypeAnnotatableIdentifier(); + n.name = i.name; + n.variance = r; + n.bound = i.typeAnnotation; + if (this.match(35)) { + this.eat(35); + n.default = this.flowParseType(); + } else e && this.raise(t, _t.MissingTypeParamDefault); + return this.finishNode(n, "TypeParameter"); + } + flowParseTypeParameterDeclaration() { + const e = this.state.inType; + const t = this.startNode(); + t.params = []; + this.state.inType = !0; + this.isRelational("<") || this.match(94) ? this.next() : this.unexpected(); + let n = !1; + do { + const e = this.flowParseTypeParameter(n); + t.params.push(e); + e.default && (n = !0); + this.isRelational(">") || this.expect(20); + } while (!this.isRelational(">")); + this.expectRelational(">"); + this.state.inType = e; + return this.finishNode(t, "TypeParameterDeclaration"); + } + flowParseTypeParameterInstantiation() { + const e = this.startNode(); + const t = this.state.inType; + e.params = []; + this.state.inType = !0; + this.expectRelational("<"); + const n = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = !1; + for (;!this.isRelational(">"); ) { + e.params.push(this.flowParseType()); + this.isRelational(">") || this.expect(20); + } + this.state.noAnonFunctionType = n; + this.expectRelational(">"); + this.state.inType = t; + return this.finishNode(e, "TypeParameterInstantiation"); + } + flowParseTypeParameterInstantiationCallOrNew() { + const e = this.startNode(); + const t = this.state.inType; + e.params = []; + this.state.inType = !0; + this.expectRelational("<"); + for (;!this.isRelational(">"); ) { + e.params.push(this.flowParseTypeOrImplicitInstantiation()); + this.isRelational(">") || this.expect(20); + } + this.expectRelational(">"); + this.state.inType = t; + return this.finishNode(e, "TypeParameterInstantiation"); + } + flowParseInterfaceType() { + const e = this.startNode(); + this.expectContextual("interface"); + e.extends = []; + if (this.eat(80)) do { + e.extends.push(this.flowParseInterfaceExtends()); + } while (this.eat(20)); + e.body = this.flowParseObjectType({ + allowStatic: !1, + allowExact: !1, + allowSpread: !1, + allowProto: !1, + allowInexact: !1 + }); + return this.finishNode(e, "InterfaceTypeAnnotation"); + } + flowParseObjectPropertyKey() { + return this.match(0) || this.match(4) ? this.parseExprAtom() : this.parseIdentifier(!0); + } + flowParseObjectTypeIndexer(e, t, n) { + e.static = t; + if (22 === this.lookahead().type) { + e.id = this.flowParseObjectPropertyKey(); + e.key = this.flowParseTypeInitialiser(); + } else { + e.id = null; + e.key = this.flowParseType(); + } + this.expect(11); + e.value = this.flowParseTypeInitialiser(); + e.variance = n; + return this.finishNode(e, "ObjectTypeIndexer"); + } + flowParseObjectTypeInternalSlot(e, t) { + e.static = t; + e.id = this.flowParseObjectPropertyKey(); + this.expect(11); + this.expect(11); + if (this.isRelational("<") || this.match(18)) { + e.method = !0; + e.optional = !1; + e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.start, e.loc.start)); + } else { + e.method = !1; + this.eat(25) && (e.optional = !0); + e.value = this.flowParseTypeInitialiser(); + } + return this.finishNode(e, "ObjectTypeInternalSlot"); + } + flowParseObjectTypeMethodish(e) { + e.params = []; + e.rest = null; + e.typeParameters = null; + e.this = null; + this.isRelational("<") && (e.typeParameters = this.flowParseTypeParameterDeclaration()); + this.expect(18); + if (this.match(77)) { + e.this = this.flowParseFunctionTypeParam(!0); + e.this.name = null; + this.match(19) || this.expect(20); + } + for (;!this.match(19) && !this.match(29); ) { + e.params.push(this.flowParseFunctionTypeParam(!1)); + this.match(19) || this.expect(20); + } + this.eat(29) && (e.rest = this.flowParseFunctionTypeParam(!1)); + this.expect(19); + e.returnType = this.flowParseTypeInitialiser(); + return this.finishNode(e, "FunctionTypeAnnotation"); + } + flowParseObjectTypeCallProperty(e, t) { + const n = this.startNode(); + e.static = t; + e.value = this.flowParseObjectTypeMethodish(n); + return this.finishNode(e, "ObjectTypeCallProperty"); + } + flowParseObjectType({allowStatic: e, allowExact: t, allowSpread: n, allowProto: r, allowInexact: i}) { + const s = this.state.inType; + this.state.inType = !0; + const a = this.startNode(); + a.callProperties = []; + a.properties = []; + a.indexers = []; + a.internalSlots = []; + let o; + let l; + let c = !1; + if (t && this.match(14)) { + this.expect(14); + o = 17; + l = !0; + } else { + this.expect(13); + o = 16; + l = !1; + } + a.exact = l; + for (;!this.match(o); ) { + let t = !1; + let s = null; + let o = null; + const p = this.startNode(); + if (r && this.isContextual("proto")) { + const t = this.lookahead(); + if (22 !== t.type && 25 !== t.type) { + this.next(); + s = this.state.start; + e = !1; + } + } + if (e && this.isContextual("static")) { + const e = this.lookahead(); + if (22 !== e.type && 25 !== e.type) { + this.next(); + t = !0; + } + } + const u = this.flowParseVariance(); + if (this.eat(8)) { + null != s && this.unexpected(s); + if (this.eat(8)) { + u && this.unexpected(u.start); + a.internalSlots.push(this.flowParseObjectTypeInternalSlot(p, t)); + } else a.indexers.push(this.flowParseObjectTypeIndexer(p, t, u)); + } else if (this.match(18) || this.isRelational("<")) { + null != s && this.unexpected(s); + u && this.unexpected(u.start); + a.callProperties.push(this.flowParseObjectTypeCallProperty(p, t)); + } else { + let e = "init"; + if (this.isContextual("get") || this.isContextual("set")) { + const t = this.lookahead(); + if (5 === t.type || 4 === t.type || 0 === t.type) { + e = this.state.value; + this.next(); + } + } + const r = this.flowParseObjectTypeProperty(p, t, s, u, e, n, null != i ? i : !l); + if (null === r) { + c = !0; + o = this.state.lastTokStart; + } else a.properties.push(r); + } + this.flowObjectTypeSemicolon(); + !o || this.match(16) || this.match(17) || this.raise(o, _t.UnexpectedExplicitInexactInObject); + } + this.expect(o); + n && (a.inexact = c); + const p = this.finishNode(a, "ObjectTypeAnnotation"); + this.state.inType = s; + return p; + } + flowParseObjectTypeProperty(e, t, n, r, i, s, a) { + if (this.eat(29)) { + if (this.match(20) || this.match(21) || this.match(16) || this.match(17)) { + s ? a || this.raise(this.state.lastTokStart, _t.InexactInsideExact) : this.raise(this.state.lastTokStart, _t.InexactInsideNonObject); + r && this.raise(r.start, _t.InexactVariance); + return null; + } + s || this.raise(this.state.lastTokStart, _t.UnexpectedSpreadType); + null != n && this.unexpected(n); + r && this.raise(r.start, _t.SpreadVariance); + e.argument = this.flowParseType(); + return this.finishNode(e, "ObjectTypeSpreadProperty"); + } + { + e.key = this.flowParseObjectPropertyKey(); + e.static = t; + e.proto = null != n; + e.kind = i; + let a = !1; + if (this.isRelational("<") || this.match(18)) { + e.method = !0; + null != n && this.unexpected(n); + r && this.unexpected(r.start); + e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.start, e.loc.start)); + "get" !== i && "set" !== i || this.flowCheckGetterSetterParams(e); + !s && "constructor" === e.key.name && e.value.this && this.raise(e.value.this.start, _t.ThisParamBannedInConstructor); + } else { + "init" !== i && this.unexpected(); + e.method = !1; + this.eat(25) && (a = !0); + e.value = this.flowParseTypeInitialiser(); + e.variance = r; + } + e.optional = a; + return this.finishNode(e, "ObjectTypeProperty"); + } + } + flowCheckGetterSetterParams(e) { + const t = "get" === e.kind ? 0 : 1; + const n = e.start; + const r = e.value.params.length + (e.value.rest ? 1 : 0); + e.value.this && this.raise(e.value.this.start, "get" === e.kind ? _t.GetterMayNotHaveThisParam : _t.SetterMayNotHaveThisParam); + r !== t && ("get" === e.kind ? this.raise(n, E.BadGetterArity) : this.raise(n, E.BadSetterArity)); + "set" === e.kind && e.value.rest && this.raise(n, E.BadSetterRestParameter); + } + flowObjectTypeSemicolon() { + this.eat(21) || this.eat(20) || this.match(16) || this.match(17) || this.unexpected(); + } + flowParseQualifiedTypeIdentifier(e, t, n) { + e = e || this.state.start; + t = t || this.state.startLoc; + let r = n || this.flowParseRestrictedIdentifier(!0); + for (;this.eat(24); ) { + const n = this.startNodeAt(e, t); + n.qualification = r; + n.id = this.flowParseRestrictedIdentifier(!0); + r = this.finishNode(n, "QualifiedTypeIdentifier"); + } + return r; + } + flowParseGenericType(e, t, n) { + const r = this.startNodeAt(e, t); + r.typeParameters = null; + r.id = this.flowParseQualifiedTypeIdentifier(e, t, n); + this.isRelational("<") && (r.typeParameters = this.flowParseTypeParameterInstantiation()); + return this.finishNode(r, "GenericTypeAnnotation"); + } + flowParseTypeofType() { + const e = this.startNode(); + this.expect(86); + e.argument = this.flowParsePrimaryType(); + return this.finishNode(e, "TypeofTypeAnnotation"); + } + flowParseTupleType() { + const e = this.startNode(); + e.types = []; + this.expect(8); + for (;this.state.pos < this.length && !this.match(11); ) { + e.types.push(this.flowParseType()); + if (this.match(11)) break; + this.expect(20); + } + this.expect(11); + return this.finishNode(e, "TupleTypeAnnotation"); + } + flowParseFunctionTypeParam(e) { + let t = null; + let n = !1; + let r = null; + const i = this.startNode(); + const s = this.lookahead(); + const a = 77 === this.state.type; + if (22 === s.type || 25 === s.type) { + a && !e && this.raise(i.start, _t.ThisParamMustBeFirst); + t = this.parseIdentifier(a); + if (this.eat(25)) { + n = !0; + a && this.raise(i.start, _t.ThisParamMayNotBeOptional); + } + r = this.flowParseTypeInitialiser(); + } else r = this.flowParseType(); + i.name = t; + i.optional = n; + i.typeAnnotation = r; + return this.finishNode(i, "FunctionTypeParam"); + } + reinterpretTypeAsFunctionTypeParam(e) { + const t = this.startNodeAt(e.start, e.loc.start); + t.name = null; + t.optional = !1; + t.typeAnnotation = e; + return this.finishNode(t, "FunctionTypeParam"); + } + flowParseFunctionTypeParams(e = []) { + let t = null; + let n = null; + if (this.match(77)) { + (n = this.flowParseFunctionTypeParam(!0)).name = null; + this.match(19) || this.expect(20); + } + for (;!this.match(19) && !this.match(29); ) { + e.push(this.flowParseFunctionTypeParam(!1)); + this.match(19) || this.expect(20); + } + this.eat(29) && (t = this.flowParseFunctionTypeParam(!1)); + return { + params: e, + rest: t, + _this: n + }; + } + flowIdentToTypeAnnotation(e, t, n, r) { + switch (r.name) { + case "any": + return this.finishNode(n, "AnyTypeAnnotation"); + + case "bool": + case "boolean": + return this.finishNode(n, "BooleanTypeAnnotation"); + + case "mixed": + return this.finishNode(n, "MixedTypeAnnotation"); + + case "empty": + return this.finishNode(n, "EmptyTypeAnnotation"); + + case "number": + return this.finishNode(n, "NumberTypeAnnotation"); + + case "string": + return this.finishNode(n, "StringTypeAnnotation"); + + case "symbol": + return this.finishNode(n, "SymbolTypeAnnotation"); + + default: + this.checkNotUnderscore(r.name); + return this.flowParseGenericType(e, t, r); + } + } + flowParsePrimaryType() { + const e = this.state.start; + const t = this.state.startLoc; + const n = this.startNode(); + let r; + let i; + let s = !1; + const a = this.state.noAnonFunctionType; + switch (this.state.type) { + case 5: + return this.isContextual("interface") ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(e, t, n, this.parseIdentifier()); + + case 13: + return this.flowParseObjectType({ + allowStatic: !1, + allowExact: !1, + allowSpread: !0, + allowProto: !1, + allowInexact: !0 + }); + + case 14: + return this.flowParseObjectType({ + allowStatic: !1, + allowExact: !0, + allowSpread: !0, + allowProto: !1, + allowInexact: !1 + }); + + case 8: + this.state.noAnonFunctionType = !1; + i = this.flowParseTupleType(); + this.state.noAnonFunctionType = a; + return i; + + case 50: + if ("<" === this.state.value) { + n.typeParameters = this.flowParseTypeParameterDeclaration(); + this.expect(18); + r = this.flowParseFunctionTypeParams(); + n.params = r.params; + n.rest = r.rest; + n.this = r._this; + this.expect(19); + this.expect(27); + n.returnType = this.flowParseType(); + return this.finishNode(n, "FunctionTypeAnnotation"); + } + break; + + case 18: + this.next(); + if (!this.match(19) && !this.match(29)) if (this.match(5) || this.match(77)) { + const e = this.lookahead().type; + s = 25 !== e && 22 !== e; + } else s = !0; + if (s) { + this.state.noAnonFunctionType = !1; + i = this.flowParseType(); + this.state.noAnonFunctionType = a; + if (this.state.noAnonFunctionType || !(this.match(20) || this.match(19) && 27 === this.lookahead().type)) { + this.expect(19); + return i; + } + this.eat(20); + } + r = i ? this.flowParseFunctionTypeParams([ this.reinterpretTypeAsFunctionTypeParam(i) ]) : this.flowParseFunctionTypeParams(); + n.params = r.params; + n.rest = r.rest; + n.this = r._this; + this.expect(19); + this.expect(27); + n.returnType = this.flowParseType(); + n.typeParameters = null; + return this.finishNode(n, "FunctionTypeAnnotation"); + + case 4: + return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + + case 84: + case 85: + n.value = this.match(84); + this.next(); + return this.finishNode(n, "BooleanLiteralTypeAnnotation"); + + case 52: + if ("-" === this.state.value) { + this.next(); + if (this.match(0)) return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", n); + if (this.match(1)) return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", n); + throw this.raise(this.state.start, _t.UnexpectedSubtractionOperand); + } + throw this.unexpected(); + + case 0: + return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + + case 1: + return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); + + case 87: + this.next(); + return this.finishNode(n, "VoidTypeAnnotation"); + + case 83: + this.next(); + return this.finishNode(n, "NullLiteralTypeAnnotation"); + + case 77: + this.next(); + return this.finishNode(n, "ThisTypeAnnotation"); + + case 54: + this.next(); + return this.finishNode(n, "ExistsTypeAnnotation"); + + case 86: + return this.flowParseTypeofType(); + + default: + if (W(this.state.type)) { + const e = q(this.state.type); + this.next(); + return super.createIdentifier(n, e); + } + } + throw this.unexpected(); + } + flowParsePostfixType() { + const e = this.state.start; + const t = this.state.startLoc; + let n = this.flowParsePrimaryType(); + let r = !1; + for (;(this.match(8) || this.match(26)) && !this.canInsertSemicolon(); ) { + const i = this.startNodeAt(e, t); + const s = this.eat(26); + r = r || s; + this.expect(8); + if (!s && this.match(11)) { + i.elementType = n; + this.next(); + n = this.finishNode(i, "ArrayTypeAnnotation"); + } else { + i.objectType = n; + i.indexType = this.flowParseType(); + this.expect(11); + if (r) { + i.optional = s; + n = this.finishNode(i, "OptionalIndexedAccessType"); + } else n = this.finishNode(i, "IndexedAccessType"); + } + } + return n; + } + flowParsePrefixType() { + const e = this.startNode(); + if (this.eat(25)) { + e.typeAnnotation = this.flowParsePrefixType(); + return this.finishNode(e, "NullableTypeAnnotation"); + } + return this.flowParsePostfixType(); + } + flowParseAnonFunctionWithoutParens() { + const e = this.flowParsePrefixType(); + if (!this.state.noAnonFunctionType && this.eat(27)) { + const t = this.startNodeAt(e.start, e.loc.start); + t.params = [ this.reinterpretTypeAsFunctionTypeParam(e) ]; + t.rest = null; + t.this = null; + t.returnType = this.flowParseType(); + t.typeParameters = null; + return this.finishNode(t, "FunctionTypeAnnotation"); + } + return e; + } + flowParseIntersectionType() { + const e = this.startNode(); + this.eat(48); + const t = this.flowParseAnonFunctionWithoutParens(); + e.types = [ t ]; + for (;this.eat(48); ) e.types.push(this.flowParseAnonFunctionWithoutParens()); + return 1 === e.types.length ? t : this.finishNode(e, "IntersectionTypeAnnotation"); + } + flowParseUnionType() { + const e = this.startNode(); + this.eat(46); + const t = this.flowParseIntersectionType(); + e.types = [ t ]; + for (;this.eat(46); ) e.types.push(this.flowParseIntersectionType()); + return 1 === e.types.length ? t : this.finishNode(e, "UnionTypeAnnotation"); + } + flowParseType() { + const e = this.state.inType; + this.state.inType = !0; + const t = this.flowParseUnionType(); + this.state.inType = e; + return t; + } + flowParseTypeOrImplicitInstantiation() { + if (5 === this.state.type && "_" === this.state.value) { + const e = this.state.start; + const t = this.state.startLoc; + const n = this.parseIdentifier(); + return this.flowParseGenericType(e, t, n); + } + return this.flowParseType(); + } + flowParseTypeAnnotation() { + const e = this.startNode(); + e.typeAnnotation = this.flowParseTypeInitialiser(); + return this.finishNode(e, "TypeAnnotation"); + } + flowParseTypeAnnotatableIdentifier(e) { + const t = e ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + if (this.match(22)) { + t.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(t); + } + return t; + } + typeCastToParameter(e) { + e.expression.typeAnnotation = e.typeAnnotation; + this.resetEndLocation(e.expression, e.typeAnnotation.end, e.typeAnnotation.loc.end); + return e.expression; + } + flowParseVariance() { + let e = null; + if (this.match(52)) { + e = this.startNode(); + "+" === this.state.value ? e.kind = "plus" : e.kind = "minus"; + this.next(); + this.finishNode(e, "Variance"); + } + return e; + } + parseFunctionBody(e, t, n = !1) { + return t ? this.forwardNoArrowParamsConversionAt(e, () => super.parseFunctionBody(e, !0, n)) : super.parseFunctionBody(e, !1, n); + } + parseFunctionBodyAndFinish(e, t, n = !1) { + if (this.match(22)) { + const t = this.startNode(); + [t.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(); + e.returnType = t.typeAnnotation ? this.finishNode(t, "TypeAnnotation") : null; + } + super.parseFunctionBodyAndFinish(e, t, n); + } + parseStatement(e, t) { + if (this.state.strict && this.match(5) && "interface" === this.state.value) { + const e = this.lookahead(); + if (5 === e.type || ue(e.value)) { + const e = this.startNode(); + this.next(); + return this.flowParseInterface(e); + } + } else if (this.shouldParseEnums() && this.isContextual("enum")) { + const e = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(e); + } + const n = super.parseStatement(e, t); + void 0 !== this.flowPragma || this.isValidDirective(n) || (this.flowPragma = null); + return n; + } + parseExpressionStatement(e, t) { + if ("Identifier" === t.type) if ("declare" === t.name) { + if (this.match(79) || this.match(5) || this.match(67) || this.match(73) || this.match(81)) return this.flowParseDeclare(e); + } else if (this.match(5)) { + if ("interface" === t.name) return this.flowParseInterface(e); + if ("type" === t.name) return this.flowParseTypeAlias(e); + if ("opaque" === t.name) return this.flowParseOpaqueType(e, !1); + } + return super.parseExpressionStatement(e, t); + } + shouldParseExportDeclaration() { + return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration(); + } + isExportDefaultSpecifier() { + return (!this.match(5) || !("type" === this.state.value || "interface" === this.state.value || "opaque" === this.state.value || this.shouldParseEnums() && "enum" === this.state.value)) && super.isExportDefaultSpecifier(); + } + parseExportDefaultExpression() { + if (this.shouldParseEnums() && this.isContextual("enum")) { + const e = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(e); + } + return super.parseExportDefaultExpression(); + } + parseConditional(e, t, n, r) { + if (!this.match(25)) return e; + if (this.state.maybeInArrowParameters) { + const t = this.lookaheadCharCode(); + if (44 === t || 61 === t || 58 === t || 41 === t) { + this.setOptionalParametersError(r); + return e; + } + } + this.expect(25); + const i = this.state.clone(); + const s = this.state.noArrowAt; + const a = this.startNodeAt(t, n); + let {consequent: o, failed: l} = this.tryParseConditionalConsequent(); + let [c, p] = this.getArrowLikeExpressions(o); + if (l || p.length > 0) { + const e = [ ...s ]; + if (p.length > 0) { + this.state = i; + this.state.noArrowAt = e; + for (let t = 0; t < p.length; t++) e.push(p[t].start); + ({consequent: o, failed: l} = this.tryParseConditionalConsequent()); + [c, p] = this.getArrowLikeExpressions(o); + } + l && c.length > 1 && this.raise(i.start, _t.AmbiguousConditionalArrow); + if (l && 1 === c.length) { + this.state = i; + e.push(c[0].start); + this.state.noArrowAt = e; + ({consequent: o, failed: l} = this.tryParseConditionalConsequent()); + } + } + this.getArrowLikeExpressions(o, !0); + this.state.noArrowAt = s; + this.expect(22); + a.test = e; + a.consequent = o; + a.alternate = this.forwardNoArrowParamsConversionAt(a, () => this.parseMaybeAssign(void 0, void 0)); + return this.finishNode(a, "ConditionalExpression"); + } + tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + const e = this.parseMaybeAssignAllowIn(); + const t = !this.match(22); + this.state.noArrowParamsConversionAt.pop(); + return { + consequent: e, + failed: t + }; + } + getArrowLikeExpressions(e, t) { + const n = [ e ]; + const r = []; + for (;0 !== n.length; ) { + const e = n.pop(); + if ("ArrowFunctionExpression" === e.type) { + e.typeParameters || !e.returnType ? this.finishArrowValidation(e) : r.push(e); + n.push(e.body); + } else if ("ConditionalExpression" === e.type) { + n.push(e.consequent); + n.push(e.alternate); + } + } + if (t) { + r.forEach(e => this.finishArrowValidation(e)); + return [ r, [] ]; + } + return function(e, t) { + const n = []; + const r = []; + for (let i = 0; i < e.length; i++) (t(e[i], i, e) ? n : r).push(e[i]); + return [ n, r ]; + }(r, e => e.params.every(e => this.isAssignable(e, !0))); + } + finishArrowValidation(e) { + var t; + this.toAssignableList(e.params, null == (t = e.extra) ? void 0 : t.trailingComma, !1); + this.scope.enter(me | ye); + super.checkParams(e, !1, !0); + this.scope.exit(); + } + forwardNoArrowParamsConversionAt(e, t) { + let n; + if (-1 !== this.state.noArrowParamsConversionAt.indexOf(e.start)) { + this.state.noArrowParamsConversionAt.push(this.state.start); + n = t(); + this.state.noArrowParamsConversionAt.pop(); + } else n = t(); + return n; + } + parseParenItem(e, t, n) { + e = super.parseParenItem(e, t, n); + if (this.eat(25)) { + e.optional = !0; + this.resetEndLocation(e); + } + if (this.match(22)) { + const r = this.startNodeAt(t, n); + r.expression = e; + r.typeAnnotation = this.flowParseTypeAnnotation(); + return this.finishNode(r, "TypeCastExpression"); + } + return e; + } + assertModuleNodeAllowed(e) { + "ImportDeclaration" === e.type && ("type" === e.importKind || "typeof" === e.importKind) || "ExportNamedDeclaration" === e.type && "type" === e.exportKind || "ExportAllDeclaration" === e.type && "type" === e.exportKind || super.assertModuleNodeAllowed(e); + } + parseExport(e) { + const t = super.parseExport(e); + "ExportNamedDeclaration" !== t.type && "ExportAllDeclaration" !== t.type || (t.exportKind = t.exportKind || "value"); + return t; + } + parseExportDeclaration(e) { + if (this.isContextual("type")) { + e.exportKind = "type"; + const t = this.startNode(); + this.next(); + if (this.match(13)) { + e.specifiers = this.parseExportSpecifiers(); + this.parseExportFrom(e); + return null; + } + return this.flowParseTypeAlias(t); + } + if (this.isContextual("opaque")) { + e.exportKind = "type"; + const t = this.startNode(); + this.next(); + return this.flowParseOpaqueType(t, !1); + } + if (this.isContextual("interface")) { + e.exportKind = "type"; + const t = this.startNode(); + this.next(); + return this.flowParseInterface(t); + } + if (this.shouldParseEnums() && this.isContextual("enum")) { + e.exportKind = "value"; + const t = this.startNode(); + this.next(); + return this.flowParseEnumDeclaration(t); + } + return super.parseExportDeclaration(e); + } + eatExportStar(e) { + if (super.eatExportStar(...arguments)) return !0; + if (this.isContextual("type") && 54 === this.lookahead().type) { + e.exportKind = "type"; + this.next(); + this.next(); + return !0; + } + return !1; + } + maybeParseExportNamespaceSpecifier(e) { + const t = this.state.start; + const n = super.maybeParseExportNamespaceSpecifier(e); + n && "type" === e.exportKind && this.unexpected(t); + return n; + } + parseClassId(e, t, n) { + super.parseClassId(e, t, n); + this.isRelational("<") && (e.typeParameters = this.flowParseTypeParameterDeclaration()); + } + parseClassMember(e, t, n) { + const r = this.state.start; + if (this.isContextual("declare")) { + if (this.parseClassMemberFromModifier(e, t)) return; + t.declare = !0; + } + super.parseClassMember(e, t, n); + t.declare && ("ClassProperty" !== t.type && "ClassPrivateProperty" !== t.type && "PropertyDefinition" !== t.type ? this.raise(r, _t.DeclareClassElement) : t.value && this.raise(t.value.start, _t.DeclareClassFieldInitializer)); + } + isIterator(e) { + return "iterator" === e || "asyncIterator" === e; + } + readIterator() { + const e = super.readWord1(); + const t = "@@" + e; + this.isIterator(e) && this.state.inType || this.raise(this.state.pos, E.InvalidIdentifier, t); + this.finishToken(5, t); + } + getTokenFromCode(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + if (123 === e && 124 === t) return this.finishOp(14, 2); + if (!this.state.inType || 62 !== e && 60 !== e) { + if (this.state.inType && 63 === e) return 46 === t ? this.finishOp(26, 2) : this.finishOp(25, 1); + if (function(e, t) { + return 64 === e && 64 === t; + }(e, t)) { + this.state.pos += 2; + return this.readIterator(); + } + return super.getTokenFromCode(e); + } + return this.finishOp(50, 1); + } + isAssignable(e, t) { + return "TypeCastExpression" === e.type ? this.isAssignable(e.expression, t) : super.isAssignable(e, t); + } + toAssignable(e, t = !1) { + return "TypeCastExpression" === e.type ? super.toAssignable(this.typeCastToParameter(e), t) : super.toAssignable(e, t); + } + toAssignableList(e, t, n) { + for (let t = 0; t < e.length; t++) { + const n = e[t]; + "TypeCastExpression" === (null == n ? void 0 : n.type) && (e[t] = this.typeCastToParameter(n)); + } + return super.toAssignableList(e, t, n); + } + toReferencedList(e, t) { + for (let r = 0; r < e.length; r++) { + var n; + const i = e[r]; + !i || "TypeCastExpression" !== i.type || null != (n = i.extra) && n.parenthesized || !(e.length > 1) && t || this.raise(i.typeAnnotation.start, _t.TypeCastInPattern); + } + return e; + } + parseArrayLike(e, t, n, r) { + const i = super.parseArrayLike(e, t, n, r); + t && !this.state.maybeInArrowParameters && this.toReferencedList(i.elements); + return i; + } + checkLVal(e, ...t) { + if ("TypeCastExpression" !== e.type) return super.checkLVal(e, ...t); + } + parseClassProperty(e) { + this.match(22) && (e.typeAnnotation = this.flowParseTypeAnnotation()); + return super.parseClassProperty(e); + } + parseClassPrivateProperty(e) { + this.match(22) && (e.typeAnnotation = this.flowParseTypeAnnotation()); + return super.parseClassPrivateProperty(e); + } + isClassMethod() { + return this.isRelational("<") || super.isClassMethod(); + } + isClassProperty() { + return this.match(22) || super.isClassProperty(); + } + isNonstaticConstructor(e) { + return !this.match(22) && super.isNonstaticConstructor(e); + } + pushClassMethod(e, t, n, r, i, s) { + t.variance && this.unexpected(t.variance.start); + delete t.variance; + this.isRelational("<") && (t.typeParameters = this.flowParseTypeParameterDeclaration()); + super.pushClassMethod(e, t, n, r, i, s); + if (t.params && i) { + const e = t.params; + e.length > 0 && this.isThisParam(e[0]) && this.raise(t.start, _t.ThisParamBannedInConstructor); + } else if ("MethodDefinition" === t.type && i && t.value.params) { + const e = t.value.params; + e.length > 0 && this.isThisParam(e[0]) && this.raise(t.start, _t.ThisParamBannedInConstructor); + } + } + pushClassPrivateMethod(e, t, n, r) { + t.variance && this.unexpected(t.variance.start); + delete t.variance; + this.isRelational("<") && (t.typeParameters = this.flowParseTypeParameterDeclaration()); + super.pushClassPrivateMethod(e, t, n, r); + } + parseClassSuper(e) { + super.parseClassSuper(e); + e.superClass && this.isRelational("<") && (e.superTypeParameters = this.flowParseTypeParameterInstantiation()); + if (this.isContextual("implements")) { + this.next(); + const t = e.implements = []; + do { + const e = this.startNode(); + e.id = this.flowParseRestrictedIdentifier(!0); + this.isRelational("<") ? e.typeParameters = this.flowParseTypeParameterInstantiation() : e.typeParameters = null; + t.push(this.finishNode(e, "ClassImplements")); + } while (this.eat(20)); + } + } + checkGetterSetterParams(e) { + super.checkGetterSetterParams(e); + const t = this.getObjectOrClassMethodParams(e); + if (t.length > 0) { + const n = t[0]; + this.isThisParam(n) && "get" === e.kind ? this.raise(n.start, _t.GetterMayNotHaveThisParam) : this.isThisParam(n) && this.raise(n.start, _t.SetterMayNotHaveThisParam); + } + } + parsePropertyName(e, t) { + const n = this.flowParseVariance(); + const r = super.parsePropertyName(e, t); + e.variance = n; + return r; + } + parseObjPropValue(e, t, n, r, i, s, a, o) { + e.variance && this.unexpected(e.variance.start); + delete e.variance; + let l; + if (this.isRelational("<") && !a) { + l = this.flowParseTypeParameterDeclaration(); + this.match(18) || this.unexpected(); + } + super.parseObjPropValue(e, t, n, r, i, s, a, o); + l && ((e.value || e).typeParameters = l); + } + parseAssignableListItemTypes(e) { + if (this.eat(25)) { + "Identifier" !== e.type && this.raise(e.start, _t.PatternIsOptional); + this.isThisParam(e) && this.raise(e.start, _t.ThisParamMayNotBeOptional); + e.optional = !0; + } + this.match(22) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(e.start, _t.ThisParamAnnotationRequired); + this.match(35) && this.isThisParam(e) && this.raise(e.start, _t.ThisParamNoDefault); + this.resetEndLocation(e); + return e; + } + parseMaybeDefault(e, t, n) { + const r = super.parseMaybeDefault(e, t, n); + "AssignmentPattern" === r.type && r.typeAnnotation && r.right.start < r.typeAnnotation.start && this.raise(r.typeAnnotation.start, _t.TypeBeforeInitializer); + return r; + } + shouldParseDefaultImport(e) { + return Lt(e) ? jt(this.state) : super.shouldParseDefaultImport(e); + } + parseImportSpecifierLocal(e, t, n, r) { + t.local = Lt(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(); + this.checkLVal(t.local, r, _e); + e.specifiers.push(this.finishNode(t, n)); + } + maybeParseDefaultImportSpecifier(e) { + e.importKind = "value"; + let t = null; + this.match(86) ? t = "typeof" : this.isContextual("type") && (t = "type"); + if (t) { + const n = this.lookahead(); + "type" === t && 54 === n.type && this.unexpected(n.start); + if (jt(n) || 13 === n.type || 54 === n.type) { + this.next(); + e.importKind = t; + } + } + return super.maybeParseDefaultImportSpecifier(e); + } + parseImportSpecifier(e) { + const t = this.startNode(); + const n = this.match(4); + const r = this.parseModuleExportName(); + let i = null; + "Identifier" === r.type && ("type" === r.name ? i = "type" : "typeof" === r.name && (i = "typeof")); + let s = !1; + if (this.isContextual("as") && !this.isLookaheadContextual("as")) { + const e = this.parseIdentifier(!0); + if (null === i || this.match(5) || W(this.state.type)) { + t.imported = r; + t.importKind = null; + t.local = this.parseIdentifier(); + } else { + t.imported = e; + t.importKind = i; + t.local = Nt(e); + } + } else { + if (null !== i && (this.match(5) || W(this.state.type))) { + t.imported = this.parseIdentifier(!0); + t.importKind = i; + } else { + if (n) throw this.raise(t.start, E.ImportBindingIsString, r.value); + t.imported = r; + t.importKind = null; + } + if (this.eatContextual("as")) t.local = this.parseIdentifier(); else { + s = !0; + t.local = Nt(t.imported); + } + } + const a = Lt(e); + const o = Lt(t); + a && o && this.raise(t.start, _t.ImportTypeShorthandOnlyInPureImport); + (a || o) && this.checkReservedType(t.local.name, t.local.start, !0); + !s || a || o || this.checkReservedWord(t.local.name, t.start, !0, !0); + this.checkLVal(t.local, "import specifier", _e); + e.specifiers.push(this.finishNode(t, "ImportSpecifier")); + } + parseBindingAtom() { + switch (this.state.type) { + case 77: + return this.parseIdentifier(!0); + + default: + return super.parseBindingAtom(); + } + } + parseFunctionParams(e, t) { + const n = e.kind; + "get" !== n && "set" !== n && this.isRelational("<") && (e.typeParameters = this.flowParseTypeParameterDeclaration()); + super.parseFunctionParams(e, t); + } + parseVarId(e, t) { + super.parseVarId(e, t); + if (this.match(22)) { + e.id.typeAnnotation = this.flowParseTypeAnnotation(); + this.resetEndLocation(e.id); + } + } + parseAsyncArrowFromCallExpression(e, t) { + if (this.match(22)) { + const t = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = !0; + e.returnType = this.flowParseTypeAnnotation(); + this.state.noAnonFunctionType = t; + } + return super.parseAsyncArrowFromCallExpression(e, t); + } + shouldParseAsyncArrow() { + return this.match(22) || super.shouldParseAsyncArrow(); + } + parseMaybeAssign(e, t) { + var n, r, i; + let s = null; + let a; + if (this.hasPlugin("jsx") && (this.match(94) || this.isRelational("<"))) { + s = this.state.clone(); + if (!(a = this.tryParse(() => super.parseMaybeAssign(e, t), s)).error) return a.node; + const {context: n} = this.state; + const r = n[n.length - 1]; + r === C.j_oTag ? n.length -= 2 : r === C.j_expr && (n.length -= 1); + } + if (null != (n = a) && n.error || this.isRelational("<")) { + s = s || this.state.clone(); + let n; + const o = this.tryParse(r => { + var i; + n = this.flowParseTypeParameterDeclaration(); + const s = this.forwardNoArrowParamsConversionAt(n, () => { + const r = super.parseMaybeAssign(e, t); + this.resetStartLocationFromNode(r, n); + return r; + }); + null != (i = s.extra) && i.parenthesized && r(); + const a = this.maybeUnwrapTypeCastExpression(s); + "ArrowFunctionExpression" !== a.type && r(); + a.typeParameters = n; + this.resetStartLocationFromNode(a, n); + return s; + }, s); + let l = null; + if (o.node && "ArrowFunctionExpression" === this.maybeUnwrapTypeCastExpression(o.node).type) { + if (!o.error && !o.aborted) { + o.node.async && this.raise(n.start, _t.UnexpectedTypeParameterBeforeAsyncArrowFunction); + return o.node; + } + l = o.node; + } + if (null != (r = a) && r.node) { + this.state = a.failState; + return a.node; + } + if (l) { + this.state = o.failState; + return l; + } + if (null != (i = a) && i.thrown) throw a.error; + if (o.thrown) throw o.error; + throw this.raise(n.start, _t.UnexpectedTokenAfterTypeParameter); + } + return super.parseMaybeAssign(e, t); + } + parseArrow(e) { + if (this.match(22)) { + const t = this.tryParse(() => { + const t = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = !0; + const n = this.startNode(); + [n.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(); + this.state.noAnonFunctionType = t; + this.canInsertSemicolon() && this.unexpected(); + this.match(27) || this.unexpected(); + return n; + }); + if (t.thrown) return null; + t.error && (this.state = t.failState); + e.returnType = t.node.typeAnnotation ? this.finishNode(t.node, "TypeAnnotation") : null; + } + return super.parseArrow(e); + } + shouldParseArrow(e) { + return this.match(22) || super.shouldParseArrow(e); + } + setArrowFunctionParameters(e, t) { + -1 !== this.state.noArrowParamsConversionAt.indexOf(e.start) ? e.params = t : super.setArrowFunctionParameters(e, t); + } + checkParams(e, t, n) { + if (!n || -1 === this.state.noArrowParamsConversionAt.indexOf(e.start)) { + for (let t = 0; t < e.params.length; t++) this.isThisParam(e.params[t]) && t > 0 && this.raise(e.params[t].start, _t.ThisParamMustBeFirst); + return super.checkParams(...arguments); + } + } + parseParenAndDistinguishExpression(e) { + return super.parseParenAndDistinguishExpression(e && -1 === this.state.noArrowAt.indexOf(this.state.start)); + } + parseSubscripts(e, t, n, r) { + if ("Identifier" === e.type && "async" === e.name && -1 !== this.state.noArrowAt.indexOf(t)) { + this.next(); + const r = this.startNodeAt(t, n); + r.callee = e; + r.arguments = this.parseCallExpressionArguments(19, !1); + e = this.finishNode(r, "CallExpression"); + } else if ("Identifier" === e.type && "async" === e.name && this.isRelational("<")) { + const i = this.state.clone(); + const s = this.tryParse(e => this.parseAsyncArrowWithTypeParameters(t, n) || e(), i); + if (!s.error && !s.aborted) return s.node; + const a = this.tryParse(() => super.parseSubscripts(e, t, n, r), i); + if (a.node && !a.error) return a.node; + if (s.node) { + this.state = s.failState; + return s.node; + } + if (a.node) { + this.state = a.failState; + return a.node; + } + throw s.error || a.error; + } + return super.parseSubscripts(e, t, n, r); + } + parseSubscript(e, t, n, r, i) { + if (this.match(26) && this.isLookaheadToken_lt()) { + i.optionalChainMember = !0; + if (r) { + i.stop = !0; + return e; + } + this.next(); + const s = this.startNodeAt(t, n); + s.callee = e; + s.typeArguments = this.flowParseTypeParameterInstantiation(); + this.expect(18); + s.arguments = this.parseCallExpressionArguments(19, !1); + s.optional = !0; + return this.finishCallExpression(s, !0); + } + if (!r && this.shouldParseTypes() && this.isRelational("<")) { + const r = this.startNodeAt(t, n); + r.callee = e; + const s = this.tryParse(() => { + r.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); + this.expect(18); + r.arguments = this.parseCallExpressionArguments(19, !1); + i.optionalChainMember && (r.optional = !1); + return this.finishCallExpression(r, i.optionalChainMember); + }); + if (s.node) { + s.error && (this.state = s.failState); + return s.node; + } + } + return super.parseSubscript(e, t, n, r, i); + } + parseNewArguments(e) { + let t = null; + this.shouldParseTypes() && this.isRelational("<") && (t = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node); + e.typeArguments = t; + super.parseNewArguments(e); + } + parseAsyncArrowWithTypeParameters(e, t) { + const n = this.startNodeAt(e, t); + this.parseFunctionParams(n); + if (this.parseArrow(n)) return this.parseArrowExpression(n, void 0, !0); + } + readToken_mult_modulo(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + if (42 === e && 47 === t && this.state.hasFlowComment) { + this.state.hasFlowComment = !1; + this.state.pos += 2; + this.nextToken(); + } else super.readToken_mult_modulo(e); + } + readToken_pipe_amp(e) { + const t = this.input.charCodeAt(this.state.pos + 1); + 124 !== e || 125 !== t ? super.readToken_pipe_amp(e) : this.finishOp(17, 2); + } + parseTopLevel(e, t) { + const n = super.parseTopLevel(e, t); + this.state.hasFlowComment && this.raise(this.state.pos, _t.UnterminatedFlowComment); + return n; + } + skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + this.state.hasFlowComment && this.unexpected(null, _t.NestedFlowComment); + this.hasFlowCommentCompletion(); + this.state.pos += this.skipFlowComment(); + this.state.hasFlowComment = !0; + } else { + if (!this.state.hasFlowComment) return super.skipBlockComment(); + { + const e = this.input.indexOf("*-/", this.state.pos += 2); + if (-1 === e) throw this.raise(this.state.pos - 2, E.UnterminatedComment); + this.state.pos = e + 3; + } + } + } + skipFlowComment() { + const {pos: e} = this.state; + let t = 2; + for (;[ 32, 9 ].includes(this.input.charCodeAt(e + t)); ) t++; + const n = this.input.charCodeAt(t + e); + const r = this.input.charCodeAt(t + e + 1); + return 58 === n && 58 === r ? t + 2 : "flow-include" === this.input.slice(t + e, t + e + 12) ? t + 12 : 58 === n && 58 !== r && t; + } + hasFlowCommentCompletion() { + if (-1 === this.input.indexOf("*/", this.state.pos)) throw this.raise(this.state.pos, E.UnterminatedComment); + } + flowEnumErrorBooleanMemberNotInitialized(e, {enumName: t, memberName: n}) { + this.raise(e, _t.EnumBooleanMemberNotInitialized, n, t); + } + flowEnumErrorInvalidMemberName(e, {enumName: t, memberName: n}) { + const r = n[0].toUpperCase() + n.slice(1); + this.raise(e, _t.EnumInvalidMemberName, n, r, t); + } + flowEnumErrorDuplicateMemberName(e, {enumName: t, memberName: n}) { + this.raise(e, _t.EnumDuplicateMemberName, n, t); + } + flowEnumErrorInconsistentMemberValues(e, {enumName: t}) { + this.raise(e, _t.EnumInconsistentMemberValues, t); + } + flowEnumErrorInvalidExplicitType(e, {enumName: t, suppliedType: n}) { + return this.raise(e, null === n ? _t.EnumInvalidExplicitTypeUnknownSupplied : _t.EnumInvalidExplicitType, t, n); + } + flowEnumErrorInvalidMemberInitializer(e, {enumName: t, explicitType: n, memberName: r}) { + let i = null; + switch (n) { + case "boolean": + case "number": + case "string": + i = _t.EnumInvalidMemberInitializerPrimaryType; + break; + + case "symbol": + i = _t.EnumInvalidMemberInitializerSymbolType; + break; + + default: + i = _t.EnumInvalidMemberInitializerUnknownType; + } + return this.raise(e, i, t, r, n); + } + flowEnumErrorNumberMemberNotInitialized(e, {enumName: t, memberName: n}) { + this.raise(e, _t.EnumNumberMemberNotInitialized, t, n); + } + flowEnumErrorStringMemberInconsistentlyInitailized(e, {enumName: t}) { + this.raise(e, _t.EnumStringMemberInconsistentlyInitailized, t); + } + flowEnumMemberInit() { + const e = this.state.start; + const t = () => this.match(20) || this.match(16); + switch (this.state.type) { + case 0: + { + const n = this.parseNumericLiteral(this.state.value); + return t() ? { + type: "number", + pos: n.start, + value: n + } : { + type: "invalid", + pos: e + }; + } + + case 4: + { + const n = this.parseStringLiteral(this.state.value); + return t() ? { + type: "string", + pos: n.start, + value: n + } : { + type: "invalid", + pos: e + }; + } + + case 84: + case 85: + { + const n = this.parseBooleanLiteral(this.match(84)); + return t() ? { + type: "boolean", + pos: n.start, + value: n + } : { + type: "invalid", + pos: e + }; + } + + default: + return { + type: "invalid", + pos: e + }; + } + } + flowEnumMemberRaw() { + const e = this.state.start; + return { + id: this.parseIdentifier(!0), + init: this.eat(35) ? this.flowEnumMemberInit() : { + type: "none", + pos: e + } + }; + } + flowEnumCheckExplicitTypeMismatch(e, t, n) { + const {explicitType: r} = t; + null !== r && r !== n && this.flowEnumErrorInvalidMemberInitializer(e, t); + } + flowEnumMembers({enumName: e, explicitType: t}) { + const n = new Set(); + const r = { + booleanMembers: [], + numberMembers: [], + stringMembers: [], + defaultedMembers: [] + }; + let i = !1; + for (;!this.match(16); ) { + if (this.eat(29)) { + i = !0; + break; + } + const s = this.startNode(); + const {id: a, init: o} = this.flowEnumMemberRaw(); + const l = a.name; + if ("" === l) continue; + /^[a-z]/.test(l) && this.flowEnumErrorInvalidMemberName(a.start, { + enumName: e, + memberName: l + }); + n.has(l) && this.flowEnumErrorDuplicateMemberName(a.start, { + enumName: e, + memberName: l + }); + n.add(l); + const c = { + enumName: e, + explicitType: t, + memberName: l + }; + s.id = a; + switch (o.type) { + case "boolean": + this.flowEnumCheckExplicitTypeMismatch(o.pos, c, "boolean"); + s.init = o.value; + r.booleanMembers.push(this.finishNode(s, "EnumBooleanMember")); + break; + + case "number": + this.flowEnumCheckExplicitTypeMismatch(o.pos, c, "number"); + s.init = o.value; + r.numberMembers.push(this.finishNode(s, "EnumNumberMember")); + break; + + case "string": + this.flowEnumCheckExplicitTypeMismatch(o.pos, c, "string"); + s.init = o.value; + r.stringMembers.push(this.finishNode(s, "EnumStringMember")); + break; + + case "invalid": + throw this.flowEnumErrorInvalidMemberInitializer(o.pos, c); + + case "none": + switch (t) { + case "boolean": + this.flowEnumErrorBooleanMemberNotInitialized(o.pos, c); + break; + + case "number": + this.flowEnumErrorNumberMemberNotInitialized(o.pos, c); + break; + + default: + r.defaultedMembers.push(this.finishNode(s, "EnumDefaultedMember")); + } + } + this.match(16) || this.expect(20); + } + return { + members: r, + hasUnknownMembers: i + }; + } + flowEnumStringMembers(e, t, {enumName: n}) { + if (0 === e.length) return t; + if (0 === t.length) return e; + if (t.length > e.length) { + for (const t of e) this.flowEnumErrorStringMemberInconsistentlyInitailized(t.start, { + enumName: n + }); + return t; + } + for (const e of t) this.flowEnumErrorStringMemberInconsistentlyInitailized(e.start, { + enumName: n + }); + return e; + } + flowEnumParseExplicitType({enumName: e}) { + if (this.eatContextual("of")) { + if (!this.match(5)) throw this.flowEnumErrorInvalidExplicitType(this.state.start, { + enumName: e, + suppliedType: null + }); + const {value: t} = this.state; + this.next(); + "boolean" !== t && "number" !== t && "string" !== t && "symbol" !== t && this.flowEnumErrorInvalidExplicitType(this.state.start, { + enumName: e, + suppliedType: t + }); + return t; + } + return null; + } + flowEnumBody(e, {enumName: t, nameLoc: n}) { + const r = this.flowEnumParseExplicitType({ + enumName: t + }); + this.expect(13); + const {members: i, hasUnknownMembers: s} = this.flowEnumMembers({ + enumName: t, + explicitType: r + }); + e.hasUnknownMembers = s; + switch (r) { + case "boolean": + e.explicitType = !0; + e.members = i.booleanMembers; + this.expect(16); + return this.finishNode(e, "EnumBooleanBody"); + + case "number": + e.explicitType = !0; + e.members = i.numberMembers; + this.expect(16); + return this.finishNode(e, "EnumNumberBody"); + + case "string": + e.explicitType = !0; + e.members = this.flowEnumStringMembers(i.stringMembers, i.defaultedMembers, { + enumName: t + }); + this.expect(16); + return this.finishNode(e, "EnumStringBody"); + + case "symbol": + e.members = i.defaultedMembers; + this.expect(16); + return this.finishNode(e, "EnumSymbolBody"); + + default: + { + const r = () => { + e.members = []; + this.expect(16); + return this.finishNode(e, "EnumStringBody"); + }; + e.explicitType = !1; + const s = i.booleanMembers.length; + const a = i.numberMembers.length; + const o = i.stringMembers.length; + const l = i.defaultedMembers.length; + if (s || a || o || l) { + if (s || a) { + if (!a && !o && s >= l) { + for (const e of i.defaultedMembers) this.flowEnumErrorBooleanMemberNotInitialized(e.start, { + enumName: t, + memberName: e.id.name + }); + e.members = i.booleanMembers; + this.expect(16); + return this.finishNode(e, "EnumBooleanBody"); + } + if (!s && !o && a >= l) { + for (const e of i.defaultedMembers) this.flowEnumErrorNumberMemberNotInitialized(e.start, { + enumName: t, + memberName: e.id.name + }); + e.members = i.numberMembers; + this.expect(16); + return this.finishNode(e, "EnumNumberBody"); + } + this.flowEnumErrorInconsistentMemberValues(n, { + enumName: t + }); + return r(); + } + e.members = this.flowEnumStringMembers(i.stringMembers, i.defaultedMembers, { + enumName: t + }); + this.expect(16); + return this.finishNode(e, "EnumStringBody"); + } + return r(); + } + } + } + flowParseEnumDeclaration(e) { + const t = this.parseIdentifier(); + e.id = t; + e.body = this.flowEnumBody(this.startNode(), { + enumName: t.name, + nameLoc: t.start + }); + return this.finishNode(e, "EnumDeclaration"); + } + isLookaheadToken_lt() { + const e = this.nextTokenStart(); + if (60 === this.input.charCodeAt(e)) { + const t = this.input.charCodeAt(e + 1); + return 60 !== t && 61 !== t; + } + return !1; + } + maybeUnwrapTypeCastExpression(e) { + return "TypeCastExpression" === e.type ? e.expression : e; + } + })); + const Rt = { + quot: '"', + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: " ", + iexcl: "¡", + cent: "¢", + pound: "£", + curren: "¤", + yen: "¥", + brvbar: "¦", + sect: "§", + uml: "¨", + copy: "©", + ordf: "ª", + laquo: "«", + not: "¬", + shy: "­", + reg: "®", + macr: "¯", + deg: "°", + plusmn: "±", + sup2: "²", + sup3: "³", + acute: "´", + micro: "µ", + para: "¶", + middot: "·", + cedil: "¸", + sup1: "¹", + ordm: "º", + raquo: "»", + frac14: "¼", + frac12: "½", + frac34: "¾", + iquest: "¿", + Agrave: "À", + Aacute: "Á", + Acirc: "Â", + Atilde: "Ã", + Auml: "Ä", + Aring: "Å", + AElig: "Æ", + Ccedil: "Ç", + Egrave: "È", + Eacute: "É", + Ecirc: "Ê", + Euml: "Ë", + Igrave: "Ì", + Iacute: "Í", + Icirc: "Î", + Iuml: "Ï", + ETH: "Ð", + Ntilde: "Ñ", + Ograve: "Ò", + Oacute: "Ó", + Ocirc: "Ô", + Otilde: "Õ", + Ouml: "Ö", + times: "×", + Oslash: "Ø", + Ugrave: "Ù", + Uacute: "Ú", + Ucirc: "Û", + Uuml: "Ü", + Yacute: "Ý", + THORN: "Þ", + szlig: "ß", + agrave: "à", + aacute: "á", + acirc: "â", + atilde: "ã", + auml: "ä", + aring: "å", + aelig: "æ", + ccedil: "ç", + egrave: "è", + eacute: "é", + ecirc: "ê", + euml: "ë", + igrave: "ì", + iacute: "í", + icirc: "î", + iuml: "ï", + eth: "ð", + ntilde: "ñ", + ograve: "ò", + oacute: "ó", + ocirc: "ô", + otilde: "õ", + ouml: "ö", + divide: "÷", + oslash: "ø", + ugrave: "ù", + uacute: "ú", + ucirc: "û", + uuml: "ü", + yacute: "ý", + thorn: "þ", + yuml: "ÿ", + OElig: "Œ", + oelig: "œ", + Scaron: "Š", + scaron: "š", + Yuml: "Ÿ", + fnof: "ƒ", + circ: "ˆ", + tilde: "˜", + Alpha: "Α", + Beta: "Β", + Gamma: "Γ", + Delta: "Δ", + Epsilon: "Ε", + Zeta: "Ζ", + Eta: "Η", + Theta: "Θ", + Iota: "Ι", + Kappa: "Κ", + Lambda: "Λ", + Mu: "Μ", + Nu: "Ν", + Xi: "Ξ", + Omicron: "Ο", + Pi: "Π", + Rho: "Ρ", + Sigma: "Σ", + Tau: "Τ", + Upsilon: "Υ", + Phi: "Φ", + Chi: "Χ", + Psi: "Ψ", + Omega: "Ω", + alpha: "α", + beta: "β", + gamma: "γ", + delta: "δ", + epsilon: "ε", + zeta: "ζ", + eta: "η", + theta: "θ", + iota: "ι", + kappa: "κ", + lambda: "λ", + mu: "μ", + nu: "ν", + xi: "ξ", + omicron: "ο", + pi: "π", + rho: "ρ", + sigmaf: "ς", + sigma: "σ", + tau: "τ", + upsilon: "υ", + phi: "φ", + chi: "χ", + psi: "ψ", + omega: "ω", + thetasym: "ϑ", + upsih: "ϒ", + piv: "ϖ", + ensp: " ", + emsp: " ", + thinsp: " ", + zwnj: "‌", + zwj: "‍", + lrm: "‎", + rlm: "‏", + ndash: "–", + mdash: "—", + lsquo: "‘", + rsquo: "’", + sbquo: "‚", + ldquo: "“", + rdquo: "”", + bdquo: "„", + dagger: "†", + Dagger: "‡", + bull: "•", + hellip: "…", + permil: "‰", + prime: "′", + Prime: "″", + lsaquo: "‹", + rsaquo: "›", + oline: "‾", + frasl: "⁄", + euro: "€", + image: "ℑ", + weierp: "℘", + real: "ℜ", + trade: "™", + alefsym: "ℵ", + larr: "←", + uarr: "↑", + rarr: "→", + darr: "↓", + harr: "↔", + crarr: "↵", + lArr: "⇐", + uArr: "⇑", + rArr: "⇒", + dArr: "⇓", + hArr: "⇔", + forall: "∀", + part: "∂", + exist: "∃", + empty: "∅", + nabla: "∇", + isin: "∈", + notin: "∉", + ni: "∋", + prod: "∏", + sum: "∑", + minus: "−", + lowast: "∗", + radic: "√", + prop: "∝", + infin: "∞", + ang: "∠", + and: "∧", + or: "∨", + cap: "∩", + cup: "∪", + int: "∫", + there4: "∴", + sim: "∼", + cong: "≅", + asymp: "≈", + ne: "≠", + equiv: "≡", + le: "≤", + ge: "≥", + sub: "⊂", + sup: "⊃", + nsub: "⊄", + sube: "⊆", + supe: "⊇", + oplus: "⊕", + otimes: "⊗", + perp: "⊥", + sdot: "⋅", + lceil: "⌈", + rceil: "⌉", + lfloor: "⌊", + rfloor: "⌋", + lang: "〈", + rang: "〉", + loz: "◊", + spades: "♠", + clubs: "♣", + hearts: "♥", + diams: "♦" + }; + const Ut = /^[\da-fA-F]+$/; + const Vt = /^\d+$/; + const Kt = v({ + AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", + MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.", + MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", + UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", + UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", + UnterminatedJsxContent: "Unterminated JSX contents.", + UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?" + }, x.SyntaxError, "jsx"); + C.j_oTag = new w("...", !0); + function Wt(e) { + return !!e && ("JSXOpeningFragment" === e.type || "JSXClosingFragment" === e.type); + } + function qt(e) { + if ("JSXIdentifier" === e.type) return e.name; + if ("JSXNamespacedName" === e.type) return e.namespace.name + ":" + e.name.name; + if ("JSXMemberExpression" === e.type) return qt(e.object) + "." + qt(e.property); + throw new Error("Node had unexpected type: " + e.type); + } + a = (e => (class extends e { + jsxReadToken() { + let e = ""; + let t = this.state.pos; + for (;;) { + if (this.state.pos >= this.length) throw this.raise(this.state.start, Kt.UnterminatedJsxContent); + const n = this.input.charCodeAt(this.state.pos); + switch (n) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + if (60 === n && this.state.exprAllowed) { + ++this.state.pos; + return this.finishToken(94); + } + return super.getTokenFromCode(n); + } + e += this.input.slice(t, this.state.pos); + return this.finishToken(93, e); + + case 38: + e += this.input.slice(t, this.state.pos); + e += this.jsxReadEntity(); + t = this.state.pos; + break; + + case 62: + case 125: + default: + if (p(n)) { + e += this.input.slice(t, this.state.pos); + e += this.jsxReadNewLine(!0); + t = this.state.pos; + } else ++this.state.pos; + } + } + } + jsxReadNewLine(e) { + const t = this.input.charCodeAt(this.state.pos); + let n; + ++this.state.pos; + if (13 === t && 10 === this.input.charCodeAt(this.state.pos)) { + ++this.state.pos; + n = e ? "\n" : "\r\n"; + } else n = String.fromCharCode(t); + ++this.state.curLine; + this.state.lineStart = this.state.pos; + return n; + } + jsxReadString(e) { + let t = ""; + let n = ++this.state.pos; + for (;;) { + if (this.state.pos >= this.length) throw this.raise(this.state.start, E.UnterminatedString); + const r = this.input.charCodeAt(this.state.pos); + if (r === e) break; + if (38 === r) { + t += this.input.slice(n, this.state.pos); + t += this.jsxReadEntity(); + n = this.state.pos; + } else if (p(r)) { + t += this.input.slice(n, this.state.pos); + t += this.jsxReadNewLine(!1); + n = this.state.pos; + } else ++this.state.pos; + } + t += this.input.slice(n, this.state.pos++); + return this.finishToken(4, t); + } + jsxReadEntity() { + let e = ""; + let t = 0; + let n; + let r = this.input[this.state.pos]; + const i = ++this.state.pos; + for (;this.state.pos < this.length && t++ < 10; ) { + if (";" === (r = this.input[this.state.pos++])) { + if ("#" === e[0]) if ("x" === e[1]) { + e = e.substr(2); + Ut.test(e) && (n = String.fromCodePoint(parseInt(e, 16))); + } else { + e = e.substr(1); + Vt.test(e) && (n = String.fromCodePoint(parseInt(e, 10))); + } else n = Rt[e]; + break; + } + e += r; + } + if (!n) { + this.state.pos = i; + return "&"; + } + return n; + } + jsxReadWord() { + let e; + const t = this.state.pos; + do { + e = this.input.charCodeAt(++this.state.pos); + } while (te(e) || 45 === e); + return this.finishToken(92, this.input.slice(t, this.state.pos)); + } + jsxParseIdentifier() { + const e = this.startNode(); + this.match(92) ? e.name = this.state.value : W(this.state.type) ? e.name = q(this.state.type) : this.unexpected(); + this.next(); + return this.finishNode(e, "JSXIdentifier"); + } + jsxParseNamespacedName() { + const e = this.state.start; + const t = this.state.startLoc; + const n = this.jsxParseIdentifier(); + if (!this.eat(22)) return n; + const r = this.startNodeAt(e, t); + r.namespace = n; + r.name = this.jsxParseIdentifier(); + return this.finishNode(r, "JSXNamespacedName"); + } + jsxParseElementName() { + const e = this.state.start; + const t = this.state.startLoc; + let n = this.jsxParseNamespacedName(); + if ("JSXNamespacedName" === n.type) return n; + for (;this.eat(24); ) { + const r = this.startNodeAt(e, t); + r.object = n; + r.property = this.jsxParseIdentifier(); + n = this.finishNode(r, "JSXMemberExpression"); + } + return n; + } + jsxParseAttributeValue() { + let e; + switch (this.state.type) { + case 13: + e = this.startNode(); + this.next(); + "JSXEmptyExpression" === (e = this.jsxParseExpressionContainer(e)).expression.type && this.raise(e.start, Kt.AttributeIsEmpty); + return e; + + case 94: + case 4: + return this.parseExprAtom(); + + default: + throw this.raise(this.state.start, Kt.UnsupportedJsxValue); + } + } + jsxParseEmptyExpression() { + const e = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); + return this.finishNodeAt(e, "JSXEmptyExpression", this.state.start, this.state.startLoc); + } + jsxParseSpreadChild(e) { + this.next(); + e.expression = this.parseExpression(); + this.expect(16); + return this.finishNode(e, "JSXSpreadChild"); + } + jsxParseExpressionContainer(e) { + if (this.match(16)) e.expression = this.jsxParseEmptyExpression(); else { + const t = this.parseExpression(); + e.expression = t; + } + this.expect(16); + return this.finishNode(e, "JSXExpressionContainer"); + } + jsxParseAttribute() { + const e = this.startNode(); + if (this.eat(13)) { + this.expect(29); + e.argument = this.parseMaybeAssignAllowIn(); + this.expect(16); + return this.finishNode(e, "JSXSpreadAttribute"); + } + e.name = this.jsxParseNamespacedName(); + e.value = this.eat(35) ? this.jsxParseAttributeValue() : null; + return this.finishNode(e, "JSXAttribute"); + } + jsxParseOpeningElementAt(e, t) { + const n = this.startNodeAt(e, t); + if (this.match(95)) { + this.expect(95); + return this.finishNode(n, "JSXOpeningFragment"); + } + n.name = this.jsxParseElementName(); + return this.jsxParseOpeningElementAfterName(n); + } + jsxParseOpeningElementAfterName(e) { + const t = []; + for (;!this.match(55) && !this.match(95); ) t.push(this.jsxParseAttribute()); + e.attributes = t; + e.selfClosing = this.eat(55); + this.expect(95); + return this.finishNode(e, "JSXOpeningElement"); + } + jsxParseClosingElementAt(e, t) { + const n = this.startNodeAt(e, t); + if (this.match(95)) { + this.expect(95); + return this.finishNode(n, "JSXClosingFragment"); + } + n.name = this.jsxParseElementName(); + this.expect(95); + return this.finishNode(n, "JSXClosingElement"); + } + jsxParseElementAt(e, t) { + const n = this.startNodeAt(e, t); + const r = []; + const i = this.jsxParseOpeningElementAt(e, t); + let s = null; + if (!i.selfClosing) { + e: for (;;) switch (this.state.type) { + case 94: + e = this.state.start; + t = this.state.startLoc; + this.next(); + if (this.eat(55)) { + s = this.jsxParseClosingElementAt(e, t); + break e; + } + r.push(this.jsxParseElementAt(e, t)); + break; + + case 93: + r.push(this.parseExprAtom()); + break; + + case 13: + { + const e = this.startNode(); + this.next(); + this.match(29) ? r.push(this.jsxParseSpreadChild(e)) : r.push(this.jsxParseExpressionContainer(e)); + break; + } + + default: + throw this.unexpected(); + } + Wt(i) && !Wt(s) ? this.raise(s.start, Kt.MissingClosingTagFragment) : !Wt(i) && Wt(s) ? this.raise(s.start, Kt.MissingClosingTagElement, qt(i.name)) : Wt(i) || Wt(s) || qt(s.name) !== qt(i.name) && this.raise(s.start, Kt.MissingClosingTagElement, qt(i.name)); + } + if (Wt(i)) { + n.openingFragment = i; + n.closingFragment = s; + } else { + n.openingElement = i; + n.closingElement = s; + } + n.children = r; + if (this.isRelational("<")) throw this.raise(this.state.start, Kt.UnwrappedAdjacentJSXElements); + return Wt(i) ? this.finishNode(n, "JSXFragment") : this.finishNode(n, "JSXElement"); + } + jsxParseElement() { + const e = this.state.start; + const t = this.state.startLoc; + this.next(); + return this.jsxParseElementAt(e, t); + } + parseExprAtom(e) { + if (this.match(93)) return this.parseLiteral(this.state.value, "JSXText"); + if (this.match(94)) return this.jsxParseElement(); + if (this.isRelational("<") && 33 !== this.input.charCodeAt(this.state.pos)) { + this.finishToken(94); + return this.jsxParseElement(); + } + return super.parseExprAtom(e); + } + createLookaheadState(e) { + const t = super.createLookaheadState(e); + t.inPropertyName = e.inPropertyName; + return t; + } + getTokenFromCode(e) { + if (this.state.inPropertyName) return super.getTokenFromCode(e); + const t = this.curContext(); + if (t === C.j_expr) return this.jsxReadToken(); + if (t === C.j_oTag || t === C.j_cTag) { + if (ee(e)) return this.jsxReadWord(); + if (62 === e) { + ++this.state.pos; + return this.finishToken(95); + } + if ((34 === e || 39 === e) && t === C.j_oTag) return this.jsxReadString(e); + } + if (60 === e && this.state.exprAllowed && 33 !== this.input.charCodeAt(this.state.pos + 1)) { + ++this.state.pos; + return this.finishToken(94); + } + return super.getTokenFromCode(e); + } + updateContext(e) { + super.updateContext(e); + const {context: t, type: n} = this.state; + if (55 === n && 94 === e) { + t.splice(-2, 2, C.j_cTag); + this.state.exprAllowed = !1; + } else if (94 === n) t.push(C.j_expr, C.j_oTag); else if (95 === n) { + const n = t.pop(); + if (n === C.j_oTag && 55 === e || n === C.j_cTag) { + t.pop(); + this.state.exprAllowed = t[t.length - 1] === C.j_expr; + } else this.state.exprAllowed = !0; + } else !W(n) || 24 !== e && 26 !== e ? this.state.exprAllowed = F[n] : this.state.exprAllowed = !1; + } + })); + class Yt extends Ze { + constructor(...e) { + super(...e); + this.types = new Set(); + this.enums = new Set(); + this.constEnums = new Set(); + this.classes = new Set(); + this.exportOnlyBindings = new Set(); + } + } + class Jt extends et { + createScope(e) { + return new Yt(e); + } + declareName(e, t, n) { + const r = this.currentScope(); + if (t & ke) { + this.maybeExportDefined(r, e); + r.exportOnlyBindings.add(e); + } else { + super.declareName(...arguments); + if (t & ve) { + if (!(t & Pe)) { + this.checkRedeclarationInScope(r, e, t, n); + this.maybeExportDefined(r, e); + } + r.types.add(e); + } + t & Oe && r.enums.add(e); + t & Ne && r.constEnums.add(e); + t & Ie && r.classes.add(e); + } + } + isRedeclaredInScope(e, t, n) { + if (e.enums.has(t)) { + if (n & Oe) { + return !!(n & Ne) !== e.constEnums.has(t); + } + return !0; + } + return n & Ie && e.classes.has(t) ? !!e.lexical.has(t) && !!(n & Pe) : !!(n & ve && e.types.has(t)) || super.isRedeclaredInScope(...arguments); + } + checkLocalExport(e) { + const t = this.scopeStack[0]; + const {name: n} = e; + t.types.has(n) || t.exportOnlyBindings.has(n) || super.checkLocalExport(e); + } + } + function Xt(e) { + if (!e) throw new Error("Assert fail"); + } + const Gt = v({ + AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.", + AbstractPropertyHasInitializer: "Property '%0' cannot have an initializer because it is marked abstract.", + AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: "'declare' is not allowed in %0ters.", + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: "Accessibility modifier already seen.", + DuplicateModifier: "Duplicate modifier: '%0'.", + EmptyHeritageClauseType: "'%0' list cannot be empty.", + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.", + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').", + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.", + InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').", + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0." + }, x.SyntaxError, "typescript"); + function Ht(e) { + return "private" === e || "public" === e || "protected" === e; + } + o = (e => (class extends e { + getScopeHandler() { + return Jt; + } + tsIsIdentifier() { + return this.match(5); + } + tsTokenCanFollowModifier() { + return (this.match(8) || this.match(13) || this.match(54) || this.match(29) || this.match(6) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + } + tsNextTokenCanFollowModifier() { + this.next(); + return this.tsTokenCanFollowModifier(); + } + tsParseModifier(e, t) { + if (!this.match(5)) return; + const n = this.state.value; + if (-1 !== e.indexOf(n)) { + if (t && this.tsIsStartOfStaticBlocks()) return; + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) return n; + } + } + tsParseModifiers(e, t, n, r, i) { + const s = (t, n, r, i) => { + n === r && e[i] && this.raise(t, Gt.InvalidModifiersOrder, r, i); + }; + const a = (t, n, r, i) => { + (e[r] && n === i || e[i] && n === r) && this.raise(t, Gt.IncompatibleModifiers, r, i); + }; + for (;;) { + const o = this.state.start; + const l = this.tsParseModifier(t.concat(null != n ? n : []), i); + if (!l) break; + if (Ht(l)) if (e.accessibility) this.raise(o, Gt.DuplicateAccessibilityModifier); else { + s(o, l, l, "override"); + s(o, l, l, "static"); + s(o, l, l, "readonly"); + e.accessibility = l; + } else { + if (Object.hasOwnProperty.call(e, l)) this.raise(o, Gt.DuplicateModifier, l); else { + s(o, l, "static", "readonly"); + s(o, l, "static", "override"); + s(o, l, "override", "readonly"); + s(o, l, "abstract", "override"); + a(o, l, "declare", "override"); + a(o, l, "static", "abstract"); + } + e[l] = !0; + } + null != n && n.includes(l) && this.raise(o, r, l); + } + } + tsIsListTerminator(e) { + switch (e) { + case "EnumMembers": + case "TypeMembers": + return this.match(16); + + case "HeritageClauseElement": + return this.match(13); + + case "TupleElementTypes": + return this.match(11); + + case "TypeParametersOrArguments": + return this.isRelational(">"); + } + throw new Error("Unreachable"); + } + tsParseList(e, t) { + const n = []; + for (;!this.tsIsListTerminator(e); ) n.push(t()); + return n; + } + tsParseDelimitedList(e, t) { + return function(e) { + if (null == e) throw new Error(`Unexpected ${e} value.`); + return e; + }(this.tsParseDelimitedListWorker(e, t, !0)); + } + tsParseDelimitedListWorker(e, t, n) { + const r = []; + for (;!this.tsIsListTerminator(e); ) { + const i = t(); + if (null == i) return; + r.push(i); + if (!this.eat(20)) { + if (this.tsIsListTerminator(e)) break; + n && this.expect(20); + return; + } + } + return r; + } + tsParseBracketedList(e, t, n, r) { + r || (n ? this.expect(8) : this.expectRelational("<")); + const i = this.tsParseDelimitedList(e, t); + n ? this.expect(11) : this.expectRelational(">"); + return i; + } + tsParseImportType() { + const e = this.startNode(); + this.expect(82); + this.expect(18); + this.match(4) || this.raise(this.state.start, Gt.UnsupportedImportTypeArgument); + e.argument = this.parseExprAtom(); + this.expect(19); + this.eat(24) && (e.qualifier = this.tsParseEntityName(!0)); + this.isRelational("<") && (e.typeParameters = this.tsParseTypeArguments()); + return this.finishNode(e, "TSImportType"); + } + tsParseEntityName(e) { + let t = this.parseIdentifier(); + for (;this.eat(24); ) { + const n = this.startNodeAtNode(t); + n.left = t; + n.right = this.parseIdentifier(e); + t = this.finishNode(n, "TSQualifiedName"); + } + return t; + } + tsParseTypeReference() { + const e = this.startNode(); + e.typeName = this.tsParseEntityName(!1); + !this.hasPrecedingLineBreak() && this.isRelational("<") && (e.typeParameters = this.tsParseTypeArguments()); + return this.finishNode(e, "TSTypeReference"); + } + tsParseThisTypePredicate(e) { + this.next(); + const t = this.startNodeAtNode(e); + t.parameterName = e; + t.typeAnnotation = this.tsParseTypeAnnotation(!1); + t.asserts = !1; + return this.finishNode(t, "TSTypePredicate"); + } + tsParseThisTypeNode() { + const e = this.startNode(); + this.next(); + return this.finishNode(e, "TSThisType"); + } + tsParseTypeQuery() { + const e = this.startNode(); + this.expect(86); + this.match(82) ? e.exprName = this.tsParseImportType() : e.exprName = this.tsParseEntityName(!0); + return this.finishNode(e, "TSTypeQuery"); + } + tsParseTypeParameter() { + const e = this.startNode(); + e.name = this.tsParseTypeParameterName(); + e.constraint = this.tsEatThenParseType(80); + e.default = this.tsEatThenParseType(35); + return this.finishNode(e, "TSTypeParameter"); + } + tsTryParseTypeParameters() { + if (this.isRelational("<")) return this.tsParseTypeParameters(); + } + tsParseTypeParameters() { + const e = this.startNode(); + this.isRelational("<") || this.match(94) ? this.next() : this.unexpected(); + e.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), !1, !0); + 0 === e.params.length && this.raise(e.start, Gt.EmptyTypeParameters); + return this.finishNode(e, "TSTypeParameterDeclaration"); + } + tsTryNextParseConstantContext() { + if (74 === this.lookahead().type) { + this.next(); + return this.tsParseTypeReference(); + } + return null; + } + tsFillSignature(e, t) { + const n = 27 === e; + t.typeParameters = this.tsTryParseTypeParameters(); + this.expect(18); + t.parameters = this.tsParseBindingListForSignature(); + n ? t.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(e) : this.match(e) && (t.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(e)); + } + tsParseBindingListForSignature() { + return this.parseBindingList(19, 41).map(e => { + "Identifier" !== e.type && "RestElement" !== e.type && "ObjectPattern" !== e.type && "ArrayPattern" !== e.type && this.raise(e.start, Gt.UnsupportedSignatureParameterKind, e.type); + return e; + }); + } + tsParseTypeMemberSemicolon() { + this.eat(20) || this.isLineTerminator() || this.expect(21); + } + tsParseSignatureMember(e, t) { + this.tsFillSignature(22, t); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(t, e); + } + tsIsUnambiguouslyIndexSignature() { + this.next(); + return this.eat(5) && this.match(22); + } + tsTryParseIndexSignature(e) { + if (!this.match(8) || !this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))) return; + this.expect(8); + const t = this.parseIdentifier(); + t.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(t); + this.expect(11); + e.parameters = [ t ]; + const n = this.tsTryParseTypeAnnotation(); + n && (e.typeAnnotation = n); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(e, "TSIndexSignature"); + } + tsParsePropertyOrMethodSignature(e, t) { + this.eat(25) && (e.optional = !0); + const n = e; + if (this.match(18) || this.isRelational("<")) { + t && this.raise(e.start, Gt.ReadonlyForMethodSignature); + const r = n; + r.kind && this.isRelational("<") && this.raise(this.state.pos, Gt.AccesorCannotHaveTypeParameters); + this.tsFillSignature(22, r); + this.tsParseTypeMemberSemicolon(); + if ("get" === r.kind) { + if (r.parameters.length > 0) { + this.raise(this.state.pos, E.BadGetterArity); + this.isThisParam(r.parameters[0]) && this.raise(this.state.pos, Gt.AccesorCannotDeclareThisParameter); + } + } else if ("set" === r.kind) { + if (1 !== r.parameters.length) this.raise(this.state.pos, E.BadSetterArity); else { + const e = r.parameters[0]; + this.isThisParam(e) && this.raise(this.state.pos, Gt.AccesorCannotDeclareThisParameter); + "Identifier" === e.type && e.optional && this.raise(this.state.pos, Gt.SetAccesorCannotHaveOptionalParameter); + "RestElement" === e.type && this.raise(this.state.pos, Gt.SetAccesorCannotHaveRestParameter); + } + r.typeAnnotation && this.raise(r.typeAnnotation.start, Gt.SetAccesorCannotHaveReturnType); + } else r.kind = "method"; + return this.finishNode(r, "TSMethodSignature"); + } + { + const e = n; + t && (e.readonly = !0); + const r = this.tsTryParseTypeAnnotation(); + r && (e.typeAnnotation = r); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(e, "TSPropertySignature"); + } + } + tsParseTypeMember() { + const e = this.startNode(); + if (this.match(18) || this.isRelational("<")) return this.tsParseSignatureMember("TSCallSignatureDeclaration", e); + if (this.match(76)) { + const t = this.startNode(); + this.next(); + if (this.match(18) || this.isRelational("<")) return this.tsParseSignatureMember("TSConstructSignatureDeclaration", e); + e.key = this.createIdentifier(t, "new"); + return this.tsParsePropertyOrMethodSignature(e, !1); + } + this.tsParseModifiers(e, [ "readonly" ], [ "declare", "abstract", "private", "protected", "public", "static", "override" ], Gt.InvalidModifierOnTypeMember); + const t = this.tsTryParseIndexSignature(e); + if (t) return t; + this.parsePropertyName(e, !1); + if (!e.computed && "Identifier" === e.key.type && ("get" === e.key.name || "set" === e.key.name) && this.tsTokenCanFollowModifier()) { + e.kind = e.key.name; + this.parsePropertyName(e, !1); + } + return this.tsParsePropertyOrMethodSignature(e, !!e.readonly); + } + tsParseTypeLiteral() { + const e = this.startNode(); + e.members = this.tsParseObjectTypeMembers(); + return this.finishNode(e, "TSTypeLiteral"); + } + tsParseObjectTypeMembers() { + this.expect(13); + const e = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(16); + return e; + } + tsIsStartOfMappedType() { + this.next(); + if (this.eat(52)) return this.isContextual("readonly"); + this.isContextual("readonly") && this.next(); + if (!this.match(8)) return !1; + this.next(); + if (!this.tsIsIdentifier()) return !1; + this.next(); + return this.match(57); + } + tsParseMappedTypeParameter() { + const e = this.startNode(); + e.name = this.tsParseTypeParameterName(); + e.constraint = this.tsExpectThenParseType(57); + return this.finishNode(e, "TSTypeParameter"); + } + tsParseMappedType() { + const e = this.startNode(); + this.expect(13); + if (this.match(52)) { + e.readonly = this.state.value; + this.next(); + this.expectContextual("readonly"); + } else this.eatContextual("readonly") && (e.readonly = !0); + this.expect(8); + e.typeParameter = this.tsParseMappedTypeParameter(); + e.nameType = this.eatContextual("as") ? this.tsParseType() : null; + this.expect(11); + if (this.match(52)) { + e.optional = this.state.value; + this.next(); + this.expect(25); + } else this.eat(25) && (e.optional = !0); + e.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(16); + return this.finishNode(e, "TSMappedType"); + } + tsParseTupleType() { + const e = this.startNode(); + e.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), !0, !1); + let t = !1; + let n = null; + e.elementTypes.forEach(e => { + var r; + let {type: i} = e; + !t || "TSRestType" === i || "TSOptionalType" === i || "TSNamedTupleMember" === i && e.optional || this.raise(e.start, Gt.OptionalTypeBeforeRequired); + t = t || "TSNamedTupleMember" === i && e.optional || "TSOptionalType" === i; + "TSRestType" === i && (i = (e = e.typeAnnotation).type); + const s = "TSNamedTupleMember" === i; + (n = null != (r = n) ? r : s) !== s && this.raise(e.start, Gt.MixedLabeledAndUnlabeledElements); + }); + return this.finishNode(e, "TSTupleType"); + } + tsParseTupleElementType() { + const {start: e, startLoc: t} = this.state; + const n = this.eat(29); + let r = this.tsParseType(); + const i = this.eat(25); + if (this.eat(22)) { + const e = this.startNodeAtNode(r); + e.optional = i; + if ("TSTypeReference" !== r.type || r.typeParameters || "Identifier" !== r.typeName.type) { + this.raise(r.start, Gt.InvalidTupleMemberLabel); + e.label = r; + } else e.label = r.typeName; + e.elementType = this.tsParseType(); + r = this.finishNode(e, "TSNamedTupleMember"); + } else if (i) { + const e = this.startNodeAtNode(r); + e.typeAnnotation = r; + r = this.finishNode(e, "TSOptionalType"); + } + if (n) { + const n = this.startNodeAt(e, t); + n.typeAnnotation = r; + r = this.finishNode(n, "TSRestType"); + } + return r; + } + tsParseParenthesizedType() { + const e = this.startNode(); + this.expect(18); + e.typeAnnotation = this.tsParseType(); + this.expect(19); + return this.finishNode(e, "TSParenthesizedType"); + } + tsParseFunctionOrConstructorType(e, t) { + const n = this.startNode(); + if ("TSConstructorType" === e) { + n.abstract = !!t; + t && this.next(); + this.next(); + } + this.tsFillSignature(27, n); + return this.finishNode(n, e); + } + tsParseLiteralTypeNode() { + const e = this.startNode(); + e.literal = (() => { + switch (this.state.type) { + case 0: + case 1: + case 4: + case 84: + case 85: + return this.parseExprAtom(); + + default: + throw this.unexpected(); + } + })(); + return this.finishNode(e, "TSLiteralType"); + } + tsParseTemplateLiteralType() { + const e = this.startNode(); + e.literal = this.parseTemplate(!1); + return this.finishNode(e, "TSLiteralType"); + } + parseTemplateSubstitution() { + return this.state.inType ? this.tsParseType() : super.parseTemplateSubstitution(); + } + tsParseThisTypeOrThisTypePredicate() { + const e = this.tsParseThisTypeNode(); + return this.isContextual("is") && !this.hasPrecedingLineBreak() ? this.tsParseThisTypePredicate(e) : e; + } + tsParseNonArrayType() { + switch (this.state.type) { + case 5: + case 87: + case 83: + { + const e = this.match(87) ? "TSVoidKeyword" : this.match(83) ? "TSNullKeyword" : function(e) { + switch (e) { + case "any": + return "TSAnyKeyword"; + + case "boolean": + return "TSBooleanKeyword"; + + case "bigint": + return "TSBigIntKeyword"; + + case "never": + return "TSNeverKeyword"; + + case "number": + return "TSNumberKeyword"; + + case "object": + return "TSObjectKeyword"; + + case "string": + return "TSStringKeyword"; + + case "symbol": + return "TSSymbolKeyword"; + + case "undefined": + return "TSUndefinedKeyword"; + + case "unknown": + return "TSUnknownKeyword"; + + default: + return; + } + }(this.state.value); + if (void 0 !== e && 46 !== this.lookaheadCharCode()) { + const t = this.startNode(); + this.next(); + return this.finishNode(t, e); + } + return this.tsParseTypeReference(); + } + + case 4: + case 0: + case 1: + case 84: + case 85: + return this.tsParseLiteralTypeNode(); + + case 52: + if ("-" === this.state.value) { + const e = this.startNode(); + const t = this.lookahead(); + if (0 !== t.type && 1 !== t.type) throw this.unexpected(); + e.literal = this.parseMaybeUnary(); + return this.finishNode(e, "TSLiteralType"); + } + break; + + case 77: + return this.tsParseThisTypeOrThisTypePredicate(); + + case 86: + return this.tsParseTypeQuery(); + + case 82: + return this.tsParseImportType(); + + case 13: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + + case 8: + return this.tsParseTupleType(); + + case 18: + return this.tsParseParenthesizedType(); + + case 30: + return this.tsParseTemplateLiteralType(); + } + throw this.unexpected(); + } + tsParseArrayTypeOrHigher() { + let e = this.tsParseNonArrayType(); + for (;!this.hasPrecedingLineBreak() && this.eat(8); ) if (this.match(11)) { + const t = this.startNodeAtNode(e); + t.elementType = e; + this.expect(11); + e = this.finishNode(t, "TSArrayType"); + } else { + const t = this.startNodeAtNode(e); + t.objectType = e; + t.indexType = this.tsParseType(); + this.expect(11); + e = this.finishNode(t, "TSIndexedAccessType"); + } + return e; + } + tsParseTypeOperator(e) { + const t = this.startNode(); + this.expectContextual(e); + t.operator = e; + t.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + "readonly" === e && this.tsCheckTypeAnnotationForReadOnly(t); + return this.finishNode(t, "TSTypeOperator"); + } + tsCheckTypeAnnotationForReadOnly(e) { + switch (e.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + + default: + this.raise(e.start, Gt.UnexpectedReadonly); + } + } + tsParseInferType() { + const e = this.startNode(); + this.expectContextual("infer"); + const t = this.startNode(); + t.name = this.tsParseTypeParameterName(); + e.typeParameter = this.finishNode(t, "TSTypeParameter"); + return this.finishNode(e, "TSInferType"); + } + tsParseTypeOperatorOrHigher() { + const e = [ "keyof", "unique", "readonly" ].find(e => this.isContextual(e)); + return e ? this.tsParseTypeOperator(e) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); + } + tsParseUnionOrIntersectionType(e, t, n) { + const r = this.startNode(); + const i = this.eat(n); + const s = []; + do { + s.push(t()); + } while (this.eat(n)); + if (1 === s.length && !i) return s[0]; + r.types = s; + return this.finishNode(r, e); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 48); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 46); + } + tsIsStartOfFunctionType() { + return !!this.isRelational("<") || this.match(18) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsSkipParameterStart() { + if (this.match(5) || this.match(77)) { + this.next(); + return !0; + } + if (this.match(13)) { + let e = 1; + this.next(); + for (;e > 0; ) { + this.match(13) ? ++e : this.match(16) && --e; + this.next(); + } + return !0; + } + if (this.match(8)) { + let e = 1; + this.next(); + for (;e > 0; ) { + this.match(8) ? ++e : this.match(11) && --e; + this.next(); + } + return !0; + } + return !1; + } + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + if (this.match(19) || this.match(29)) return !0; + if (this.tsSkipParameterStart()) { + if (this.match(22) || this.match(20) || this.match(25) || this.match(35)) return !0; + if (this.match(19)) { + this.next(); + if (this.match(27)) return !0; + } + } + return !1; + } + tsParseTypeOrTypePredicateAnnotation(e) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(e); + const n = this.startNode(); + const r = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (r && this.match(77)) { + let e = this.tsParseThisTypeOrThisTypePredicate(); + if ("TSThisType" === e.type) { + n.parameterName = e; + n.asserts = !0; + n.typeAnnotation = null; + e = this.finishNode(n, "TSTypePredicate"); + } else { + this.resetStartLocationFromNode(e, n); + e.asserts = !0; + } + t.typeAnnotation = e; + return this.finishNode(t, "TSTypeAnnotation"); + } + const i = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!i) { + if (!r) return this.tsParseTypeAnnotation(!1, t); + n.parameterName = this.parseIdentifier(); + n.asserts = r; + n.typeAnnotation = null; + t.typeAnnotation = this.finishNode(n, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + } + const s = this.tsParseTypeAnnotation(!1); + n.parameterName = i; + n.typeAnnotation = s; + n.asserts = r; + t.typeAnnotation = this.finishNode(n, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + tsTryParseTypeOrTypePredicateAnnotation() { + return this.match(22) ? this.tsParseTypeOrTypePredicateAnnotation(22) : void 0; + } + tsTryParseTypeAnnotation() { + return this.match(22) ? this.tsParseTypeAnnotation() : void 0; + } + tsTryParseType() { + return this.tsEatThenParseType(22); + } + tsParseTypePredicatePrefix() { + const e = this.parseIdentifier(); + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + this.next(); + return e; + } + } + tsParseTypePredicateAsserts() { + if (!this.match(5) || "asserts" !== this.state.value) return !1; + const e = this.state.containsEsc; + this.next(); + if (!this.match(5) && !this.match(77)) return !1; + e && this.raise(this.state.lastTokStart, E.InvalidEscapedReservedWord, "asserts"); + return !0; + } + tsParseTypeAnnotation(e = !0, t = this.startNode()) { + this.tsInType(() => { + e && this.expect(22); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + tsParseType() { + Xt(this.state.inType); + const e = this.tsParseNonConditionalType(); + if (this.hasPrecedingLineBreak() || !this.eat(80)) return e; + const t = this.startNodeAtNode(e); + t.checkType = e; + t.extendsType = this.tsParseNonConditionalType(); + this.expect(25); + t.trueType = this.tsParseType(); + this.expect(22); + t.falseType = this.tsParseType(); + return this.finishNode(t, "TSConditionalType"); + } + isAbstractConstructorSignature() { + return this.isContextual("abstract") && 76 === this.lookahead().type; + } + tsParseNonConditionalType() { + return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(76) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher(); + } + tsParseTypeAssertion() { + const e = this.startNode(); + const t = this.tsTryNextParseConstantContext(); + e.typeAnnotation = t || this.tsNextThenParseType(); + this.expectRelational(">"); + e.expression = this.parseMaybeUnary(); + return this.finishNode(e, "TSTypeAssertion"); + } + tsParseHeritageClause(e) { + const t = this.state.start; + const n = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); + n.length || this.raise(t, Gt.EmptyHeritageClauseType, e); + return n; + } + tsParseExpressionWithTypeArguments() { + const e = this.startNode(); + e.expression = this.tsParseEntityName(!1); + this.isRelational("<") && (e.typeParameters = this.tsParseTypeArguments()); + return this.finishNode(e, "TSExpressionWithTypeArguments"); + } + tsParseInterfaceDeclaration(e) { + if (this.match(5)) { + e.id = this.parseIdentifier(); + this.checkLVal(e.id, "typescript interface declaration", Fe); + } else { + e.id = null; + this.raise(this.state.start, Gt.MissingInterfaceName); + } + e.typeParameters = this.tsTryParseTypeParameters(); + this.eat(80) && (e.extends = this.tsParseHeritageClause("extends")); + const t = this.startNode(); + t.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); + e.body = this.finishNode(t, "TSInterfaceBody"); + return this.finishNode(e, "TSInterfaceDeclaration"); + } + tsParseTypeAliasDeclaration(e) { + e.id = this.parseIdentifier(); + this.checkLVal(e.id, "typescript type alias", Be); + e.typeParameters = this.tsTryParseTypeParameters(); + e.typeAnnotation = this.tsInType(() => { + this.expect(35); + if (this.isContextual("intrinsic") && 24 !== this.lookahead().type) { + const e = this.startNode(); + this.next(); + return this.finishNode(e, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }); + this.semicolon(); + return this.finishNode(e, "TSTypeAliasDeclaration"); + } + tsInNoContext(e) { + const t = this.state.context; + this.state.context = [ t[0] ]; + try { + return e(); + } finally { + this.state.context = t; + } + } + tsInType(e) { + const t = this.state.inType; + this.state.inType = !0; + try { + return e(); + } finally { + this.state.inType = t; + } + } + tsEatThenParseType(e) { + return this.match(e) ? this.tsNextThenParseType() : void 0; + } + tsExpectThenParseType(e) { + return this.tsDoThenParseType(() => this.expect(e)); + } + tsNextThenParseType() { + return this.tsDoThenParseType(() => this.next()); + } + tsDoThenParseType(e) { + return this.tsInType(() => { + e(); + return this.tsParseType(); + }); + } + tsParseEnumMember() { + const e = this.startNode(); + e.id = this.match(4) ? this.parseExprAtom() : this.parseIdentifier(!0); + this.eat(35) && (e.initializer = this.parseMaybeAssignAllowIn()); + return this.finishNode(e, "TSEnumMember"); + } + tsParseEnumDeclaration(e, t) { + t && (e.const = !0); + e.id = this.parseIdentifier(); + this.checkLVal(e.id, "typescript enum declaration", t ? We : Re); + this.expect(13); + e.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(16); + return this.finishNode(e, "TSEnumDeclaration"); + } + tsParseModuleBlock() { + const e = this.startNode(); + this.scope.enter(he); + this.expect(13); + this.parseBlockOrModuleBlockBody(e.body = [], void 0, !0, 16); + this.scope.exit(); + return this.finishNode(e, "TSModuleBlock"); + } + tsParseModuleOrNamespaceDeclaration(e, t = !1) { + e.id = this.parseIdentifier(); + t || this.checkLVal(e.id, "module or namespace declaration", qe); + if (this.eat(24)) { + const t = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(t, !0); + e.body = t; + } else { + this.scope.enter(256); + this.prodParam.enter(bt); + e.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } + return this.finishNode(e, "TSModuleDeclaration"); + } + tsParseAmbientExternalModuleDeclaration(e) { + if (this.isContextual("global")) { + e.global = !0; + e.id = this.parseIdentifier(); + } else this.match(4) ? e.id = this.parseExprAtom() : this.unexpected(); + if (this.match(13)) { + this.scope.enter(256); + this.prodParam.enter(bt); + e.body = this.tsParseModuleBlock(); + this.prodParam.exit(); + this.scope.exit(); + } else this.semicolon(); + return this.finishNode(e, "TSModuleDeclaration"); + } + tsParseImportEqualsDeclaration(e, t) { + e.isExport = t || !1; + e.id = this.parseIdentifier(); + this.checkLVal(e.id, "import equals declaration", _e); + this.expect(35); + const n = this.tsParseModuleReference(); + "type" === e.importKind && "TSExternalModuleReference" !== n.type && this.raise(n.start, Gt.ImportAliasHasImportType); + e.moduleReference = n; + this.semicolon(); + return this.finishNode(e, "TSImportEqualsDeclaration"); + } + tsIsExternalModuleReference() { + return this.isContextual("require") && 40 === this.lookaheadCharCode(); + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(!1); + } + tsParseExternalModuleReference() { + const e = this.startNode(); + this.expectContextual("require"); + this.expect(18); + if (!this.match(4)) throw this.unexpected(); + e.expression = this.parseExprAtom(); + this.expect(19); + return this.finishNode(e, "TSExternalModuleReference"); + } + tsLookAhead(e) { + const t = this.state.clone(); + const n = e(); + this.state = t; + return n; + } + tsTryParseAndCatch(e) { + const t = this.tryParse(t => e() || t()); + if (!t.aborted && t.node) { + t.error && (this.state = t.failState); + return t.node; + } + } + tsTryParse(e) { + const t = this.state.clone(); + const n = e(); + if (void 0 !== n && !1 !== n) return n; + this.state = t; + } + tsTryParseDeclare(e) { + if (this.isLineTerminator()) return; + let t = this.state.type; + let n; + if (this.isContextual("let")) { + t = 73; + n = "let"; + } + return this.tsInAmbientContext(() => { + switch (t) { + case 67: + e.declare = !0; + return this.parseFunctionStatement(e, !1, !0); + + case 79: + e.declare = !0; + return this.parseClass(e, !0, !1); + + case 74: + if (this.match(74) && this.isLookaheadContextual("enum")) { + this.expect(74); + this.expectContextual("enum"); + return this.tsParseEnumDeclaration(e, !0); + } + + case 73: + n = n || this.state.value; + return this.parseVarStatement(e, n); + + case 5: + { + const t = this.state.value; + return "global" === t ? this.tsParseAmbientExternalModuleDeclaration(e) : this.tsParseDeclaration(e, t, !0); + } + } + }); + } + tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.value, !0); + } + tsParseExpressionStatement(e, t) { + switch (t.name) { + case "declare": + { + const t = this.tsTryParseDeclare(e); + if (t) { + t.declare = !0; + return t; + } + break; + } + + case "global": + if (this.match(13)) { + this.scope.enter(256); + this.prodParam.enter(bt); + const n = e; + n.global = !0; + n.id = t; + n.body = this.tsParseModuleBlock(); + this.scope.exit(); + this.prodParam.exit(); + return this.finishNode(n, "TSModuleDeclaration"); + } + break; + + default: + return this.tsParseDeclaration(e, t.name, !1); + } + } + tsParseDeclaration(e, t, n) { + switch (t) { + case "abstract": + if (this.tsCheckLineTerminator(n) && (this.match(79) || this.match(5))) return this.tsParseAbstractDeclaration(e); + break; + + case "enum": + if (n || this.match(5)) { + n && this.next(); + return this.tsParseEnumDeclaration(e, !1); + } + break; + + case "interface": + if (this.tsCheckLineTerminator(n) && this.match(5)) return this.tsParseInterfaceDeclaration(e); + break; + + case "module": + if (this.tsCheckLineTerminator(n)) { + if (this.match(4)) return this.tsParseAmbientExternalModuleDeclaration(e); + if (this.match(5)) return this.tsParseModuleOrNamespaceDeclaration(e); + } + break; + + case "namespace": + if (this.tsCheckLineTerminator(n) && this.match(5)) return this.tsParseModuleOrNamespaceDeclaration(e); + break; + + case "type": + if (this.tsCheckLineTerminator(n) && this.match(5)) return this.tsParseTypeAliasDeclaration(e); + } + } + tsCheckLineTerminator(e) { + if (e) { + if (this.hasFollowingLineBreak()) return !1; + this.next(); + return !0; + } + return !this.isLineTerminator(); + } + tsTryParseGenericAsyncArrowFunction(e, t) { + if (!this.isRelational("<")) return; + const n = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = !0; + const r = this.tsTryParseAndCatch(() => { + const n = this.startNodeAt(e, t); + n.typeParameters = this.tsParseTypeParameters(); + super.parseFunctionParams(n); + n.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(27); + return n; + }); + this.state.maybeInArrowParameters = n; + return r ? this.parseArrowExpression(r, null, !0) : void 0; + } + tsParseTypeArguments() { + const e = this.startNode(); + e.params = this.tsInType(() => this.tsInNoContext(() => { + this.expectRelational("<"); + return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); + })); + 0 === e.params.length && this.raise(e.start, Gt.EmptyTypeArguments); + this.expectRelational(">"); + return this.finishNode(e, "TSTypeParameterInstantiation"); + } + tsIsDeclarationStart() { + if (this.match(5)) switch (this.state.value) { + case "abstract": + case "declare": + case "enum": + case "interface": + case "module": + case "namespace": + case "type": + return !0; + } + return !1; + } + isExportDefaultSpecifier() { + return !this.tsIsDeclarationStart() && super.isExportDefaultSpecifier(); + } + parseAssignableListItem(e, t) { + const n = this.state.start; + const r = this.state.startLoc; + let i; + let s = !1; + let a = !1; + if (void 0 !== e) { + const t = {}; + this.tsParseModifiers(t, [ "public", "private", "protected", "override", "readonly" ]); + i = t.accessibility; + a = t.override; + s = t.readonly; + !1 === e && (i || s || a) && this.raise(n, Gt.UnexpectedParameterModifier); + } + const o = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(o); + const l = this.parseMaybeDefault(o.start, o.loc.start, o); + if (i || s || a) { + const e = this.startNodeAt(n, r); + t.length && (e.decorators = t); + i && (e.accessibility = i); + s && (e.readonly = s); + a && (e.override = a); + "Identifier" !== l.type && "AssignmentPattern" !== l.type && this.raise(e.start, Gt.UnsupportedParameterPropertyKind); + e.parameter = l; + return this.finishNode(e, "TSParameterProperty"); + } + t.length && (o.decorators = t); + return l; + } + parseFunctionBodyAndFinish(e, t, n = !1) { + this.match(22) && (e.returnType = this.tsParseTypeOrTypePredicateAnnotation(22)); + const r = "FunctionDeclaration" === t ? "TSDeclareFunction" : "ClassMethod" === t ? "TSDeclareMethod" : void 0; + if (r && !this.match(13) && this.isLineTerminator()) this.finishNode(e, r); else { + if ("TSDeclareFunction" === r && this.state.isAmbientContext) { + this.raise(e.start, Gt.DeclareFunctionHasImplementation); + if (e.declare) { + super.parseFunctionBodyAndFinish(e, r, n); + return; + } + } + super.parseFunctionBodyAndFinish(e, t, n); + } + } + registerFunctionStatementId(e) { + !e.body && e.id ? this.checkLVal(e.id, "function name", Ue) : super.registerFunctionStatementId(...arguments); + } + tsCheckForInvalidTypeCasts(e) { + e.forEach(e => { + "TSTypeCastExpression" === (null == e ? void 0 : e.type) && this.raise(e.typeAnnotation.start, Gt.UnexpectedTypeAnnotation); + }); + } + toReferencedList(e, t) { + this.tsCheckForInvalidTypeCasts(e); + return e; + } + parseArrayLike(...e) { + const t = super.parseArrayLike(...e); + "ArrayExpression" === t.type && this.tsCheckForInvalidTypeCasts(t.elements); + return t; + } + parseSubscript(e, t, n, r, i) { + if (!this.hasPrecedingLineBreak() && this.match(40)) { + this.state.exprAllowed = !1; + this.next(); + const r = this.startNodeAt(t, n); + r.expression = e; + return this.finishNode(r, "TSNonNullExpression"); + } + let s = !1; + if (this.match(26) && 60 === this.lookaheadCharCode()) { + if (r) { + i.stop = !0; + return e; + } + i.optionalChainMember = s = !0; + this.next(); + } + if (this.isRelational("<")) { + let a; + const o = this.tsTryParseAndCatch(() => { + if (!r && this.atPossibleAsyncArrow(e)) { + const e = this.tsTryParseGenericAsyncArrowFunction(t, n); + if (e) return e; + } + const o = this.startNodeAt(t, n); + o.callee = e; + const l = this.tsParseTypeArguments(); + if (l) { + if (s && !this.match(18)) { + a = this.state.pos; + this.unexpected(); + } + if (!r && this.eat(18)) { + o.arguments = this.parseCallExpressionArguments(19, !1); + this.tsCheckForInvalidTypeCasts(o.arguments); + o.typeParameters = l; + i.optionalChainMember && (o.optional = s); + return this.finishCallExpression(o, i.optionalChainMember); + } + if (this.match(30)) { + const r = this.parseTaggedTemplateExpression(e, t, n, i); + r.typeParameters = l; + return r; + } + } + this.unexpected(); + }); + a && this.unexpected(a, 18); + if (o) return o; + } + return super.parseSubscript(e, t, n, r, i); + } + parseNewArguments(e) { + if (this.isRelational("<")) { + const t = this.tsTryParseAndCatch(() => { + const e = this.tsParseTypeArguments(); + this.match(18) || this.unexpected(); + return e; + }); + t && (e.typeParameters = t); + } + super.parseNewArguments(e); + } + parseExprOp(e, t, n, r) { + if (Y(57) > r && !this.hasPrecedingLineBreak() && this.isContextual("as")) { + const i = this.startNodeAt(t, n); + i.expression = e; + const s = this.tsTryNextParseConstantContext(); + i.typeAnnotation = s || this.tsNextThenParseType(); + this.finishNode(i, "TSAsExpression"); + this.reScan_lt_gt(); + return this.parseExprOp(i, t, n, r); + } + return super.parseExprOp(e, t, n, r); + } + checkReservedWord(e, t, n, r) {} + checkDuplicateExports() {} + parseImport(e) { + e.importKind = "value"; + if (this.match(5) || this.match(54) || this.match(13)) { + let t = this.lookahead(); + if (this.isContextual("type") && 20 !== t.type && (5 !== t.type || "from" !== t.value) && 35 !== t.type) { + e.importKind = "type"; + this.next(); + t = this.lookahead(); + } + if (this.match(5) && 35 === t.type) return this.tsParseImportEqualsDeclaration(e); + } + const t = super.parseImport(e); + "type" === t.importKind && t.specifiers.length > 1 && "ImportDefaultSpecifier" === t.specifiers[0].type && this.raise(t.start, Gt.TypeImportCannotSpecifyDefaultAndNamed); + return t; + } + parseExport(e) { + if (this.match(82)) { + this.next(); + if (this.isContextual("type") && 61 !== this.lookaheadCharCode()) { + e.importKind = "type"; + this.next(); + } else e.importKind = "value"; + return this.tsParseImportEqualsDeclaration(e, !0); + } + if (this.eat(35)) { + const t = e; + t.expression = this.parseExpression(); + this.semicolon(); + return this.finishNode(t, "TSExportAssignment"); + } + if (this.eatContextual("as")) { + const t = e; + this.expectContextual("namespace"); + t.id = this.parseIdentifier(); + this.semicolon(); + return this.finishNode(t, "TSNamespaceExportDeclaration"); + } + if (this.isContextual("type") && 13 === this.lookahead().type) { + this.next(); + e.exportKind = "type"; + } else e.exportKind = "value"; + return super.parseExport(e); + } + isAbstractClass() { + return this.isContextual("abstract") && 79 === this.lookahead().type; + } + parseExportDefaultExpression() { + if (this.isAbstractClass()) { + const e = this.startNode(); + this.next(); + e.abstract = !0; + this.parseClass(e, !0, !0); + return e; + } + if ("interface" === this.state.value) { + const e = this.startNode(); + this.next(); + const t = this.tsParseInterfaceDeclaration(e); + if (t) return t; + } + return super.parseExportDefaultExpression(); + } + parseStatementContent(e, t) { + if (74 === this.state.type) { + const e = this.lookahead(); + if (5 === e.type && "enum" === e.value) { + const e = this.startNode(); + this.expect(74); + this.expectContextual("enum"); + return this.tsParseEnumDeclaration(e, !0); + } + } + return super.parseStatementContent(e, t); + } + parseAccessModifier() { + return this.tsParseModifier([ "public", "protected", "private" ]); + } + tsHasSomeModifiers(e, t) { + return t.some(t => Ht(t) ? e.accessibility === t : !!e[t]); + } + tsIsStartOfStaticBlocks() { + return this.isContextual("static") && 123 === this.lookaheadCharCode(); + } + parseClassMember(e, t, n) { + const r = [ "declare", "private", "public", "protected", "override", "abstract", "readonly", "static" ]; + this.tsParseModifiers(t, r, void 0, void 0, !0); + const i = () => { + if (this.tsIsStartOfStaticBlocks()) { + this.next(); + this.next(); + this.tsHasSomeModifiers(t, r) && this.raise(this.state.pos, Gt.StaticBlockCannotHaveModifier); + this.parseClassStaticBlock(e, t); + } else this.parseClassMemberWithIsStatic(e, t, n, !!t.static); + }; + t.declare ? this.tsInAmbientContext(i) : i(); + } + parseClassMemberWithIsStatic(e, t, n, r) { + const i = this.tsTryParseIndexSignature(t); + if (i) { + e.body.push(i); + t.abstract && this.raise(t.start, Gt.IndexSignatureHasAbstract); + t.accessibility && this.raise(t.start, Gt.IndexSignatureHasAccessibility, t.accessibility); + t.declare && this.raise(t.start, Gt.IndexSignatureHasDeclare); + t.override && this.raise(t.start, Gt.IndexSignatureHasOverride); + } else { + !this.state.inAbstractClass && t.abstract && this.raise(t.start, Gt.NonAbstractClassHasAbstractMethod); + t.override && (n.hadSuperClass || this.raise(t.start, Gt.OverrideNotInSubClass)); + super.parseClassMemberWithIsStatic(e, t, n, r); + } + } + parsePostMemberNameModifiers(e) { + this.eat(25) && (e.optional = !0); + e.readonly && this.match(18) && this.raise(e.start, Gt.ClassMethodHasReadonly); + e.declare && this.match(18) && this.raise(e.start, Gt.ClassMethodHasDeclare); + } + parseExpressionStatement(e, t) { + return ("Identifier" === t.type ? this.tsParseExpressionStatement(e, t) : void 0) || super.parseExpressionStatement(e, t); + } + shouldParseExportDeclaration() { + return !!this.tsIsDeclarationStart() || super.shouldParseExportDeclaration(); + } + parseConditional(e, t, n, r) { + if (!this.state.maybeInArrowParameters || !this.match(25)) return super.parseConditional(e, t, n, r); + const i = this.tryParse(() => super.parseConditional(e, t, n)); + if (!i.node) { + i.error && super.setOptionalParametersError(r, i.error); + return e; + } + i.error && (this.state = i.failState); + return i.node; + } + parseParenItem(e, t, n) { + e = super.parseParenItem(e, t, n); + if (this.eat(25)) { + e.optional = !0; + this.resetEndLocation(e); + } + if (this.match(22)) { + const r = this.startNodeAt(t, n); + r.expression = e; + r.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(r, "TSTypeCastExpression"); + } + return e; + } + parseExportDeclaration(e) { + const t = this.state.start; + const n = this.state.startLoc; + const r = this.eatContextual("declare"); + if (r && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) throw this.raise(this.state.start, Gt.ExpectedAmbientAfterExportDeclare); + let i; + this.match(5) && (i = this.tsTryParseExportDeclaration()); + i || (i = super.parseExportDeclaration(e)); + i && ("TSInterfaceDeclaration" === i.type || "TSTypeAliasDeclaration" === i.type || r) && (e.exportKind = "type"); + if (i && r) { + this.resetStartLocation(i, t, n); + i.declare = !0; + } + return i; + } + parseClassId(e, t, n) { + if ((!t || n) && this.isContextual("implements")) return; + super.parseClassId(e, t, n, e.declare ? Ue : Me); + const r = this.tsTryParseTypeParameters(); + r && (e.typeParameters = r); + } + parseClassPropertyAnnotation(e) { + !e.optional && this.eat(40) && (e.definite = !0); + const t = this.tsTryParseTypeAnnotation(); + t && (e.typeAnnotation = t); + } + parseClassProperty(e) { + this.parseClassPropertyAnnotation(e); + this.state.isAmbientContext && this.match(35) && this.raise(this.state.start, Gt.DeclareClassFieldHasInitializer); + if (e.abstract && this.match(35)) { + const {key: t} = e; + this.raise(this.state.start, Gt.AbstractPropertyHasInitializer, "Identifier" !== t.type || e.computed ? `[${this.input.slice(t.start, t.end)}]` : t.name); + } + return super.parseClassProperty(e); + } + parseClassPrivateProperty(e) { + e.abstract && this.raise(e.start, Gt.PrivateElementHasAbstract); + e.accessibility && this.raise(e.start, Gt.PrivateElementHasAccessibility, e.accessibility); + this.parseClassPropertyAnnotation(e); + return super.parseClassPrivateProperty(e); + } + pushClassMethod(e, t, n, r, i, s) { + const a = this.tsTryParseTypeParameters(); + a && i && this.raise(a.start, Gt.ConstructorHasTypeParameters); + !t.declare || "get" !== t.kind && "set" !== t.kind || this.raise(t.start, Gt.DeclareAccessor, t.kind); + a && (t.typeParameters = a); + super.pushClassMethod(e, t, n, r, i, s); + } + pushClassPrivateMethod(e, t, n, r) { + const i = this.tsTryParseTypeParameters(); + i && (t.typeParameters = i); + super.pushClassPrivateMethod(e, t, n, r); + } + parseClassSuper(e) { + super.parseClassSuper(e); + e.superClass && this.isRelational("<") && (e.superTypeParameters = this.tsParseTypeArguments()); + this.eatContextual("implements") && (e.implements = this.tsParseHeritageClause("implements")); + } + parseObjPropValue(e, ...t) { + const n = this.tsTryParseTypeParameters(); + n && (e.typeParameters = n); + super.parseObjPropValue(e, ...t); + } + parseFunctionParams(e, t) { + const n = this.tsTryParseTypeParameters(); + n && (e.typeParameters = n); + super.parseFunctionParams(e, t); + } + parseVarId(e, t) { + super.parseVarId(e, t); + "Identifier" === e.id.type && this.eat(40) && (e.definite = !0); + const n = this.tsTryParseTypeAnnotation(); + if (n) { + e.id.typeAnnotation = n; + this.resetEndLocation(e.id); + } + } + parseAsyncArrowFromCallExpression(e, t) { + this.match(22) && (e.returnType = this.tsParseTypeAnnotation()); + return super.parseAsyncArrowFromCallExpression(e, t); + } + parseMaybeAssign(...e) { + var t, n, r, i, s, a, o; + let l; + let c; + let p; + if (this.hasPlugin("jsx") && (this.match(94) || this.isRelational("<"))) { + l = this.state.clone(); + if (!(c = this.tryParse(() => super.parseMaybeAssign(...e), l)).error) return c.node; + const {context: t} = this.state; + t[t.length - 1] === C.j_oTag ? t.length -= 2 : t[t.length - 1] === C.j_expr && (t.length -= 1); + } + if (!(null != (t = c) && t.error || this.isRelational("<"))) return super.parseMaybeAssign(...e); + let u; + l = l || this.state.clone(); + const d = this.tryParse(t => { + var n, r; + u = this.tsParseTypeParameters(); + const i = super.parseMaybeAssign(...e); + ("ArrowFunctionExpression" !== i.type || null != (n = i.extra) && n.parenthesized) && t(); + 0 !== (null == (r = u) ? void 0 : r.params.length) && this.resetStartLocationFromNode(i, u); + i.typeParameters = u; + return i; + }, l); + if (!d.error && !d.aborted) return d.node; + if (!c) { + Xt(!this.hasPlugin("jsx")); + if (!(p = this.tryParse(() => super.parseMaybeAssign(...e), l)).error) return p.node; + } + if (null != (n = c) && n.node) { + this.state = c.failState; + return c.node; + } + if (d.node) { + this.state = d.failState; + return d.node; + } + if (null != (r = p) && r.node) { + this.state = p.failState; + return p.node; + } + if (null != (i = c) && i.thrown) throw c.error; + if (d.thrown) throw d.error; + if (null != (s = p) && s.thrown) throw p.error; + throw (null == (a = c) ? void 0 : a.error) || d.error || (null == (o = p) ? void 0 : o.error); + } + parseMaybeUnary(e) { + return !this.hasPlugin("jsx") && this.isRelational("<") ? this.tsParseTypeAssertion() : super.parseMaybeUnary(e); + } + parseArrow(e) { + if (this.match(22)) { + const t = this.tryParse(e => { + const t = this.tsParseTypeOrTypePredicateAnnotation(22); + !this.canInsertSemicolon() && this.match(27) || e(); + return t; + }); + if (t.aborted) return; + if (!t.thrown) { + t.error && (this.state = t.failState); + e.returnType = t.node; + } + } + return super.parseArrow(e); + } + parseAssignableListItemTypes(e) { + if (this.eat(25)) { + "Identifier" === e.type || this.state.isAmbientContext || this.state.inType || this.raise(e.start, Gt.PatternIsOptional); + e.optional = !0; + } + const t = this.tsTryParseTypeAnnotation(); + t && (e.typeAnnotation = t); + this.resetEndLocation(e); + return e; + } + isAssignable(e, t) { + switch (e.type) { + case "TSTypeCastExpression": + return this.isAssignable(e.expression, t); + + case "TSParameterProperty": + return !0; + + default: + return super.isAssignable(e, t); + } + } + toAssignable(e, t = !1) { + switch (e.type) { + case "TSTypeCastExpression": + return super.toAssignable(this.typeCastToParameter(e), t); + + case "TSParameterProperty": + return super.toAssignable(e, t); + + case "ParenthesizedExpression": + return this.toAssignableParenthesizedExpression(e, t); + + case "TSAsExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + e.expression = this.toAssignable(e.expression, t); + return e; + + default: + return super.toAssignable(e, t); + } + } + toAssignableParenthesizedExpression(e, t) { + switch (e.expression.type) { + case "TSAsExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + e.expression = this.toAssignable(e.expression, t); + return e; + + default: + return super.toAssignable(e, t); + } + } + checkLVal(e, t, ...n) { + var r; + switch (e.type) { + case "TSTypeCastExpression": + return; + + case "TSParameterProperty": + this.checkLVal(e.parameter, "parameter property", ...n); + return; + + case "TSAsExpression": + case "TSTypeAssertion": + if (!(n[0] || "parenthesized expression" === t || null != (r = e.extra) && r.parenthesized)) { + this.raise(e.start, E.InvalidLhs, t); + break; + } + this.checkLVal(e.expression, "parenthesized expression", ...n); + return; + + case "TSNonNullExpression": + this.checkLVal(e.expression, t, ...n); + return; + + default: + super.checkLVal(e, t, ...n); + return; + } + } + parseBindingAtom() { + switch (this.state.type) { + case 77: + return this.parseIdentifier(!0); + + default: + return super.parseBindingAtom(); + } + } + parseMaybeDecoratorArguments(e) { + if (this.isRelational("<")) { + const t = this.tsParseTypeArguments(); + if (this.match(18)) { + const n = super.parseMaybeDecoratorArguments(e); + n.typeParameters = t; + return n; + } + this.unexpected(this.state.start, 18); + } + return super.parseMaybeDecoratorArguments(e); + } + checkCommaAfterRest(e) { + this.state.isAmbientContext && this.match(20) && this.lookaheadCharCode() === e ? this.next() : super.checkCommaAfterRest(e); + } + isClassMethod() { + return this.isRelational("<") || super.isClassMethod(); + } + isClassProperty() { + return this.match(40) || this.match(22) || super.isClassProperty(); + } + parseMaybeDefault(...e) { + const t = super.parseMaybeDefault(...e); + "AssignmentPattern" === t.type && t.typeAnnotation && t.right.start < t.typeAnnotation.start && this.raise(t.typeAnnotation.start, Gt.TypeAnnotationAfterAssign); + return t; + } + getTokenFromCode(e) { + return !this.state.inType || 62 !== e && 60 !== e ? super.getTokenFromCode(e) : this.finishOp(50, 1); + } + reScan_lt_gt() { + if (this.match(50)) { + const e = this.input.charCodeAt(this.state.start); + if (60 === e || 62 === e) { + this.state.pos -= 1; + this.readToken_lt_gt(e); + } + } + } + toAssignableList(e) { + for (let t = 0; t < e.length; t++) { + const n = e[t]; + if (n) switch (n.type) { + case "TSTypeCastExpression": + e[t] = this.typeCastToParameter(n); + break; + + case "TSAsExpression": + case "TSTypeAssertion": + this.state.maybeInArrowParameters ? this.raise(n.start, Gt.UnexpectedTypeCastInParameter) : e[t] = this.typeCastToParameter(n); + } + } + return super.toAssignableList(...arguments); + } + typeCastToParameter(e) { + e.expression.typeAnnotation = e.typeAnnotation; + this.resetEndLocation(e.expression, e.typeAnnotation.end, e.typeAnnotation.loc.end); + return e.expression; + } + shouldParseArrow(e) { + return this.match(22) ? e.every(e => this.isAssignable(e, !0)) : super.shouldParseArrow(e); + } + shouldParseAsyncArrow() { + return this.match(22) || super.shouldParseAsyncArrow(); + } + canHaveLeadingDecorator() { + return super.canHaveLeadingDecorator() || this.isAbstractClass(); + } + jsxParseOpeningElementAfterName(e) { + if (this.isRelational("<")) { + const t = this.tsTryParseAndCatch(() => this.tsParseTypeArguments()); + t && (e.typeParameters = t); + } + return super.jsxParseOpeningElementAfterName(e); + } + getGetterSetterExpectedParamCount(e) { + const t = super.getGetterSetterExpectedParamCount(e); + const n = this.getObjectOrClassMethodParams(e)[0]; + return n && this.isThisParam(n) ? t + 1 : t; + } + parseCatchClauseParam() { + const e = super.parseCatchClauseParam(); + const t = this.tsTryParseTypeAnnotation(); + if (t) { + e.typeAnnotation = t; + this.resetEndLocation(e); + } + return e; + } + tsInAmbientContext(e) { + const t = this.state.isAmbientContext; + this.state.isAmbientContext = !0; + try { + return e(); + } finally { + this.state.isAmbientContext = t; + } + } + parseClass(e, ...t) { + const n = this.state.inAbstractClass; + this.state.inAbstractClass = !!e.abstract; + try { + return super.parseClass(e, ...t); + } finally { + this.state.inAbstractClass = n; + } + } + tsParseAbstractDeclaration(e) { + if (this.match(79)) { + e.abstract = !0; + return this.parseClass(e, !0, !1); + } + if (this.isContextual("interface")) { + if (!this.hasFollowingLineBreak()) { + e.abstract = !0; + this.raise(e.start, Gt.NonClassMethodPropertyHasAbstractModifer); + this.next(); + return this.tsParseInterfaceDeclaration(e); + } + } else this.unexpected(null, 79); + } + parseMethod(...e) { + const t = super.parseMethod(...e); + if (t.abstract) { + if (this.hasPlugin("estree") ? !!t.value.body : !!t.body) { + const {key: e} = t; + this.raise(t.start, Gt.AbstractMethodHasImplementation, "Identifier" !== e.type || t.computed ? `[${this.input.slice(e.start, e.end)}]` : e.name); + } + } + return t; + } + tsParseTypeParameterName() { + return this.parseIdentifier().name; + } + shouldParseAsAmbientContext() { + return !!this.getPluginOption("typescript", "dts"); + } + parse() { + this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = !0); + return super.parse(); + } + getExpression() { + this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = !0); + return super.getExpression(); + } + })); + const $t = v({ + ClassNameIsRequired: "A class name is required." + }, x.SyntaxError); + function zt(e, t) { + return e.some(e => Array.isArray(e) ? e[0] === t : e === t); + } + function Qt(e, t, n) { + const r = e.find(e => Array.isArray(e) ? e[0] === t : e === t); + return r && Array.isArray(r) ? r[1][n] : null; + } + const Zt = [ "minimal", "fsharp", "hack", "smart" ]; + const en = [ "%", "#" ]; + const tn = [ "hash", "bar" ]; + const nn = { + estree: r, + jsx: a, + flow: s, + typescript: o, + v8intrinsic: e => (class extends e { + parseV8Intrinsic() { + if (this.match(53)) { + const e = this.state.start; + const t = this.startNode(); + this.eat(53); + if (this.match(5)) { + const e = this.parseIdentifierName(this.state.start); + const n = this.createIdentifier(t, e); + n.type = "V8IntrinsicIdentifier"; + if (this.match(18)) return n; + } + this.unexpected(e); + } + } + parseExprAtom() { + return this.parseV8Intrinsic() || super.parseExprAtom(...arguments); + } + }), + placeholders: e => (class extends e { + parsePlaceholder(e) { + if (this.match(96)) { + const t = this.startNode(); + this.next(); + this.assertNoSpace("Unexpected space in placeholder."); + t.name = super.parseIdentifier(!0); + this.assertNoSpace("Unexpected space in placeholder."); + this.expect(96); + return this.finishPlaceholder(t, e); + } + } + finishPlaceholder(e, t) { + const n = !(!e.expectedNode || "Placeholder" !== e.type); + e.expectedNode = t; + return n ? e : this.finishNode(e, "Placeholder"); + } + getTokenFromCode(e) { + return 37 === e && 37 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(96, 2) : super.getTokenFromCode(...arguments); + } + parseExprAtom() { + return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments); + } + parseIdentifier() { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments); + } + checkReservedWord(e) { + void 0 !== e && super.checkReservedWord(...arguments); + } + parseBindingAtom() { + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments); + } + checkLVal(e) { + "Placeholder" !== e.type && super.checkLVal(...arguments); + } + toAssignable(e) { + if (e && "Placeholder" === e.type && "Expression" === e.expectedNode) { + e.expectedNode = "Pattern"; + return e; + } + return super.toAssignable(...arguments); + } + isLet(e) { + if (super.isLet(e)) return !0; + if (!this.isContextual("let")) return !1; + if (e) return !1; + return 96 === this.lookahead().type; + } + verifyBreakContinue(e) { + e.label && "Placeholder" === e.label.type || super.verifyBreakContinue(...arguments); + } + parseExpressionStatement(e, t) { + if ("Placeholder" !== t.type || t.extra && t.extra.parenthesized) return super.parseExpressionStatement(...arguments); + if (this.match(22)) { + const n = e; + n.label = this.finishPlaceholder(t, "Identifier"); + this.next(); + n.body = this.parseStatement("label"); + return this.finishNode(n, "LabeledStatement"); + } + this.semicolon(); + e.name = t.name; + return this.finishPlaceholder(e, "Statement"); + } + parseBlock() { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments); + } + parseFunctionId() { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments); + } + parseClass(e, t, n) { + const r = t ? "ClassDeclaration" : "ClassExpression"; + this.next(); + this.takeDecorators(e); + const i = this.state.strict; + const s = this.parsePlaceholder("Identifier"); + if (s) if (this.match(80) || this.match(96) || this.match(13)) e.id = s; else { + if (n || !t) { + e.id = null; + e.body = this.finishPlaceholder(s, "ClassBody"); + return this.finishNode(e, r); + } + this.unexpected(null, $t.ClassNameIsRequired); + } else this.parseClassId(e, t, n); + this.parseClassSuper(e); + e.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!e.superClass, i); + return this.finishNode(e, r); + } + parseExport(e) { + const t = this.parsePlaceholder("Identifier"); + if (!t) return super.parseExport(...arguments); + if (!this.isContextual("from") && !this.match(20)) { + e.specifiers = []; + e.source = null; + e.declaration = this.finishPlaceholder(t, "Declaration"); + return this.finishNode(e, "ExportNamedDeclaration"); + } + this.expectPlugin("exportDefaultFrom"); + const n = this.startNode(); + n.exported = t; + e.specifiers = [ this.finishNode(n, "ExportDefaultSpecifier") ]; + return super.parseExport(e); + } + isExportDefaultSpecifier() { + if (this.match(64)) { + const e = this.nextTokenStart(); + if (this.isUnparsedContextual(e, "from") && this.input.startsWith(q(96), this.nextTokenStartSince(e + 4))) return !0; + } + return super.isExportDefaultSpecifier(); + } + maybeParseExportDefaultSpecifier(e) { + return !!(e.specifiers && e.specifiers.length > 0) || super.maybeParseExportDefaultSpecifier(...arguments); + } + checkExport(e) { + const {specifiers: t} = e; + null != t && t.length && (e.specifiers = t.filter(e => "Placeholder" === e.exported.type)); + super.checkExport(e); + e.specifiers = t; + } + parseImport(e) { + const t = this.parsePlaceholder("Identifier"); + if (!t) return super.parseImport(...arguments); + e.specifiers = []; + if (!this.isContextual("from") && !this.match(20)) { + e.source = this.finishPlaceholder(t, "StringLiteral"); + this.semicolon(); + return this.finishNode(e, "ImportDeclaration"); + } + const n = this.startNodeAtNode(t); + n.local = t; + this.finishNode(n, "ImportDefaultSpecifier"); + e.specifiers.push(n); + if (this.eat(20)) { + this.maybeParseStarImportSpecifier(e) || this.parseNamedImportSpecifiers(e); + } + this.expectContextual("from"); + e.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(e, "ImportDeclaration"); + } + parseImportSource() { + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments); + } + }) + }; + const rn = Object.keys(nn); + const sn = { + sourceType: "script", + sourceFilename: void 0, + startLine: 1, + allowAwaitOutsideFunction: !1, + allowReturnOutsideFunction: !1, + allowImportExportEverywhere: !1, + allowSuperOutsideMethod: !1, + allowUndeclaredExports: !1, + plugins: [], + strictMode: null, + ranges: !1, + tokens: !1, + createParenthesizedExpressions: !1, + errorRecovery: !1, + attachComment: !0 + }; + const an = e => "ParenthesizedExpression" === e.type ? an(e.expression) : e; + class on extends Dt { + toAssignable(e, t = !1) { + var n, r, i; + let s = void 0; + if ("ParenthesizedExpression" === e.type || null != (n = e.extra) && n.parenthesized) { + s = an(e); + t ? "Identifier" === s.type ? this.expressionScope.recordParenthesizedIdentifierError(e.start, E.InvalidParenthesizedAssignment) : "MemberExpression" !== s.type && this.raise(e.start, E.InvalidParenthesizedAssignment) : this.raise(e.start, E.InvalidParenthesizedAssignment); + } + switch (e.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break; + + case "ObjectExpression": + e.type = "ObjectPattern"; + for (let n = 0, r = e.properties.length, s = r - 1; n < r; n++) { + const r = e.properties[n]; + const a = n === s; + this.toAssignableObjectExpressionProp(r, a, t); + a && "RestElement" === r.type && null != (i = e.extra) && i.trailingComma && this.raiseRestNotLast(e.extra.trailingComma); + } + break; + + case "ObjectProperty": + this.toAssignable(e.value, t); + break; + + case "SpreadElement": + { + this.checkToRestConversion(e); + e.type = "RestElement"; + const n = e.argument; + this.toAssignable(n, t); + break; + } + + case "ArrayExpression": + e.type = "ArrayPattern"; + this.toAssignableList(e.elements, null == (r = e.extra) ? void 0 : r.trailingComma, t); + break; + + case "AssignmentExpression": + "=" !== e.operator && this.raise(e.left.end, E.MissingEqInAssignment); + e.type = "AssignmentPattern"; + delete e.operator; + this.toAssignable(e.left, t); + break; + + case "ParenthesizedExpression": + this.toAssignable(s, t); + } + return e; + } + toAssignableObjectExpressionProp(e, t, n) { + if ("ObjectMethod" === e.type) { + const t = "get" === e.kind || "set" === e.kind ? E.PatternHasAccessor : E.PatternHasMethod; + this.raise(e.key.start, t); + } else "SpreadElement" !== e.type || t ? this.toAssignable(e, n) : this.raiseRestNotLast(e.start); + } + toAssignableList(e, t, n) { + let r = e.length; + if (r) { + const i = e[r - 1]; + if ("RestElement" === (null == i ? void 0 : i.type)) --r; else if ("SpreadElement" === (null == i ? void 0 : i.type)) { + i.type = "RestElement"; + let e = i.argument; + this.toAssignable(e, n); + "Identifier" !== (e = an(e)).type && "MemberExpression" !== e.type && "ArrayPattern" !== e.type && "ObjectPattern" !== e.type && this.unexpected(e.start); + t && this.raiseTrailingCommaAfterRest(t); + --r; + } + } + for (let t = 0; t < r; t++) { + const r = e[t]; + if (r) { + this.toAssignable(r, n); + "RestElement" === r.type && this.raiseRestNotLast(r.start); + } + } + return e; + } + isAssignable(e, t) { + switch (e.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return !0; + + case "ObjectExpression": + { + const t = e.properties.length - 1; + return e.properties.every((e, n) => "ObjectMethod" !== e.type && (n === t || "SpreadElement" !== e.type) && this.isAssignable(e)); + } + + case "ObjectProperty": + return this.isAssignable(e.value); + + case "SpreadElement": + return this.isAssignable(e.argument); + + case "ArrayExpression": + return e.elements.every(e => null === e || this.isAssignable(e)); + + case "AssignmentExpression": + return "=" === e.operator; + + case "ParenthesizedExpression": + return this.isAssignable(e.expression); + + case "MemberExpression": + case "OptionalMemberExpression": + return !t; + + default: + return !1; + } + } + toReferencedList(e, t) { + return e; + } + toReferencedListDeep(e, t) { + this.toReferencedList(e, t); + for (const t of e) "ArrayExpression" === (null == t ? void 0 : t.type) && this.toReferencedListDeep(t.elements); + } + parseSpread(e, t) { + const n = this.startNode(); + this.next(); + n.argument = this.parseMaybeAssignAllowIn(e, void 0, t); + return this.finishNode(n, "SpreadElement"); + } + parseRestBinding() { + const e = this.startNode(); + this.next(); + e.argument = this.parseBindingAtom(); + return this.finishNode(e, "RestElement"); + } + parseBindingAtom() { + switch (this.state.type) { + case 8: + { + const e = this.startNode(); + this.next(); + e.elements = this.parseBindingList(11, 93, !0); + return this.finishNode(e, "ArrayPattern"); + } + + case 13: + return this.parseObjectLike(16, !0); + } + return this.parseIdentifier(); + } + parseBindingList(e, t, n, r) { + const i = []; + let s = !0; + for (;!this.eat(e); ) { + s ? s = !1 : this.expect(20); + if (n && this.match(20)) i.push(null); else { + if (this.eat(e)) break; + if (this.match(29)) { + i.push(this.parseAssignableListItemTypes(this.parseRestBinding())); + this.checkCommaAfterRest(t); + this.expect(e); + break; + } + { + const e = []; + this.match(32) && this.hasPlugin("decorators") && this.raise(this.state.start, E.UnsupportedParameterDecorator); + for (;this.match(32); ) e.push(this.parseDecorator()); + i.push(this.parseAssignableListItem(r, e)); + } + } + } + return i; + } + parseAssignableListItem(e, t) { + const n = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(n); + const r = this.parseMaybeDefault(n.start, n.loc.start, n); + t.length && (n.decorators = t); + return r; + } + parseAssignableListItemTypes(e) { + return e; + } + parseMaybeDefault(e, t, n) { + var r, i, s; + t = null != (r = t) ? r : this.state.startLoc; + e = null != (i = e) ? i : this.state.start; + n = null != (s = n) ? s : this.parseBindingAtom(); + if (!this.eat(35)) return n; + const a = this.startNodeAt(e, t); + a.left = n; + a.right = this.parseMaybeAssignAllowIn(); + return this.finishNode(a, "AssignmentPattern"); + } + checkLVal(e, t, n = Ve, r, i, s = !1) { + switch (e.type) { + case "Identifier": + { + const {name: t} = e; + this.state.strict && (s ? pe(t, this.inModule) : ce(t)) && this.raise(e.start, n === Ve ? E.StrictEvalArguments : E.StrictEvalArgumentsBinding, t); + r && (r.has(t) ? this.raise(e.start, E.ParamDupe) : r.add(t)); + i && "let" === t && this.raise(e.start, E.LetInLexicalBinding); + n & Ve || this.scope.declareName(t, n, e.start); + break; + } + + case "MemberExpression": + n !== Ve && this.raise(e.start, E.InvalidPropertyBindingPattern); + break; + + case "ObjectPattern": + for (let t of e.properties) { + if (this.isObjectProperty(t)) t = t.value; else if (this.isObjectMethod(t)) continue; + this.checkLVal(t, "object destructuring pattern", n, r, i); + } + break; + + case "ArrayPattern": + for (const t of e.elements) t && this.checkLVal(t, "array destructuring pattern", n, r, i); + break; + + case "AssignmentPattern": + this.checkLVal(e.left, "assignment pattern", n, r); + break; + + case "RestElement": + this.checkLVal(e.argument, "rest element", n, r); + break; + + case "ParenthesizedExpression": + this.checkLVal(e.expression, "parenthesized expression", n, r); + break; + + default: + this.raise(e.start, n === Ve ? E.InvalidLhs : E.InvalidLhsBinding, t); + } + } + checkToRestConversion(e) { + "Identifier" !== e.argument.type && "MemberExpression" !== e.argument.type && this.raise(e.argument.start, E.InvalidRestAssignmentPattern); + } + checkCommaAfterRest(e) { + this.match(20) && (this.lookaheadCharCode() === e ? this.raiseTrailingCommaAfterRest(this.state.start) : this.raiseRestNotLast(this.state.start)); + } + raiseRestNotLast(e) { + throw this.raise(e, E.ElementAfterRest); + } + raiseTrailingCommaAfterRest(e) { + this.raise(e, E.RestTrailingComma); + } + } + const ln = new Map([ [ "ArrowFunctionExpression", "arrow function" ], [ "AssignmentExpression", "assignment" ], [ "ConditionalExpression", "conditional" ], [ "YieldExpression", "yield" ] ]); + class cn extends on { + checkProto(e, t, n, r) { + if ("SpreadElement" === e.type || this.isObjectMethod(e) || e.computed || e.shorthand) return; + const i = e.key; + if ("__proto__" === ("Identifier" === i.type ? i.name : i.value)) { + if (t) { + this.raise(i.start, E.RecordNoProto); + return; + } + n.used && (r ? -1 === r.doubleProto && (r.doubleProto = i.start) : this.raise(i.start, E.DuplicateProto)); + n.used = !0; + } + } + shouldExitDescending(e, t) { + return "ArrowFunctionExpression" === e.type && e.start === t; + } + getExpression() { + this.enterInitialScopes(); + this.nextToken(); + const e = this.parseExpression(); + this.match(7) || this.unexpected(); + this.finalizeRemainingComments(); + e.comments = this.state.comments; + e.errors = this.state.errors; + this.options.tokens && (e.tokens = this.tokens); + return e; + } + parseExpression(e, t) { + return e ? this.disallowInAnd(() => this.parseExpressionBase(t)) : this.allowInAnd(() => this.parseExpressionBase(t)); + } + parseExpressionBase(e) { + const t = this.state.start; + const n = this.state.startLoc; + const r = this.parseMaybeAssign(e); + if (this.match(20)) { + const i = this.startNodeAt(t, n); + i.expressions = [ r ]; + for (;this.eat(20); ) i.expressions.push(this.parseMaybeAssign(e)); + this.toReferencedList(i.expressions); + return this.finishNode(i, "SequenceExpression"); + } + return r; + } + parseMaybeAssignDisallowIn(e, t) { + return this.disallowInAnd(() => this.parseMaybeAssign(e, t)); + } + parseMaybeAssignAllowIn(e, t) { + return this.allowInAnd(() => this.parseMaybeAssign(e, t)); + } + setOptionalParametersError(e, t) { + var n; + e.optionalParameters = null != (n = null == t ? void 0 : t.pos) ? n : this.state.start; + } + parseMaybeAssign(e, t) { + const n = this.state.start; + const r = this.state.startLoc; + if (this.isContextual("yield") && this.prodParam.hasYield) { + let e = this.parseYield(); + t && (e = t.call(this, e, n, r)); + return e; + } + let i; + if (e) i = !1; else { + e = new Ct(); + i = !0; + } + (this.match(18) || this.match(5)) && (this.state.potentialArrowAt = this.state.start); + let s = this.parseMaybeConditional(e); + t && (s = t.call(this, s, n, r)); + if ((a = this.state.type) >= 35 && a <= 38) { + const t = this.startNodeAt(n, r); + const i = this.state.value; + t.operator = i; + if (this.match(35)) { + t.left = this.toAssignable(s, !0); + e.doubleProto = -1; + } else t.left = s; + e.shorthandAssign >= t.left.start && (e.shorthandAssign = -1); + this.checkLVal(s, "assignment expression"); + this.next(); + t.right = this.parseMaybeAssign(); + return this.finishNode(t, "AssignmentExpression"); + } + i && this.checkExpressionErrors(e, !0); + var a; + return s; + } + parseMaybeConditional(e) { + const t = this.state.start; + const n = this.state.startLoc; + const r = this.state.potentialArrowAt; + const i = this.parseExprOps(e); + return this.shouldExitDescending(i, r) ? i : this.parseConditional(i, t, n, e); + } + parseConditional(e, t, n, r) { + if (this.eat(25)) { + const r = this.startNodeAt(t, n); + r.test = e; + r.consequent = this.parseMaybeAssignAllowIn(); + this.expect(22); + r.alternate = this.parseMaybeAssign(); + return this.finishNode(r, "ConditionalExpression"); + } + return e; + } + parseMaybeUnaryOrPrivate(e) { + return this.match(6) ? this.parsePrivateName() : this.parseMaybeUnary(e); + } + parseExprOps(e) { + const t = this.state.start; + const n = this.state.startLoc; + const r = this.state.potentialArrowAt; + const i = this.parseMaybeUnaryOrPrivate(e); + return this.shouldExitDescending(i, r) ? i : this.parseExprOp(i, t, n, -1); + } + parseExprOp(e, t, n, r) { + if (this.isPrivateName(e)) { + const t = this.getPrivateNameSV(e); + const {start: n} = e; + (r >= Y(57) || !this.prodParam.hasIn || !this.match(57)) && this.raise(n, E.PrivateInExpectedIn, t); + this.classScope.usePrivateName(t, n); + } + const i = this.state.type; + if ((s = i) >= 42 && s <= 58 && (this.prodParam.hasIn || !this.match(57))) { + let s = Y(i); + if (s > r) { + if (42 === i) { + this.expectPlugin("pipelineOperator"); + if (this.state.inFSharpPipelineDirectBody) return e; + this.checkPipelineAtInfixOperator(e, t); + } + const a = this.startNodeAt(t, n); + a.left = e; + a.operator = this.state.value; + const o = 44 === i || 45 === i; + const l = 43 === i; + l && (s = Y(45)); + this.next(); + if (42 === i && "minimal" === this.getPluginOption("pipelineOperator", "proposal") && this.match(5) && "await" === this.state.value && this.prodParam.hasAwait) throw this.raise(this.state.start, E.UnexpectedAwaitAfterPipelineBody); + a.right = this.parseExprOpRightExpr(i, s); + this.finishNode(a, o || l ? "LogicalExpression" : "BinaryExpression"); + const c = this.state.type; + if (l && (44 === c || 45 === c) || o && 43 === c) throw this.raise(this.state.start, E.MixingCoalesceWithLogical); + return this.parseExprOp(a, t, n, r); + } + } + var s; + return e; + } + parseExprOpRightExpr(e, t) { + const n = this.state.start; + const r = this.state.startLoc; + switch (e) { + case 42: + switch (this.getPluginOption("pipelineOperator", "proposal")) { + case "hack": + return this.withTopicBindingContext(() => this.parseHackPipeBody()); + + case "smart": + return this.withTopicBindingContext(() => { + if (this.prodParam.hasYield && this.isContextual("yield")) throw this.raise(this.state.start, E.PipeBodyIsTighter, this.state.value); + return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e, t), n, r); + }); + + case "fsharp": + return this.withSoloAwaitPermittingContext(() => this.parseFSharpPipelineBody(t)); + } + + default: + return this.parseExprOpBaseRightExpr(e, t); + } + } + parseExprOpBaseRightExpr(e, t) { + const n = this.state.start; + const r = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), n, r, 56 === e ? t - 1 : t); + } + parseHackPipeBody() { + var e; + const {start: t} = this.state; + const n = this.parseMaybeAssign(); + !ln.has(n.type) || null != (e = n.extra) && e.parenthesized || this.raise(t, E.PipeUnparenthesizedBody, ln.get(n.type)); + this.topicReferenceWasUsedInCurrentContext() || this.raise(t, E.PipeTopicUnused); + return n; + } + checkExponentialAfterUnary(e) { + this.match(56) && this.raise(e.argument.start, E.UnexpectedTokenUnaryExponentiation); + } + parseMaybeUnary(e, t) { + const n = this.state.start; + const r = this.state.startLoc; + const i = this.isContextual("await"); + if (i && this.isAwaitAllowed()) { + this.next(); + const e = this.parseAwait(n, r); + t || this.checkExponentialAfterUnary(e); + return e; + } + const s = this.match(39); + const a = this.startNode(); + if (o = this.state.type, R[o]) { + a.operator = this.state.value; + a.prefix = !0; + this.match(71) && this.expectPlugin("throwExpressions"); + const n = this.match(88); + this.next(); + a.argument = this.parseMaybeUnary(null, !0); + this.checkExpressionErrors(e, !0); + if (this.state.strict && n) { + const e = a.argument; + "Identifier" === e.type ? this.raise(a.start, E.StrictDelete) : this.hasPropertyAsPrivateName(e) && this.raise(a.start, E.DeletePrivateField); + } + if (!s) { + t || this.checkExponentialAfterUnary(a); + return this.finishNode(a, "UnaryExpression"); + } + } + var o; + const l = this.parseUpdate(a, s, e); + if (i) { + const {type: e} = this.state; + if ((this.hasPlugin("v8intrinsic") ? K(e) : K(e) && !this.match(53)) && !this.isAmbiguousAwait()) { + this.raiseOverwrite(n, E.AwaitNotInAsyncContext); + return this.parseAwait(n, r); + } + } + return l; + } + parseUpdate(e, t, n) { + if (t) { + this.checkLVal(e.argument, "prefix operation"); + return this.finishNode(e, "UpdateExpression"); + } + const r = this.state.start; + const i = this.state.startLoc; + let s = this.parseExprSubscripts(n); + if (this.checkExpressionErrors(n, !1)) return s; + for (;39 === this.state.type && !this.canInsertSemicolon(); ) { + const e = this.startNodeAt(r, i); + e.operator = this.state.value; + e.prefix = !1; + e.argument = s; + this.checkLVal(s, "postfix operation"); + this.next(); + s = this.finishNode(e, "UpdateExpression"); + } + return s; + } + parseExprSubscripts(e) { + const t = this.state.start; + const n = this.state.startLoc; + const r = this.state.potentialArrowAt; + const i = this.parseExprAtom(e); + return this.shouldExitDescending(i, r) ? i : this.parseSubscripts(i, t, n); + } + parseSubscripts(e, t, n, r) { + const i = { + optionalChainMember: !1, + maybeAsyncArrow: this.atPossibleAsyncArrow(e), + stop: !1 + }; + do { + e = this.parseSubscript(e, t, n, r, i); + i.maybeAsyncArrow = !1; + } while (!i.stop); + return e; + } + parseSubscript(e, t, n, r, i) { + if (!r && this.eat(23)) return this.parseBind(e, t, n, r, i); + if (this.match(30)) return this.parseTaggedTemplateExpression(e, t, n, i); + let s = !1; + if (this.match(26)) { + if (r && 40 === this.lookaheadCharCode()) { + i.stop = !0; + return e; + } + i.optionalChainMember = s = !0; + this.next(); + } + if (!r && this.match(18)) return this.parseCoverCallAndAsyncArrowHead(e, t, n, i, s); + { + const r = this.eat(8); + if (r || s || this.eat(24)) return this.parseMember(e, t, n, i, r, s); + i.stop = !0; + return e; + } + } + parseMember(e, t, n, r, i, s) { + const a = this.startNodeAt(t, n); + a.object = e; + a.computed = i; + const o = !i && this.match(6) && this.state.value; + const l = i ? this.parseExpression() : o ? this.parsePrivateName() : this.parseIdentifier(!0); + if (!1 !== o) { + "Super" === a.object.type && this.raise(t, E.SuperPrivateField); + this.classScope.usePrivateName(o, l.start); + } + a.property = l; + i && this.expect(11); + if (r.optionalChainMember) { + a.optional = s; + return this.finishNode(a, "OptionalMemberExpression"); + } + return this.finishNode(a, "MemberExpression"); + } + parseBind(e, t, n, r, i) { + const s = this.startNodeAt(t, n); + s.object = e; + s.callee = this.parseNoCallExpr(); + i.stop = !0; + return this.parseSubscripts(this.finishNode(s, "BindExpression"), t, n, r); + } + parseCoverCallAndAsyncArrowHead(e, t, n, r, i) { + const s = this.state.maybeInArrowParameters; + let a = null; + this.state.maybeInArrowParameters = !0; + this.next(); + let o = this.startNodeAt(t, n); + o.callee = e; + if (r.maybeAsyncArrow) { + this.expressionScope.enter(new yt(ht)); + a = new Ct(); + } + r.optionalChainMember && (o.optional = i); + o.arguments = i ? this.parseCallExpressionArguments(19) : this.parseCallExpressionArguments(19, "Import" === e.type, "Super" !== e.type, o, a); + this.finishCallExpression(o, r.optionalChainMember); + if (r.maybeAsyncArrow && this.shouldParseAsyncArrow() && !i) { + r.stop = !0; + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + o = this.parseAsyncArrowFromCallExpression(this.startNodeAt(t, n), o); + } else { + if (r.maybeAsyncArrow) { + this.checkExpressionErrors(a, !0); + this.expressionScope.exit(); + } + this.toReferencedArguments(o); + } + this.state.maybeInArrowParameters = s; + return o; + } + toReferencedArguments(e, t) { + this.toReferencedListDeep(e.arguments, t); + } + parseTaggedTemplateExpression(e, t, n, r) { + const i = this.startNodeAt(t, n); + i.tag = e; + i.quasi = this.parseTemplate(!0); + r.optionalChainMember && this.raise(t, E.OptionalChainingNoTemplate); + return this.finishNode(i, "TaggedTemplateExpression"); + } + atPossibleAsyncArrow(e) { + return "Identifier" === e.type && "async" === e.name && this.state.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start == 5 && e.start === this.state.potentialArrowAt; + } + finishCallExpression(e, t) { + if ("Import" === e.callee.type) { + 2 === e.arguments.length && (this.hasPlugin("moduleAttributes") || this.expectPlugin("importAssertions")); + if (0 === e.arguments.length || e.arguments.length > 2) this.raise(e.start, E.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument"); else for (const t of e.arguments) "SpreadElement" === t.type && this.raise(t.start, E.ImportCallSpreadArgument); + } + return this.finishNode(e, t ? "OptionalCallExpression" : "CallExpression"); + } + parseCallExpressionArguments(e, t, n, r, i) { + const s = []; + let a = !0; + const o = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !1; + for (;!this.eat(e); ) { + if (a) a = !1; else { + this.expect(20); + if (this.match(e)) { + !t || this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") || this.raise(this.state.lastTokStart, E.ImportCallArgumentTrailingComma); + r && this.addExtra(r, "trailingComma", this.state.lastTokStart); + this.next(); + break; + } + } + s.push(this.parseExprListItem(!1, i, n)); + } + this.state.inFSharpPipelineDirectBody = o; + return s; + } + shouldParseAsyncArrow() { + return this.match(27) && !this.canInsertSemicolon(); + } + parseAsyncArrowFromCallExpression(e, t) { + var n; + this.resetPreviousNodeTrailingComments(t); + this.expect(27); + this.parseArrowExpression(e, t.arguments, !0, null == (n = t.extra) ? void 0 : n.trailingComma); + T(e, t.innerComments); + T(e, t.callee.trailingComments); + return e; + } + parseNoCallExpr() { + const e = this.state.start; + const t = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), e, t, !0); + } + parseExprAtom(e) { + let t; + switch (this.state.type) { + case 78: + return this.parseSuper(); + + case 82: + t = this.startNode(); + this.next(); + if (this.match(24)) return this.parseImportMetaProperty(t); + this.match(18) || this.raise(this.state.lastTokStart, E.UnsupportedImport); + return this.finishNode(t, "Import"); + + case 77: + t = this.startNode(); + this.next(); + return this.finishNode(t, "ThisExpression"); + + case 5: + { + if (this.isContextual("module") && 123 === this.lookaheadCharCode() && !this.hasFollowingLineBreak()) return this.parseModuleExpression(); + const e = this.state.potentialArrowAt === this.state.start; + const t = this.state.containsEsc; + const n = this.parseIdentifier(); + if (!t && "async" === n.name && !this.canInsertSemicolon()) { + if (this.match(67)) { + this.resetPreviousNodeTrailingComments(n); + this.next(); + return this.parseFunction(this.startNodeAtNode(n), void 0, !0); + } + if (this.match(5)) return 61 === this.lookaheadCharCode() ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)) : n; + if (this.match(89)) { + this.resetPreviousNodeTrailingComments(n); + return this.parseDo(this.startNodeAtNode(n), !0); + } + } + if (e && this.match(27) && !this.canInsertSemicolon()) { + this.next(); + return this.parseArrowExpression(this.startNodeAtNode(n), [ n ], !1); + } + return n; + } + + case 89: + return this.parseDo(this.startNode(), !1); + + case 55: + case 37: + this.readRegexp(); + return this.parseRegExpLiteral(this.state.value); + + case 0: + return this.parseNumericLiteral(this.state.value); + + case 1: + return this.parseBigIntLiteral(this.state.value); + + case 2: + return this.parseDecimalLiteral(this.state.value); + + case 4: + return this.parseStringLiteral(this.state.value); + + case 83: + return this.parseNullLiteral(); + + case 84: + return this.parseBooleanLiteral(!0); + + case 85: + return this.parseBooleanLiteral(!1); + + case 18: + { + const e = this.state.potentialArrowAt === this.state.start; + return this.parseParenAndDistinguishExpression(e); + } + + case 10: + case 9: + return this.parseArrayLike(10 === this.state.type ? 12 : 11, !1, !0, e); + + case 8: + return this.parseArrayLike(11, !0, !1, e); + + case 14: + case 15: + return this.parseObjectLike(14 === this.state.type ? 17 : 16, !1, !0, e); + + case 13: + return this.parseObjectLike(16, !1, !1, e); + + case 67: + return this.parseFunctionOrFunctionSent(); + + case 32: + this.parseDecorators(); + + case 79: + t = this.startNode(); + this.takeDecorators(t); + return this.parseClass(t, !1); + + case 76: + return this.parseNewOrNewTarget(); + + case 30: + return this.parseTemplate(!1); + + case 23: + { + t = this.startNode(); + this.next(); + t.object = null; + const e = t.callee = this.parseNoCallExpr(); + if ("MemberExpression" === e.type) return this.finishNode(t, "BindExpression"); + throw this.raise(e.start, E.UnsupportedBind); + } + + case 6: + this.raise(this.state.start, E.PrivateInExpectedIn, this.state.value); + return this.parsePrivateName(); + + case 38: + if ("hack" !== this.getPluginOption("pipelineOperator", "proposal") || "%" !== this.getPluginOption("pipelineOperator", "topicToken")) throw this.unexpected(); + this.state.value = "%"; + this.state.type = 53; + this.state.pos--; + this.state.end--; + this.state.endLoc.column--; + + case 53: + case 33: + { + const e = this.getPluginOption("pipelineOperator", "proposal"); + if (e) { + t = this.startNode(); + const n = this.state.start; + const r = this.state.type; + this.next(); + return this.finishTopicReference(t, n, e, r); + } + } + + case 50: + if ("<" === this.state.value) { + const e = this.input.codePointAt(this.nextTokenStart()); + (ee(e) || 62 === e) && this.expectOnePlugin([ "jsx", "flow", "typescript" ]); + } + + default: + throw this.unexpected(); + } + } + finishTopicReference(e, t, n, r) { + if (this.testTopicReferenceConfiguration(n, t, r)) { + let r; + r = "smart" === n ? "PipelinePrimaryTopicReference" : "TopicReference"; + this.topicReferenceIsAllowedInCurrentContext() || ("smart" === n ? this.raise(t, E.PrimaryTopicNotAllowed) : this.raise(t, E.PipeTopicUnbound)); + this.registerTopicReference(); + return this.finishNode(e, r); + } + throw this.raise(t, E.PipeTopicUnconfiguredToken, q(r)); + } + testTopicReferenceConfiguration(e, t, n) { + switch (e) { + case "hack": + { + const e = this.getPluginOption("pipelineOperator", "topicToken"); + return q(n) === e; + } + + case "smart": + return 33 === n; + + default: + throw this.raise(t, E.PipeTopicRequiresHackPipes); + } + } + parseAsyncArrowUnaryFunction(e) { + this.prodParam.enter(At(!0, this.prodParam.hasYield)); + const t = [ this.parseIdentifier() ]; + this.prodParam.exit(); + this.hasPrecedingLineBreak() && this.raise(this.state.pos, E.LineTerminatorBeforeArrow); + this.expect(27); + this.parseArrowExpression(e, t, !0); + return e; + } + parseDo(e, t) { + this.expectPlugin("doExpressions"); + t && this.expectPlugin("asyncDoExpressions"); + e.async = t; + this.next(); + const n = this.state.labels; + this.state.labels = []; + if (t) { + this.prodParam.enter(xt); + e.body = this.parseBlock(); + this.prodParam.exit(); + } else e.body = this.parseBlock(); + this.state.labels = n; + return this.finishNode(e, "DoExpression"); + } + parseSuper() { + const e = this.startNode(); + this.next(); + !this.match(18) || this.scope.allowDirectSuper || this.options.allowSuperOutsideMethod ? this.scope.allowSuper || this.options.allowSuperOutsideMethod || this.raise(e.start, E.UnexpectedSuper) : this.raise(e.start, E.SuperNotAllowed); + this.match(18) || this.match(8) || this.match(24) || this.raise(e.start, E.UnsupportedSuper); + return this.finishNode(e, "Super"); + } + parseMaybePrivateName(e) { + if (this.match(6)) { + e || this.raise(this.state.start + 1, E.UnexpectedPrivateField); + return this.parsePrivateName(); + } + return this.parseIdentifier(!0); + } + parsePrivateName() { + const e = this.startNode(); + const t = this.startNodeAt(this.state.start + 1, new f(this.state.curLine, this.state.start + 1 - this.state.lineStart)); + const n = this.state.value; + this.next(); + e.id = this.createIdentifier(t, n); + return this.finishNode(e, "PrivateName"); + } + parseFunctionOrFunctionSent() { + const e = this.startNode(); + this.next(); + if (this.prodParam.hasYield && this.match(24)) { + const t = this.createIdentifier(this.startNodeAtNode(e), "function"); + this.next(); + return this.parseMetaProperty(e, t, "sent"); + } + return this.parseFunction(e); + } + parseMetaProperty(e, t, n) { + e.meta = t; + "function" === t.name && "sent" === n && (this.isContextual(n) ? this.expectPlugin("functionSent") : this.hasPlugin("functionSent") || this.unexpected()); + const r = this.state.containsEsc; + e.property = this.parseIdentifier(!0); + (e.property.name !== n || r) && this.raise(e.property.start, E.UnsupportedMetaProperty, t.name, n); + return this.finishNode(e, "MetaProperty"); + } + parseImportMetaProperty(e) { + const t = this.createIdentifier(this.startNodeAtNode(e), "import"); + this.next(); + if (this.isContextual("meta")) { + this.inModule || this.raise(t.start, P.ImportMetaOutsideModule); + this.sawUnambiguousESM = !0; + } + return this.parseMetaProperty(e, t, "meta"); + } + parseLiteralAtNode(e, t, n) { + this.addExtra(n, "rawValue", e); + this.addExtra(n, "raw", this.input.slice(n.start, this.state.end)); + n.value = e; + this.next(); + return this.finishNode(n, t); + } + parseLiteral(e, t) { + const n = this.startNode(); + return this.parseLiteralAtNode(e, t, n); + } + parseStringLiteral(e) { + return this.parseLiteral(e, "StringLiteral"); + } + parseNumericLiteral(e) { + return this.parseLiteral(e, "NumericLiteral"); + } + parseBigIntLiteral(e) { + return this.parseLiteral(e, "BigIntLiteral"); + } + parseDecimalLiteral(e) { + return this.parseLiteral(e, "DecimalLiteral"); + } + parseRegExpLiteral(e) { + const t = this.parseLiteral(e.value, "RegExpLiteral"); + t.pattern = e.pattern; + t.flags = e.flags; + return t; + } + parseBooleanLiteral(e) { + const t = this.startNode(); + t.value = e; + this.next(); + return this.finishNode(t, "BooleanLiteral"); + } + parseNullLiteral() { + const e = this.startNode(); + this.next(); + return this.finishNode(e, "NullLiteral"); + } + parseParenAndDistinguishExpression(e) { + const t = this.state.start; + const n = this.state.startLoc; + let r; + this.next(); + this.expressionScope.enter(new yt(dt)); + const i = this.state.maybeInArrowParameters; + const s = this.state.inFSharpPipelineDirectBody; + this.state.maybeInArrowParameters = !0; + this.state.inFSharpPipelineDirectBody = !1; + const a = this.state.start; + const o = this.state.startLoc; + const l = []; + const c = new Ct(); + let p = !0; + let u; + let d; + for (;!this.match(19); ) { + if (p) p = !1; else { + this.expect(20, -1 === c.optionalParameters ? null : c.optionalParameters); + if (this.match(19)) { + d = this.state.start; + break; + } + } + if (this.match(29)) { + const e = this.state.start; + const t = this.state.startLoc; + u = this.state.start; + l.push(this.parseParenItem(this.parseRestBinding(), e, t)); + this.checkCommaAfterRest(41); + break; + } + l.push(this.parseMaybeAssignAllowIn(c, this.parseParenItem)); + } + const h = this.state.lastTokEnd; + const f = this.state.lastTokEndLoc; + this.expect(19); + this.state.maybeInArrowParameters = i; + this.state.inFSharpPipelineDirectBody = s; + let m = this.startNodeAt(t, n); + if (e && this.shouldParseArrow(l) && (m = this.parseArrow(m))) { + this.expressionScope.validateAsPattern(); + this.expressionScope.exit(); + this.parseArrowExpression(m, l, !1); + return m; + } + this.expressionScope.exit(); + l.length || this.unexpected(this.state.lastTokStart); + d && this.unexpected(d); + u && this.unexpected(u); + this.checkExpressionErrors(c, !0); + this.toReferencedListDeep(l, !0); + if (l.length > 1) { + (r = this.startNodeAt(a, o)).expressions = l; + this.finishNode(r, "SequenceExpression"); + this.resetEndLocation(r, h, f); + } else r = l[0]; + if (!this.options.createParenthesizedExpressions) { + this.addExtra(r, "parenthesized", !0); + this.addExtra(r, "parenStart", t); + return r; + } + const y = this.startNodeAt(t, n); + y.expression = r; + this.finishNode(y, "ParenthesizedExpression"); + return y; + } + shouldParseArrow(e) { + return !this.canInsertSemicolon(); + } + parseArrow(e) { + if (this.eat(27)) return e; + } + parseParenItem(e, t, n) { + return e; + } + parseNewOrNewTarget() { + const e = this.startNode(); + this.next(); + if (this.match(24)) { + const t = this.createIdentifier(this.startNodeAtNode(e), "new"); + this.next(); + const n = this.parseMetaProperty(e, t, "target"); + this.scope.inNonArrowFunction || this.scope.inClass || this.raise(n.start, E.UnexpectedNewTarget); + return n; + } + return this.parseNew(e); + } + parseNew(e) { + e.callee = this.parseNoCallExpr(); + "Import" === e.callee.type ? this.raise(e.callee.start, E.ImportCallNotNewExpression) : this.isOptionalChain(e.callee) ? this.raise(this.state.lastTokEnd, E.OptionalChainingNoNew) : this.eat(26) && this.raise(this.state.start, E.OptionalChainingNoNew); + this.parseNewArguments(e); + return this.finishNode(e, "NewExpression"); + } + parseNewArguments(e) { + if (this.eat(18)) { + const t = this.parseExprList(19); + this.toReferencedList(t); + e.arguments = t; + } else e.arguments = []; + } + parseTemplateElement(e) { + const t = this.startNode(); + null === this.state.value && (e || this.raise(this.state.start + 1, E.InvalidEscapeSequenceTemplate)); + t.value = { + raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), + cooked: this.state.value + }; + this.next(); + t.tail = this.match(30); + return this.finishNode(t, "TemplateElement"); + } + parseTemplate(e) { + const t = this.startNode(); + this.next(); + t.expressions = []; + let n = this.parseTemplateElement(e); + t.quasis = [ n ]; + for (;!n.tail; ) { + this.expect(31); + t.expressions.push(this.parseTemplateSubstitution()); + this.expect(16); + t.quasis.push(n = this.parseTemplateElement(e)); + } + this.next(); + return this.finishNode(t, "TemplateLiteral"); + } + parseTemplateSubstitution() { + return this.parseExpression(); + } + parseObjectLike(e, t, n, r) { + n && this.expectPlugin("recordAndTuple"); + const i = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !1; + const s = Object.create(null); + let a = !0; + const o = this.startNode(); + o.properties = []; + this.next(); + for (;!this.match(e); ) { + if (a) a = !1; else { + this.expect(20); + if (this.match(e)) { + this.addExtra(o, "trailingComma", this.state.lastTokStart); + break; + } + } + const i = this.parsePropertyDefinition(t, r); + t || this.checkProto(i, n, s, r); + n && !this.isObjectProperty(i) && "SpreadElement" !== i.type && this.raise(i.start, E.InvalidRecordProperty); + i.shorthand && this.addExtra(i, "shorthand", !0); + o.properties.push(i); + } + this.next(); + this.state.inFSharpPipelineDirectBody = i; + let l = "ObjectExpression"; + t ? l = "ObjectPattern" : n && (l = "RecordExpression"); + return this.finishNode(o, l); + } + maybeAsyncOrAccessorProp(e) { + return !e.computed && "Identifier" === e.key.type && (this.isLiteralPropertyName() || this.match(8) || this.match(54)); + } + parsePropertyDefinition(e, t) { + let n = []; + if (this.match(32)) { + this.hasPlugin("decorators") && this.raise(this.state.start, E.UnsupportedPropertyDecorator); + for (;this.match(32); ) n.push(this.parseDecorator()); + } + const r = this.startNode(); + let i = !1; + let s = !1; + let a = !1; + let o; + let l; + if (this.match(29)) { + n.length && this.unexpected(); + if (e) { + this.next(); + r.argument = this.parseIdentifier(); + this.checkCommaAfterRest(125); + return this.finishNode(r, "RestElement"); + } + return this.parseSpread(); + } + if (n.length) { + r.decorators = n; + n = []; + } + r.method = !1; + if (e || t) { + o = this.state.start; + l = this.state.startLoc; + } + e || (i = this.eat(54)); + const c = this.state.containsEsc; + const p = this.parsePropertyName(r, !1); + if (!e && !i && !c && this.maybeAsyncOrAccessorProp(r)) { + const e = p.name; + if ("async" === e && !this.hasPrecedingLineBreak()) { + s = !0; + this.resetPreviousNodeTrailingComments(p); + i = this.eat(54); + this.parsePropertyName(r, !1); + } + if ("get" === e || "set" === e) { + a = !0; + this.resetPreviousNodeTrailingComments(p); + r.kind = e; + if (this.match(54)) { + i = !0; + this.raise(this.state.pos, E.AccessorIsGenerator, e); + this.next(); + } + this.parsePropertyName(r, !1); + } + } + this.parseObjPropValue(r, o, l, i, s, e, a, t); + return r; + } + getGetterSetterExpectedParamCount(e) { + return "get" === e.kind ? 0 : 1; + } + getObjectOrClassMethodParams(e) { + return e.params; + } + checkGetterSetterParams(e) { + var t; + const n = this.getGetterSetterExpectedParamCount(e); + const r = this.getObjectOrClassMethodParams(e); + const i = e.start; + r.length !== n && ("get" === e.kind ? this.raise(i, E.BadGetterArity) : this.raise(i, E.BadSetterArity)); + "set" === e.kind && "RestElement" === (null == (t = r[r.length - 1]) ? void 0 : t.type) && this.raise(i, E.BadSetterRestParameter); + } + parseObjectMethod(e, t, n, r, i) { + if (i) { + this.parseMethod(e, t, !1, !1, !1, "ObjectMethod"); + this.checkGetterSetterParams(e); + return e; + } + if (n || t || this.match(18)) { + r && this.unexpected(); + e.kind = "method"; + e.method = !0; + return this.parseMethod(e, t, n, !1, !1, "ObjectMethod"); + } + } + parseObjectProperty(e, t, n, r, i) { + e.shorthand = !1; + if (this.eat(22)) { + e.value = r ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(i); + return this.finishNode(e, "ObjectProperty"); + } + if (!e.computed && "Identifier" === e.key.type) { + this.checkReservedWord(e.key.name, e.key.start, !0, !1); + if (r) e.value = this.parseMaybeDefault(t, n, Nt(e.key)); else if (this.match(35) && i) { + -1 === i.shorthandAssign && (i.shorthandAssign = this.state.start); + e.value = this.parseMaybeDefault(t, n, Nt(e.key)); + } else e.value = Nt(e.key); + e.shorthand = !0; + return this.finishNode(e, "ObjectProperty"); + } + } + parseObjPropValue(e, t, n, r, i, s, a, o) { + const l = this.parseObjectMethod(e, r, i, s, a) || this.parseObjectProperty(e, t, n, s, o); + l || this.unexpected(); + return l; + } + parsePropertyName(e, t) { + if (this.eat(8)) { + e.computed = !0; + e.key = this.parseMaybeAssignAllowIn(); + this.expect(11); + } else { + const n = this.state.inPropertyName; + this.state.inPropertyName = !0; + const r = this.state.type; + e.key = 0 === r || 4 === r || 1 === r || 2 === r ? this.parseExprAtom() : this.parseMaybePrivateName(t); + 6 !== r && (e.computed = !1); + this.state.inPropertyName = n; + } + return e.key; + } + initFunction(e, t) { + e.id = null; + e.generator = !1; + e.async = !!t; + } + parseMethod(e, t, n, r, i, s, a = !1) { + this.initFunction(e, n); + e.generator = !!t; + const o = r; + this.scope.enter(me | Te | (a ? Se : 0) | (i ? be : 0)); + this.prodParam.enter(At(n, e.generator)); + this.parseFunctionParams(e, o); + this.parseFunctionBodyAndFinish(e, s, !0); + this.prodParam.exit(); + this.scope.exit(); + return e; + } + parseArrayLike(e, t, n, r) { + n && this.expectPlugin("recordAndTuple"); + const i = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !1; + const s = this.startNode(); + this.next(); + s.elements = this.parseExprList(e, !n, r, s); + this.state.inFSharpPipelineDirectBody = i; + return this.finishNode(s, n ? "TupleExpression" : "ArrayExpression"); + } + parseArrowExpression(e, t, n, r) { + this.scope.enter(me | ye); + let i = At(n, !1); + !this.match(8) && this.prodParam.hasIn && (i |= Pt); + this.prodParam.enter(i); + this.initFunction(e, n); + const s = this.state.maybeInArrowParameters; + if (t) { + this.state.maybeInArrowParameters = !0; + this.setArrowFunctionParameters(e, t, r); + } + this.state.maybeInArrowParameters = !1; + this.parseFunctionBody(e, !0); + this.prodParam.exit(); + this.scope.exit(); + this.state.maybeInArrowParameters = s; + return this.finishNode(e, "ArrowFunctionExpression"); + } + setArrowFunctionParameters(e, t, n) { + e.params = this.toAssignableList(t, n, !1); + } + parseFunctionBodyAndFinish(e, t, n = !1) { + this.parseFunctionBody(e, !1, n); + this.finishNode(e, t); + } + parseFunctionBody(e, t, n = !1) { + const r = t && !this.match(13); + this.expressionScope.enter(Tt()); + if (r) { + e.body = this.parseMaybeAssign(); + this.checkParams(e, !1, t, !1); + } else { + const r = this.state.strict; + const i = this.state.labels; + this.state.labels = []; + this.prodParam.enter(this.prodParam.currentFlags() | Et); + e.body = this.parseBlock(!0, !1, i => { + const s = !this.isSimpleParamList(e.params); + if (i && s) { + const t = "method" !== e.kind && "constructor" !== e.kind || !e.key ? e.start : e.key.end; + this.raise(t, E.IllegalLanguageModeDirective); + } + const a = !r && this.state.strict; + this.checkParams(e, !(this.state.strict || t || n || s), t, a); + this.state.strict && e.id && this.checkLVal(e.id, "function name", Ke, void 0, void 0, a); + }); + this.prodParam.exit(); + this.expressionScope.exit(); + this.state.labels = i; + } + } + isSimpleParamList(e) { + for (let t = 0, n = e.length; t < n; t++) if ("Identifier" !== e[t].type) return !1; + return !0; + } + checkParams(e, t, n, r = !0) { + const i = new Set(); + for (const n of e.params) this.checkLVal(n, "function parameter list", Le, t ? null : i, void 0, r); + } + parseExprList(e, t, n, r) { + const i = []; + let s = !0; + for (;!this.eat(e); ) { + if (s) s = !1; else { + this.expect(20); + if (this.match(e)) { + r && this.addExtra(r, "trailingComma", this.state.lastTokStart); + this.next(); + break; + } + } + i.push(this.parseExprListItem(t, n)); + } + return i; + } + parseExprListItem(e, t, n) { + let r; + if (this.match(20)) { + e || this.raise(this.state.pos, E.UnexpectedToken, ","); + r = null; + } else if (this.match(29)) { + const e = this.state.start; + const n = this.state.startLoc; + r = this.parseParenItem(this.parseSpread(t), e, n); + } else if (this.match(25)) { + this.expectPlugin("partialApplication"); + n || this.raise(this.state.start, E.UnexpectedArgumentPlaceholder); + const e = this.startNode(); + this.next(); + r = this.finishNode(e, "ArgumentPlaceholder"); + } else r = this.parseMaybeAssignAllowIn(t, this.parseParenItem); + return r; + } + parseIdentifier(e) { + const t = this.startNode(); + const n = this.parseIdentifierName(t.start, e); + return this.createIdentifier(t, n); + } + createIdentifier(e, t) { + e.name = t; + e.loc.identifierName = t; + return this.finishNode(e, "Identifier"); + } + parseIdentifierName(e, t) { + let n; + const {start: r, type: i} = this.state; + if (5 === i) n = this.state.value; else { + if (!W(i)) throw this.unexpected(); + n = q(i); + } + t ? this.state.type = 5 : this.checkReservedWord(n, r, W(i), !1); + this.next(); + return n; + } + checkReservedWord(e, t, n, r) { + if (e.length > 10) return; + if (!function(e) { + return de.has(e); + }(e)) return; + if ("yield" === e) { + if (this.prodParam.hasYield) { + this.raise(t, E.YieldBindingIdentifier); + return; + } + } else if ("await" === e) { + if (this.prodParam.hasAwait) { + this.raise(t, E.AwaitBindingIdentifier); + return; + } + if (this.scope.inStaticBlock) { + this.raise(t, E.AwaitBindingIdentifierInStaticBlock); + return; + } + this.expressionScope.recordAsyncArrowParametersError(t, E.AwaitBindingIdentifier); + } else if ("arguments" === e && this.scope.inClassAndNotInNonArrowFunction) { + this.raise(t, E.ArgumentsInClass); + return; + } + if (n && ue(e)) { + this.raise(t, E.UnexpectedKeyword, e); + return; + } + (this.state.strict ? r ? pe : le : oe)(e, this.inModule) && this.raise(t, E.UnexpectedReservedWord, e); + } + isAwaitAllowed() { + return !!this.prodParam.hasAwait || !(!this.options.allowAwaitOutsideFunction || this.scope.inFunction); + } + parseAwait(e, t) { + const n = this.startNodeAt(e, t); + this.expressionScope.recordParameterInitializerError(n.start, E.AwaitExpressionFormalParameter); + this.eat(54) && this.raise(n.start, E.ObsoleteAwaitStar); + this.scope.inFunction || this.options.allowAwaitOutsideFunction || (this.isAmbiguousAwait() ? this.ambiguousScriptDifferentAst = !0 : this.sawUnambiguousESM = !0); + this.state.soloAwait || (n.argument = this.parseMaybeUnary(null, !0)); + return this.finishNode(n, "AwaitExpression"); + } + isAmbiguousAwait() { + return this.hasPrecedingLineBreak() || this.match(52) || this.match(18) || this.match(8) || this.match(30) || this.match(3) || this.match(55) || this.hasPlugin("v8intrinsic") && this.match(53); + } + parseYield() { + const e = this.startNode(); + this.expressionScope.recordParameterInitializerError(e.start, E.YieldInParameter); + this.next(); + let t = !1; + let n = null; + if (!this.hasPrecedingLineBreak()) { + t = this.eat(54); + switch (this.state.type) { + case 21: + case 7: + case 16: + case 19: + case 11: + case 17: + case 22: + case 20: + if (!t) break; + + default: + n = this.parseMaybeAssign(); + } + } + e.delegate = t; + e.argument = n; + return this.finishNode(e, "YieldExpression"); + } + checkPipelineAtInfixOperator(e, t) { + "smart" === this.getPluginOption("pipelineOperator", "proposal") && "SequenceExpression" === e.type && this.raise(t, E.PipelineHeadSequenceExpression); + } + checkHackPipeBodyEarlyErrors(e) { + this.topicReferenceWasUsedInCurrentContext() || this.raise(e, E.PipeTopicUnused); + } + parseSmartPipelineBodyInStyle(e, t, n) { + const r = this.startNodeAt(t, n); + if (this.isSimpleReference(e)) { + r.callee = e; + return this.finishNode(r, "PipelineBareFunction"); + } + this.checkSmartPipeTopicBodyEarlyErrors(t); + r.expression = e; + return this.finishNode(r, "PipelineTopicExpression"); + } + isSimpleReference(e) { + switch (e.type) { + case "MemberExpression": + return !e.computed && this.isSimpleReference(e.object); + + case "Identifier": + return !0; + + default: + return !1; + } + } + checkSmartPipeTopicBodyEarlyErrors(e) { + if (this.match(27)) throw this.raise(this.state.start, E.PipelineBodyNoArrow); + this.topicReferenceWasUsedInCurrentContext() || this.raise(e, E.PipelineTopicUnused); + } + withTopicBindingContext(e) { + const t = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + try { + return e(); + } finally { + this.state.topicContext = t; + } + } + withSmartMixTopicForbiddingContext(e) { + if ("smart" !== this.getPluginOption("pipelineOperator", "proposal")) return e(); + { + const t = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + try { + return e(); + } finally { + this.state.topicContext = t; + } + } + } + withSoloAwaitPermittingContext(e) { + const t = this.state.soloAwait; + this.state.soloAwait = !0; + try { + return e(); + } finally { + this.state.soloAwait = t; + } + } + allowInAnd(e) { + const t = this.prodParam.currentFlags(); + if (Pt & ~t) { + this.prodParam.enter(t | Pt); + try { + return e(); + } finally { + this.prodParam.exit(); + } + } + return e(); + } + disallowInAnd(e) { + const t = this.prodParam.currentFlags(); + if (Pt & t) { + this.prodParam.enter(t & ~Pt); + try { + return e(); + } finally { + this.prodParam.exit(); + } + } + return e(); + } + registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + } + topicReferenceIsAllowedInCurrentContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + } + topicReferenceWasUsedInCurrentContext() { + return null != this.state.topicContext.maxTopicIndex && this.state.topicContext.maxTopicIndex >= 0; + } + parseFSharpPipelineBody(e) { + const t = this.state.start; + const n = this.state.startLoc; + this.state.potentialArrowAt = this.state.start; + const r = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !0; + const i = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), t, n, e); + this.state.inFSharpPipelineDirectBody = r; + return i; + } + parseModuleExpression() { + this.expectPlugin("moduleBlocks"); + const e = this.startNode(); + this.next(); + this.eat(13); + const t = this.initializeScopes(!0); + this.enterInitialScopes(); + const n = this.startNode(); + try { + e.body = this.parseProgram(n, 16, "module"); + } finally { + t(); + } + this.eat(16); + return this.finishNode(e, "ModuleExpression"); + } + } + const pn = { + kind: "loop" + }, un = { + kind: "switch" + }; + const dn = 0, hn = 1, fn = 2, mn = 4; + const yn = /[\uD800-\uDFFF]/u; + const gn = /in(?:stanceof)?/y; + class Tn extends cn { + parseTopLevel(e, t) { + e.program = this.parseProgram(t); + e.comments = this.state.comments; + this.options.tokens && (e.tokens = function(e) { + for (let t = 0; t < e.length; t++) { + const n = e[t]; + const {type: r} = n; + if (6 !== r) "number" == typeof r && (n.type = J(r)); else { + const {loc: r, start: i, value: s, end: a} = n; + const o = i + 1; + const l = new f(r.start.line, r.start.column + 1); + e.splice(t, 1, new ot({ + type: J(33), + value: "#", + start: i, + end: o, + startLoc: r.start, + endLoc: l + }), new ot({ + type: J(5), + value: s, + start: o, + end: a, + startLoc: l, + endLoc: r.end + })); + t++; + } + } + return e; + }(this.tokens)); + return this.finishNode(e, "File"); + } + parseProgram(e, t = 7, n = this.options.sourceType) { + e.sourceType = n; + e.interpreter = this.parseInterpreterDirective(); + this.parseBlockBody(e, !0, !0, t); + if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) for (const [e] of Array.from(this.scope.undefinedExports)) { + const t = this.scope.undefinedExports.get(e); + this.raise(t, E.ModuleExportUndefined, e); + } + return this.finishNode(e, "Program"); + } + stmtToDirective(e) { + const t = e; + t.type = "Directive"; + t.value = t.expression; + delete t.expression; + const n = t.value; + const r = this.input.slice(n.start, n.end); + const i = n.value = r.slice(1, -1); + this.addExtra(n, "raw", r); + this.addExtra(n, "rawValue", i); + n.type = "DirectiveLiteral"; + return t; + } + parseInterpreterDirective() { + if (!this.match(34)) return null; + const e = this.startNode(); + e.value = this.state.value; + this.next(); + return this.finishNode(e, "InterpreterDirective"); + } + isLet(e) { + return !!this.isContextual("let") && this.isLetKeyword(e); + } + isLetKeyword(e) { + const t = this.nextTokenStart(); + const n = this.codePointAtPos(t); + if (92 === n || 91 === n) return !0; + if (e) return !1; + if (123 === n) return !0; + if (ee(n)) { + gn.lastIndex = t; + if (gn.test(this.input)) { + const e = this.codePointAtPos(gn.lastIndex); + if (!te(e) && 92 !== e) return !1; + } + return !0; + } + return !1; + } + parseStatement(e, t) { + this.match(32) && this.parseDecorators(!0); + return this.parseStatementContent(e, t); + } + parseStatementContent(e, t) { + let n = this.state.type; + const r = this.startNode(); + let i; + if (this.isLet(e)) { + n = 73; + i = "let"; + } + switch (n) { + case 59: + return this.parseBreakContinueStatement(r, !0); + + case 62: + return this.parseBreakContinueStatement(r, !1); + + case 63: + return this.parseDebuggerStatement(r); + + case 89: + return this.parseDoStatement(r); + + case 90: + return this.parseForStatement(r); + + case 67: + if (46 === this.lookaheadCharCode()) break; + e && (this.state.strict ? this.raise(this.state.start, E.StrictFunction) : "if" !== e && "label" !== e && this.raise(this.state.start, E.SloppyFunction)); + return this.parseFunctionStatement(r, !1, !e); + + case 79: + e && this.unexpected(); + return this.parseClass(r, !0); + + case 68: + return this.parseIfStatement(r); + + case 69: + return this.parseReturnStatement(r); + + case 70: + return this.parseSwitchStatement(r); + + case 71: + return this.parseThrowStatement(r); + + case 72: + return this.parseTryStatement(r); + + case 74: + case 73: + i = i || this.state.value; + e && "var" !== i && this.raise(this.state.start, E.UnexpectedLexicalDeclaration); + return this.parseVarStatement(r, i); + + case 91: + return this.parseWhileStatement(r); + + case 75: + return this.parseWithStatement(r); + + case 13: + return this.parseBlock(); + + case 21: + return this.parseEmptyStatement(r); + + case 82: + { + const e = this.lookaheadCharCode(); + if (40 === e || 46 === e) break; + } + + case 81: + { + this.options.allowImportExportEverywhere || t || this.raise(this.state.start, E.UnexpectedImportExport); + this.next(); + let e; + 82 === n ? "ImportDeclaration" !== (e = this.parseImport(r)).type || e.importKind && "value" !== e.importKind || (this.sawUnambiguousESM = !0) : ("ExportNamedDeclaration" !== (e = this.parseExport(r)).type || e.exportKind && "value" !== e.exportKind) && ("ExportAllDeclaration" !== e.type || e.exportKind && "value" !== e.exportKind) && "ExportDefaultDeclaration" !== e.type || (this.sawUnambiguousESM = !0); + this.assertModuleNodeAllowed(r); + return e; + } + + default: + if (this.isAsyncFunction()) { + e && this.raise(this.state.start, E.AsyncFunctionInSingleStatementContext); + this.next(); + return this.parseFunctionStatement(r, !0, !e); + } + } + const s = this.state.value; + const a = this.parseExpression(); + return 5 === n && "Identifier" === a.type && this.eat(22) ? this.parseLabeledStatement(r, s, a, e) : this.parseExpressionStatement(r, a); + } + assertModuleNodeAllowed(e) { + this.options.allowImportExportEverywhere || this.inModule || this.raise(e.start, P.ImportOutsideModule); + } + takeDecorators(e) { + const t = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + if (t.length) { + e.decorators = t; + this.resetStartLocationFromNode(e, t[0]); + this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; + } + } + canHaveLeadingDecorator() { + return this.match(79); + } + parseDecorators(e) { + const t = this.state.decoratorStack[this.state.decoratorStack.length - 1]; + for (;this.match(32); ) { + const e = this.parseDecorator(); + t.push(e); + } + if (this.match(81)) { + e || this.unexpected(); + this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport") && this.raise(this.state.start, E.DecoratorExportClass); + } else if (!this.canHaveLeadingDecorator()) throw this.raise(this.state.start, E.UnexpectedLeadingDecorator); + } + parseDecorator() { + this.expectOnePlugin([ "decorators-legacy", "decorators" ]); + const e = this.startNode(); + this.next(); + if (this.hasPlugin("decorators")) { + this.state.decoratorStack.push([]); + const t = this.state.start; + const n = this.state.startLoc; + let r; + if (this.eat(18)) { + r = this.parseExpression(); + this.expect(19); + } else { + r = this.parseIdentifier(!1); + for (;this.eat(24); ) { + const e = this.startNodeAt(t, n); + e.object = r; + e.property = this.parseIdentifier(!0); + e.computed = !1; + r = this.finishNode(e, "MemberExpression"); + } + } + e.expression = this.parseMaybeDecoratorArguments(r); + this.state.decoratorStack.pop(); + } else e.expression = this.parseExprSubscripts(); + return this.finishNode(e, "Decorator"); + } + parseMaybeDecoratorArguments(e) { + if (this.eat(18)) { + const t = this.startNodeAtNode(e); + t.callee = e; + t.arguments = this.parseCallExpressionArguments(19, !1); + this.toReferencedList(t.arguments); + return this.finishNode(t, "CallExpression"); + } + return e; + } + parseBreakContinueStatement(e, t) { + this.next(); + if (this.isLineTerminator()) e.label = null; else { + e.label = this.parseIdentifier(); + this.semicolon(); + } + this.verifyBreakContinue(e, t); + return this.finishNode(e, t ? "BreakStatement" : "ContinueStatement"); + } + verifyBreakContinue(e, t) { + let n; + for (n = 0; n < this.state.labels.length; ++n) { + const r = this.state.labels[n]; + if (null == e.label || r.name === e.label.name) { + if (null != r.kind && (t || "loop" === r.kind)) break; + if (e.label && t) break; + } + } + n === this.state.labels.length && this.raise(e.start, E.IllegalBreakContinue, t ? "break" : "continue"); + } + parseDebuggerStatement(e) { + this.next(); + this.semicolon(); + return this.finishNode(e, "DebuggerStatement"); + } + parseHeaderExpression() { + this.expect(18); + const e = this.parseExpression(); + this.expect(19); + return e; + } + parseDoStatement(e) { + this.next(); + this.state.labels.push(pn); + e.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("do")); + this.state.labels.pop(); + this.expect(91); + e.test = this.parseHeaderExpression(); + this.eat(21); + return this.finishNode(e, "DoWhileStatement"); + } + parseForStatement(e) { + this.next(); + this.state.labels.push(pn); + let t = -1; + this.isAwaitAllowed() && this.eatContextual("await") && (t = this.state.lastTokStart); + this.scope.enter(he); + this.expect(18); + if (this.match(21)) { + t > -1 && this.unexpected(t); + return this.parseFor(e, null); + } + const n = this.isContextual("let"); + const r = n && this.isLetKeyword(); + if (this.match(73) || this.match(74) || r) { + const n = this.startNode(); + const i = r ? "let" : this.state.value; + this.next(); + this.parseVar(n, !0, i); + this.finishNode(n, "VariableDeclaration"); + if ((this.match(57) || this.isContextual("of")) && 1 === n.declarations.length) return this.parseForIn(e, n, t); + t > -1 && this.unexpected(t); + return this.parseFor(e, n); + } + const i = this.match(5) && !this.state.containsEsc; + const s = new Ct(); + const a = this.parseExpression(!0, s); + const o = this.isContextual("of"); + o && (n ? this.raise(a.start, E.ForOfLet) : -1 === t && i && "Identifier" === a.type && "async" === a.name && this.raise(a.start, E.ForOfAsync)); + if (o || this.match(57)) { + this.toAssignable(a, !0); + const n = o ? "for-of statement" : "for-in statement"; + this.checkLVal(a, n); + return this.parseForIn(e, a, t); + } + this.checkExpressionErrors(s, !0); + t > -1 && this.unexpected(t); + return this.parseFor(e, a); + } + parseFunctionStatement(e, t, n) { + this.next(); + return this.parseFunction(e, hn | (n ? 0 : fn), t); + } + parseIfStatement(e) { + this.next(); + e.test = this.parseHeaderExpression(); + e.consequent = this.parseStatement("if"); + e.alternate = this.eat(65) ? this.parseStatement("if") : null; + return this.finishNode(e, "IfStatement"); + } + parseReturnStatement(e) { + this.prodParam.hasReturn || this.options.allowReturnOutsideFunction || this.raise(this.state.start, E.IllegalReturn); + this.next(); + if (this.isLineTerminator()) e.argument = null; else { + e.argument = this.parseExpression(); + this.semicolon(); + } + return this.finishNode(e, "ReturnStatement"); + } + parseSwitchStatement(e) { + this.next(); + e.discriminant = this.parseHeaderExpression(); + const t = e.cases = []; + this.expect(13); + this.state.labels.push(un); + this.scope.enter(he); + let n; + for (let e; !this.match(16); ) if (this.match(60) || this.match(64)) { + const r = this.match(60); + n && this.finishNode(n, "SwitchCase"); + t.push(n = this.startNode()); + n.consequent = []; + this.next(); + if (r) n.test = this.parseExpression(); else { + e && this.raise(this.state.lastTokStart, E.MultipleDefaultsInSwitch); + e = !0; + n.test = null; + } + this.expect(22); + } else n ? n.consequent.push(this.parseStatement(null)) : this.unexpected(); + this.scope.exit(); + n && this.finishNode(n, "SwitchCase"); + this.next(); + this.state.labels.pop(); + return this.finishNode(e, "SwitchStatement"); + } + parseThrowStatement(e) { + this.next(); + this.hasPrecedingLineBreak() && this.raise(this.state.lastTokEnd, E.NewlineAfterThrow); + e.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(e, "ThrowStatement"); + } + parseCatchClauseParam() { + const e = this.parseBindingAtom(); + const t = "Identifier" === e.type; + this.scope.enter(t ? ge : 0); + this.checkLVal(e, "catch clause", _e); + return e; + } + parseTryStatement(e) { + this.next(); + e.block = this.parseBlock(); + e.handler = null; + if (this.match(61)) { + const t = this.startNode(); + this.next(); + if (this.match(18)) { + this.expect(18); + t.param = this.parseCatchClauseParam(); + this.expect(19); + } else { + t.param = null; + this.scope.enter(he); + } + t.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(!1, !1)); + this.scope.exit(); + e.handler = this.finishNode(t, "CatchClause"); + } + e.finalizer = this.eat(66) ? this.parseBlock() : null; + e.handler || e.finalizer || this.raise(e.start, E.NoCatchOrFinally); + return this.finishNode(e, "TryStatement"); + } + parseVarStatement(e, t) { + this.next(); + this.parseVar(e, !1, t); + this.semicolon(); + return this.finishNode(e, "VariableDeclaration"); + } + parseWhileStatement(e) { + this.next(); + e.test = this.parseHeaderExpression(); + this.state.labels.push(pn); + e.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("while")); + this.state.labels.pop(); + return this.finishNode(e, "WhileStatement"); + } + parseWithStatement(e) { + this.state.strict && this.raise(this.state.start, E.StrictWith); + this.next(); + e.object = this.parseHeaderExpression(); + e.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("with")); + return this.finishNode(e, "WithStatement"); + } + parseEmptyStatement(e) { + this.next(); + return this.finishNode(e, "EmptyStatement"); + } + parseLabeledStatement(e, t, n, r) { + for (const e of this.state.labels) e.name === t && this.raise(n.start, E.LabelRedeclaration, t); + const i = (s = this.state.type) >= 89 && s <= 91 ? "loop" : this.match(70) ? "switch" : null; + var s; + for (let t = this.state.labels.length - 1; t >= 0; t--) { + const n = this.state.labels[t]; + if (n.statementStart !== e.start) break; + n.statementStart = this.state.start; + n.kind = i; + } + this.state.labels.push({ + name: t, + kind: i, + statementStart: this.state.start + }); + e.body = this.parseStatement(r ? -1 === r.indexOf("label") ? r + "label" : r : "label"); + this.state.labels.pop(); + e.label = n; + return this.finishNode(e, "LabeledStatement"); + } + parseExpressionStatement(e, t) { + e.expression = t; + this.semicolon(); + return this.finishNode(e, "ExpressionStatement"); + } + parseBlock(e = !1, t = !0, n) { + const r = this.startNode(); + e && this.state.strictErrors.clear(); + this.expect(13); + t && this.scope.enter(he); + this.parseBlockBody(r, e, !1, 16, n); + t && this.scope.exit(); + return this.finishNode(r, "BlockStatement"); + } + isValidDirective(e) { + return "ExpressionStatement" === e.type && "StringLiteral" === e.expression.type && !e.expression.extra.parenthesized; + } + parseBlockBody(e, t, n, r, i) { + const s = e.body = []; + const a = e.directives = []; + this.parseBlockOrModuleBlockBody(s, t ? a : void 0, n, r, i); + } + parseBlockOrModuleBlockBody(e, t, n, r, i) { + const s = this.state.strict; + let a = !1; + let o = !1; + for (;!this.match(r); ) { + const r = this.parseStatement(null, n); + if (t && !o) { + if (this.isValidDirective(r)) { + const e = this.stmtToDirective(r); + t.push(e); + if (!a && "use strict" === e.value.value) { + a = !0; + this.setStrict(!0); + } + continue; + } + o = !0; + this.state.strictErrors.clear(); + } + e.push(r); + } + i && i.call(this, a); + s || this.setStrict(!1); + this.next(); + } + parseFor(e, t) { + e.init = t; + this.semicolon(!1); + e.test = this.match(21) ? null : this.parseExpression(); + this.semicolon(!1); + e.update = this.match(19) ? null : this.parseExpression(); + this.expect(19); + e.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for")); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(e, "ForStatement"); + } + parseForIn(e, t, n) { + const r = this.match(57); + this.next(); + r ? n > -1 && this.unexpected(n) : e.await = n > -1; + "VariableDeclaration" !== t.type || null == t.declarations[0].init || r && !this.state.strict && "var" === t.kind && "Identifier" === t.declarations[0].id.type ? "AssignmentPattern" === t.type && this.raise(t.start, E.InvalidLhs, "for-loop") : this.raise(t.start, E.ForInOfLoopInitializer, r ? "for-in" : "for-of"); + e.left = t; + e.right = r ? this.parseExpression() : this.parseMaybeAssignAllowIn(); + this.expect(19); + e.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for")); + this.scope.exit(); + this.state.labels.pop(); + return this.finishNode(e, r ? "ForInStatement" : "ForOfStatement"); + } + parseVar(e, t, n) { + const r = e.declarations = []; + const i = this.hasPlugin("typescript"); + e.kind = n; + for (;;) { + const e = this.startNode(); + this.parseVarId(e, n); + if (this.eat(35)) e.init = t ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); else { + "const" !== n || this.match(57) || this.isContextual("of") ? "Identifier" === e.id.type || t && (this.match(57) || this.isContextual("of")) || this.raise(this.state.lastTokEnd, E.DeclarationMissingInitializer, "Complex binding patterns") : i || this.raise(this.state.lastTokEnd, E.DeclarationMissingInitializer, "Const declarations"); + e.init = null; + } + r.push(this.finishNode(e, "VariableDeclarator")); + if (!this.eat(20)) break; + } + return e; + } + parseVarId(e, t) { + e.id = this.parseBindingAtom(); + this.checkLVal(e.id, "variable declaration", "var" === t ? Le : _e, void 0, "var" !== t); + } + parseFunction(e, t = dn, n = !1) { + const r = t & hn; + const i = t & fn; + const s = !(!r || t & mn); + this.initFunction(e, n); + this.match(54) && i && this.raise(this.state.start, E.GeneratorInSingleStatementContext); + e.generator = this.eat(54); + r && (e.id = this.parseFunctionId(s)); + const a = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = !1; + this.scope.enter(me); + this.prodParam.enter(At(n, e.generator)); + r || (e.id = this.parseFunctionId()); + this.parseFunctionParams(e, !1); + this.withSmartMixTopicForbiddingContext(() => { + this.parseFunctionBodyAndFinish(e, r ? "FunctionDeclaration" : "FunctionExpression"); + }); + this.prodParam.exit(); + this.scope.exit(); + r && !i && this.registerFunctionStatementId(e); + this.state.maybeInArrowParameters = a; + return e; + } + parseFunctionId(e) { + return e || this.match(5) ? this.parseIdentifier() : null; + } + parseFunctionParams(e, t) { + this.expect(18); + this.expressionScope.enter(new mt(ft)); + e.params = this.parseBindingList(19, 41, !1, t); + this.expressionScope.exit(); + } + registerFunctionStatementId(e) { + e.id && this.scope.declareName(e.id.name, this.state.strict || e.generator || e.async ? this.scope.treatFunctionsAsVar ? Le : _e : je, e.id.start); + } + parseClass(e, t, n) { + this.next(); + this.takeDecorators(e); + const r = this.state.strict; + this.state.strict = !0; + this.parseClassId(e, t, n); + this.parseClassSuper(e); + e.body = this.parseClassBody(!!e.superClass, r); + return this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression"); + } + isClassProperty() { + return this.match(35) || this.match(21) || this.match(16); + } + isClassMethod() { + return this.match(18); + } + isNonstaticConstructor(e) { + return !(e.computed || e.static || "constructor" !== e.key.name && "constructor" !== e.key.value); + } + parseClassBody(e, t) { + this.classScope.enter(); + const n = { + hadConstructor: !1, + hadSuperClass: e + }; + let r = []; + const i = this.startNode(); + i.body = []; + this.expect(13); + this.withSmartMixTopicForbiddingContext(() => { + for (;!this.match(16); ) { + if (this.eat(21)) { + if (r.length > 0) throw this.raise(this.state.lastTokEnd, E.DecoratorSemicolon); + continue; + } + if (this.match(32)) { + r.push(this.parseDecorator()); + continue; + } + const e = this.startNode(); + if (r.length) { + e.decorators = r; + this.resetStartLocationFromNode(e, r[0]); + r = []; + } + this.parseClassMember(i, e, n); + "constructor" === e.kind && e.decorators && e.decorators.length > 0 && this.raise(e.start, E.DecoratorConstructor); + } + }); + this.state.strict = t; + this.next(); + if (r.length) throw this.raise(this.state.start, E.TrailingDecorator); + this.classScope.exit(); + return this.finishNode(i, "ClassBody"); + } + parseClassMemberFromModifier(e, t) { + const n = this.parseIdentifier(!0); + if (this.isClassMethod()) { + const r = t; + r.kind = "method"; + r.computed = !1; + r.key = n; + r.static = !1; + this.pushClassMethod(e, r, !1, !1, !1, !1); + return !0; + } + if (this.isClassProperty()) { + const r = t; + r.computed = !1; + r.key = n; + r.static = !1; + e.body.push(this.parseClassProperty(r)); + return !0; + } + this.resetPreviousNodeTrailingComments(n); + return !1; + } + parseClassMember(e, t, n) { + const r = this.isContextual("static"); + if (r) { + if (this.parseClassMemberFromModifier(e, t)) return; + if (this.eat(13)) { + this.parseClassStaticBlock(e, t); + return; + } + } + this.parseClassMemberWithIsStatic(e, t, n, r); + } + parseClassMemberWithIsStatic(e, t, n, r) { + const i = t; + const s = t; + const a = t; + const o = t; + const l = i; + const c = i; + t.static = r; + if (this.eat(54)) { + l.kind = "method"; + const t = this.match(6); + this.parseClassElementName(l); + if (t) { + this.pushClassPrivateMethod(e, s, !0, !1); + return; + } + this.isNonstaticConstructor(i) && this.raise(i.key.start, E.ConstructorIsGenerator); + this.pushClassMethod(e, i, !0, !1, !1, !1); + return; + } + const p = this.match(5) && !this.state.containsEsc; + const u = this.match(6); + const d = this.parseClassElementName(t); + const h = this.state.start; + this.parsePostMemberNameModifiers(c); + if (this.isClassMethod()) { + l.kind = "method"; + if (u) { + this.pushClassPrivateMethod(e, s, !1, !1); + return; + } + const r = this.isNonstaticConstructor(i); + let a = !1; + if (r) { + i.kind = "constructor"; + n.hadConstructor && !this.hasPlugin("typescript") && this.raise(d.start, E.DuplicateConstructor); + r && this.hasPlugin("typescript") && t.override && this.raise(d.start, E.OverrideOnConstructor); + n.hadConstructor = !0; + a = n.hadSuperClass; + } + this.pushClassMethod(e, i, !1, !1, r, a); + } else if (this.isClassProperty()) u ? this.pushClassPrivateProperty(e, o) : this.pushClassProperty(e, a); else if (p && "async" === d.name && !this.isLineTerminator()) { + this.resetPreviousNodeTrailingComments(d); + const t = this.eat(54); + c.optional && this.unexpected(h); + l.kind = "method"; + const n = this.match(6); + this.parseClassElementName(l); + this.parsePostMemberNameModifiers(c); + if (n) this.pushClassPrivateMethod(e, s, t, !0); else { + this.isNonstaticConstructor(i) && this.raise(i.key.start, E.ConstructorIsAsync); + this.pushClassMethod(e, i, t, !0, !1, !1); + } + } else if (!p || "get" !== d.name && "set" !== d.name || this.match(54) && this.isLineTerminator()) this.isLineTerminator() ? u ? this.pushClassPrivateProperty(e, o) : this.pushClassProperty(e, a) : this.unexpected(); else { + this.resetPreviousNodeTrailingComments(d); + l.kind = d.name; + const t = this.match(6); + this.parseClassElementName(i); + if (t) this.pushClassPrivateMethod(e, s, !1, !1); else { + this.isNonstaticConstructor(i) && this.raise(i.key.start, E.ConstructorIsAccessor); + this.pushClassMethod(e, i, !1, !1, !1, !1); + } + this.checkGetterSetterParams(i); + } + } + parseClassElementName(e) { + const {type: t, value: n, start: r} = this.state; + 5 !== t && 4 !== t || !e.static || "prototype" !== n || this.raise(r, E.StaticPrototype); + 6 === t && "constructor" === n && this.raise(r, E.ConstructorClassPrivateField); + return this.parsePropertyName(e, !0); + } + parseClassStaticBlock(e, t) { + var n; + this.expectPlugin("classStaticBlock", t.start); + this.scope.enter(Se | xe | Te); + const r = this.state.labels; + this.state.labels = []; + this.prodParam.enter(bt); + const i = t.body = []; + this.parseBlockOrModuleBlockBody(i, void 0, !1, 16); + this.prodParam.exit(); + this.scope.exit(); + this.state.labels = r; + e.body.push(this.finishNode(t, "StaticBlock")); + null != (n = t.decorators) && n.length && this.raise(t.start, E.DecoratorStaticBlock); + } + pushClassProperty(e, t) { + t.computed || "constructor" !== t.key.name && "constructor" !== t.key.value || this.raise(t.key.start, E.ConstructorClassField); + e.body.push(this.parseClassProperty(t)); + } + pushClassPrivateProperty(e, t) { + const n = this.parseClassPrivateProperty(t); + e.body.push(n); + this.classScope.declarePrivateName(this.getPrivateNameSV(n.key), Qe, n.key.start); + } + pushClassMethod(e, t, n, r, i, s) { + e.body.push(this.parseMethod(t, n, r, i, s, "ClassMethod", !0)); + } + pushClassPrivateMethod(e, t, n, r) { + const i = this.parseMethod(t, n, r, !1, !1, "ClassPrivateMethod", !0); + e.body.push(i); + const s = "get" === i.kind ? i.static ? Ge : $e : "set" === i.kind ? i.static ? He : ze : Qe; + this.classScope.declarePrivateName(this.getPrivateNameSV(i.key), s, i.key.start); + } + parsePostMemberNameModifiers(e) {} + parseClassPrivateProperty(e) { + this.parseInitializer(e); + this.semicolon(); + return this.finishNode(e, "ClassPrivateProperty"); + } + parseClassProperty(e) { + this.parseInitializer(e); + this.semicolon(); + return this.finishNode(e, "ClassProperty"); + } + parseInitializer(e) { + this.scope.enter(Se | Te); + this.expressionScope.enter(Tt()); + this.prodParam.enter(bt); + e.value = this.eat(35) ? this.parseMaybeAssignAllowIn() : null; + this.expressionScope.exit(); + this.prodParam.exit(); + this.scope.exit(); + } + parseClassId(e, t, n, r = Me) { + if (this.match(5)) { + e.id = this.parseIdentifier(); + t && this.checkLVal(e.id, "class name", r); + } else n || !t ? e.id = null : this.unexpected(null, E.MissingClassName); + } + parseClassSuper(e) { + e.superClass = this.eat(80) ? this.parseExprSubscripts() : null; + } + parseExport(e) { + const t = this.maybeParseExportDefaultSpecifier(e); + const n = !t || this.eat(20); + const r = n && this.eatExportStar(e); + const i = r && this.maybeParseExportNamespaceSpecifier(e); + const s = n && (!i || this.eat(20)); + const a = t || r; + if (r && !i) { + t && this.unexpected(); + this.parseExportFrom(e, !0); + return this.finishNode(e, "ExportAllDeclaration"); + } + const o = this.maybeParseExportNamedSpecifiers(e); + if (t && n && !r && !o || i && s && !o) throw this.unexpected(null, 13); + let l; + if (a || o) { + l = !1; + this.parseExportFrom(e, a); + } else l = this.maybeParseExportDeclaration(e); + if (a || o || l) { + this.checkExport(e, !0, !1, !!e.source); + return this.finishNode(e, "ExportNamedDeclaration"); + } + if (this.eat(64)) { + e.declaration = this.parseExportDefaultExpression(); + this.checkExport(e, !0, !0); + return this.finishNode(e, "ExportDefaultDeclaration"); + } + throw this.unexpected(null, 13); + } + eatExportStar(e) { + return this.eat(54); + } + maybeParseExportDefaultSpecifier(e) { + if (this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom"); + const t = this.startNode(); + t.exported = this.parseIdentifier(!0); + e.specifiers = [ this.finishNode(t, "ExportDefaultSpecifier") ]; + return !0; + } + return !1; + } + maybeParseExportNamespaceSpecifier(e) { + if (this.isContextual("as")) { + e.specifiers || (e.specifiers = []); + const t = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); + this.next(); + t.exported = this.parseModuleExportName(); + e.specifiers.push(this.finishNode(t, "ExportNamespaceSpecifier")); + return !0; + } + return !1; + } + maybeParseExportNamedSpecifiers(e) { + if (this.match(13)) { + e.specifiers || (e.specifiers = []); + e.specifiers.push(...this.parseExportSpecifiers()); + e.source = null; + e.declaration = null; + return !0; + } + return !1; + } + maybeParseExportDeclaration(e) { + if (this.shouldParseExportDeclaration()) { + e.specifiers = []; + e.source = null; + e.declaration = this.parseExportDeclaration(e); + return !0; + } + return !1; + } + isAsyncFunction() { + if (!this.isContextual("async")) return !1; + const e = this.nextTokenStart(); + return !l.test(this.input.slice(this.state.pos, e)) && this.isUnparsedContextual(e, "function"); + } + parseExportDefaultExpression() { + const e = this.startNode(); + const t = this.isAsyncFunction(); + if (this.match(67) || t) { + this.next(); + t && this.next(); + return this.parseFunction(e, hn | mn, t); + } + if (this.match(79)) return this.parseClass(e, !0, !0); + if (this.match(32)) { + this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") && this.raise(this.state.start, E.DecoratorBeforeExport); + this.parseDecorators(!1); + return this.parseClass(e, !0, !0); + } + if (this.match(74) || this.match(73) || this.isLet()) throw this.raise(this.state.start, E.UnsupportedDefaultExport); + { + const e = this.parseMaybeAssignAllowIn(); + this.semicolon(); + return e; + } + } + parseExportDeclaration(e) { + return this.parseStatement(null); + } + isExportDefaultSpecifier() { + if (this.match(5)) { + const e = this.state.value; + if ("async" === e && !this.state.containsEsc || "let" === e) return !1; + if (("type" === e || "interface" === e) && !this.state.containsEsc) { + const e = this.lookahead(); + if (5 === e.type && "from" !== e.value || 13 === e.type) { + this.expectOnePlugin([ "flow", "typescript" ]); + return !1; + } + } + } else if (!this.match(64)) return !1; + const e = this.nextTokenStart(); + const t = this.isUnparsedContextual(e, "from"); + if (44 === this.input.charCodeAt(e) || this.match(5) && t) return !0; + if (this.match(64) && t) { + const t = this.input.charCodeAt(this.nextTokenStartSince(e + 4)); + return 34 === t || 39 === t; + } + return !1; + } + parseExportFrom(e, t) { + if (this.eatContextual("from")) { + e.source = this.parseImportSource(); + this.checkExport(e); + const t = this.maybeParseImportAssertions(); + t && (e.assertions = t); + } else t ? this.unexpected() : e.source = null; + this.semicolon(); + } + shouldParseExportDeclaration() { + const {type: e} = this.state; + if (32 === e) { + this.expectOnePlugin([ "decorators", "decorators-legacy" ]); + if (this.hasPlugin("decorators")) { + if (!this.getPluginOption("decorators", "decoratorsBeforeExport")) return !0; + this.unexpected(this.state.start, E.DecoratorBeforeExport); + } + } + return 73 === e || 74 === e || 67 === e || 79 === e || this.isLet() || this.isAsyncFunction(); + } + checkExport(e, t, n, r) { + if (t) if (n) { + this.checkDuplicateExports(e, "default"); + if (this.hasPlugin("exportDefaultFrom")) { + var i; + const t = e.declaration; + "Identifier" !== t.type || "from" !== t.name || t.end - t.start != 4 || null != (i = t.extra) && i.parenthesized || this.raise(t.start, E.ExportDefaultFromAsIdentifier); + } + } else if (e.specifiers && e.specifiers.length) for (const t of e.specifiers) { + const {exported: e} = t; + const n = "Identifier" === e.type ? e.name : e.value; + this.checkDuplicateExports(t, n); + if (!r && t.local) { + const {local: e} = t; + if ("Identifier" !== e.type) this.raise(t.start, E.ExportBindingIsString, e.value, n); else { + this.checkReservedWord(e.name, e.start, !0, !1); + this.scope.checkLocalExport(e); + } + } + } else if (e.declaration) if ("FunctionDeclaration" === e.declaration.type || "ClassDeclaration" === e.declaration.type) { + const t = e.declaration.id; + if (!t) throw new Error("Assertion failure"); + this.checkDuplicateExports(e, t.name); + } else if ("VariableDeclaration" === e.declaration.type) for (const t of e.declaration.declarations) this.checkDeclaration(t.id); + if (this.state.decoratorStack[this.state.decoratorStack.length - 1].length) throw this.raise(e.start, E.UnsupportedDecoratorExport); + } + checkDeclaration(e) { + if ("Identifier" === e.type) this.checkDuplicateExports(e, e.name); else if ("ObjectPattern" === e.type) for (const t of e.properties) this.checkDeclaration(t); else if ("ArrayPattern" === e.type) for (const t of e.elements) t && this.checkDeclaration(t); else "ObjectProperty" === e.type ? this.checkDeclaration(e.value) : "RestElement" === e.type ? this.checkDeclaration(e.argument) : "AssignmentPattern" === e.type && this.checkDeclaration(e.left); + } + checkDuplicateExports(e, t) { + this.exportedIdentifiers.has(t) && this.raise(e.start, "default" === t ? E.DuplicateDefaultExport : E.DuplicateExport, t); + this.exportedIdentifiers.add(t); + } + parseExportSpecifiers() { + const e = []; + let t = !0; + this.expect(13); + for (;!this.eat(16); ) { + if (t) t = !1; else { + this.expect(20); + if (this.eat(16)) break; + } + const n = this.startNode(); + const r = this.match(4); + const i = this.parseModuleExportName(); + n.local = i; + this.eatContextual("as") ? n.exported = this.parseModuleExportName() : n.exported = r ? kt(i) : Nt(i); + e.push(this.finishNode(n, "ExportSpecifier")); + } + return e; + } + parseModuleExportName() { + if (this.match(4)) { + const e = this.parseStringLiteral(this.state.value); + const t = e.value.match(yn); + t && this.raise(e.start, E.ModuleExportNameHasLoneSurrogate, t[0].charCodeAt(0).toString(16)); + return e; + } + return this.parseIdentifier(!0); + } + parseImport(e) { + e.specifiers = []; + if (!this.match(4)) { + const t = !this.maybeParseDefaultImportSpecifier(e) || this.eat(20); + const n = t && this.maybeParseStarImportSpecifier(e); + t && !n && this.parseNamedImportSpecifiers(e); + this.expectContextual("from"); + } + e.source = this.parseImportSource(); + const t = this.maybeParseImportAssertions(); + if (t) e.assertions = t; else { + const t = this.maybeParseModuleAttributes(); + t && (e.attributes = t); + } + this.semicolon(); + return this.finishNode(e, "ImportDeclaration"); + } + parseImportSource() { + this.match(4) || this.unexpected(); + return this.parseExprAtom(); + } + shouldParseDefaultImport(e) { + return this.match(5); + } + parseImportSpecifierLocal(e, t, n, r) { + t.local = this.parseIdentifier(); + this.checkLVal(t.local, r, _e); + e.specifiers.push(this.finishNode(t, n)); + } + parseAssertEntries() { + const e = []; + const t = new Set(); + do { + if (this.match(16)) break; + const n = this.startNode(); + const r = this.state.value; + t.has(r) && this.raise(this.state.start, E.ModuleAttributesWithDuplicateKeys, r); + t.add(r); + this.match(4) ? n.key = this.parseStringLiteral(r) : n.key = this.parseIdentifier(!0); + this.expect(22); + if (!this.match(4)) throw this.unexpected(this.state.start, E.ModuleAttributeInvalidValue); + n.value = this.parseStringLiteral(this.state.value); + this.finishNode(n, "ImportAttribute"); + e.push(n); + } while (this.eat(20)); + return e; + } + maybeParseModuleAttributes() { + if (!this.match(75) || this.hasPrecedingLineBreak()) return this.hasPlugin("moduleAttributes") ? [] : null; + this.expectPlugin("moduleAttributes"); + this.next(); + const e = []; + const t = new Set(); + do { + const n = this.startNode(); + n.key = this.parseIdentifier(!0); + "type" !== n.key.name && this.raise(n.key.start, E.ModuleAttributeDifferentFromType, n.key.name); + t.has(n.key.name) && this.raise(n.key.start, E.ModuleAttributesWithDuplicateKeys, n.key.name); + t.add(n.key.name); + this.expect(22); + if (!this.match(4)) throw this.unexpected(this.state.start, E.ModuleAttributeInvalidValue); + n.value = this.parseStringLiteral(this.state.value); + this.finishNode(n, "ImportAttribute"); + e.push(n); + } while (this.eat(20)); + return e; + } + maybeParseImportAssertions() { + if (!this.isContextual("assert") || this.hasPrecedingLineBreak()) return this.hasPlugin("importAssertions") ? [] : null; + this.expectPlugin("importAssertions"); + this.next(); + this.eat(13); + const e = this.parseAssertEntries(); + this.eat(16); + return e; + } + maybeParseDefaultImportSpecifier(e) { + if (this.shouldParseDefaultImport(e)) { + this.parseImportSpecifierLocal(e, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); + return !0; + } + return !1; + } + maybeParseStarImportSpecifier(e) { + if (this.match(54)) { + const t = this.startNode(); + this.next(); + this.expectContextual("as"); + this.parseImportSpecifierLocal(e, t, "ImportNamespaceSpecifier", "import namespace specifier"); + return !0; + } + return !1; + } + parseNamedImportSpecifiers(e) { + let t = !0; + this.expect(13); + for (;!this.eat(16); ) { + if (t) t = !1; else { + if (this.eat(22)) throw this.raise(this.state.start, E.DestructureNamedImport); + this.expect(20); + if (this.eat(16)) break; + } + this.parseImportSpecifier(e); + } + } + parseImportSpecifier(e) { + const t = this.startNode(); + const n = this.match(4); + t.imported = this.parseModuleExportName(); + if (this.eatContextual("as")) t.local = this.parseIdentifier(); else { + const {imported: e} = t; + if (n) throw this.raise(t.start, E.ImportBindingIsString, e.value); + this.checkReservedWord(e.name, t.start, !0, !0); + t.local = Nt(e); + } + this.checkLVal(t.local, "import specifier", _e); + e.specifiers.push(this.finishNode(t, "ImportSpecifier")); + } + isThisParam(e) { + return "Identifier" === e.type && "this" === e.name; + } + } + class bn extends Tn { + constructor(e, t) { + super(e = function(e) { + const t = {}; + for (const n of Object.keys(sn)) t[n] = e && null != e[n] ? e[n] : sn[n]; + return t; + }(e), t); + this.options = e; + this.initializeScopes(); + this.plugins = function(e) { + const t = new Map(); + for (const n of e) { + const [e, r] = Array.isArray(n) ? n : [ n, {} ]; + t.has(e) || t.set(e, r || {}); + } + return t; + }(this.options.plugins); + this.filename = e.sourceFilename; + } + getScopeHandler() { + return et; + } + parse() { + this.enterInitialScopes(); + const e = this.startNode(); + const t = this.startNode(); + this.nextToken(); + e.errors = null; + this.parseTopLevel(e, t); + e.errors = this.state.errors; + return e; + } + } + const Sn = function(e) { + const t = {}; + for (const n of Object.keys(e)) t[n] = J(e[n]); + return t; + }(V); + function xn(e, t) { + let n = bn; + if (null != e && e.plugins) { + !function(e) { + if (zt(e, "decorators")) { + if (zt(e, "decorators-legacy")) throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + const t = Qt(e, "decorators", "decoratorsBeforeExport"); + if (null == t) throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'."); + if ("boolean" != typeof t) throw new Error("'decoratorsBeforeExport' must be a boolean."); + } + if (zt(e, "flow") && zt(e, "typescript")) throw new Error("Cannot combine flow and typescript plugins."); + if (zt(e, "placeholders") && zt(e, "v8intrinsic")) throw new Error("Cannot combine placeholders and v8intrinsic plugins."); + if (zt(e, "pipelineOperator")) { + const t = Qt(e, "pipelineOperator", "proposal"); + if (!Zt.includes(t)) { + const e = Zt.map(e => `"${e}"`).join(", "); + throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`); + } + const n = zt(e, "recordAndTuple") && "hash" === Qt(e, "recordAndTuple", "syntaxType"); + if ("hack" === t) { + if (zt(e, "placeholders")) throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); + if (zt(e, "v8intrinsic")) throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); + const t = Qt(e, "pipelineOperator", "topicToken"); + if (!en.includes(t)) { + const e = en.map(e => `"${e}"`).join(", "); + throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`); + } + if ("#" === t && n) throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); + } else if ("smart" === t && n) throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); + } + if (zt(e, "moduleAttributes")) { + if (zt(e, "importAssertions")) throw new Error("Cannot combine importAssertions and moduleAttributes plugins."); + if ("may-2020" !== Qt(e, "moduleAttributes", "version")) throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'."); + } + if (zt(e, "recordAndTuple") && !tn.includes(Qt(e, "recordAndTuple", "syntaxType"))) throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + tn.map(e => `'${e}'`).join(", ")); + if (zt(e, "asyncDoExpressions") && !zt(e, "doExpressions")) { + const e = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); + e.missingPlugins = "doExpressions"; + throw e; + } + }(e.plugins); + n = function(e) { + const t = rn.filter(t => zt(e, t)); + const n = t.join("/"); + let r = En[n]; + if (!r) { + r = bn; + for (const e of t) r = nn[e](r); + En[n] = r; + } + return r; + }(e.plugins); + } + return new n(e, t); + } + const En = {}; + n.parse = function(e, t) { + var n; + if ("unambiguous" !== (null == (n = t) ? void 0 : n.sourceType)) return xn(t, e).parse(); + t = Object.assign({}, t); + try { + t.sourceType = "module"; + const n = xn(t, e); + const r = n.parse(); + if (n.sawUnambiguousESM) return r; + if (n.ambiguousScriptDifferentAst) try { + t.sourceType = "script"; + return xn(t, e).parse(); + } catch (e) {} else r.program.sourceType = "script"; + return r; + } catch (n) { + try { + t.sourceType = "script"; + return xn(t, e).parse(); + } catch (e) {} + throw n; + } + }; + n.parseExpression = function(e, t) { + const n = xn(t, e); + n.options.strictMode && (n.state.strict = !0); + return n.getExpression(); + }; + n.tokTypes = Sn; + }, {} ], + 31: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function e(t, n) { + const l = new WeakMap(); + const c = new WeakMap(); + const p = n || (0, r.validate)(null); + return Object.assign((n, ...a) => { + if ("string" == typeof n) { + if (a.length > 1) throw new Error("Unexpected extra params."); + return o((0, i.default)(t, n, (0, r.merge)(p, (0, r.validate)(a[0])))); + } + if (Array.isArray(n)) { + let e = l.get(n); + if (!e) { + e = (0, s.default)(t, n, p); + l.set(n, e); + } + return o(e(a)); + } + if ("object" == typeof n && n) { + if (a.length > 0) throw new Error("Unexpected extra params."); + return e(t, (0, r.merge)(p, (0, r.validate)(n))); + } + throw new Error(`Unexpected template param ${typeof n}`); + }, { + ast: (e, ...n) => { + if ("string" == typeof e) { + if (n.length > 1) throw new Error("Unexpected extra params."); + return (0, i.default)(t, e, (0, r.merge)((0, r.merge)(p, (0, r.validate)(n[0])), a))(); + } + if (Array.isArray(e)) { + let i = c.get(e); + if (!i) { + i = (0, s.default)(t, e, (0, r.merge)(p, a)); + c.set(e, i); + } + return i(n)(); + } + throw new Error(`Unexpected template param ${typeof e}`); + } + }); + }; + r = e("./options"); + i = e("./string"); + s = e("./literal"); + const a = (0, r.validate)({ + placeholderPattern: !1 + }); + function o(e) { + let t = ""; + try { + throw new Error(); + } catch (e) { + e.stack && (t = e.stack.split("\n").slice(3).join("\n")); + } + return n => { + try { + return e(n); + } catch (e) { + e.stack += `\n =============\n${t}`; + throw e; + } + }; + } + }, { + "./literal": 34, + "./options": 35, + "./string": 38 + } ], + 32: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.program = n.expression = n.statement = n.statements = n.smart = void 0; + var r = e("@babel/types"); + const {assertExpressionStatement: i} = r; + function s(e) { + return { + code: e => `/* @babel/template */;\n${e}`, + validate: () => {}, + unwrap: t => e(t.program.body.slice(1)) + }; + } + const a = s(e => e.length > 1 ? e : e[0]); + n.smart = a; + const o = s(e => e); + n.statements = o; + const l = s(e => { + if (0 === e.length) throw new Error("Found nothing to return."); + if (e.length > 1) throw new Error("Found multiple statements but wanted one"); + return e[0]; + }); + n.statement = l; + const c = { + code: e => `(\n${e}\n)`, + validate: e => { + if (e.program.body.length > 1) throw new Error("Found multiple statements but wanted one"); + if (0 === c.unwrap(e).start) throw new Error("Parse result included parens."); + }, + unwrap: ({program: e}) => { + const [t] = e.body; + i(t); + return t.expression; + } + }; + n.expression = c; + n.program = { + code: e => e, + validate: () => {}, + unwrap: e => e.program + }; + }, { + "@babel/types": 108 + } ], + 33: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = n.program = n.expression = n.statements = n.statement = n.smart = void 0; + r = e("./formatters"); + const a = (0, (i = e("./builder")).default)(r.smart); + n.smart = a; + const o = (0, i.default)(r.statement); + n.statement = o; + const l = (0, i.default)(r.statements); + n.statements = l; + const c = (0, i.default)(r.expression); + n.expression = c; + const p = (0, i.default)(r.program); + n.program = p; + s = Object.assign(a.bind(void 0), { + smart: a, + statement: o, + statements: l, + expression: c, + program: p, + ast: a.ast + }); + n.default = s; + }, { + "./builder": 31, + "./formatters": 32 + } ], + 34: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + const {metadata: o, names: l} = function(e, t, n) { + let r; + let s; + let o; + let l = ""; + do { + const c = a(t, l += "$"); + r = c.names; + s = new Set(r); + o = (0, i.default)(e, e.code(c.code), { + parser: n.parser, + placeholderWhitelist: new Set(c.names.concat(n.placeholderWhitelist ? Array.from(n.placeholderWhitelist) : [])), + placeholderPattern: n.placeholderPattern, + preserveComments: n.preserveComments, + syntacticPlaceholders: n.syntacticPlaceholders + }); + } while (o.placeholders.some(e => e.isDuplicate && s.has(e.name))); + return { + metadata: o, + names: r + }; + }(e, t, n); + return t => { + const n = {}; + t.forEach((e, t) => { + n[l[t]] = e; + }); + return t => { + const i = (0, r.normalizeReplacements)(t); + i && Object.keys(i).forEach(e => { + if (Object.prototype.hasOwnProperty.call(n, e)) throw new Error("Unexpected replacement overlap."); + }); + return e.unwrap((0, s.default)(o, i ? Object.assign(i, n) : n)); + }; + }; + }; + r = e("./options"); + i = e("./parse"); + s = e("./populate"); + function a(e, t) { + const n = []; + let r = e[0]; + for (let i = 1; i < e.length; i++) { + const s = `${t}${i - 1}`; + n.push(s); + r += s + e[i]; + } + return { + names: n, + code: r + }; + } + }, { + "./options": 35, + "./parse": 36, + "./populate": 37 + } ], + 35: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.merge = function(e, t) { + const {placeholderWhitelist: n = e.placeholderWhitelist, placeholderPattern: r = e.placeholderPattern, preserveComments: i = e.preserveComments, syntacticPlaceholders: s = e.syntacticPlaceholders} = t; + return { + parser: Object.assign({}, e.parser, t.parser), + placeholderWhitelist: n, + placeholderPattern: r, + preserveComments: i, + syntacticPlaceholders: s + }; + }; + n.validate = function(e) { + if (null != e && "object" != typeof e) throw new Error("Unknown template options."); + const t = e || {}, {placeholderWhitelist: n, placeholderPattern: i, preserveComments: s, syntacticPlaceholders: a} = t, o = function(e, t) { + var n, r, i, s; + if (null == e) return {}; + n = {}; + r = Object.keys(e); + for (s = 0; s < r.length; s++) { + i = r[s]; + t.indexOf(i) >= 0 || (n[i] = e[i]); + } + return n; + }(t, r); + if (null != n && !(n instanceof Set)) throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); + if (null != i && !(i instanceof RegExp) && !1 !== i) throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); + if (null != s && "boolean" != typeof s) throw new Error("'.preserveComments' must be a boolean, null, or undefined"); + if (null != a && "boolean" != typeof a) throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); + if (!0 === a && (null != n || null != i)) throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'"); + return { + parser: o, + placeholderWhitelist: n || void 0, + placeholderPattern: null == i ? void 0 : i, + preserveComments: null == s ? void 0 : s, + syntacticPlaceholders: null == a ? void 0 : a + }; + }; + n.normalizeReplacements = function(e) { + if (Array.isArray(e)) return e.reduce((e, t, n) => { + e["$" + n] = t; + return e; + }, {}); + if ("object" == typeof e || null == e) return e || void 0; + throw new Error("Template replacements must be an array, object, null, or undefined"); + }; + const r = [ "placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders" ]; + }, {} ], + 36: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + const {placeholderWhitelist: r, placeholderPattern: a, preserveComments: o, syntacticPlaceholders: l} = n; + const c = function(e, t, n) { + const r = (t.plugins || []).slice(); + !1 !== n && r.push("placeholders"); + t = Object.assign({ + allowReturnOutsideFunction: !0, + allowSuperOutsideMethod: !0, + sourceType: "module" + }, t, { + plugins: r + }); + try { + return (0, i.parse)(e, t); + } catch (t) { + const n = t.loc; + if (n) { + t.message += "\n" + (0, s.codeFrameColumns)(e, { + start: n + }); + t.code = "BABEL_TEMPLATE_PARSE_ERROR"; + } + throw t; + } + }(t, n.parser, l); + m(c, { + preserveComments: o + }); + e.validate(c); + const p = { + placeholders: [], + placeholderNames: new Set() + }; + const u = { + placeholders: [], + placeholderNames: new Set() + }; + const d = { + value: void 0 + }; + y(c, T, { + syntactic: p, + legacy: u, + isLegacyRef: d, + placeholderWhitelist: r, + placeholderPattern: a, + syntacticPlaceholders: l + }); + return Object.assign({ + ast: c + }, d.value ? u : p); + }; + r = e("@babel/types"); + i = e("@babel/parser"); + s = e("@babel/code-frame"); + const {isCallExpression: a, isExpressionStatement: o, isFunction: l, isIdentifier: c, isJSXIdentifier: p, isNewExpression: u, isPlaceholder: d, isStatement: h, isStringLiteral: f, removePropertiesDeep: m, traverse: y} = r; + const g = /^[_$A-Z0-9]+$/; + function T(e, t, n) { + var r; + let i; + if (d(e)) { + if (!1 === n.syntacticPlaceholders) throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false."); + i = e.name.name; + n.isLegacyRef.value = !1; + } else { + if (!1 === n.isLegacyRef.value || n.syntacticPlaceholders) return; + if (c(e) || p(e)) { + i = e.name; + n.isLegacyRef.value = !0; + } else { + if (!f(e)) return; + i = e.value; + n.isLegacyRef.value = !0; + } + } + if (!n.isLegacyRef.value && (null != n.placeholderPattern || null != n.placeholderWhitelist)) throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'"); + if (n.isLegacyRef.value && (!1 === n.placeholderPattern || !(n.placeholderPattern || g).test(i)) && (null == (r = n.placeholderWhitelist) || !r.has(i))) return; + t = t.slice(); + const {node: s, key: m} = t[t.length - 1]; + let y; + if (f(e) || d(e, { + expectedNode: "StringLiteral" + })) y = "string"; else if (u(s) && "arguments" === m || a(s) && "arguments" === m || l(s) && "params" === m) y = "param"; else if (o(s) && !d(e)) { + y = "statement"; + t = t.slice(0, -1); + } else y = h(e) && d(e) ? "statement" : "other"; + const {placeholders: T, placeholderNames: b} = n.isLegacyRef.value ? n.legacy : n.syntactic; + T.push({ + name: i, + type: y, + resolve: e => (function(e, t) { + let n = e; + for (let e = 0; e < t.length - 1; e++) { + const {key: r, index: i} = t[e]; + n = void 0 === i ? n[r] : n[r][i]; + } + const {key: r, index: i} = t[t.length - 1]; + return { + parent: n, + key: r, + index: i + }; + })(e, t), + isDuplicate: b.has(i) + }); + b.add(i); + } + }, { + "@babel/code-frame": 2, + "@babel/parser": 30, + "@babel/types": 108 + } ], + 37: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + const n = s(e.ast); + if (t) { + e.placeholders.forEach(e => { + if (!Object.prototype.hasOwnProperty.call(t, e.name)) { + const t = e.name; + throw new Error(`Error: No substitution given for "${t}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\n - { placeholderPattern: /^${t}$/ }`); + } + }); + Object.keys(t).forEach(t => { + if (!e.placeholderNames.has(t)) throw new Error(`Unknown substitution "${t}" given`); + }); + } + e.placeholders.slice().reverse().forEach(e => { + try { + !function(e, t, n) { + e.isDuplicate && (Array.isArray(n) ? n = n.map(e => s(e)) : "object" == typeof n && (n = s(n))); + const {parent: r, key: h, index: f} = e.resolve(t); + if ("string" === e.type) { + "string" == typeof n && (n = u(n)); + if (!n || !p(n)) throw new Error("Expected string substitution"); + } else if ("statement" === e.type) { + if (void 0 === f) n ? Array.isArray(n) ? n = i(n) : "string" == typeof n ? n = o(l(n)) : c(n) || (n = o(n)) : n = a(); else if (n && !Array.isArray(n)) { + "string" == typeof n && (n = l(n)); + c(n) || (n = o(n)); + } + } else if ("param" === e.type) { + "string" == typeof n && (n = l(n)); + if (void 0 === f) throw new Error("Assertion failure."); + } else { + "string" == typeof n && (n = l(n)); + if (Array.isArray(n)) throw new Error("Cannot replace single expression with an array."); + } + if (void 0 === f) { + d(r, h, n); + r[h] = n; + } else { + const t = r[h].slice(); + "statement" === e.type || "param" === e.type ? null == n ? t.splice(f, 1) : Array.isArray(n) ? t.splice(f, 1, ...n) : t[f] = n : t[f] = n; + d(r, h, t); + r[h] = t; + } + }(e, n, t && t[e.name] || null); + } catch (t) { + t.message = `@babel/template placeholder "${e.name}": ${t.message}`; + throw t; + } + }); + return n; + }; + var r = e("@babel/types"); + const {blockStatement: i, cloneNode: s, emptyStatement: a, expressionStatement: o, identifier: l, isStatement: c, isStringLiteral: p, stringLiteral: u, validate: d} = r; + }, { + "@babel/types": 108 + } ], + 38: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + t = e.code(t); + let a; + return o => { + const l = (0, r.normalizeReplacements)(o); + a || (a = (0, i.default)(e, t, n)); + return e.unwrap((0, s.default)(a, l)); + }; + }; + r = e("./options"); + i = e("./parse"); + s = e("./populate"); + }, { + "./options": 35, + "./parse": 36, + "./populate": 37 + } ], + 39: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.clear = function() { + s(); + a(); + }; + n.clearPath = s; + n.clearScope = a; + n.scope = n.path = void 0; + let r = new WeakMap(); + n.path = r; + let i = new WeakMap(); + n.scope = i; + function s() { + n.path = r = new WeakMap(); + } + function a() { + n.scope = i = new WeakMap(); + } + }, {} ], + 40: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("./path"); + i = e("@babel/types"); + const {VISITOR_KEYS: s} = i; + n.default = class { + constructor(e, t, n, r) { + this.queue = null; + this.priorityQueue = null; + this.parentPath = r; + this.scope = e; + this.state = n; + this.opts = t; + } + shouldVisit(e) { + const t = this.opts; + if (t.enter || t.exit) return !0; + if (t[e.type]) return !0; + const n = s[e.type]; + if (null == n || !n.length) return !1; + for (const t of n) if (e[t]) return !0; + return !1; + } + create(e, t, n, i) { + return r.default.get({ + parentPath: this.parentPath, + parent: e, + container: t, + key: n, + listKey: i + }); + } + maybeQueue(e, t) { + this.queue && (t ? this.queue.push(e) : this.priorityQueue.push(e)); + } + visitMultiple(e, t, n) { + if (0 === e.length) return !1; + const r = []; + for (let i = 0; i < e.length; i++) { + const s = e[i]; + s && this.shouldVisit(s) && r.push(this.create(t, e, i, n)); + } + return this.visitQueue(r); + } + visitSingle(e, t) { + return !!this.shouldVisit(e[t]) && this.visitQueue([ this.create(e, e, t) ]); + } + visitQueue(e) { + this.queue = e; + this.priorityQueue = []; + const t = new WeakSet(); + let n = !1; + for (const r of e) { + r.resync(); + 0 !== r.contexts.length && r.contexts[r.contexts.length - 1] === this || r.pushContext(this); + if (null === r.key) continue; + const {node: i} = r; + if (!t.has(i)) { + i && t.add(i); + if (r.visit()) { + n = !0; + break; + } + if (this.priorityQueue.length) { + n = this.visitQueue(this.priorityQueue); + this.priorityQueue = []; + this.queue = e; + if (n) break; + } + } + } + for (const t of e) t.popContext(); + this.queue = null; + return n; + } + visit(e, t) { + const n = e[t]; + return !!n && (Array.isArray(n) ? this.visitMultiple(n, e, t) : this.visitSingle(e, t)); + } + }; + }, { + "./path": 49, + "@babel/types": 108 + } ], + 41: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + n.default = class { + getCode() {} + getScope() {} + addHelper() { + throw new Error("Helpers are not supported by the default hub."); + } + buildError(e, t, n = TypeError) { + return new n(t); + } + }; + }, {} ], + 42: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o, l, c, p; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + Object.defineProperty(n, "NodePath", { + enumerable: !0, + get: function() { + return o.default; + } + }); + Object.defineProperty(n, "Scope", { + enumerable: !0, + get: function() { + return l.default; + } + }); + Object.defineProperty(n, "Hub", { + enumerable: !0, + get: function() { + return c.default; + } + }); + n.visitors = n.default = void 0; + r = e("./context"); + i = e("./visitors"); + n.visitors = i; + s = e("@babel/types"); + a = e("./cache"); + o = e("./path"); + l = e("./scope"); + c = e("./hub"); + const {VISITOR_KEYS: u, removeProperties: d, traverseFast: h} = s; + function f(e, t = {}, n, r, s) { + if (e) { + if (!t.noScope && !n && "Program" !== e.type && "File" !== e.type) throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${e.type} node without ` + "passing scope and parentPath."); + if (u[e.type]) { + i.explode(t); + f.node(e, t, n, r, s); + } + } + } + p = f; + n.default = p; + f.visitors = i; + f.verify = i.verify; + f.explode = i.explode; + f.cheap = function(e, t) { + return h(e, t); + }; + f.node = function(e, t, n, i, s, a) { + const o = u[e.type]; + if (!o) return; + const l = new r.default(n, t, i, s); + for (const t of o) if ((!a || !a[t]) && l.visit(e, t)) return; + }; + f.clearNode = function(e, t) { + d(e, t); + a.path.delete(e); + }; + f.removeProperties = function(e, t) { + h(e, f.clearNode, t); + return e; + }; + function m(e, t) { + if (e.node.type === t.type) { + t.has = !0; + e.stop(); + } + } + f.hasType = function(e, t, n) { + if (null != n && n.includes(e.type)) return !1; + if (e.type === t) return !0; + const r = { + has: !1, + type: t + }; + f(e, { + noScope: !0, + denylist: n, + enter: m + }, null, r); + return r.has; + }; + f.cache = a; + }, { + "./cache": 39, + "./context": 40, + "./hub": 41, + "./path": 49, + "./scope": 61, + "./visitors": 63, + "@babel/types": 108 + } ], + 43: [ function(e, t, n) { + "use strict"; + var r; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.findParent = function(e) { + let t = this; + for (;t = t.parentPath; ) if (e(t)) return t; + return null; + }; + n.find = function(e) { + let t = this; + do { + if (e(t)) return t; + } while (t = t.parentPath); + return null; + }; + n.getFunctionParent = function() { + return this.findParent(e => e.isFunction()); + }; + n.getStatementParent = function() { + let e = this; + do { + if (!e.parentPath || Array.isArray(e.container) && e.isStatement()) break; + e = e.parentPath; + } while (e); + if (e && (e.isProgram() || e.isFile())) throw new Error("File/Program node, we can't possibly find a statement parent to this"); + return e; + }; + n.getEarliestCommonAncestorFrom = function(e) { + return this.getDeepestCommonAncestorFrom(e, function(e, t, n) { + let r; + const s = i[e.type]; + for (const e of n) { + const n = e[t + 1]; + if (!r) { + r = n; + continue; + } + if (n.listKey && r.listKey === n.listKey && n.key < r.key) { + r = n; + continue; + } + const i = s.indexOf(r.parentKey); + const a = s.indexOf(n.parentKey); + i > a && (r = n); + } + return r; + }); + }; + n.getDeepestCommonAncestorFrom = function(e, t) { + if (!e.length) return this; + if (1 === e.length) return e[0]; + let n = 1 / 0; + let r, i; + const s = e.map(e => { + const t = []; + do { + t.unshift(e); + } while ((e = e.parentPath) && e !== this); + t.length < n && (n = t.length); + return t; + }); + const a = s[0]; + e: for (let e = 0; e < n; e++) { + const t = a[e]; + for (const n of s) if (n[e] !== t) break e; + r = e; + i = t; + } + if (i) return t ? t(i, r, s) : i; + throw new Error("Couldn't find intersection"); + }; + n.getAncestry = function() { + let e = this; + const t = []; + do { + t.push(e); + } while (e = e.parentPath); + return t; + }; + n.isAncestor = function(e) { + return e.isDescendant(this); + }; + n.isDescendant = function(e) { + return !!this.findParent(t => t === e); + }; + n.inType = function(...e) { + let t = this; + for (;t; ) { + for (const n of e) if (t.node.type === n) return !0; + t = t.parentPath; + } + return !1; + }; + r = e("@babel/types"); + e("./index"); + const {VISITOR_KEYS: i} = r; + }, { + "./index": 49, + "@babel/types": 108 + } ], + 44: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.shareCommentsWithSiblings = function() { + if ("string" == typeof this.key) return; + const e = this.node; + if (!e) return; + const t = e.trailingComments; + const n = e.leadingComments; + if (!t && !n) return; + const r = this.getSibling(this.key - 1); + const i = this.getSibling(this.key + 1); + const s = Boolean(r.node); + const a = Boolean(i.node); + s && !a ? r.addComments("trailing", t) : a && !s && i.addComments("leading", n); + }; + n.addComment = function(e, t, n) { + i(this.node, e, t, n); + }; + n.addComments = function(e, t) { + s(this.node, e, t); + }; + var r = e("@babel/types"); + const {addComment: i, addComments: s} = r; + }, { + "@babel/types": 108 + } ], + 45: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.call = function(e) { + const t = this.opts; + this.debug(e); + if (this.node && this._call(t[e])) return !0; + if (this.node) return this._call(t[this.node.type] && t[this.node.type][e]); + return !1; + }; + n._call = function(e) { + if (!e) return !1; + for (const t of e) { + if (!t) continue; + const e = this.node; + if (!e) return !0; + const n = t.call(this.state, this, this.state); + if (n && "object" == typeof n && "function" == typeof n.then) throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version."); + if (n) throw new Error(`Unexpected return value from visitor method ${t}`); + if (this.node !== e) return !0; + if (this._traverseFlags > 0) return !0; + } + return !1; + }; + n.isBlacklisted = n.isDenylisted = function() { + var e; + const t = null != (e = this.opts.denylist) ? e : this.opts.blacklist; + return t && t.indexOf(this.node.type) > -1; + }; + n.visit = function() { + if (!this.node) return !1; + if (this.isDenylisted()) return !1; + if (this.opts.shouldSkip && this.opts.shouldSkip(this)) return !1; + if (this.shouldSkip || this.call("enter") || this.shouldSkip) { + this.debug("Skip..."); + return this.shouldStop; + } + this.debug("Recursing into..."); + r.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); + this.call("exit"); + return this.shouldStop; + }; + n.skip = function() { + this.shouldSkip = !0; + }; + n.skipKey = function(e) { + null == this.skipKeys && (this.skipKeys = {}); + this.skipKeys[e] = !0; + }; + n.stop = function() { + this._traverseFlags |= i.SHOULD_SKIP | i.SHOULD_STOP; + }; + n.setScope = function() { + if (this.opts && this.opts.noScope) return; + let e = this.parentPath; + "key" === this.key && e.isMethod() && (e = e.parentPath); + let t; + for (;e && !t; ) { + if (e.opts && e.opts.noScope) return; + t = e.scope; + e = e.parentPath; + } + this.scope = this.getScope(t); + this.scope && this.scope.init(); + }; + n.setContext = function(e) { + null != this.skipKeys && (this.skipKeys = {}); + this._traverseFlags = 0; + if (e) { + this.context = e; + this.state = e.state; + this.opts = e.opts; + } + this.setScope(); + return this; + }; + n.resync = function() { + if (this.removed) return; + this._resyncParent(); + this._resyncList(); + this._resyncKey(); + }; + n._resyncParent = function() { + this.parentPath && (this.parent = this.parentPath.node); + }; + n._resyncKey = function() { + if (!this.container) return; + if (this.node === this.container[this.key]) return; + if (Array.isArray(this.container)) { + for (let e = 0; e < this.container.length; e++) if (this.container[e] === this.node) return this.setKey(e); + } else for (const e of Object.keys(this.container)) if (this.container[e] === this.node) return this.setKey(e); + this.key = null; + }; + n._resyncList = function() { + if (!this.parent || !this.inList) return; + const e = this.parent[this.listKey]; + if (this.container === e) return; + this.container = e || null; + }; + n._resyncRemoved = function() { + null != this.key && this.container && this.container[this.key] === this.node || this._markRemoved(); + }; + n.popContext = function() { + this.contexts.pop(); + this.contexts.length > 0 ? this.setContext(this.contexts[this.contexts.length - 1]) : this.setContext(void 0); + }; + n.pushContext = function(e) { + this.contexts.push(e); + this.setContext(e); + }; + n.setup = function(e, t, n, r) { + this.listKey = n; + this.container = t; + this.parentPath = e || this.parentPath; + this.setKey(r); + }; + n.setKey = function(e) { + var t; + this.key = e; + this.node = this.container[this.key]; + this.type = null == (t = this.node) ? void 0 : t.type; + }; + n.requeue = function(e = this) { + if (e.removed) return; + const t = this.contexts; + for (const n of t) n.maybeQueue(e); + }; + n._getQueueContexts = function() { + let e = this; + let t = this.contexts; + for (;!t.length && (e = e.parentPath); ) t = e.contexts; + return t; + }; + r = e("../index"); + i = e("./index"); + }, { + "../index": 42, + "./index": 49 + } ], + 46: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.toComputedKey = function() { + let e; + if (this.isMemberExpression()) e = this.node.property; else { + if (!this.isProperty() && !this.isMethod()) throw new ReferenceError("todo"); + e = this.node.key; + } + this.node.computed || h(e) && (e = P(e.name)); + return e; + }; + n.ensureBlock = function() { + const e = this.get("body"); + const t = e.node; + if (Array.isArray(e)) throw new Error("Can't convert array path to a block statement"); + if (!t) throw new Error("Can't convert node without a body"); + if (e.isBlockStatement()) return t; + const n = []; + let r = "body"; + let i; + let s; + if (e.isStatement()) { + s = "body"; + i = 0; + n.push(e.node); + } else { + r += ".body.0"; + if (this.isFunction()) { + i = "argument"; + n.push(S(e.node)); + } else { + i = "expression"; + n.push(u(e.node)); + } + } + this.node.body = l(n); + const a = this.get(r); + e.setup(a, s ? a.node[s] : a.node, s, i); + return this.node; + }; + n.arrowFunctionToShadowed = function() { + if (!this.isArrowFunctionExpression()) return; + this.arrowFunctionToExpression(); + }; + n.unwrapFunctionEnvironment = function() { + if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) throw this.buildCodeFrameError("Can only unwrap the environment of a function."); + C(this); + }; + n.arrowFunctionToExpression = function({allowInsertArrow: e = !0, specCompliant: t = !1, noNewArrows: n = !t} = {}) { + if (!this.isArrowFunctionExpression()) throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression."); + const r = C(this, n, e); + this.ensureBlock(); + this.node.type = "FunctionExpression"; + if (!n) { + const e = r ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId"); + e && this.parentPath.scope.push({ + id: e, + init: T([]) + }); + this.get("body").unshiftContainer("body", u(c(this.hub.addHelper("newArrowCheck"), [ A(), d(e ? e.name : r) ]))); + this.replaceWith(c(m((0, i.default)(this, !0) || this.node, d("bind")), [ e ? d(e.name) : A() ])); + } + }; + r = e("@babel/types"); + i = e("@babel/helper-function-name"); + const {arrowFunctionExpression: s, assignmentExpression: a, binaryExpression: o, blockStatement: l, callExpression: c, conditionalExpression: p, expressionStatement: u, identifier: d, isIdentifier: h, jsxIdentifier: f, memberExpression: m, metaProperty: y, numericLiteral: g, objectExpression: T, restElement: b, returnStatement: S, sequenceExpression: x, spreadElement: E, stringLiteral: P, super: v, thisExpression: A, unaryExpression: w} = r; + function C(e, t = !0, n = !0) { + const r = e.findParent(e => e.isFunction() && !e.isArrowFunctionExpression() || e.isProgram() || e.isClassProperty({ + static: !1 + })); + const i = "constructor" === (null == r ? void 0 : r.node.kind); + if (r.isClassProperty()) throw e.buildCodeFrameError("Unable to transform arrow inside class property"); + const {thisPaths: l, argumentsPaths: u, newTargetPaths: h, superProps: T, superCalls: S} = function(e) { + const t = []; + const n = []; + const r = []; + const i = []; + const s = []; + e.traverse({ + ClassProperty(e) { + e.skip(); + }, + Function(e) { + e.isArrowFunctionExpression() || e.skip(); + }, + ThisExpression(e) { + t.push(e); + }, + JSXIdentifier(e) { + "this" === e.node.name && (e.parentPath.isJSXMemberExpression({ + object: e.node + }) || e.parentPath.isJSXOpeningElement({ + name: e.node + })) && t.push(e); + }, + CallExpression(e) { + e.get("callee").isSuper() && s.push(e); + }, + MemberExpression(e) { + e.get("object").isSuper() && i.push(e); + }, + ReferencedIdentifier(e) { + if ("arguments" !== e.node.name) return; + let t = e.scope; + do { + if (t.hasOwnBinding("arguments")) { + t.rename("arguments"); + return; + } + if (t.path.isFunction() && !t.path.isArrowFunctionExpression()) break; + } while (t = t.parent); + n.push(e); + }, + MetaProperty(e) { + e.get("meta").isIdentifier({ + name: "new" + }) && e.get("property").isIdentifier({ + name: "target" + }) && r.push(e); + } + }); + return { + thisPaths: t, + argumentsPaths: n, + newTargetPaths: r, + superProps: i, + superCalls: s + }; + }(e); + if (i && S.length > 0) { + if (!n) throw S[0].buildCodeFrameError("Unable to handle nested super() usage in arrow"); + const e = []; + r.traverse({ + Function(e) { + e.isArrowFunctionExpression() || e.skip(); + }, + ClassProperty(e) { + e.skip(); + }, + CallExpression(t) { + t.get("callee").isSuper() && e.push(t); + } + }); + const t = function(e) { + return O(e, "supercall", () => { + const t = e.scope.generateUidIdentifier("args"); + return s([ b(t) ], c(v(), [ E(d(t.name)) ])); + }); + }(r); + e.forEach(e => { + const n = d(t); + n.loc = e.node.callee.loc; + e.get("callee").replaceWith(n); + }); + } + if (u.length > 0) { + const e = O(r, "arguments", () => { + const e = () => d("arguments"); + return r.scope.path.isProgram() ? p(o("===", w("typeof", e()), P("undefined")), r.scope.buildUndefinedNode(), e()) : e(); + }); + u.forEach(t => { + const n = d(e); + n.loc = t.node.loc; + t.replaceWith(n); + }); + } + if (h.length > 0) { + const e = O(r, "newtarget", () => y(d("new"), d("target"))); + h.forEach(t => { + const n = d(e); + n.loc = t.node.loc; + t.replaceWith(n); + }); + } + if (T.length > 0) { + if (!n) throw T[0].buildCodeFrameError("Unable to handle nested super.prop usage"); + T.reduce((e, t) => e.concat(function(e) { + if (e.parentPath.isAssignmentExpression() && "=" !== e.parentPath.node.operator) { + const t = e.parentPath; + const n = t.node.operator.slice(0, -1); + const r = t.node.right; + t.node.operator = "="; + if (e.node.computed) { + const i = e.scope.generateDeclaredUidIdentifier("tmp"); + t.get("left").replaceWith(m(e.node.object, a("=", i, e.node.property), !0)); + t.get("right").replaceWith(o(n, m(e.node.object, d(i.name), !0), r)); + } else { + t.get("left").replaceWith(m(e.node.object, e.node.property)); + t.get("right").replaceWith(o(n, m(e.node.object, d(e.node.property.name)), r)); + } + return [ t.get("left"), t.get("right").get("left") ]; + } + if (e.parentPath.isUpdateExpression()) { + const t = e.parentPath; + const n = e.scope.generateDeclaredUidIdentifier("tmp"); + const r = e.node.computed ? e.scope.generateDeclaredUidIdentifier("prop") : null; + const i = [ a("=", n, m(e.node.object, r ? a("=", r, e.node.property) : e.node.property, e.node.computed)), a("=", m(e.node.object, r ? d(r.name) : e.node.property, e.node.computed), o("+", d(n.name), g(1))) ]; + e.parentPath.node.prefix || i.push(d(n.name)); + t.replaceWith(x(i)); + const s = t.get("expressions.0.right"); + const l = t.get("expressions.1.left"); + return [ s, l ]; + } + return [ e ]; + }(t)), []).forEach(e => { + const t = e.node.computed ? "" : e.get("property").node.name; + const n = e.parentPath.isAssignmentExpression({ + left: e.node + }); + const i = e.parentPath.isCallExpression({ + callee: e.node + }); + const o = function(e, t, n) { + return O(e, `superprop_${t ? "set" : "get"}:${n || ""}`, () => { + const r = []; + let i; + if (n) i = m(v(), d(n)); else { + const t = e.scope.generateUidIdentifier("prop"); + r.unshift(t); + i = m(v(), d(t.name), !0); + } + if (t) { + const t = e.scope.generateUidIdentifier("value"); + r.push(t); + i = a("=", i, d(t.name)); + } + return s(r, i); + }); + }(r, n, t); + const p = []; + e.node.computed && p.push(e.get("property").node); + if (n) { + const t = e.parentPath.node.right; + p.push(t); + } + const u = c(d(o), p); + if (i) { + e.parentPath.unshiftContainer("arguments", A()); + e.replaceWith(m(u, d("call"))); + l.push(e.parentPath.get("arguments.0")); + } else n ? e.parentPath.replaceWith(u) : e.replaceWith(u); + }); + } + let C; + if (l.length > 0 || !t) { + C = function(e, t) { + return O(e, "this", n => { + if (!t || !I(e)) return A(); + const r = new WeakSet(); + e.traverse({ + Function(e) { + e.isArrowFunctionExpression() || e.skip(); + }, + ClassProperty(e) { + e.skip(); + }, + CallExpression(e) { + if (e.get("callee").isSuper() && !r.has(e.node)) { + r.add(e.node); + e.replaceWithMultiple([ e.node, a("=", d(n), d("this")) ]); + } + } + }); + }); + }(r, i); + if (t || i && I(r)) { + l.forEach(e => { + const t = e.isJSX() ? f(C) : d(C); + t.loc = e.node.loc; + e.replaceWith(t); + }); + t || (C = null); + } + } + return C; + } + function I(e) { + return e.isClassMethod() && !!e.parentPath.parentPath.node.superClass; + } + function O(e, t, n) { + const r = "binding:" + t; + let i = e.getData(r); + if (!i) { + const s = e.scope.generateUidIdentifier(t); + i = s.name; + e.setData(r, i); + e.scope.push({ + id: s, + init: n(i) + }); + } + return i; + } + }, { + "@babel/helper-function-name": 22, + "@babel/types": 108 + } ], + 47: [ function(e, t, n) { + (function(e) { + (function() { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.evaluateTruthy = function() { + const e = this.evaluate(); + if (e.confident) return !!e.value; + }; + n.evaluate = function() { + const e = { + confident: !0, + deoptPath: null, + seen: new Map() + }; + let t = s(this, e); + e.confident || (t = void 0); + return { + confident: e.confident, + deopt: e.deoptPath, + value: t + }; + }; + const t = [ "String", "Number", "Math" ]; + const r = [ "random" ]; + function i(e, t) { + if (t.confident) { + t.deoptPath = e; + t.confident = !1; + } + } + function s(n, o) { + const {node: l} = n; + const {seen: c} = o; + if (!c.has(l)) { + const p = { + resolved: !1 + }; + c.set(l, p); + const u = function(n, o) { + if (!o.confident) return; + if (n.isSequenceExpression()) { + const e = n.get("expressions"); + return s(e[e.length - 1], o); + } + if (n.isStringLiteral() || n.isNumericLiteral() || n.isBooleanLiteral()) return n.node.value; + if (n.isNullLiteral()) return null; + if (n.isTemplateLiteral()) return a(n, n.node.quasis, o); + if (n.isTaggedTemplateExpression() && n.get("tag").isMemberExpression()) { + const e = n.get("tag.object"); + const {node: {name: t}} = e; + const r = n.get("tag.property"); + if (e.isIdentifier() && "String" === t && !n.scope.getBinding(t) && r.isIdentifier() && "raw" === r.node.name) return a(n, n.node.quasi.quasis, o, !0); + } + if (n.isConditionalExpression()) { + const e = s(n.get("test"), o); + if (!o.confident) return; + return s(e ? n.get("consequent") : n.get("alternate"), o); + } + if (n.isExpressionWrapper()) return s(n.get("expression"), o); + if (n.isMemberExpression() && !n.parentPath.isCallExpression({ + callee: n.node + })) { + const e = n.get("property"); + const t = n.get("object"); + if (t.isLiteral() && e.isIdentifier()) { + const n = t.node.value; + const r = typeof n; + if ("number" === r || "string" === r) return n[e.node.name]; + } + } + if (n.isReferencedIdentifier()) { + const e = n.scope.getBinding(n.node.name); + if (e && e.constantViolations.length > 0) return i(e.path, o); + if (e && n.node.start < e.path.node.end) return i(e.path, o); + if (null != e && e.hasValue) return e.value; + { + if ("undefined" === n.node.name) return e ? i(e.path, o) : void 0; + if ("Infinity" === n.node.name) return e ? i(e.path, o) : 1 / 0; + if ("NaN" === n.node.name) return e ? i(e.path, o) : NaN; + const t = n.resolve(); + return t === n ? i(n, o) : s(t, o); + } + } + if (n.isUnaryExpression({ + prefix: !0 + })) { + if ("void" === n.node.operator) return; + const e = n.get("argument"); + if ("typeof" === n.node.operator && (e.isFunction() || e.isClass())) return "function"; + const t = s(e, o); + if (!o.confident) return; + switch (n.node.operator) { + case "!": + return !t; + + case "+": + return +t; + + case "-": + return -t; + + case "~": + return ~t; + + case "typeof": + return typeof t; + } + } + if (n.isArrayExpression()) { + const e = []; + const t = n.get("elements"); + for (const n of t) { + const t = n.evaluate(); + if (!t.confident) return i(t.deopt, o); + e.push(t.value); + } + return e; + } + if (n.isObjectExpression()) { + const e = {}; + const t = n.get("properties"); + for (const n of t) { + if (n.isObjectMethod() || n.isSpreadElement()) return i(n, o); + const t = n.get("key"); + let r = t; + if (n.node.computed) { + if (!(r = r.evaluate()).confident) return i(r.deopt, o); + r = r.value; + } else r = r.isIdentifier() ? r.node.name : r.node.value; + const s = n.get("value"); + let a = s.evaluate(); + if (!a.confident) return i(a.deopt, o); + a = a.value; + e[r] = a; + } + return e; + } + if (n.isLogicalExpression()) { + const e = o.confident; + const t = s(n.get("left"), o); + const r = o.confident; + o.confident = e; + const i = s(n.get("right"), o); + const a = o.confident; + switch (n.node.operator) { + case "||": + o.confident = r && (!!t || a); + if (!o.confident) return; + return t || i; + + case "&&": + o.confident = r && (!t || a); + if (!o.confident) return; + return t && i; + } + } + if (n.isBinaryExpression()) { + const e = s(n.get("left"), o); + if (!o.confident) return; + const t = s(n.get("right"), o); + if (!o.confident) return; + switch (n.node.operator) { + case "-": + return e - t; + + case "+": + return e + t; + + case "/": + return e / t; + + case "*": + return e * t; + + case "%": + return e % t; + + case "**": + return Math.pow(e, t); + + case "<": + return e < t; + + case ">": + return e > t; + + case "<=": + return e <= t; + + case ">=": + return e >= t; + + case "==": + return e == t; + + case "!=": + return e != t; + + case "===": + return e === t; + + case "!==": + return e !== t; + + case "|": + return e | t; + + case "&": + return e & t; + + case "^": + return e ^ t; + + case "<<": + return e << t; + + case ">>": + return e >> t; + + case ">>>": + return e >>> t; + } + } + if (n.isCallExpression()) { + const i = n.get("callee"); + let a; + let l; + i.isIdentifier() && !n.scope.getBinding(i.node.name) && t.indexOf(i.node.name) >= 0 && (l = e[i.node.name]); + if (i.isMemberExpression()) { + const n = i.get("object"); + const s = i.get("property"); + if (n.isIdentifier() && s.isIdentifier() && t.indexOf(n.node.name) >= 0 && r.indexOf(s.node.name) < 0) { + a = e[n.node.name]; + l = a[s.node.name]; + } + if (n.isLiteral() && s.isIdentifier()) { + const e = typeof n.node.value; + if ("string" === e || "number" === e) { + a = n.node.value; + l = a[s.node.name]; + } + } + } + if (l) { + const e = n.get("arguments").map(e => s(e, o)); + if (!o.confident) return; + return l.apply(a, e); + } + } + i(n, o); + }(n, o); + if (o.confident) { + p.resolved = !0; + p.value = u; + } + return u; + } + { + const e = c.get(l); + if (e.resolved) return e.value; + i(n, o); + } + } + function a(e, t, n, r = !1) { + let i = ""; + let a = 0; + const o = e.get("expressions"); + for (const e of t) { + if (!n.confident) break; + i += r ? e.value.raw : e.value.cooked; + const t = o[a++]; + t && (i += String(s(t, n))); + } + if (n.confident) return i; + } + }).call(this); + }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); + }, {} ], + 48: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.getOpposite = function() { + if ("left" === this.key) return this.getSibling("right"); + if ("right" === this.key) return this.getSibling("left"); + return null; + }; + n.getCompletionRecords = function() { + return y(this, { + canHaveBreak: !1, + shouldPopulateBreak: !1, + inCaseClause: !1 + }).map(e => e.path); + }; + n.getSibling = function(e) { + return r.default.get({ + parentPath: this.parentPath, + parent: this.parent, + container: this.container, + listKey: this.listKey, + key: e + }).setContext(this.context); + }; + n.getPrevSibling = function() { + return this.getSibling(this.key - 1); + }; + n.getNextSibling = function() { + return this.getSibling(this.key + 1); + }; + n.getAllNextSiblings = function() { + let e = this.key; + let t = this.getSibling(++e); + const n = []; + for (;t.node; ) { + n.push(t); + t = this.getSibling(++e); + } + return n; + }; + n.getAllPrevSiblings = function() { + let e = this.key; + let t = this.getSibling(--e); + const n = []; + for (;t.node; ) { + n.push(t); + t = this.getSibling(--e); + } + return n; + }; + n.get = function(e, t = !0) { + !0 === t && (t = this.context); + const n = e.split("."); + return 1 === n.length ? this._getKey(e, t) : this._getPattern(n, t); + }; + n._getKey = function(e, t) { + const n = this.node; + const i = n[e]; + return Array.isArray(i) ? i.map((s, a) => r.default.get({ + listKey: e, + parentPath: this, + parent: n, + container: i, + key: a + }).setContext(t)) : r.default.get({ + parentPath: this, + parent: n, + container: n, + key: e + }).setContext(t); + }; + n._getPattern = function(e, t) { + let n = this; + for (const r of e) n = "." === r ? n.parentPath : Array.isArray(n) ? n[r] : n.get(r, t); + return n; + }; + n.getBindingIdentifiers = function(e) { + return s(this.node, e); + }; + n.getOuterBindingIdentifiers = function(e) { + return a(this.node, e); + }; + n.getBindingIdentifierPaths = function(e = !1, t = !1) { + const n = [ this ]; + const r = Object.create(null); + for (;n.length; ) { + const i = n.shift(); + if (!i) continue; + if (!i.node) continue; + const a = s.keys[i.node.type]; + if (i.isIdentifier()) if (e) { + const e = r[i.node.name] = r[i.node.name] || []; + e.push(i); + } else r[i.node.name] = i; else if (i.isExportDeclaration()) { + const e = i.get("declaration"); + o(e) && n.push(e); + } else { + if (t) { + if (i.isFunctionDeclaration()) { + n.push(i.get("id")); + continue; + } + if (i.isFunctionExpression()) continue; + } + if (a) for (let e = 0; e < a.length; e++) { + const t = a[e]; + const r = i.get(t); + Array.isArray(r) ? n.push(...r) : r.node && n.push(r); + } + } + } + return r; + }; + n.getOuterBindingIdentifierPaths = function(e) { + return this.getBindingIdentifierPaths(e, !0); + }; + r = e("./index"); + i = e("@babel/types"); + const {getBindingIdentifiers: s, getOuterBindingIdentifiers: a, isDeclaration: o, numericLiteral: l, unaryExpression: c} = i; + const p = 0; + const u = 1; + function d(e, t, n) { + e && t.push(...y(e, n)); + return t; + } + function h(e) { + e.forEach(e => { + e.type = u; + }); + } + function f(e, t) { + e.forEach(e => { + e.path.isBreakStatement({ + label: null + }) && (t ? e.path.replaceWith(c("void", l(0))) : e.path.remove()); + }); + } + function m(e, t) { + const n = []; + if (t.canHaveBreak) { + let r = []; + for (let i = 0; i < e.length; i++) { + const s = e[i]; + const a = Object.assign({}, t, { + inCaseClause: !1 + }); + s.isBlockStatement() && (t.inCaseClause || t.shouldPopulateBreak) ? a.shouldPopulateBreak = !0 : a.shouldPopulateBreak = !1; + const o = y(s, a); + if (o.length > 0 && o.every(e => e.type === u)) { + if (r.length > 0 && o.every(e => e.path.isBreakStatement({ + label: null + }))) { + h(r); + n.push(...r); + if (r.some(e => e.path.isDeclaration())) { + n.push(...o); + f(o, !0); + } + f(o, !1); + } else { + n.push(...o); + t.shouldPopulateBreak || f(o, !0); + } + break; + } + if (i === e.length - 1) n.push(...o); else { + r = []; + for (let e = 0; e < o.length; e++) { + const t = o[e]; + t.type === u && n.push(t); + t.type === p && r.push(t); + } + } + } + } else if (e.length) for (let r = e.length - 1; r >= 0; r--) { + const i = y(e[r], t); + if (i.length > 1 || 1 === i.length && !i[0].path.isVariableDeclaration()) { + n.push(...i); + break; + } + } + return n; + } + function y(e, t) { + let n = []; + if (e.isIfStatement()) { + n = d(e.get("consequent"), n, t); + n = d(e.get("alternate"), n, t); + } else { + if (e.isDoExpression() || e.isFor() || e.isWhile() || e.isLabeledStatement()) return d(e.get("body"), n, t); + if (e.isProgram() || e.isBlockStatement()) return m(e.get("body"), t); + if (e.isFunction()) return y(e.get("body"), t); + if (e.isTryStatement()) { + n = d(e.get("block"), n, t); + n = d(e.get("handler"), n, t); + } else { + if (e.isCatchClause()) return d(e.get("body"), n, t); + if (e.isSwitchStatement()) return function(e, t, n) { + let r = []; + for (let i = 0; i < e.length; i++) { + const s = y(e[i], n); + const a = []; + const o = []; + for (const e of s) { + e.type === p && a.push(e); + e.type === u && o.push(e); + } + a.length && (r = a); + t.push(...o); + } + t.push(...r); + return t; + }(e.get("cases"), n, t); + if (e.isSwitchCase()) return m(e.get("consequent"), { + canHaveBreak: !0, + shouldPopulateBreak: !1, + inCaseClause: !0 + }); + e.isBreakStatement() ? n.push(function(e) { + return { + type: u, + path: e + }; + }(e)) : n.push(function(e) { + return { + type: p, + path: e + }; + }(e)); + } + } + return n; + } + }, { + "./index": 49, + "@babel/types": 108 + } ], + 49: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o, l, c, p, u, d, h, f, m, y, g, T, b, S, x, E; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = n.SHOULD_SKIP = n.SHOULD_STOP = n.REMOVED = void 0; + r = e("./lib/virtual-types"); + i = e("debug"); + s = e("../index"); + a = e("../scope"); + l = o = e("@babel/types"); + c = e("../cache"); + p = e("@babel/generator"); + u = e("./ancestry"); + d = e("./inference"); + h = e("./replacement"); + f = e("./evaluation"); + m = e("./conversion"); + y = e("./introspection"); + g = e("./context"); + T = e("./removal"); + b = e("./modification"); + S = e("./family"); + x = e("./comments"); + const {validate: P} = o; + const v = i("babel"); + const A = 1; + n.REMOVED = A; + const w = 2; + n.SHOULD_STOP = w; + const C = 4; + n.SHOULD_SKIP = C; + class I { + constructor(e, t) { + this.contexts = []; + this.state = null; + this.opts = null; + this._traverseFlags = 0; + this.skipKeys = null; + this.parentPath = null; + this.container = null; + this.listKey = null; + this.key = null; + this.node = null; + this.type = null; + this.parent = t; + this.hub = e; + this.data = null; + this.context = null; + this.scope = null; + } + static get({hub: e, parentPath: t, parent: n, container: r, listKey: i, key: s}) { + !e && t && (e = t.hub); + if (!n) throw new Error("To get a node path the parent needs to exist"); + const a = r[s]; + let o = c.path.get(n); + if (!o) { + o = new Map(); + c.path.set(n, o); + } + let l = o.get(a); + if (!l) { + l = new I(e, n); + a && o.set(a, l); + } + l.setup(t, r, i, s); + return l; + } + getScope(e) { + return this.isScope() ? new a.default(this) : e; + } + setData(e, t) { + null == this.data && (this.data = Object.create(null)); + return this.data[e] = t; + } + getData(e, t) { + null == this.data && (this.data = Object.create(null)); + let n = this.data[e]; + void 0 === n && void 0 !== t && (n = this.data[e] = t); + return n; + } + buildCodeFrameError(e, t = SyntaxError) { + return this.hub.buildError(this.node, e, t); + } + traverse(e, t) { + (0, s.default)(this.node, e, this.scope, t, this); + } + set(e, t) { + P(this.node, e, t); + this.node[e] = t; + } + getPathLocation() { + const e = []; + let t = this; + do { + let n = t.key; + t.inList && (n = `${t.listKey}[${n}]`); + e.unshift(n); + } while (t = t.parentPath); + return e.join("."); + } + debug(e) { + v.enabled && v(`${this.getPathLocation()} ${this.type}: ${e}`); + } + toString() { + return (0, p.default)(this.node).code; + } + get inList() { + return !!this.listKey; + } + set inList(e) { + e || (this.listKey = null); + } + get parentKey() { + return this.listKey || this.key; + } + get shouldSkip() { + return !!(this._traverseFlags & C); + } + set shouldSkip(e) { + e ? this._traverseFlags |= C : this._traverseFlags &= ~C; + } + get shouldStop() { + return !!(this._traverseFlags & w); + } + set shouldStop(e) { + e ? this._traverseFlags |= w : this._traverseFlags &= ~w; + } + get removed() { + return !!(this._traverseFlags & A); + } + set removed(e) { + e ? this._traverseFlags |= A : this._traverseFlags &= ~A; + } + } + Object.assign(I.prototype, u, d, h, f, m, y, g, T, b, S, x); + for (const e of l.TYPES) { + const t = `is${e}`; + const n = l[t]; + I.prototype[t] = function(e) { + return n(this.node, e); + }; + I.prototype[`assert${e}`] = function(t) { + if (!n(this.node, t)) throw new TypeError(`Expected node path of type ${e}`); + }; + } + for (const e of Object.keys(r)) { + if ("_" === e[0]) continue; + l.TYPES.indexOf(e) < 0 && l.TYPES.push(e); + const t = r[e]; + I.prototype[`is${e}`] = function(e) { + return t.checkPath(this, e); + }; + } + E = I; + n.default = E; + }, { + "../cache": 39, + "../index": 42, + "../scope": 61, + "./ancestry": 43, + "./comments": 44, + "./context": 45, + "./conversion": 46, + "./evaluation": 47, + "./family": 48, + "./inference": 50, + "./introspection": 53, + "./lib/virtual-types": 56, + "./modification": 57, + "./removal": 58, + "./replacement": 59, + "@babel/generator": 16, + "@babel/types": 108, + debug: 151 + } ], + 50: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.getTypeAnnotation = function() { + if (this.typeAnnotation) return this.typeAnnotation; + let e = this._getTypeAnnotation() || s(); + m(e) && (e = e.typeAnnotation); + return this.typeAnnotation = e; + }; + n._getTypeAnnotation = function() { + const e = this.node; + if (!e) { + if ("init" === this.key && this.parentPath.isVariableDeclarator()) { + const e = this.parentPath.parentPath; + const t = e.parentPath; + return "left" === e.key && t.isForInStatement() ? T() : "left" === e.key && t.isForOfStatement() ? s() : b(); + } + return; + } + if (e.typeAnnotation) return e.typeAnnotation; + if (S.has(e)) return; + S.add(e); + try { + var t; + let n = r[e.type]; + if (n) return n.call(this, e); + n = r[this.parentPath.type]; + if (null != (t = n) && t.validParent) return this.parentPath.getTypeAnnotation(); + } finally { + S.delete(e); + } + }; + n.isBaseType = function(e, t) { + return x(e, this.getTypeAnnotation(), t); + }; + n.couldBeBaseType = function(e) { + const t = this.getTypeAnnotation(); + if (a(t)) return !0; + if (y(t)) { + for (const n of t.types) if (a(n) || x(e, n, !0)) return !0; + return !1; + } + return x(e, t, !0); + }; + n.baseTypeStrictlyMatches = function(e) { + const t = this.getTypeAnnotation(); + const n = e.getTypeAnnotation(); + if (!a(t) && c(t)) return n.type === t.type; + return !1; + }; + n.isGenericType = function(e) { + const t = this.getTypeAnnotation(); + return p(t) && u(t.id, { + name: e + }); + }; + r = e("./inferers"); + i = e("@babel/types"); + const {anyTypeAnnotation: s, isAnyTypeAnnotation: a, isBooleanTypeAnnotation: o, isEmptyTypeAnnotation: l, isFlowBaseAnnotation: c, isGenericTypeAnnotation: p, isIdentifier: u, isMixedTypeAnnotation: d, isNumberTypeAnnotation: h, isStringTypeAnnotation: f, isTypeAnnotation: m, isUnionTypeAnnotation: y, isVoidTypeAnnotation: g, stringTypeAnnotation: T, voidTypeAnnotation: b} = i; + const S = new WeakSet(); + function x(e, t, n) { + if ("string" === e) return f(t); + if ("number" === e) return h(t); + if ("boolean" === e) return o(t); + if ("any" === e) return a(t); + if ("mixed" === e) return d(t); + if ("empty" === e) return l(t); + if ("void" === e) return g(t); + if (n) return !1; + throw new Error(`Unknown base type ${e}`); + } + }, { + "./inferers": 52, + "@babel/types": 108 + } ], + 51: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + if (!this.isReferenced()) return; + const t = this.scope.getBinding(e.name); + if (t) return t.identifier.typeAnnotation ? t.identifier.typeAnnotation : function(e, t, n) { + const r = []; + const i = []; + let o = d(e, t, i); + const p = function e(t, n, r) { + const i = function(e, t, n) { + let r; + for (;r = t.parentPath; ) { + if (r.isIfStatement() || r.isConditionalExpression()) { + if ("test" === t.key) return; + return r; + } + if (r.isFunction() && r.parentPath.scope.getBinding(n) !== e) return; + t = r; + } + }(t, n, r); + if (!i) return; + const o = i.get("test"); + const p = [ o ]; + const u = []; + for (let e = 0; e < p.length; e++) { + const t = p[e]; + if (t.isLogicalExpression()) { + if ("&&" === t.node.operator) { + p.push(t.get("left")); + p.push(t.get("right")); + } + } else if (t.isBinaryExpression()) { + const e = h(r, t); + e && u.push(e); + } + } + if (u.length) return c(u[0]) && a ? { + typeAnnotation: a(u), + ifStatement: i + } : s ? { + typeAnnotation: s(u), + ifStatement: i + } : { + typeAnnotation: l(u), + ifStatement: i + }; + return e(i, r); + }(e, t, n); + if (p) { + const t = d(e, p.ifStatement); + o = o.filter(e => t.indexOf(e) < 0); + r.push(p.typeAnnotation); + } + if (o.length) { + o.push(...i); + for (const e of o) r.push(e.getTypeAnnotation()); + } + if (!r.length) return; + if (c(r[0]) && a) return a(r); + if (s) return s(r); + return l(r); + }(t, this, e.name); + if ("undefined" === e.name) return u(); + if ("NaN" === e.name || "Infinity" === e.name) return p(); + e.name; + }; + var r = e("@babel/types"); + const {BOOLEAN_NUMBER_BINARY_OPERATORS: i, createFlowUnionType: s, createTSUnionType: a, createTypeAnnotationBasedOnTypeof: o, createUnionTypeAnnotation: l, isTSTypeAnnotation: c, numberTypeAnnotation: p, voidTypeAnnotation: u} = r; + function d(e, t, n) { + const r = e.constantViolations.slice(); + r.unshift(e.path); + return r.filter(e => { + const r = (e = e.resolve())._guessExecutionStatusRelativeTo(t); + n && "unknown" === r && n.push(e); + return "before" === r; + }); + } + function h(e, t) { + const n = t.node.operator; + const r = t.get("right").resolve(); + const s = t.get("left").resolve(); + let a; + s.isIdentifier({ + name: e + }) ? a = r : r.isIdentifier({ + name: e + }) && (a = s); + if (a) return "===" === n ? a.getTypeAnnotation() : i.indexOf(n) >= 0 ? p() : void 0; + if ("===" !== n && "==" !== n) return; + let l; + let c; + if (s.isUnaryExpression({ + operator: "typeof" + })) { + l = s; + c = r; + } else if (r.isUnaryExpression({ + operator: "typeof" + })) { + l = r; + c = s; + } + if (!l) return; + if (!l.get("argument").isIdentifier({ + name: e + })) return; + if (!(c = c.resolve()).isLiteral()) return; + const u = c.node.value; + return "string" == typeof u ? o(u) : void 0; + } + }, { + "@babel/types": 108 + } ], + 52: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.VariableDeclarator = function() { + var e; + if (!this.get("id").isIdentifier()) return; + const t = this.get("init"); + let n = t.getTypeAnnotation(); + "AnyTypeAnnotation" === (null == (e = n) ? void 0 : e.type) && t.isCallExpression() && t.get("callee").isIdentifier({ + name: "Array" + }) && !t.scope.hasBinding("Array", !0) && (n = C()); + return n; + }; + n.TypeCastExpression = w; + n.NewExpression = function(e) { + if (this.get("callee").isIdentifier()) return g(e.callee); + }; + n.TemplateLiteral = function() { + return E(); + }; + n.UnaryExpression = function(e) { + const t = e.operator; + if ("void" === t) return A(); + if (l.indexOf(t) >= 0) return x(); + if (c.indexOf(t) >= 0) return E(); + if (a.indexOf(t) >= 0) return d(); + }; + n.BinaryExpression = function(e) { + const t = e.operator; + if (o.indexOf(t) >= 0) return x(); + if (s.indexOf(t) >= 0) return d(); + if ("+" === t) { + const e = this.get("right"); + const t = this.get("left"); + return t.isBaseType("number") && e.isBaseType("number") ? x() : t.isBaseType("string") || e.isBaseType("string") ? E() : v([ E(), x() ]); + } + }; + n.LogicalExpression = function() { + const e = [ this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation() ]; + if (b(e[0]) && m) return m(e); + if (f) return f(e); + return y(e); + }; + n.ConditionalExpression = function() { + const e = [ this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation() ]; + if (b(e[0]) && m) return m(e); + if (f) return f(e); + return y(e); + }; + n.SequenceExpression = function() { + return this.get("expressions").pop().getTypeAnnotation(); + }; + n.ParenthesizedExpression = function() { + return this.get("expression").getTypeAnnotation(); + }; + n.AssignmentExpression = function() { + return this.get("right").getTypeAnnotation(); + }; + n.UpdateExpression = function(e) { + const t = e.operator; + if ("++" === t || "--" === t) return x(); + }; + n.StringLiteral = function() { + return E(); + }; + n.NumericLiteral = function() { + return x(); + }; + n.BooleanLiteral = function() { + return d(); + }; + n.NullLiteral = function() { + return S(); + }; + n.RegExpLiteral = function() { + return g(T("RegExp")); + }; + n.ObjectExpression = function() { + return g(T("Object")); + }; + n.ArrayExpression = C; + n.RestElement = I; + n.ClassDeclaration = n.ClassExpression = n.FunctionDeclaration = n.ArrowFunctionExpression = n.FunctionExpression = function() { + return g(T("Function")); + }; + n.CallExpression = function() { + const {callee: e} = this.node; + if (N(e)) return u(E()); + if (O(e) || k(e)) return u(p()); + if (D(e)) return u(P([ E(), p() ])); + return M(this.get("callee")); + }; + n.TaggedTemplateExpression = function() { + return M(this.get("tag")); + }; + Object.defineProperty(n, "Identifier", { + enumerable: !0, + get: function() { + return i.default; + } + }); + r = e("@babel/types"); + i = e("./inferer-reference"); + const {BOOLEAN_BINARY_OPERATORS: s, BOOLEAN_UNARY_OPERATORS: a, NUMBER_BINARY_OPERATORS: o, NUMBER_UNARY_OPERATORS: l, STRING_UNARY_OPERATORS: c, anyTypeAnnotation: p, arrayTypeAnnotation: u, booleanTypeAnnotation: d, buildMatchMemberExpression: h, createFlowUnionType: f, createTSUnionType: m, createUnionTypeAnnotation: y, genericTypeAnnotation: g, identifier: T, isTSTypeAnnotation: b, nullLiteralTypeAnnotation: S, numberTypeAnnotation: x, stringTypeAnnotation: E, tupleTypeAnnotation: P, unionTypeAnnotation: v, voidTypeAnnotation: A} = r; + function w(e) { + return e.typeAnnotation; + } + w.validParent = !0; + function C() { + return g(T("Array")); + } + function I() { + return C(); + } + I.validParent = !0; + const O = h("Array.from"); + const N = h("Object.keys"); + const k = h("Object.values"); + const D = h("Object.entries"); + function M(e) { + if ((e = e.resolve()).isFunction()) { + if (e.is("async")) return e.is("generator") ? g(T("AsyncIterator")) : g(T("Promise")); + if (e.node.returnType) return e.node.returnType; + } + } + }, { + "./inferer-reference": 51, + "@babel/types": 108 + } ], + 53: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.matchesPattern = function(e, t) { + return d(this.node, e, t); + }; + n.has = h; + n.isStatic = function() { + return this.scope.isStatic(this.node); + }; + n.isnt = function(e) { + return !this.has(e); + }; + n.equals = function(e, t) { + return this.node[e] === t; + }; + n.isNodeType = function(e) { + return u(this.type, e); + }; + n.canHaveVariableDeclarationOrExpression = function() { + return ("init" === this.key || "left" === this.key) && this.parentPath.isFor(); + }; + n.canSwapBetweenExpressionAndStatement = function(e) { + if ("body" !== this.key || !this.parentPath.isArrowFunctionExpression()) return !1; + if (this.isExpression()) return a(e); + if (this.isBlockStatement()) return o(e); + return !1; + }; + n.isCompletionRecord = function(e) { + let t = this; + let n = !0; + do { + const r = t.container; + if (t.isFunction() && !n) return !!e; + n = !1; + if (Array.isArray(r) && t.key !== r.length - 1) return !1; + } while ((t = t.parentPath) && !t.isProgram()); + return !0; + }; + n.isStatementOrBlock = function() { + return !this.parentPath.isLabeledStatement() && !a(this.container) && i.includes(this.key); + }; + n.referencesImport = function(e, t) { + if (!this.isReferencedIdentifier()) { + if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? p(this.node.property, { + value: t + }) : this.node.property.name === t)) { + const t = this.get("object"); + return t.isReferencedIdentifier() && t.referencesImport(e, "*"); + } + return !1; + } + const n = this.scope.getBinding(this.node.name); + if (!n || "module" !== n.kind) return !1; + const r = n.path; + const i = r.parentPath; + if (!i.isImportDeclaration()) return !1; + if (i.node.source.value !== e) return !1; + if (!t) return !0; + if (r.isImportDefaultSpecifier() && "default" === t) return !0; + if (r.isImportNamespaceSpecifier() && "*" === t) return !0; + if (r.isImportSpecifier() && l(r.node.imported, { + name: t + })) return !0; + return !1; + }; + n.getSource = function() { + const e = this.node; + if (e.end) { + const t = this.hub.getCode(); + if (t) return t.slice(e.start, e.end); + } + return ""; + }; + n.willIMaybeExecuteBefore = function(e) { + return "after" !== this._guessExecutionStatusRelativeTo(e); + }; + n._guessExecutionStatusRelativeTo = function(e) { + const t = { + this: m(this), + target: m(e) + }; + if (t.target.node !== t.this.node) return this._guessExecutionStatusRelativeToDifferentFunctions(t.target); + const n = { + target: e.getAncestry(), + this: this.getAncestry() + }; + if (n.target.indexOf(this) >= 0) return "after"; + if (n.this.indexOf(e) >= 0) return "before"; + let r; + const i = { + target: 0, + this: 0 + }; + for (;!r && i.this < n.this.length; ) { + const e = n.this[i.this]; + i.target = n.target.indexOf(e); + i.target >= 0 ? r = e : i.this++; + } + if (!r) throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program."); + if (g(n.this, i.this - 1) || g(n.target, i.target - 1)) return "unknown"; + const a = { + this: n.this[i.this - 1], + target: n.target[i.target - 1] + }; + if (a.target.listKey && a.this.listKey && a.target.container === a.this.container) return a.target.key > a.this.key ? "before" : "after"; + const o = s[r.type]; + const l = { + this: o.indexOf(a.this.parentKey), + target: o.indexOf(a.target.parentKey) + }; + return l.target > l.this ? "before" : "after"; + }; + n._guessExecutionStatusRelativeToDifferentFunctions = function(e) { + if (!e.isFunctionDeclaration() || e.parentPath.isExportDeclaration()) return "unknown"; + const t = e.scope.getBinding(e.node.id.name); + if (!t.references) return "before"; + const n = t.referencePaths; + let r; + for (const t of n) { + const n = !!t.find(t => t.node === e.node); + if (n) continue; + if ("callee" !== t.key || !t.parentPath.isCallExpression()) return "unknown"; + if (T.has(t.node)) continue; + T.add(t.node); + const i = this._guessExecutionStatusRelativeTo(t); + T.delete(t.node); + if (r && r !== i) return "unknown"; + r = i; + } + return r; + }; + n.resolve = function(e, t) { + return this._resolve(e, t) || this; + }; + n._resolve = function(e, t) { + if (t && t.indexOf(this) >= 0) return; + (t = t || []).push(this); + if (this.isVariableDeclarator()) { + if (this.get("id").isIdentifier()) return this.get("init").resolve(e, t); + } else if (this.isReferencedIdentifier()) { + const n = this.scope.getBinding(this.node.name); + if (!n) return; + if (!n.constant) return; + if ("module" === n.kind) return; + if (n.path !== this) { + const r = n.path.resolve(e, t); + if (this.find(e => e.node === r.node)) return; + return r; + } + } else { + if (this.isTypeCastExpression()) return this.get("expression").resolve(e, t); + if (e && this.isMemberExpression()) { + const n = this.toComputedKey(); + if (!c(n)) return; + const r = n.value; + const i = this.get("object").resolve(e, t); + if (i.isObjectExpression()) { + const n = i.get("properties"); + for (const i of n) { + if (!i.isProperty()) continue; + const n = i.get("key"); + let s = i.isnt("computed") && n.isIdentifier({ + name: r + }); + if (s = s || n.isLiteral({ + value: r + })) return i.get("value").resolve(e, t); + } + } else if (i.isArrayExpression() && !isNaN(+r)) { + const n = i.get("elements"); + const s = n[r]; + if (s) return s.resolve(e, t); + } + } + } + }; + n.isConstantExpression = function() { + if (this.isIdentifier()) { + const e = this.scope.getBinding(this.node.name); + return !!e && e.constant; + } + if (this.isLiteral()) return !this.isRegExpLiteral() && (!this.isTemplateLiteral() || this.get("expressions").every(e => e.isConstantExpression())); + if (this.isUnaryExpression()) return "void" === this.node.operator && this.get("argument").isConstantExpression(); + if (this.isBinaryExpression()) return this.get("left").isConstantExpression() && this.get("right").isConstantExpression(); + return !1; + }; + n.isInStrictMode = function() { + return !!(this.isProgram() ? this : this.parentPath).find(e => { + if (e.isProgram({ + sourceType: "module" + })) return !0; + if (e.isClass()) return !0; + if (!e.isProgram() && !e.isFunction()) return !1; + if (e.isArrowFunctionExpression() && !e.get("body").isBlockStatement()) return !1; + const t = e.isFunction() ? e.node.body : e.node; + for (const e of t.directives) if ("use strict" === e.value.value) return !0; + }); + }; + n.is = void 0; + var r = e("@babel/types"); + const {STATEMENT_OR_BLOCK_KEYS: i, VISITOR_KEYS: s, isBlockStatement: a, isExpression: o, isIdentifier: l, isLiteral: c, isStringLiteral: p, isType: u, matchesPattern: d} = r; + function h(e) { + const t = this.node && this.node[e]; + return t && Array.isArray(t) ? !!t.length : !!t; + } + const f = h; + n.is = f; + function m(e) { + return (e.scope.getFunctionParent() || e.scope.getProgramParent()).path; + } + function y(e, t) { + switch (e) { + case "LogicalExpression": + return "right" === t; + + case "ConditionalExpression": + case "IfStatement": + return "consequent" === t || "alternate" === t; + + case "WhileStatement": + case "DoWhileStatement": + case "ForInStatement": + case "ForOfStatement": + return "body" === t; + + case "ForStatement": + return "body" === t || "update" === t; + + case "SwitchStatement": + return "cases" === t; + + case "TryStatement": + return "handler" === t; + + case "AssignmentPattern": + return "right" === t; + + case "OptionalMemberExpression": + return "property" === t; + + case "OptionalCallExpression": + return "arguments" === t; + + default: + return !1; + } + } + function g(e, t) { + for (let n = 0; n < t; n++) { + const t = e[n]; + if (y(t.parent.type, t.parentKey)) return !0; + } + return !1; + } + const T = new WeakSet(); + }, { + "@babel/types": 108 + } ], + 54: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + i = r = e("@babel/types"); + const {react: s} = r; + const {cloneNode: a, jsxExpressionContainer: o, variableDeclaration: l, variableDeclarator: c} = i; + const p = { + ReferencedIdentifier(e, t) { + if (e.isJSXIdentifier() && s.isCompatTag(e.node.name) && !e.parentPath.isJSXMemberExpression()) return; + if ("this" === e.node.name) { + let n = e.scope; + do { + if (n.path.isFunction() && !n.path.isArrowFunctionExpression()) break; + } while (n = n.parent); + n && t.breakOnScopePaths.push(n.path); + } + const n = e.scope.getBinding(e.node.name); + if (n) { + for (const r of n.constantViolations) if (r.scope !== n.path.scope) { + t.mutableBinding = !0; + e.stop(); + return; + } + n === t.scope.getBinding(e.node.name) && (t.bindings[e.node.name] = n); + } + } + }; + n.default = class { + constructor(e, t) { + this.breakOnScopePaths = void 0; + this.bindings = void 0; + this.mutableBinding = void 0; + this.scopes = void 0; + this.scope = void 0; + this.path = void 0; + this.attachAfter = void 0; + this.breakOnScopePaths = []; + this.bindings = {}; + this.mutableBinding = !1; + this.scopes = []; + this.scope = t; + this.path = e; + this.attachAfter = !1; + } + isCompatibleScope(e) { + for (const t of Object.keys(this.bindings)) { + const n = this.bindings[t]; + if (!e.bindingIdentifierEquals(t, n.identifier)) return !1; + } + return !0; + } + getCompatibleScopes() { + let e = this.path.scope; + do { + if (!this.isCompatibleScope(e)) break; + this.scopes.push(e); + if (this.breakOnScopePaths.indexOf(e.path) >= 0) break; + } while (e = e.parent); + } + getAttachmentPath() { + let e = this._getAttachmentPath(); + if (!e) return; + let t = e.scope; + t.path === e && (t = e.scope.parent); + if (t.path.isProgram() || t.path.isFunction()) for (const n of Object.keys(this.bindings)) { + if (!t.hasOwnBinding(n)) continue; + const r = this.bindings[n]; + if ("param" !== r.kind && "params" !== r.path.parentKey && this.getAttachmentParentForPath(r.path).key >= e.key) { + this.attachAfter = !0; + e = r.path; + for (const t of r.constantViolations) this.getAttachmentParentForPath(t).key > e.key && (e = t); + } + } + return e; + } + _getAttachmentPath() { + const e = this.scopes.pop(); + if (e) if (e.path.isFunction()) { + if (!this.hasOwnParamBindings(e)) return this.getNextScopeAttachmentParent(); + { + if (this.scope === e) return; + const t = e.path.get("body").get("body"); + for (let e = 0; e < t.length; e++) if (!t[e].node._blockHoist) return t[e]; + } + } else if (e.path.isProgram()) return this.getNextScopeAttachmentParent(); + } + getNextScopeAttachmentParent() { + const e = this.scopes.pop(); + if (e) return this.getAttachmentParentForPath(e.path); + } + getAttachmentParentForPath(e) { + do { + if (!e.parentPath || Array.isArray(e.container) && e.isStatement()) return e; + } while (e = e.parentPath); + } + hasOwnParamBindings(e) { + for (const t of Object.keys(this.bindings)) { + if (!e.hasOwnBinding(t)) continue; + const n = this.bindings[t]; + if ("param" === n.kind && n.constant) return !0; + } + return !1; + } + run() { + this.path.traverse(p, this); + if (this.mutableBinding) return; + this.getCompatibleScopes(); + const e = this.getAttachmentPath(); + if (!e) return; + if (e.getFunctionParent() === this.path.getFunctionParent()) return; + let t = e.scope.generateUidIdentifier("ref"); + const n = c(t, this.path.node); + const r = this.attachAfter ? "insertAfter" : "insertBefore"; + const [i] = e[r]([ e.isVariableDeclarator() ? n : l("var", [ n ]) ]); + const s = this.path.parentPath; + s.isJSXElement() && this.path.container === s.node.children && (t = o(t)); + this.path.replaceWith(a(t)); + return e.isVariableDeclarator() ? i.get("init") : i.get("declarations.0.init"); + } + }; + }, { + "@babel/types": 108 + } ], + 55: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.hooks = void 0; + n.hooks = [ function(e, t) { + if ("test" === e.key && (t.isWhile() || t.isSwitchCase()) || "declaration" === e.key && t.isExportDeclaration() || "body" === e.key && t.isLabeledStatement() || "declarations" === e.listKey && t.isVariableDeclaration() && 1 === t.node.declarations.length || "expression" === e.key && t.isExpressionStatement()) { + t.remove(); + return !0; + } + }, function(e, t) { + if (t.isSequenceExpression() && 1 === t.node.expressions.length) { + t.replaceWith(t.node.expressions[0]); + return !0; + } + }, function(e, t) { + if (t.isBinary()) { + "left" === e.key ? t.replaceWith(t.node.right) : t.replaceWith(t.node.left); + return !0; + } + }, function(e, t) { + if (t.isIfStatement() && ("consequent" === e.key || "alternate" === e.key) || "body" === e.key && (t.isLoop() || t.isArrowFunctionExpression())) { + e.replaceWith({ + type: "BlockStatement", + body: [] + }); + return !0; + } + } ]; + }, {} ], + 56: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.ForAwaitStatement = n.NumericLiteralTypeAnnotation = n.ExistentialTypeParam = n.SpreadProperty = n.RestProperty = n.Flow = n.Pure = n.Generated = n.User = n.Var = n.BlockScoped = n.Referenced = n.Scope = n.Expression = n.Statement = n.BindingIdentifier = n.ReferencedMemberExpression = n.ReferencedIdentifier = void 0; + var r = e("@babel/types"); + const {isBinding: i, isBlockScoped: s, isExportDeclaration: a, isExpression: o, isFlow: l, isForStatement: c, isForXStatement: p, isIdentifier: u, isImportDeclaration: d, isImportSpecifier: h, isJSXIdentifier: f, isJSXMemberExpression: m, isMemberExpression: y, isReferenced: g, isScope: T, isStatement: b, isVar: S, isVariableDeclaration: x, react: E} = r; + const {isCompatTag: P} = E; + const v = { + types: [ "Identifier", "JSXIdentifier" ], + checkPath(e, t) { + const {node: n, parent: r} = e; + if (!u(n, t) && !m(r, t)) { + if (!f(n, t)) return !1; + if (P(n.name)) return !1; + } + return g(n, r, e.parentPath.parent); + } + }; + n.ReferencedIdentifier = v; + const A = { + types: [ "MemberExpression" ], + checkPath: ({node: e, parent: t}) => y(e) && g(e, t) + }; + n.ReferencedMemberExpression = A; + const w = { + types: [ "Identifier" ], + checkPath(e) { + const {node: t, parent: n} = e; + const r = e.parentPath.parent; + return u(t) && i(t, n, r); + } + }; + n.BindingIdentifier = w; + const C = { + types: [ "Statement" ], + checkPath({node: e, parent: t}) { + if (b(e)) { + if (x(e)) { + if (p(t, { + left: e + })) return !1; + if (c(t, { + init: e + })) return !1; + } + return !0; + } + return !1; + } + }; + n.Statement = C; + const I = { + types: [ "Expression" ], + checkPath: e => e.isIdentifier() ? e.isReferencedIdentifier() : o(e.node) + }; + n.Expression = I; + const O = { + types: [ "Scopable", "Pattern" ], + checkPath: e => T(e.node, e.parent) + }; + n.Scope = O; + const N = { + checkPath: e => g(e.node, e.parent) + }; + n.Referenced = N; + const k = { + checkPath: e => s(e.node) + }; + n.BlockScoped = k; + const D = { + types: [ "VariableDeclaration" ], + checkPath: e => S(e.node) + }; + n.Var = D; + const M = { + checkPath: e => e.node && !!e.node.loc + }; + n.User = M; + const _ = { + checkPath: e => !e.isUser() + }; + n.Generated = _; + const L = { + checkPath: (e, t) => e.scope.isPure(e.node, t) + }; + n.Pure = L; + const j = { + types: [ "Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier" ], + checkPath: ({node: e}) => !!l(e) || (d(e) ? "type" === e.importKind || "typeof" === e.importKind : a(e) ? "type" === e.exportKind : !!h(e) && ("type" === e.importKind || "typeof" === e.importKind)) + }; + n.Flow = j; + const F = { + types: [ "RestElement" ], + checkPath: e => e.parentPath && e.parentPath.isObjectPattern() + }; + n.RestProperty = F; + const B = { + types: [ "RestElement" ], + checkPath: e => e.parentPath && e.parentPath.isObjectExpression() + }; + n.SpreadProperty = B; + n.ExistentialTypeParam = { + types: [ "ExistsTypeAnnotation" ] + }; + n.NumericLiteralTypeAnnotation = { + types: [ "NumberLiteralTypeAnnotation" ] + }; + const R = { + types: [ "ForOfStatement" ], + checkPath: ({node: e}) => !0 === e.await + }; + n.ForAwaitStatement = R; + }, { + "@babel/types": 108 + } ], + 57: [ function(e, t, n) { + "use strict"; + var r, i, s, a; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.insertBefore = function(e) { + this._assertUnremoved(); + const t = this._verifyNodeList(e); + const {parentPath: n} = this; + if (n.isExpressionStatement() || n.isLabeledStatement() || n.isExportNamedDeclaration() || n.isExportDefaultDeclaration() && this.isDeclaration()) return n.insertBefore(t); + if (this.isNodeType("Expression") && !this.isJSXElement() || n.isForStatement() && "init" === this.key) { + this.node && t.push(this.node); + return this.replaceExpressionWithStatements(t); + } + if (Array.isArray(this.container)) return this._containerInsertBefore(t); + if (this.isStatementOrBlock()) { + const e = this.node; + const n = e && (!this.isExpressionStatement() || null != e.expression); + this.replaceWith(p(n ? [ e ] : [])); + return this.unshiftContainer("body", t); + } + throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?"); + }; + n._containerInsert = function(e, t) { + this.updateSiblingKeys(e, t.length); + const n = []; + this.container.splice(e, 0, ...t); + for (let r = 0; r < t.length; r++) { + const t = e + r; + const i = this.getSibling(t); + n.push(i); + this.context && this.context.queue && i.pushContext(this.context); + } + const r = this._getQueueContexts(); + for (const e of n) { + e.setScope(); + e.debug("Inserted."); + for (const t of r) t.maybeQueue(e, !0); + } + return n; + }; + n._containerInsertBefore = function(e) { + return this._containerInsert(this.key, e); + }; + n._containerInsertAfter = function(e) { + return this._containerInsert(this.key + 1, e); + }; + n.insertAfter = function(e) { + this._assertUnremoved(); + const t = this._verifyNodeList(e); + const {parentPath: n} = this; + if (n.isExpressionStatement() || n.isLabeledStatement() || n.isExportNamedDeclaration() || n.isExportDefaultDeclaration() && this.isDeclaration()) return n.insertAfter(t.map(e => f(e) ? h(e) : e)); + if (this.isNodeType("Expression") && !this.isJSXElement() && !n.isJSXElement() || n.isForStatement() && "init" === this.key) { + if (this.node) { + const e = this.node; + let {scope: r} = this; + if (r.path.isPattern()) { + l(e); + this.replaceWith(u(o([], e), [])); + this.get("callee.body").insertAfter(t); + return [ this ]; + } + n.isMethod({ + computed: !0, + key: e + }) && (r = r.parent); + const i = r.generateDeclaredUidIdentifier(); + t.unshift(h(c("=", d(i), e))); + t.push(h(d(i))); + } + return this.replaceExpressionWithStatements(t); + } + if (Array.isArray(this.container)) return this._containerInsertAfter(t); + if (this.isStatementOrBlock()) { + const e = this.node; + const n = e && (!this.isExpressionStatement() || null != e.expression); + this.replaceWith(p(n ? [ e ] : [])); + return this.pushContainer("body", t); + } + throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?"); + }; + n.updateSiblingKeys = function(e, t) { + if (!this.parent) return; + const n = r.path.get(this.parent); + for (const [, r] of n) r.key >= e && (r.key += t); + }; + n._verifyNodeList = function(e) { + if (!e) return []; + Array.isArray(e) || (e = [ e ]); + for (let t = 0; t < e.length; t++) { + const n = e[t]; + let r; + n ? "object" != typeof n ? r = "contains a non-object node" : n.type ? n instanceof s.default && (r = "has a NodePath when it expected a raw object") : r = "without a type" : r = "has falsy node"; + if (r) { + const e = Array.isArray(n) ? "array" : typeof n; + throw new Error(`Node list ${r} with the index of ${t} and type of ${e}`); + } + } + return e; + }; + n.unshiftContainer = function(e, t) { + this._assertUnremoved(); + t = this._verifyNodeList(t); + return s.default.get({ + parentPath: this, + parent: this.node, + container: this.node[e], + listKey: e, + key: 0 + }).setContext(this.context)._containerInsertBefore(t); + }; + n.pushContainer = function(e, t) { + this._assertUnremoved(); + const n = this._verifyNodeList(t); + const r = this.node[e]; + return s.default.get({ + parentPath: this, + parent: this.node, + container: r, + listKey: e, + key: r.length + }).setContext(this.context).replaceWithMultiple(n); + }; + n.hoist = function(e = this.scope) { + return new i.default(this, e).run(); + }; + r = e("../cache"); + i = e("./lib/hoister"); + s = e("./index"); + a = e("@babel/types"); + const {arrowFunctionExpression: o, assertExpression: l, assignmentExpression: c, blockStatement: p, callExpression: u, cloneNode: d, expressionStatement: h, isExpression: f} = a; + }, { + "../cache": 39, + "./index": 49, + "./lib/hoister": 54, + "@babel/types": 108 + } ], + 58: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.remove = function() { + var e; + this._assertUnremoved(); + this.resync(); + null != (e = this.opts) && e.noScope || this._removeFromScope(); + if (this._callRemovalHooks()) { + this._markRemoved(); + return; + } + this.shareCommentsWithSiblings(); + this._remove(); + this._markRemoved(); + }; + n._removeFromScope = function() { + const e = this.getBindingIdentifiers(); + Object.keys(e).forEach(e => this.scope.removeBinding(e)); + }; + n._callRemovalHooks = function() { + for (const e of r.hooks) if (e(this, this.parentPath)) return !0; + }; + n._remove = function() { + if (Array.isArray(this.container)) { + this.container.splice(this.key, 1); + this.updateSiblingKeys(this.key, -1); + } else this._replaceWith(null); + }; + n._markRemoved = function() { + this._traverseFlags |= s.SHOULD_SKIP | s.REMOVED; + this.parent && i.path.get(this.parent).delete(this.node); + this.node = null; + }; + n._assertUnremoved = function() { + if (this.removed) throw this.buildCodeFrameError("NodePath has been removed so is read-only."); + }; + r = e("./lib/removal-hooks"); + i = e("../cache"); + s = e("./index"); + }, { + "../cache": 39, + "./index": 49, + "./lib/removal-hooks": 55 + } ], + 59: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o, l, c; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.replaceWithMultiple = function(e) { + var t; + this.resync(); + e = this._verifyNodeList(e); + b(e[0], this.node); + S(e[e.length - 1], this.node); + null == (t = a.path.get(this.parent)) || t.delete(this.node); + this.node = this.container[this.key] = null; + const n = this.insertAfter(e); + this.node ? this.requeue() : this.remove(); + return n; + }; + n.replaceWithSourceString = function(e) { + this.resync(); + try { + e = `(${e})`; + e = (0, o.parse)(e); + } catch (t) { + const n = t.loc; + if (n) { + t.message += " - make sure this is an expression.\n" + (0, r.codeFrameColumns)(e, { + start: { + line: n.line, + column: n.column + 1 + } + }); + t.code = "BABEL_REPLACE_SOURCE_ERROR"; + } + throw t; + } + e = e.program.body[0].expression; + i.default.removeProperties(e); + return this.replaceWith(e); + }; + n.replaceWith = function(e) { + this.resync(); + if (this.removed) throw new Error("You can't replace this node, we've already removed it"); + e instanceof s.default && (e = e.node); + if (!e) throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); + if (this.node === e) return [ this ]; + if (this.isProgram() && !P(e)) throw new Error("You can only replace a Program root node with another Program node"); + if (Array.isArray(e)) throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); + if ("string" == typeof e) throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); + let t = ""; + if (this.isNodeType("Statement") && E(e) && !this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(e) && !this.parentPath.isExportDefaultDeclaration()) { + e = g(e); + t = "expression"; + } + if (this.isNodeType("Expression") && v(e) && !this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(e)) return this.replaceExpressionWithStatements([ e ]); + const n = this.node; + if (n) { + x(e, n); + A(n); + } + this._replaceWith(e); + this.type = e.type; + this.setScope(); + this.requeue(); + return [ t ? this.get(t) : this ]; + }; + n._replaceWith = function(e) { + var t; + if (!this.container) throw new ReferenceError("Container is falsy"); + this.inList ? I(this.parent, this.key, [ e ]) : I(this.parent, this.key, e); + this.debug(`Replace with ${null == e ? void 0 : e.type}`); + null == (t = a.path.get(this.parent)) || t.set(e, this).delete(this.node); + this.node = this.container[this.key] = e; + }; + n.replaceExpressionWithStatements = function(e) { + this.resync(); + const t = C(e, this.scope); + if (t) return this.replaceWith(t)[0].get("expressions"); + const n = this.getFunctionParent(); + const r = null == n ? void 0 : n.is("async"); + const s = null == n ? void 0 : n.is("generator"); + const a = u([], f(e)); + this.replaceWith(m(a, [])); + const o = this.get("callee"); + (0, c.default)(o.get("body"), e => { + this.scope.push({ + id: e + }); + }, "var"); + const l = this.get("callee").getCompletionRecords(); + for (const e of l) { + if (!e.isExpressionStatement()) continue; + const t = e.findParent(e => e.isLoop()); + if (t) { + let n = t.getData("expressionReplacementReturnUid"); + if (n) n = T(n.name); else { + n = o.scope.generateDeclaredUidIdentifier("ret"); + o.get("body").pushContainer("body", w(y(n))); + t.setData("expressionReplacementReturnUid", n); + } + e.get("expression").replaceWith(d("=", y(n), e.node.expression)); + } else e.replaceWith(w(e.node.expression)); + } + o.arrowFunctionToExpression(); + const g = o; + const b = r && i.default.hasType(this.get("callee.body").node, "AwaitExpression", p); + const S = s && i.default.hasType(this.get("callee.body").node, "YieldExpression", p); + if (b) { + g.set("async", !0); + S || this.replaceWith(h(this.node)); + } + if (S) { + g.set("generator", !0); + this.replaceWith(O(this.node, !0)); + } + return g.get("body.body"); + }; + n.replaceInline = function(e) { + this.resync(); + if (Array.isArray(e)) { + if (Array.isArray(this.container)) { + e = this._verifyNodeList(e); + const t = this._containerInsertAfter(e); + this.remove(); + return t; + } + return this.replaceWithMultiple(e); + } + return this.replaceWith(e); + }; + r = e("@babel/code-frame"); + i = e("../index"); + s = e("./index"); + a = e("../cache"); + o = e("@babel/parser"); + l = e("@babel/types"); + c = e("@babel/helper-hoist-variables"); + const {FUNCTION_TYPES: p, arrowFunctionExpression: u, assignmentExpression: d, awaitExpression: h, blockStatement: f, callExpression: m, cloneNode: y, expressionStatement: g, identifier: T, inheritLeadingComments: b, inheritTrailingComments: S, inheritsComments: x, isExpression: E, isProgram: P, isStatement: v, removeComments: A, returnStatement: w, toSequenceExpression: C, validate: I, yieldExpression: O} = l; + }, { + "../cache": 39, + "../index": 42, + "./index": 49, + "@babel/code-frame": 2, + "@babel/helper-hoist-variables": 24, + "@babel/parser": 30, + "@babel/types": 108 + } ], + 60: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + n.default = class { + constructor({identifier: e, scope: t, path: n, kind: r}) { + this.identifier = void 0; + this.scope = void 0; + this.path = void 0; + this.kind = void 0; + this.constantViolations = []; + this.constant = !0; + this.referencePaths = []; + this.referenced = !1; + this.references = 0; + this.identifier = e; + this.scope = t; + this.path = n; + this.kind = r; + this.clearValue(); + } + deoptValue() { + this.clearValue(); + this.hasDeoptedValue = !0; + } + setValue(e) { + if (!this.hasDeoptedValue) { + this.hasValue = !0; + this.value = e; + } + } + clearValue() { + this.hasDeoptedValue = !1; + this.hasValue = !1; + this.value = null; + } + reassign(e) { + this.constant = !1; + -1 === this.constantViolations.indexOf(e) && this.constantViolations.push(e); + } + reference(e) { + if (-1 === this.referencePaths.indexOf(e)) { + this.referenced = !0; + this.references++; + this.referencePaths.push(e); + } + } + dereference() { + this.references--; + this.referenced = !!this.references; + } + }; + }, {} ], + 61: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o, l; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("./lib/renamer"); + i = e("../index"); + s = e("./binding"); + a = e("globals"); + o = e("@babel/types"); + l = e("../cache"); + const {NOT_LOCAL_BINDING: c, callExpression: p, cloneNode: u, getBindingIdentifiers: d, identifier: h, isArrayExpression: f, isBinary: m, isClass: y, isClassBody: g, isClassDeclaration: T, isExportAllDeclaration: b, isExportDefaultDeclaration: S, isExportNamedDeclaration: x, isFunctionDeclaration: E, isIdentifier: P, isImportDeclaration: v, isLiteral: A, isMethod: w, isModuleDeclaration: C, isModuleSpecifier: I, isObjectExpression: O, isProperty: N, isPureish: k, isSuper: D, isTaggedTemplateExpression: M, isTemplateLiteral: _, isThisExpression: L, isUnaryExpression: j, isVariableDeclaration: F, matchesPattern: B, memberExpression: R, numericLiteral: U, toIdentifier: V, unaryExpression: K, variableDeclaration: W, variableDeclarator: q} = o; + const Y = { + ForStatement(e) { + const t = e.get("init"); + if (t.isVar()) { + const {scope: n} = e; + (n.getFunctionParent() || n.getProgramParent()).registerBinding("var", t); + } + }, + Declaration(e) { + if (e.isBlockScoped()) return; + if (e.isImportDeclaration()) return; + if (e.isExportDeclaration()) return; + (e.scope.getFunctionParent() || e.scope.getProgramParent()).registerDeclaration(e); + }, + ImportDeclaration(e) { + e.scope.getBlockParent().registerDeclaration(e); + }, + ReferencedIdentifier(e, t) { + t.references.push(e); + }, + ForXStatement(e, t) { + const n = e.get("left"); + if (n.isPattern() || n.isIdentifier()) t.constantViolations.push(e); else if (n.isVar()) { + const {scope: t} = e; + (t.getFunctionParent() || t.getProgramParent()).registerBinding("var", n); + } + }, + ExportDeclaration: { + exit(e) { + const {node: t, scope: n} = e; + if (b(t)) return; + const r = t.declaration; + if (T(r) || E(r)) { + const t = r.id; + if (!t) return; + const i = n.getBinding(t.name); + null == i || i.reference(e); + } else if (F(r)) for (const t of r.declarations) for (const r of Object.keys(d(t))) { + const t = n.getBinding(r); + null == t || t.reference(e); + } + } + }, + LabeledStatement(e) { + e.scope.getBlockParent().registerDeclaration(e); + }, + AssignmentExpression(e, t) { + t.assignments.push(e); + }, + UpdateExpression(e, t) { + t.constantViolations.push(e); + }, + UnaryExpression(e, t) { + "delete" === e.node.operator && t.constantViolations.push(e); + }, + BlockScoped(e) { + let t = e.scope; + t.path === e && (t = t.parent); + t.getBlockParent().registerDeclaration(e); + if (e.isClassDeclaration() && e.node.id) { + const t = e.node.id.name; + e.scope.bindings[t] = e.scope.parent.getBinding(t); + } + }, + CatchClause(e) { + e.scope.registerBinding("let", e); + }, + Function(e) { + e.isFunctionExpression() && e.has("id") && !e.get("id").node[c] && e.scope.registerBinding("local", e.get("id"), e); + const t = e.get("params"); + for (const n of t) e.scope.registerBinding("param", n); + }, + ClassExpression(e) { + e.has("id") && !e.get("id").node[c] && e.scope.registerBinding("local", e); + } + }; + let J = 0; + class X { + constructor(e) { + this.uid = void 0; + this.path = void 0; + this.block = void 0; + this.labels = void 0; + this.inited = void 0; + this.bindings = void 0; + this.references = void 0; + this.globals = void 0; + this.uids = void 0; + this.data = void 0; + this.crawling = void 0; + const {node: t} = e; + const n = l.scope.get(t); + if ((null == n ? void 0 : n.path) === e) return n; + l.scope.set(t, this); + this.uid = J++; + this.block = t; + this.path = e; + this.labels = new Map(); + this.inited = !1; + } + get parent() { + var e; + let t, n = this.path; + do { + const e = "key" === n.key; + n = n.parentPath; + e && n.isMethod() && (n = n.parentPath); + n && n.isScope() && (t = n); + } while (n && !t); + return null == (e = t) ? void 0 : e.scope; + } + get parentBlock() { + return this.path.parent; + } + get hub() { + return this.path.hub; + } + traverse(e, t, n) { + (0, i.default)(e, t, this, n, this.path); + } + generateDeclaredUidIdentifier(e) { + const t = this.generateUidIdentifier(e); + this.push({ + id: t + }); + return u(t); + } + generateUidIdentifier(e) { + return h(this.generateUid(e)); + } + generateUid(e = "temp") { + e = V(e).replace(/^_+/, "").replace(/[0-9]+$/g, ""); + let t; + let n = 1; + do { + t = this._generateUid(e, n); + n++; + } while (this.hasLabel(t) || this.hasBinding(t) || this.hasGlobal(t) || this.hasReference(t)); + const r = this.getProgramParent(); + r.references[t] = !0; + r.uids[t] = !0; + return t; + } + _generateUid(e, t) { + let n = e; + t > 1 && (n += t); + return `_${n}`; + } + generateUidBasedOnNode(e, t) { + const n = []; + !function e(t, n) { + switch (null == t ? void 0 : t.type) { + default: + if (C(t)) if ((b(t) || x(t) || v(t)) && t.source) e(t.source, n); else if ((x(t) || v(t)) && t.specifiers && t.specifiers.length) for (const r of t.specifiers) e(r, n); else (S(t) || x(t)) && t.declaration && e(t.declaration, n); else I(t) ? e(t.local, n) : A(t) && n.push(t.value); + break; + + case "MemberExpression": + case "OptionalMemberExpression": + case "JSXMemberExpression": + e(t.object, n); + e(t.property, n); + break; + + case "Identifier": + case "JSXIdentifier": + n.push(t.name); + break; + + case "CallExpression": + case "OptionalCallExpression": + case "NewExpression": + e(t.callee, n); + break; + + case "ObjectExpression": + case "ObjectPattern": + for (const r of t.properties) e(r, n); + break; + + case "SpreadElement": + case "RestElement": + e(t.argument, n); + break; + + case "ObjectProperty": + case "ObjectMethod": + case "ClassProperty": + case "ClassMethod": + case "ClassPrivateProperty": + case "ClassPrivateMethod": + e(t.key, n); + break; + + case "ThisExpression": + n.push("this"); + break; + + case "Super": + n.push("super"); + break; + + case "Import": + n.push("import"); + break; + + case "DoExpression": + n.push("do"); + break; + + case "YieldExpression": + n.push("yield"); + e(t.argument, n); + break; + + case "AwaitExpression": + n.push("await"); + e(t.argument, n); + break; + + case "AssignmentExpression": + e(t.left, n); + break; + + case "VariableDeclarator": + e(t.id, n); + break; + + case "FunctionExpression": + case "FunctionDeclaration": + case "ClassExpression": + case "ClassDeclaration": + case "PrivateName": + e(t.id, n); + break; + + case "ParenthesizedExpression": + e(t.expression, n); + break; + + case "UnaryExpression": + case "UpdateExpression": + e(t.argument, n); + break; + + case "MetaProperty": + e(t.meta, n); + e(t.property, n); + break; + + case "JSXElement": + e(t.openingElement, n); + break; + + case "JSXOpeningElement": + n.push(t.name); + break; + + case "JSXFragment": + e(t.openingFragment, n); + break; + + case "JSXOpeningFragment": + n.push("Fragment"); + break; + + case "JSXNamespacedName": + e(t.namespace, n); + e(t.name, n); + } + }(e, n); + let r = n.join("$"); + r = r.replace(/^_/, "") || t || "ref"; + return this.generateUid(r.slice(0, 20)); + } + generateUidIdentifierBasedOnNode(e, t) { + return h(this.generateUidBasedOnNode(e, t)); + } + isStatic(e) { + if (L(e) || D(e)) return !0; + if (P(e)) { + const t = this.getBinding(e.name); + return t ? t.constant : this.hasBinding(e.name); + } + return !1; + } + maybeGenerateMemoised(e, t) { + if (this.isStatic(e)) return null; + { + const n = this.generateUidIdentifierBasedOnNode(e); + if (!t) { + this.push({ + id: n + }); + return u(n); + } + return n; + } + } + checkBlockScopedCollisions(e, t, n, r) { + if ("param" === t) return; + if ("local" === e.kind) return; + if ("let" === t || "let" === e.kind || "const" === e.kind || "module" === e.kind || "param" === e.kind && ("let" === t || "const" === t)) throw this.hub.buildError(r, `Duplicate declaration "${n}"`, TypeError); + } + rename(e, t, n) { + const i = this.getBinding(e); + if (i) { + t = t || this.generateUidIdentifier(e).name; + return new r.default(i, e, t).rename(n); + } + } + _renameFromMap(e, t, n, r) { + if (e[t]) { + e[n] = r; + e[t] = null; + } + } + dump() { + const e = "-".repeat(60); + console.log(e); + let t = this; + do { + console.log("#", t.block.type); + for (const e of Object.keys(t.bindings)) { + const n = t.bindings[e]; + console.log(" -", e, { + constant: n.constant, + references: n.references, + violations: n.constantViolations.length, + kind: n.kind + }); + } + } while (t = t.parent); + console.log(e); + } + toArray(e, t, n) { + if (P(e)) { + const t = this.getBinding(e.name); + if (null != t && t.constant && t.path.isGenericType("Array")) return e; + } + if (f(e)) return e; + if (P(e, { + name: "arguments" + })) return p(R(R(R(h("Array"), h("prototype")), h("slice")), h("call")), [ e ]); + let r; + const i = [ e ]; + if (!0 === t) r = "toConsumableArray"; else if (t) { + i.push(U(t)); + r = "slicedToArray"; + } else r = "toArray"; + if (n) { + i.unshift(this.hub.addHelper(r)); + r = "maybeArrayLike"; + } + return p(this.hub.addHelper(r), i); + } + hasLabel(e) { + return !!this.getLabel(e); + } + getLabel(e) { + return this.labels.get(e); + } + registerLabel(e) { + this.labels.set(e.node.label.name, e); + } + registerDeclaration(e) { + if (e.isLabeledStatement()) this.registerLabel(e); else if (e.isFunctionDeclaration()) this.registerBinding("hoisted", e.get("id"), e); else if (e.isVariableDeclaration()) { + const t = e.get("declarations"); + for (const n of t) this.registerBinding(e.node.kind, n); + } else if (e.isClassDeclaration()) this.registerBinding("let", e); else if (e.isImportDeclaration()) { + const t = e.get("specifiers"); + for (const e of t) this.registerBinding("module", e); + } else if (e.isExportDeclaration()) { + const t = e.get("declaration"); + (t.isClassDeclaration() || t.isFunctionDeclaration() || t.isVariableDeclaration()) && this.registerDeclaration(t); + } else this.registerBinding("unknown", e); + } + buildUndefinedNode() { + return K("void", U(0), !0); + } + registerConstantViolation(e) { + const t = e.getBindingIdentifiers(); + for (const n of Object.keys(t)) { + const t = this.getBinding(n); + t && t.reassign(e); + } + } + registerBinding(e, t, n = t) { + if (!e) throw new ReferenceError("no `kind`"); + if (t.isVariableDeclaration()) { + const n = t.get("declarations"); + for (const t of n) this.registerBinding(e, t); + return; + } + const r = this.getProgramParent(); + const i = t.getOuterBindingIdentifiers(!0); + for (const t of Object.keys(i)) { + r.references[t] = !0; + for (const r of i[t]) { + const i = this.getOwnBinding(t); + if (i) { + if (i.identifier === r) continue; + this.checkBlockScopedCollisions(i, e, t, r); + } + i ? this.registerConstantViolation(n) : this.bindings[t] = new s.default({ + identifier: r, + scope: this, + path: n, + kind: e + }); + } + } + } + addGlobal(e) { + this.globals[e.name] = e; + } + hasUid(e) { + let t = this; + do { + if (t.uids[e]) return !0; + } while (t = t.parent); + return !1; + } + hasGlobal(e) { + let t = this; + do { + if (t.globals[e]) return !0; + } while (t = t.parent); + return !1; + } + hasReference(e) { + return !!this.getProgramParent().references[e]; + } + isPure(e, t) { + if (P(e)) { + const n = this.getBinding(e.name); + return !!n && (!t || n.constant); + } + if (y(e)) return !(e.superClass && !this.isPure(e.superClass, t)) && this.isPure(e.body, t); + if (g(e)) { + for (const n of e.body) if (!this.isPure(n, t)) return !1; + return !0; + } + if (m(e)) return this.isPure(e.left, t) && this.isPure(e.right, t); + if (f(e)) { + for (const n of e.elements) if (!this.isPure(n, t)) return !1; + return !0; + } + if (O(e)) { + for (const n of e.properties) if (!this.isPure(n, t)) return !1; + return !0; + } + if (w(e)) return !(e.computed && !this.isPure(e.key, t)) && ("get" !== e.kind && "set" !== e.kind); + if (N(e)) return !(e.computed && !this.isPure(e.key, t)) && this.isPure(e.value, t); + if (j(e)) return this.isPure(e.argument, t); + if (M(e)) return B(e.tag, "String.raw") && !this.hasBinding("String", !0) && this.isPure(e.quasi, t); + if (_(e)) { + for (const n of e.expressions) if (!this.isPure(n, t)) return !1; + return !0; + } + return k(e); + } + setData(e, t) { + return this.data[e] = t; + } + getData(e) { + let t = this; + do { + const n = t.data[e]; + if (null != n) return n; + } while (t = t.parent); + } + removeData(e) { + let t = this; + do { + null != t.data[e] && (t.data[e] = null); + } while (t = t.parent); + } + init() { + if (!this.inited) { + this.inited = !0; + this.crawl(); + } + } + crawl() { + const e = this.path; + this.references = Object.create(null); + this.bindings = Object.create(null); + this.globals = Object.create(null); + this.uids = Object.create(null); + this.data = Object.create(null); + const t = this.getProgramParent(); + if (t.crawling) return; + const n = { + references: [], + constantViolations: [], + assignments: [] + }; + this.crawling = !0; + if ("Program" !== e.type && Y._exploded) { + for (const t of Y.enter) t(e, n); + const t = Y[e.type]; + if (t) for (const r of t.enter) r(e, n); + } + e.traverse(Y, n); + this.crawling = !1; + for (const e of n.assignments) { + const n = e.getBindingIdentifiers(); + for (const r of Object.keys(n)) e.scope.getBinding(r) || t.addGlobal(n[r]); + e.scope.registerConstantViolation(e); + } + for (const e of n.references) { + const n = e.scope.getBinding(e.node.name); + n ? n.reference(e) : t.addGlobal(e.node); + } + for (const e of n.constantViolations) e.scope.registerConstantViolation(e); + } + push(e) { + let t = this.path; + t.isBlockStatement() || t.isProgram() || (t = this.getBlockParent().path); + t.isSwitchStatement() && (t = (this.getFunctionParent() || this.getProgramParent()).path); + if (t.isLoop() || t.isCatchClause() || t.isFunction()) { + t.ensureBlock(); + t = t.get("body"); + } + const n = e.unique; + const r = e.kind || "var"; + const i = null == e._blockHoist ? 2 : e._blockHoist; + const s = `declaration:${r}:${i}`; + let a = !n && t.getData(s); + if (!a) { + const e = W(r, []); + e._blockHoist = i; + [a] = t.unshiftContainer("body", [ e ]); + n || t.setData(s, a); + } + const o = q(e.id, e.init); + a.node.declarations.push(o); + this.registerBinding(r, a.get("declarations").pop()); + } + getProgramParent() { + let e = this; + do { + if (e.path.isProgram()) return e; + } while (e = e.parent); + throw new Error("Couldn't find a Program"); + } + getFunctionParent() { + let e = this; + do { + if (e.path.isFunctionParent()) return e; + } while (e = e.parent); + return null; + } + getBlockParent() { + let e = this; + do { + if (e.path.isBlockParent()) return e; + } while (e = e.parent); + throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); + } + getAllBindings() { + const e = Object.create(null); + let t = this; + do { + for (const n of Object.keys(t.bindings)) n in e == !1 && (e[n] = t.bindings[n]); + t = t.parent; + } while (t); + return e; + } + getAllBindingsOfKind(...e) { + const t = Object.create(null); + for (const n of e) { + let e = this; + do { + for (const r of Object.keys(e.bindings)) { + const i = e.bindings[r]; + i.kind === n && (t[r] = i); + } + e = e.parent; + } while (e); + } + return t; + } + bindingIdentifierEquals(e, t) { + return this.getBindingIdentifier(e) === t; + } + getBinding(e) { + let t = this; + let n; + do { + const i = t.getOwnBinding(e); + if (i) { + var r; + if (null == (r = n) || !r.isPattern() || "param" === i.kind) return i; + } + n = t.path; + } while (t = t.parent); + } + getOwnBinding(e) { + return this.bindings[e]; + } + getBindingIdentifier(e) { + var t; + return null == (t = this.getBinding(e)) ? void 0 : t.identifier; + } + getOwnBindingIdentifier(e) { + const t = this.bindings[e]; + return null == t ? void 0 : t.identifier; + } + hasOwnBinding(e) { + return !!this.getOwnBinding(e); + } + hasBinding(e, t) { + return !!e && (!!this.hasOwnBinding(e) || (!!this.parentHasBinding(e, t) || (!!this.hasUid(e) || (!(t || !X.globals.includes(e)) || !(t || !X.contextVariables.includes(e)))))); + } + parentHasBinding(e, t) { + var n; + return null == (n = this.parent) ? void 0 : n.hasBinding(e, t); + } + moveBindingTo(e, t) { + const n = this.getBinding(e); + if (n) { + n.scope.removeOwnBinding(e); + n.scope = t; + t.bindings[e] = n; + } + } + removeOwnBinding(e) { + delete this.bindings[e]; + } + removeBinding(e) { + var t; + null == (t = this.getBinding(e)) || t.scope.removeOwnBinding(e); + let n = this; + do { + n.uids[e] && (n.uids[e] = !1); + } while (n = n.parent); + } + } + n.default = X; + X.globals = Object.keys(a.builtin); + X.contextVariables = [ "arguments", "undefined", "Infinity", "NaN" ]; + }, { + "../cache": 39, + "../index": 42, + "./binding": 60, + "./lib/renamer": 62, + "@babel/types": 108, + globals: 155 + } ], + 62: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + e("../binding"); + r = e("@babel/helper-split-export-declaration"); + i = e("@babel/types"); + const {VISITOR_KEYS: s, assignmentExpression: a, identifier: o, toExpression: l, variableDeclaration: c, variableDeclarator: p} = i; + const u = { + ReferencedIdentifier({node: e}, t) { + e.name === t.oldName && (e.name = t.newName); + }, + Scope(e, t) { + e.scope.bindingIdentifierEquals(t.oldName, t.binding.identifier) || function(e) { + if (!e.isMethod() || !e.node.computed) { + e.skip(); + return; + } + const t = s[e.type]; + for (const n of t) "key" !== n && e.skipKey(n); + }(e); + }, + "AssignmentExpression|Declaration|VariableDeclarator"(e, t) { + if (e.isVariableDeclaration()) return; + const n = e.getOuterBindingIdentifiers(); + for (const e in n) e === t.oldName && (n[e].name = t.newName); + } + }; + n.default = class { + constructor(e, t, n) { + this.newName = n; + this.oldName = t; + this.binding = e; + } + maybeConvertFromExportDeclaration(e) { + const t = e.parentPath; + t.isExportDeclaration() && (t.isExportDefaultDeclaration() && !t.get("declaration").node.id || (0, + r.default)(t)); + } + maybeConvertFromClassFunctionDeclaration(e) {} + maybeConvertFromClassFunctionExpression(e) {} + rename(e) { + const {binding: t, oldName: n, newName: r} = this; + const {scope: i, path: s} = t; + const a = s.find(e => e.isDeclaration() || e.isFunctionExpression() || e.isClassExpression()); + a && a.getOuterBindingIdentifiers()[n] === t.identifier && this.maybeConvertFromExportDeclaration(a); + const o = e || i.block; + "SwitchStatement" === (null == o ? void 0 : o.type) ? o.cases.forEach(e => { + i.traverse(e, u, this); + }) : i.traverse(o, u, this); + if (!e) { + i.removeOwnBinding(n); + i.bindings[r] = t; + this.binding.identifier.name = r; + } + if (a) { + this.maybeConvertFromClassFunctionDeclaration(a); + this.maybeConvertFromClassFunctionExpression(a); + } + } + }; + }, { + "../binding": 60, + "@babel/helper-split-export-declaration": 25, + "@babel/types": 108 + } ], + 63: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.explode = l; + n.verify = c; + n.merge = function(e, t = [], n) { + const r = {}; + for (let i = 0; i < e.length; i++) { + const s = e[i]; + const a = t[i]; + l(s); + for (const e of Object.keys(s)) { + let t = s[e]; + (a || n) && (t = u(t, a, n)); + const i = r[e] = r[e] || {}; + m(i, t); + } + } + return r; + }; + r = e("./path/lib/virtual-types"); + i = e("@babel/types"); + const {DEPRECATED_KEYS: s, FLIPPED_ALIAS_KEYS: a, TYPES: o} = i; + function l(e) { + if (e._exploded) return e; + e._exploded = !0; + for (const t of Object.keys(e)) { + if (f(t)) continue; + const n = t.split("|"); + if (1 === n.length) continue; + const r = e[t]; + delete e[t]; + for (const t of n) e[t] = r; + } + c(e); + delete e.__esModule; + !function(e) { + for (const t of Object.keys(e)) { + if (f(t)) continue; + const n = e[t]; + "function" == typeof n && (e[t] = { + enter: n + }); + } + }(e); + d(e); + for (const t of Object.keys(e)) { + if (f(t)) continue; + const n = r[t]; + if (!n) continue; + const i = e[t]; + for (const e of Object.keys(i)) i[e] = h(n, i[e]); + delete e[t]; + if (n.types) for (const t of n.types) e[t] ? m(e[t], i) : e[t] = i; else m(e, i); + } + for (const t of Object.keys(e)) { + if (f(t)) continue; + const n = e[t]; + let r = a[t]; + const i = s[t]; + if (i) { + console.trace(`Visitor defined for ${t} but it has been renamed to ${i}`); + r = [ i ]; + } + if (r) { + delete e[t]; + for (const t of r) { + const r = e[t]; + r ? m(r, n) : e[t] = Object.assign({}, n); + } + } + } + for (const t of Object.keys(e)) f(t) || d(e[t]); + return e; + } + function c(e) { + if (!e._verified) { + if ("function" == typeof e) throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?"); + for (const t of Object.keys(e)) { + "enter" !== t && "exit" !== t || p(t, e[t]); + if (f(t)) continue; + if (o.indexOf(t) < 0) throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type`); + const n = e[t]; + if ("object" == typeof n) for (const e of Object.keys(n)) { + if ("enter" !== e && "exit" !== e) throw new Error("You passed `traverse()` a visitor object with the property " + `${t} that has the invalid property ${e}`); + p(`${t}.${e}`, n[e]); + } + } + e._verified = !0; + } + } + function p(e, t) { + const n = [].concat(t); + for (const t of n) if ("function" != typeof t) throw new TypeError(`Non-function found defined in ${e} with type ${typeof t}`); + } + function u(e, t, n) { + const r = {}; + for (const i of Object.keys(e)) { + let s = e[i]; + if (Array.isArray(s)) { + s = s.map(function(e) { + let r = e; + t && (r = function(n) { + return e.call(t, n, t); + }); + n && (r = n(t.key, i, r)); + r !== e && (r.toString = (() => e.toString())); + return r; + }); + r[i] = s; + } + } + return r; + } + function d(e) { + e.enter && !Array.isArray(e.enter) && (e.enter = [ e.enter ]); + e.exit && !Array.isArray(e.exit) && (e.exit = [ e.exit ]); + } + function h(e, t) { + const n = function(n) { + if (e.checkPath(n)) return t.apply(this, arguments); + }; + n.toString = (() => t.toString()); + return n; + } + function f(e) { + return "_" === e[0] || ("enter" === e || "exit" === e || "shouldSkip" === e || ("denylist" === e || "noScope" === e || "skipKeys" === e || "blacklist" === e)); + } + function m(e, t) { + for (const n of Object.keys(t)) e[n] = [].concat(e[n] || [], t[n]); + } + }, { + "./path/lib/virtual-types": 56, + "@babel/types": 108 + } ], + 64: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + if (!(0, r.default)(e)) { + var t; + const n = null != (t = null == e ? void 0 : e.type) ? t : JSON.stringify(e); + throw new TypeError(`Not a valid node of type "${n}"`); + } + }; + var r = e("../validators/isNode"); + }, { + "../validators/isNode": 130 + } ], + 65: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.assertArrayExpression = function(e, t) { + i("ArrayExpression", e, t); + }; + n.assertAssignmentExpression = function(e, t) { + i("AssignmentExpression", e, t); + }; + n.assertBinaryExpression = function(e, t) { + i("BinaryExpression", e, t); + }; + n.assertInterpreterDirective = function(e, t) { + i("InterpreterDirective", e, t); + }; + n.assertDirective = function(e, t) { + i("Directive", e, t); + }; + n.assertDirectiveLiteral = function(e, t) { + i("DirectiveLiteral", e, t); + }; + n.assertBlockStatement = function(e, t) { + i("BlockStatement", e, t); + }; + n.assertBreakStatement = function(e, t) { + i("BreakStatement", e, t); + }; + n.assertCallExpression = function(e, t) { + i("CallExpression", e, t); + }; + n.assertCatchClause = function(e, t) { + i("CatchClause", e, t); + }; + n.assertConditionalExpression = function(e, t) { + i("ConditionalExpression", e, t); + }; + n.assertContinueStatement = function(e, t) { + i("ContinueStatement", e, t); + }; + n.assertDebuggerStatement = function(e, t) { + i("DebuggerStatement", e, t); + }; + n.assertDoWhileStatement = function(e, t) { + i("DoWhileStatement", e, t); + }; + n.assertEmptyStatement = function(e, t) { + i("EmptyStatement", e, t); + }; + n.assertExpressionStatement = function(e, t) { + i("ExpressionStatement", e, t); + }; + n.assertFile = function(e, t) { + i("File", e, t); + }; + n.assertForInStatement = function(e, t) { + i("ForInStatement", e, t); + }; + n.assertForStatement = function(e, t) { + i("ForStatement", e, t); + }; + n.assertFunctionDeclaration = function(e, t) { + i("FunctionDeclaration", e, t); + }; + n.assertFunctionExpression = function(e, t) { + i("FunctionExpression", e, t); + }; + n.assertIdentifier = function(e, t) { + i("Identifier", e, t); + }; + n.assertIfStatement = function(e, t) { + i("IfStatement", e, t); + }; + n.assertLabeledStatement = function(e, t) { + i("LabeledStatement", e, t); + }; + n.assertStringLiteral = function(e, t) { + i("StringLiteral", e, t); + }; + n.assertNumericLiteral = function(e, t) { + i("NumericLiteral", e, t); + }; + n.assertNullLiteral = function(e, t) { + i("NullLiteral", e, t); + }; + n.assertBooleanLiteral = function(e, t) { + i("BooleanLiteral", e, t); + }; + n.assertRegExpLiteral = function(e, t) { + i("RegExpLiteral", e, t); + }; + n.assertLogicalExpression = function(e, t) { + i("LogicalExpression", e, t); + }; + n.assertMemberExpression = function(e, t) { + i("MemberExpression", e, t); + }; + n.assertNewExpression = function(e, t) { + i("NewExpression", e, t); + }; + n.assertProgram = function(e, t) { + i("Program", e, t); + }; + n.assertObjectExpression = function(e, t) { + i("ObjectExpression", e, t); + }; + n.assertObjectMethod = function(e, t) { + i("ObjectMethod", e, t); + }; + n.assertObjectProperty = function(e, t) { + i("ObjectProperty", e, t); + }; + n.assertRestElement = function(e, t) { + i("RestElement", e, t); + }; + n.assertReturnStatement = function(e, t) { + i("ReturnStatement", e, t); + }; + n.assertSequenceExpression = function(e, t) { + i("SequenceExpression", e, t); + }; + n.assertParenthesizedExpression = function(e, t) { + i("ParenthesizedExpression", e, t); + }; + n.assertSwitchCase = function(e, t) { + i("SwitchCase", e, t); + }; + n.assertSwitchStatement = function(e, t) { + i("SwitchStatement", e, t); + }; + n.assertThisExpression = function(e, t) { + i("ThisExpression", e, t); + }; + n.assertThrowStatement = function(e, t) { + i("ThrowStatement", e, t); + }; + n.assertTryStatement = function(e, t) { + i("TryStatement", e, t); + }; + n.assertUnaryExpression = function(e, t) { + i("UnaryExpression", e, t); + }; + n.assertUpdateExpression = function(e, t) { + i("UpdateExpression", e, t); + }; + n.assertVariableDeclaration = function(e, t) { + i("VariableDeclaration", e, t); + }; + n.assertVariableDeclarator = function(e, t) { + i("VariableDeclarator", e, t); + }; + n.assertWhileStatement = function(e, t) { + i("WhileStatement", e, t); + }; + n.assertWithStatement = function(e, t) { + i("WithStatement", e, t); + }; + n.assertAssignmentPattern = function(e, t) { + i("AssignmentPattern", e, t); + }; + n.assertArrayPattern = function(e, t) { + i("ArrayPattern", e, t); + }; + n.assertArrowFunctionExpression = function(e, t) { + i("ArrowFunctionExpression", e, t); + }; + n.assertClassBody = function(e, t) { + i("ClassBody", e, t); + }; + n.assertClassExpression = function(e, t) { + i("ClassExpression", e, t); + }; + n.assertClassDeclaration = function(e, t) { + i("ClassDeclaration", e, t); + }; + n.assertExportAllDeclaration = function(e, t) { + i("ExportAllDeclaration", e, t); + }; + n.assertExportDefaultDeclaration = function(e, t) { + i("ExportDefaultDeclaration", e, t); + }; + n.assertExportNamedDeclaration = function(e, t) { + i("ExportNamedDeclaration", e, t); + }; + n.assertExportSpecifier = function(e, t) { + i("ExportSpecifier", e, t); + }; + n.assertForOfStatement = function(e, t) { + i("ForOfStatement", e, t); + }; + n.assertImportDeclaration = function(e, t) { + i("ImportDeclaration", e, t); + }; + n.assertImportDefaultSpecifier = function(e, t) { + i("ImportDefaultSpecifier", e, t); + }; + n.assertImportNamespaceSpecifier = function(e, t) { + i("ImportNamespaceSpecifier", e, t); + }; + n.assertImportSpecifier = function(e, t) { + i("ImportSpecifier", e, t); + }; + n.assertMetaProperty = function(e, t) { + i("MetaProperty", e, t); + }; + n.assertClassMethod = function(e, t) { + i("ClassMethod", e, t); + }; + n.assertObjectPattern = function(e, t) { + i("ObjectPattern", e, t); + }; + n.assertSpreadElement = function(e, t) { + i("SpreadElement", e, t); + }; + n.assertSuper = function(e, t) { + i("Super", e, t); + }; + n.assertTaggedTemplateExpression = function(e, t) { + i("TaggedTemplateExpression", e, t); + }; + n.assertTemplateElement = function(e, t) { + i("TemplateElement", e, t); + }; + n.assertTemplateLiteral = function(e, t) { + i("TemplateLiteral", e, t); + }; + n.assertYieldExpression = function(e, t) { + i("YieldExpression", e, t); + }; + n.assertAwaitExpression = function(e, t) { + i("AwaitExpression", e, t); + }; + n.assertImport = function(e, t) { + i("Import", e, t); + }; + n.assertBigIntLiteral = function(e, t) { + i("BigIntLiteral", e, t); + }; + n.assertExportNamespaceSpecifier = function(e, t) { + i("ExportNamespaceSpecifier", e, t); + }; + n.assertOptionalMemberExpression = function(e, t) { + i("OptionalMemberExpression", e, t); + }; + n.assertOptionalCallExpression = function(e, t) { + i("OptionalCallExpression", e, t); + }; + n.assertClassProperty = function(e, t) { + i("ClassProperty", e, t); + }; + n.assertClassPrivateProperty = function(e, t) { + i("ClassPrivateProperty", e, t); + }; + n.assertClassPrivateMethod = function(e, t) { + i("ClassPrivateMethod", e, t); + }; + n.assertPrivateName = function(e, t) { + i("PrivateName", e, t); + }; + n.assertAnyTypeAnnotation = function(e, t) { + i("AnyTypeAnnotation", e, t); + }; + n.assertArrayTypeAnnotation = function(e, t) { + i("ArrayTypeAnnotation", e, t); + }; + n.assertBooleanTypeAnnotation = function(e, t) { + i("BooleanTypeAnnotation", e, t); + }; + n.assertBooleanLiteralTypeAnnotation = function(e, t) { + i("BooleanLiteralTypeAnnotation", e, t); + }; + n.assertNullLiteralTypeAnnotation = function(e, t) { + i("NullLiteralTypeAnnotation", e, t); + }; + n.assertClassImplements = function(e, t) { + i("ClassImplements", e, t); + }; + n.assertDeclareClass = function(e, t) { + i("DeclareClass", e, t); + }; + n.assertDeclareFunction = function(e, t) { + i("DeclareFunction", e, t); + }; + n.assertDeclareInterface = function(e, t) { + i("DeclareInterface", e, t); + }; + n.assertDeclareModule = function(e, t) { + i("DeclareModule", e, t); + }; + n.assertDeclareModuleExports = function(e, t) { + i("DeclareModuleExports", e, t); + }; + n.assertDeclareTypeAlias = function(e, t) { + i("DeclareTypeAlias", e, t); + }; + n.assertDeclareOpaqueType = function(e, t) { + i("DeclareOpaqueType", e, t); + }; + n.assertDeclareVariable = function(e, t) { + i("DeclareVariable", e, t); + }; + n.assertDeclareExportDeclaration = function(e, t) { + i("DeclareExportDeclaration", e, t); + }; + n.assertDeclareExportAllDeclaration = function(e, t) { + i("DeclareExportAllDeclaration", e, t); + }; + n.assertDeclaredPredicate = function(e, t) { + i("DeclaredPredicate", e, t); + }; + n.assertExistsTypeAnnotation = function(e, t) { + i("ExistsTypeAnnotation", e, t); + }; + n.assertFunctionTypeAnnotation = function(e, t) { + i("FunctionTypeAnnotation", e, t); + }; + n.assertFunctionTypeParam = function(e, t) { + i("FunctionTypeParam", e, t); + }; + n.assertGenericTypeAnnotation = function(e, t) { + i("GenericTypeAnnotation", e, t); + }; + n.assertInferredPredicate = function(e, t) { + i("InferredPredicate", e, t); + }; + n.assertInterfaceExtends = function(e, t) { + i("InterfaceExtends", e, t); + }; + n.assertInterfaceDeclaration = function(e, t) { + i("InterfaceDeclaration", e, t); + }; + n.assertInterfaceTypeAnnotation = function(e, t) { + i("InterfaceTypeAnnotation", e, t); + }; + n.assertIntersectionTypeAnnotation = function(e, t) { + i("IntersectionTypeAnnotation", e, t); + }; + n.assertMixedTypeAnnotation = function(e, t) { + i("MixedTypeAnnotation", e, t); + }; + n.assertEmptyTypeAnnotation = function(e, t) { + i("EmptyTypeAnnotation", e, t); + }; + n.assertNullableTypeAnnotation = function(e, t) { + i("NullableTypeAnnotation", e, t); + }; + n.assertNumberLiteralTypeAnnotation = function(e, t) { + i("NumberLiteralTypeAnnotation", e, t); + }; + n.assertNumberTypeAnnotation = function(e, t) { + i("NumberTypeAnnotation", e, t); + }; + n.assertObjectTypeAnnotation = function(e, t) { + i("ObjectTypeAnnotation", e, t); + }; + n.assertObjectTypeInternalSlot = function(e, t) { + i("ObjectTypeInternalSlot", e, t); + }; + n.assertObjectTypeCallProperty = function(e, t) { + i("ObjectTypeCallProperty", e, t); + }; + n.assertObjectTypeIndexer = function(e, t) { + i("ObjectTypeIndexer", e, t); + }; + n.assertObjectTypeProperty = function(e, t) { + i("ObjectTypeProperty", e, t); + }; + n.assertObjectTypeSpreadProperty = function(e, t) { + i("ObjectTypeSpreadProperty", e, t); + }; + n.assertOpaqueType = function(e, t) { + i("OpaqueType", e, t); + }; + n.assertQualifiedTypeIdentifier = function(e, t) { + i("QualifiedTypeIdentifier", e, t); + }; + n.assertStringLiteralTypeAnnotation = function(e, t) { + i("StringLiteralTypeAnnotation", e, t); + }; + n.assertStringTypeAnnotation = function(e, t) { + i("StringTypeAnnotation", e, t); + }; + n.assertSymbolTypeAnnotation = function(e, t) { + i("SymbolTypeAnnotation", e, t); + }; + n.assertThisTypeAnnotation = function(e, t) { + i("ThisTypeAnnotation", e, t); + }; + n.assertTupleTypeAnnotation = function(e, t) { + i("TupleTypeAnnotation", e, t); + }; + n.assertTypeofTypeAnnotation = function(e, t) { + i("TypeofTypeAnnotation", e, t); + }; + n.assertTypeAlias = function(e, t) { + i("TypeAlias", e, t); + }; + n.assertTypeAnnotation = function(e, t) { + i("TypeAnnotation", e, t); + }; + n.assertTypeCastExpression = function(e, t) { + i("TypeCastExpression", e, t); + }; + n.assertTypeParameter = function(e, t) { + i("TypeParameter", e, t); + }; + n.assertTypeParameterDeclaration = function(e, t) { + i("TypeParameterDeclaration", e, t); + }; + n.assertTypeParameterInstantiation = function(e, t) { + i("TypeParameterInstantiation", e, t); + }; + n.assertUnionTypeAnnotation = function(e, t) { + i("UnionTypeAnnotation", e, t); + }; + n.assertVariance = function(e, t) { + i("Variance", e, t); + }; + n.assertVoidTypeAnnotation = function(e, t) { + i("VoidTypeAnnotation", e, t); + }; + n.assertEnumDeclaration = function(e, t) { + i("EnumDeclaration", e, t); + }; + n.assertEnumBooleanBody = function(e, t) { + i("EnumBooleanBody", e, t); + }; + n.assertEnumNumberBody = function(e, t) { + i("EnumNumberBody", e, t); + }; + n.assertEnumStringBody = function(e, t) { + i("EnumStringBody", e, t); + }; + n.assertEnumSymbolBody = function(e, t) { + i("EnumSymbolBody", e, t); + }; + n.assertEnumBooleanMember = function(e, t) { + i("EnumBooleanMember", e, t); + }; + n.assertEnumNumberMember = function(e, t) { + i("EnumNumberMember", e, t); + }; + n.assertEnumStringMember = function(e, t) { + i("EnumStringMember", e, t); + }; + n.assertEnumDefaultedMember = function(e, t) { + i("EnumDefaultedMember", e, t); + }; + n.assertIndexedAccessType = function(e, t) { + i("IndexedAccessType", e, t); + }; + n.assertOptionalIndexedAccessType = function(e, t) { + i("OptionalIndexedAccessType", e, t); + }; + n.assertJSXAttribute = function(e, t) { + i("JSXAttribute", e, t); + }; + n.assertJSXClosingElement = function(e, t) { + i("JSXClosingElement", e, t); + }; + n.assertJSXElement = function(e, t) { + i("JSXElement", e, t); + }; + n.assertJSXEmptyExpression = function(e, t) { + i("JSXEmptyExpression", e, t); + }; + n.assertJSXExpressionContainer = function(e, t) { + i("JSXExpressionContainer", e, t); + }; + n.assertJSXSpreadChild = function(e, t) { + i("JSXSpreadChild", e, t); + }; + n.assertJSXIdentifier = function(e, t) { + i("JSXIdentifier", e, t); + }; + n.assertJSXMemberExpression = function(e, t) { + i("JSXMemberExpression", e, t); + }; + n.assertJSXNamespacedName = function(e, t) { + i("JSXNamespacedName", e, t); + }; + n.assertJSXOpeningElement = function(e, t) { + i("JSXOpeningElement", e, t); + }; + n.assertJSXSpreadAttribute = function(e, t) { + i("JSXSpreadAttribute", e, t); + }; + n.assertJSXText = function(e, t) { + i("JSXText", e, t); + }; + n.assertJSXFragment = function(e, t) { + i("JSXFragment", e, t); + }; + n.assertJSXOpeningFragment = function(e, t) { + i("JSXOpeningFragment", e, t); + }; + n.assertJSXClosingFragment = function(e, t) { + i("JSXClosingFragment", e, t); + }; + n.assertNoop = function(e, t) { + i("Noop", e, t); + }; + n.assertPlaceholder = function(e, t) { + i("Placeholder", e, t); + }; + n.assertV8IntrinsicIdentifier = function(e, t) { + i("V8IntrinsicIdentifier", e, t); + }; + n.assertArgumentPlaceholder = function(e, t) { + i("ArgumentPlaceholder", e, t); + }; + n.assertBindExpression = function(e, t) { + i("BindExpression", e, t); + }; + n.assertImportAttribute = function(e, t) { + i("ImportAttribute", e, t); + }; + n.assertDecorator = function(e, t) { + i("Decorator", e, t); + }; + n.assertDoExpression = function(e, t) { + i("DoExpression", e, t); + }; + n.assertExportDefaultSpecifier = function(e, t) { + i("ExportDefaultSpecifier", e, t); + }; + n.assertRecordExpression = function(e, t) { + i("RecordExpression", e, t); + }; + n.assertTupleExpression = function(e, t) { + i("TupleExpression", e, t); + }; + n.assertDecimalLiteral = function(e, t) { + i("DecimalLiteral", e, t); + }; + n.assertStaticBlock = function(e, t) { + i("StaticBlock", e, t); + }; + n.assertModuleExpression = function(e, t) { + i("ModuleExpression", e, t); + }; + n.assertTopicReference = function(e, t) { + i("TopicReference", e, t); + }; + n.assertPipelineTopicExpression = function(e, t) { + i("PipelineTopicExpression", e, t); + }; + n.assertPipelineBareFunction = function(e, t) { + i("PipelineBareFunction", e, t); + }; + n.assertPipelinePrimaryTopicReference = function(e, t) { + i("PipelinePrimaryTopicReference", e, t); + }; + n.assertTSParameterProperty = function(e, t) { + i("TSParameterProperty", e, t); + }; + n.assertTSDeclareFunction = function(e, t) { + i("TSDeclareFunction", e, t); + }; + n.assertTSDeclareMethod = function(e, t) { + i("TSDeclareMethod", e, t); + }; + n.assertTSQualifiedName = function(e, t) { + i("TSQualifiedName", e, t); + }; + n.assertTSCallSignatureDeclaration = function(e, t) { + i("TSCallSignatureDeclaration", e, t); + }; + n.assertTSConstructSignatureDeclaration = function(e, t) { + i("TSConstructSignatureDeclaration", e, t); + }; + n.assertTSPropertySignature = function(e, t) { + i("TSPropertySignature", e, t); + }; + n.assertTSMethodSignature = function(e, t) { + i("TSMethodSignature", e, t); + }; + n.assertTSIndexSignature = function(e, t) { + i("TSIndexSignature", e, t); + }; + n.assertTSAnyKeyword = function(e, t) { + i("TSAnyKeyword", e, t); + }; + n.assertTSBooleanKeyword = function(e, t) { + i("TSBooleanKeyword", e, t); + }; + n.assertTSBigIntKeyword = function(e, t) { + i("TSBigIntKeyword", e, t); + }; + n.assertTSIntrinsicKeyword = function(e, t) { + i("TSIntrinsicKeyword", e, t); + }; + n.assertTSNeverKeyword = function(e, t) { + i("TSNeverKeyword", e, t); + }; + n.assertTSNullKeyword = function(e, t) { + i("TSNullKeyword", e, t); + }; + n.assertTSNumberKeyword = function(e, t) { + i("TSNumberKeyword", e, t); + }; + n.assertTSObjectKeyword = function(e, t) { + i("TSObjectKeyword", e, t); + }; + n.assertTSStringKeyword = function(e, t) { + i("TSStringKeyword", e, t); + }; + n.assertTSSymbolKeyword = function(e, t) { + i("TSSymbolKeyword", e, t); + }; + n.assertTSUndefinedKeyword = function(e, t) { + i("TSUndefinedKeyword", e, t); + }; + n.assertTSUnknownKeyword = function(e, t) { + i("TSUnknownKeyword", e, t); + }; + n.assertTSVoidKeyword = function(e, t) { + i("TSVoidKeyword", e, t); + }; + n.assertTSThisType = function(e, t) { + i("TSThisType", e, t); + }; + n.assertTSFunctionType = function(e, t) { + i("TSFunctionType", e, t); + }; + n.assertTSConstructorType = function(e, t) { + i("TSConstructorType", e, t); + }; + n.assertTSTypeReference = function(e, t) { + i("TSTypeReference", e, t); + }; + n.assertTSTypePredicate = function(e, t) { + i("TSTypePredicate", e, t); + }; + n.assertTSTypeQuery = function(e, t) { + i("TSTypeQuery", e, t); + }; + n.assertTSTypeLiteral = function(e, t) { + i("TSTypeLiteral", e, t); + }; + n.assertTSArrayType = function(e, t) { + i("TSArrayType", e, t); + }; + n.assertTSTupleType = function(e, t) { + i("TSTupleType", e, t); + }; + n.assertTSOptionalType = function(e, t) { + i("TSOptionalType", e, t); + }; + n.assertTSRestType = function(e, t) { + i("TSRestType", e, t); + }; + n.assertTSNamedTupleMember = function(e, t) { + i("TSNamedTupleMember", e, t); + }; + n.assertTSUnionType = function(e, t) { + i("TSUnionType", e, t); + }; + n.assertTSIntersectionType = function(e, t) { + i("TSIntersectionType", e, t); + }; + n.assertTSConditionalType = function(e, t) { + i("TSConditionalType", e, t); + }; + n.assertTSInferType = function(e, t) { + i("TSInferType", e, t); + }; + n.assertTSParenthesizedType = function(e, t) { + i("TSParenthesizedType", e, t); + }; + n.assertTSTypeOperator = function(e, t) { + i("TSTypeOperator", e, t); + }; + n.assertTSIndexedAccessType = function(e, t) { + i("TSIndexedAccessType", e, t); + }; + n.assertTSMappedType = function(e, t) { + i("TSMappedType", e, t); + }; + n.assertTSLiteralType = function(e, t) { + i("TSLiteralType", e, t); + }; + n.assertTSExpressionWithTypeArguments = function(e, t) { + i("TSExpressionWithTypeArguments", e, t); + }; + n.assertTSInterfaceDeclaration = function(e, t) { + i("TSInterfaceDeclaration", e, t); + }; + n.assertTSInterfaceBody = function(e, t) { + i("TSInterfaceBody", e, t); + }; + n.assertTSTypeAliasDeclaration = function(e, t) { + i("TSTypeAliasDeclaration", e, t); + }; + n.assertTSAsExpression = function(e, t) { + i("TSAsExpression", e, t); + }; + n.assertTSTypeAssertion = function(e, t) { + i("TSTypeAssertion", e, t); + }; + n.assertTSEnumDeclaration = function(e, t) { + i("TSEnumDeclaration", e, t); + }; + n.assertTSEnumMember = function(e, t) { + i("TSEnumMember", e, t); + }; + n.assertTSModuleDeclaration = function(e, t) { + i("TSModuleDeclaration", e, t); + }; + n.assertTSModuleBlock = function(e, t) { + i("TSModuleBlock", e, t); + }; + n.assertTSImportType = function(e, t) { + i("TSImportType", e, t); + }; + n.assertTSImportEqualsDeclaration = function(e, t) { + i("TSImportEqualsDeclaration", e, t); + }; + n.assertTSExternalModuleReference = function(e, t) { + i("TSExternalModuleReference", e, t); + }; + n.assertTSNonNullExpression = function(e, t) { + i("TSNonNullExpression", e, t); + }; + n.assertTSExportAssignment = function(e, t) { + i("TSExportAssignment", e, t); + }; + n.assertTSNamespaceExportDeclaration = function(e, t) { + i("TSNamespaceExportDeclaration", e, t); + }; + n.assertTSTypeAnnotation = function(e, t) { + i("TSTypeAnnotation", e, t); + }; + n.assertTSTypeParameterInstantiation = function(e, t) { + i("TSTypeParameterInstantiation", e, t); + }; + n.assertTSTypeParameterDeclaration = function(e, t) { + i("TSTypeParameterDeclaration", e, t); + }; + n.assertTSTypeParameter = function(e, t) { + i("TSTypeParameter", e, t); + }; + n.assertExpression = function(e, t) { + i("Expression", e, t); + }; + n.assertBinary = function(e, t) { + i("Binary", e, t); + }; + n.assertScopable = function(e, t) { + i("Scopable", e, t); + }; + n.assertBlockParent = function(e, t) { + i("BlockParent", e, t); + }; + n.assertBlock = function(e, t) { + i("Block", e, t); + }; + n.assertStatement = function(e, t) { + i("Statement", e, t); + }; + n.assertTerminatorless = function(e, t) { + i("Terminatorless", e, t); + }; + n.assertCompletionStatement = function(e, t) { + i("CompletionStatement", e, t); + }; + n.assertConditional = function(e, t) { + i("Conditional", e, t); + }; + n.assertLoop = function(e, t) { + i("Loop", e, t); + }; + n.assertWhile = function(e, t) { + i("While", e, t); + }; + n.assertExpressionWrapper = function(e, t) { + i("ExpressionWrapper", e, t); + }; + n.assertFor = function(e, t) { + i("For", e, t); + }; + n.assertForXStatement = function(e, t) { + i("ForXStatement", e, t); + }; + n.assertFunction = function(e, t) { + i("Function", e, t); + }; + n.assertFunctionParent = function(e, t) { + i("FunctionParent", e, t); + }; + n.assertPureish = function(e, t) { + i("Pureish", e, t); + }; + n.assertDeclaration = function(e, t) { + i("Declaration", e, t); + }; + n.assertPatternLike = function(e, t) { + i("PatternLike", e, t); + }; + n.assertLVal = function(e, t) { + i("LVal", e, t); + }; + n.assertTSEntityName = function(e, t) { + i("TSEntityName", e, t); + }; + n.assertLiteral = function(e, t) { + i("Literal", e, t); + }; + n.assertImmutable = function(e, t) { + i("Immutable", e, t); + }; + n.assertUserWhitespacable = function(e, t) { + i("UserWhitespacable", e, t); + }; + n.assertMethod = function(e, t) { + i("Method", e, t); + }; + n.assertObjectMember = function(e, t) { + i("ObjectMember", e, t); + }; + n.assertProperty = function(e, t) { + i("Property", e, t); + }; + n.assertUnaryLike = function(e, t) { + i("UnaryLike", e, t); + }; + n.assertPattern = function(e, t) { + i("Pattern", e, t); + }; + n.assertClass = function(e, t) { + i("Class", e, t); + }; + n.assertModuleDeclaration = function(e, t) { + i("ModuleDeclaration", e, t); + }; + n.assertExportDeclaration = function(e, t) { + i("ExportDeclaration", e, t); + }; + n.assertModuleSpecifier = function(e, t) { + i("ModuleSpecifier", e, t); + }; + n.assertPrivate = function(e, t) { + i("Private", e, t); + }; + n.assertFlow = function(e, t) { + i("Flow", e, t); + }; + n.assertFlowType = function(e, t) { + i("FlowType", e, t); + }; + n.assertFlowBaseAnnotation = function(e, t) { + i("FlowBaseAnnotation", e, t); + }; + n.assertFlowDeclaration = function(e, t) { + i("FlowDeclaration", e, t); + }; + n.assertFlowPredicate = function(e, t) { + i("FlowPredicate", e, t); + }; + n.assertEnumBody = function(e, t) { + i("EnumBody", e, t); + }; + n.assertEnumMember = function(e, t) { + i("EnumMember", e, t); + }; + n.assertJSX = function(e, t) { + i("JSX", e, t); + }; + n.assertTSTypeElement = function(e, t) { + i("TSTypeElement", e, t); + }; + n.assertTSType = function(e, t) { + i("TSType", e, t); + }; + n.assertTSBaseType = function(e, t) { + i("TSBaseType", e, t); + }; + n.assertNumberLiteral = function(e, t) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + i("NumberLiteral", e, t); + }; + n.assertRegexLiteral = function(e, t) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + i("RegexLiteral", e, t); + }; + n.assertRestProperty = function(e, t) { + console.trace("The node type RestProperty has been renamed to RestElement"); + i("RestProperty", e, t); + }; + n.assertSpreadProperty = function(e, t) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + i("SpreadProperty", e, t); + }; + var r = e("../../validators/is"); + function i(e, t, n) { + if (!(0, r.default)(e, t, n)) throw new Error(`Expected type "${e}" with option ${JSON.stringify(n)}, ` + `but instead got "${t.type}".`); + } + }, { + "../../validators/is": 125 + } ], + 66: [ function(e, t, n) {}, {} ], + 67: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, ...t) { + const n = r.BUILDER_KEYS[e]; + const s = t.length; + if (s > n.length) throw new Error(`${e}: Too many arguments passed. Received ${s} but can receive no more than ${n.length}`); + const a = { + type: e + }; + let o = 0; + n.forEach(n => { + const i = r.NODE_FIELDS[e][n]; + let l; + o < s && (l = t[o]); + void 0 === l && (l = Array.isArray(i.default) ? [] : i.default); + a[n] = l; + o++; + }); + for (const e of Object.keys(a)) (0, i.default)(a, e, a[e]); + return a; + }; + r = e("../definitions"); + i = e("../validators/validate"); + }, { + "../definitions": 102, + "../validators/validate": 143 + } ], + 68: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + const t = (0, i.default)(e); + return 1 === t.length ? t[0] : (0, r.unionTypeAnnotation)(t); + }; + r = e("../generated"); + i = e("../../modifications/flow/removeTypeDuplicates"); + }, { + "../../modifications/flow/removeTypeDuplicates": 110, + "../generated": 70 + } ], + 69: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + if ("string" === e) return (0, r.stringTypeAnnotation)(); + if ("number" === e) return (0, r.numberTypeAnnotation)(); + if ("undefined" === e) return (0, r.voidTypeAnnotation)(); + if ("boolean" === e) return (0, r.booleanTypeAnnotation)(); + if ("function" === e) return (0, r.genericTypeAnnotation)((0, r.identifier)("Function")); + if ("object" === e) return (0, r.genericTypeAnnotation)((0, r.identifier)("Object")); + if ("symbol" === e) return (0, r.genericTypeAnnotation)((0, r.identifier)("Symbol")); + if ("bigint" === e) return (0, r.anyTypeAnnotation)(); + throw new Error("Invalid typeof value: " + e); + }; + var r = e("../generated"); + }, { + "../generated": 70 + } ], + 70: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.arrayExpression = function(e) { + return (0, r.default)("ArrayExpression", ...arguments); + }; + n.assignmentExpression = function(e, t, n) { + return (0, r.default)("AssignmentExpression", ...arguments); + }; + n.binaryExpression = function(e, t, n) { + return (0, r.default)("BinaryExpression", ...arguments); + }; + n.interpreterDirective = function(e) { + return (0, r.default)("InterpreterDirective", ...arguments); + }; + n.directive = function(e) { + return (0, r.default)("Directive", ...arguments); + }; + n.directiveLiteral = function(e) { + return (0, r.default)("DirectiveLiteral", ...arguments); + }; + n.blockStatement = function(e, t) { + return (0, r.default)("BlockStatement", ...arguments); + }; + n.breakStatement = function(e) { + return (0, r.default)("BreakStatement", ...arguments); + }; + n.callExpression = function(e, t) { + return (0, r.default)("CallExpression", ...arguments); + }; + n.catchClause = function(e, t) { + return (0, r.default)("CatchClause", ...arguments); + }; + n.conditionalExpression = function(e, t, n) { + return (0, r.default)("ConditionalExpression", ...arguments); + }; + n.continueStatement = function(e) { + return (0, r.default)("ContinueStatement", ...arguments); + }; + n.debuggerStatement = function() { + return (0, r.default)("DebuggerStatement", ...arguments); + }; + n.doWhileStatement = function(e, t) { + return (0, r.default)("DoWhileStatement", ...arguments); + }; + n.emptyStatement = function() { + return (0, r.default)("EmptyStatement", ...arguments); + }; + n.expressionStatement = function(e) { + return (0, r.default)("ExpressionStatement", ...arguments); + }; + n.file = function(e, t, n) { + return (0, r.default)("File", ...arguments); + }; + n.forInStatement = function(e, t, n) { + return (0, r.default)("ForInStatement", ...arguments); + }; + n.forStatement = function(e, t, n, i) { + return (0, r.default)("ForStatement", ...arguments); + }; + n.functionDeclaration = function(e, t, n, i, s) { + return (0, r.default)("FunctionDeclaration", ...arguments); + }; + n.functionExpression = function(e, t, n, i, s) { + return (0, r.default)("FunctionExpression", ...arguments); + }; + n.identifier = function(e) { + return (0, r.default)("Identifier", ...arguments); + }; + n.ifStatement = function(e, t, n) { + return (0, r.default)("IfStatement", ...arguments); + }; + n.labeledStatement = function(e, t) { + return (0, r.default)("LabeledStatement", ...arguments); + }; + n.stringLiteral = function(e) { + return (0, r.default)("StringLiteral", ...arguments); + }; + n.numericLiteral = function(e) { + return (0, r.default)("NumericLiteral", ...arguments); + }; + n.nullLiteral = function() { + return (0, r.default)("NullLiteral", ...arguments); + }; + n.booleanLiteral = function(e) { + return (0, r.default)("BooleanLiteral", ...arguments); + }; + n.regExpLiteral = function(e, t) { + return (0, r.default)("RegExpLiteral", ...arguments); + }; + n.logicalExpression = function(e, t, n) { + return (0, r.default)("LogicalExpression", ...arguments); + }; + n.memberExpression = function(e, t, n, i) { + return (0, r.default)("MemberExpression", ...arguments); + }; + n.newExpression = function(e, t) { + return (0, r.default)("NewExpression", ...arguments); + }; + n.program = function(e, t, n, i) { + return (0, r.default)("Program", ...arguments); + }; + n.objectExpression = function(e) { + return (0, r.default)("ObjectExpression", ...arguments); + }; + n.objectMethod = function(e, t, n, i, s, a, o) { + return (0, r.default)("ObjectMethod", ...arguments); + }; + n.objectProperty = function(e, t, n, i, s) { + return (0, r.default)("ObjectProperty", ...arguments); + }; + n.restElement = function(e) { + return (0, r.default)("RestElement", ...arguments); + }; + n.returnStatement = function(e) { + return (0, r.default)("ReturnStatement", ...arguments); + }; + n.sequenceExpression = function(e) { + return (0, r.default)("SequenceExpression", ...arguments); + }; + n.parenthesizedExpression = function(e) { + return (0, r.default)("ParenthesizedExpression", ...arguments); + }; + n.switchCase = function(e, t) { + return (0, r.default)("SwitchCase", ...arguments); + }; + n.switchStatement = function(e, t) { + return (0, r.default)("SwitchStatement", ...arguments); + }; + n.thisExpression = function() { + return (0, r.default)("ThisExpression", ...arguments); + }; + n.throwStatement = function(e) { + return (0, r.default)("ThrowStatement", ...arguments); + }; + n.tryStatement = function(e, t, n) { + return (0, r.default)("TryStatement", ...arguments); + }; + n.unaryExpression = function(e, t, n) { + return (0, r.default)("UnaryExpression", ...arguments); + }; + n.updateExpression = function(e, t, n) { + return (0, r.default)("UpdateExpression", ...arguments); + }; + n.variableDeclaration = function(e, t) { + return (0, r.default)("VariableDeclaration", ...arguments); + }; + n.variableDeclarator = function(e, t) { + return (0, r.default)("VariableDeclarator", ...arguments); + }; + n.whileStatement = function(e, t) { + return (0, r.default)("WhileStatement", ...arguments); + }; + n.withStatement = function(e, t) { + return (0, r.default)("WithStatement", ...arguments); + }; + n.assignmentPattern = function(e, t) { + return (0, r.default)("AssignmentPattern", ...arguments); + }; + n.arrayPattern = function(e) { + return (0, r.default)("ArrayPattern", ...arguments); + }; + n.arrowFunctionExpression = function(e, t, n) { + return (0, r.default)("ArrowFunctionExpression", ...arguments); + }; + n.classBody = function(e) { + return (0, r.default)("ClassBody", ...arguments); + }; + n.classExpression = function(e, t, n, i) { + return (0, r.default)("ClassExpression", ...arguments); + }; + n.classDeclaration = function(e, t, n, i) { + return (0, r.default)("ClassDeclaration", ...arguments); + }; + n.exportAllDeclaration = function(e) { + return (0, r.default)("ExportAllDeclaration", ...arguments); + }; + n.exportDefaultDeclaration = function(e) { + return (0, r.default)("ExportDefaultDeclaration", ...arguments); + }; + n.exportNamedDeclaration = function(e, t, n) { + return (0, r.default)("ExportNamedDeclaration", ...arguments); + }; + n.exportSpecifier = function(e, t) { + return (0, r.default)("ExportSpecifier", ...arguments); + }; + n.forOfStatement = function(e, t, n, i) { + return (0, r.default)("ForOfStatement", ...arguments); + }; + n.importDeclaration = function(e, t) { + return (0, r.default)("ImportDeclaration", ...arguments); + }; + n.importDefaultSpecifier = function(e) { + return (0, r.default)("ImportDefaultSpecifier", ...arguments); + }; + n.importNamespaceSpecifier = function(e) { + return (0, r.default)("ImportNamespaceSpecifier", ...arguments); + }; + n.importSpecifier = function(e, t) { + return (0, r.default)("ImportSpecifier", ...arguments); + }; + n.metaProperty = function(e, t) { + return (0, r.default)("MetaProperty", ...arguments); + }; + n.classMethod = function(e, t, n, i, s, a, o, l) { + return (0, r.default)("ClassMethod", ...arguments); + }; + n.objectPattern = function(e) { + return (0, r.default)("ObjectPattern", ...arguments); + }; + n.spreadElement = function(e) { + return (0, r.default)("SpreadElement", ...arguments); + }; + n.super = function() { + return (0, r.default)("Super", ...arguments); + }; + n.taggedTemplateExpression = function(e, t) { + return (0, r.default)("TaggedTemplateExpression", ...arguments); + }; + n.templateElement = function(e, t) { + return (0, r.default)("TemplateElement", ...arguments); + }; + n.templateLiteral = function(e, t) { + return (0, r.default)("TemplateLiteral", ...arguments); + }; + n.yieldExpression = function(e, t) { + return (0, r.default)("YieldExpression", ...arguments); + }; + n.awaitExpression = function(e) { + return (0, r.default)("AwaitExpression", ...arguments); + }; + n.import = function() { + return (0, r.default)("Import", ...arguments); + }; + n.bigIntLiteral = function(e) { + return (0, r.default)("BigIntLiteral", ...arguments); + }; + n.exportNamespaceSpecifier = function(e) { + return (0, r.default)("ExportNamespaceSpecifier", ...arguments); + }; + n.optionalMemberExpression = function(e, t, n, i) { + return (0, r.default)("OptionalMemberExpression", ...arguments); + }; + n.optionalCallExpression = function(e, t, n) { + return (0, r.default)("OptionalCallExpression", ...arguments); + }; + n.classProperty = function(e, t, n, i, s, a) { + return (0, r.default)("ClassProperty", ...arguments); + }; + n.classPrivateProperty = function(e, t, n, i) { + return (0, r.default)("ClassPrivateProperty", ...arguments); + }; + n.classPrivateMethod = function(e, t, n, i, s) { + return (0, r.default)("ClassPrivateMethod", ...arguments); + }; + n.privateName = function(e) { + return (0, r.default)("PrivateName", ...arguments); + }; + n.anyTypeAnnotation = function() { + return (0, r.default)("AnyTypeAnnotation", ...arguments); + }; + n.arrayTypeAnnotation = function(e) { + return (0, r.default)("ArrayTypeAnnotation", ...arguments); + }; + n.booleanTypeAnnotation = function() { + return (0, r.default)("BooleanTypeAnnotation", ...arguments); + }; + n.booleanLiteralTypeAnnotation = function(e) { + return (0, r.default)("BooleanLiteralTypeAnnotation", ...arguments); + }; + n.nullLiteralTypeAnnotation = function() { + return (0, r.default)("NullLiteralTypeAnnotation", ...arguments); + }; + n.classImplements = function(e, t) { + return (0, r.default)("ClassImplements", ...arguments); + }; + n.declareClass = function(e, t, n, i) { + return (0, r.default)("DeclareClass", ...arguments); + }; + n.declareFunction = function(e) { + return (0, r.default)("DeclareFunction", ...arguments); + }; + n.declareInterface = function(e, t, n, i) { + return (0, r.default)("DeclareInterface", ...arguments); + }; + n.declareModule = function(e, t, n) { + return (0, r.default)("DeclareModule", ...arguments); + }; + n.declareModuleExports = function(e) { + return (0, r.default)("DeclareModuleExports", ...arguments); + }; + n.declareTypeAlias = function(e, t, n) { + return (0, r.default)("DeclareTypeAlias", ...arguments); + }; + n.declareOpaqueType = function(e, t, n) { + return (0, r.default)("DeclareOpaqueType", ...arguments); + }; + n.declareVariable = function(e) { + return (0, r.default)("DeclareVariable", ...arguments); + }; + n.declareExportDeclaration = function(e, t, n) { + return (0, r.default)("DeclareExportDeclaration", ...arguments); + }; + n.declareExportAllDeclaration = function(e) { + return (0, r.default)("DeclareExportAllDeclaration", ...arguments); + }; + n.declaredPredicate = function(e) { + return (0, r.default)("DeclaredPredicate", ...arguments); + }; + n.existsTypeAnnotation = function() { + return (0, r.default)("ExistsTypeAnnotation", ...arguments); + }; + n.functionTypeAnnotation = function(e, t, n, i) { + return (0, r.default)("FunctionTypeAnnotation", ...arguments); + }; + n.functionTypeParam = function(e, t) { + return (0, r.default)("FunctionTypeParam", ...arguments); + }; + n.genericTypeAnnotation = function(e, t) { + return (0, r.default)("GenericTypeAnnotation", ...arguments); + }; + n.inferredPredicate = function() { + return (0, r.default)("InferredPredicate", ...arguments); + }; + n.interfaceExtends = function(e, t) { + return (0, r.default)("InterfaceExtends", ...arguments); + }; + n.interfaceDeclaration = function(e, t, n, i) { + return (0, r.default)("InterfaceDeclaration", ...arguments); + }; + n.interfaceTypeAnnotation = function(e, t) { + return (0, r.default)("InterfaceTypeAnnotation", ...arguments); + }; + n.intersectionTypeAnnotation = function(e) { + return (0, r.default)("IntersectionTypeAnnotation", ...arguments); + }; + n.mixedTypeAnnotation = function() { + return (0, r.default)("MixedTypeAnnotation", ...arguments); + }; + n.emptyTypeAnnotation = function() { + return (0, r.default)("EmptyTypeAnnotation", ...arguments); + }; + n.nullableTypeAnnotation = function(e) { + return (0, r.default)("NullableTypeAnnotation", ...arguments); + }; + n.numberLiteralTypeAnnotation = function(e) { + return (0, r.default)("NumberLiteralTypeAnnotation", ...arguments); + }; + n.numberTypeAnnotation = function() { + return (0, r.default)("NumberTypeAnnotation", ...arguments); + }; + n.objectTypeAnnotation = function(e, t, n, i, s) { + return (0, r.default)("ObjectTypeAnnotation", ...arguments); + }; + n.objectTypeInternalSlot = function(e, t, n, i, s) { + return (0, r.default)("ObjectTypeInternalSlot", ...arguments); + }; + n.objectTypeCallProperty = function(e) { + return (0, r.default)("ObjectTypeCallProperty", ...arguments); + }; + n.objectTypeIndexer = function(e, t, n, i) { + return (0, r.default)("ObjectTypeIndexer", ...arguments); + }; + n.objectTypeProperty = function(e, t, n) { + return (0, r.default)("ObjectTypeProperty", ...arguments); + }; + n.objectTypeSpreadProperty = function(e) { + return (0, r.default)("ObjectTypeSpreadProperty", ...arguments); + }; + n.opaqueType = function(e, t, n, i) { + return (0, r.default)("OpaqueType", ...arguments); + }; + n.qualifiedTypeIdentifier = function(e, t) { + return (0, r.default)("QualifiedTypeIdentifier", ...arguments); + }; + n.stringLiteralTypeAnnotation = function(e) { + return (0, r.default)("StringLiteralTypeAnnotation", ...arguments); + }; + n.stringTypeAnnotation = function() { + return (0, r.default)("StringTypeAnnotation", ...arguments); + }; + n.symbolTypeAnnotation = function() { + return (0, r.default)("SymbolTypeAnnotation", ...arguments); + }; + n.thisTypeAnnotation = function() { + return (0, r.default)("ThisTypeAnnotation", ...arguments); + }; + n.tupleTypeAnnotation = function(e) { + return (0, r.default)("TupleTypeAnnotation", ...arguments); + }; + n.typeofTypeAnnotation = function(e) { + return (0, r.default)("TypeofTypeAnnotation", ...arguments); + }; + n.typeAlias = function(e, t, n) { + return (0, r.default)("TypeAlias", ...arguments); + }; + n.typeAnnotation = function(e) { + return (0, r.default)("TypeAnnotation", ...arguments); + }; + n.typeCastExpression = function(e, t) { + return (0, r.default)("TypeCastExpression", ...arguments); + }; + n.typeParameter = function(e, t, n) { + return (0, r.default)("TypeParameter", ...arguments); + }; + n.typeParameterDeclaration = function(e) { + return (0, r.default)("TypeParameterDeclaration", ...arguments); + }; + n.typeParameterInstantiation = function(e) { + return (0, r.default)("TypeParameterInstantiation", ...arguments); + }; + n.unionTypeAnnotation = function(e) { + return (0, r.default)("UnionTypeAnnotation", ...arguments); + }; + n.variance = function(e) { + return (0, r.default)("Variance", ...arguments); + }; + n.voidTypeAnnotation = function() { + return (0, r.default)("VoidTypeAnnotation", ...arguments); + }; + n.enumDeclaration = function(e, t) { + return (0, r.default)("EnumDeclaration", ...arguments); + }; + n.enumBooleanBody = function(e) { + return (0, r.default)("EnumBooleanBody", ...arguments); + }; + n.enumNumberBody = function(e) { + return (0, r.default)("EnumNumberBody", ...arguments); + }; + n.enumStringBody = function(e) { + return (0, r.default)("EnumStringBody", ...arguments); + }; + n.enumSymbolBody = function(e) { + return (0, r.default)("EnumSymbolBody", ...arguments); + }; + n.enumBooleanMember = function(e) { + return (0, r.default)("EnumBooleanMember", ...arguments); + }; + n.enumNumberMember = function(e, t) { + return (0, r.default)("EnumNumberMember", ...arguments); + }; + n.enumStringMember = function(e, t) { + return (0, r.default)("EnumStringMember", ...arguments); + }; + n.enumDefaultedMember = function(e) { + return (0, r.default)("EnumDefaultedMember", ...arguments); + }; + n.indexedAccessType = function(e, t) { + return (0, r.default)("IndexedAccessType", ...arguments); + }; + n.optionalIndexedAccessType = function(e, t) { + return (0, r.default)("OptionalIndexedAccessType", ...arguments); + }; + n.jSXAttribute = n.jsxAttribute = function(e, t) { + return (0, r.default)("JSXAttribute", ...arguments); + }; + n.jSXClosingElement = n.jsxClosingElement = function(e) { + return (0, r.default)("JSXClosingElement", ...arguments); + }; + n.jSXElement = n.jsxElement = function(e, t, n, i) { + return (0, r.default)("JSXElement", ...arguments); + }; + n.jSXEmptyExpression = n.jsxEmptyExpression = function() { + return (0, r.default)("JSXEmptyExpression", ...arguments); + }; + n.jSXExpressionContainer = n.jsxExpressionContainer = function(e) { + return (0, r.default)("JSXExpressionContainer", ...arguments); + }; + n.jSXSpreadChild = n.jsxSpreadChild = function(e) { + return (0, r.default)("JSXSpreadChild", ...arguments); + }; + n.jSXIdentifier = n.jsxIdentifier = function(e) { + return (0, r.default)("JSXIdentifier", ...arguments); + }; + n.jSXMemberExpression = n.jsxMemberExpression = function(e, t) { + return (0, r.default)("JSXMemberExpression", ...arguments); + }; + n.jSXNamespacedName = n.jsxNamespacedName = function(e, t) { + return (0, r.default)("JSXNamespacedName", ...arguments); + }; + n.jSXOpeningElement = n.jsxOpeningElement = function(e, t, n) { + return (0, r.default)("JSXOpeningElement", ...arguments); + }; + n.jSXSpreadAttribute = n.jsxSpreadAttribute = function(e) { + return (0, r.default)("JSXSpreadAttribute", ...arguments); + }; + n.jSXText = n.jsxText = function(e) { + return (0, r.default)("JSXText", ...arguments); + }; + n.jSXFragment = n.jsxFragment = function(e, t, n) { + return (0, r.default)("JSXFragment", ...arguments); + }; + n.jSXOpeningFragment = n.jsxOpeningFragment = function() { + return (0, r.default)("JSXOpeningFragment", ...arguments); + }; + n.jSXClosingFragment = n.jsxClosingFragment = function() { + return (0, r.default)("JSXClosingFragment", ...arguments); + }; + n.noop = function() { + return (0, r.default)("Noop", ...arguments); + }; + n.placeholder = function(e, t) { + return (0, r.default)("Placeholder", ...arguments); + }; + n.v8IntrinsicIdentifier = function(e) { + return (0, r.default)("V8IntrinsicIdentifier", ...arguments); + }; + n.argumentPlaceholder = function() { + return (0, r.default)("ArgumentPlaceholder", ...arguments); + }; + n.bindExpression = function(e, t) { + return (0, r.default)("BindExpression", ...arguments); + }; + n.importAttribute = function(e, t) { + return (0, r.default)("ImportAttribute", ...arguments); + }; + n.decorator = function(e) { + return (0, r.default)("Decorator", ...arguments); + }; + n.doExpression = function(e, t) { + return (0, r.default)("DoExpression", ...arguments); + }; + n.exportDefaultSpecifier = function(e) { + return (0, r.default)("ExportDefaultSpecifier", ...arguments); + }; + n.recordExpression = function(e) { + return (0, r.default)("RecordExpression", ...arguments); + }; + n.tupleExpression = function(e) { + return (0, r.default)("TupleExpression", ...arguments); + }; + n.decimalLiteral = function(e) { + return (0, r.default)("DecimalLiteral", ...arguments); + }; + n.staticBlock = function(e) { + return (0, r.default)("StaticBlock", ...arguments); + }; + n.moduleExpression = function(e) { + return (0, r.default)("ModuleExpression", ...arguments); + }; + n.topicReference = function() { + return (0, r.default)("TopicReference", ...arguments); + }; + n.pipelineTopicExpression = function(e) { + return (0, r.default)("PipelineTopicExpression", ...arguments); + }; + n.pipelineBareFunction = function(e) { + return (0, r.default)("PipelineBareFunction", ...arguments); + }; + n.pipelinePrimaryTopicReference = function() { + return (0, r.default)("PipelinePrimaryTopicReference", ...arguments); + }; + n.tSParameterProperty = n.tsParameterProperty = function(e) { + return (0, r.default)("TSParameterProperty", ...arguments); + }; + n.tSDeclareFunction = n.tsDeclareFunction = function(e, t, n, i) { + return (0, r.default)("TSDeclareFunction", ...arguments); + }; + n.tSDeclareMethod = n.tsDeclareMethod = function(e, t, n, i, s) { + return (0, r.default)("TSDeclareMethod", ...arguments); + }; + n.tSQualifiedName = n.tsQualifiedName = function(e, t) { + return (0, r.default)("TSQualifiedName", ...arguments); + }; + n.tSCallSignatureDeclaration = n.tsCallSignatureDeclaration = function(e, t, n) { + return (0, r.default)("TSCallSignatureDeclaration", ...arguments); + }; + n.tSConstructSignatureDeclaration = n.tsConstructSignatureDeclaration = function(e, t, n) { + return (0, r.default)("TSConstructSignatureDeclaration", ...arguments); + }; + n.tSPropertySignature = n.tsPropertySignature = function(e, t, n) { + return (0, r.default)("TSPropertySignature", ...arguments); + }; + n.tSMethodSignature = n.tsMethodSignature = function(e, t, n, i) { + return (0, r.default)("TSMethodSignature", ...arguments); + }; + n.tSIndexSignature = n.tsIndexSignature = function(e, t) { + return (0, r.default)("TSIndexSignature", ...arguments); + }; + n.tSAnyKeyword = n.tsAnyKeyword = function() { + return (0, r.default)("TSAnyKeyword", ...arguments); + }; + n.tSBooleanKeyword = n.tsBooleanKeyword = function() { + return (0, r.default)("TSBooleanKeyword", ...arguments); + }; + n.tSBigIntKeyword = n.tsBigIntKeyword = function() { + return (0, r.default)("TSBigIntKeyword", ...arguments); + }; + n.tSIntrinsicKeyword = n.tsIntrinsicKeyword = function() { + return (0, r.default)("TSIntrinsicKeyword", ...arguments); + }; + n.tSNeverKeyword = n.tsNeverKeyword = function() { + return (0, r.default)("TSNeverKeyword", ...arguments); + }; + n.tSNullKeyword = n.tsNullKeyword = function() { + return (0, r.default)("TSNullKeyword", ...arguments); + }; + n.tSNumberKeyword = n.tsNumberKeyword = function() { + return (0, r.default)("TSNumberKeyword", ...arguments); + }; + n.tSObjectKeyword = n.tsObjectKeyword = function() { + return (0, r.default)("TSObjectKeyword", ...arguments); + }; + n.tSStringKeyword = n.tsStringKeyword = function() { + return (0, r.default)("TSStringKeyword", ...arguments); + }; + n.tSSymbolKeyword = n.tsSymbolKeyword = function() { + return (0, r.default)("TSSymbolKeyword", ...arguments); + }; + n.tSUndefinedKeyword = n.tsUndefinedKeyword = function() { + return (0, r.default)("TSUndefinedKeyword", ...arguments); + }; + n.tSUnknownKeyword = n.tsUnknownKeyword = function() { + return (0, r.default)("TSUnknownKeyword", ...arguments); + }; + n.tSVoidKeyword = n.tsVoidKeyword = function() { + return (0, r.default)("TSVoidKeyword", ...arguments); + }; + n.tSThisType = n.tsThisType = function() { + return (0, r.default)("TSThisType", ...arguments); + }; + n.tSFunctionType = n.tsFunctionType = function(e, t, n) { + return (0, r.default)("TSFunctionType", ...arguments); + }; + n.tSConstructorType = n.tsConstructorType = function(e, t, n) { + return (0, r.default)("TSConstructorType", ...arguments); + }; + n.tSTypeReference = n.tsTypeReference = function(e, t) { + return (0, r.default)("TSTypeReference", ...arguments); + }; + n.tSTypePredicate = n.tsTypePredicate = function(e, t, n) { + return (0, r.default)("TSTypePredicate", ...arguments); + }; + n.tSTypeQuery = n.tsTypeQuery = function(e) { + return (0, r.default)("TSTypeQuery", ...arguments); + }; + n.tSTypeLiteral = n.tsTypeLiteral = function(e) { + return (0, r.default)("TSTypeLiteral", ...arguments); + }; + n.tSArrayType = n.tsArrayType = function(e) { + return (0, r.default)("TSArrayType", ...arguments); + }; + n.tSTupleType = n.tsTupleType = function(e) { + return (0, r.default)("TSTupleType", ...arguments); + }; + n.tSOptionalType = n.tsOptionalType = function(e) { + return (0, r.default)("TSOptionalType", ...arguments); + }; + n.tSRestType = n.tsRestType = function(e) { + return (0, r.default)("TSRestType", ...arguments); + }; + n.tSNamedTupleMember = n.tsNamedTupleMember = function(e, t, n) { + return (0, r.default)("TSNamedTupleMember", ...arguments); + }; + n.tSUnionType = n.tsUnionType = function(e) { + return (0, r.default)("TSUnionType", ...arguments); + }; + n.tSIntersectionType = n.tsIntersectionType = function(e) { + return (0, r.default)("TSIntersectionType", ...arguments); + }; + n.tSConditionalType = n.tsConditionalType = function(e, t, n, i) { + return (0, r.default)("TSConditionalType", ...arguments); + }; + n.tSInferType = n.tsInferType = function(e) { + return (0, r.default)("TSInferType", ...arguments); + }; + n.tSParenthesizedType = n.tsParenthesizedType = function(e) { + return (0, r.default)("TSParenthesizedType", ...arguments); + }; + n.tSTypeOperator = n.tsTypeOperator = function(e) { + return (0, r.default)("TSTypeOperator", ...arguments); + }; + n.tSIndexedAccessType = n.tsIndexedAccessType = function(e, t) { + return (0, r.default)("TSIndexedAccessType", ...arguments); + }; + n.tSMappedType = n.tsMappedType = function(e, t, n) { + return (0, r.default)("TSMappedType", ...arguments); + }; + n.tSLiteralType = n.tsLiteralType = function(e) { + return (0, r.default)("TSLiteralType", ...arguments); + }; + n.tSExpressionWithTypeArguments = n.tsExpressionWithTypeArguments = function(e, t) { + return (0, r.default)("TSExpressionWithTypeArguments", ...arguments); + }; + n.tSInterfaceDeclaration = n.tsInterfaceDeclaration = function(e, t, n, i) { + return (0, r.default)("TSInterfaceDeclaration", ...arguments); + }; + n.tSInterfaceBody = n.tsInterfaceBody = function(e) { + return (0, r.default)("TSInterfaceBody", ...arguments); + }; + n.tSTypeAliasDeclaration = n.tsTypeAliasDeclaration = function(e, t, n) { + return (0, r.default)("TSTypeAliasDeclaration", ...arguments); + }; + n.tSAsExpression = n.tsAsExpression = function(e, t) { + return (0, r.default)("TSAsExpression", ...arguments); + }; + n.tSTypeAssertion = n.tsTypeAssertion = function(e, t) { + return (0, r.default)("TSTypeAssertion", ...arguments); + }; + n.tSEnumDeclaration = n.tsEnumDeclaration = function(e, t) { + return (0, r.default)("TSEnumDeclaration", ...arguments); + }; + n.tSEnumMember = n.tsEnumMember = function(e, t) { + return (0, r.default)("TSEnumMember", ...arguments); + }; + n.tSModuleDeclaration = n.tsModuleDeclaration = function(e, t) { + return (0, r.default)("TSModuleDeclaration", ...arguments); + }; + n.tSModuleBlock = n.tsModuleBlock = function(e) { + return (0, r.default)("TSModuleBlock", ...arguments); + }; + n.tSImportType = n.tsImportType = function(e, t, n) { + return (0, r.default)("TSImportType", ...arguments); + }; + n.tSImportEqualsDeclaration = n.tsImportEqualsDeclaration = function(e, t) { + return (0, r.default)("TSImportEqualsDeclaration", ...arguments); + }; + n.tSExternalModuleReference = n.tsExternalModuleReference = function(e) { + return (0, r.default)("TSExternalModuleReference", ...arguments); + }; + n.tSNonNullExpression = n.tsNonNullExpression = function(e) { + return (0, r.default)("TSNonNullExpression", ...arguments); + }; + n.tSExportAssignment = n.tsExportAssignment = function(e) { + return (0, r.default)("TSExportAssignment", ...arguments); + }; + n.tSNamespaceExportDeclaration = n.tsNamespaceExportDeclaration = function(e) { + return (0, r.default)("TSNamespaceExportDeclaration", ...arguments); + }; + n.tSTypeAnnotation = n.tsTypeAnnotation = function(e) { + return (0, r.default)("TSTypeAnnotation", ...arguments); + }; + n.tSTypeParameterInstantiation = n.tsTypeParameterInstantiation = function(e) { + return (0, r.default)("TSTypeParameterInstantiation", ...arguments); + }; + n.tSTypeParameterDeclaration = n.tsTypeParameterDeclaration = function(e) { + return (0, r.default)("TSTypeParameterDeclaration", ...arguments); + }; + n.tSTypeParameter = n.tsTypeParameter = function(e, t, n) { + return (0, r.default)("TSTypeParameter", ...arguments); + }; + n.numberLiteral = function(...e) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + return (0, r.default)("NumberLiteral", ...e); + }; + n.regexLiteral = function(...e) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + return (0, r.default)("RegexLiteral", ...e); + }; + n.restProperty = function(...e) { + console.trace("The node type RestProperty has been renamed to RestElement"); + return (0, r.default)("RestProperty", ...e); + }; + n.spreadProperty = function(...e) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + return (0, r.default)("SpreadProperty", ...e); + }; + var r = e("../builder"); + }, { + "../builder": 67 + } ], + 71: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + Object.defineProperty(n, "ArrayExpression", { + enumerable: !0, + get: function() { + return r.arrayExpression; + } + }); + Object.defineProperty(n, "AssignmentExpression", { + enumerable: !0, + get: function() { + return r.assignmentExpression; + } + }); + Object.defineProperty(n, "BinaryExpression", { + enumerable: !0, + get: function() { + return r.binaryExpression; + } + }); + Object.defineProperty(n, "InterpreterDirective", { + enumerable: !0, + get: function() { + return r.interpreterDirective; + } + }); + Object.defineProperty(n, "Directive", { + enumerable: !0, + get: function() { + return r.directive; + } + }); + Object.defineProperty(n, "DirectiveLiteral", { + enumerable: !0, + get: function() { + return r.directiveLiteral; + } + }); + Object.defineProperty(n, "BlockStatement", { + enumerable: !0, + get: function() { + return r.blockStatement; + } + }); + Object.defineProperty(n, "BreakStatement", { + enumerable: !0, + get: function() { + return r.breakStatement; + } + }); + Object.defineProperty(n, "CallExpression", { + enumerable: !0, + get: function() { + return r.callExpression; + } + }); + Object.defineProperty(n, "CatchClause", { + enumerable: !0, + get: function() { + return r.catchClause; + } + }); + Object.defineProperty(n, "ConditionalExpression", { + enumerable: !0, + get: function() { + return r.conditionalExpression; + } + }); + Object.defineProperty(n, "ContinueStatement", { + enumerable: !0, + get: function() { + return r.continueStatement; + } + }); + Object.defineProperty(n, "DebuggerStatement", { + enumerable: !0, + get: function() { + return r.debuggerStatement; + } + }); + Object.defineProperty(n, "DoWhileStatement", { + enumerable: !0, + get: function() { + return r.doWhileStatement; + } + }); + Object.defineProperty(n, "EmptyStatement", { + enumerable: !0, + get: function() { + return r.emptyStatement; + } + }); + Object.defineProperty(n, "ExpressionStatement", { + enumerable: !0, + get: function() { + return r.expressionStatement; + } + }); + Object.defineProperty(n, "File", { + enumerable: !0, + get: function() { + return r.file; + } + }); + Object.defineProperty(n, "ForInStatement", { + enumerable: !0, + get: function() { + return r.forInStatement; + } + }); + Object.defineProperty(n, "ForStatement", { + enumerable: !0, + get: function() { + return r.forStatement; + } + }); + Object.defineProperty(n, "FunctionDeclaration", { + enumerable: !0, + get: function() { + return r.functionDeclaration; + } + }); + Object.defineProperty(n, "FunctionExpression", { + enumerable: !0, + get: function() { + return r.functionExpression; + } + }); + Object.defineProperty(n, "Identifier", { + enumerable: !0, + get: function() { + return r.identifier; + } + }); + Object.defineProperty(n, "IfStatement", { + enumerable: !0, + get: function() { + return r.ifStatement; + } + }); + Object.defineProperty(n, "LabeledStatement", { + enumerable: !0, + get: function() { + return r.labeledStatement; + } + }); + Object.defineProperty(n, "StringLiteral", { + enumerable: !0, + get: function() { + return r.stringLiteral; + } + }); + Object.defineProperty(n, "NumericLiteral", { + enumerable: !0, + get: function() { + return r.numericLiteral; + } + }); + Object.defineProperty(n, "NullLiteral", { + enumerable: !0, + get: function() { + return r.nullLiteral; + } + }); + Object.defineProperty(n, "BooleanLiteral", { + enumerable: !0, + get: function() { + return r.booleanLiteral; + } + }); + Object.defineProperty(n, "RegExpLiteral", { + enumerable: !0, + get: function() { + return r.regExpLiteral; + } + }); + Object.defineProperty(n, "LogicalExpression", { + enumerable: !0, + get: function() { + return r.logicalExpression; + } + }); + Object.defineProperty(n, "MemberExpression", { + enumerable: !0, + get: function() { + return r.memberExpression; + } + }); + Object.defineProperty(n, "NewExpression", { + enumerable: !0, + get: function() { + return r.newExpression; + } + }); + Object.defineProperty(n, "Program", { + enumerable: !0, + get: function() { + return r.program; + } + }); + Object.defineProperty(n, "ObjectExpression", { + enumerable: !0, + get: function() { + return r.objectExpression; + } + }); + Object.defineProperty(n, "ObjectMethod", { + enumerable: !0, + get: function() { + return r.objectMethod; + } + }); + Object.defineProperty(n, "ObjectProperty", { + enumerable: !0, + get: function() { + return r.objectProperty; + } + }); + Object.defineProperty(n, "RestElement", { + enumerable: !0, + get: function() { + return r.restElement; + } + }); + Object.defineProperty(n, "ReturnStatement", { + enumerable: !0, + get: function() { + return r.returnStatement; + } + }); + Object.defineProperty(n, "SequenceExpression", { + enumerable: !0, + get: function() { + return r.sequenceExpression; + } + }); + Object.defineProperty(n, "ParenthesizedExpression", { + enumerable: !0, + get: function() { + return r.parenthesizedExpression; + } + }); + Object.defineProperty(n, "SwitchCase", { + enumerable: !0, + get: function() { + return r.switchCase; + } + }); + Object.defineProperty(n, "SwitchStatement", { + enumerable: !0, + get: function() { + return r.switchStatement; + } + }); + Object.defineProperty(n, "ThisExpression", { + enumerable: !0, + get: function() { + return r.thisExpression; + } + }); + Object.defineProperty(n, "ThrowStatement", { + enumerable: !0, + get: function() { + return r.throwStatement; + } + }); + Object.defineProperty(n, "TryStatement", { + enumerable: !0, + get: function() { + return r.tryStatement; + } + }); + Object.defineProperty(n, "UnaryExpression", { + enumerable: !0, + get: function() { + return r.unaryExpression; + } + }); + Object.defineProperty(n, "UpdateExpression", { + enumerable: !0, + get: function() { + return r.updateExpression; + } + }); + Object.defineProperty(n, "VariableDeclaration", { + enumerable: !0, + get: function() { + return r.variableDeclaration; + } + }); + Object.defineProperty(n, "VariableDeclarator", { + enumerable: !0, + get: function() { + return r.variableDeclarator; + } + }); + Object.defineProperty(n, "WhileStatement", { + enumerable: !0, + get: function() { + return r.whileStatement; + } + }); + Object.defineProperty(n, "WithStatement", { + enumerable: !0, + get: function() { + return r.withStatement; + } + }); + Object.defineProperty(n, "AssignmentPattern", { + enumerable: !0, + get: function() { + return r.assignmentPattern; + } + }); + Object.defineProperty(n, "ArrayPattern", { + enumerable: !0, + get: function() { + return r.arrayPattern; + } + }); + Object.defineProperty(n, "ArrowFunctionExpression", { + enumerable: !0, + get: function() { + return r.arrowFunctionExpression; + } + }); + Object.defineProperty(n, "ClassBody", { + enumerable: !0, + get: function() { + return r.classBody; + } + }); + Object.defineProperty(n, "ClassExpression", { + enumerable: !0, + get: function() { + return r.classExpression; + } + }); + Object.defineProperty(n, "ClassDeclaration", { + enumerable: !0, + get: function() { + return r.classDeclaration; + } + }); + Object.defineProperty(n, "ExportAllDeclaration", { + enumerable: !0, + get: function() { + return r.exportAllDeclaration; + } + }); + Object.defineProperty(n, "ExportDefaultDeclaration", { + enumerable: !0, + get: function() { + return r.exportDefaultDeclaration; + } + }); + Object.defineProperty(n, "ExportNamedDeclaration", { + enumerable: !0, + get: function() { + return r.exportNamedDeclaration; + } + }); + Object.defineProperty(n, "ExportSpecifier", { + enumerable: !0, + get: function() { + return r.exportSpecifier; + } + }); + Object.defineProperty(n, "ForOfStatement", { + enumerable: !0, + get: function() { + return r.forOfStatement; + } + }); + Object.defineProperty(n, "ImportDeclaration", { + enumerable: !0, + get: function() { + return r.importDeclaration; + } + }); + Object.defineProperty(n, "ImportDefaultSpecifier", { + enumerable: !0, + get: function() { + return r.importDefaultSpecifier; + } + }); + Object.defineProperty(n, "ImportNamespaceSpecifier", { + enumerable: !0, + get: function() { + return r.importNamespaceSpecifier; + } + }); + Object.defineProperty(n, "ImportSpecifier", { + enumerable: !0, + get: function() { + return r.importSpecifier; + } + }); + Object.defineProperty(n, "MetaProperty", { + enumerable: !0, + get: function() { + return r.metaProperty; + } + }); + Object.defineProperty(n, "ClassMethod", { + enumerable: !0, + get: function() { + return r.classMethod; + } + }); + Object.defineProperty(n, "ObjectPattern", { + enumerable: !0, + get: function() { + return r.objectPattern; + } + }); + Object.defineProperty(n, "SpreadElement", { + enumerable: !0, + get: function() { + return r.spreadElement; + } + }); + Object.defineProperty(n, "Super", { + enumerable: !0, + get: function() { + return r.super; + } + }); + Object.defineProperty(n, "TaggedTemplateExpression", { + enumerable: !0, + get: function() { + return r.taggedTemplateExpression; + } + }); + Object.defineProperty(n, "TemplateElement", { + enumerable: !0, + get: function() { + return r.templateElement; + } + }); + Object.defineProperty(n, "TemplateLiteral", { + enumerable: !0, + get: function() { + return r.templateLiteral; + } + }); + Object.defineProperty(n, "YieldExpression", { + enumerable: !0, + get: function() { + return r.yieldExpression; + } + }); + Object.defineProperty(n, "AwaitExpression", { + enumerable: !0, + get: function() { + return r.awaitExpression; + } + }); + Object.defineProperty(n, "Import", { + enumerable: !0, + get: function() { + return r.import; + } + }); + Object.defineProperty(n, "BigIntLiteral", { + enumerable: !0, + get: function() { + return r.bigIntLiteral; + } + }); + Object.defineProperty(n, "ExportNamespaceSpecifier", { + enumerable: !0, + get: function() { + return r.exportNamespaceSpecifier; + } + }); + Object.defineProperty(n, "OptionalMemberExpression", { + enumerable: !0, + get: function() { + return r.optionalMemberExpression; + } + }); + Object.defineProperty(n, "OptionalCallExpression", { + enumerable: !0, + get: function() { + return r.optionalCallExpression; + } + }); + Object.defineProperty(n, "ClassProperty", { + enumerable: !0, + get: function() { + return r.classProperty; + } + }); + Object.defineProperty(n, "ClassPrivateProperty", { + enumerable: !0, + get: function() { + return r.classPrivateProperty; + } + }); + Object.defineProperty(n, "ClassPrivateMethod", { + enumerable: !0, + get: function() { + return r.classPrivateMethod; + } + }); + Object.defineProperty(n, "PrivateName", { + enumerable: !0, + get: function() { + return r.privateName; + } + }); + Object.defineProperty(n, "AnyTypeAnnotation", { + enumerable: !0, + get: function() { + return r.anyTypeAnnotation; + } + }); + Object.defineProperty(n, "ArrayTypeAnnotation", { + enumerable: !0, + get: function() { + return r.arrayTypeAnnotation; + } + }); + Object.defineProperty(n, "BooleanTypeAnnotation", { + enumerable: !0, + get: function() { + return r.booleanTypeAnnotation; + } + }); + Object.defineProperty(n, "BooleanLiteralTypeAnnotation", { + enumerable: !0, + get: function() { + return r.booleanLiteralTypeAnnotation; + } + }); + Object.defineProperty(n, "NullLiteralTypeAnnotation", { + enumerable: !0, + get: function() { + return r.nullLiteralTypeAnnotation; + } + }); + Object.defineProperty(n, "ClassImplements", { + enumerable: !0, + get: function() { + return r.classImplements; + } + }); + Object.defineProperty(n, "DeclareClass", { + enumerable: !0, + get: function() { + return r.declareClass; + } + }); + Object.defineProperty(n, "DeclareFunction", { + enumerable: !0, + get: function() { + return r.declareFunction; + } + }); + Object.defineProperty(n, "DeclareInterface", { + enumerable: !0, + get: function() { + return r.declareInterface; + } + }); + Object.defineProperty(n, "DeclareModule", { + enumerable: !0, + get: function() { + return r.declareModule; + } + }); + Object.defineProperty(n, "DeclareModuleExports", { + enumerable: !0, + get: function() { + return r.declareModuleExports; + } + }); + Object.defineProperty(n, "DeclareTypeAlias", { + enumerable: !0, + get: function() { + return r.declareTypeAlias; + } + }); + Object.defineProperty(n, "DeclareOpaqueType", { + enumerable: !0, + get: function() { + return r.declareOpaqueType; + } + }); + Object.defineProperty(n, "DeclareVariable", { + enumerable: !0, + get: function() { + return r.declareVariable; + } + }); + Object.defineProperty(n, "DeclareExportDeclaration", { + enumerable: !0, + get: function() { + return r.declareExportDeclaration; + } + }); + Object.defineProperty(n, "DeclareExportAllDeclaration", { + enumerable: !0, + get: function() { + return r.declareExportAllDeclaration; + } + }); + Object.defineProperty(n, "DeclaredPredicate", { + enumerable: !0, + get: function() { + return r.declaredPredicate; + } + }); + Object.defineProperty(n, "ExistsTypeAnnotation", { + enumerable: !0, + get: function() { + return r.existsTypeAnnotation; + } + }); + Object.defineProperty(n, "FunctionTypeAnnotation", { + enumerable: !0, + get: function() { + return r.functionTypeAnnotation; + } + }); + Object.defineProperty(n, "FunctionTypeParam", { + enumerable: !0, + get: function() { + return r.functionTypeParam; + } + }); + Object.defineProperty(n, "GenericTypeAnnotation", { + enumerable: !0, + get: function() { + return r.genericTypeAnnotation; + } + }); + Object.defineProperty(n, "InferredPredicate", { + enumerable: !0, + get: function() { + return r.inferredPredicate; + } + }); + Object.defineProperty(n, "InterfaceExtends", { + enumerable: !0, + get: function() { + return r.interfaceExtends; + } + }); + Object.defineProperty(n, "InterfaceDeclaration", { + enumerable: !0, + get: function() { + return r.interfaceDeclaration; + } + }); + Object.defineProperty(n, "InterfaceTypeAnnotation", { + enumerable: !0, + get: function() { + return r.interfaceTypeAnnotation; + } + }); + Object.defineProperty(n, "IntersectionTypeAnnotation", { + enumerable: !0, + get: function() { + return r.intersectionTypeAnnotation; + } + }); + Object.defineProperty(n, "MixedTypeAnnotation", { + enumerable: !0, + get: function() { + return r.mixedTypeAnnotation; + } + }); + Object.defineProperty(n, "EmptyTypeAnnotation", { + enumerable: !0, + get: function() { + return r.emptyTypeAnnotation; + } + }); + Object.defineProperty(n, "NullableTypeAnnotation", { + enumerable: !0, + get: function() { + return r.nullableTypeAnnotation; + } + }); + Object.defineProperty(n, "NumberLiteralTypeAnnotation", { + enumerable: !0, + get: function() { + return r.numberLiteralTypeAnnotation; + } + }); + Object.defineProperty(n, "NumberTypeAnnotation", { + enumerable: !0, + get: function() { + return r.numberTypeAnnotation; + } + }); + Object.defineProperty(n, "ObjectTypeAnnotation", { + enumerable: !0, + get: function() { + return r.objectTypeAnnotation; + } + }); + Object.defineProperty(n, "ObjectTypeInternalSlot", { + enumerable: !0, + get: function() { + return r.objectTypeInternalSlot; + } + }); + Object.defineProperty(n, "ObjectTypeCallProperty", { + enumerable: !0, + get: function() { + return r.objectTypeCallProperty; + } + }); + Object.defineProperty(n, "ObjectTypeIndexer", { + enumerable: !0, + get: function() { + return r.objectTypeIndexer; + } + }); + Object.defineProperty(n, "ObjectTypeProperty", { + enumerable: !0, + get: function() { + return r.objectTypeProperty; + } + }); + Object.defineProperty(n, "ObjectTypeSpreadProperty", { + enumerable: !0, + get: function() { + return r.objectTypeSpreadProperty; + } + }); + Object.defineProperty(n, "OpaqueType", { + enumerable: !0, + get: function() { + return r.opaqueType; + } + }); + Object.defineProperty(n, "QualifiedTypeIdentifier", { + enumerable: !0, + get: function() { + return r.qualifiedTypeIdentifier; + } + }); + Object.defineProperty(n, "StringLiteralTypeAnnotation", { + enumerable: !0, + get: function() { + return r.stringLiteralTypeAnnotation; + } + }); + Object.defineProperty(n, "StringTypeAnnotation", { + enumerable: !0, + get: function() { + return r.stringTypeAnnotation; + } + }); + Object.defineProperty(n, "SymbolTypeAnnotation", { + enumerable: !0, + get: function() { + return r.symbolTypeAnnotation; + } + }); + Object.defineProperty(n, "ThisTypeAnnotation", { + enumerable: !0, + get: function() { + return r.thisTypeAnnotation; + } + }); + Object.defineProperty(n, "TupleTypeAnnotation", { + enumerable: !0, + get: function() { + return r.tupleTypeAnnotation; + } + }); + Object.defineProperty(n, "TypeofTypeAnnotation", { + enumerable: !0, + get: function() { + return r.typeofTypeAnnotation; + } + }); + Object.defineProperty(n, "TypeAlias", { + enumerable: !0, + get: function() { + return r.typeAlias; + } + }); + Object.defineProperty(n, "TypeAnnotation", { + enumerable: !0, + get: function() { + return r.typeAnnotation; + } + }); + Object.defineProperty(n, "TypeCastExpression", { + enumerable: !0, + get: function() { + return r.typeCastExpression; + } + }); + Object.defineProperty(n, "TypeParameter", { + enumerable: !0, + get: function() { + return r.typeParameter; + } + }); + Object.defineProperty(n, "TypeParameterDeclaration", { + enumerable: !0, + get: function() { + return r.typeParameterDeclaration; + } + }); + Object.defineProperty(n, "TypeParameterInstantiation", { + enumerable: !0, + get: function() { + return r.typeParameterInstantiation; + } + }); + Object.defineProperty(n, "UnionTypeAnnotation", { + enumerable: !0, + get: function() { + return r.unionTypeAnnotation; + } + }); + Object.defineProperty(n, "Variance", { + enumerable: !0, + get: function() { + return r.variance; + } + }); + Object.defineProperty(n, "VoidTypeAnnotation", { + enumerable: !0, + get: function() { + return r.voidTypeAnnotation; + } + }); + Object.defineProperty(n, "EnumDeclaration", { + enumerable: !0, + get: function() { + return r.enumDeclaration; + } + }); + Object.defineProperty(n, "EnumBooleanBody", { + enumerable: !0, + get: function() { + return r.enumBooleanBody; + } + }); + Object.defineProperty(n, "EnumNumberBody", { + enumerable: !0, + get: function() { + return r.enumNumberBody; + } + }); + Object.defineProperty(n, "EnumStringBody", { + enumerable: !0, + get: function() { + return r.enumStringBody; + } + }); + Object.defineProperty(n, "EnumSymbolBody", { + enumerable: !0, + get: function() { + return r.enumSymbolBody; + } + }); + Object.defineProperty(n, "EnumBooleanMember", { + enumerable: !0, + get: function() { + return r.enumBooleanMember; + } + }); + Object.defineProperty(n, "EnumNumberMember", { + enumerable: !0, + get: function() { + return r.enumNumberMember; + } + }); + Object.defineProperty(n, "EnumStringMember", { + enumerable: !0, + get: function() { + return r.enumStringMember; + } + }); + Object.defineProperty(n, "EnumDefaultedMember", { + enumerable: !0, + get: function() { + return r.enumDefaultedMember; + } + }); + Object.defineProperty(n, "IndexedAccessType", { + enumerable: !0, + get: function() { + return r.indexedAccessType; + } + }); + Object.defineProperty(n, "OptionalIndexedAccessType", { + enumerable: !0, + get: function() { + return r.optionalIndexedAccessType; + } + }); + Object.defineProperty(n, "JSXAttribute", { + enumerable: !0, + get: function() { + return r.jsxAttribute; + } + }); + Object.defineProperty(n, "JSXClosingElement", { + enumerable: !0, + get: function() { + return r.jsxClosingElement; + } + }); + Object.defineProperty(n, "JSXElement", { + enumerable: !0, + get: function() { + return r.jsxElement; + } + }); + Object.defineProperty(n, "JSXEmptyExpression", { + enumerable: !0, + get: function() { + return r.jsxEmptyExpression; + } + }); + Object.defineProperty(n, "JSXExpressionContainer", { + enumerable: !0, + get: function() { + return r.jsxExpressionContainer; + } + }); + Object.defineProperty(n, "JSXSpreadChild", { + enumerable: !0, + get: function() { + return r.jsxSpreadChild; + } + }); + Object.defineProperty(n, "JSXIdentifier", { + enumerable: !0, + get: function() { + return r.jsxIdentifier; + } + }); + Object.defineProperty(n, "JSXMemberExpression", { + enumerable: !0, + get: function() { + return r.jsxMemberExpression; + } + }); + Object.defineProperty(n, "JSXNamespacedName", { + enumerable: !0, + get: function() { + return r.jsxNamespacedName; + } + }); + Object.defineProperty(n, "JSXOpeningElement", { + enumerable: !0, + get: function() { + return r.jsxOpeningElement; + } + }); + Object.defineProperty(n, "JSXSpreadAttribute", { + enumerable: !0, + get: function() { + return r.jsxSpreadAttribute; + } + }); + Object.defineProperty(n, "JSXText", { + enumerable: !0, + get: function() { + return r.jsxText; + } + }); + Object.defineProperty(n, "JSXFragment", { + enumerable: !0, + get: function() { + return r.jsxFragment; + } + }); + Object.defineProperty(n, "JSXOpeningFragment", { + enumerable: !0, + get: function() { + return r.jsxOpeningFragment; + } + }); + Object.defineProperty(n, "JSXClosingFragment", { + enumerable: !0, + get: function() { + return r.jsxClosingFragment; + } + }); + Object.defineProperty(n, "Noop", { + enumerable: !0, + get: function() { + return r.noop; + } + }); + Object.defineProperty(n, "Placeholder", { + enumerable: !0, + get: function() { + return r.placeholder; + } + }); + Object.defineProperty(n, "V8IntrinsicIdentifier", { + enumerable: !0, + get: function() { + return r.v8IntrinsicIdentifier; + } + }); + Object.defineProperty(n, "ArgumentPlaceholder", { + enumerable: !0, + get: function() { + return r.argumentPlaceholder; + } + }); + Object.defineProperty(n, "BindExpression", { + enumerable: !0, + get: function() { + return r.bindExpression; + } + }); + Object.defineProperty(n, "ImportAttribute", { + enumerable: !0, + get: function() { + return r.importAttribute; + } + }); + Object.defineProperty(n, "Decorator", { + enumerable: !0, + get: function() { + return r.decorator; + } + }); + Object.defineProperty(n, "DoExpression", { + enumerable: !0, + get: function() { + return r.doExpression; + } + }); + Object.defineProperty(n, "ExportDefaultSpecifier", { + enumerable: !0, + get: function() { + return r.exportDefaultSpecifier; + } + }); + Object.defineProperty(n, "RecordExpression", { + enumerable: !0, + get: function() { + return r.recordExpression; + } + }); + Object.defineProperty(n, "TupleExpression", { + enumerable: !0, + get: function() { + return r.tupleExpression; + } + }); + Object.defineProperty(n, "DecimalLiteral", { + enumerable: !0, + get: function() { + return r.decimalLiteral; + } + }); + Object.defineProperty(n, "StaticBlock", { + enumerable: !0, + get: function() { + return r.staticBlock; + } + }); + Object.defineProperty(n, "ModuleExpression", { + enumerable: !0, + get: function() { + return r.moduleExpression; + } + }); + Object.defineProperty(n, "TopicReference", { + enumerable: !0, + get: function() { + return r.topicReference; + } + }); + Object.defineProperty(n, "PipelineTopicExpression", { + enumerable: !0, + get: function() { + return r.pipelineTopicExpression; + } + }); + Object.defineProperty(n, "PipelineBareFunction", { + enumerable: !0, + get: function() { + return r.pipelineBareFunction; + } + }); + Object.defineProperty(n, "PipelinePrimaryTopicReference", { + enumerable: !0, + get: function() { + return r.pipelinePrimaryTopicReference; + } + }); + Object.defineProperty(n, "TSParameterProperty", { + enumerable: !0, + get: function() { + return r.tsParameterProperty; + } + }); + Object.defineProperty(n, "TSDeclareFunction", { + enumerable: !0, + get: function() { + return r.tsDeclareFunction; + } + }); + Object.defineProperty(n, "TSDeclareMethod", { + enumerable: !0, + get: function() { + return r.tsDeclareMethod; + } + }); + Object.defineProperty(n, "TSQualifiedName", { + enumerable: !0, + get: function() { + return r.tsQualifiedName; + } + }); + Object.defineProperty(n, "TSCallSignatureDeclaration", { + enumerable: !0, + get: function() { + return r.tsCallSignatureDeclaration; + } + }); + Object.defineProperty(n, "TSConstructSignatureDeclaration", { + enumerable: !0, + get: function() { + return r.tsConstructSignatureDeclaration; + } + }); + Object.defineProperty(n, "TSPropertySignature", { + enumerable: !0, + get: function() { + return r.tsPropertySignature; + } + }); + Object.defineProperty(n, "TSMethodSignature", { + enumerable: !0, + get: function() { + return r.tsMethodSignature; + } + }); + Object.defineProperty(n, "TSIndexSignature", { + enumerable: !0, + get: function() { + return r.tsIndexSignature; + } + }); + Object.defineProperty(n, "TSAnyKeyword", { + enumerable: !0, + get: function() { + return r.tsAnyKeyword; + } + }); + Object.defineProperty(n, "TSBooleanKeyword", { + enumerable: !0, + get: function() { + return r.tsBooleanKeyword; + } + }); + Object.defineProperty(n, "TSBigIntKeyword", { + enumerable: !0, + get: function() { + return r.tsBigIntKeyword; + } + }); + Object.defineProperty(n, "TSIntrinsicKeyword", { + enumerable: !0, + get: function() { + return r.tsIntrinsicKeyword; + } + }); + Object.defineProperty(n, "TSNeverKeyword", { + enumerable: !0, + get: function() { + return r.tsNeverKeyword; + } + }); + Object.defineProperty(n, "TSNullKeyword", { + enumerable: !0, + get: function() { + return r.tsNullKeyword; + } + }); + Object.defineProperty(n, "TSNumberKeyword", { + enumerable: !0, + get: function() { + return r.tsNumberKeyword; + } + }); + Object.defineProperty(n, "TSObjectKeyword", { + enumerable: !0, + get: function() { + return r.tsObjectKeyword; + } + }); + Object.defineProperty(n, "TSStringKeyword", { + enumerable: !0, + get: function() { + return r.tsStringKeyword; + } + }); + Object.defineProperty(n, "TSSymbolKeyword", { + enumerable: !0, + get: function() { + return r.tsSymbolKeyword; + } + }); + Object.defineProperty(n, "TSUndefinedKeyword", { + enumerable: !0, + get: function() { + return r.tsUndefinedKeyword; + } + }); + Object.defineProperty(n, "TSUnknownKeyword", { + enumerable: !0, + get: function() { + return r.tsUnknownKeyword; + } + }); + Object.defineProperty(n, "TSVoidKeyword", { + enumerable: !0, + get: function() { + return r.tsVoidKeyword; + } + }); + Object.defineProperty(n, "TSThisType", { + enumerable: !0, + get: function() { + return r.tsThisType; + } + }); + Object.defineProperty(n, "TSFunctionType", { + enumerable: !0, + get: function() { + return r.tsFunctionType; + } + }); + Object.defineProperty(n, "TSConstructorType", { + enumerable: !0, + get: function() { + return r.tsConstructorType; + } + }); + Object.defineProperty(n, "TSTypeReference", { + enumerable: !0, + get: function() { + return r.tsTypeReference; + } + }); + Object.defineProperty(n, "TSTypePredicate", { + enumerable: !0, + get: function() { + return r.tsTypePredicate; + } + }); + Object.defineProperty(n, "TSTypeQuery", { + enumerable: !0, + get: function() { + return r.tsTypeQuery; + } + }); + Object.defineProperty(n, "TSTypeLiteral", { + enumerable: !0, + get: function() { + return r.tsTypeLiteral; + } + }); + Object.defineProperty(n, "TSArrayType", { + enumerable: !0, + get: function() { + return r.tsArrayType; + } + }); + Object.defineProperty(n, "TSTupleType", { + enumerable: !0, + get: function() { + return r.tsTupleType; + } + }); + Object.defineProperty(n, "TSOptionalType", { + enumerable: !0, + get: function() { + return r.tsOptionalType; + } + }); + Object.defineProperty(n, "TSRestType", { + enumerable: !0, + get: function() { + return r.tsRestType; + } + }); + Object.defineProperty(n, "TSNamedTupleMember", { + enumerable: !0, + get: function() { + return r.tsNamedTupleMember; + } + }); + Object.defineProperty(n, "TSUnionType", { + enumerable: !0, + get: function() { + return r.tsUnionType; + } + }); + Object.defineProperty(n, "TSIntersectionType", { + enumerable: !0, + get: function() { + return r.tsIntersectionType; + } + }); + Object.defineProperty(n, "TSConditionalType", { + enumerable: !0, + get: function() { + return r.tsConditionalType; + } + }); + Object.defineProperty(n, "TSInferType", { + enumerable: !0, + get: function() { + return r.tsInferType; + } + }); + Object.defineProperty(n, "TSParenthesizedType", { + enumerable: !0, + get: function() { + return r.tsParenthesizedType; + } + }); + Object.defineProperty(n, "TSTypeOperator", { + enumerable: !0, + get: function() { + return r.tsTypeOperator; + } + }); + Object.defineProperty(n, "TSIndexedAccessType", { + enumerable: !0, + get: function() { + return r.tsIndexedAccessType; + } + }); + Object.defineProperty(n, "TSMappedType", { + enumerable: !0, + get: function() { + return r.tsMappedType; + } + }); + Object.defineProperty(n, "TSLiteralType", { + enumerable: !0, + get: function() { + return r.tsLiteralType; + } + }); + Object.defineProperty(n, "TSExpressionWithTypeArguments", { + enumerable: !0, + get: function() { + return r.tsExpressionWithTypeArguments; + } + }); + Object.defineProperty(n, "TSInterfaceDeclaration", { + enumerable: !0, + get: function() { + return r.tsInterfaceDeclaration; + } + }); + Object.defineProperty(n, "TSInterfaceBody", { + enumerable: !0, + get: function() { + return r.tsInterfaceBody; + } + }); + Object.defineProperty(n, "TSTypeAliasDeclaration", { + enumerable: !0, + get: function() { + return r.tsTypeAliasDeclaration; + } + }); + Object.defineProperty(n, "TSAsExpression", { + enumerable: !0, + get: function() { + return r.tsAsExpression; + } + }); + Object.defineProperty(n, "TSTypeAssertion", { + enumerable: !0, + get: function() { + return r.tsTypeAssertion; + } + }); + Object.defineProperty(n, "TSEnumDeclaration", { + enumerable: !0, + get: function() { + return r.tsEnumDeclaration; + } + }); + Object.defineProperty(n, "TSEnumMember", { + enumerable: !0, + get: function() { + return r.tsEnumMember; + } + }); + Object.defineProperty(n, "TSModuleDeclaration", { + enumerable: !0, + get: function() { + return r.tsModuleDeclaration; + } + }); + Object.defineProperty(n, "TSModuleBlock", { + enumerable: !0, + get: function() { + return r.tsModuleBlock; + } + }); + Object.defineProperty(n, "TSImportType", { + enumerable: !0, + get: function() { + return r.tsImportType; + } + }); + Object.defineProperty(n, "TSImportEqualsDeclaration", { + enumerable: !0, + get: function() { + return r.tsImportEqualsDeclaration; + } + }); + Object.defineProperty(n, "TSExternalModuleReference", { + enumerable: !0, + get: function() { + return r.tsExternalModuleReference; + } + }); + Object.defineProperty(n, "TSNonNullExpression", { + enumerable: !0, + get: function() { + return r.tsNonNullExpression; + } + }); + Object.defineProperty(n, "TSExportAssignment", { + enumerable: !0, + get: function() { + return r.tsExportAssignment; + } + }); + Object.defineProperty(n, "TSNamespaceExportDeclaration", { + enumerable: !0, + get: function() { + return r.tsNamespaceExportDeclaration; + } + }); + Object.defineProperty(n, "TSTypeAnnotation", { + enumerable: !0, + get: function() { + return r.tsTypeAnnotation; + } + }); + Object.defineProperty(n, "TSTypeParameterInstantiation", { + enumerable: !0, + get: function() { + return r.tsTypeParameterInstantiation; + } + }); + Object.defineProperty(n, "TSTypeParameterDeclaration", { + enumerable: !0, + get: function() { + return r.tsTypeParameterDeclaration; + } + }); + Object.defineProperty(n, "TSTypeParameter", { + enumerable: !0, + get: function() { + return r.tsTypeParameter; + } + }); + Object.defineProperty(n, "NumberLiteral", { + enumerable: !0, + get: function() { + return r.numberLiteral; + } + }); + Object.defineProperty(n, "RegexLiteral", { + enumerable: !0, + get: function() { + return r.regexLiteral; + } + }); + Object.defineProperty(n, "RestProperty", { + enumerable: !0, + get: function() { + return r.restProperty; + } + }); + Object.defineProperty(n, "SpreadProperty", { + enumerable: !0, + get: function() { + return r.spreadProperty; + } + }); + var r = e("./index"); + }, { + "./index": 70 + } ], + 72: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + const t = []; + for (let n = 0; n < e.children.length; n++) { + let s = e.children[n]; + if ((0, r.isJSXText)(s)) (0, i.default)(s, t); else { + (0, r.isJSXExpressionContainer)(s) && (s = s.expression); + (0, r.isJSXEmptyExpression)(s) || t.push(s); + } + } + return t; + }; + r = e("../../validators/generated"); + i = e("../../utils/react/cleanJSXElementLiteralChild"); + }, { + "../../utils/react/cleanJSXElementLiteralChild": 121, + "../../validators/generated": 124 + } ], + 73: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + const t = e.map(e => e.typeAnnotation); + const n = (0, i.default)(t); + return 1 === n.length ? n[0] : (0, r.tsUnionType)(n); + }; + r = e("../generated"); + i = e("../../modifications/typescript/removeTypeDuplicates"); + }, { + "../../modifications/typescript/removeTypeDuplicates": 115, + "../generated": 70 + } ], + 74: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.default)(e, !1); + }; + var r = e("./cloneNode"); + }, { + "./cloneNode": 77 + } ], + 75: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.default)(e); + }; + var r = e("./cloneNode"); + }, { + "./cloneNode": 77 + } ], + 76: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.default)(e, !0, !0); + }; + var r = e("./cloneNode"); + }, { + "./cloneNode": 77 + } ], + 77: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = l; + r = e("../definitions"); + i = e("../validators/generated"); + const s = Function.call.bind(Object.prototype.hasOwnProperty); + function a(e, t, n) { + return e && "string" == typeof e.type ? l(e, t, n) : e; + } + function o(e, t, n) { + return Array.isArray(e) ? e.map(e => a(e, t, n)) : a(e, t, n); + } + function l(e, t = !0, n = !1) { + if (!e) return e; + const {type: a} = e; + const l = { + type: e.type + }; + if ((0, i.isIdentifier)(e)) { + l.name = e.name; + s(e, "optional") && "boolean" == typeof e.optional && (l.optional = e.optional); + s(e, "typeAnnotation") && (l.typeAnnotation = t ? o(e.typeAnnotation, !0, n) : e.typeAnnotation); + } else { + if (!s(r.NODE_FIELDS, a)) throw new Error(`Unknown node type: "${a}"`); + for (const p of Object.keys(r.NODE_FIELDS[a])) s(e, p) && (l[p] = t ? (0, i.isFile)(e) && "comments" === p ? c(e.comments, t, n) : o(e[p], !0, n) : e[p]); + } + s(e, "loc") && (l.loc = n ? null : e.loc); + s(e, "leadingComments") && (l.leadingComments = c(e.leadingComments, t, n)); + s(e, "innerComments") && (l.innerComments = c(e.innerComments, t, n)); + s(e, "trailingComments") && (l.trailingComments = c(e.trailingComments, t, n)); + s(e, "extra") && (l.extra = Object.assign({}, e.extra)); + return l; + } + function c(e, t, n) { + return e && t ? e.map(({type: e, value: t, loc: r}) => n ? { + type: e, + value: t, + loc: null + } : { + type: e, + value: t, + loc: r + }) : e; + } + }, { + "../definitions": 102, + "../validators/generated": 124 + } ], + 78: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.default)(e, !1, !0); + }; + var r = e("./cloneNode"); + }, { + "./cloneNode": 77 + } ], + 79: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n, i) { + return (0, r.default)(e, t, [ { + type: i ? "CommentLine" : "CommentBlock", + value: n + } ]); + }; + var r = e("./addComments"); + }, { + "./addComments": 80 + } ], + 80: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + if (!n || !e) return e; + const r = `${t}Comments`; + e[r] ? "leading" === t ? e[r] = n.concat(e[r]) : e[r].push(...n) : e[r] = n; + return e; + }; + }, {} ], + 81: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + (0, r.default)("innerComments", e, t); + }; + var r = e("../utils/inherit"); + }, { + "../utils/inherit": 120 + } ], + 82: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + (0, r.default)("leadingComments", e, t); + }; + var r = e("../utils/inherit"); + }, { + "../utils/inherit": 120 + } ], + 83: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + (0, r.default)("trailingComments", e, t); + }; + var r = e("../utils/inherit"); + }, { + "../utils/inherit": 120 + } ], + 84: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + (0, r.default)(e, t); + (0, i.default)(e, t); + (0, s.default)(e, t); + return e; + }; + r = e("./inheritTrailingComments"); + i = e("./inheritLeadingComments"); + s = e("./inheritInnerComments"); + }, { + "./inheritInnerComments": 81, + "./inheritLeadingComments": 82, + "./inheritTrailingComments": 83 + } ], + 85: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + r.COMMENT_KEYS.forEach(t => { + e[t] = null; + }); + return e; + }; + var r = e("../constants"); + }, { + "../constants": 87 + } ], + 86: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.TSBASETYPE_TYPES = n.TSTYPE_TYPES = n.TSTYPEELEMENT_TYPES = n.JSX_TYPES = n.ENUMMEMBER_TYPES = n.ENUMBODY_TYPES = n.FLOWPREDICATE_TYPES = n.FLOWDECLARATION_TYPES = n.FLOWBASEANNOTATION_TYPES = n.FLOWTYPE_TYPES = n.FLOW_TYPES = n.PRIVATE_TYPES = n.MODULESPECIFIER_TYPES = n.EXPORTDECLARATION_TYPES = n.MODULEDECLARATION_TYPES = n.CLASS_TYPES = n.PATTERN_TYPES = n.UNARYLIKE_TYPES = n.PROPERTY_TYPES = n.OBJECTMEMBER_TYPES = n.METHOD_TYPES = n.USERWHITESPACABLE_TYPES = n.IMMUTABLE_TYPES = n.LITERAL_TYPES = n.TSENTITYNAME_TYPES = n.LVAL_TYPES = n.PATTERNLIKE_TYPES = n.DECLARATION_TYPES = n.PUREISH_TYPES = n.FUNCTIONPARENT_TYPES = n.FUNCTION_TYPES = n.FORXSTATEMENT_TYPES = n.FOR_TYPES = n.EXPRESSIONWRAPPER_TYPES = n.WHILE_TYPES = n.LOOP_TYPES = n.CONDITIONAL_TYPES = n.COMPLETIONSTATEMENT_TYPES = n.TERMINATORLESS_TYPES = n.STATEMENT_TYPES = n.BLOCK_TYPES = n.BLOCKPARENT_TYPES = n.SCOPABLE_TYPES = n.BINARY_TYPES = n.EXPRESSION_TYPES = void 0; + var r = e("../../definitions"); + const i = r.FLIPPED_ALIAS_KEYS.Expression; + n.EXPRESSION_TYPES = i; + const s = r.FLIPPED_ALIAS_KEYS.Binary; + n.BINARY_TYPES = s; + const a = r.FLIPPED_ALIAS_KEYS.Scopable; + n.SCOPABLE_TYPES = a; + const o = r.FLIPPED_ALIAS_KEYS.BlockParent; + n.BLOCKPARENT_TYPES = o; + const l = r.FLIPPED_ALIAS_KEYS.Block; + n.BLOCK_TYPES = l; + const c = r.FLIPPED_ALIAS_KEYS.Statement; + n.STATEMENT_TYPES = c; + const p = r.FLIPPED_ALIAS_KEYS.Terminatorless; + n.TERMINATORLESS_TYPES = p; + const u = r.FLIPPED_ALIAS_KEYS.CompletionStatement; + n.COMPLETIONSTATEMENT_TYPES = u; + const d = r.FLIPPED_ALIAS_KEYS.Conditional; + n.CONDITIONAL_TYPES = d; + const h = r.FLIPPED_ALIAS_KEYS.Loop; + n.LOOP_TYPES = h; + const f = r.FLIPPED_ALIAS_KEYS.While; + n.WHILE_TYPES = f; + const m = r.FLIPPED_ALIAS_KEYS.ExpressionWrapper; + n.EXPRESSIONWRAPPER_TYPES = m; + const y = r.FLIPPED_ALIAS_KEYS.For; + n.FOR_TYPES = y; + const g = r.FLIPPED_ALIAS_KEYS.ForXStatement; + n.FORXSTATEMENT_TYPES = g; + const T = r.FLIPPED_ALIAS_KEYS.Function; + n.FUNCTION_TYPES = T; + const b = r.FLIPPED_ALIAS_KEYS.FunctionParent; + n.FUNCTIONPARENT_TYPES = b; + const S = r.FLIPPED_ALIAS_KEYS.Pureish; + n.PUREISH_TYPES = S; + const x = r.FLIPPED_ALIAS_KEYS.Declaration; + n.DECLARATION_TYPES = x; + const E = r.FLIPPED_ALIAS_KEYS.PatternLike; + n.PATTERNLIKE_TYPES = E; + const P = r.FLIPPED_ALIAS_KEYS.LVal; + n.LVAL_TYPES = P; + const v = r.FLIPPED_ALIAS_KEYS.TSEntityName; + n.TSENTITYNAME_TYPES = v; + const A = r.FLIPPED_ALIAS_KEYS.Literal; + n.LITERAL_TYPES = A; + const w = r.FLIPPED_ALIAS_KEYS.Immutable; + n.IMMUTABLE_TYPES = w; + const C = r.FLIPPED_ALIAS_KEYS.UserWhitespacable; + n.USERWHITESPACABLE_TYPES = C; + const I = r.FLIPPED_ALIAS_KEYS.Method; + n.METHOD_TYPES = I; + const O = r.FLIPPED_ALIAS_KEYS.ObjectMember; + n.OBJECTMEMBER_TYPES = O; + const N = r.FLIPPED_ALIAS_KEYS.Property; + n.PROPERTY_TYPES = N; + const k = r.FLIPPED_ALIAS_KEYS.UnaryLike; + n.UNARYLIKE_TYPES = k; + const D = r.FLIPPED_ALIAS_KEYS.Pattern; + n.PATTERN_TYPES = D; + const M = r.FLIPPED_ALIAS_KEYS.Class; + n.CLASS_TYPES = M; + const _ = r.FLIPPED_ALIAS_KEYS.ModuleDeclaration; + n.MODULEDECLARATION_TYPES = _; + const L = r.FLIPPED_ALIAS_KEYS.ExportDeclaration; + n.EXPORTDECLARATION_TYPES = L; + const j = r.FLIPPED_ALIAS_KEYS.ModuleSpecifier; + n.MODULESPECIFIER_TYPES = j; + const F = r.FLIPPED_ALIAS_KEYS.Private; + n.PRIVATE_TYPES = F; + const B = r.FLIPPED_ALIAS_KEYS.Flow; + n.FLOW_TYPES = B; + const R = r.FLIPPED_ALIAS_KEYS.FlowType; + n.FLOWTYPE_TYPES = R; + const U = r.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation; + n.FLOWBASEANNOTATION_TYPES = U; + const V = r.FLIPPED_ALIAS_KEYS.FlowDeclaration; + n.FLOWDECLARATION_TYPES = V; + const K = r.FLIPPED_ALIAS_KEYS.FlowPredicate; + n.FLOWPREDICATE_TYPES = K; + const W = r.FLIPPED_ALIAS_KEYS.EnumBody; + n.ENUMBODY_TYPES = W; + const q = r.FLIPPED_ALIAS_KEYS.EnumMember; + n.ENUMMEMBER_TYPES = q; + const Y = r.FLIPPED_ALIAS_KEYS.JSX; + n.JSX_TYPES = Y; + const J = r.FLIPPED_ALIAS_KEYS.TSTypeElement; + n.TSTYPEELEMENT_TYPES = J; + const X = r.FLIPPED_ALIAS_KEYS.TSType; + n.TSTYPE_TYPES = X; + const G = r.FLIPPED_ALIAS_KEYS.TSBaseType; + n.TSBASETYPE_TYPES = G; + }, { + "../../definitions": 102 + } ], + 87: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.NOT_LOCAL_BINDING = n.BLOCK_SCOPED_SYMBOL = n.INHERIT_KEYS = n.UNARY_OPERATORS = n.STRING_UNARY_OPERATORS = n.NUMBER_UNARY_OPERATORS = n.BOOLEAN_UNARY_OPERATORS = n.ASSIGNMENT_OPERATORS = n.BINARY_OPERATORS = n.NUMBER_BINARY_OPERATORS = n.BOOLEAN_BINARY_OPERATORS = n.COMPARISON_BINARY_OPERATORS = n.EQUALITY_BINARY_OPERATORS = n.BOOLEAN_NUMBER_BINARY_OPERATORS = n.UPDATE_OPERATORS = n.LOGICAL_OPERATORS = n.COMMENT_KEYS = n.FOR_INIT_KEYS = n.FLATTENABLE_KEYS = n.STATEMENT_OR_BLOCK_KEYS = void 0; + n.STATEMENT_OR_BLOCK_KEYS = [ "consequent", "body", "alternate" ]; + n.FLATTENABLE_KEYS = [ "body", "expressions" ]; + n.FOR_INIT_KEYS = [ "left", "init" ]; + n.COMMENT_KEYS = [ "leadingComments", "trailingComments", "innerComments" ]; + const r = [ "||", "&&", "??" ]; + n.LOGICAL_OPERATORS = r; + n.UPDATE_OPERATORS = [ "++", "--" ]; + const i = [ ">", "<", ">=", "<=" ]; + n.BOOLEAN_NUMBER_BINARY_OPERATORS = i; + const s = [ "==", "===", "!=", "!==" ]; + n.EQUALITY_BINARY_OPERATORS = s; + const a = [ ...s, "in", "instanceof" ]; + n.COMPARISON_BINARY_OPERATORS = a; + const o = [ ...a, ...i ]; + n.BOOLEAN_BINARY_OPERATORS = o; + const l = [ "-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^" ]; + n.NUMBER_BINARY_OPERATORS = l; + const c = [ "+", ...l, ...o ]; + n.BINARY_OPERATORS = c; + const p = [ "=", "+=", ...l.map(e => e + "="), ...r.map(e => e + "=") ]; + n.ASSIGNMENT_OPERATORS = p; + const u = [ "delete", "!" ]; + n.BOOLEAN_UNARY_OPERATORS = u; + const d = [ "+", "-", "~" ]; + n.NUMBER_UNARY_OPERATORS = d; + const h = [ "typeof" ]; + n.STRING_UNARY_OPERATORS = h; + const f = [ "void", "throw", ...u, ...d, ...h ]; + n.UNARY_OPERATORS = f; + n.INHERIT_KEYS = { + optional: [ "typeAnnotation", "typeParameters", "returnType" ], + force: [ "start", "loc", "end" ] + }; + const m = Symbol.for("var used to be block scoped"); + n.BLOCK_SCOPED_SYMBOL = m; + const y = Symbol.for("should not be considered a local binding"); + n.NOT_LOCAL_BINDING = y; + }, {} ], + 88: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t = "body") { + return e[t] = (0, r.default)(e[t], e); + }; + var r = e("./toBlock"); + }, { + "./toBlock": 91 + } ], + 89: [ function(e, t, n) { + "use strict"; + var r, i, s, a; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function e(t, n, o) { + const l = []; + let c = !0; + for (const p of t) { + (0, i.isEmptyStatement)(p) || (c = !1); + if ((0, i.isExpression)(p)) l.push(p); else if ((0, i.isExpressionStatement)(p)) l.push(p.expression); else if ((0, + i.isVariableDeclaration)(p)) { + if ("var" !== p.kind) return; + for (const e of p.declarations) { + const t = (0, r.default)(e); + for (const e of Object.keys(t)) o.push({ + kind: p.kind, + id: (0, a.default)(t[e]) + }); + e.init && l.push((0, s.assignmentExpression)("=", e.id, e.init)); + } + c = !0; + } else if ((0, i.isIfStatement)(p)) { + const t = p.consequent ? e([ p.consequent ], n, o) : n.buildUndefinedNode(); + const r = p.alternate ? e([ p.alternate ], n, o) : n.buildUndefinedNode(); + if (!t || !r) return; + l.push((0, s.conditionalExpression)(p.test, t, r)); + } else if ((0, i.isBlockStatement)(p)) { + const t = e(p.body, n, o); + if (!t) return; + l.push(t); + } else { + if (!(0, i.isEmptyStatement)(p)) return; + 0 === t.indexOf(p) && (c = !0); + } + } + c && l.push(n.buildUndefinedNode()); + return 1 === l.length ? l[0] : (0, s.sequenceExpression)(l); + }; + r = e("../retrievers/getBindingIdentifiers"); + i = e("../validators/generated"); + s = e("../builders/generated"); + a = e("../clone/cloneNode"); + }, { + "../builders/generated": 70, + "../clone/cloneNode": 77, + "../retrievers/getBindingIdentifiers": 116, + "../validators/generated": 124 + } ], + 90: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + "eval" !== (e = (0, r.default)(e)) && "arguments" !== e || (e = "_" + e); + return e; + }; + var r = e("./toIdentifier"); + }, { + "./toIdentifier": 94 + } ], + 91: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + if ((0, r.isBlockStatement)(e)) return e; + let n = []; + if ((0, r.isEmptyStatement)(e)) n = []; else { + (0, r.isStatement)(e) || (e = (0, r.isFunction)(t) ? (0, i.returnStatement)(e) : (0, + i.expressionStatement)(e)); + n = [ e ]; + } + return (0, i.blockStatement)(n); + }; + r = e("../validators/generated"); + i = e("../builders/generated"); + }, { + "../builders/generated": 70, + "../validators/generated": 124 + } ], + 92: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t = e.key || e.property) { + !e.computed && (0, r.isIdentifier)(t) && (t = (0, i.stringLiteral)(t.name)); + return t; + }; + r = e("../validators/generated"); + i = e("../builders/generated"); + }, { + "../builders/generated": 70, + "../validators/generated": 124 + } ], + 93: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("../validators/generated"); + i = function(e) { + (0, r.isExpressionStatement)(e) && (e = e.expression); + if ((0, r.isExpression)(e)) return e; + (0, r.isClass)(e) ? e.type = "ClassExpression" : (0, r.isFunction)(e) && (e.type = "FunctionExpression"); + if (!(0, r.isExpression)(e)) throw new Error(`cannot turn ${e.type} to an expression`); + return e; + }; + n.default = i; + }, { + "../validators/generated": 124 + } ], + 94: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + e += ""; + let t = ""; + for (const n of e) t += (0, i.isIdentifierChar)(n.codePointAt(0)) ? n : "-"; + t = (t = t.replace(/^[-0-9]+/, "")).replace(/[-\s]+(.)?/g, function(e, t) { + return t ? t.toUpperCase() : ""; + }); + (0, r.default)(t) || (t = `_${t}`); + return t || "_"; + }; + r = e("../validators/isValidIdentifier"); + i = e("@babel/helper-validator-identifier"); + }, { + "../validators/isValidIdentifier": 138, + "@babel/helper-validator-identifier": 27 + } ], + 95: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = a; + r = e("../validators/generated"); + i = e("../clone/cloneNode"); + s = e("../modifications/removePropertiesDeep"); + function a(e, t = e.key) { + let n; + if ("method" === e.kind) return a.increment() + ""; + n = (0, r.isIdentifier)(t) ? t.name : (0, r.isStringLiteral)(t) ? JSON.stringify(t.value) : JSON.stringify((0, + s.default)((0, i.default)(t))); + e.computed && (n = `[${n}]`); + e.static && (n = `static:${n}`); + return n; + } + a.uid = 0; + a.increment = function() { + return a.uid >= Number.MAX_SAFE_INTEGER ? a.uid = 0 : a.uid++; + }; + }, { + "../clone/cloneNode": 77, + "../modifications/removePropertiesDeep": 114, + "../validators/generated": 124 + } ], + 96: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + if (null == e || !e.length) return; + const n = []; + const i = (0, r.default)(e, t, n); + if (!i) return; + for (const e of n) t.push(e); + return i; + }; + var r = e("./gatherSequenceExpressions"); + }, { + "./gatherSequenceExpressions": 89 + } ], + 97: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("../validators/generated"); + i = e("../builders/generated"); + s = function(e, t) { + if ((0, r.isStatement)(e)) return e; + let n = !1; + let s; + if ((0, r.isClass)(e)) { + n = !0; + s = "ClassDeclaration"; + } else if ((0, r.isFunction)(e)) { + n = !0; + s = "FunctionDeclaration"; + } else if ((0, r.isAssignmentExpression)(e)) return (0, i.expressionStatement)(e); + n && !e.id && (s = !1); + if (!s) { + if (t) return !1; + throw new Error(`cannot turn ${e.type} to a statement`); + } + e.type = s; + return e; + }; + n.default = s; + }, { + "../builders/generated": 70, + "../validators/generated": 124 + } ], + 98: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("../validators/isValidIdentifier"); + i = e("../builders/generated"); + s = function e(t) { + if (void 0 === t) return (0, i.identifier)("undefined"); + if (!0 === t || !1 === t) return (0, i.booleanLiteral)(t); + if (null === t) return (0, i.nullLiteral)(); + if ("string" == typeof t) return (0, i.stringLiteral)(t); + if ("number" == typeof t) { + let e; + if (Number.isFinite(t)) e = (0, i.numericLiteral)(Math.abs(t)); else { + let n; + n = Number.isNaN(t) ? (0, i.numericLiteral)(0) : (0, i.numericLiteral)(1); + e = (0, i.binaryExpression)("/", n, (0, i.numericLiteral)(0)); + } + (t < 0 || Object.is(t, -0)) && (e = (0, i.unaryExpression)("-", e)); + return e; + } + if (function(e) { + return "[object RegExp]" === a(e); + }(t)) { + const e = t.source; + const n = t.toString().match(/\/([a-z]+|)$/)[1]; + return (0, i.regExpLiteral)(e, n); + } + if (Array.isArray(t)) return (0, i.arrayExpression)(t.map(e)); + if (function(e) { + if ("object" != typeof e || null === e || "[object Object]" !== Object.prototype.toString.call(e)) return !1; + const t = Object.getPrototypeOf(e); + return null === t || null === Object.getPrototypeOf(t); + }(t)) { + const n = []; + for (const s of Object.keys(t)) { + let a; + a = (0, r.default)(s) ? (0, i.identifier)(s) : (0, i.stringLiteral)(s); + n.push((0, i.objectProperty)(a, e(t[s]))); + } + return (0, i.objectExpression)(n); + } + throw new Error("don't know how to turn this value into a node"); + }; + n.default = s; + const a = Function.call.bind(Object.prototype.toString); + }, { + "../builders/generated": 70, + "../validators/isValidIdentifier": 138 + } ], + 99: [ function(e, t, n) { + (function(t) { + (function() { + "use strict"; + var r, i, s, a, o; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.classMethodOrDeclareMethodCommon = n.classMethodOrPropertyCommon = n.patternLikeCommon = n.functionDeclarationCommon = n.functionTypeAnnotationCommon = n.functionCommon = void 0; + r = e("../validators/is"); + i = e("../validators/isValidIdentifier"); + s = e("@babel/helper-validator-identifier"); + a = e("../constants"); + (0, (o = e("./utils")).default)("ArrayExpression", { + fields: { + elements: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), + default: t.env.BABEL_TYPES_8_BREAKING ? void 0 : [] + } + }, + visitor: [ "elements" ], + aliases: [ "Expression" ] + }); + (0, o.default)("AssignmentExpression", { + fields: { + operator: { + validate: function() { + if (!t.env.BABEL_TYPES_8_BREAKING) return (0, o.assertValueType)("string"); + const e = (0, o.assertOneOf)(...a.ASSIGNMENT_OPERATORS); + const n = (0, o.assertOneOf)("="); + return function(t, i, s) { + ((0, r.default)("Pattern", t.left) ? n : e)(t, i, s); + }; + }() + }, + left: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") : (0, + o.assertNodeType)("LVal") + }, + right: { + validate: (0, o.assertNodeType)("Expression") + } + }, + builder: [ "operator", "left", "right" ], + visitor: [ "left", "right" ], + aliases: [ "Expression" ] + }); + (0, o.default)("BinaryExpression", { + builder: [ "operator", "left", "right" ], + fields: { + operator: { + validate: (0, o.assertOneOf)(...a.BINARY_OPERATORS) + }, + left: { + validate: function() { + const e = (0, o.assertNodeType)("Expression"); + const t = (0, o.assertNodeType)("Expression", "PrivateName"); + const n = function(n, r, i) { + ("in" === n.operator ? t : e)(n, r, i); + }; + n.oneOfNodeTypes = [ "Expression", "PrivateName" ]; + return n; + }() + }, + right: { + validate: (0, o.assertNodeType)("Expression") + } + }, + visitor: [ "left", "right" ], + aliases: [ "Binary", "Expression" ] + }); + (0, o.default)("InterpreterDirective", { + builder: [ "value" ], + fields: { + value: { + validate: (0, o.assertValueType)("string") + } + } + }); + (0, o.default)("Directive", { + visitor: [ "value" ], + fields: { + value: { + validate: (0, o.assertNodeType)("DirectiveLiteral") + } + } + }); + (0, o.default)("DirectiveLiteral", { + builder: [ "value" ], + fields: { + value: { + validate: (0, o.assertValueType)("string") + } + } + }); + (0, o.default)("BlockStatement", { + builder: [ "body", "directives" ], + visitor: [ "directives", "body" ], + fields: { + directives: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Statement"))) + } + }, + aliases: [ "Scopable", "BlockParent", "Block", "Statement" ] + }); + (0, o.default)("BreakStatement", { + visitor: [ "label" ], + fields: { + label: { + validate: (0, o.assertNodeType)("Identifier"), + optional: !0 + } + }, + aliases: [ "Statement", "Terminatorless", "CompletionStatement" ] + }); + (0, o.default)("CallExpression", { + visitor: [ "callee", "arguments", "typeParameters", "typeArguments" ], + builder: [ "callee", "arguments" ], + aliases: [ "Expression" ], + fields: Object.assign({ + callee: { + validate: (0, o.assertNodeType)("Expression", "V8IntrinsicIdentifier") + }, + arguments: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + } + }, t.env.BABEL_TYPES_8_BREAKING ? {} : { + optional: { + validate: (0, o.assertOneOf)(!0, !1), + optional: !0 + } + }, { + typeArguments: { + validate: (0, o.assertNodeType)("TypeParameterInstantiation"), + optional: !0 + }, + typeParameters: { + validate: (0, o.assertNodeType)("TSTypeParameterInstantiation"), + optional: !0 + } + }) + }); + (0, o.default)("CatchClause", { + visitor: [ "param", "body" ], + fields: { + param: { + validate: (0, o.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), + optional: !0 + }, + body: { + validate: (0, o.assertNodeType)("BlockStatement") + } + }, + aliases: [ "Scopable", "BlockParent" ] + }); + (0, o.default)("ConditionalExpression", { + visitor: [ "test", "consequent", "alternate" ], + fields: { + test: { + validate: (0, o.assertNodeType)("Expression") + }, + consequent: { + validate: (0, o.assertNodeType)("Expression") + }, + alternate: { + validate: (0, o.assertNodeType)("Expression") + } + }, + aliases: [ "Expression", "Conditional" ] + }); + (0, o.default)("ContinueStatement", { + visitor: [ "label" ], + fields: { + label: { + validate: (0, o.assertNodeType)("Identifier"), + optional: !0 + } + }, + aliases: [ "Statement", "Terminatorless", "CompletionStatement" ] + }); + (0, o.default)("DebuggerStatement", { + aliases: [ "Statement" ] + }); + (0, o.default)("DoWhileStatement", { + visitor: [ "test", "body" ], + fields: { + test: { + validate: (0, o.assertNodeType)("Expression") + }, + body: { + validate: (0, o.assertNodeType)("Statement") + } + }, + aliases: [ "Statement", "BlockParent", "Loop", "While", "Scopable" ] + }); + (0, o.default)("EmptyStatement", { + aliases: [ "Statement" ] + }); + (0, o.default)("ExpressionStatement", { + visitor: [ "expression" ], + fields: { + expression: { + validate: (0, o.assertNodeType)("Expression") + } + }, + aliases: [ "Statement", "ExpressionWrapper" ] + }); + (0, o.default)("File", { + builder: [ "program", "comments", "tokens" ], + visitor: [ "program" ], + fields: { + program: { + validate: (0, o.assertNodeType)("Program") + }, + comments: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.assertEach)((0, o.assertNodeType)("CommentBlock", "CommentLine")) : Object.assign(() => {}, { + each: { + oneOfNodeTypes: [ "CommentBlock", "CommentLine" ] + } + }), + optional: !0 + }, + tokens: { + validate: (0, o.assertEach)(Object.assign(() => {}, { + type: "any" + })), + optional: !0 + } + } + }); + (0, o.default)("ForInStatement", { + visitor: [ "left", "right", "body" ], + aliases: [ "Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement" ], + fields: { + left: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") : (0, + o.assertNodeType)("VariableDeclaration", "LVal") + }, + right: { + validate: (0, o.assertNodeType)("Expression") + }, + body: { + validate: (0, o.assertNodeType)("Statement") + } + } + }); + (0, o.default)("ForStatement", { + visitor: [ "init", "test", "update", "body" ], + aliases: [ "Scopable", "Statement", "For", "BlockParent", "Loop" ], + fields: { + init: { + validate: (0, o.assertNodeType)("VariableDeclaration", "Expression"), + optional: !0 + }, + test: { + validate: (0, o.assertNodeType)("Expression"), + optional: !0 + }, + update: { + validate: (0, o.assertNodeType)("Expression"), + optional: !0 + }, + body: { + validate: (0, o.assertNodeType)("Statement") + } + } + }); + const l = { + params: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Identifier", "Pattern", "RestElement"))) + }, + generator: { + default: !1 + }, + async: { + default: !1 + } + }; + n.functionCommon = l; + const c = { + returnType: { + validate: (0, o.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: !0 + }, + typeParameters: { + validate: (0, o.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: !0 + } + }; + n.functionTypeAnnotationCommon = c; + const p = Object.assign({}, l, { + declare: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + id: { + validate: (0, o.assertNodeType)("Identifier"), + optional: !0 + } + }); + n.functionDeclarationCommon = p; + (0, o.default)("FunctionDeclaration", { + builder: [ "id", "params", "body", "generator", "async" ], + visitor: [ "id", "params", "body", "returnType", "typeParameters" ], + fields: Object.assign({}, p, c, { + body: { + validate: (0, o.assertNodeType)("BlockStatement") + } + }), + aliases: [ "Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration" ], + validate: function() { + if (!t.env.BABEL_TYPES_8_BREAKING) return () => {}; + const e = (0, o.assertNodeType)("Identifier"); + return function(t, n, i) { + (0, r.default)("ExportDefaultDeclaration", t) || e(i, "id", i.id); + }; + }() + }); + (0, o.default)("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: [ "Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish" ], + fields: Object.assign({}, l, c, { + id: { + validate: (0, o.assertNodeType)("Identifier"), + optional: !0 + }, + body: { + validate: (0, o.assertNodeType)("BlockStatement") + } + }) + }); + const u = { + typeAnnotation: { + validate: (0, o.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: !0 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))) + } + }; + n.patternLikeCommon = u; + (0, o.default)("Identifier", { + builder: [ "name" ], + visitor: [ "typeAnnotation", "decorators" ], + aliases: [ "Expression", "PatternLike", "LVal", "TSEntityName" ], + fields: Object.assign({}, u, { + name: { + validate: (0, o.chain)((0, o.assertValueType)("string"), Object.assign(function(e, n, r) { + if (t.env.BABEL_TYPES_8_BREAKING && !(0, i.default)(r, !1)) throw new TypeError(`"${r}" is not a valid identifier name`); + }, { + type: "string" + })) + }, + optional: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + } + }), + validate(e, n, i) { + if (!t.env.BABEL_TYPES_8_BREAKING) return; + const a = /\.(\w+)$/.exec(n); + if (!a) return; + const [, o] = a; + const l = { + computed: !1 + }; + if ("property" === o) { + if ((0, r.default)("MemberExpression", e, l)) return; + if ((0, r.default)("OptionalMemberExpression", e, l)) return; + } else if ("key" === o) { + if ((0, r.default)("Property", e, l)) return; + if ((0, r.default)("Method", e, l)) return; + } else if ("exported" === o) { + if ((0, r.default)("ExportSpecifier", e)) return; + } else if ("imported" === o) { + if ((0, r.default)("ImportSpecifier", e, { + imported: i + })) return; + } else if ("meta" === o && (0, r.default)("MetaProperty", e, { + meta: i + })) return; + if (((0, s.isKeyword)(i.name) || (0, s.isReservedWord)(i.name, !1)) && "this" !== i.name) throw new TypeError(`"${i.name}" is not a valid identifier`); + } + }); + (0, o.default)("IfStatement", { + visitor: [ "test", "consequent", "alternate" ], + aliases: [ "Statement", "Conditional" ], + fields: { + test: { + validate: (0, o.assertNodeType)("Expression") + }, + consequent: { + validate: (0, o.assertNodeType)("Statement") + }, + alternate: { + optional: !0, + validate: (0, o.assertNodeType)("Statement") + } + } + }); + (0, o.default)("LabeledStatement", { + visitor: [ "label", "body" ], + aliases: [ "Statement" ], + fields: { + label: { + validate: (0, o.assertNodeType)("Identifier") + }, + body: { + validate: (0, o.assertNodeType)("Statement") + } + } + }); + (0, o.default)("StringLiteral", { + builder: [ "value" ], + fields: { + value: { + validate: (0, o.assertValueType)("string") + } + }, + aliases: [ "Expression", "Pureish", "Literal", "Immutable" ] + }); + (0, o.default)("NumericLiteral", { + builder: [ "value" ], + deprecatedAlias: "NumberLiteral", + fields: { + value: { + validate: (0, o.assertValueType)("number") + } + }, + aliases: [ "Expression", "Pureish", "Literal", "Immutable" ] + }); + (0, o.default)("NullLiteral", { + aliases: [ "Expression", "Pureish", "Literal", "Immutable" ] + }); + (0, o.default)("BooleanLiteral", { + builder: [ "value" ], + fields: { + value: { + validate: (0, o.assertValueType)("boolean") + } + }, + aliases: [ "Expression", "Pureish", "Literal", "Immutable" ] + }); + (0, o.default)("RegExpLiteral", { + builder: [ "pattern", "flags" ], + deprecatedAlias: "RegexLiteral", + aliases: [ "Expression", "Pureish", "Literal" ], + fields: { + pattern: { + validate: (0, o.assertValueType)("string") + }, + flags: { + validate: (0, o.chain)((0, o.assertValueType)("string"), Object.assign(function(e, n, r) { + if (!t.env.BABEL_TYPES_8_BREAKING) return; + const i = /[^gimsuy]/.exec(r); + if (i) throw new TypeError(`"${i[0]}" is not a valid RegExp flag`); + }, { + type: "string" + })), + default: "" + } + } + }); + (0, o.default)("LogicalExpression", { + builder: [ "operator", "left", "right" ], + visitor: [ "left", "right" ], + aliases: [ "Binary", "Expression" ], + fields: { + operator: { + validate: (0, o.assertOneOf)(...a.LOGICAL_OPERATORS) + }, + left: { + validate: (0, o.assertNodeType)("Expression") + }, + right: { + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("MemberExpression", { + builder: [ "object", "property", "computed", ...t.env.BABEL_TYPES_8_BREAKING ? [] : [ "optional" ] ], + visitor: [ "object", "property" ], + aliases: [ "Expression", "LVal" ], + fields: Object.assign({ + object: { + validate: (0, o.assertNodeType)("Expression") + }, + property: { + validate: function() { + const e = (0, o.assertNodeType)("Identifier", "PrivateName"); + const t = (0, o.assertNodeType)("Expression"); + const n = function(n, r, i) { + (n.computed ? t : e)(n, r, i); + }; + n.oneOfNodeTypes = [ "Expression", "Identifier", "PrivateName" ]; + return n; + }() + }, + computed: { + default: !1 + } + }, t.env.BABEL_TYPES_8_BREAKING ? {} : { + optional: { + validate: (0, o.assertOneOf)(!0, !1), + optional: !0 + } + }) + }); + (0, o.default)("NewExpression", { + inherits: "CallExpression" + }); + (0, o.default)("Program", { + visitor: [ "directives", "body" ], + builder: [ "body", "directives", "sourceType", "interpreter" ], + fields: { + sourceFile: { + validate: (0, o.assertValueType)("string") + }, + sourceType: { + validate: (0, o.assertOneOf)("script", "module"), + default: "script" + }, + interpreter: { + validate: (0, o.assertNodeType)("InterpreterDirective"), + default: null, + optional: !0 + }, + directives: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Directive"))), + default: [] + }, + body: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Statement"))) + } + }, + aliases: [ "Scopable", "BlockParent", "Block" ] + }); + (0, o.default)("ObjectExpression", { + visitor: [ "properties" ], + aliases: [ "Expression" ], + fields: { + properties: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) + } + } + }); + (0, o.default)("ObjectMethod", { + builder: [ "kind", "key", "params", "body", "computed", "generator", "async" ], + fields: Object.assign({}, l, c, { + kind: Object.assign({ + validate: (0, o.assertOneOf)("method", "get", "set") + }, t.env.BABEL_TYPES_8_BREAKING ? {} : { + default: "method" + }), + computed: { + default: !1 + }, + key: { + validate: function() { + const e = (0, o.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const t = (0, o.assertNodeType)("Expression"); + const n = function(n, r, i) { + (n.computed ? t : e)(n, r, i); + }; + n.oneOfNodeTypes = [ "Expression", "Identifier", "StringLiteral", "NumericLiteral" ]; + return n; + }() + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + }, + body: { + validate: (0, o.assertNodeType)("BlockStatement") + } + }), + visitor: [ "key", "params", "body", "decorators", "returnType", "typeParameters" ], + aliases: [ "UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember" ] + }); + (0, o.default)("ObjectProperty", { + builder: [ "key", "value", "computed", "shorthand", ...t.env.BABEL_TYPES_8_BREAKING ? [] : [ "decorators" ] ], + fields: { + computed: { + default: !1 + }, + key: { + validate: function() { + const e = (0, o.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const t = (0, o.assertNodeType)("Expression"); + const n = function(n, r, i) { + (n.computed ? t : e)(n, r, i); + }; + n.oneOfNodeTypes = [ "Expression", "Identifier", "StringLiteral", "NumericLiteral" ]; + return n; + }() + }, + value: { + validate: (0, o.assertNodeType)("Expression", "PatternLike") + }, + shorthand: { + validate: (0, o.chain)((0, o.assertValueType)("boolean"), Object.assign(function(e, n, r) { + if (t.env.BABEL_TYPES_8_BREAKING && r && e.computed) throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); + }, { + type: "boolean" + }), function(e, n, i) { + if (t.env.BABEL_TYPES_8_BREAKING && i && !(0, r.default)("Identifier", e.key)) throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); + }), + default: !1 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + } + }, + visitor: [ "key", "value", "decorators" ], + aliases: [ "UserWhitespacable", "Property", "ObjectMember" ], + validate: function() { + const e = (0, o.assertNodeType)("Identifier", "Pattern"); + const n = (0, o.assertNodeType)("Expression"); + return function(i, s, a) { + if (!t.env.BABEL_TYPES_8_BREAKING) return; + ((0, r.default)("ObjectPattern", i) ? e : n)(a, "value", a.value); + }; + }() + }); + (0, o.default)("RestElement", { + visitor: [ "argument", "typeAnnotation" ], + builder: [ "argument" ], + aliases: [ "LVal", "PatternLike" ], + deprecatedAlias: "RestProperty", + fields: Object.assign({}, u, { + argument: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression") : (0, + o.assertNodeType)("LVal") + }, + optional: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + } + }), + validate(e, n) { + if (!t.env.BABEL_TYPES_8_BREAKING) return; + const r = /(\w+)\[(\d+)\]/.exec(n); + if (!r) throw new Error("Internal Babel error: malformed key."); + const [, i, s] = r; + if (e[i].length > s + 1) throw new TypeError(`RestElement must be last element of ${i}`); + } + }); + (0, o.default)("ReturnStatement", { + visitor: [ "argument" ], + aliases: [ "Statement", "Terminatorless", "CompletionStatement" ], + fields: { + argument: { + validate: (0, o.assertNodeType)("Expression"), + optional: !0 + } + } + }); + (0, o.default)("SequenceExpression", { + visitor: [ "expressions" ], + fields: { + expressions: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Expression"))) + } + }, + aliases: [ "Expression" ] + }); + (0, o.default)("ParenthesizedExpression", { + visitor: [ "expression" ], + aliases: [ "Expression", "ExpressionWrapper" ], + fields: { + expression: { + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("SwitchCase", { + visitor: [ "test", "consequent" ], + fields: { + test: { + validate: (0, o.assertNodeType)("Expression"), + optional: !0 + }, + consequent: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Statement"))) + } + } + }); + (0, o.default)("SwitchStatement", { + visitor: [ "discriminant", "cases" ], + aliases: [ "Statement", "BlockParent", "Scopable" ], + fields: { + discriminant: { + validate: (0, o.assertNodeType)("Expression") + }, + cases: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("SwitchCase"))) + } + } + }); + (0, o.default)("ThisExpression", { + aliases: [ "Expression" ] + }); + (0, o.default)("ThrowStatement", { + visitor: [ "argument" ], + aliases: [ "Statement", "Terminatorless", "CompletionStatement" ], + fields: { + argument: { + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("TryStatement", { + visitor: [ "block", "handler", "finalizer" ], + aliases: [ "Statement" ], + fields: { + block: { + validate: (0, o.chain)((0, o.assertNodeType)("BlockStatement"), Object.assign(function(e) { + if (t.env.BABEL_TYPES_8_BREAKING && !e.handler && !e.finalizer) throw new TypeError("TryStatement expects either a handler or finalizer, or both"); + }, { + oneOfNodeTypes: [ "BlockStatement" ] + })) + }, + handler: { + optional: !0, + validate: (0, o.assertNodeType)("CatchClause") + }, + finalizer: { + optional: !0, + validate: (0, o.assertNodeType)("BlockStatement") + } + } + }); + (0, o.default)("UnaryExpression", { + builder: [ "operator", "argument", "prefix" ], + fields: { + prefix: { + default: !0 + }, + argument: { + validate: (0, o.assertNodeType)("Expression") + }, + operator: { + validate: (0, o.assertOneOf)(...a.UNARY_OPERATORS) + } + }, + visitor: [ "argument" ], + aliases: [ "UnaryLike", "Expression" ] + }); + (0, o.default)("UpdateExpression", { + builder: [ "operator", "argument", "prefix" ], + fields: { + prefix: { + default: !1 + }, + argument: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.assertNodeType)("Identifier", "MemberExpression") : (0, + o.assertNodeType)("Expression") + }, + operator: { + validate: (0, o.assertOneOf)(...a.UPDATE_OPERATORS) + } + }, + visitor: [ "argument" ], + aliases: [ "Expression" ] + }); + (0, o.default)("VariableDeclaration", { + builder: [ "kind", "declarations" ], + visitor: [ "declarations" ], + aliases: [ "Statement", "Declaration" ], + fields: { + declare: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + kind: { + validate: (0, o.assertOneOf)("var", "let", "const") + }, + declarations: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("VariableDeclarator"))) + } + }, + validate(e, n, i) { + if (t.env.BABEL_TYPES_8_BREAKING && (0, r.default)("ForXStatement", e, { + left: i + }) && 1 !== i.declarations.length) throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${e.type}`); + } + }); + (0, o.default)("VariableDeclarator", { + visitor: [ "id", "init" ], + fields: { + id: { + validate: function() { + if (!t.env.BABEL_TYPES_8_BREAKING) return (0, o.assertNodeType)("LVal"); + const e = (0, o.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); + const n = (0, o.assertNodeType)("Identifier"); + return function(t, r, i) { + (t.init ? e : n)(t, r, i); + }; + }() + }, + definite: { + optional: !0, + validate: (0, o.assertValueType)("boolean") + }, + init: { + optional: !0, + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("WhileStatement", { + visitor: [ "test", "body" ], + aliases: [ "Statement", "BlockParent", "Loop", "While", "Scopable" ], + fields: { + test: { + validate: (0, o.assertNodeType)("Expression") + }, + body: { + validate: (0, o.assertNodeType)("Statement") + } + } + }); + (0, o.default)("WithStatement", { + visitor: [ "object", "body" ], + aliases: [ "Statement" ], + fields: { + object: { + validate: (0, o.assertNodeType)("Expression") + }, + body: { + validate: (0, o.assertNodeType)("Statement") + } + } + }); + (0, o.default)("AssignmentPattern", { + visitor: [ "left", "right", "decorators" ], + builder: [ "left", "right" ], + aliases: [ "Pattern", "PatternLike", "LVal" ], + fields: Object.assign({}, u, { + left: { + validate: (0, o.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") + }, + right: { + validate: (0, o.assertNodeType)("Expression") + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + } + }) + }); + (0, o.default)("ArrayPattern", { + visitor: [ "elements", "typeAnnotation" ], + builder: [ "elements" ], + aliases: [ "Pattern", "PatternLike", "LVal" ], + fields: Object.assign({}, u, { + elements: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeOrValueType)("null", "PatternLike"))) + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + }, + optional: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + } + }) + }); + (0, o.default)("ArrowFunctionExpression", { + builder: [ "params", "body", "async" ], + visitor: [ "params", "body", "returnType", "typeParameters" ], + aliases: [ "Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish" ], + fields: Object.assign({}, l, c, { + expression: { + validate: (0, o.assertValueType)("boolean") + }, + body: { + validate: (0, o.assertNodeType)("BlockStatement", "Expression") + } + }) + }); + (0, o.default)("ClassBody", { + visitor: [ "body" ], + fields: { + body: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) + } + } + }); + (0, o.default)("ClassExpression", { + builder: [ "id", "superClass", "body", "decorators" ], + visitor: [ "id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators" ], + aliases: [ "Scopable", "Class", "Expression" ], + fields: { + id: { + validate: (0, o.assertNodeType)("Identifier"), + optional: !0 + }, + typeParameters: { + validate: (0, o.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: !0 + }, + body: { + validate: (0, o.assertNodeType)("ClassBody") + }, + superClass: { + optional: !0, + validate: (0, o.assertNodeType)("Expression") + }, + superTypeParameters: { + validate: (0, o.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: !0 + }, + implements: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), + optional: !0 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + }, + mixins: { + validate: (0, o.assertNodeType)("InterfaceExtends"), + optional: !0 + } + } + }); + (0, o.default)("ClassDeclaration", { + inherits: "ClassExpression", + aliases: [ "Scopable", "Class", "Statement", "Declaration" ], + fields: { + id: { + validate: (0, o.assertNodeType)("Identifier") + }, + typeParameters: { + validate: (0, o.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), + optional: !0 + }, + body: { + validate: (0, o.assertNodeType)("ClassBody") + }, + superClass: { + optional: !0, + validate: (0, o.assertNodeType)("Expression") + }, + superTypeParameters: { + validate: (0, o.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: !0 + }, + implements: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), + optional: !0 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + }, + mixins: { + validate: (0, o.assertNodeType)("InterfaceExtends"), + optional: !0 + }, + declare: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + abstract: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + } + }, + validate: function() { + const e = (0, o.assertNodeType)("Identifier"); + return function(n, i, s) { + t.env.BABEL_TYPES_8_BREAKING && ((0, r.default)("ExportDefaultDeclaration", n) || e(s, "id", s.id)); + }; + }() + }); + (0, o.default)("ExportAllDeclaration", { + visitor: [ "source" ], + aliases: [ "Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration" ], + fields: { + source: { + validate: (0, o.assertNodeType)("StringLiteral") + }, + exportKind: (0, o.validateOptional)((0, o.assertOneOf)("type", "value")), + assertions: { + optional: !0, + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("ImportAttribute"))) + } + } + }); + (0, o.default)("ExportDefaultDeclaration", { + visitor: [ "declaration" ], + aliases: [ "Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration" ], + fields: { + declaration: { + validate: (0, o.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") + }, + exportKind: (0, o.validateOptional)((0, o.assertOneOf)("value")) + } + }); + (0, o.default)("ExportNamedDeclaration", { + visitor: [ "declaration", "specifiers", "source" ], + aliases: [ "Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration" ], + fields: { + declaration: { + optional: !0, + validate: (0, o.chain)((0, o.assertNodeType)("Declaration"), Object.assign(function(e, n, r) { + if (t.env.BABEL_TYPES_8_BREAKING && r && e.specifiers.length) throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); + }, { + oneOfNodeTypes: [ "Declaration" ] + }), function(e, n, r) { + if (t.env.BABEL_TYPES_8_BREAKING && r && e.source) throw new TypeError("Cannot export a declaration from a source"); + }) + }, + assertions: { + optional: !0, + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("ImportAttribute"))) + }, + specifiers: { + default: [], + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)(function() { + const e = (0, o.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); + const n = (0, o.assertNodeType)("ExportSpecifier"); + return t.env.BABEL_TYPES_8_BREAKING ? function(t, r, i) { + (t.source ? e : n)(t, r, i); + } : e; + }())) + }, + source: { + validate: (0, o.assertNodeType)("StringLiteral"), + optional: !0 + }, + exportKind: (0, o.validateOptional)((0, o.assertOneOf)("type", "value")) + } + }); + (0, o.default)("ExportSpecifier", { + visitor: [ "local", "exported" ], + aliases: [ "ModuleSpecifier" ], + fields: { + local: { + validate: (0, o.assertNodeType)("Identifier") + }, + exported: { + validate: (0, o.assertNodeType)("Identifier", "StringLiteral") + } + } + }); + (0, o.default)("ForOfStatement", { + visitor: [ "left", "right", "body" ], + builder: [ "left", "right", "body", "await" ], + aliases: [ "Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement" ], + fields: { + left: { + validate: function() { + if (!t.env.BABEL_TYPES_8_BREAKING) return (0, o.assertNodeType)("VariableDeclaration", "LVal"); + const e = (0, o.assertNodeType)("VariableDeclaration"); + const n = (0, o.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); + return function(t, i, s) { + (0, r.default)("VariableDeclaration", s) ? e(t, i, s) : n(t, i, s); + }; + }() + }, + right: { + validate: (0, o.assertNodeType)("Expression") + }, + body: { + validate: (0, o.assertNodeType)("Statement") + }, + await: { + default: !1 + } + } + }); + (0, o.default)("ImportDeclaration", { + visitor: [ "specifiers", "source" ], + aliases: [ "Statement", "Declaration", "ModuleDeclaration" ], + fields: { + assertions: { + optional: !0, + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("ImportAttribute"))) + }, + specifiers: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) + }, + source: { + validate: (0, o.assertNodeType)("StringLiteral") + }, + importKind: { + validate: (0, o.assertOneOf)("type", "typeof", "value"), + optional: !0 + } + } + }); + (0, o.default)("ImportDefaultSpecifier", { + visitor: [ "local" ], + aliases: [ "ModuleSpecifier" ], + fields: { + local: { + validate: (0, o.assertNodeType)("Identifier") + } + } + }); + (0, o.default)("ImportNamespaceSpecifier", { + visitor: [ "local" ], + aliases: [ "ModuleSpecifier" ], + fields: { + local: { + validate: (0, o.assertNodeType)("Identifier") + } + } + }); + (0, o.default)("ImportSpecifier", { + visitor: [ "local", "imported" ], + aliases: [ "ModuleSpecifier" ], + fields: { + local: { + validate: (0, o.assertNodeType)("Identifier") + }, + imported: { + validate: (0, o.assertNodeType)("Identifier", "StringLiteral") + }, + importKind: { + validate: (0, o.assertOneOf)("type", "typeof"), + optional: !0 + } + } + }); + (0, o.default)("MetaProperty", { + visitor: [ "meta", "property" ], + aliases: [ "Expression" ], + fields: { + meta: { + validate: (0, o.chain)((0, o.assertNodeType)("Identifier"), Object.assign(function(e, n, i) { + if (!t.env.BABEL_TYPES_8_BREAKING) return; + let s; + switch (i.name) { + case "function": + s = "sent"; + break; + + case "new": + s = "target"; + break; + + case "import": + s = "meta"; + } + if (!(0, r.default)("Identifier", e.property, { + name: s + })) throw new TypeError("Unrecognised MetaProperty"); + }, { + oneOfNodeTypes: [ "Identifier" ] + })) + }, + property: { + validate: (0, o.assertNodeType)("Identifier") + } + } + }); + const d = { + abstract: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + accessibility: { + validate: (0, o.assertOneOf)("public", "private", "protected"), + optional: !0 + }, + static: { + default: !1 + }, + override: { + default: !1 + }, + computed: { + default: !1 + }, + optional: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + key: { + validate: (0, o.chain)(function() { + const e = (0, o.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); + const t = (0, o.assertNodeType)("Expression"); + return function(n, r, i) { + (n.computed ? t : e)(n, r, i); + }; + }(), (0, o.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) + } + }; + n.classMethodOrPropertyCommon = d; + const h = Object.assign({}, l, d, { + params: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) + }, + kind: { + validate: (0, o.assertOneOf)("get", "set", "method", "constructor"), + default: "method" + }, + access: { + validate: (0, o.chain)((0, o.assertValueType)("string"), (0, o.assertOneOf)("public", "private", "protected")), + optional: !0 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + } + }); + n.classMethodOrDeclareMethodCommon = h; + (0, o.default)("ClassMethod", { + aliases: [ "Function", "Scopable", "BlockParent", "FunctionParent", "Method" ], + builder: [ "kind", "key", "params", "body", "computed", "static", "generator", "async" ], + visitor: [ "key", "params", "body", "decorators", "returnType", "typeParameters" ], + fields: Object.assign({}, h, c, { + body: { + validate: (0, o.assertNodeType)("BlockStatement") + } + }) + }); + (0, o.default)("ObjectPattern", { + visitor: [ "properties", "typeAnnotation", "decorators" ], + builder: [ "properties" ], + aliases: [ "Pattern", "PatternLike", "LVal" ], + fields: Object.assign({}, u, { + properties: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("RestElement", "ObjectProperty"))) + } + }) + }); + (0, o.default)("SpreadElement", { + visitor: [ "argument" ], + aliases: [ "UnaryLike" ], + deprecatedAlias: "SpreadProperty", + fields: { + argument: { + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("Super", { + aliases: [ "Expression" ] + }); + (0, o.default)("TaggedTemplateExpression", { + visitor: [ "tag", "quasi", "typeParameters" ], + builder: [ "tag", "quasi" ], + aliases: [ "Expression" ], + fields: { + tag: { + validate: (0, o.assertNodeType)("Expression") + }, + quasi: { + validate: (0, o.assertNodeType)("TemplateLiteral") + }, + typeParameters: { + validate: (0, o.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: !0 + } + } + }); + (0, o.default)("TemplateElement", { + builder: [ "value", "tail" ], + fields: { + value: { + validate: (0, o.assertShape)({ + raw: { + validate: (0, o.assertValueType)("string") + }, + cooked: { + validate: (0, o.assertValueType)("string"), + optional: !0 + } + }) + }, + tail: { + default: !1 + } + } + }); + (0, o.default)("TemplateLiteral", { + visitor: [ "quasis", "expressions" ], + aliases: [ "Expression", "Literal" ], + fields: { + quasis: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("TemplateElement"))) + }, + expressions: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Expression", "TSType")), function(e, t, n) { + if (e.quasis.length !== n.length + 1) throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${n.length + 1} quasis but got ${e.quasis.length}`); + }) + } + } + }); + (0, o.default)("YieldExpression", { + builder: [ "argument", "delegate" ], + visitor: [ "argument" ], + aliases: [ "Expression", "Terminatorless" ], + fields: { + delegate: { + validate: (0, o.chain)((0, o.assertValueType)("boolean"), Object.assign(function(e, n, r) { + if (t.env.BABEL_TYPES_8_BREAKING && r && !e.argument) throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); + }, { + type: "boolean" + })), + default: !1 + }, + argument: { + optional: !0, + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("AwaitExpression", { + builder: [ "argument" ], + visitor: [ "argument" ], + aliases: [ "Expression", "Terminatorless" ], + fields: { + argument: { + validate: (0, o.assertNodeType)("Expression") + } + } + }); + (0, o.default)("Import", { + aliases: [ "Expression" ] + }); + (0, o.default)("BigIntLiteral", { + builder: [ "value" ], + fields: { + value: { + validate: (0, o.assertValueType)("string") + } + }, + aliases: [ "Expression", "Pureish", "Literal", "Immutable" ] + }); + (0, o.default)("ExportNamespaceSpecifier", { + visitor: [ "exported" ], + aliases: [ "ModuleSpecifier" ], + fields: { + exported: { + validate: (0, o.assertNodeType)("Identifier") + } + } + }); + (0, o.default)("OptionalMemberExpression", { + builder: [ "object", "property", "computed", "optional" ], + visitor: [ "object", "property" ], + aliases: [ "Expression" ], + fields: { + object: { + validate: (0, o.assertNodeType)("Expression") + }, + property: { + validate: function() { + const e = (0, o.assertNodeType)("Identifier"); + const t = (0, o.assertNodeType)("Expression"); + const n = function(n, r, i) { + (n.computed ? t : e)(n, r, i); + }; + n.oneOfNodeTypes = [ "Expression", "Identifier" ]; + return n; + }() + }, + computed: { + default: !1 + }, + optional: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.chain)((0, o.assertValueType)("boolean"), (0, + o.assertOptionalChainStart)()) : (0, o.assertValueType)("boolean") + } + } + }); + (0, o.default)("OptionalCallExpression", { + visitor: [ "callee", "arguments", "typeParameters", "typeArguments" ], + builder: [ "callee", "arguments", "optional" ], + aliases: [ "Expression" ], + fields: { + callee: { + validate: (0, o.assertNodeType)("Expression") + }, + arguments: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + }, + optional: { + validate: t.env.BABEL_TYPES_8_BREAKING ? (0, o.chain)((0, o.assertValueType)("boolean"), (0, + o.assertOptionalChainStart)()) : (0, o.assertValueType)("boolean") + }, + typeArguments: { + validate: (0, o.assertNodeType)("TypeParameterInstantiation"), + optional: !0 + }, + typeParameters: { + validate: (0, o.assertNodeType)("TSTypeParameterInstantiation"), + optional: !0 + } + } + }); + (0, o.default)("ClassProperty", { + visitor: [ "key", "value", "typeAnnotation", "decorators" ], + builder: [ "key", "value", "typeAnnotation", "decorators", "computed", "static" ], + aliases: [ "Property" ], + fields: Object.assign({}, d, { + value: { + validate: (0, o.assertNodeType)("Expression"), + optional: !0 + }, + definite: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + typeAnnotation: { + validate: (0, o.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: !0 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + }, + readonly: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + declare: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + variance: { + validate: (0, o.assertNodeType)("Variance"), + optional: !0 + } + }) + }); + (0, o.default)("ClassPrivateProperty", { + visitor: [ "key", "value", "decorators", "typeAnnotation" ], + builder: [ "key", "value", "decorators", "static" ], + aliases: [ "Property", "Private" ], + fields: { + key: { + validate: (0, o.assertNodeType)("PrivateName") + }, + value: { + validate: (0, o.assertNodeType)("Expression"), + optional: !0 + }, + typeAnnotation: { + validate: (0, o.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: !0 + }, + decorators: { + validate: (0, o.chain)((0, o.assertValueType)("array"), (0, o.assertEach)((0, o.assertNodeType)("Decorator"))), + optional: !0 + }, + readonly: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + definite: { + validate: (0, o.assertValueType)("boolean"), + optional: !0 + }, + variance: { + validate: (0, o.assertNodeType)("Variance"), + optional: !0 + } + } + }); + (0, o.default)("ClassPrivateMethod", { + builder: [ "kind", "key", "params", "body", "static" ], + visitor: [ "key", "params", "body", "decorators", "returnType", "typeParameters" ], + aliases: [ "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private" ], + fields: Object.assign({}, h, c, { + key: { + validate: (0, o.assertNodeType)("PrivateName") + }, + body: { + validate: (0, o.assertNodeType)("BlockStatement") + } + }) + }); + (0, o.default)("PrivateName", { + visitor: [ "id" ], + aliases: [ "Private" ], + fields: { + id: { + validate: (0, o.assertNodeType)("Identifier") + } + } + }); + }).call(this); + }).call(this, e("_process")); + }, { + "../constants": 87, + "../validators/is": 125, + "../validators/isValidIdentifier": 138, + "./utils": 107, + "@babel/helper-validator-identifier": 27, + _process: 160 + } ], + 100: [ function(e, t, n) { + (function(t) { + (function() { + "use strict"; + var n = e("./utils"); + (0, n.default)("ArgumentPlaceholder", {}); + (0, n.default)("BindExpression", { + visitor: [ "object", "callee" ], + aliases: [ "Expression" ], + fields: t.env.BABEL_TYPES_8_BREAKING ? { + object: { + validate: (0, n.assertNodeType)("Expression") + }, + callee: { + validate: (0, n.assertNodeType)("Expression") + } + } : { + object: { + validate: Object.assign(() => {}, { + oneOfNodeTypes: [ "Expression" ] + }) + }, + callee: { + validate: Object.assign(() => {}, { + oneOfNodeTypes: [ "Expression" ] + }) + } + } + }); + (0, n.default)("ImportAttribute", { + visitor: [ "key", "value" ], + fields: { + key: { + validate: (0, n.assertNodeType)("Identifier", "StringLiteral") + }, + value: { + validate: (0, n.assertNodeType)("StringLiteral") + } + } + }); + (0, n.default)("Decorator", { + visitor: [ "expression" ], + fields: { + expression: { + validate: (0, n.assertNodeType)("Expression") + } + } + }); + (0, n.default)("DoExpression", { + visitor: [ "body" ], + builder: [ "body", "async" ], + aliases: [ "Expression" ], + fields: { + body: { + validate: (0, n.assertNodeType)("BlockStatement") + }, + async: { + validate: (0, n.assertValueType)("boolean"), + default: !1 + } + } + }); + (0, n.default)("ExportDefaultSpecifier", { + visitor: [ "exported" ], + aliases: [ "ModuleSpecifier" ], + fields: { + exported: { + validate: (0, n.assertNodeType)("Identifier") + } + } + }); + (0, n.default)("RecordExpression", { + visitor: [ "properties" ], + aliases: [ "Expression" ], + fields: { + properties: { + validate: (0, n.chain)((0, n.assertValueType)("array"), (0, n.assertEach)((0, n.assertNodeType)("ObjectProperty", "SpreadElement"))) + } + } + }); + (0, n.default)("TupleExpression", { + fields: { + elements: { + validate: (0, n.chain)((0, n.assertValueType)("array"), (0, n.assertEach)((0, n.assertNodeType)("Expression", "SpreadElement"))), + default: [] + } + }, + visitor: [ "elements" ], + aliases: [ "Expression" ] + }); + (0, n.default)("DecimalLiteral", { + builder: [ "value" ], + fields: { + value: { + validate: (0, n.assertValueType)("string") + } + }, + aliases: [ "Expression", "Pureish", "Literal", "Immutable" ] + }); + (0, n.default)("StaticBlock", { + visitor: [ "body" ], + fields: { + body: { + validate: (0, n.chain)((0, n.assertValueType)("array"), (0, n.assertEach)((0, n.assertNodeType)("Statement"))) + } + }, + aliases: [ "Scopable", "BlockParent" ] + }); + (0, n.default)("ModuleExpression", { + visitor: [ "body" ], + fields: { + body: { + validate: (0, n.assertNodeType)("Program") + } + }, + aliases: [ "Expression" ] + }); + (0, n.default)("TopicReference", { + aliases: [ "Expression" ] + }); + (0, n.default)("PipelineTopicExpression", { + builder: [ "expression" ], + visitor: [ "expression" ], + fields: { + expression: { + validate: (0, n.assertNodeType)("Expression") + } + }, + aliases: [ "Expression" ] + }); + (0, n.default)("PipelineBareFunction", { + builder: [ "callee" ], + visitor: [ "callee" ], + fields: { + callee: { + validate: (0, n.assertNodeType)("Expression") + } + }, + aliases: [ "Expression" ] + }); + (0, n.default)("PipelinePrimaryTopicReference", { + aliases: [ "Expression" ] + }); + }).call(this); + }).call(this, e("_process")); + }, { + "./utils": 107, + _process: 160 + } ], + 101: [ function(e, t, n) { + "use strict"; + var r = e("./utils"); + const i = (e, t = "TypeParameterDeclaration") => { + (0, r.default)(e, { + builder: [ "id", "typeParameters", "extends", "body" ], + visitor: [ "id", "typeParameters", "extends", "mixins", "implements", "body" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)(t), + extends: (0, r.validateOptional)((0, r.arrayOfType)("InterfaceExtends")), + mixins: (0, r.validateOptional)((0, r.arrayOfType)("InterfaceExtends")), + implements: (0, r.validateOptional)((0, r.arrayOfType)("ClassImplements")), + body: (0, r.validateType)("ObjectTypeAnnotation") + } + }); + }; + (0, r.default)("AnyTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("ArrayTypeAnnotation", { + visitor: [ "elementType" ], + aliases: [ "Flow", "FlowType" ], + fields: { + elementType: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("BooleanTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("BooleanLiteralTypeAnnotation", { + builder: [ "value" ], + aliases: [ "Flow", "FlowType" ], + fields: { + value: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("NullLiteralTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("ClassImplements", { + visitor: [ "id", "typeParameters" ], + aliases: [ "Flow" ], + fields: { + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TypeParameterInstantiation") + } + }); + i("DeclareClass"); + (0, r.default)("DeclareFunction", { + visitor: [ "id" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier"), + predicate: (0, r.validateOptionalType)("DeclaredPredicate") + } + }); + i("DeclareInterface"); + (0, r.default)("DeclareModule", { + builder: [ "id", "body", "kind" ], + visitor: [ "id", "body" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)([ "Identifier", "StringLiteral" ]), + body: (0, r.validateType)("BlockStatement"), + kind: (0, r.validateOptional)((0, r.assertOneOf)("CommonJS", "ES")) + } + }); + (0, r.default)("DeclareModuleExports", { + visitor: [ "typeAnnotation" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + typeAnnotation: (0, r.validateType)("TypeAnnotation") + } + }); + (0, r.default)("DeclareTypeAlias", { + visitor: [ "id", "typeParameters", "right" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TypeParameterDeclaration"), + right: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("DeclareOpaqueType", { + visitor: [ "id", "typeParameters", "supertype" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, r.validateOptionalType)("FlowType"), + impltype: (0, r.validateOptionalType)("FlowType") + } + }); + (0, r.default)("DeclareVariable", { + visitor: [ "id" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier") + } + }); + (0, r.default)("DeclareExportDeclaration", { + visitor: [ "declaration", "specifiers", "source" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + declaration: (0, r.validateOptionalType)("Flow"), + specifiers: (0, r.validateOptional)((0, r.arrayOfType)([ "ExportSpecifier", "ExportNamespaceSpecifier" ])), + source: (0, r.validateOptionalType)("StringLiteral"), + default: (0, r.validateOptional)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("DeclareExportAllDeclaration", { + visitor: [ "source" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + source: (0, r.validateType)("StringLiteral"), + exportKind: (0, r.validateOptional)((0, r.assertOneOf)("type", "value")) + } + }); + (0, r.default)("DeclaredPredicate", { + visitor: [ "value" ], + aliases: [ "Flow", "FlowPredicate" ], + fields: { + value: (0, r.validateType)("Flow") + } + }); + (0, r.default)("ExistsTypeAnnotation", { + aliases: [ "Flow", "FlowType" ] + }); + (0, r.default)("FunctionTypeAnnotation", { + visitor: [ "typeParameters", "params", "rest", "returnType" ], + aliases: [ "Flow", "FlowType" ], + fields: { + typeParameters: (0, r.validateOptionalType)("TypeParameterDeclaration"), + params: (0, r.validate)((0, r.arrayOfType)("FunctionTypeParam")), + rest: (0, r.validateOptionalType)("FunctionTypeParam"), + this: (0, r.validateOptionalType)("FunctionTypeParam"), + returnType: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("FunctionTypeParam", { + visitor: [ "name", "typeAnnotation" ], + aliases: [ "Flow" ], + fields: { + name: (0, r.validateOptionalType)("Identifier"), + typeAnnotation: (0, r.validateType)("FlowType"), + optional: (0, r.validateOptional)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("GenericTypeAnnotation", { + visitor: [ "id", "typeParameters" ], + aliases: [ "Flow", "FlowType" ], + fields: { + id: (0, r.validateType)([ "Identifier", "QualifiedTypeIdentifier" ]), + typeParameters: (0, r.validateOptionalType)("TypeParameterInstantiation") + } + }); + (0, r.default)("InferredPredicate", { + aliases: [ "Flow", "FlowPredicate" ] + }); + (0, r.default)("InterfaceExtends", { + visitor: [ "id", "typeParameters" ], + aliases: [ "Flow" ], + fields: { + id: (0, r.validateType)([ "Identifier", "QualifiedTypeIdentifier" ]), + typeParameters: (0, r.validateOptionalType)("TypeParameterInstantiation") + } + }); + i("InterfaceDeclaration"); + (0, r.default)("InterfaceTypeAnnotation", { + visitor: [ "extends", "body" ], + aliases: [ "Flow", "FlowType" ], + fields: { + extends: (0, r.validateOptional)((0, r.arrayOfType)("InterfaceExtends")), + body: (0, r.validateType)("ObjectTypeAnnotation") + } + }); + (0, r.default)("IntersectionTypeAnnotation", { + visitor: [ "types" ], + aliases: [ "Flow", "FlowType" ], + fields: { + types: (0, r.validate)((0, r.arrayOfType)("FlowType")) + } + }); + (0, r.default)("MixedTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("EmptyTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("NullableTypeAnnotation", { + visitor: [ "typeAnnotation" ], + aliases: [ "Flow", "FlowType" ], + fields: { + typeAnnotation: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("NumberLiteralTypeAnnotation", { + builder: [ "value" ], + aliases: [ "Flow", "FlowType" ], + fields: { + value: (0, r.validate)((0, r.assertValueType)("number")) + } + }); + (0, r.default)("NumberTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("ObjectTypeAnnotation", { + visitor: [ "properties", "indexers", "callProperties", "internalSlots" ], + aliases: [ "Flow", "FlowType" ], + builder: [ "properties", "indexers", "callProperties", "internalSlots", "exact" ], + fields: { + properties: (0, r.validate)((0, r.arrayOfType)([ "ObjectTypeProperty", "ObjectTypeSpreadProperty" ])), + indexers: (0, r.validateOptional)((0, r.arrayOfType)("ObjectTypeIndexer")), + callProperties: (0, r.validateOptional)((0, r.arrayOfType)("ObjectTypeCallProperty")), + internalSlots: (0, r.validateOptional)((0, r.arrayOfType)("ObjectTypeInternalSlot")), + exact: { + validate: (0, r.assertValueType)("boolean"), + default: !1 + }, + inexact: (0, r.validateOptional)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("ObjectTypeInternalSlot", { + visitor: [ "id", "value", "optional", "static", "method" ], + aliases: [ "Flow", "UserWhitespacable" ], + fields: { + id: (0, r.validateType)("Identifier"), + value: (0, r.validateType)("FlowType"), + optional: (0, r.validate)((0, r.assertValueType)("boolean")), + static: (0, r.validate)((0, r.assertValueType)("boolean")), + method: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("ObjectTypeCallProperty", { + visitor: [ "value" ], + aliases: [ "Flow", "UserWhitespacable" ], + fields: { + value: (0, r.validateType)("FlowType"), + static: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("ObjectTypeIndexer", { + visitor: [ "id", "key", "value", "variance" ], + aliases: [ "Flow", "UserWhitespacable" ], + fields: { + id: (0, r.validateOptionalType)("Identifier"), + key: (0, r.validateType)("FlowType"), + value: (0, r.validateType)("FlowType"), + static: (0, r.validate)((0, r.assertValueType)("boolean")), + variance: (0, r.validateOptionalType)("Variance") + } + }); + (0, r.default)("ObjectTypeProperty", { + visitor: [ "key", "value", "variance" ], + aliases: [ "Flow", "UserWhitespacable" ], + fields: { + key: (0, r.validateType)([ "Identifier", "StringLiteral" ]), + value: (0, r.validateType)("FlowType"), + kind: (0, r.validate)((0, r.assertOneOf)("init", "get", "set")), + static: (0, r.validate)((0, r.assertValueType)("boolean")), + proto: (0, r.validate)((0, r.assertValueType)("boolean")), + optional: (0, r.validate)((0, r.assertValueType)("boolean")), + variance: (0, r.validateOptionalType)("Variance"), + method: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("ObjectTypeSpreadProperty", { + visitor: [ "argument" ], + aliases: [ "Flow", "UserWhitespacable" ], + fields: { + argument: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("OpaqueType", { + visitor: [ "id", "typeParameters", "supertype", "impltype" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TypeParameterDeclaration"), + supertype: (0, r.validateOptionalType)("FlowType"), + impltype: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("QualifiedTypeIdentifier", { + visitor: [ "id", "qualification" ], + aliases: [ "Flow" ], + fields: { + id: (0, r.validateType)("Identifier"), + qualification: (0, r.validateType)([ "Identifier", "QualifiedTypeIdentifier" ]) + } + }); + (0, r.default)("StringLiteralTypeAnnotation", { + builder: [ "value" ], + aliases: [ "Flow", "FlowType" ], + fields: { + value: (0, r.validate)((0, r.assertValueType)("string")) + } + }); + (0, r.default)("StringTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("SymbolTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("ThisTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("TupleTypeAnnotation", { + visitor: [ "types" ], + aliases: [ "Flow", "FlowType" ], + fields: { + types: (0, r.validate)((0, r.arrayOfType)("FlowType")) + } + }); + (0, r.default)("TypeofTypeAnnotation", { + visitor: [ "argument" ], + aliases: [ "Flow", "FlowType" ], + fields: { + argument: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("TypeAlias", { + visitor: [ "id", "typeParameters", "right" ], + aliases: [ "Flow", "FlowDeclaration", "Statement", "Declaration" ], + fields: { + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TypeParameterDeclaration"), + right: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("TypeAnnotation", { + aliases: [ "Flow" ], + visitor: [ "typeAnnotation" ], + fields: { + typeAnnotation: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("TypeCastExpression", { + visitor: [ "expression", "typeAnnotation" ], + aliases: [ "Flow", "ExpressionWrapper", "Expression" ], + fields: { + expression: (0, r.validateType)("Expression"), + typeAnnotation: (0, r.validateType)("TypeAnnotation") + } + }); + (0, r.default)("TypeParameter", { + aliases: [ "Flow" ], + visitor: [ "bound", "default", "variance" ], + fields: { + name: (0, r.validate)((0, r.assertValueType)("string")), + bound: (0, r.validateOptionalType)("TypeAnnotation"), + default: (0, r.validateOptionalType)("FlowType"), + variance: (0, r.validateOptionalType)("Variance") + } + }); + (0, r.default)("TypeParameterDeclaration", { + aliases: [ "Flow" ], + visitor: [ "params" ], + fields: { + params: (0, r.validate)((0, r.arrayOfType)("TypeParameter")) + } + }); + (0, r.default)("TypeParameterInstantiation", { + aliases: [ "Flow" ], + visitor: [ "params" ], + fields: { + params: (0, r.validate)((0, r.arrayOfType)("FlowType")) + } + }); + (0, r.default)("UnionTypeAnnotation", { + visitor: [ "types" ], + aliases: [ "Flow", "FlowType" ], + fields: { + types: (0, r.validate)((0, r.arrayOfType)("FlowType")) + } + }); + (0, r.default)("Variance", { + aliases: [ "Flow" ], + builder: [ "kind" ], + fields: { + kind: (0, r.validate)((0, r.assertOneOf)("minus", "plus")) + } + }); + (0, r.default)("VoidTypeAnnotation", { + aliases: [ "Flow", "FlowType", "FlowBaseAnnotation" ] + }); + (0, r.default)("EnumDeclaration", { + aliases: [ "Statement", "Declaration" ], + visitor: [ "id", "body" ], + fields: { + id: (0, r.validateType)("Identifier"), + body: (0, r.validateType)([ "EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody" ]) + } + }); + (0, r.default)("EnumBooleanBody", { + aliases: [ "EnumBody" ], + visitor: [ "members" ], + fields: { + explicitType: (0, r.validate)((0, r.assertValueType)("boolean")), + members: (0, r.validateArrayOfType)("EnumBooleanMember"), + hasUnknownMembers: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("EnumNumberBody", { + aliases: [ "EnumBody" ], + visitor: [ "members" ], + fields: { + explicitType: (0, r.validate)((0, r.assertValueType)("boolean")), + members: (0, r.validateArrayOfType)("EnumNumberMember"), + hasUnknownMembers: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("EnumStringBody", { + aliases: [ "EnumBody" ], + visitor: [ "members" ], + fields: { + explicitType: (0, r.validate)((0, r.assertValueType)("boolean")), + members: (0, r.validateArrayOfType)([ "EnumStringMember", "EnumDefaultedMember" ]), + hasUnknownMembers: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("EnumSymbolBody", { + aliases: [ "EnumBody" ], + visitor: [ "members" ], + fields: { + members: (0, r.validateArrayOfType)("EnumDefaultedMember"), + hasUnknownMembers: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + (0, r.default)("EnumBooleanMember", { + aliases: [ "EnumMember" ], + visitor: [ "id" ], + fields: { + id: (0, r.validateType)("Identifier"), + init: (0, r.validateType)("BooleanLiteral") + } + }); + (0, r.default)("EnumNumberMember", { + aliases: [ "EnumMember" ], + visitor: [ "id", "init" ], + fields: { + id: (0, r.validateType)("Identifier"), + init: (0, r.validateType)("NumericLiteral") + } + }); + (0, r.default)("EnumStringMember", { + aliases: [ "EnumMember" ], + visitor: [ "id", "init" ], + fields: { + id: (0, r.validateType)("Identifier"), + init: (0, r.validateType)("StringLiteral") + } + }); + (0, r.default)("EnumDefaultedMember", { + aliases: [ "EnumMember" ], + visitor: [ "id" ], + fields: { + id: (0, r.validateType)("Identifier") + } + }); + (0, r.default)("IndexedAccessType", { + visitor: [ "objectType", "indexType" ], + aliases: [ "Flow", "FlowType" ], + fields: { + objectType: (0, r.validateType)("FlowType"), + indexType: (0, r.validateType)("FlowType") + } + }); + (0, r.default)("OptionalIndexedAccessType", { + visitor: [ "objectType", "indexType" ], + aliases: [ "Flow", "FlowType" ], + fields: { + objectType: (0, r.validateType)("FlowType"), + indexType: (0, r.validateType)("FlowType"), + optional: (0, r.validate)((0, r.assertValueType)("boolean")) + } + }); + }, { + "./utils": 107 + } ], + 102: [ function(e, t, n) { + "use strict"; + var r, i, s; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + Object.defineProperty(n, "VISITOR_KEYS", { + enumerable: !0, + get: function() { + return i.VISITOR_KEYS; + } + }); + Object.defineProperty(n, "ALIAS_KEYS", { + enumerable: !0, + get: function() { + return i.ALIAS_KEYS; + } + }); + Object.defineProperty(n, "FLIPPED_ALIAS_KEYS", { + enumerable: !0, + get: function() { + return i.FLIPPED_ALIAS_KEYS; + } + }); + Object.defineProperty(n, "NODE_FIELDS", { + enumerable: !0, + get: function() { + return i.NODE_FIELDS; + } + }); + Object.defineProperty(n, "BUILDER_KEYS", { + enumerable: !0, + get: function() { + return i.BUILDER_KEYS; + } + }); + Object.defineProperty(n, "DEPRECATED_KEYS", { + enumerable: !0, + get: function() { + return i.DEPRECATED_KEYS; + } + }); + Object.defineProperty(n, "NODE_PARENT_VALIDATIONS", { + enumerable: !0, + get: function() { + return i.NODE_PARENT_VALIDATIONS; + } + }); + Object.defineProperty(n, "PLACEHOLDERS", { + enumerable: !0, + get: function() { + return s.PLACEHOLDERS; + } + }); + Object.defineProperty(n, "PLACEHOLDERS_ALIAS", { + enumerable: !0, + get: function() { + return s.PLACEHOLDERS_ALIAS; + } + }); + Object.defineProperty(n, "PLACEHOLDERS_FLIPPED_ALIAS", { + enumerable: !0, + get: function() { + return s.PLACEHOLDERS_FLIPPED_ALIAS; + } + }); + n.TYPES = void 0; + r = e("to-fast-properties"); + e("./core"); + e("./flow"); + e("./jsx"); + e("./misc"); + e("./experimental"); + e("./typescript"); + i = e("./utils"); + s = e("./placeholders"); + r(i.VISITOR_KEYS); + r(i.ALIAS_KEYS); + r(i.FLIPPED_ALIAS_KEYS); + r(i.NODE_FIELDS); + r(i.BUILDER_KEYS); + r(i.DEPRECATED_KEYS); + r(s.PLACEHOLDERS_ALIAS); + r(s.PLACEHOLDERS_FLIPPED_ALIAS); + const a = Object.keys(i.VISITOR_KEYS).concat(Object.keys(i.FLIPPED_ALIAS_KEYS)).concat(Object.keys(i.DEPRECATED_KEYS)); + n.TYPES = a; + }, { + "./core": 99, + "./experimental": 100, + "./flow": 101, + "./jsx": 103, + "./misc": 104, + "./placeholders": 105, + "./typescript": 106, + "./utils": 107, + "to-fast-properties": 173 + } ], + 103: [ function(e, t, n) { + "use strict"; + var r = e("./utils"); + (0, r.default)("JSXAttribute", { + visitor: [ "name", "value" ], + aliases: [ "JSX", "Immutable" ], + fields: { + name: { + validate: (0, r.assertNodeType)("JSXIdentifier", "JSXNamespacedName") + }, + value: { + optional: !0, + validate: (0, r.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") + } + } + }); + (0, r.default)("JSXClosingElement", { + visitor: [ "name" ], + aliases: [ "JSX", "Immutable" ], + fields: { + name: { + validate: (0, r.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") + } + } + }); + (0, r.default)("JSXElement", { + builder: [ "openingElement", "closingElement", "children", "selfClosing" ], + visitor: [ "openingElement", "children", "closingElement" ], + aliases: [ "JSX", "Immutable", "Expression" ], + fields: { + openingElement: { + validate: (0, r.assertNodeType)("JSXOpeningElement") + }, + closingElement: { + optional: !0, + validate: (0, r.assertNodeType)("JSXClosingElement") + }, + children: { + validate: (0, r.chain)((0, r.assertValueType)("array"), (0, r.assertEach)((0, r.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + }, + selfClosing: { + validate: (0, r.assertValueType)("boolean"), + optional: !0 + } + } + }); + (0, r.default)("JSXEmptyExpression", { + aliases: [ "JSX" ] + }); + (0, r.default)("JSXExpressionContainer", { + visitor: [ "expression" ], + aliases: [ "JSX", "Immutable" ], + fields: { + expression: { + validate: (0, r.assertNodeType)("Expression", "JSXEmptyExpression") + } + } + }); + (0, r.default)("JSXSpreadChild", { + visitor: [ "expression" ], + aliases: [ "JSX", "Immutable" ], + fields: { + expression: { + validate: (0, r.assertNodeType)("Expression") + } + } + }); + (0, r.default)("JSXIdentifier", { + builder: [ "name" ], + aliases: [ "JSX" ], + fields: { + name: { + validate: (0, r.assertValueType)("string") + } + } + }); + (0, r.default)("JSXMemberExpression", { + visitor: [ "object", "property" ], + aliases: [ "JSX" ], + fields: { + object: { + validate: (0, r.assertNodeType)("JSXMemberExpression", "JSXIdentifier") + }, + property: { + validate: (0, r.assertNodeType)("JSXIdentifier") + } + } + }); + (0, r.default)("JSXNamespacedName", { + visitor: [ "namespace", "name" ], + aliases: [ "JSX" ], + fields: { + namespace: { + validate: (0, r.assertNodeType)("JSXIdentifier") + }, + name: { + validate: (0, r.assertNodeType)("JSXIdentifier") + } + } + }); + (0, r.default)("JSXOpeningElement", { + builder: [ "name", "attributes", "selfClosing" ], + visitor: [ "name", "attributes" ], + aliases: [ "JSX", "Immutable" ], + fields: { + name: { + validate: (0, r.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") + }, + selfClosing: { + default: !1 + }, + attributes: { + validate: (0, r.chain)((0, r.assertValueType)("array"), (0, r.assertEach)((0, r.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) + }, + typeParameters: { + validate: (0, r.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), + optional: !0 + } + } + }); + (0, r.default)("JSXSpreadAttribute", { + visitor: [ "argument" ], + aliases: [ "JSX" ], + fields: { + argument: { + validate: (0, r.assertNodeType)("Expression") + } + } + }); + (0, r.default)("JSXText", { + aliases: [ "JSX", "Immutable" ], + builder: [ "value" ], + fields: { + value: { + validate: (0, r.assertValueType)("string") + } + } + }); + (0, r.default)("JSXFragment", { + builder: [ "openingFragment", "closingFragment", "children" ], + visitor: [ "openingFragment", "children", "closingFragment" ], + aliases: [ "JSX", "Immutable", "Expression" ], + fields: { + openingFragment: { + validate: (0, r.assertNodeType)("JSXOpeningFragment") + }, + closingFragment: { + validate: (0, r.assertNodeType)("JSXClosingFragment") + }, + children: { + validate: (0, r.chain)((0, r.assertValueType)("array"), (0, r.assertEach)((0, r.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) + } + } + }); + (0, r.default)("JSXOpeningFragment", { + aliases: [ "JSX", "Immutable" ] + }); + (0, r.default)("JSXClosingFragment", { + aliases: [ "JSX", "Immutable" ] + }); + }, { + "./utils": 107 + } ], + 104: [ function(e, t, n) { + "use strict"; + var r = e("./utils"), i = e("./placeholders"); + (0, r.default)("Noop", { + visitor: [] + }); + (0, r.default)("Placeholder", { + visitor: [], + builder: [ "expectedNode", "name" ], + fields: { + name: { + validate: (0, r.assertNodeType)("Identifier") + }, + expectedNode: { + validate: (0, r.assertOneOf)(...i.PLACEHOLDERS) + } + } + }); + (0, r.default)("V8IntrinsicIdentifier", { + builder: [ "name" ], + fields: { + name: { + validate: (0, r.assertValueType)("string") + } + } + }); + }, { + "./placeholders": 105, + "./utils": 107 + } ], + 105: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.PLACEHOLDERS_FLIPPED_ALIAS = n.PLACEHOLDERS_ALIAS = n.PLACEHOLDERS = void 0; + var r = e("./utils"); + const i = [ "Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern" ]; + n.PLACEHOLDERS = i; + const s = { + Declaration: [ "Statement" ], + Pattern: [ "PatternLike", "LVal" ] + }; + n.PLACEHOLDERS_ALIAS = s; + for (const e of i) { + const t = r.ALIAS_KEYS[e]; + null != t && t.length && (s[e] = t); + } + const a = {}; + n.PLACEHOLDERS_FLIPPED_ALIAS = a; + Object.keys(s).forEach(e => { + s[e].forEach(t => { + Object.hasOwnProperty.call(a, t) || (a[t] = []); + a[t].push(e); + }); + }); + }, { + "./utils": 107 + } ], + 106: [ function(e, t, n) { + "use strict"; + var r = e("./utils"), i = e("./core"), s = e("../validators/is"); + const a = (0, r.assertValueType)("boolean"); + const o = { + returnType: { + validate: (0, r.assertNodeType)("TSTypeAnnotation", "Noop"), + optional: !0 + }, + typeParameters: { + validate: (0, r.assertNodeType)("TSTypeParameterDeclaration", "Noop"), + optional: !0 + } + }; + (0, r.default)("TSParameterProperty", { + aliases: [ "LVal" ], + visitor: [ "parameter" ], + fields: { + accessibility: { + validate: (0, r.assertOneOf)("public", "private", "protected"), + optional: !0 + }, + readonly: { + validate: (0, r.assertValueType)("boolean"), + optional: !0 + }, + parameter: { + validate: (0, r.assertNodeType)("Identifier", "AssignmentPattern") + }, + override: { + validate: (0, r.assertValueType)("boolean"), + optional: !0 + }, + decorators: { + validate: (0, r.chain)((0, r.assertValueType)("array"), (0, r.assertEach)((0, r.assertNodeType)("Decorator"))), + optional: !0 + } + } + }); + (0, r.default)("TSDeclareFunction", { + aliases: [ "Statement", "Declaration" ], + visitor: [ "id", "typeParameters", "params", "returnType" ], + fields: Object.assign({}, i.functionDeclarationCommon, o) + }); + (0, r.default)("TSDeclareMethod", { + visitor: [ "decorators", "key", "typeParameters", "params", "returnType" ], + fields: Object.assign({}, i.classMethodOrDeclareMethodCommon, o) + }); + (0, r.default)("TSQualifiedName", { + aliases: [ "TSEntityName" ], + visitor: [ "left", "right" ], + fields: { + left: (0, r.validateType)("TSEntityName"), + right: (0, r.validateType)("Identifier") + } + }); + const l = { + typeParameters: (0, r.validateOptionalType)("TSTypeParameterDeclaration"), + parameters: (0, r.validateArrayOfType)([ "Identifier", "RestElement" ]), + typeAnnotation: (0, r.validateOptionalType)("TSTypeAnnotation") + }; + const c = { + aliases: [ "TSTypeElement" ], + visitor: [ "typeParameters", "parameters", "typeAnnotation" ], + fields: l + }; + (0, r.default)("TSCallSignatureDeclaration", c); + (0, r.default)("TSConstructSignatureDeclaration", c); + const p = { + key: (0, r.validateType)("Expression"), + computed: (0, r.validate)(a), + optional: (0, r.validateOptional)(a) + }; + (0, r.default)("TSPropertySignature", { + aliases: [ "TSTypeElement" ], + visitor: [ "key", "typeAnnotation", "initializer" ], + fields: Object.assign({}, p, { + readonly: (0, r.validateOptional)(a), + typeAnnotation: (0, r.validateOptionalType)("TSTypeAnnotation"), + initializer: (0, r.validateOptionalType)("Expression"), + kind: { + validate: (0, r.assertOneOf)("get", "set") + } + }) + }); + (0, r.default)("TSMethodSignature", { + aliases: [ "TSTypeElement" ], + visitor: [ "key", "typeParameters", "parameters", "typeAnnotation" ], + fields: Object.assign({}, l, p, { + kind: { + validate: (0, r.assertOneOf)("method", "get", "set") + } + }) + }); + (0, r.default)("TSIndexSignature", { + aliases: [ "TSTypeElement" ], + visitor: [ "parameters", "typeAnnotation" ], + fields: { + readonly: (0, r.validateOptional)(a), + static: (0, r.validateOptional)(a), + parameters: (0, r.validateArrayOfType)("Identifier"), + typeAnnotation: (0, r.validateOptionalType)("TSTypeAnnotation") + } + }); + const u = [ "TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword" ]; + for (const e of u) (0, r.default)(e, { + aliases: [ "TSType", "TSBaseType" ], + visitor: [], + fields: {} + }); + (0, r.default)("TSThisType", { + aliases: [ "TSType", "TSBaseType" ], + visitor: [], + fields: {} + }); + const d = { + aliases: [ "TSType" ], + visitor: [ "typeParameters", "parameters", "typeAnnotation" ] + }; + (0, r.default)("TSFunctionType", Object.assign({}, d, { + fields: l + })); + (0, r.default)("TSConstructorType", Object.assign({}, d, { + fields: Object.assign({}, l, { + abstract: (0, r.validateOptional)(a) + }) + })); + (0, r.default)("TSTypeReference", { + aliases: [ "TSType" ], + visitor: [ "typeName", "typeParameters" ], + fields: { + typeName: (0, r.validateType)("TSEntityName"), + typeParameters: (0, r.validateOptionalType)("TSTypeParameterInstantiation") + } + }); + (0, r.default)("TSTypePredicate", { + aliases: [ "TSType" ], + visitor: [ "parameterName", "typeAnnotation" ], + builder: [ "parameterName", "typeAnnotation", "asserts" ], + fields: { + parameterName: (0, r.validateType)([ "Identifier", "TSThisType" ]), + typeAnnotation: (0, r.validateOptionalType)("TSTypeAnnotation"), + asserts: (0, r.validateOptional)(a) + } + }); + (0, r.default)("TSTypeQuery", { + aliases: [ "TSType" ], + visitor: [ "exprName" ], + fields: { + exprName: (0, r.validateType)([ "TSEntityName", "TSImportType" ]) + } + }); + (0, r.default)("TSTypeLiteral", { + aliases: [ "TSType" ], + visitor: [ "members" ], + fields: { + members: (0, r.validateArrayOfType)("TSTypeElement") + } + }); + (0, r.default)("TSArrayType", { + aliases: [ "TSType" ], + visitor: [ "elementType" ], + fields: { + elementType: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSTupleType", { + aliases: [ "TSType" ], + visitor: [ "elementTypes" ], + fields: { + elementTypes: (0, r.validateArrayOfType)([ "TSType", "TSNamedTupleMember" ]) + } + }); + (0, r.default)("TSOptionalType", { + aliases: [ "TSType" ], + visitor: [ "typeAnnotation" ], + fields: { + typeAnnotation: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSRestType", { + aliases: [ "TSType" ], + visitor: [ "typeAnnotation" ], + fields: { + typeAnnotation: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSNamedTupleMember", { + visitor: [ "label", "elementType" ], + builder: [ "label", "elementType", "optional" ], + fields: { + label: (0, r.validateType)("Identifier"), + optional: { + validate: a, + default: !1 + }, + elementType: (0, r.validateType)("TSType") + } + }); + const h = { + aliases: [ "TSType" ], + visitor: [ "types" ], + fields: { + types: (0, r.validateArrayOfType)("TSType") + } + }; + (0, r.default)("TSUnionType", h); + (0, r.default)("TSIntersectionType", h); + (0, r.default)("TSConditionalType", { + aliases: [ "TSType" ], + visitor: [ "checkType", "extendsType", "trueType", "falseType" ], + fields: { + checkType: (0, r.validateType)("TSType"), + extendsType: (0, r.validateType)("TSType"), + trueType: (0, r.validateType)("TSType"), + falseType: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSInferType", { + aliases: [ "TSType" ], + visitor: [ "typeParameter" ], + fields: { + typeParameter: (0, r.validateType)("TSTypeParameter") + } + }); + (0, r.default)("TSParenthesizedType", { + aliases: [ "TSType" ], + visitor: [ "typeAnnotation" ], + fields: { + typeAnnotation: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSTypeOperator", { + aliases: [ "TSType" ], + visitor: [ "typeAnnotation" ], + fields: { + operator: (0, r.validate)((0, r.assertValueType)("string")), + typeAnnotation: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSIndexedAccessType", { + aliases: [ "TSType" ], + visitor: [ "objectType", "indexType" ], + fields: { + objectType: (0, r.validateType)("TSType"), + indexType: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSMappedType", { + aliases: [ "TSType" ], + visitor: [ "typeParameter", "typeAnnotation", "nameType" ], + fields: { + readonly: (0, r.validateOptional)(a), + typeParameter: (0, r.validateType)("TSTypeParameter"), + optional: (0, r.validateOptional)(a), + typeAnnotation: (0, r.validateOptionalType)("TSType"), + nameType: (0, r.validateOptionalType)("TSType") + } + }); + (0, r.default)("TSLiteralType", { + aliases: [ "TSType", "TSBaseType" ], + visitor: [ "literal" ], + fields: { + literal: { + validate: function() { + const e = (0, r.assertNodeType)("NumericLiteral", "BigIntLiteral"); + const t = (0, r.assertOneOf)("-"); + const n = (0, r.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"); + function i(r, i, a) { + if ((0, s.default)("UnaryExpression", a)) { + t(a, "operator", a.operator); + e(a, "argument", a.argument); + } else n(r, i, a); + } + i.oneOfNodeTypes = [ "NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression" ]; + return i; + }() + } + } + }); + (0, r.default)("TSExpressionWithTypeArguments", { + aliases: [ "TSType" ], + visitor: [ "expression", "typeParameters" ], + fields: { + expression: (0, r.validateType)("TSEntityName"), + typeParameters: (0, r.validateOptionalType)("TSTypeParameterInstantiation") + } + }); + (0, r.default)("TSInterfaceDeclaration", { + aliases: [ "Statement", "Declaration" ], + visitor: [ "id", "typeParameters", "extends", "body" ], + fields: { + declare: (0, r.validateOptional)(a), + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TSTypeParameterDeclaration"), + extends: (0, r.validateOptional)((0, r.arrayOfType)("TSExpressionWithTypeArguments")), + body: (0, r.validateType)("TSInterfaceBody") + } + }); + (0, r.default)("TSInterfaceBody", { + visitor: [ "body" ], + fields: { + body: (0, r.validateArrayOfType)("TSTypeElement") + } + }); + (0, r.default)("TSTypeAliasDeclaration", { + aliases: [ "Statement", "Declaration" ], + visitor: [ "id", "typeParameters", "typeAnnotation" ], + fields: { + declare: (0, r.validateOptional)(a), + id: (0, r.validateType)("Identifier"), + typeParameters: (0, r.validateOptionalType)("TSTypeParameterDeclaration"), + typeAnnotation: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSAsExpression", { + aliases: [ "Expression" ], + visitor: [ "expression", "typeAnnotation" ], + fields: { + expression: (0, r.validateType)("Expression"), + typeAnnotation: (0, r.validateType)("TSType") + } + }); + (0, r.default)("TSTypeAssertion", { + aliases: [ "Expression" ], + visitor: [ "typeAnnotation", "expression" ], + fields: { + typeAnnotation: (0, r.validateType)("TSType"), + expression: (0, r.validateType)("Expression") + } + }); + (0, r.default)("TSEnumDeclaration", { + aliases: [ "Statement", "Declaration" ], + visitor: [ "id", "members" ], + fields: { + declare: (0, r.validateOptional)(a), + const: (0, r.validateOptional)(a), + id: (0, r.validateType)("Identifier"), + members: (0, r.validateArrayOfType)("TSEnumMember"), + initializer: (0, r.validateOptionalType)("Expression") + } + }); + (0, r.default)("TSEnumMember", { + visitor: [ "id", "initializer" ], + fields: { + id: (0, r.validateType)([ "Identifier", "StringLiteral" ]), + initializer: (0, r.validateOptionalType)("Expression") + } + }); + (0, r.default)("TSModuleDeclaration", { + aliases: [ "Statement", "Declaration" ], + visitor: [ "id", "body" ], + fields: { + declare: (0, r.validateOptional)(a), + global: (0, r.validateOptional)(a), + id: (0, r.validateType)([ "Identifier", "StringLiteral" ]), + body: (0, r.validateType)([ "TSModuleBlock", "TSModuleDeclaration" ]) + } + }); + (0, r.default)("TSModuleBlock", { + aliases: [ "Scopable", "Block", "BlockParent" ], + visitor: [ "body" ], + fields: { + body: (0, r.validateArrayOfType)("Statement") + } + }); + (0, r.default)("TSImportType", { + aliases: [ "TSType" ], + visitor: [ "argument", "qualifier", "typeParameters" ], + fields: { + argument: (0, r.validateType)("StringLiteral"), + qualifier: (0, r.validateOptionalType)("TSEntityName"), + typeParameters: (0, r.validateOptionalType)("TSTypeParameterInstantiation") + } + }); + (0, r.default)("TSImportEqualsDeclaration", { + aliases: [ "Statement" ], + visitor: [ "id", "moduleReference" ], + fields: { + isExport: (0, r.validate)(a), + id: (0, r.validateType)("Identifier"), + moduleReference: (0, r.validateType)([ "TSEntityName", "TSExternalModuleReference" ]), + importKind: { + validate: (0, r.assertOneOf)("type", "value"), + optional: !0 + } + } + }); + (0, r.default)("TSExternalModuleReference", { + visitor: [ "expression" ], + fields: { + expression: (0, r.validateType)("StringLiteral") + } + }); + (0, r.default)("TSNonNullExpression", { + aliases: [ "Expression" ], + visitor: [ "expression" ], + fields: { + expression: (0, r.validateType)("Expression") + } + }); + (0, r.default)("TSExportAssignment", { + aliases: [ "Statement" ], + visitor: [ "expression" ], + fields: { + expression: (0, r.validateType)("Expression") + } + }); + (0, r.default)("TSNamespaceExportDeclaration", { + aliases: [ "Statement" ], + visitor: [ "id" ], + fields: { + id: (0, r.validateType)("Identifier") + } + }); + (0, r.default)("TSTypeAnnotation", { + visitor: [ "typeAnnotation" ], + fields: { + typeAnnotation: { + validate: (0, r.assertNodeType)("TSType") + } + } + }); + (0, r.default)("TSTypeParameterInstantiation", { + visitor: [ "params" ], + fields: { + params: { + validate: (0, r.chain)((0, r.assertValueType)("array"), (0, r.assertEach)((0, r.assertNodeType)("TSType"))) + } + } + }); + (0, r.default)("TSTypeParameterDeclaration", { + visitor: [ "params" ], + fields: { + params: { + validate: (0, r.chain)((0, r.assertValueType)("array"), (0, r.assertEach)((0, r.assertNodeType)("TSTypeParameter"))) + } + } + }); + (0, r.default)("TSTypeParameter", { + builder: [ "constraint", "default", "name" ], + visitor: [ "constraint", "default" ], + fields: { + name: { + validate: (0, r.assertValueType)("string") + }, + constraint: { + validate: (0, r.assertNodeType)("TSType"), + optional: !0 + }, + default: { + validate: (0, r.assertNodeType)("TSType"), + optional: !0 + } + } + }); + }, { + "../validators/is": 125, + "./core": 99, + "./utils": 107 + } ], + 107: [ function(e, t, n) { + (function(t) { + (function() { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.validate = h; + n.typeIs = f; + n.validateType = function(e) { + return h(f(e)); + }; + n.validateOptional = function(e) { + return { + validate: e, + optional: !0 + }; + }; + n.validateOptionalType = function(e) { + return { + validate: f(e), + optional: !0 + }; + }; + n.arrayOf = m; + n.arrayOfType = y; + n.validateArrayOfType = function(e) { + return h(y(e)); + }; + n.assertEach = g; + n.assertOneOf = function(...e) { + function t(t, n, r) { + if (e.indexOf(r) < 0) throw new TypeError(`Property ${n} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(r)}`); + } + t.oneOf = e; + return t; + }; + n.assertNodeType = T; + n.assertNodeOrValueType = function(...e) { + function t(t, n, s) { + for (const a of e) if (d(s) === a || (0, r.default)(a, s)) { + (0, i.validateChild)(t, n, s); + return; + } + throw new TypeError(`Property ${n} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(null == s ? void 0 : s.type)}`); + } + t.oneOfNodeOrValueTypes = e; + return t; + }; + n.assertValueType = b; + n.assertShape = function(e) { + function t(t, n, r) { + const s = []; + for (const n of Object.keys(e)) try { + (0, i.validateField)(t, n, r[n], e[n]); + } catch (e) { + if (e instanceof TypeError) { + s.push(e.message); + continue; + } + throw e; + } + if (s.length) throw new TypeError(`Property ${n} of ${t.type} expected to have the following:\n${s.join("\n")}`); + } + t.shapeOf = e; + return t; + }; + n.assertOptionalChainStart = function() { + return function(e) { + var t; + let n = e; + for (;e; ) { + const {type: e} = n; + if ("OptionalCallExpression" !== e) { + if ("OptionalMemberExpression" !== e) break; + if (n.optional) return; + n = n.object; + } else { + if (n.optional) return; + n = n.callee; + } + } + throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${null == (t = n) ? void 0 : t.type}`); + }; + }; + n.chain = S; + n.default = function(e, t = {}) { + const n = t.inherits && P[t.inherits] || {}; + let r = t.fields; + if (!r) { + r = {}; + if (n.fields) { + const e = Object.getOwnPropertyNames(n.fields); + for (const t of e) { + const e = n.fields[t]; + const i = e.default; + if (Array.isArray(i) ? i.length > 0 : i && "object" == typeof i) throw new Error("field defaults can only be primitives or empty arrays currently"); + r[t] = { + default: Array.isArray(i) ? [] : i, + optional: e.optional, + validate: e.validate + }; + } + } + } + const i = t.visitor || n.visitor || []; + const h = t.aliases || n.aliases || []; + const f = t.builder || n.builder || t.visitor || []; + for (const n of Object.keys(t)) if (-1 === x.indexOf(n)) throw new Error(`Unknown type option "${n}" on ${e}`); + t.deprecatedAlias && (p[t.deprecatedAlias] = e); + for (const e of i.concat(f)) r[e] = r[e] || {}; + for (const t of Object.keys(r)) { + const n = r[t]; + void 0 !== n.default && -1 === f.indexOf(t) && (n.optional = !0); + void 0 === n.default ? n.default = null : n.validate || null == n.default || (n.validate = b(d(n.default))); + for (const r of Object.keys(n)) if (-1 === E.indexOf(r)) throw new Error(`Unknown field key "${r}" on ${e}.${t}`); + } + s[e] = t.visitor = i; + c[e] = t.builder = f; + l[e] = t.fields = r; + a[e] = t.aliases = h; + h.forEach(t => { + o[t] = o[t] || []; + o[t].push(e); + }); + t.validate && (u[e] = t.validate); + P[e] = t; + }; + n.NODE_PARENT_VALIDATIONS = n.DEPRECATED_KEYS = n.BUILDER_KEYS = n.NODE_FIELDS = n.FLIPPED_ALIAS_KEYS = n.ALIAS_KEYS = n.VISITOR_KEYS = void 0; + r = e("../validators/is"); + i = e("../validators/validate"); + const s = {}; + n.VISITOR_KEYS = s; + const a = {}; + n.ALIAS_KEYS = a; + const o = {}; + n.FLIPPED_ALIAS_KEYS = o; + const l = {}; + n.NODE_FIELDS = l; + const c = {}; + n.BUILDER_KEYS = c; + const p = {}; + n.DEPRECATED_KEYS = p; + const u = {}; + n.NODE_PARENT_VALIDATIONS = u; + function d(e) { + return Array.isArray(e) ? "array" : null === e ? "null" : typeof e; + } + function h(e) { + return { + validate: e + }; + } + function f(e) { + return "string" == typeof e ? T(e) : T(...e); + } + function m(e) { + return S(b("array"), g(e)); + } + function y(e) { + return m(f(e)); + } + function g(e) { + function n(n, r, s) { + if (Array.isArray(s)) for (let a = 0; a < s.length; a++) { + const o = `${r}[${a}]`; + const l = s[a]; + e(n, o, l); + t.env.BABEL_TYPES_8_BREAKING && (0, i.validateChild)(n, o, l); + } + } + n.each = e; + return n; + } + function T(...e) { + function t(t, n, s) { + for (const a of e) if ((0, r.default)(a, s)) { + (0, i.validateChild)(t, n, s); + return; + } + throw new TypeError(`Property ${n} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(null == s ? void 0 : s.type)}`); + } + t.oneOfNodeTypes = e; + return t; + } + function b(e) { + function t(t, n, r) { + if (!(d(r) === e)) throw new TypeError(`Property ${n} expected type of ${e} but got ${d(r)}`); + } + t.type = e; + return t; + } + function S(...e) { + function t(...t) { + for (const n of e) n(...t); + } + t.chainOf = e; + if (e.length >= 2 && "type" in e[0] && "array" === e[0].type && !("each" in e[1])) throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.'); + return t; + } + const x = [ "aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate" ]; + const E = [ "default", "optional", "validate" ]; + const P = {}; + }).call(this); + }).call(this, e("_process")); + }, { + "../validators/is": 125, + "../validators/validate": 143, + _process: 160 + } ], + 108: [ function(e, t, n) { + "use strict"; + var r, i, s, a, o, l, c, p, u, d, h, f, m, y, g, T, b, S, x, E, P, v, A, w, C, I, O, N, k, D, M, _, L, j, F, B, R, U, V, K, W, q, Y, J, X, G, H, $, z, Q, Z, ee, te, ne, re, ie, se, ae, oe, le, ce, pe, ue, de, he, fe, me; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + r = { + react: !0, + assertNode: !0, + createTypeAnnotationBasedOnTypeof: !0, + createUnionTypeAnnotation: !0, + createFlowUnionType: !0, + createTSUnionType: !0, + cloneNode: !0, + clone: !0, + cloneDeep: !0, + cloneDeepWithoutLoc: !0, + cloneWithoutLoc: !0, + addComment: !0, + addComments: !0, + inheritInnerComments: !0, + inheritLeadingComments: !0, + inheritsComments: !0, + inheritTrailingComments: !0, + removeComments: !0, + ensureBlock: !0, + toBindingIdentifierName: !0, + toBlock: !0, + toComputedKey: !0, + toExpression: !0, + toIdentifier: !0, + toKeyAlias: !0, + toSequenceExpression: !0, + toStatement: !0, + valueToNode: !0, + appendToMemberExpression: !0, + inherits: !0, + prependToMemberExpression: !0, + removeProperties: !0, + removePropertiesDeep: !0, + removeTypeDuplicates: !0, + getBindingIdentifiers: !0, + getOuterBindingIdentifiers: !0, + traverse: !0, + traverseFast: !0, + shallowEqual: !0, + is: !0, + isBinding: !0, + isBlockScoped: !0, + isImmutable: !0, + isLet: !0, + isNode: !0, + isNodesEquivalent: !0, + isPlaceholderType: !0, + isReferenced: !0, + isScope: !0, + isSpecifierDefault: !0, + isType: !0, + isValidES3Identifier: !0, + isValidIdentifier: !0, + isVar: !0, + matchesPattern: !0, + validate: !0, + buildMatchMemberExpression: !0 + }; + Object.defineProperty(n, "assertNode", { + enumerable: !0, + get: function() { + return o.default; + } + }); + Object.defineProperty(n, "createTypeAnnotationBasedOnTypeof", { + enumerable: !0, + get: function() { + return c.default; + } + }); + Object.defineProperty(n, "createUnionTypeAnnotation", { + enumerable: !0, + get: function() { + return p.default; + } + }); + Object.defineProperty(n, "createFlowUnionType", { + enumerable: !0, + get: function() { + return p.default; + } + }); + Object.defineProperty(n, "createTSUnionType", { + enumerable: !0, + get: function() { + return u.default; + } + }); + Object.defineProperty(n, "cloneNode", { + enumerable: !0, + get: function() { + return f.default; + } + }); + Object.defineProperty(n, "clone", { + enumerable: !0, + get: function() { + return m.default; + } + }); + Object.defineProperty(n, "cloneDeep", { + enumerable: !0, + get: function() { + return y.default; + } + }); + Object.defineProperty(n, "cloneDeepWithoutLoc", { + enumerable: !0, + get: function() { + return g.default; + } + }); + Object.defineProperty(n, "cloneWithoutLoc", { + enumerable: !0, + get: function() { + return T.default; + } + }); + Object.defineProperty(n, "addComment", { + enumerable: !0, + get: function() { + return b.default; + } + }); + Object.defineProperty(n, "addComments", { + enumerable: !0, + get: function() { + return S.default; + } + }); + Object.defineProperty(n, "inheritInnerComments", { + enumerable: !0, + get: function() { + return x.default; + } + }); + Object.defineProperty(n, "inheritLeadingComments", { + enumerable: !0, + get: function() { + return E.default; + } + }); + Object.defineProperty(n, "inheritsComments", { + enumerable: !0, + get: function() { + return P.default; + } + }); + Object.defineProperty(n, "inheritTrailingComments", { + enumerable: !0, + get: function() { + return v.default; + } + }); + Object.defineProperty(n, "removeComments", { + enumerable: !0, + get: function() { + return A.default; + } + }); + Object.defineProperty(n, "ensureBlock", { + enumerable: !0, + get: function() { + return I.default; + } + }); + Object.defineProperty(n, "toBindingIdentifierName", { + enumerable: !0, + get: function() { + return O.default; + } + }); + Object.defineProperty(n, "toBlock", { + enumerable: !0, + get: function() { + return N.default; + } + }); + Object.defineProperty(n, "toComputedKey", { + enumerable: !0, + get: function() { + return k.default; + } + }); + Object.defineProperty(n, "toExpression", { + enumerable: !0, + get: function() { + return D.default; + } + }); + Object.defineProperty(n, "toIdentifier", { + enumerable: !0, + get: function() { + return M.default; + } + }); + Object.defineProperty(n, "toKeyAlias", { + enumerable: !0, + get: function() { + return _.default; + } + }); + Object.defineProperty(n, "toSequenceExpression", { + enumerable: !0, + get: function() { + return L.default; + } + }); + Object.defineProperty(n, "toStatement", { + enumerable: !0, + get: function() { + return j.default; + } + }); + Object.defineProperty(n, "valueToNode", { + enumerable: !0, + get: function() { + return F.default; + } + }); + Object.defineProperty(n, "appendToMemberExpression", { + enumerable: !0, + get: function() { + return R.default; + } + }); + Object.defineProperty(n, "inherits", { + enumerable: !0, + get: function() { + return U.default; + } + }); + Object.defineProperty(n, "prependToMemberExpression", { + enumerable: !0, + get: function() { + return V.default; + } + }); + Object.defineProperty(n, "removeProperties", { + enumerable: !0, + get: function() { + return K.default; + } + }); + Object.defineProperty(n, "removePropertiesDeep", { + enumerable: !0, + get: function() { + return W.default; + } + }); + Object.defineProperty(n, "removeTypeDuplicates", { + enumerable: !0, + get: function() { + return q.default; + } + }); + Object.defineProperty(n, "getBindingIdentifiers", { + enumerable: !0, + get: function() { + return Y.default; + } + }); + Object.defineProperty(n, "getOuterBindingIdentifiers", { + enumerable: !0, + get: function() { + return J.default; + } + }); + Object.defineProperty(n, "traverse", { + enumerable: !0, + get: function() { + return X.default; + } + }); + Object.defineProperty(n, "traverseFast", { + enumerable: !0, + get: function() { + return G.default; + } + }); + Object.defineProperty(n, "shallowEqual", { + enumerable: !0, + get: function() { + return H.default; + } + }); + Object.defineProperty(n, "is", { + enumerable: !0, + get: function() { + return $.default; + } + }); + Object.defineProperty(n, "isBinding", { + enumerable: !0, + get: function() { + return z.default; + } + }); + Object.defineProperty(n, "isBlockScoped", { + enumerable: !0, + get: function() { + return Q.default; + } + }); + Object.defineProperty(n, "isImmutable", { + enumerable: !0, + get: function() { + return Z.default; + } + }); + Object.defineProperty(n, "isLet", { + enumerable: !0, + get: function() { + return ee.default; + } + }); + Object.defineProperty(n, "isNode", { + enumerable: !0, + get: function() { + return te.default; + } + }); + Object.defineProperty(n, "isNodesEquivalent", { + enumerable: !0, + get: function() { + return ne.default; + } + }); + Object.defineProperty(n, "isPlaceholderType", { + enumerable: !0, + get: function() { + return re.default; + } + }); + Object.defineProperty(n, "isReferenced", { + enumerable: !0, + get: function() { + return ie.default; + } + }); + Object.defineProperty(n, "isScope", { + enumerable: !0, + get: function() { + return se.default; + } + }); + Object.defineProperty(n, "isSpecifierDefault", { + enumerable: !0, + get: function() { + return ae.default; + } + }); + Object.defineProperty(n, "isType", { + enumerable: !0, + get: function() { + return oe.default; + } + }); + Object.defineProperty(n, "isValidES3Identifier", { + enumerable: !0, + get: function() { + return le.default; + } + }); + Object.defineProperty(n, "isValidIdentifier", { + enumerable: !0, + get: function() { + return ce.default; + } + }); + Object.defineProperty(n, "isVar", { + enumerable: !0, + get: function() { + return pe.default; + } + }); + Object.defineProperty(n, "matchesPattern", { + enumerable: !0, + get: function() { + return ue.default; + } + }); + Object.defineProperty(n, "validate", { + enumerable: !0, + get: function() { + return de.default; + } + }); + Object.defineProperty(n, "buildMatchMemberExpression", { + enumerable: !0, + get: function() { + return he.default; + } + }); + n.react = void 0; + i = e("./validators/react/isReactComponent"); + s = e("./validators/react/isCompatTag"); + a = e("./builders/react/buildChildren"); + o = e("./asserts/assertNode"); + l = e("./asserts/generated"); + Object.keys(l).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === l[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return l[e]; + } + })); + }); + c = e("./builders/flow/createTypeAnnotationBasedOnTypeof"); + p = e("./builders/flow/createFlowUnionType"); + u = e("./builders/typescript/createTSUnionType"); + d = e("./builders/generated"); + Object.keys(d).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === d[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return d[e]; + } + })); + }); + h = e("./builders/generated/uppercase"); + Object.keys(h).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === h[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return h[e]; + } + })); + }); + f = e("./clone/cloneNode"); + m = e("./clone/clone"); + y = e("./clone/cloneDeep"); + g = e("./clone/cloneDeepWithoutLoc"); + T = e("./clone/cloneWithoutLoc"); + b = e("./comments/addComment"); + S = e("./comments/addComments"); + x = e("./comments/inheritInnerComments"); + E = e("./comments/inheritLeadingComments"); + P = e("./comments/inheritsComments"); + v = e("./comments/inheritTrailingComments"); + A = e("./comments/removeComments"); + w = e("./constants/generated"); + Object.keys(w).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === w[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return w[e]; + } + })); + }); + C = e("./constants"); + Object.keys(C).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === C[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return C[e]; + } + })); + }); + I = e("./converters/ensureBlock"); + O = e("./converters/toBindingIdentifierName"); + N = e("./converters/toBlock"); + k = e("./converters/toComputedKey"); + D = e("./converters/toExpression"); + M = e("./converters/toIdentifier"); + _ = e("./converters/toKeyAlias"); + L = e("./converters/toSequenceExpression"); + j = e("./converters/toStatement"); + F = e("./converters/valueToNode"); + B = e("./definitions"); + Object.keys(B).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === B[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return B[e]; + } + })); + }); + R = e("./modifications/appendToMemberExpression"); + U = e("./modifications/inherits"); + V = e("./modifications/prependToMemberExpression"); + K = e("./modifications/removeProperties"); + W = e("./modifications/removePropertiesDeep"); + q = e("./modifications/flow/removeTypeDuplicates"); + Y = e("./retrievers/getBindingIdentifiers"); + J = e("./retrievers/getOuterBindingIdentifiers"); + X = e("./traverse/traverse"); + Object.keys(X).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === X[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return X[e]; + } + })); + }); + G = e("./traverse/traverseFast"); + H = e("./utils/shallowEqual"); + $ = e("./validators/is"); + z = e("./validators/isBinding"); + Q = e("./validators/isBlockScoped"); + Z = e("./validators/isImmutable"); + ee = e("./validators/isLet"); + te = e("./validators/isNode"); + ne = e("./validators/isNodesEquivalent"); + re = e("./validators/isPlaceholderType"); + ie = e("./validators/isReferenced"); + se = e("./validators/isScope"); + ae = e("./validators/isSpecifierDefault"); + oe = e("./validators/isType"); + le = e("./validators/isValidES3Identifier"); + ce = e("./validators/isValidIdentifier"); + pe = e("./validators/isVar"); + ue = e("./validators/matchesPattern"); + de = e("./validators/validate"); + he = e("./validators/buildMatchMemberExpression"); + fe = e("./validators/generated"); + Object.keys(fe).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === fe[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return fe[e]; + } + })); + }); + me = e("./ast-types/generated"); + Object.keys(me).forEach(function(e) { + "default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(r, e) || e in n && n[e] === me[e] || Object.defineProperty(n, e, { + enumerable: !0, + get: function() { + return me[e]; + } + })); + }); + const ye = { + isReactComponent: i.default, + isCompatTag: s.default, + buildChildren: a.default + }; + n.react = ye; + }, { + "./asserts/assertNode": 64, + "./asserts/generated": 65, + "./ast-types/generated": 66, + "./builders/flow/createFlowUnionType": 68, + "./builders/flow/createTypeAnnotationBasedOnTypeof": 69, + "./builders/generated": 70, + "./builders/generated/uppercase": 71, + "./builders/react/buildChildren": 72, + "./builders/typescript/createTSUnionType": 73, + "./clone/clone": 74, + "./clone/cloneDeep": 75, + "./clone/cloneDeepWithoutLoc": 76, + "./clone/cloneNode": 77, + "./clone/cloneWithoutLoc": 78, + "./comments/addComment": 79, + "./comments/addComments": 80, + "./comments/inheritInnerComments": 81, + "./comments/inheritLeadingComments": 82, + "./comments/inheritTrailingComments": 83, + "./comments/inheritsComments": 84, + "./comments/removeComments": 85, + "./constants": 87, + "./constants/generated": 86, + "./converters/ensureBlock": 88, + "./converters/toBindingIdentifierName": 90, + "./converters/toBlock": 91, + "./converters/toComputedKey": 92, + "./converters/toExpression": 93, + "./converters/toIdentifier": 94, + "./converters/toKeyAlias": 95, + "./converters/toSequenceExpression": 96, + "./converters/toStatement": 97, + "./converters/valueToNode": 98, + "./definitions": 102, + "./modifications/appendToMemberExpression": 109, + "./modifications/flow/removeTypeDuplicates": 110, + "./modifications/inherits": 111, + "./modifications/prependToMemberExpression": 112, + "./modifications/removeProperties": 113, + "./modifications/removePropertiesDeep": 114, + "./retrievers/getBindingIdentifiers": 116, + "./retrievers/getOuterBindingIdentifiers": 117, + "./traverse/traverse": 118, + "./traverse/traverseFast": 119, + "./utils/shallowEqual": 122, + "./validators/buildMatchMemberExpression": 123, + "./validators/generated": 124, + "./validators/is": 125, + "./validators/isBinding": 126, + "./validators/isBlockScoped": 127, + "./validators/isImmutable": 128, + "./validators/isLet": 129, + "./validators/isNode": 130, + "./validators/isNodesEquivalent": 131, + "./validators/isPlaceholderType": 132, + "./validators/isReferenced": 133, + "./validators/isScope": 134, + "./validators/isSpecifierDefault": 135, + "./validators/isType": 136, + "./validators/isValidES3Identifier": 137, + "./validators/isValidIdentifier": 138, + "./validators/isVar": 139, + "./validators/matchesPattern": 140, + "./validators/react/isCompatTag": 141, + "./validators/react/isReactComponent": 142, + "./validators/validate": 143 + } ], + 109: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n = !1) { + e.object = (0, r.memberExpression)(e.object, e.property, e.computed); + e.property = t; + e.computed = !!n; + return e; + }; + var r = e("../builders/generated"); + }, { + "../builders/generated": 70 + } ], + 110: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function e(t) { + const n = {}; + const s = {}; + const a = new Set(); + const o = []; + for (let l = 0; l < t.length; l++) { + const c = t[l]; + if (c && !(o.indexOf(c) >= 0)) { + if ((0, r.isAnyTypeAnnotation)(c)) return [ c ]; + if ((0, r.isFlowBaseAnnotation)(c)) s[c.type] = c; else if ((0, r.isUnionTypeAnnotation)(c)) { + if (!a.has(c.types)) { + t = t.concat(c.types); + a.add(c.types); + } + } else if ((0, r.isGenericTypeAnnotation)(c)) { + const t = i(c.id); + if (n[t]) { + let r = n[t]; + r.typeParameters ? c.typeParameters && (r.typeParameters.params = e(r.typeParameters.params.concat(c.typeParameters.params))) : r = c.typeParameters; + } else n[t] = c; + } else o.push(c); + } + } + for (const e of Object.keys(s)) o.push(s[e]); + for (const e of Object.keys(n)) o.push(n[e]); + return o; + }; + var r = e("../../validators/generated"); + function i(e) { + return (0, r.isIdentifier)(e) ? e.name : `${e.id.name}.${i(e.qualification)}`; + } + }, { + "../../validators/generated": 124 + } ], + 111: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + if (!e || !t) return e; + for (const n of r.INHERIT_KEYS.optional) null == e[n] && (e[n] = t[n]); + for (const n of Object.keys(t)) "_" === n[0] && "__clone" !== n && (e[n] = t[n]); + for (const n of r.INHERIT_KEYS.force) e[n] = t[n]; + (0, i.default)(e, t); + return e; + }; + r = e("../constants"); + i = e("../comments/inheritsComments"); + }, { + "../comments/inheritsComments": 84, + "../constants": 87 + } ], + 112: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + e.object = (0, r.memberExpression)(t, e.object); + return e; + }; + var r = e("../builders/generated"); + }, { + "../builders/generated": 70 + } ], + 113: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t = {}) { + const n = t.preserveComments ? r : i; + for (const t of n) null != e[t] && (e[t] = void 0); + for (const t of Object.keys(e)) "_" === t[0] && null != e[t] && (e[t] = void 0); + const s = Object.getOwnPropertySymbols(e); + for (const t of s) e[t] = null; + }; + const r = [ "tokens", "start", "end", "loc", "raw", "rawValue" ]; + const i = e("../constants").COMMENT_KEYS.concat([ "comments" ]).concat(r); + }, { + "../constants": 87 + } ], + 114: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + (0, r.default)(e, i.default, t); + return e; + }; + r = e("../traverse/traverseFast"); + i = e("./removeProperties"); + }, { + "../traverse/traverseFast": 119, + "./removeProperties": 113 + } ], + 115: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + const t = {}; + const n = {}; + const i = new Set(); + const s = []; + for (let t = 0; t < e.length; t++) { + const a = e[t]; + if (a && !(s.indexOf(a) >= 0)) { + if ((0, r.isTSAnyKeyword)(a)) return [ a ]; + if ((0, r.isTSBaseType)(a)) n[a.type] = a; else if ((0, r.isTSUnionType)(a)) { + if (!i.has(a.types)) { + e.push(...a.types); + i.add(a.types); + } + } else s.push(a); + } + } + for (const e of Object.keys(n)) s.push(n[e]); + for (const e of Object.keys(t)) s.push(t[e]); + return s; + }; + var r = e("../../validators/generated"); + }, { + "../../validators/generated": 124 + } ], + 116: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = i; + var r = e("../validators/generated"); + function i(e, t, n) { + let s = [].concat(e); + const a = Object.create(null); + for (;s.length; ) { + const e = s.shift(); + if (!e) continue; + const o = i.keys[e.type]; + if ((0, r.isIdentifier)(e)) if (t) { + (a[e.name] = a[e.name] || []).push(e); + } else a[e.name] = e; else if (!(0, r.isExportDeclaration)(e) || (0, r.isExportAllDeclaration)(e)) { + if (n) { + if ((0, r.isFunctionDeclaration)(e)) { + s.push(e.id); + continue; + } + if ((0, r.isFunctionExpression)(e)) continue; + } + if (o) for (let t = 0; t < o.length; t++) { + const n = o[t]; + e[n] && (s = s.concat(e[n])); + } + } else (0, r.isDeclaration)(e.declaration) && s.push(e.declaration); + } + return a; + } + i.keys = { + DeclareClass: [ "id" ], + DeclareFunction: [ "id" ], + DeclareModule: [ "id" ], + DeclareVariable: [ "id" ], + DeclareInterface: [ "id" ], + DeclareTypeAlias: [ "id" ], + DeclareOpaqueType: [ "id" ], + InterfaceDeclaration: [ "id" ], + TypeAlias: [ "id" ], + OpaqueType: [ "id" ], + CatchClause: [ "param" ], + LabeledStatement: [ "label" ], + UnaryExpression: [ "argument" ], + AssignmentExpression: [ "left" ], + ImportSpecifier: [ "local" ], + ImportNamespaceSpecifier: [ "local" ], + ImportDefaultSpecifier: [ "local" ], + ImportDeclaration: [ "specifiers" ], + ExportSpecifier: [ "exported" ], + ExportNamespaceSpecifier: [ "exported" ], + ExportDefaultSpecifier: [ "exported" ], + FunctionDeclaration: [ "id", "params" ], + FunctionExpression: [ "id", "params" ], + ArrowFunctionExpression: [ "params" ], + ObjectMethod: [ "params" ], + ClassMethod: [ "params" ], + ClassPrivateMethod: [ "params" ], + ForInStatement: [ "left" ], + ForOfStatement: [ "left" ], + ClassDeclaration: [ "id" ], + ClassExpression: [ "id" ], + RestElement: [ "argument" ], + UpdateExpression: [ "argument" ], + ObjectProperty: [ "value" ], + AssignmentPattern: [ "left" ], + ArrayPattern: [ "elements" ], + ObjectPattern: [ "properties" ], + VariableDeclaration: [ "declarations" ], + VariableDeclarator: [ "id" ] + }; + }, { + "../validators/generated": 124 + } ], + 117: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = e("./getBindingIdentifiers"); + i = function(e, t) { + return (0, r.default)(e, t, !0); + }; + n.default = i; + }, { + "./getBindingIdentifiers": 116 + } ], + 118: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + "function" == typeof t && (t = { + enter: t + }); + const {enter: i, exit: s} = t; + !function e(t, n, i, s, a) { + const o = r.VISITOR_KEYS[t.type]; + if (!o) return; + n && n(t, a, s); + for (const r of o) { + const o = t[r]; + if (Array.isArray(o)) for (let l = 0; l < o.length; l++) { + const c = o[l]; + if (c) { + a.push({ + node: t, + key: r, + index: l + }); + e(c, n, i, s, a); + a.pop(); + } + } else if (o) { + a.push({ + node: t, + key: r + }); + e(o, n, i, s, a); + a.pop(); + } + } + i && i(t, a, s); + }(e, i, s, n, []); + }; + var r = e("../definitions"); + }, { + "../definitions": 102 + } ], + 119: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function e(t, n, i) { + if (!t) return; + const s = r.VISITOR_KEYS[t.type]; + if (!s) return; + i = i || {}; + n(t, i); + for (const r of s) { + const s = t[r]; + if (Array.isArray(s)) for (const t of s) e(t, n, i); else e(s, n, i); + } + }; + var r = e("../definitions"); + }, { + "../definitions": 102 + } ], + 120: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + t && n && (t[e] = Array.from(new Set([].concat(t[e], n[e]).filter(Boolean)))); + }; + }, {} ], + 121: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + const n = e.value.split(/\r\n|\n|\r/); + let i = 0; + for (let e = 0; e < n.length; e++) n[e].match(/[^ \t]/) && (i = e); + let s = ""; + for (let e = 0; e < n.length; e++) { + const t = n[e]; + const r = 0 === e; + const a = e === n.length - 1; + const o = e === i; + let l = t.replace(/\t/g, " "); + r || (l = l.replace(/^[ ]+/, "")); + a || (l = l.replace(/[ ]+$/, "")); + if (l) { + o || (l += " "); + s += l; + } + } + s && t.push((0, r.stringLiteral)(s)); + }; + var r = e("../../builders/generated"); + }, { + "../../builders/generated": 70 + } ], + 122: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + const n = Object.keys(t); + for (const r of n) if (e[r] !== t[r]) return !1; + return !0; + }; + }, {} ], + 123: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + const n = e.split("."); + return e => (0, r.default)(e, n, t); + }; + var r = e("./matchesPattern"); + }, { + "./matchesPattern": 140 + } ], + 124: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.isArrayExpression = function(e, t) { + if (!e) return !1; + if ("ArrayExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isAssignmentExpression = function(e, t) { + if (!e) return !1; + if ("AssignmentExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBinaryExpression = function(e, t) { + if (!e) return !1; + if ("BinaryExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isInterpreterDirective = function(e, t) { + if (!e) return !1; + if ("InterpreterDirective" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDirective = function(e, t) { + if (!e) return !1; + if ("Directive" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDirectiveLiteral = function(e, t) { + if (!e) return !1; + if ("DirectiveLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBlockStatement = function(e, t) { + if (!e) return !1; + if ("BlockStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBreakStatement = function(e, t) { + if (!e) return !1; + if ("BreakStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isCallExpression = function(e, t) { + if (!e) return !1; + if ("CallExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isCatchClause = function(e, t) { + if (!e) return !1; + if ("CatchClause" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isConditionalExpression = function(e, t) { + if (!e) return !1; + if ("ConditionalExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isContinueStatement = function(e, t) { + if (!e) return !1; + if ("ContinueStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDebuggerStatement = function(e, t) { + if (!e) return !1; + if ("DebuggerStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDoWhileStatement = function(e, t) { + if (!e) return !1; + if ("DoWhileStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEmptyStatement = function(e, t) { + if (!e) return !1; + if ("EmptyStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExpressionStatement = function(e, t) { + if (!e) return !1; + if ("ExpressionStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isFile = function(e, t) { + if (!e) return !1; + if ("File" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isForInStatement = function(e, t) { + if (!e) return !1; + if ("ForInStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isForStatement = function(e, t) { + if (!e) return !1; + if ("ForStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isFunctionDeclaration = function(e, t) { + if (!e) return !1; + if ("FunctionDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isFunctionExpression = function(e, t) { + if (!e) return !1; + if ("FunctionExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isIdentifier = function(e, t) { + if (!e) return !1; + if ("Identifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isIfStatement = function(e, t) { + if (!e) return !1; + if ("IfStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isLabeledStatement = function(e, t) { + if (!e) return !1; + if ("LabeledStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isStringLiteral = function(e, t) { + if (!e) return !1; + if ("StringLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNumericLiteral = function(e, t) { + if (!e) return !1; + if ("NumericLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNullLiteral = function(e, t) { + if (!e) return !1; + if ("NullLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBooleanLiteral = function(e, t) { + if (!e) return !1; + if ("BooleanLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isRegExpLiteral = function(e, t) { + if (!e) return !1; + if ("RegExpLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isLogicalExpression = function(e, t) { + if (!e) return !1; + if ("LogicalExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isMemberExpression = function(e, t) { + if (!e) return !1; + if ("MemberExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNewExpression = function(e, t) { + if (!e) return !1; + if ("NewExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isProgram = function(e, t) { + if (!e) return !1; + if ("Program" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectExpression = function(e, t) { + if (!e) return !1; + if ("ObjectExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectMethod = function(e, t) { + if (!e) return !1; + if ("ObjectMethod" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectProperty = function(e, t) { + if (!e) return !1; + if ("ObjectProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isRestElement = function(e, t) { + if (!e) return !1; + if ("RestElement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isReturnStatement = function(e, t) { + if (!e) return !1; + if ("ReturnStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSequenceExpression = function(e, t) { + if (!e) return !1; + if ("SequenceExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isParenthesizedExpression = function(e, t) { + if (!e) return !1; + if ("ParenthesizedExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSwitchCase = function(e, t) { + if (!e) return !1; + if ("SwitchCase" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSwitchStatement = function(e, t) { + if (!e) return !1; + if ("SwitchStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isThisExpression = function(e, t) { + if (!e) return !1; + if ("ThisExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isThrowStatement = function(e, t) { + if (!e) return !1; + if ("ThrowStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTryStatement = function(e, t) { + if (!e) return !1; + if ("TryStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isUnaryExpression = function(e, t) { + if (!e) return !1; + if ("UnaryExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isUpdateExpression = function(e, t) { + if (!e) return !1; + if ("UpdateExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isVariableDeclaration = function(e, t) { + if (!e) return !1; + if ("VariableDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isVariableDeclarator = function(e, t) { + if (!e) return !1; + if ("VariableDeclarator" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isWhileStatement = function(e, t) { + if (!e) return !1; + if ("WhileStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isWithStatement = function(e, t) { + if (!e) return !1; + if ("WithStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isAssignmentPattern = function(e, t) { + if (!e) return !1; + if ("AssignmentPattern" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isArrayPattern = function(e, t) { + if (!e) return !1; + if ("ArrayPattern" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isArrowFunctionExpression = function(e, t) { + if (!e) return !1; + if ("ArrowFunctionExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassBody = function(e, t) { + if (!e) return !1; + if ("ClassBody" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassExpression = function(e, t) { + if (!e) return !1; + if ("ClassExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassDeclaration = function(e, t) { + if (!e) return !1; + if ("ClassDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExportAllDeclaration = function(e, t) { + if (!e) return !1; + if ("ExportAllDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExportDefaultDeclaration = function(e, t) { + if (!e) return !1; + if ("ExportDefaultDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExportNamedDeclaration = function(e, t) { + if (!e) return !1; + if ("ExportNamedDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExportSpecifier = function(e, t) { + if (!e) return !1; + if ("ExportSpecifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isForOfStatement = function(e, t) { + if (!e) return !1; + if ("ForOfStatement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isImportDeclaration = function(e, t) { + if (!e) return !1; + if ("ImportDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isImportDefaultSpecifier = function(e, t) { + if (!e) return !1; + if ("ImportDefaultSpecifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isImportNamespaceSpecifier = function(e, t) { + if (!e) return !1; + if ("ImportNamespaceSpecifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isImportSpecifier = function(e, t) { + if (!e) return !1; + if ("ImportSpecifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isMetaProperty = function(e, t) { + if (!e) return !1; + if ("MetaProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassMethod = function(e, t) { + if (!e) return !1; + if ("ClassMethod" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectPattern = function(e, t) { + if (!e) return !1; + if ("ObjectPattern" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSpreadElement = function(e, t) { + if (!e) return !1; + if ("SpreadElement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSuper = function(e, t) { + if (!e) return !1; + if ("Super" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTaggedTemplateExpression = function(e, t) { + if (!e) return !1; + if ("TaggedTemplateExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTemplateElement = function(e, t) { + if (!e) return !1; + if ("TemplateElement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTemplateLiteral = function(e, t) { + if (!e) return !1; + if ("TemplateLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isYieldExpression = function(e, t) { + if (!e) return !1; + if ("YieldExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isAwaitExpression = function(e, t) { + if (!e) return !1; + if ("AwaitExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isImport = function(e, t) { + if (!e) return !1; + if ("Import" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBigIntLiteral = function(e, t) { + if (!e) return !1; + if ("BigIntLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExportNamespaceSpecifier = function(e, t) { + if (!e) return !1; + if ("ExportNamespaceSpecifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isOptionalMemberExpression = function(e, t) { + if (!e) return !1; + if ("OptionalMemberExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isOptionalCallExpression = function(e, t) { + if (!e) return !1; + if ("OptionalCallExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassProperty = function(e, t) { + if (!e) return !1; + if ("ClassProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassPrivateProperty = function(e, t) { + if (!e) return !1; + if ("ClassPrivateProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassPrivateMethod = function(e, t) { + if (!e) return !1; + if ("ClassPrivateMethod" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isPrivateName = function(e, t) { + if (!e) return !1; + if ("PrivateName" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isAnyTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("AnyTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isArrayTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("ArrayTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBooleanTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("BooleanTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBooleanLiteralTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("BooleanLiteralTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNullLiteralTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("NullLiteralTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isClassImplements = function(e, t) { + if (!e) return !1; + if ("ClassImplements" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareClass = function(e, t) { + if (!e) return !1; + if ("DeclareClass" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareFunction = function(e, t) { + if (!e) return !1; + if ("DeclareFunction" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareInterface = function(e, t) { + if (!e) return !1; + if ("DeclareInterface" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareModule = function(e, t) { + if (!e) return !1; + if ("DeclareModule" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareModuleExports = function(e, t) { + if (!e) return !1; + if ("DeclareModuleExports" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareTypeAlias = function(e, t) { + if (!e) return !1; + if ("DeclareTypeAlias" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareOpaqueType = function(e, t) { + if (!e) return !1; + if ("DeclareOpaqueType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareVariable = function(e, t) { + if (!e) return !1; + if ("DeclareVariable" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareExportDeclaration = function(e, t) { + if (!e) return !1; + if ("DeclareExportDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclareExportAllDeclaration = function(e, t) { + if (!e) return !1; + if ("DeclareExportAllDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDeclaredPredicate = function(e, t) { + if (!e) return !1; + if ("DeclaredPredicate" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExistsTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("ExistsTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isFunctionTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("FunctionTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isFunctionTypeParam = function(e, t) { + if (!e) return !1; + if ("FunctionTypeParam" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isGenericTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("GenericTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isInferredPredicate = function(e, t) { + if (!e) return !1; + if ("InferredPredicate" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isInterfaceExtends = function(e, t) { + if (!e) return !1; + if ("InterfaceExtends" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isInterfaceDeclaration = function(e, t) { + if (!e) return !1; + if ("InterfaceDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isInterfaceTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("InterfaceTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isIntersectionTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("IntersectionTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isMixedTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("MixedTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEmptyTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("EmptyTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNullableTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("NullableTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNumberLiteralTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("NumberLiteralTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNumberTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("NumberTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("ObjectTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectTypeInternalSlot = function(e, t) { + if (!e) return !1; + if ("ObjectTypeInternalSlot" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectTypeCallProperty = function(e, t) { + if (!e) return !1; + if ("ObjectTypeCallProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectTypeIndexer = function(e, t) { + if (!e) return !1; + if ("ObjectTypeIndexer" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectTypeProperty = function(e, t) { + if (!e) return !1; + if ("ObjectTypeProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isObjectTypeSpreadProperty = function(e, t) { + if (!e) return !1; + if ("ObjectTypeSpreadProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isOpaqueType = function(e, t) { + if (!e) return !1; + if ("OpaqueType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isQualifiedTypeIdentifier = function(e, t) { + if (!e) return !1; + if ("QualifiedTypeIdentifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isStringLiteralTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("StringLiteralTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isStringTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("StringTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSymbolTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("SymbolTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isThisTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("ThisTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTupleTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("TupleTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeofTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("TypeofTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeAlias = function(e, t) { + if (!e) return !1; + if ("TypeAlias" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("TypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeCastExpression = function(e, t) { + if (!e) return !1; + if ("TypeCastExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeParameter = function(e, t) { + if (!e) return !1; + if ("TypeParameter" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeParameterDeclaration = function(e, t) { + if (!e) return !1; + if ("TypeParameterDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTypeParameterInstantiation = function(e, t) { + if (!e) return !1; + if ("TypeParameterInstantiation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isUnionTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("UnionTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isVariance = function(e, t) { + if (!e) return !1; + if ("Variance" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isVoidTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("VoidTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumDeclaration = function(e, t) { + if (!e) return !1; + if ("EnumDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumBooleanBody = function(e, t) { + if (!e) return !1; + if ("EnumBooleanBody" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumNumberBody = function(e, t) { + if (!e) return !1; + if ("EnumNumberBody" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumStringBody = function(e, t) { + if (!e) return !1; + if ("EnumStringBody" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumSymbolBody = function(e, t) { + if (!e) return !1; + if ("EnumSymbolBody" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumBooleanMember = function(e, t) { + if (!e) return !1; + if ("EnumBooleanMember" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumNumberMember = function(e, t) { + if (!e) return !1; + if ("EnumNumberMember" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumStringMember = function(e, t) { + if (!e) return !1; + if ("EnumStringMember" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isEnumDefaultedMember = function(e, t) { + if (!e) return !1; + if ("EnumDefaultedMember" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isIndexedAccessType = function(e, t) { + if (!e) return !1; + if ("IndexedAccessType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isOptionalIndexedAccessType = function(e, t) { + if (!e) return !1; + if ("OptionalIndexedAccessType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXAttribute = function(e, t) { + if (!e) return !1; + if ("JSXAttribute" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXClosingElement = function(e, t) { + if (!e) return !1; + if ("JSXClosingElement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXElement = function(e, t) { + if (!e) return !1; + if ("JSXElement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXEmptyExpression = function(e, t) { + if (!e) return !1; + if ("JSXEmptyExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXExpressionContainer = function(e, t) { + if (!e) return !1; + if ("JSXExpressionContainer" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXSpreadChild = function(e, t) { + if (!e) return !1; + if ("JSXSpreadChild" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXIdentifier = function(e, t) { + if (!e) return !1; + if ("JSXIdentifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXMemberExpression = function(e, t) { + if (!e) return !1; + if ("JSXMemberExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXNamespacedName = function(e, t) { + if (!e) return !1; + if ("JSXNamespacedName" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXOpeningElement = function(e, t) { + if (!e) return !1; + if ("JSXOpeningElement" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXSpreadAttribute = function(e, t) { + if (!e) return !1; + if ("JSXSpreadAttribute" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXText = function(e, t) { + if (!e) return !1; + if ("JSXText" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXFragment = function(e, t) { + if (!e) return !1; + if ("JSXFragment" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXOpeningFragment = function(e, t) { + if (!e) return !1; + if ("JSXOpeningFragment" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isJSXClosingFragment = function(e, t) { + if (!e) return !1; + if ("JSXClosingFragment" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isNoop = function(e, t) { + if (!e) return !1; + if ("Noop" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isPlaceholder = function(e, t) { + if (!e) return !1; + if ("Placeholder" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isV8IntrinsicIdentifier = function(e, t) { + if (!e) return !1; + if ("V8IntrinsicIdentifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isArgumentPlaceholder = function(e, t) { + if (!e) return !1; + if ("ArgumentPlaceholder" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isBindExpression = function(e, t) { + if (!e) return !1; + if ("BindExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isImportAttribute = function(e, t) { + if (!e) return !1; + if ("ImportAttribute" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDecorator = function(e, t) { + if (!e) return !1; + if ("Decorator" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDoExpression = function(e, t) { + if (!e) return !1; + if ("DoExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExportDefaultSpecifier = function(e, t) { + if (!e) return !1; + if ("ExportDefaultSpecifier" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isRecordExpression = function(e, t) { + if (!e) return !1; + if ("RecordExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTupleExpression = function(e, t) { + if (!e) return !1; + if ("TupleExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isDecimalLiteral = function(e, t) { + if (!e) return !1; + if ("DecimalLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isStaticBlock = function(e, t) { + if (!e) return !1; + if ("StaticBlock" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isModuleExpression = function(e, t) { + if (!e) return !1; + if ("ModuleExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTopicReference = function(e, t) { + if (!e) return !1; + if ("TopicReference" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isPipelineTopicExpression = function(e, t) { + if (!e) return !1; + if ("PipelineTopicExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isPipelineBareFunction = function(e, t) { + if (!e) return !1; + if ("PipelineBareFunction" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isPipelinePrimaryTopicReference = function(e, t) { + if (!e) return !1; + if ("PipelinePrimaryTopicReference" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSParameterProperty = function(e, t) { + if (!e) return !1; + if ("TSParameterProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSDeclareFunction = function(e, t) { + if (!e) return !1; + if ("TSDeclareFunction" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSDeclareMethod = function(e, t) { + if (!e) return !1; + if ("TSDeclareMethod" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSQualifiedName = function(e, t) { + if (!e) return !1; + if ("TSQualifiedName" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSCallSignatureDeclaration = function(e, t) { + if (!e) return !1; + if ("TSCallSignatureDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSConstructSignatureDeclaration = function(e, t) { + if (!e) return !1; + if ("TSConstructSignatureDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSPropertySignature = function(e, t) { + if (!e) return !1; + if ("TSPropertySignature" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSMethodSignature = function(e, t) { + if (!e) return !1; + if ("TSMethodSignature" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSIndexSignature = function(e, t) { + if (!e) return !1; + if ("TSIndexSignature" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSAnyKeyword = function(e, t) { + if (!e) return !1; + if ("TSAnyKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSBooleanKeyword = function(e, t) { + if (!e) return !1; + if ("TSBooleanKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSBigIntKeyword = function(e, t) { + if (!e) return !1; + if ("TSBigIntKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSIntrinsicKeyword = function(e, t) { + if (!e) return !1; + if ("TSIntrinsicKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSNeverKeyword = function(e, t) { + if (!e) return !1; + if ("TSNeverKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSNullKeyword = function(e, t) { + if (!e) return !1; + if ("TSNullKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSNumberKeyword = function(e, t) { + if (!e) return !1; + if ("TSNumberKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSObjectKeyword = function(e, t) { + if (!e) return !1; + if ("TSObjectKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSStringKeyword = function(e, t) { + if (!e) return !1; + if ("TSStringKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSSymbolKeyword = function(e, t) { + if (!e) return !1; + if ("TSSymbolKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSUndefinedKeyword = function(e, t) { + if (!e) return !1; + if ("TSUndefinedKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSUnknownKeyword = function(e, t) { + if (!e) return !1; + if ("TSUnknownKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSVoidKeyword = function(e, t) { + if (!e) return !1; + if ("TSVoidKeyword" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSThisType = function(e, t) { + if (!e) return !1; + if ("TSThisType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSFunctionType = function(e, t) { + if (!e) return !1; + if ("TSFunctionType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSConstructorType = function(e, t) { + if (!e) return !1; + if ("TSConstructorType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeReference = function(e, t) { + if (!e) return !1; + if ("TSTypeReference" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypePredicate = function(e, t) { + if (!e) return !1; + if ("TSTypePredicate" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeQuery = function(e, t) { + if (!e) return !1; + if ("TSTypeQuery" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeLiteral = function(e, t) { + if (!e) return !1; + if ("TSTypeLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSArrayType = function(e, t) { + if (!e) return !1; + if ("TSArrayType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTupleType = function(e, t) { + if (!e) return !1; + if ("TSTupleType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSOptionalType = function(e, t) { + if (!e) return !1; + if ("TSOptionalType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSRestType = function(e, t) { + if (!e) return !1; + if ("TSRestType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSNamedTupleMember = function(e, t) { + if (!e) return !1; + if ("TSNamedTupleMember" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSUnionType = function(e, t) { + if (!e) return !1; + if ("TSUnionType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSIntersectionType = function(e, t) { + if (!e) return !1; + if ("TSIntersectionType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSConditionalType = function(e, t) { + if (!e) return !1; + if ("TSConditionalType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSInferType = function(e, t) { + if (!e) return !1; + if ("TSInferType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSParenthesizedType = function(e, t) { + if (!e) return !1; + if ("TSParenthesizedType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeOperator = function(e, t) { + if (!e) return !1; + if ("TSTypeOperator" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSIndexedAccessType = function(e, t) { + if (!e) return !1; + if ("TSIndexedAccessType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSMappedType = function(e, t) { + if (!e) return !1; + if ("TSMappedType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSLiteralType = function(e, t) { + if (!e) return !1; + if ("TSLiteralType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSExpressionWithTypeArguments = function(e, t) { + if (!e) return !1; + if ("TSExpressionWithTypeArguments" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSInterfaceDeclaration = function(e, t) { + if (!e) return !1; + if ("TSInterfaceDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSInterfaceBody = function(e, t) { + if (!e) return !1; + if ("TSInterfaceBody" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeAliasDeclaration = function(e, t) { + if (!e) return !1; + if ("TSTypeAliasDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSAsExpression = function(e, t) { + if (!e) return !1; + if ("TSAsExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeAssertion = function(e, t) { + if (!e) return !1; + if ("TSTypeAssertion" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSEnumDeclaration = function(e, t) { + if (!e) return !1; + if ("TSEnumDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSEnumMember = function(e, t) { + if (!e) return !1; + if ("TSEnumMember" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSModuleDeclaration = function(e, t) { + if (!e) return !1; + if ("TSModuleDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSModuleBlock = function(e, t) { + if (!e) return !1; + if ("TSModuleBlock" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSImportType = function(e, t) { + if (!e) return !1; + if ("TSImportType" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSImportEqualsDeclaration = function(e, t) { + if (!e) return !1; + if ("TSImportEqualsDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSExternalModuleReference = function(e, t) { + if (!e) return !1; + if ("TSExternalModuleReference" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSNonNullExpression = function(e, t) { + if (!e) return !1; + if ("TSNonNullExpression" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSExportAssignment = function(e, t) { + if (!e) return !1; + if ("TSExportAssignment" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSNamespaceExportDeclaration = function(e, t) { + if (!e) return !1; + if ("TSNamespaceExportDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeAnnotation = function(e, t) { + if (!e) return !1; + if ("TSTypeAnnotation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeParameterInstantiation = function(e, t) { + if (!e) return !1; + if ("TSTypeParameterInstantiation" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeParameterDeclaration = function(e, t) { + if (!e) return !1; + if ("TSTypeParameterDeclaration" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isTSTypeParameter = function(e, t) { + if (!e) return !1; + if ("TSTypeParameter" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isExpression = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ArrayExpression" === n || "AssignmentExpression" === n || "BinaryExpression" === n || "CallExpression" === n || "ConditionalExpression" === n || "FunctionExpression" === n || "Identifier" === n || "StringLiteral" === n || "NumericLiteral" === n || "NullLiteral" === n || "BooleanLiteral" === n || "RegExpLiteral" === n || "LogicalExpression" === n || "MemberExpression" === n || "NewExpression" === n || "ObjectExpression" === n || "SequenceExpression" === n || "ParenthesizedExpression" === n || "ThisExpression" === n || "UnaryExpression" === n || "UpdateExpression" === n || "ArrowFunctionExpression" === n || "ClassExpression" === n || "MetaProperty" === n || "Super" === n || "TaggedTemplateExpression" === n || "TemplateLiteral" === n || "YieldExpression" === n || "AwaitExpression" === n || "Import" === n || "BigIntLiteral" === n || "OptionalMemberExpression" === n || "OptionalCallExpression" === n || "TypeCastExpression" === n || "JSXElement" === n || "JSXFragment" === n || "BindExpression" === n || "DoExpression" === n || "RecordExpression" === n || "TupleExpression" === n || "DecimalLiteral" === n || "ModuleExpression" === n || "TopicReference" === n || "PipelineTopicExpression" === n || "PipelineBareFunction" === n || "PipelinePrimaryTopicReference" === n || "TSAsExpression" === n || "TSTypeAssertion" === n || "TSNonNullExpression" === n || "Placeholder" === n && ("Expression" === e.expectedNode || "Identifier" === e.expectedNode || "StringLiteral" === e.expectedNode)) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isBinary = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BinaryExpression" === n || "LogicalExpression" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isScopable = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BlockStatement" === n || "CatchClause" === n || "DoWhileStatement" === n || "ForInStatement" === n || "ForStatement" === n || "FunctionDeclaration" === n || "FunctionExpression" === n || "Program" === n || "ObjectMethod" === n || "SwitchStatement" === n || "WhileStatement" === n || "ArrowFunctionExpression" === n || "ClassExpression" === n || "ClassDeclaration" === n || "ForOfStatement" === n || "ClassMethod" === n || "ClassPrivateMethod" === n || "StaticBlock" === n || "TSModuleBlock" === n || "Placeholder" === n && "BlockStatement" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isBlockParent = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BlockStatement" === n || "CatchClause" === n || "DoWhileStatement" === n || "ForInStatement" === n || "ForStatement" === n || "FunctionDeclaration" === n || "FunctionExpression" === n || "Program" === n || "ObjectMethod" === n || "SwitchStatement" === n || "WhileStatement" === n || "ArrowFunctionExpression" === n || "ForOfStatement" === n || "ClassMethod" === n || "ClassPrivateMethod" === n || "StaticBlock" === n || "TSModuleBlock" === n || "Placeholder" === n && "BlockStatement" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isBlock = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BlockStatement" === n || "Program" === n || "TSModuleBlock" === n || "Placeholder" === n && "BlockStatement" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isStatement = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BlockStatement" === n || "BreakStatement" === n || "ContinueStatement" === n || "DebuggerStatement" === n || "DoWhileStatement" === n || "EmptyStatement" === n || "ExpressionStatement" === n || "ForInStatement" === n || "ForStatement" === n || "FunctionDeclaration" === n || "IfStatement" === n || "LabeledStatement" === n || "ReturnStatement" === n || "SwitchStatement" === n || "ThrowStatement" === n || "TryStatement" === n || "VariableDeclaration" === n || "WhileStatement" === n || "WithStatement" === n || "ClassDeclaration" === n || "ExportAllDeclaration" === n || "ExportDefaultDeclaration" === n || "ExportNamedDeclaration" === n || "ForOfStatement" === n || "ImportDeclaration" === n || "DeclareClass" === n || "DeclareFunction" === n || "DeclareInterface" === n || "DeclareModule" === n || "DeclareModuleExports" === n || "DeclareTypeAlias" === n || "DeclareOpaqueType" === n || "DeclareVariable" === n || "DeclareExportDeclaration" === n || "DeclareExportAllDeclaration" === n || "InterfaceDeclaration" === n || "OpaqueType" === n || "TypeAlias" === n || "EnumDeclaration" === n || "TSDeclareFunction" === n || "TSInterfaceDeclaration" === n || "TSTypeAliasDeclaration" === n || "TSEnumDeclaration" === n || "TSModuleDeclaration" === n || "TSImportEqualsDeclaration" === n || "TSExportAssignment" === n || "TSNamespaceExportDeclaration" === n || "Placeholder" === n && ("Statement" === e.expectedNode || "Declaration" === e.expectedNode || "BlockStatement" === e.expectedNode)) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isTerminatorless = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BreakStatement" === n || "ContinueStatement" === n || "ReturnStatement" === n || "ThrowStatement" === n || "YieldExpression" === n || "AwaitExpression" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isCompletionStatement = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("BreakStatement" === n || "ContinueStatement" === n || "ReturnStatement" === n || "ThrowStatement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isConditional = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ConditionalExpression" === n || "IfStatement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isLoop = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("DoWhileStatement" === n || "ForInStatement" === n || "ForStatement" === n || "WhileStatement" === n || "ForOfStatement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isWhile = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("DoWhileStatement" === n || "WhileStatement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isExpressionWrapper = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ExpressionStatement" === n || "ParenthesizedExpression" === n || "TypeCastExpression" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFor = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ForInStatement" === n || "ForStatement" === n || "ForOfStatement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isForXStatement = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ForInStatement" === n || "ForOfStatement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFunction = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("FunctionDeclaration" === n || "FunctionExpression" === n || "ObjectMethod" === n || "ArrowFunctionExpression" === n || "ClassMethod" === n || "ClassPrivateMethod" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFunctionParent = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("FunctionDeclaration" === n || "FunctionExpression" === n || "ObjectMethod" === n || "ArrowFunctionExpression" === n || "ClassMethod" === n || "ClassPrivateMethod" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isPureish = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("FunctionDeclaration" === n || "FunctionExpression" === n || "StringLiteral" === n || "NumericLiteral" === n || "NullLiteral" === n || "BooleanLiteral" === n || "RegExpLiteral" === n || "ArrowFunctionExpression" === n || "BigIntLiteral" === n || "DecimalLiteral" === n || "Placeholder" === n && "StringLiteral" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isDeclaration = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("FunctionDeclaration" === n || "VariableDeclaration" === n || "ClassDeclaration" === n || "ExportAllDeclaration" === n || "ExportDefaultDeclaration" === n || "ExportNamedDeclaration" === n || "ImportDeclaration" === n || "DeclareClass" === n || "DeclareFunction" === n || "DeclareInterface" === n || "DeclareModule" === n || "DeclareModuleExports" === n || "DeclareTypeAlias" === n || "DeclareOpaqueType" === n || "DeclareVariable" === n || "DeclareExportDeclaration" === n || "DeclareExportAllDeclaration" === n || "InterfaceDeclaration" === n || "OpaqueType" === n || "TypeAlias" === n || "EnumDeclaration" === n || "TSDeclareFunction" === n || "TSInterfaceDeclaration" === n || "TSTypeAliasDeclaration" === n || "TSEnumDeclaration" === n || "TSModuleDeclaration" === n || "Placeholder" === n && "Declaration" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isPatternLike = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("Identifier" === n || "RestElement" === n || "AssignmentPattern" === n || "ArrayPattern" === n || "ObjectPattern" === n || "Placeholder" === n && ("Pattern" === e.expectedNode || "Identifier" === e.expectedNode)) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isLVal = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("Identifier" === n || "MemberExpression" === n || "RestElement" === n || "AssignmentPattern" === n || "ArrayPattern" === n || "ObjectPattern" === n || "TSParameterProperty" === n || "Placeholder" === n && ("Pattern" === e.expectedNode || "Identifier" === e.expectedNode)) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isTSEntityName = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("Identifier" === n || "TSQualifiedName" === n || "Placeholder" === n && "Identifier" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isLiteral = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("StringLiteral" === n || "NumericLiteral" === n || "NullLiteral" === n || "BooleanLiteral" === n || "RegExpLiteral" === n || "TemplateLiteral" === n || "BigIntLiteral" === n || "DecimalLiteral" === n || "Placeholder" === n && "StringLiteral" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isImmutable = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("StringLiteral" === n || "NumericLiteral" === n || "NullLiteral" === n || "BooleanLiteral" === n || "BigIntLiteral" === n || "JSXAttribute" === n || "JSXClosingElement" === n || "JSXElement" === n || "JSXExpressionContainer" === n || "JSXSpreadChild" === n || "JSXOpeningElement" === n || "JSXText" === n || "JSXFragment" === n || "JSXOpeningFragment" === n || "JSXClosingFragment" === n || "DecimalLiteral" === n || "Placeholder" === n && "StringLiteral" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isUserWhitespacable = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ObjectMethod" === n || "ObjectProperty" === n || "ObjectTypeInternalSlot" === n || "ObjectTypeCallProperty" === n || "ObjectTypeIndexer" === n || "ObjectTypeProperty" === n || "ObjectTypeSpreadProperty" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isMethod = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ObjectMethod" === n || "ClassMethod" === n || "ClassPrivateMethod" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isObjectMember = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ObjectMethod" === n || "ObjectProperty" === n) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isProperty = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ObjectProperty" === n || "ClassProperty" === n || "ClassPrivateProperty" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isUnaryLike = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("UnaryExpression" === n || "SpreadElement" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isPattern = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("AssignmentPattern" === n || "ArrayPattern" === n || "ObjectPattern" === n || "Placeholder" === n && "Pattern" === e.expectedNode) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isClass = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ClassExpression" === n || "ClassDeclaration" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isModuleDeclaration = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ExportAllDeclaration" === n || "ExportDefaultDeclaration" === n || "ExportNamedDeclaration" === n || "ImportDeclaration" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isExportDeclaration = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ExportAllDeclaration" === n || "ExportDefaultDeclaration" === n || "ExportNamedDeclaration" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isModuleSpecifier = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ExportSpecifier" === n || "ImportDefaultSpecifier" === n || "ImportNamespaceSpecifier" === n || "ImportSpecifier" === n || "ExportNamespaceSpecifier" === n || "ExportDefaultSpecifier" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isPrivate = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("ClassPrivateProperty" === n || "ClassPrivateMethod" === n || "PrivateName" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFlow = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("AnyTypeAnnotation" === n || "ArrayTypeAnnotation" === n || "BooleanTypeAnnotation" === n || "BooleanLiteralTypeAnnotation" === n || "NullLiteralTypeAnnotation" === n || "ClassImplements" === n || "DeclareClass" === n || "DeclareFunction" === n || "DeclareInterface" === n || "DeclareModule" === n || "DeclareModuleExports" === n || "DeclareTypeAlias" === n || "DeclareOpaqueType" === n || "DeclareVariable" === n || "DeclareExportDeclaration" === n || "DeclareExportAllDeclaration" === n || "DeclaredPredicate" === n || "ExistsTypeAnnotation" === n || "FunctionTypeAnnotation" === n || "FunctionTypeParam" === n || "GenericTypeAnnotation" === n || "InferredPredicate" === n || "InterfaceExtends" === n || "InterfaceDeclaration" === n || "InterfaceTypeAnnotation" === n || "IntersectionTypeAnnotation" === n || "MixedTypeAnnotation" === n || "EmptyTypeAnnotation" === n || "NullableTypeAnnotation" === n || "NumberLiteralTypeAnnotation" === n || "NumberTypeAnnotation" === n || "ObjectTypeAnnotation" === n || "ObjectTypeInternalSlot" === n || "ObjectTypeCallProperty" === n || "ObjectTypeIndexer" === n || "ObjectTypeProperty" === n || "ObjectTypeSpreadProperty" === n || "OpaqueType" === n || "QualifiedTypeIdentifier" === n || "StringLiteralTypeAnnotation" === n || "StringTypeAnnotation" === n || "SymbolTypeAnnotation" === n || "ThisTypeAnnotation" === n || "TupleTypeAnnotation" === n || "TypeofTypeAnnotation" === n || "TypeAlias" === n || "TypeAnnotation" === n || "TypeCastExpression" === n || "TypeParameter" === n || "TypeParameterDeclaration" === n || "TypeParameterInstantiation" === n || "UnionTypeAnnotation" === n || "Variance" === n || "VoidTypeAnnotation" === n || "IndexedAccessType" === n || "OptionalIndexedAccessType" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFlowType = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("AnyTypeAnnotation" === n || "ArrayTypeAnnotation" === n || "BooleanTypeAnnotation" === n || "BooleanLiteralTypeAnnotation" === n || "NullLiteralTypeAnnotation" === n || "ExistsTypeAnnotation" === n || "FunctionTypeAnnotation" === n || "GenericTypeAnnotation" === n || "InterfaceTypeAnnotation" === n || "IntersectionTypeAnnotation" === n || "MixedTypeAnnotation" === n || "EmptyTypeAnnotation" === n || "NullableTypeAnnotation" === n || "NumberLiteralTypeAnnotation" === n || "NumberTypeAnnotation" === n || "ObjectTypeAnnotation" === n || "StringLiteralTypeAnnotation" === n || "StringTypeAnnotation" === n || "SymbolTypeAnnotation" === n || "ThisTypeAnnotation" === n || "TupleTypeAnnotation" === n || "TypeofTypeAnnotation" === n || "UnionTypeAnnotation" === n || "VoidTypeAnnotation" === n || "IndexedAccessType" === n || "OptionalIndexedAccessType" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFlowBaseAnnotation = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("AnyTypeAnnotation" === n || "BooleanTypeAnnotation" === n || "NullLiteralTypeAnnotation" === n || "MixedTypeAnnotation" === n || "EmptyTypeAnnotation" === n || "NumberTypeAnnotation" === n || "StringTypeAnnotation" === n || "SymbolTypeAnnotation" === n || "ThisTypeAnnotation" === n || "VoidTypeAnnotation" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFlowDeclaration = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("DeclareClass" === n || "DeclareFunction" === n || "DeclareInterface" === n || "DeclareModule" === n || "DeclareModuleExports" === n || "DeclareTypeAlias" === n || "DeclareOpaqueType" === n || "DeclareVariable" === n || "DeclareExportDeclaration" === n || "DeclareExportAllDeclaration" === n || "InterfaceDeclaration" === n || "OpaqueType" === n || "TypeAlias" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isFlowPredicate = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("DeclaredPredicate" === n || "InferredPredicate" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isEnumBody = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("EnumBooleanBody" === n || "EnumNumberBody" === n || "EnumStringBody" === n || "EnumSymbolBody" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isEnumMember = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("EnumBooleanMember" === n || "EnumNumberMember" === n || "EnumStringMember" === n || "EnumDefaultedMember" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isJSX = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("JSXAttribute" === n || "JSXClosingElement" === n || "JSXElement" === n || "JSXEmptyExpression" === n || "JSXExpressionContainer" === n || "JSXSpreadChild" === n || "JSXIdentifier" === n || "JSXMemberExpression" === n || "JSXNamespacedName" === n || "JSXOpeningElement" === n || "JSXSpreadAttribute" === n || "JSXText" === n || "JSXFragment" === n || "JSXOpeningFragment" === n || "JSXClosingFragment" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isTSTypeElement = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("TSCallSignatureDeclaration" === n || "TSConstructSignatureDeclaration" === n || "TSPropertySignature" === n || "TSMethodSignature" === n || "TSIndexSignature" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isTSType = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("TSAnyKeyword" === n || "TSBooleanKeyword" === n || "TSBigIntKeyword" === n || "TSIntrinsicKeyword" === n || "TSNeverKeyword" === n || "TSNullKeyword" === n || "TSNumberKeyword" === n || "TSObjectKeyword" === n || "TSStringKeyword" === n || "TSSymbolKeyword" === n || "TSUndefinedKeyword" === n || "TSUnknownKeyword" === n || "TSVoidKeyword" === n || "TSThisType" === n || "TSFunctionType" === n || "TSConstructorType" === n || "TSTypeReference" === n || "TSTypePredicate" === n || "TSTypeQuery" === n || "TSTypeLiteral" === n || "TSArrayType" === n || "TSTupleType" === n || "TSOptionalType" === n || "TSRestType" === n || "TSUnionType" === n || "TSIntersectionType" === n || "TSConditionalType" === n || "TSInferType" === n || "TSParenthesizedType" === n || "TSTypeOperator" === n || "TSIndexedAccessType" === n || "TSMappedType" === n || "TSLiteralType" === n || "TSExpressionWithTypeArguments" === n || "TSImportType" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isTSBaseType = function(e, t) { + if (!e) return !1; + const n = e.type; + if ("TSAnyKeyword" === n || "TSBooleanKeyword" === n || "TSBigIntKeyword" === n || "TSIntrinsicKeyword" === n || "TSNeverKeyword" === n || "TSNullKeyword" === n || "TSNumberKeyword" === n || "TSObjectKeyword" === n || "TSStringKeyword" === n || "TSSymbolKeyword" === n || "TSUndefinedKeyword" === n || "TSUnknownKeyword" === n || "TSVoidKeyword" === n || "TSThisType" === n || "TSLiteralType" === n) return void 0 === t || (0, + r.default)(e, t); + return !1; + }; + n.isNumberLiteral = function(e, t) { + console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); + if (!e) return !1; + if ("NumberLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isRegexLiteral = function(e, t) { + console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); + if (!e) return !1; + if ("RegexLiteral" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isRestProperty = function(e, t) { + console.trace("The node type RestProperty has been renamed to RestElement"); + if (!e) return !1; + if ("RestProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + n.isSpreadProperty = function(e, t) { + console.trace("The node type SpreadProperty has been renamed to SpreadElement"); + if (!e) return !1; + if ("SpreadProperty" === e.type) return void 0 === t || (0, r.default)(e, t); + return !1; + }; + var r = e("../../utils/shallowEqual"); + }, { + "../../utils/shallowEqual": 122 + } ], + 125: [ function(e, t, n) { + "use strict"; + var r, i, s, a; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + if (!t) return !1; + if (!(0, i.default)(t.type, e)) return !n && "Placeholder" === t.type && e in a.FLIPPED_ALIAS_KEYS && (0, + s.default)(t.expectedNode, e); + return void 0 === n || (0, r.default)(t, n); + }; + r = e("../utils/shallowEqual"); + i = e("./isType"); + s = e("./isPlaceholderType"); + a = e("../definitions"); + }, { + "../definitions": 102, + "../utils/shallowEqual": 122, + "./isPlaceholderType": 132, + "./isType": 136 + } ], + 126: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + if (n && "Identifier" === e.type && "ObjectProperty" === t.type && "ObjectExpression" === n.type) return !1; + const i = r.default.keys[t.type]; + if (i) for (let n = 0; n < i.length; n++) { + const r = i[n]; + const s = t[r]; + if (Array.isArray(s)) { + if (s.indexOf(e) >= 0) return !0; + } else if (s === e) return !0; + } + return !1; + }; + var r = e("../retrievers/getBindingIdentifiers"); + }, { + "../retrievers/getBindingIdentifiers": 116 + } ], + 127: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.isFunctionDeclaration)(e) || (0, r.isClassDeclaration)(e) || (0, i.default)(e); + }; + r = e("./generated"); + i = e("./isLet"); + }, { + "./generated": 124, + "./isLet": 129 + } ], + 128: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + if ((0, r.default)(e.type, "Immutable")) return !0; + if ((0, i.isIdentifier)(e)) return "undefined" === e.name; + return !1; + }; + r = e("./isType"); + i = e("./generated"); + }, { + "./generated": 124, + "./isType": 136 + } ], + 129: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.isVariableDeclaration)(e) && ("var" !== e.kind || e[i.BLOCK_SCOPED_SYMBOL]); + }; + r = e("./generated"); + i = e("../constants"); + }, { + "../constants": 87, + "./generated": 124 + } ], + 130: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return !(!e || !r.VISITOR_KEYS[e.type]); + }; + var r = e("../definitions"); + }, { + "../definitions": 102 + } ], + 131: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function e(t, n) { + if ("object" != typeof t || "object" != typeof n || null == t || null == n) return t === n; + if (t.type !== n.type) return !1; + const i = Object.keys(r.NODE_FIELDS[t.type] || t.type); + const s = r.VISITOR_KEYS[t.type]; + for (const r of i) { + if (typeof t[r] != typeof n[r]) return !1; + if (null != t[r] || null != n[r]) { + if (null == t[r] || null == n[r]) return !1; + if (Array.isArray(t[r])) { + if (!Array.isArray(n[r])) return !1; + if (t[r].length !== n[r].length) return !1; + for (let i = 0; i < t[r].length; i++) if (!e(t[r][i], n[r][i])) return !1; + } else if ("object" != typeof t[r] || null != s && s.includes(r)) { + if (!e(t[r], n[r])) return !1; + } else for (const e of Object.keys(t[r])) if (t[r][e] !== n[r][e]) return !1; + } + } + return !0; + }; + var r = e("../definitions"); + }, { + "../definitions": 102 + } ], + 132: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + if (e === t) return !0; + const n = r.PLACEHOLDERS_ALIAS[e]; + if (n) for (const e of n) if (t === e) return !0; + return !1; + }; + var r = e("../definitions"); + }, { + "../definitions": 102 + } ], + 133: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + switch (t.type) { + case "MemberExpression": + case "OptionalMemberExpression": + return t.property === e ? !!t.computed : t.object === e; + + case "JSXMemberExpression": + return t.object === e; + + case "VariableDeclarator": + return t.init === e; + + case "ArrowFunctionExpression": + return t.body === e; + + case "PrivateName": + return !1; + + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + return t.key === e && !!t.computed; + + case "ObjectProperty": + return t.key === e ? !!t.computed : !n || "ObjectPattern" !== n.type; + + case "ClassProperty": + return t.key !== e || !!t.computed; + + case "ClassPrivateProperty": + return t.key !== e; + + case "ClassDeclaration": + case "ClassExpression": + return t.superClass === e; + + case "AssignmentExpression": + case "AssignmentPattern": + return t.right === e; + + case "LabeledStatement": + case "CatchClause": + case "RestElement": + return !1; + + case "BreakStatement": + case "ContinueStatement": + return !1; + + case "FunctionDeclaration": + case "FunctionExpression": + return !1; + + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return !1; + + case "ExportSpecifier": + return (null == n || !n.source) && t.local === e; + + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + case "ImportAttribute": + case "JSXAttribute": + return !1; + + case "ObjectPattern": + case "ArrayPattern": + case "MetaProperty": + return !1; + + case "ObjectTypeProperty": + return t.key !== e; + + case "TSEnumMember": + return t.id !== e; + + case "TSPropertySignature": + return t.key !== e || !!t.computed; + } + return !0; + }; + }, {} ], + 134: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + if ((0, r.isBlockStatement)(e) && ((0, r.isFunction)(t) || (0, r.isCatchClause)(t))) return !1; + if ((0, r.isPattern)(e) && ((0, r.isFunction)(t) || (0, r.isCatchClause)(t))) return !0; + return (0, r.isScopable)(e); + }; + var r = e("./generated"); + }, { + "./generated": 124 + } ], + 135: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.isImportDefaultSpecifier)(e) || (0, r.isIdentifier)(e.imported || e.exported, { + name: "default" + }); + }; + var r = e("./generated"); + }, { + "./generated": 124 + } ], + 136: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t) { + if (e === t) return !0; + if (r.ALIAS_KEYS[t]) return !1; + const n = r.FLIPPED_ALIAS_KEYS[t]; + if (n) { + if (n[0] === e) return !0; + for (const t of n) if (e === t) return !0; + } + return !1; + }; + var r = e("../definitions"); + }, { + "../definitions": 102 + } ], + 137: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.default)(e) && !i.has(e); + }; + var r = e("./isValidIdentifier"); + const i = new Set([ "abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile" ]); + }, { + "./isValidIdentifier": 138 + } ], + 138: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t = !0) { + if ("string" != typeof e) return !1; + if (t && ((0, r.isKeyword)(e) || (0, r.isStrictReservedWord)(e, !0))) return !1; + return (0, r.isIdentifierName)(e); + }; + var r = e("@babel/helper-validator-identifier"); + }, { + "@babel/helper-validator-identifier": 27 + } ], + 139: [ function(e, t, n) { + "use strict"; + var r, i; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return (0, r.isVariableDeclaration)(e, { + kind: "var" + }) && !e[i.BLOCK_SCOPED_SYMBOL]; + }; + r = e("./generated"); + i = e("../constants"); + }, { + "../constants": 87, + "./generated": 124 + } ], + 140: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + if (!(0, r.isMemberExpression)(e)) return !1; + const i = Array.isArray(t) ? t : t.split("."); + const s = []; + let a; + for (a = e; (0, r.isMemberExpression)(a); a = a.object) s.push(a.property); + s.push(a); + if (s.length < i.length) return !1; + if (!n && s.length > i.length) return !1; + for (let e = 0, t = s.length - 1; e < i.length; e++, t--) { + const n = s[t]; + let a; + if ((0, r.isIdentifier)(n)) a = n.name; else if ((0, r.isStringLiteral)(n)) a = n.value; else { + if (!(0, r.isThisExpression)(n)) return !1; + a = "this"; + } + if (i[e] !== a) return !1; + } + return !0; + }; + var r = e("./generated"); + }, { + "./generated": 124 + } ], + 141: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e) { + return !!e && /^[a-z]/.test(e); + }; + }, {} ], + 142: [ function(e, t, n) { + "use strict"; + var r; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = void 0; + r = (0, e("../buildMatchMemberExpression").default)("React.Component"); + n.default = r; + }, { + "../buildMatchMemberExpression": 123 + } ], + 143: [ function(e, t, n) { + "use strict"; + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = function(e, t, n) { + if (!e) return; + const a = r.NODE_FIELDS[e.type]; + if (!a) return; + const o = a[t]; + i(e, t, n, o); + s(e, t, n); + }; + n.validateField = i; + n.validateChild = s; + var r = e("../definitions"); + function i(e, t, n, r) { + null != r && r.validate && (r.optional && null == n || r.validate(e, t, n)); + } + function s(e, t, n) { + if (null == n) return; + const i = r.NODE_PARENT_VALIDATIONS[n.type]; + i && i(e, t, n); + } + }, { + "../definitions": 102 + } ], + 144: [ function(e, t, n) { + "use strict"; + const r = e("color-convert"); + const i = (e, t) => (function() { + return `[${e.apply(r, arguments) + t}m`; + }); + const s = (e, t) => (function() { + const n = e.apply(r, arguments); + return `[${38 + t};5;${n}m`; + }); + const a = (e, t) => (function() { + const n = e.apply(r, arguments); + return `[${38 + t};2;${n[0]};${n[1]};${n[2]}m`; + }); + Object.defineProperty(t, "exports", { + enumerable: !0, + get: function() { + const e = new Map(); + const t = { + modifier: { + reset: [ 0, 0 ], + bold: [ 1, 22 ], + dim: [ 2, 22 ], + italic: [ 3, 23 ], + underline: [ 4, 24 ], + inverse: [ 7, 27 ], + hidden: [ 8, 28 ], + strikethrough: [ 9, 29 ] + }, + color: { + black: [ 30, 39 ], + red: [ 31, 39 ], + green: [ 32, 39 ], + yellow: [ 33, 39 ], + blue: [ 34, 39 ], + magenta: [ 35, 39 ], + cyan: [ 36, 39 ], + white: [ 37, 39 ], + gray: [ 90, 39 ], + redBright: [ 91, 39 ], + greenBright: [ 92, 39 ], + yellowBright: [ 93, 39 ], + blueBright: [ 94, 39 ], + magentaBright: [ 95, 39 ], + cyanBright: [ 96, 39 ], + whiteBright: [ 97, 39 ] + }, + bgColor: { + bgBlack: [ 40, 49 ], + bgRed: [ 41, 49 ], + bgGreen: [ 42, 49 ], + bgYellow: [ 43, 49 ], + bgBlue: [ 44, 49 ], + bgMagenta: [ 45, 49 ], + bgCyan: [ 46, 49 ], + bgWhite: [ 47, 49 ], + bgBlackBright: [ 100, 49 ], + bgRedBright: [ 101, 49 ], + bgGreenBright: [ 102, 49 ], + bgYellowBright: [ 103, 49 ], + bgBlueBright: [ 104, 49 ], + bgMagentaBright: [ 105, 49 ], + bgCyanBright: [ 106, 49 ], + bgWhiteBright: [ 107, 49 ] + } + }; + t.color.grey = t.color.gray; + for (const n of Object.keys(t)) { + const r = t[n]; + for (const n of Object.keys(r)) { + const i = r[n]; + t[n] = { + open: `[${i[0]}m`, + close: `[${i[1]}m` + }; + r[n] = t[n]; + e.set(i[0], i[1]); + } + Object.defineProperty(t, n, { + value: r, + enumerable: !1 + }); + Object.defineProperty(t, "codes", { + value: e, + enumerable: !1 + }); + } + const n = e => e; + const o = (e, t, n) => [ e, t, n ]; + t.color.close = ""; + t.bgColor.close = ""; + t.color.ansi = { + ansi: i(n, 0) + }; + t.color.ansi256 = { + ansi256: s(n, 0) + }; + t.color.ansi16m = { + rgb: a(o, 0) + }; + t.bgColor.ansi = { + ansi: i(n, 10) + }; + t.bgColor.ansi256 = { + ansi256: s(n, 10) + }; + t.bgColor.ansi16m = { + rgb: a(o, 10) + }; + for (let e of Object.keys(r)) { + if ("object" != typeof r[e]) continue; + const n = r[e]; + "ansi16" === e && (e = "ansi"); + if ("ansi16" in n) { + t.color.ansi[e] = i(n.ansi16, 0); + t.bgColor.ansi[e] = i(n.ansi16, 10); + } + if ("ansi256" in n) { + t.color.ansi256[e] = s(n.ansi256, 0); + t.bgColor.ansi256[e] = s(n.ansi256, 10); + } + if ("rgb" in n) { + t.color.ansi16m[e] = a(n.rgb, 0); + t.bgColor.ansi16m[e] = a(n.rgb, 10); + } + } + return t; + } + }); + }, { + "color-convert": 148 + } ], + 145: [ function(e, t, n) { + (function(n) { + (function() { + "use strict"; + const r = e("escape-string-regexp"); + const i = e("ansi-styles"); + const s = e("supports-color").stdout; + const a = e("./templates.js"); + const o = "win32" === n.platform && !(n.env.TERM || "").toLowerCase().startsWith("xterm"); + const l = [ "ansi", "ansi", "ansi256", "ansi16m" ]; + const c = new Set([ "gray" ]); + const p = Object.create(null); + function u(e, t) { + t = t || {}; + const n = s ? s.level : 0; + e.level = void 0 === t.level ? n : t.level; + e.enabled = "enabled" in t ? t.enabled : e.level > 0; + } + function d(e) { + if (!this || !(this instanceof d) || this.template) { + const t = {}; + u(t, e); + t.template = function() { + const e = [].slice.call(arguments); + return function(e, t) { + if (!Array.isArray(t)) return [].slice.call(arguments, 1).join(" "); + const n = [].slice.call(arguments, 2); + const r = [ t.raw[0] ]; + for (let e = 1; e < t.length; e++) { + r.push(String(n[e - 1]).replace(/[{}\\]/g, "\\$&")); + r.push(String(t.raw[e])); + } + return a(e, r.join("")); + }.apply(null, [ t.template ].concat(e)); + }; + Object.setPrototypeOf(t, d.prototype); + Object.setPrototypeOf(t.template, t); + t.template.constructor = d; + return t.template; + } + u(this, e); + } + o && (i.blue.open = ""); + for (const e of Object.keys(i)) { + i[e].closeRe = new RegExp(r(i[e].close), "g"); + p[e] = { + get() { + const t = i[e]; + return f.call(this, this._styles ? this._styles.concat(t) : [ t ], this._empty, e); + } + }; + } + p.visible = { + get() { + return f.call(this, this._styles || [], !0, "visible"); + } + }; + i.color.closeRe = new RegExp(r(i.color.close), "g"); + for (const e of Object.keys(i.color.ansi)) c.has(e) || (p[e] = { + get() { + const t = this.level; + return function() { + const n = { + open: i.color[l[t]][e].apply(null, arguments), + close: i.color.close, + closeRe: i.color.closeRe + }; + return f.call(this, this._styles ? this._styles.concat(n) : [ n ], this._empty, e); + }; + } + }); + i.bgColor.closeRe = new RegExp(r(i.bgColor.close), "g"); + for (const e of Object.keys(i.bgColor.ansi)) { + if (c.has(e)) continue; + p["bg" + e[0].toUpperCase() + e.slice(1)] = { + get() { + const t = this.level; + return function() { + const n = { + open: i.bgColor[l[t]][e].apply(null, arguments), + close: i.bgColor.close, + closeRe: i.bgColor.closeRe + }; + return f.call(this, this._styles ? this._styles.concat(n) : [ n ], this._empty, e); + }; + } + }; + } + const h = Object.defineProperties(() => {}, p); + function f(e, t, n) { + const r = function() { + return function() { + const e = arguments; + const t = e.length; + let n = String(arguments[0]); + if (0 === t) return ""; + if (t > 1) for (let r = 1; r < t; r++) n += " " + e[r]; + if (!this.enabled || this.level <= 0 || !n) return this._empty ? "" : n; + const r = i.dim.open; + o && this.hasGrey && (i.dim.open = ""); + for (const e of this._styles.slice().reverse()) n = (n = e.open + n.replace(e.closeRe, e.open) + e.close).replace(/\r?\n/g, `${e.close}$&${e.open}`); + i.dim.open = r; + return n; + }.apply(r, arguments); + }; + r._styles = e; + r._empty = t; + const s = this; + Object.defineProperty(r, "level", { + enumerable: !0, + get: () => s.level, + set(e) { + s.level = e; + } + }); + Object.defineProperty(r, "enabled", { + enumerable: !0, + get: () => s.enabled, + set(e) { + s.enabled = e; + } + }); + r.hasGrey = this.hasGrey || "gray" === n || "grey" === n; + r.__proto__ = h; + return r; + } + Object.defineProperties(d.prototype, p); + t.exports = d(); + t.exports.supportsColor = s; + t.exports.default = t.exports; + }).call(this); + }).call(this, e("_process")); + }, { + "./templates.js": 146, + _process: 160, + "ansi-styles": 144, + "escape-string-regexp": 153, + "supports-color": 172 + } ], + 146: [ function(e, t, n) { + "use strict"; + const r = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + const i = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + const s = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + const a = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + const o = new Map([ [ "n", "\n" ], [ "r", "\r" ], [ "t", "\t" ], [ "b", "\b" ], [ "f", "\f" ], [ "v", "\v" ], [ "0", "\0" ], [ "\\", "\\" ], [ "e", "" ], [ "a", "" ] ]); + function l(e) { + return "u" === e[0] && 5 === e.length || "x" === e[0] && 3 === e.length ? String.fromCharCode(parseInt(e.slice(1), 16)) : o.get(e) || e; + } + function c(e, t) { + const n = []; + const r = t.trim().split(/\s*,\s*/g); + let i; + for (const t of r) if (isNaN(t)) { + if (!(i = t.match(s))) throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`); + n.push(i[2].replace(a, (e, t, n) => t ? l(t) : n)); + } else n.push(Number(t)); + return n; + } + function p(e, t) { + const n = {}; + for (const e of t) for (const t of e.styles) n[t[0]] = e.inverse ? null : t.slice(1); + let r = e; + for (const e of Object.keys(n)) if (Array.isArray(n[e])) { + if (!(e in r)) throw new Error(`Unknown Chalk style: ${e}`); + r = n[e].length > 0 ? r[e].apply(r, n[e]) : r[e]; + } + return r; + } + t.exports = ((e, t) => { + const n = []; + const s = []; + let a = []; + t.replace(r, (t, r, o, u, d, h) => { + if (r) a.push(l(r)); else if (u) { + const t = a.join(""); + a = []; + s.push(0 === n.length ? t : p(e, n)(t)); + n.push({ + inverse: o, + styles: function(e) { + i.lastIndex = 0; + const t = []; + let n; + for (;null !== (n = i.exec(e)); ) { + const e = n[1]; + if (n[2]) { + const r = c(e, n[2]); + t.push([ e ].concat(r)); + } else t.push([ e ]); + } + return t; + }(u) + }); + } else if (d) { + if (0 === n.length) throw new Error("Found extraneous } in Chalk template literal"); + s.push(p(e, n)(a.join(""))); + a = []; + n.pop(); + } else a.push(h); + }); + s.push(a.join("")); + if (n.length > 0) { + const e = `Chalk template literal is missing ${n.length} closing bracket${1 === n.length ? "" : "s"} (\`}\`)`; + throw new Error(e); + } + return s.join(""); + }); + }, {} ], + 147: [ function(e, t, n) { + var r, i, s, a, o, l = e("color-name"), c = {}; + for (r in l) l.hasOwnProperty(r) && (c[l[r]] = r); + i = t.exports = { + rgb: { + channels: 3, + labels: "rgb" + }, + hsl: { + channels: 3, + labels: "hsl" + }, + hsv: { + channels: 3, + labels: "hsv" + }, + hwb: { + channels: 3, + labels: "hwb" + }, + cmyk: { + channels: 4, + labels: "cmyk" + }, + xyz: { + channels: 3, + labels: "xyz" + }, + lab: { + channels: 3, + labels: "lab" + }, + lch: { + channels: 3, + labels: "lch" + }, + hex: { + channels: 1, + labels: [ "hex" ] + }, + keyword: { + channels: 1, + labels: [ "keyword" ] + }, + ansi16: { + channels: 1, + labels: [ "ansi16" ] + }, + ansi256: { + channels: 1, + labels: [ "ansi256" ] + }, + hcg: { + channels: 3, + labels: [ "h", "c", "g" ] + }, + apple: { + channels: 3, + labels: [ "r16", "g16", "b16" ] + }, + gray: { + channels: 1, + labels: [ "gray" ] + } + }; + for (s in i) if (i.hasOwnProperty(s)) { + if (!("channels" in i[s])) throw new Error("missing channels property: " + s); + if (!("labels" in i[s])) throw new Error("missing channel labels property: " + s); + if (i[s].labels.length !== i[s].channels) throw new Error("channel and label counts mismatch: " + s); + a = i[s].channels; + o = i[s].labels; + delete i[s].channels; + delete i[s].labels; + Object.defineProperty(i[s], "channels", { + value: a + }); + Object.defineProperty(i[s], "labels", { + value: o + }); + } + i.rgb.hsl = function(e) { + var t, n, r = e[0] / 255, i = e[1] / 255, s = e[2] / 255, a = Math.min(r, i, s), o = Math.max(r, i, s), l = o - a; + o === a ? t = 0 : r === o ? t = (i - s) / l : i === o ? t = 2 + (s - r) / l : s === o && (t = 4 + (r - i) / l); + (t = Math.min(60 * t, 360)) < 0 && (t += 360); + n = (a + o) / 2; + return [ t, 100 * (o === a ? 0 : n <= .5 ? l / (o + a) : l / (2 - o - a)), 100 * n ]; + }; + i.rgb.hsv = function(e) { + var t, n, r, i, s, a = e[0] / 255, o = e[1] / 255, l = e[2] / 255, c = Math.max(a, o, l), p = c - Math.min(a, o, l), u = function(e) { + return (c - e) / 6 / p + .5; + }; + if (0 === p) i = s = 0; else { + s = p / c; + t = u(a); + n = u(o); + r = u(l); + a === c ? i = r - n : o === c ? i = 1 / 3 + t - r : l === c && (i = 2 / 3 + n - t); + i < 0 ? i += 1 : i > 1 && (i -= 1); + } + return [ 360 * i, 100 * s, 100 * c ]; + }; + i.rgb.hwb = function(e) { + var t = e[0], n = e[1], r = e[2], s = i.rgb.hsl(e)[0], a = 1 / 255 * Math.min(t, Math.min(n, r)); + return [ s, 100 * a, 100 * (r = 1 - 1 / 255 * Math.max(t, Math.max(n, r))) ]; + }; + i.rgb.cmyk = function(e) { + var t = e[0] / 255, n = e[1] / 255, r = e[2] / 255, i = Math.min(1 - t, 1 - n, 1 - r), s = (1 - t - i) / (1 - i) || 0, a = (1 - n - i) / (1 - i) || 0, o = (1 - r - i) / (1 - i) || 0; + return [ 100 * s, 100 * a, 100 * o, 100 * i ]; + }; + i.rgb.keyword = function(e) { + var t, n, r, i, s, a = c[e]; + if (a) return a; + t = 1 / 0; + for (r in l) if (l.hasOwnProperty(r)) { + i = l[r]; + if ((s = (o = e, p = i, Math.pow(o[0] - p[0], 2) + Math.pow(o[1] - p[1], 2) + Math.pow(o[2] - p[2], 2))) < t) { + t = s; + n = r; + } + } + var o, p; + return n; + }; + i.keyword.rgb = function(e) { + return l[e]; + }; + i.rgb.xyz = function(e) { + var t = e[0] / 255, n = e[1] / 255, r = e[2] / 255; + return [ 100 * (.4124 * (t = t > .04045 ? Math.pow((t + .055) / 1.055, 2.4) : t / 12.92) + .3576 * (n = n > .04045 ? Math.pow((n + .055) / 1.055, 2.4) : n / 12.92) + .1805 * (r = r > .04045 ? Math.pow((r + .055) / 1.055, 2.4) : r / 12.92)), 100 * (.2126 * t + .7152 * n + .0722 * r), 100 * (.0193 * t + .1192 * n + .9505 * r) ]; + }; + i.rgb.lab = function(e) { + var t = i.rgb.xyz(e), n = t[0], r = t[1], s = t[2]; + r /= 100; + s /= 108.883; + n = (n /= 95.047) > .008856 ? Math.pow(n, 1 / 3) : 7.787 * n + 16 / 116; + return [ 116 * (r = r > .008856 ? Math.pow(r, 1 / 3) : 7.787 * r + 16 / 116) - 16, 500 * (n - r), 200 * (r - (s = s > .008856 ? Math.pow(s, 1 / 3) : 7.787 * s + 16 / 116)) ]; + }; + i.hsl.rgb = function(e) { + var t, n, r, i, s, a, o = e[0] / 360, l = e[1] / 100, c = e[2] / 100; + if (0 === l) return [ s = 255 * c, s, s ]; + t = 2 * c - (n = c < .5 ? c * (1 + l) : c + l - c * l); + i = [ 0, 0, 0 ]; + for (a = 0; a < 3; a++) { + (r = o + 1 / 3 * -(a - 1)) < 0 && r++; + r > 1 && r--; + s = 6 * r < 1 ? t + 6 * (n - t) * r : 2 * r < 1 ? n : 3 * r < 2 ? t + (n - t) * (2 / 3 - r) * 6 : t; + i[a] = 255 * s; + } + return i; + }; + i.hsl.hsv = function(e) { + var t, n = e[0], r = e[1] / 100, i = e[2] / 100, s = r, a = Math.max(i, .01); + r *= (i *= 2) <= 1 ? i : 2 - i; + s *= a <= 1 ? a : 2 - a; + t = (i + r) / 2; + return [ n, 100 * (0 === i ? 2 * s / (a + s) : 2 * r / (i + r)), 100 * t ]; + }; + i.hsv.rgb = function(e) { + var t = e[0] / 60, n = e[1] / 100, r = e[2] / 100, i = Math.floor(t) % 6, s = t - Math.floor(t), a = 255 * r * (1 - n), o = 255 * r * (1 - n * s), l = 255 * r * (1 - n * (1 - s)); + r *= 255; + switch (i) { + case 0: + return [ r, l, a ]; + + case 1: + return [ o, r, a ]; + + case 2: + return [ a, r, l ]; + + case 3: + return [ a, o, r ]; + + case 4: + return [ l, a, r ]; + + case 5: + return [ r, a, o ]; + } + }; + i.hsv.hsl = function(e) { + var t = e[0], n = e[1] / 100, r = e[2] / 100, i = Math.max(r, .01), s = (2 - n) * r, a = (2 - n) * i, o = n * i; + return [ t, 100 * (o = (o /= a <= 1 ? a : 2 - a) || 0), 100 * (s /= 2) ]; + }; + i.hwb.rgb = function(e) { + var t, n, r, i, s, a, o, l = e[0] / 360, c = e[1] / 100, p = e[2] / 100, u = c + p; + if (u > 1) { + c /= u; + p /= u; + } + t = Math.floor(6 * l); + n = 1 - p; + r = 6 * l - t; + 0 != (1 & t) && (r = 1 - r); + i = c + r * (n - c); + switch (t) { + default: + case 6: + case 0: + s = n; + a = i; + o = c; + break; + + case 1: + s = i; + a = n; + o = c; + break; + + case 2: + s = c; + a = n; + o = i; + break; + + case 3: + s = c; + a = i; + o = n; + break; + + case 4: + s = i; + a = c; + o = n; + break; + + case 5: + s = n; + a = c; + o = i; + } + return [ 255 * s, 255 * a, 255 * o ]; + }; + i.cmyk.rgb = function(e) { + var t = e[0] / 100, n = e[1] / 100, r = e[2] / 100, i = e[3] / 100, s = 1 - Math.min(1, t * (1 - i) + i), a = 1 - Math.min(1, n * (1 - i) + i), o = 1 - Math.min(1, r * (1 - i) + i); + return [ 255 * s, 255 * a, 255 * o ]; + }; + i.xyz.rgb = function(e) { + var t = e[0] / 100, n = e[1] / 100, r = e[2] / 100, i = 3.2406 * t + -1.5372 * n + -.4986 * r, s = -.9689 * t + 1.8758 * n + .0415 * r, a = .0557 * t + -.204 * n + 1.057 * r; + i = i > .0031308 ? 1.055 * Math.pow(i, 1 / 2.4) - .055 : 12.92 * i; + s = s > .0031308 ? 1.055 * Math.pow(s, 1 / 2.4) - .055 : 12.92 * s; + a = a > .0031308 ? 1.055 * Math.pow(a, 1 / 2.4) - .055 : 12.92 * a; + return [ 255 * (i = Math.min(Math.max(0, i), 1)), 255 * (s = Math.min(Math.max(0, s), 1)), 255 * (a = Math.min(Math.max(0, a), 1)) ]; + }; + i.xyz.lab = function(e) { + var t = e[0], n = e[1], r = e[2]; + n /= 100; + r /= 108.883; + t = (t /= 95.047) > .008856 ? Math.pow(t, 1 / 3) : 7.787 * t + 16 / 116; + return [ 116 * (n = n > .008856 ? Math.pow(n, 1 / 3) : 7.787 * n + 16 / 116) - 16, 500 * (t - n), 200 * (n - (r = r > .008856 ? Math.pow(r, 1 / 3) : 7.787 * r + 16 / 116)) ]; + }; + i.lab.xyz = function(e) { + var t = e[0], n = e[1], r = e[2], i = (t + 16) / 116, s = n / 500 + i, a = i - r / 200, o = Math.pow(i, 3), l = Math.pow(s, 3), c = Math.pow(a, 3); + i = o > .008856 ? o : (i - 16 / 116) / 7.787; + s = l > .008856 ? l : (s - 16 / 116) / 7.787; + a = c > .008856 ? c : (a - 16 / 116) / 7.787; + return [ s *= 95.047, i *= 100, a *= 108.883 ]; + }; + i.lab.lch = function(e) { + var t = e[0], n = e[1], r = e[2], i = Math.atan2(r, n), s = 360 * i / 2 / Math.PI; + s < 0 && (s += 360); + return [ t, Math.sqrt(n * n + r * r), s ]; + }; + i.lch.lab = function(e) { + var t = e[0], n = e[1], r = e[2], i = r / 360 * 2 * Math.PI, s = n * Math.cos(i), a = n * Math.sin(i); + return [ t, s, a ]; + }; + i.rgb.ansi16 = function(e) { + var t, n = e[0], r = e[1], s = e[2], a = 1 in arguments ? arguments[1] : i.rgb.hsv(e)[2]; + if (0 === (a = Math.round(a / 50))) return 30; + t = 30 + (Math.round(s / 255) << 2 | Math.round(r / 255) << 1 | Math.round(n / 255)); + 2 === a && (t += 60); + return t; + }; + i.hsv.ansi16 = function(e) { + return i.rgb.ansi16(i.hsv.rgb(e), e[2]); + }; + i.rgb.ansi256 = function(e) { + var t = e[0], n = e[1], r = e[2]; + return t === n && n === r ? t < 8 ? 16 : t > 248 ? 231 : Math.round((t - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(t / 255 * 5) + 6 * Math.round(n / 255 * 5) + Math.round(r / 255 * 5); + }; + i.ansi16.rgb = function(e) { + var t, n = e % 10; + if (0 === n || 7 === n) { + e > 50 && (n += 3.5); + return [ n = n / 10.5 * 255, n, n ]; + } + return [ (1 & n) * (t = .5 * (1 + ~~(e > 50))) * 255, (n >> 1 & 1) * t * 255, (n >> 2 & 1) * t * 255 ]; + }; + i.ansi256.rgb = function(e) { + var t, n; + if (e >= 232) return [ t = 10 * (e - 232) + 8, t, t ]; + e -= 16; + return [ Math.floor(e / 36) / 5 * 255, Math.floor((n = e % 36) / 6) / 5 * 255, n % 6 / 5 * 255 ]; + }; + i.rgb.hex = function(e) { + var t = ((255 & Math.round(e[0])) << 16) + ((255 & Math.round(e[1])) << 8) + (255 & Math.round(e[2])), n = t.toString(16).toUpperCase(); + return "000000".substring(n.length) + n; + }; + i.hex.rgb = function(e) { + var t, n, r = e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!r) return [ 0, 0, 0 ]; + t = r[0]; + 3 === r[0].length && (t = t.split("").map(function(e) { + return e + e; + }).join("")); + return [ (n = parseInt(t, 16)) >> 16 & 255, n >> 8 & 255, 255 & n ]; + }; + i.rgb.hcg = function(e) { + var t, n, r = e[0] / 255, i = e[1] / 255, s = e[2] / 255, a = Math.max(Math.max(r, i), s), o = Math.min(Math.min(r, i), s), l = a - o; + t = l < 1 ? o / (1 - l) : 0; + n = l <= 0 ? 0 : a === r ? (i - s) / l % 6 : a === i ? 2 + (s - r) / l : 4 + (r - i) / l + 4; + n /= 6; + return [ 360 * (n %= 1), 100 * l, 100 * t ]; + }; + i.hsl.hcg = function(e) { + var t = e[1] / 100, n = e[2] / 100, r = 1, i = 0; + (r = n < .5 ? 2 * t * n : 2 * t * (1 - n)) < 1 && (i = (n - .5 * r) / (1 - r)); + return [ e[0], 100 * r, 100 * i ]; + }; + i.hsv.hcg = function(e) { + var t = e[1] / 100, n = e[2] / 100, r = t * n, i = 0; + r < 1 && (i = (n - r) / (1 - r)); + return [ e[0], 100 * r, 100 * i ]; + }; + i.hcg.rgb = function(e) { + var t, n, r, i, s, a = e[0] / 360, o = e[1] / 100, l = e[2] / 100; + if (0 === o) return [ 255 * l, 255 * l, 255 * l ]; + t = [ 0, 0, 0 ]; + i = 1 - (r = (n = a % 1 * 6) % 1); + s = 0; + switch (Math.floor(n)) { + case 0: + t[0] = 1; + t[1] = r; + t[2] = 0; + break; + + case 1: + t[0] = i; + t[1] = 1; + t[2] = 0; + break; + + case 2: + t[0] = 0; + t[1] = 1; + t[2] = r; + break; + + case 3: + t[0] = 0; + t[1] = i; + t[2] = 1; + break; + + case 4: + t[0] = r; + t[1] = 0; + t[2] = 1; + break; + + default: + t[0] = 1; + t[1] = 0; + t[2] = i; + } + s = (1 - o) * l; + return [ 255 * (o * t[0] + s), 255 * (o * t[1] + s), 255 * (o * t[2] + s) ]; + }; + i.hcg.hsv = function(e) { + var t = e[1] / 100, n = e[2] / 100, r = t + n * (1 - t), i = 0; + r > 0 && (i = t / r); + return [ e[0], 100 * i, 100 * r ]; + }; + i.hcg.hsl = function(e) { + var t = e[1] / 100, n = e[2] / 100, r = n * (1 - t) + .5 * t, i = 0; + r > 0 && r < .5 ? i = t / (2 * r) : r >= .5 && r < 1 && (i = t / (2 * (1 - r))); + return [ e[0], 100 * i, 100 * r ]; + }; + i.hcg.hwb = function(e) { + var t = e[1] / 100, n = e[2] / 100, r = t + n * (1 - t); + return [ e[0], 100 * (r - t), 100 * (1 - r) ]; + }; + i.hwb.hcg = function(e) { + var t = e[1] / 100, n = e[2] / 100, r = 1 - n, i = r - t, s = 0; + i < 1 && (s = (r - i) / (1 - i)); + return [ e[0], 100 * i, 100 * s ]; + }; + i.apple.rgb = function(e) { + return [ e[0] / 65535 * 255, e[1] / 65535 * 255, e[2] / 65535 * 255 ]; + }; + i.rgb.apple = function(e) { + return [ e[0] / 255 * 65535, e[1] / 255 * 65535, e[2] / 255 * 65535 ]; + }; + i.gray.rgb = function(e) { + return [ e[0] / 100 * 255, e[0] / 100 * 255, e[0] / 100 * 255 ]; + }; + i.gray.hsl = i.gray.hsv = function(e) { + return [ 0, 0, e[0] ]; + }; + i.gray.hwb = function(e) { + return [ 0, 100, e[0] ]; + }; + i.gray.cmyk = function(e) { + return [ 0, 0, 0, e[0] ]; + }; + i.gray.lab = function(e) { + return [ e[0], 0, 0 ]; + }; + i.gray.hex = function(e) { + var t = 255 & Math.round(e[0] / 100 * 255), n = (t << 16) + (t << 8) + t, r = n.toString(16).toUpperCase(); + return "000000".substring(r.length) + r; + }; + i.rgb.gray = function(e) { + return [ (e[0] + e[1] + e[2]) / 3 / 255 * 100 ]; + }; + }, { + "color-name": 150 + } ], + 148: [ function(e, t, n) { + var r = e("./conversions"), i = e("./route"), s = {}, a = Object.keys(r); + a.forEach(function(e) { + var t; + s[e] = {}; + Object.defineProperty(s[e], "channels", { + value: r[e].channels + }); + Object.defineProperty(s[e], "labels", { + value: r[e].labels + }); + t = i(e); + Object.keys(t).forEach(function(n) { + var r = t[n]; + s[e][n] = function(e) { + var t = function(t) { + var n, r, i; + if (void 0 === t || null === t) return t; + arguments.length > 1 && (t = Array.prototype.slice.call(arguments)); + if ("object" == typeof (n = e(t))) for (r = n.length, i = 0; i < r; i++) n[i] = Math.round(n[i]); + return n; + }; + "conversion" in e && (t.conversion = e.conversion); + return t; + }(r); + s[e][n].raw = function(e) { + var t = function(t) { + if (void 0 === t || null === t) return t; + arguments.length > 1 && (t = Array.prototype.slice.call(arguments)); + return e(t); + }; + "conversion" in e && (t.conversion = e.conversion); + return t; + }(r); + }); + }); + t.exports = s; + }, { + "./conversions": 147, + "./route": 149 + } ], + 149: [ function(e, t, n) { + var r = e("./conversions"); + function i(e) { + var t, n, i, s, a, o, l = function() { + var e, t, n = {}, i = Object.keys(r); + for (e = i.length, t = 0; t < e; t++) n[i[t]] = { + distance: -1, + parent: null + }; + return n; + }(), c = [ e ]; + l[e].distance = 0; + for (;c.length; ) { + t = c.pop(); + for (i = (n = Object.keys(r[t])).length, s = 0; s < i; s++) if (-1 === (o = l[a = n[s]]).distance) { + o.distance = l[t].distance + 1; + o.parent = t; + c.unshift(a); + } + } + return l; + } + function s(e, t) { + return function(n) { + return t(e(n)); + }; + } + function a(e, t) { + var n = [ t[e].parent, e ], i = r[t[e].parent][e], a = t[e].parent; + for (;t[a].parent; ) { + n.unshift(t[a].parent); + i = s(r[t[a].parent][a], i); + a = t[a].parent; + } + i.conversion = n; + return i; + } + t.exports = function(e) { + var t, n, r, s = i(e), o = {}, l = Object.keys(s); + for (t = l.length, n = 0; n < t; n++) null !== s[r = l[n]].parent && (o[r] = a(r, s)); + return o; + }; + }, { + "./conversions": 147 + } ], + 150: [ function(e, t, n) { + "use strict"; + t.exports = { + aliceblue: [ 240, 248, 255 ], + antiquewhite: [ 250, 235, 215 ], + aqua: [ 0, 255, 255 ], + aquamarine: [ 127, 255, 212 ], + azure: [ 240, 255, 255 ], + beige: [ 245, 245, 220 ], + bisque: [ 255, 228, 196 ], + black: [ 0, 0, 0 ], + blanchedalmond: [ 255, 235, 205 ], + blue: [ 0, 0, 255 ], + blueviolet: [ 138, 43, 226 ], + brown: [ 165, 42, 42 ], + burlywood: [ 222, 184, 135 ], + cadetblue: [ 95, 158, 160 ], + chartreuse: [ 127, 255, 0 ], + chocolate: [ 210, 105, 30 ], + coral: [ 255, 127, 80 ], + cornflowerblue: [ 100, 149, 237 ], + cornsilk: [ 255, 248, 220 ], + crimson: [ 220, 20, 60 ], + cyan: [ 0, 255, 255 ], + darkblue: [ 0, 0, 139 ], + darkcyan: [ 0, 139, 139 ], + darkgoldenrod: [ 184, 134, 11 ], + darkgray: [ 169, 169, 169 ], + darkgreen: [ 0, 100, 0 ], + darkgrey: [ 169, 169, 169 ], + darkkhaki: [ 189, 183, 107 ], + darkmagenta: [ 139, 0, 139 ], + darkolivegreen: [ 85, 107, 47 ], + darkorange: [ 255, 140, 0 ], + darkorchid: [ 153, 50, 204 ], + darkred: [ 139, 0, 0 ], + darksalmon: [ 233, 150, 122 ], + darkseagreen: [ 143, 188, 143 ], + darkslateblue: [ 72, 61, 139 ], + darkslategray: [ 47, 79, 79 ], + darkslategrey: [ 47, 79, 79 ], + darkturquoise: [ 0, 206, 209 ], + darkviolet: [ 148, 0, 211 ], + deeppink: [ 255, 20, 147 ], + deepskyblue: [ 0, 191, 255 ], + dimgray: [ 105, 105, 105 ], + dimgrey: [ 105, 105, 105 ], + dodgerblue: [ 30, 144, 255 ], + firebrick: [ 178, 34, 34 ], + floralwhite: [ 255, 250, 240 ], + forestgreen: [ 34, 139, 34 ], + fuchsia: [ 255, 0, 255 ], + gainsboro: [ 220, 220, 220 ], + ghostwhite: [ 248, 248, 255 ], + gold: [ 255, 215, 0 ], + goldenrod: [ 218, 165, 32 ], + gray: [ 128, 128, 128 ], + green: [ 0, 128, 0 ], + greenyellow: [ 173, 255, 47 ], + grey: [ 128, 128, 128 ], + honeydew: [ 240, 255, 240 ], + hotpink: [ 255, 105, 180 ], + indianred: [ 205, 92, 92 ], + indigo: [ 75, 0, 130 ], + ivory: [ 255, 255, 240 ], + khaki: [ 240, 230, 140 ], + lavender: [ 230, 230, 250 ], + lavenderblush: [ 255, 240, 245 ], + lawngreen: [ 124, 252, 0 ], + lemonchiffon: [ 255, 250, 205 ], + lightblue: [ 173, 216, 230 ], + lightcoral: [ 240, 128, 128 ], + lightcyan: [ 224, 255, 255 ], + lightgoldenrodyellow: [ 250, 250, 210 ], + lightgray: [ 211, 211, 211 ], + lightgreen: [ 144, 238, 144 ], + lightgrey: [ 211, 211, 211 ], + lightpink: [ 255, 182, 193 ], + lightsalmon: [ 255, 160, 122 ], + lightseagreen: [ 32, 178, 170 ], + lightskyblue: [ 135, 206, 250 ], + lightslategray: [ 119, 136, 153 ], + lightslategrey: [ 119, 136, 153 ], + lightsteelblue: [ 176, 196, 222 ], + lightyellow: [ 255, 255, 224 ], + lime: [ 0, 255, 0 ], + limegreen: [ 50, 205, 50 ], + linen: [ 250, 240, 230 ], + magenta: [ 255, 0, 255 ], + maroon: [ 128, 0, 0 ], + mediumaquamarine: [ 102, 205, 170 ], + mediumblue: [ 0, 0, 205 ], + mediumorchid: [ 186, 85, 211 ], + mediumpurple: [ 147, 112, 219 ], + mediumseagreen: [ 60, 179, 113 ], + mediumslateblue: [ 123, 104, 238 ], + mediumspringgreen: [ 0, 250, 154 ], + mediumturquoise: [ 72, 209, 204 ], + mediumvioletred: [ 199, 21, 133 ], + midnightblue: [ 25, 25, 112 ], + mintcream: [ 245, 255, 250 ], + mistyrose: [ 255, 228, 225 ], + moccasin: [ 255, 228, 181 ], + navajowhite: [ 255, 222, 173 ], + navy: [ 0, 0, 128 ], + oldlace: [ 253, 245, 230 ], + olive: [ 128, 128, 0 ], + olivedrab: [ 107, 142, 35 ], + orange: [ 255, 165, 0 ], + orangered: [ 255, 69, 0 ], + orchid: [ 218, 112, 214 ], + palegoldenrod: [ 238, 232, 170 ], + palegreen: [ 152, 251, 152 ], + paleturquoise: [ 175, 238, 238 ], + palevioletred: [ 219, 112, 147 ], + papayawhip: [ 255, 239, 213 ], + peachpuff: [ 255, 218, 185 ], + peru: [ 205, 133, 63 ], + pink: [ 255, 192, 203 ], + plum: [ 221, 160, 221 ], + powderblue: [ 176, 224, 230 ], + purple: [ 128, 0, 128 ], + rebeccapurple: [ 102, 51, 153 ], + red: [ 255, 0, 0 ], + rosybrown: [ 188, 143, 143 ], + royalblue: [ 65, 105, 225 ], + saddlebrown: [ 139, 69, 19 ], + salmon: [ 250, 128, 114 ], + sandybrown: [ 244, 164, 96 ], + seagreen: [ 46, 139, 87 ], + seashell: [ 255, 245, 238 ], + sienna: [ 160, 82, 45 ], + silver: [ 192, 192, 192 ], + skyblue: [ 135, 206, 235 ], + slateblue: [ 106, 90, 205 ], + slategray: [ 112, 128, 144 ], + slategrey: [ 112, 128, 144 ], + snow: [ 255, 250, 250 ], + springgreen: [ 0, 255, 127 ], + steelblue: [ 70, 130, 180 ], + tan: [ 210, 180, 140 ], + teal: [ 0, 128, 128 ], + thistle: [ 216, 191, 216 ], + tomato: [ 255, 99, 71 ], + turquoise: [ 64, 224, 208 ], + violet: [ 238, 130, 238 ], + wheat: [ 245, 222, 179 ], + white: [ 255, 255, 255 ], + whitesmoke: [ 245, 245, 245 ], + yellow: [ 255, 255, 0 ], + yellowgreen: [ 154, 205, 50 ] + }; + }, {} ], + 151: [ function(e, t, n) { + (function(r) { + (function() { + n.formatArgs = function(e) { + e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff); + if (!this.useColors) return; + const n = "color: " + this.color; + e.splice(1, 0, n, "color: inherit"); + let r = 0; + let i = 0; + e[0].replace(/%[a-zA-Z%]/g, e => { + "%%" !== e && "%c" === e && (i = ++r); + }); + e.splice(i, 0, n); + }; + n.save = function(e) { + try { + e ? n.storage.setItem("debug", e) : n.storage.removeItem("debug"); + } catch (e) {} + }; + n.load = function() { + let e; + try { + e = n.storage.getItem("debug"); + } catch (e) {} + !e && void 0 !== r && "env" in r && (e = r.env.DEBUG); + return e; + }; + n.useColors = function() { + if ("undefined" != typeof window && window.process && ("renderer" === window.process.type || window.process.__nwjs)) return !0; + if ("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1; + return "undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + }; + n.storage = function() { + try { + return localStorage; + } catch (e) {} + }(); + n.destroy = (() => { + let e = !1; + return () => { + if (!e) { + e = !0; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + n.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; + n.log = console.debug || console.log || (() => {}); + t.exports = e("./common")(n); + const {formatters: i} = t.exports; + i.j = function(e) { + try { + return JSON.stringify(e); + } catch (e) { + return "[UnexpectedJSONParseError]: " + e.message; + } + }; + }).call(this); + }).call(this, e("_process")); + }, { + "./common": 152, + _process: 160 + } ], + 152: [ function(e, t, n) { + t.exports = function(t) { + n.debug = n; + n.default = n; + n.coerce = function(e) { + return e instanceof Error ? e.stack || e.message : e; + }; + n.disable = function() { + const e = [ ...n.names.map(i), ...n.skips.map(i).map(e => "-" + e) ].join(","); + n.enable(""); + return e; + }; + n.enable = function(e) { + n.save(e); + n.namespaces = e; + n.names = []; + n.skips = []; + let t; + const r = ("string" == typeof e ? e : "").split(/[\s,]+/); + const i = r.length; + for (t = 0; t < i; t++) r[t] && ("-" === (e = r[t].replace(/\*/g, ".*?"))[0] ? n.skips.push(new RegExp("^" + e.substr(1) + "$")) : n.names.push(new RegExp("^" + e + "$"))); + }; + n.enabled = function(e) { + if ("*" === e[e.length - 1]) return !0; + let t; + let r; + for (t = 0, r = n.skips.length; t < r; t++) if (n.skips[t].test(e)) return !1; + for (t = 0, r = n.names.length; t < r; t++) if (n.names[t].test(e)) return !0; + return !1; + }; + n.humanize = e("ms"); + n.destroy = function() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + }; + Object.keys(t).forEach(e => { + n[e] = t[e]; + }); + n.names = []; + n.skips = []; + n.formatters = {}; + n.selectColor = function(e) { + let t = 0; + for (let n = 0; n < e.length; n++) { + t = (t << 5) - t + e.charCodeAt(n); + t |= 0; + } + return n.colors[Math.abs(t) % n.colors.length]; + }; + function n(e) { + let t; + let i = null; + let s; + let a; + function o(...e) { + if (!o.enabled) return; + const r = o; + const i = Number(new Date()); + const s = i - (t || i); + r.diff = s; + r.prev = t; + r.curr = i; + t = i; + e[0] = n.coerce(e[0]); + "string" != typeof e[0] && e.unshift("%O"); + let a = 0; + e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => { + if ("%%" === t) return "%"; + a++; + const s = n.formatters[i]; + if ("function" == typeof s) { + const n = e[a]; + t = s.call(r, n); + e.splice(a, 1); + a--; + } + return t; + }); + n.formatArgs.call(r, e); + (r.log || n.log).apply(r, e); + } + o.namespace = e; + o.useColors = n.useColors(); + o.color = n.selectColor(e); + o.extend = r; + o.destroy = n.destroy; + Object.defineProperty(o, "enabled", { + enumerable: !0, + configurable: !1, + get: () => { + if (null !== i) return i; + if (s !== n.namespaces) { + s = n.namespaces; + a = n.enabled(e); + } + return a; + }, + set: e => { + i = e; + } + }); + "function" == typeof n.init && n.init(o); + return o; + } + function r(e, t) { + const r = n(this.namespace + (void 0 === t ? ":" : t) + e); + r.log = this.log; + return r; + } + function i(e) { + return e.toString().substring(2, e.toString().length - 2).replace(/\.\*\?$/, "*"); + } + n.enable(n.load()); + return n; + }; + }, { + ms: 159 + } ], + 153: [ function(e, t, n) { + "use strict"; + var r = /[|\\{}()[\]^$+*?.]/g; + t.exports = function(e) { + if ("string" != typeof e) throw new TypeError("Expected a string"); + return e.replace(r, "\\$&"); + }; + }, {} ], + 154: [ function(e, t, n) { + t.exports = { + builtin: { + Array: !1, + ArrayBuffer: !1, + Atomics: !1, + BigInt: !1, + BigInt64Array: !1, + BigUint64Array: !1, + Boolean: !1, + constructor: !1, + DataView: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Float32Array: !1, + Float64Array: !1, + Function: !1, + globalThis: !1, + hasOwnProperty: !1, + Infinity: !1, + Int16Array: !1, + Int32Array: !1, + Int8Array: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Map: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + Promise: !1, + propertyIsEnumerable: !1, + Proxy: !1, + RangeError: !1, + ReferenceError: !1, + Reflect: !1, + RegExp: !1, + Set: !1, + SharedArrayBuffer: !1, + String: !1, + Symbol: !1, + SyntaxError: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + Uint16Array: !1, + Uint32Array: !1, + Uint8Array: !1, + Uint8ClampedArray: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1, + WeakMap: !1, + WeakSet: !1 + }, + es5: { + Array: !1, + Boolean: !1, + constructor: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Function: !1, + hasOwnProperty: !1, + Infinity: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + propertyIsEnumerable: !1, + RangeError: !1, + ReferenceError: !1, + RegExp: !1, + String: !1, + SyntaxError: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1 + }, + es2015: { + Array: !1, + ArrayBuffer: !1, + Boolean: !1, + constructor: !1, + DataView: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Float32Array: !1, + Float64Array: !1, + Function: !1, + hasOwnProperty: !1, + Infinity: !1, + Int16Array: !1, + Int32Array: !1, + Int8Array: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Map: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + Promise: !1, + propertyIsEnumerable: !1, + Proxy: !1, + RangeError: !1, + ReferenceError: !1, + Reflect: !1, + RegExp: !1, + Set: !1, + String: !1, + Symbol: !1, + SyntaxError: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + Uint16Array: !1, + Uint32Array: !1, + Uint8Array: !1, + Uint8ClampedArray: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1, + WeakMap: !1, + WeakSet: !1 + }, + es2017: { + Array: !1, + ArrayBuffer: !1, + Atomics: !1, + Boolean: !1, + constructor: !1, + DataView: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Float32Array: !1, + Float64Array: !1, + Function: !1, + hasOwnProperty: !1, + Infinity: !1, + Int16Array: !1, + Int32Array: !1, + Int8Array: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Map: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + Promise: !1, + propertyIsEnumerable: !1, + Proxy: !1, + RangeError: !1, + ReferenceError: !1, + Reflect: !1, + RegExp: !1, + Set: !1, + SharedArrayBuffer: !1, + String: !1, + Symbol: !1, + SyntaxError: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + Uint16Array: !1, + Uint32Array: !1, + Uint8Array: !1, + Uint8ClampedArray: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1, + WeakMap: !1, + WeakSet: !1 + }, + browser: { + AbortController: !1, + AbortSignal: !1, + addEventListener: !1, + alert: !1, + AnalyserNode: !1, + Animation: !1, + AnimationEffectReadOnly: !1, + AnimationEffectTiming: !1, + AnimationEffectTimingReadOnly: !1, + AnimationEvent: !1, + AnimationPlaybackEvent: !1, + AnimationTimeline: !1, + applicationCache: !1, + ApplicationCache: !1, + ApplicationCacheErrorEvent: !1, + atob: !1, + Attr: !1, + Audio: !1, + AudioBuffer: !1, + AudioBufferSourceNode: !1, + AudioContext: !1, + AudioDestinationNode: !1, + AudioListener: !1, + AudioNode: !1, + AudioParam: !1, + AudioProcessingEvent: !1, + AudioScheduledSourceNode: !1, + "AudioWorkletGlobalScope ": !1, + AudioWorkletNode: !1, + AudioWorkletProcessor: !1, + BarProp: !1, + BaseAudioContext: !1, + BatteryManager: !1, + BeforeUnloadEvent: !1, + BiquadFilterNode: !1, + Blob: !1, + BlobEvent: !1, + blur: !1, + BroadcastChannel: !1, + btoa: !1, + BudgetService: !1, + ByteLengthQueuingStrategy: !1, + Cache: !1, + caches: !1, + CacheStorage: !1, + cancelAnimationFrame: !1, + cancelIdleCallback: !1, + CanvasCaptureMediaStreamTrack: !1, + CanvasGradient: !1, + CanvasPattern: !1, + CanvasRenderingContext2D: !1, + ChannelMergerNode: !1, + ChannelSplitterNode: !1, + CharacterData: !1, + clearInterval: !1, + clearTimeout: !1, + clientInformation: !1, + ClipboardEvent: !1, + close: !1, + closed: !1, + CloseEvent: !1, + Comment: !1, + CompositionEvent: !1, + confirm: !1, + console: !1, + ConstantSourceNode: !1, + ConvolverNode: !1, + CountQueuingStrategy: !1, + createImageBitmap: !1, + Credential: !1, + CredentialsContainer: !1, + crypto: !1, + Crypto: !1, + CryptoKey: !1, + CSS: !1, + CSSConditionRule: !1, + CSSFontFaceRule: !1, + CSSGroupingRule: !1, + CSSImportRule: !1, + CSSKeyframeRule: !1, + CSSKeyframesRule: !1, + CSSMediaRule: !1, + CSSNamespaceRule: !1, + CSSPageRule: !1, + CSSRule: !1, + CSSRuleList: !1, + CSSStyleDeclaration: !1, + CSSStyleRule: !1, + CSSStyleSheet: !1, + CSSSupportsRule: !1, + CustomElementRegistry: !1, + customElements: !1, + CustomEvent: !1, + DataTransfer: !1, + DataTransferItem: !1, + DataTransferItemList: !1, + defaultstatus: !1, + defaultStatus: !1, + DelayNode: !1, + DeviceMotionEvent: !1, + DeviceOrientationEvent: !1, + devicePixelRatio: !1, + dispatchEvent: !1, + document: !1, + Document: !1, + DocumentFragment: !1, + DocumentType: !1, + DOMError: !1, + DOMException: !1, + DOMImplementation: !1, + DOMMatrix: !1, + DOMMatrixReadOnly: !1, + DOMParser: !1, + DOMPoint: !1, + DOMPointReadOnly: !1, + DOMQuad: !1, + DOMRect: !1, + DOMRectReadOnly: !1, + DOMStringList: !1, + DOMStringMap: !1, + DOMTokenList: !1, + DragEvent: !1, + DynamicsCompressorNode: !1, + Element: !1, + ErrorEvent: !1, + event: !1, + Event: !1, + EventSource: !1, + EventTarget: !1, + external: !1, + fetch: !1, + File: !1, + FileList: !1, + FileReader: !1, + find: !1, + focus: !1, + FocusEvent: !1, + FontFace: !1, + FontFaceSetLoadEvent: !1, + FormData: !1, + frameElement: !1, + frames: !1, + GainNode: !1, + Gamepad: !1, + GamepadButton: !1, + GamepadEvent: !1, + getComputedStyle: !1, + getSelection: !1, + HashChangeEvent: !1, + Headers: !1, + history: !1, + History: !1, + HTMLAllCollection: !1, + HTMLAnchorElement: !1, + HTMLAreaElement: !1, + HTMLAudioElement: !1, + HTMLBaseElement: !1, + HTMLBodyElement: !1, + HTMLBRElement: !1, + HTMLButtonElement: !1, + HTMLCanvasElement: !1, + HTMLCollection: !1, + HTMLContentElement: !1, + HTMLDataElement: !1, + HTMLDataListElement: !1, + HTMLDetailsElement: !1, + HTMLDialogElement: !1, + HTMLDirectoryElement: !1, + HTMLDivElement: !1, + HTMLDListElement: !1, + HTMLDocument: !1, + HTMLElement: !1, + HTMLEmbedElement: !1, + HTMLFieldSetElement: !1, + HTMLFontElement: !1, + HTMLFormControlsCollection: !1, + HTMLFormElement: !1, + HTMLFrameElement: !1, + HTMLFrameSetElement: !1, + HTMLHeadElement: !1, + HTMLHeadingElement: !1, + HTMLHRElement: !1, + HTMLHtmlElement: !1, + HTMLIFrameElement: !1, + HTMLImageElement: !1, + HTMLInputElement: !1, + HTMLLabelElement: !1, + HTMLLegendElement: !1, + HTMLLIElement: !1, + HTMLLinkElement: !1, + HTMLMapElement: !1, + HTMLMarqueeElement: !1, + HTMLMediaElement: !1, + HTMLMenuElement: !1, + HTMLMetaElement: !1, + HTMLMeterElement: !1, + HTMLModElement: !1, + HTMLObjectElement: !1, + HTMLOListElement: !1, + HTMLOptGroupElement: !1, + HTMLOptionElement: !1, + HTMLOptionsCollection: !1, + HTMLOutputElement: !1, + HTMLParagraphElement: !1, + HTMLParamElement: !1, + HTMLPictureElement: !1, + HTMLPreElement: !1, + HTMLProgressElement: !1, + HTMLQuoteElement: !1, + HTMLScriptElement: !1, + HTMLSelectElement: !1, + HTMLShadowElement: !1, + HTMLSlotElement: !1, + HTMLSourceElement: !1, + HTMLSpanElement: !1, + HTMLStyleElement: !1, + HTMLTableCaptionElement: !1, + HTMLTableCellElement: !1, + HTMLTableColElement: !1, + HTMLTableElement: !1, + HTMLTableRowElement: !1, + HTMLTableSectionElement: !1, + HTMLTemplateElement: !1, + HTMLTextAreaElement: !1, + HTMLTimeElement: !1, + HTMLTitleElement: !1, + HTMLTrackElement: !1, + HTMLUListElement: !1, + HTMLUnknownElement: !1, + HTMLVideoElement: !1, + IDBCursor: !1, + IDBCursorWithValue: !1, + IDBDatabase: !1, + IDBFactory: !1, + IDBIndex: !1, + IDBKeyRange: !1, + IDBObjectStore: !1, + IDBOpenDBRequest: !1, + IDBRequest: !1, + IDBTransaction: !1, + IDBVersionChangeEvent: !1, + IdleDeadline: !1, + IIRFilterNode: !1, + Image: !1, + ImageBitmap: !1, + ImageBitmapRenderingContext: !1, + ImageCapture: !1, + ImageData: !1, + indexedDB: !1, + innerHeight: !1, + innerWidth: !1, + InputEvent: !1, + IntersectionObserver: !1, + IntersectionObserverEntry: !1, + Intl: !1, + isSecureContext: !1, + KeyboardEvent: !1, + KeyframeEffect: !1, + KeyframeEffectReadOnly: !1, + length: !1, + localStorage: !1, + location: !0, + Location: !1, + locationbar: !1, + matchMedia: !1, + MediaDeviceInfo: !1, + MediaDevices: !1, + MediaElementAudioSourceNode: !1, + MediaEncryptedEvent: !1, + MediaError: !1, + MediaKeyMessageEvent: !1, + MediaKeySession: !1, + MediaKeyStatusMap: !1, + MediaKeySystemAccess: !1, + MediaList: !1, + MediaQueryList: !1, + MediaQueryListEvent: !1, + MediaRecorder: !1, + MediaSettingsRange: !1, + MediaSource: !1, + MediaStream: !1, + MediaStreamAudioDestinationNode: !1, + MediaStreamAudioSourceNode: !1, + MediaStreamEvent: !1, + MediaStreamTrack: !1, + MediaStreamTrackEvent: !1, + menubar: !1, + MessageChannel: !1, + MessageEvent: !1, + MessagePort: !1, + MIDIAccess: !1, + MIDIConnectionEvent: !1, + MIDIInput: !1, + MIDIInputMap: !1, + MIDIMessageEvent: !1, + MIDIOutput: !1, + MIDIOutputMap: !1, + MIDIPort: !1, + MimeType: !1, + MimeTypeArray: !1, + MouseEvent: !1, + moveBy: !1, + moveTo: !1, + MutationEvent: !1, + MutationObserver: !1, + MutationRecord: !1, + name: !1, + NamedNodeMap: !1, + NavigationPreloadManager: !1, + navigator: !1, + Navigator: !1, + NetworkInformation: !1, + Node: !1, + NodeFilter: !1, + NodeIterator: !1, + NodeList: !1, + Notification: !1, + OfflineAudioCompletionEvent: !1, + OfflineAudioContext: !1, + offscreenBuffering: !1, + OffscreenCanvas: !0, + onabort: !0, + onafterprint: !0, + onanimationend: !0, + onanimationiteration: !0, + onanimationstart: !0, + onappinstalled: !0, + onauxclick: !0, + onbeforeinstallprompt: !0, + onbeforeprint: !0, + onbeforeunload: !0, + onblur: !0, + oncancel: !0, + oncanplay: !0, + oncanplaythrough: !0, + onchange: !0, + onclick: !0, + onclose: !0, + oncontextmenu: !0, + oncuechange: !0, + ondblclick: !0, + ondevicemotion: !0, + ondeviceorientation: !0, + ondeviceorientationabsolute: !0, + ondrag: !0, + ondragend: !0, + ondragenter: !0, + ondragleave: !0, + ondragover: !0, + ondragstart: !0, + ondrop: !0, + ondurationchange: !0, + onemptied: !0, + onended: !0, + onerror: !0, + onfocus: !0, + ongotpointercapture: !0, + onhashchange: !0, + oninput: !0, + oninvalid: !0, + onkeydown: !0, + onkeypress: !0, + onkeyup: !0, + onlanguagechange: !0, + onload: !0, + onloadeddata: !0, + onloadedmetadata: !0, + onloadstart: !0, + onlostpointercapture: !0, + onmessage: !0, + onmessageerror: !0, + onmousedown: !0, + onmouseenter: !0, + onmouseleave: !0, + onmousemove: !0, + onmouseout: !0, + onmouseover: !0, + onmouseup: !0, + onmousewheel: !0, + onoffline: !0, + ononline: !0, + onpagehide: !0, + onpageshow: !0, + onpause: !0, + onplay: !0, + onplaying: !0, + onpointercancel: !0, + onpointerdown: !0, + onpointerenter: !0, + onpointerleave: !0, + onpointermove: !0, + onpointerout: !0, + onpointerover: !0, + onpointerup: !0, + onpopstate: !0, + onprogress: !0, + onratechange: !0, + onrejectionhandled: !0, + onreset: !0, + onresize: !0, + onscroll: !0, + onsearch: !0, + onseeked: !0, + onseeking: !0, + onselect: !0, + onstalled: !0, + onstorage: !0, + onsubmit: !0, + onsuspend: !0, + ontimeupdate: !0, + ontoggle: !0, + ontransitionend: !0, + onunhandledrejection: !0, + onunload: !0, + onvolumechange: !0, + onwaiting: !0, + onwheel: !0, + open: !1, + openDatabase: !1, + opener: !1, + Option: !1, + origin: !1, + OscillatorNode: !1, + outerHeight: !1, + outerWidth: !1, + PageTransitionEvent: !1, + pageXOffset: !1, + pageYOffset: !1, + PannerNode: !1, + parent: !1, + Path2D: !1, + PaymentAddress: !1, + PaymentRequest: !1, + PaymentRequestUpdateEvent: !1, + PaymentResponse: !1, + performance: !1, + Performance: !1, + PerformanceEntry: !1, + PerformanceLongTaskTiming: !1, + PerformanceMark: !1, + PerformanceMeasure: !1, + PerformanceNavigation: !1, + PerformanceNavigationTiming: !1, + PerformanceObserver: !1, + PerformanceObserverEntryList: !1, + PerformancePaintTiming: !1, + PerformanceResourceTiming: !1, + PerformanceTiming: !1, + PeriodicWave: !1, + Permissions: !1, + PermissionStatus: !1, + personalbar: !1, + PhotoCapabilities: !1, + Plugin: !1, + PluginArray: !1, + PointerEvent: !1, + PopStateEvent: !1, + postMessage: !1, + Presentation: !1, + PresentationAvailability: !1, + PresentationConnection: !1, + PresentationConnectionAvailableEvent: !1, + PresentationConnectionCloseEvent: !1, + PresentationConnectionList: !1, + PresentationReceiver: !1, + PresentationRequest: !1, + print: !1, + ProcessingInstruction: !1, + ProgressEvent: !1, + PromiseRejectionEvent: !1, + prompt: !1, + PushManager: !1, + PushSubscription: !1, + PushSubscriptionOptions: !1, + queueMicrotask: !1, + RadioNodeList: !1, + Range: !1, + ReadableStream: !1, + registerProcessor: !1, + RemotePlayback: !1, + removeEventListener: !1, + Request: !1, + requestAnimationFrame: !1, + requestIdleCallback: !1, + resizeBy: !1, + ResizeObserver: !1, + ResizeObserverEntry: !1, + resizeTo: !1, + Response: !1, + RTCCertificate: !1, + RTCDataChannel: !1, + RTCDataChannelEvent: !1, + RTCDtlsTransport: !1, + RTCIceCandidate: !1, + RTCIceGatherer: !1, + RTCIceTransport: !1, + RTCPeerConnection: !1, + RTCPeerConnectionIceEvent: !1, + RTCRtpContributingSource: !1, + RTCRtpReceiver: !1, + RTCRtpSender: !1, + RTCSctpTransport: !1, + RTCSessionDescription: !1, + RTCStatsReport: !1, + RTCTrackEvent: !1, + screen: !1, + Screen: !1, + screenLeft: !1, + ScreenOrientation: !1, + screenTop: !1, + screenX: !1, + screenY: !1, + ScriptProcessorNode: !1, + scroll: !1, + scrollbars: !1, + scrollBy: !1, + scrollTo: !1, + scrollX: !1, + scrollY: !1, + SecurityPolicyViolationEvent: !1, + Selection: !1, + self: !1, + ServiceWorker: !1, + ServiceWorkerContainer: !1, + ServiceWorkerRegistration: !1, + sessionStorage: !1, + setInterval: !1, + setTimeout: !1, + ShadowRoot: !1, + SharedWorker: !1, + SourceBuffer: !1, + SourceBufferList: !1, + speechSynthesis: !1, + SpeechSynthesisEvent: !1, + SpeechSynthesisUtterance: !1, + StaticRange: !1, + status: !1, + statusbar: !1, + StereoPannerNode: !1, + stop: !1, + Storage: !1, + StorageEvent: !1, + StorageManager: !1, + styleMedia: !1, + StyleSheet: !1, + StyleSheetList: !1, + SubtleCrypto: !1, + SVGAElement: !1, + SVGAngle: !1, + SVGAnimatedAngle: !1, + SVGAnimatedBoolean: !1, + SVGAnimatedEnumeration: !1, + SVGAnimatedInteger: !1, + SVGAnimatedLength: !1, + SVGAnimatedLengthList: !1, + SVGAnimatedNumber: !1, + SVGAnimatedNumberList: !1, + SVGAnimatedPreserveAspectRatio: !1, + SVGAnimatedRect: !1, + SVGAnimatedString: !1, + SVGAnimatedTransformList: !1, + SVGAnimateElement: !1, + SVGAnimateMotionElement: !1, + SVGAnimateTransformElement: !1, + SVGAnimationElement: !1, + SVGCircleElement: !1, + SVGClipPathElement: !1, + SVGComponentTransferFunctionElement: !1, + SVGDefsElement: !1, + SVGDescElement: !1, + SVGDiscardElement: !1, + SVGElement: !1, + SVGEllipseElement: !1, + SVGFEBlendElement: !1, + SVGFEColorMatrixElement: !1, + SVGFEComponentTransferElement: !1, + SVGFECompositeElement: !1, + SVGFEConvolveMatrixElement: !1, + SVGFEDiffuseLightingElement: !1, + SVGFEDisplacementMapElement: !1, + SVGFEDistantLightElement: !1, + SVGFEDropShadowElement: !1, + SVGFEFloodElement: !1, + SVGFEFuncAElement: !1, + SVGFEFuncBElement: !1, + SVGFEFuncGElement: !1, + SVGFEFuncRElement: !1, + SVGFEGaussianBlurElement: !1, + SVGFEImageElement: !1, + SVGFEMergeElement: !1, + SVGFEMergeNodeElement: !1, + SVGFEMorphologyElement: !1, + SVGFEOffsetElement: !1, + SVGFEPointLightElement: !1, + SVGFESpecularLightingElement: !1, + SVGFESpotLightElement: !1, + SVGFETileElement: !1, + SVGFETurbulenceElement: !1, + SVGFilterElement: !1, + SVGForeignObjectElement: !1, + SVGGElement: !1, + SVGGeometryElement: !1, + SVGGradientElement: !1, + SVGGraphicsElement: !1, + SVGImageElement: !1, + SVGLength: !1, + SVGLengthList: !1, + SVGLinearGradientElement: !1, + SVGLineElement: !1, + SVGMarkerElement: !1, + SVGMaskElement: !1, + SVGMatrix: !1, + SVGMetadataElement: !1, + SVGMPathElement: !1, + SVGNumber: !1, + SVGNumberList: !1, + SVGPathElement: !1, + SVGPatternElement: !1, + SVGPoint: !1, + SVGPointList: !1, + SVGPolygonElement: !1, + SVGPolylineElement: !1, + SVGPreserveAspectRatio: !1, + SVGRadialGradientElement: !1, + SVGRect: !1, + SVGRectElement: !1, + SVGScriptElement: !1, + SVGSetElement: !1, + SVGStopElement: !1, + SVGStringList: !1, + SVGStyleElement: !1, + SVGSVGElement: !1, + SVGSwitchElement: !1, + SVGSymbolElement: !1, + SVGTextContentElement: !1, + SVGTextElement: !1, + SVGTextPathElement: !1, + SVGTextPositioningElement: !1, + SVGTitleElement: !1, + SVGTransform: !1, + SVGTransformList: !1, + SVGTSpanElement: !1, + SVGUnitTypes: !1, + SVGUseElement: !1, + SVGViewElement: !1, + TaskAttributionTiming: !1, + Text: !1, + TextDecoder: !1, + TextEncoder: !1, + TextEvent: !1, + TextMetrics: !1, + TextTrack: !1, + TextTrackCue: !1, + TextTrackCueList: !1, + TextTrackList: !1, + TimeRanges: !1, + toolbar: !1, + top: !1, + Touch: !1, + TouchEvent: !1, + TouchList: !1, + TrackEvent: !1, + TransitionEvent: !1, + TreeWalker: !1, + UIEvent: !1, + URL: !1, + URLSearchParams: !1, + ValidityState: !1, + visualViewport: !1, + VisualViewport: !1, + VTTCue: !1, + WaveShaperNode: !1, + WebAssembly: !1, + WebGL2RenderingContext: !1, + WebGLActiveInfo: !1, + WebGLBuffer: !1, + WebGLContextEvent: !1, + WebGLFramebuffer: !1, + WebGLProgram: !1, + WebGLQuery: !1, + WebGLRenderbuffer: !1, + WebGLRenderingContext: !1, + WebGLSampler: !1, + WebGLShader: !1, + WebGLShaderPrecisionFormat: !1, + WebGLSync: !1, + WebGLTexture: !1, + WebGLTransformFeedback: !1, + WebGLUniformLocation: !1, + WebGLVertexArrayObject: !1, + WebSocket: !1, + WheelEvent: !1, + window: !1, + Window: !1, + Worker: !1, + WritableStream: !1, + XMLDocument: !1, + XMLHttpRequest: !1, + XMLHttpRequestEventTarget: !1, + XMLHttpRequestUpload: !1, + XMLSerializer: !1, + XPathEvaluator: !1, + XPathExpression: !1, + XPathResult: !1, + XSLTProcessor: !1 + }, + worker: { + addEventListener: !1, + applicationCache: !1, + atob: !1, + Blob: !1, + BroadcastChannel: !1, + btoa: !1, + Cache: !1, + caches: !1, + clearInterval: !1, + clearTimeout: !1, + close: !0, + console: !1, + fetch: !1, + FileReaderSync: !1, + FormData: !1, + Headers: !1, + IDBCursor: !1, + IDBCursorWithValue: !1, + IDBDatabase: !1, + IDBFactory: !1, + IDBIndex: !1, + IDBKeyRange: !1, + IDBObjectStore: !1, + IDBOpenDBRequest: !1, + IDBRequest: !1, + IDBTransaction: !1, + IDBVersionChangeEvent: !1, + ImageData: !1, + importScripts: !0, + indexedDB: !1, + location: !1, + MessageChannel: !1, + MessagePort: !1, + name: !1, + navigator: !1, + Notification: !1, + onclose: !0, + onconnect: !0, + onerror: !0, + onlanguagechange: !0, + onmessage: !0, + onoffline: !0, + ononline: !0, + onrejectionhandled: !0, + onunhandledrejection: !0, + performance: !1, + Performance: !1, + PerformanceEntry: !1, + PerformanceMark: !1, + PerformanceMeasure: !1, + PerformanceNavigation: !1, + PerformanceResourceTiming: !1, + PerformanceTiming: !1, + postMessage: !0, + Promise: !1, + queueMicrotask: !1, + removeEventListener: !1, + Request: !1, + Response: !1, + self: !0, + ServiceWorkerRegistration: !1, + setInterval: !1, + setTimeout: !1, + TextDecoder: !1, + TextEncoder: !1, + URL: !1, + URLSearchParams: !1, + WebSocket: !1, + Worker: !1, + WorkerGlobalScope: !1, + XMLHttpRequest: !1 + }, + node: { + __dirname: !1, + __filename: !1, + Buffer: !1, + clearImmediate: !1, + clearInterval: !1, + clearTimeout: !1, + console: !1, + exports: !0, + global: !1, + Intl: !1, + module: !1, + process: !1, + queueMicrotask: !1, + require: !1, + setImmediate: !1, + setInterval: !1, + setTimeout: !1, + TextDecoder: !1, + TextEncoder: !1, + URL: !1, + URLSearchParams: !1 + }, + commonjs: { + exports: !0, + global: !1, + module: !1, + require: !1 + }, + amd: { + define: !1, + require: !1 + }, + mocha: { + after: !1, + afterEach: !1, + before: !1, + beforeEach: !1, + context: !1, + describe: !1, + it: !1, + mocha: !1, + run: !1, + setup: !1, + specify: !1, + suite: !1, + suiteSetup: !1, + suiteTeardown: !1, + teardown: !1, + test: !1, + xcontext: !1, + xdescribe: !1, + xit: !1, + xspecify: !1 + }, + jasmine: { + afterAll: !1, + afterEach: !1, + beforeAll: !1, + beforeEach: !1, + describe: !1, + expect: !1, + fail: !1, + fdescribe: !1, + fit: !1, + it: !1, + jasmine: !1, + pending: !1, + runs: !1, + spyOn: !1, + spyOnProperty: !1, + waits: !1, + waitsFor: !1, + xdescribe: !1, + xit: !1 + }, + jest: { + afterAll: !1, + afterEach: !1, + beforeAll: !1, + beforeEach: !1, + describe: !1, + expect: !1, + fdescribe: !1, + fit: !1, + it: !1, + jest: !1, + pit: !1, + require: !1, + test: !1, + xdescribe: !1, + xit: !1, + xtest: !1 + }, + qunit: { + asyncTest: !1, + deepEqual: !1, + equal: !1, + expect: !1, + module: !1, + notDeepEqual: !1, + notEqual: !1, + notOk: !1, + notPropEqual: !1, + notStrictEqual: !1, + ok: !1, + propEqual: !1, + QUnit: !1, + raises: !1, + start: !1, + stop: !1, + strictEqual: !1, + test: !1, + throws: !1 + }, + phantomjs: { + console: !0, + exports: !0, + phantom: !0, + require: !0, + WebPage: !0 + }, + couch: { + emit: !1, + exports: !1, + getRow: !1, + log: !1, + module: !1, + provides: !1, + require: !1, + respond: !1, + send: !1, + start: !1, + sum: !1 + }, + rhino: { + defineClass: !1, + deserialize: !1, + gc: !1, + help: !1, + importClass: !1, + importPackage: !1, + java: !1, + load: !1, + loadClass: !1, + Packages: !1, + print: !1, + quit: !1, + readFile: !1, + readUrl: !1, + runCommand: !1, + seal: !1, + serialize: !1, + spawn: !1, + sync: !1, + toint32: !1, + version: !1 + }, + nashorn: { + __DIR__: !1, + __FILE__: !1, + __LINE__: !1, + com: !1, + edu: !1, + exit: !1, + java: !1, + Java: !1, + javafx: !1, + JavaImporter: !1, + javax: !1, + JSAdapter: !1, + load: !1, + loadWithNewGlobal: !1, + org: !1, + Packages: !1, + print: !1, + quit: !1 + }, + wsh: { + ActiveXObject: !0, + Enumerator: !0, + GetObject: !0, + ScriptEngine: !0, + ScriptEngineBuildVersion: !0, + ScriptEngineMajorVersion: !0, + ScriptEngineMinorVersion: !0, + VBArray: !0, + WScript: !0, + WSH: !0, + XDomainRequest: !0 + }, + jquery: { + $: !1, + jQuery: !1 + }, + yui: { + YAHOO: !1, + YAHOO_config: !1, + YUI: !1, + YUI_config: !1 + }, + shelljs: { + cat: !1, + cd: !1, + chmod: !1, + config: !1, + cp: !1, + dirs: !1, + echo: !1, + env: !1, + error: !1, + exec: !1, + exit: !1, + find: !1, + grep: !1, + ln: !1, + ls: !1, + mkdir: !1, + mv: !1, + popd: !1, + pushd: !1, + pwd: !1, + rm: !1, + sed: !1, + set: !1, + target: !1, + tempdir: !1, + test: !1, + touch: !1, + which: !1 + }, + prototypejs: { + $: !1, + $$: !1, + $A: !1, + $break: !1, + $continue: !1, + $F: !1, + $H: !1, + $R: !1, + $w: !1, + Abstract: !1, + Ajax: !1, + Autocompleter: !1, + Builder: !1, + Class: !1, + Control: !1, + Draggable: !1, + Draggables: !1, + Droppables: !1, + Effect: !1, + Element: !1, + Enumerable: !1, + Event: !1, + Field: !1, + Form: !1, + Hash: !1, + Insertion: !1, + ObjectRange: !1, + PeriodicalExecuter: !1, + Position: !1, + Prototype: !1, + Scriptaculous: !1, + Selector: !1, + Sortable: !1, + SortableObserver: !1, + Sound: !1, + Template: !1, + Toggle: !1, + Try: !1 + }, + meteor: { + _: !1, + $: !1, + Accounts: !1, + AccountsClient: !1, + AccountsCommon: !1, + AccountsServer: !1, + App: !1, + Assets: !1, + Blaze: !1, + check: !1, + Cordova: !1, + DDP: !1, + DDPRateLimiter: !1, + DDPServer: !1, + Deps: !1, + EJSON: !1, + Email: !1, + HTTP: !1, + Log: !1, + Match: !1, + Meteor: !1, + Mongo: !1, + MongoInternals: !1, + Npm: !1, + Package: !1, + Plugin: !1, + process: !1, + Random: !1, + ReactiveDict: !1, + ReactiveVar: !1, + Router: !1, + ServiceConfiguration: !1, + Session: !1, + share: !1, + Spacebars: !1, + Template: !1, + Tinytest: !1, + Tracker: !1, + UI: !1, + Utils: !1, + WebApp: !1, + WebAppInternals: !1 + }, + mongo: { + _isWindows: !1, + _rand: !1, + BulkWriteResult: !1, + cat: !1, + cd: !1, + connect: !1, + db: !1, + getHostName: !1, + getMemInfo: !1, + hostname: !1, + ISODate: !1, + listFiles: !1, + load: !1, + ls: !1, + md5sumFile: !1, + mkdir: !1, + Mongo: !1, + NumberInt: !1, + NumberLong: !1, + ObjectId: !1, + PlanCache: !1, + print: !1, + printjson: !1, + pwd: !1, + quit: !1, + removeFile: !1, + rs: !1, + sh: !1, + UUID: !1, + version: !1, + WriteResult: !1 + }, + applescript: { + $: !1, + Application: !1, + Automation: !1, + console: !1, + delay: !1, + Library: !1, + ObjC: !1, + ObjectSpecifier: !1, + Path: !1, + Progress: !1, + Ref: !1 + }, + serviceworker: { + addEventListener: !1, + applicationCache: !1, + atob: !1, + Blob: !1, + BroadcastChannel: !1, + btoa: !1, + Cache: !1, + caches: !1, + CacheStorage: !1, + clearInterval: !1, + clearTimeout: !1, + Client: !1, + clients: !1, + Clients: !1, + close: !0, + console: !1, + ExtendableEvent: !1, + ExtendableMessageEvent: !1, + fetch: !1, + FetchEvent: !1, + FileReaderSync: !1, + FormData: !1, + Headers: !1, + IDBCursor: !1, + IDBCursorWithValue: !1, + IDBDatabase: !1, + IDBFactory: !1, + IDBIndex: !1, + IDBKeyRange: !1, + IDBObjectStore: !1, + IDBOpenDBRequest: !1, + IDBRequest: !1, + IDBTransaction: !1, + IDBVersionChangeEvent: !1, + ImageData: !1, + importScripts: !1, + indexedDB: !1, + location: !1, + MessageChannel: !1, + MessagePort: !1, + name: !1, + navigator: !1, + Notification: !1, + onclose: !0, + onconnect: !0, + onerror: !0, + onfetch: !0, + oninstall: !0, + onlanguagechange: !0, + onmessage: !0, + onmessageerror: !0, + onnotificationclick: !0, + onnotificationclose: !0, + onoffline: !0, + ononline: !0, + onpush: !0, + onpushsubscriptionchange: !0, + onrejectionhandled: !0, + onsync: !0, + onunhandledrejection: !0, + performance: !1, + Performance: !1, + PerformanceEntry: !1, + PerformanceMark: !1, + PerformanceMeasure: !1, + PerformanceNavigation: !1, + PerformanceResourceTiming: !1, + PerformanceTiming: !1, + postMessage: !0, + Promise: !1, + queueMicrotask: !1, + registration: !1, + removeEventListener: !1, + Request: !1, + Response: !1, + self: !1, + ServiceWorker: !1, + ServiceWorkerContainer: !1, + ServiceWorkerGlobalScope: !1, + ServiceWorkerMessageEvent: !1, + ServiceWorkerRegistration: !1, + setInterval: !1, + setTimeout: !1, + skipWaiting: !1, + TextDecoder: !1, + TextEncoder: !1, + URL: !1, + URLSearchParams: !1, + WebSocket: !1, + WindowClient: !1, + Worker: !1, + WorkerGlobalScope: !1, + XMLHttpRequest: !1 + }, + atomtest: { + advanceClock: !1, + fakeClearInterval: !1, + fakeClearTimeout: !1, + fakeSetInterval: !1, + fakeSetTimeout: !1, + resetTimeouts: !1, + waitsForPromise: !1 + }, + embertest: { + andThen: !1, + click: !1, + currentPath: !1, + currentRouteName: !1, + currentURL: !1, + fillIn: !1, + find: !1, + findAll: !1, + findWithAssert: !1, + keyEvent: !1, + pauseTest: !1, + resumeTest: !1, + triggerEvent: !1, + visit: !1, + wait: !1 + }, + protractor: { + $: !1, + $$: !1, + browser: !1, + by: !1, + By: !1, + DartObject: !1, + element: !1, + protractor: !1 + }, + "shared-node-browser": { + clearInterval: !1, + clearTimeout: !1, + console: !1, + setInterval: !1, + setTimeout: !1, + URL: !1, + URLSearchParams: !1 + }, + webextensions: { + browser: !1, + chrome: !1, + opr: !1 + }, + greasemonkey: { + cloneInto: !1, + createObjectIn: !1, + exportFunction: !1, + GM: !1, + GM_addStyle: !1, + GM_deleteValue: !1, + GM_getResourceText: !1, + GM_getResourceURL: !1, + GM_getValue: !1, + GM_info: !1, + GM_listValues: !1, + GM_log: !1, + GM_openInTab: !1, + GM_registerMenuCommand: !1, + GM_setClipboard: !1, + GM_setValue: !1, + GM_xmlhttpRequest: !1, + unsafeWindow: !1 + }, + devtools: { + $: !1, + $_: !1, + $$: !1, + $0: !1, + $1: !1, + $2: !1, + $3: !1, + $4: !1, + $x: !1, + chrome: !1, + clear: !1, + copy: !1, + debug: !1, + dir: !1, + dirxml: !1, + getEventListeners: !1, + inspect: !1, + keys: !1, + monitor: !1, + monitorEvents: !1, + profile: !1, + profileEnd: !1, + queryObjects: !1, + table: !1, + undebug: !1, + unmonitor: !1, + unmonitorEvents: !1, + values: !1 + } + }; + }, {} ], + 155: [ function(e, t, n) { + "use strict"; + t.exports = e("./globals.json"); + }, { + "./globals.json": 154 + } ], + 156: [ function(e, t, n) { + t.exports = function(e) { + return null != e && (r(e) || function(e) { + return "function" == typeof e.readFloatLE && "function" == typeof e.slice && r(e.slice(0, 0)); + }(e) || !!e._isBuffer); + }; + function r(e) { + return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e); + } + }, {} ], + 157: [ function(e, t, n) { + Object.defineProperty(n, "__esModule", { + value: !0 + }); + n.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + n.matchToToken = function(e) { + var t = { + type: "invalid", + value: e[0], + closed: void 0 + }; + e[1] ? (t.type = "string", t.closed = !(!e[3] && !e[4])) : e[5] ? t.type = "comment" : e[6] ? (t.type = "comment", + t.closed = !!e[7]) : e[8] ? t.type = "regex" : e[9] ? t.type = "number" : e[10] ? t.type = "name" : e[11] ? t.type = "punctuator" : e[12] && (t.type = "whitespace"); + return t; + }; + }, {} ], + 158: [ function(e, t, n) { + (function(e) { + (function() { + "use strict"; + const n = {}; + const r = n.hasOwnProperty; + const i = (e, t) => { + for (const n in e) r.call(e, n) && t(n, e[n]); + }; + const s = n.toString; + const a = Array.isArray; + const o = e.isBuffer; + const l = { + '"': '\\"', + "'": "\\'", + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + "\t": "\\t" + }; + const c = /["'\\\b\f\n\r\t]/; + const p = /[0-9]/; + const u = /[ !#-&\(-\[\]-_a-~]/; + const d = (e, t) => { + const n = () => { + T = g; + ++t.indentLevel; + g = t.indent.repeat(t.indentLevel); + }; + const r = { + escapeEverything: !1, + minimal: !1, + isScriptContext: !1, + quotes: "single", + wrap: !1, + es6: !1, + json: !1, + compact: !0, + lowercaseHex: !1, + numbers: "decimal", + indent: "\t", + indentLevel: 0, + __inline1__: !1, + __inline2__: !1 + }; + const h = t && t.json; + if (h) { + r.quotes = "double"; + r.wrap = !0; + } + "single" != (t = ((e, t) => { + if (!t) return e; + i(t, (t, n) => { + e[t] = n; + }); + return e; + })(r, t)).quotes && "double" != t.quotes && "backtick" != t.quotes && (t.quotes = "single"); + const f = "double" == t.quotes ? '"' : "backtick" == t.quotes ? "`" : "'"; + const m = t.compact; + const y = t.lowercaseHex; + let g = t.indent.repeat(t.indentLevel); + let T = ""; + const b = t.__inline1__; + const S = t.__inline2__; + const x = m ? "" : "\n"; + let E; + let P = !0; + const v = "binary" == t.numbers; + const A = "octal" == t.numbers; + const w = "decimal" == t.numbers; + const C = "hexadecimal" == t.numbers; + h && e && (e => "function" == typeof e)(e.toJSON) && (e = e.toJSON()); + if (!(e => "string" == typeof e || "[object String]" == s.call(e))(e)) { + if ((e => "[object Map]" == s.call(e))(e)) { + if (0 == e.size) return "new Map()"; + if (!m) { + t.__inline1__ = !0; + t.__inline2__ = !1; + } + return "new Map(" + d(Array.from(e), t) + ")"; + } + if ((e => "[object Set]" == s.call(e))(e)) return 0 == e.size ? "new Set()" : "new Set(" + d(Array.from(e), t) + ")"; + if (o(e)) return 0 == e.length ? "Buffer.from([])" : "Buffer.from(" + d(Array.from(e), t) + ")"; + if (a(e)) { + E = []; + t.wrap = !0; + if (b) { + t.__inline1__ = !1; + t.__inline2__ = !0; + } + S || n(); + ((e, t) => { + const n = e.length; + let r = -1; + for (;++r < n; ) t(e[r]); + })(e, e => { + P = !1; + S && (t.__inline2__ = !1); + E.push((m || S ? "" : g) + d(e, t)); + }); + return P ? "[]" : S ? "[" + E.join(", ") + "]" : "[" + x + E.join("," + x) + x + (m ? "" : T) + "]"; + } + if (!(e => "number" == typeof e || "[object Number]" == s.call(e))(e)) { + if ((e => "[object Object]" == s.call(e))(e)) { + E = []; + t.wrap = !0; + n(); + i(e, (e, n) => { + P = !1; + E.push((m ? "" : g) + d(e, t) + ":" + (m ? "" : " ") + d(n, t)); + }); + return P ? "{}" : "{" + x + E.join("," + x) + x + (m ? "" : T) + "}"; + } + return h ? JSON.stringify(e) || "null" : String(e); + } + if (h) return JSON.stringify(e); + if (w) return String(e); + if (C) { + let t = e.toString(16); + y || (t = t.toUpperCase()); + return "0x" + t; + } + if (v) return "0b" + e.toString(2); + if (A) return "0o" + e.toString(8); + } + const I = e; + let O = -1; + const N = I.length; + E = ""; + for (;++O < N; ) { + const e = I.charAt(O); + if (t.es6) { + const e = I.charCodeAt(O); + if (e >= 55296 && e <= 56319 && N > O + 1) { + const t = I.charCodeAt(O + 1); + if (t >= 56320 && t <= 57343) { + let n = (1024 * (e - 55296) + t - 56320 + 65536).toString(16); + y || (n = n.toUpperCase()); + E += "\\u{" + n + "}"; + ++O; + continue; + } + } + } + if (!t.escapeEverything) { + if (u.test(e)) { + E += e; + continue; + } + if ('"' == e) { + E += f == e ? '\\"' : e; + continue; + } + if ("`" == e) { + E += f == e ? "\\`" : e; + continue; + } + if ("'" == e) { + E += f == e ? "\\'" : e; + continue; + } + } + if ("\0" == e && !h && !p.test(I.charAt(O + 1))) { + E += "\\0"; + continue; + } + if (c.test(e)) { + E += l[e]; + continue; + } + const n = e.charCodeAt(0); + if (t.minimal && 8232 != n && 8233 != n) { + E += e; + continue; + } + let r = n.toString(16); + y || (r = r.toUpperCase()); + const i = r.length > 2 || h; + const s = "\\" + (i ? "u" : "x") + ("0000" + r).slice(i ? -4 : -2); + E += s; + } + t.wrap && (E = f + E + f); + "`" == f && (E = E.replace(/\$\{/g, "\\${")); + return t.isScriptContext ? E.replace(/<\/(script|style)/gi, "<\\/$1").replace(/