PageSourceSearch

https://pfotendoctor.de/_next/static/chunks/4b2151da-be3074627c109ada.js

js pfotendoctor.de collected 2026-09-24 12:59:05 UTC 264,390 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5268],{2133:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const s=!0,i=!0,r=!0,a=!0,n=!0;class o{constructor(t,e={}){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.updateContext=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=null!=e.binop?e.binop:null,this.updateContext=null}}const h=new Map;function p(t,e={}){e.keyword=t;const s=new o(t,e);return h.set(t,s),s}function c(t,e){return new o(t,{beforeExpr:s,binop:e})}const l={num:new o("num",{startsExpr:i}),bigint:new o("bigint",{startsExpr:i}),decimal:new o("decimal",{startsExpr:i}),regexp:new o("regexp",{startsExpr:i}),string:new o("string",{startsExpr:i}),name:new o("name",{startsExpr:i}),privateName:new o("#name",{startsExpr:i}),eof:new o("eof"),bracketL:new o("[",{beforeExpr:s,startsExpr:i}),bracketHashL:new o("#[",{beforeExpr:s,startsExpr:i}),bracketBarL:new o("[|",{beforeExpr:s,startsExpr:i}),bracketR:new o("]"),bracketBarR:new o("|]"),braceL:new o("{",{beforeExpr:s,startsExpr:i}),braceBarL:new o("{|",{beforeExpr:s,startsExpr:i}),braceHashL:new o("#{",{beforeExpr:s,startsExpr:i}),braceR:new o("}",{beforeExpr:s}),braceBarR:new o("|}"),parenL:new o("(",{beforeExpr:s,startsExpr:i}),parenR:new o(")"),comma:new o(",",{beforeExpr:s}),semi:new o(";",{beforeExpr:s}),colon:new o(":",{beforeExpr:s}),doubleColon:new o("::",{beforeExpr:s}),dot:new o("."),question:new o("?",{beforeExpr:s}),questionDot:new o("?."),arrow:new o("=>",{beforeExpr:s}),template:new o("template"),ellipsis:new o("...",{beforeExpr:s}),backQuote:new o("`",{startsExpr:i}),dollarBraceL:new o("${",{beforeExpr:s,startsExpr:i}),at:new o("@"),hash:new o("#",{startsExpr:i}),interpreterDirective:new o("#!..."),eq:new o("=",{beforeExpr:s,isAssign:a}),assign:new o("_=",{beforeExpr:s,isAssign:a}),slashAssign:new o("_=",{beforeExpr:s,isAssign:a}),moduloAssign:new o("_=",{beforeExpr:s,isAssign:a}),incDec:new o("++/--",{prefix:n,postfix:!0,startsExpr:i}),bang:new o("!",{beforeExpr:s,prefix:n,startsExpr:i}),tilde:new o("~",{beforeExpr:s,prefix:n,startsExpr:i}),pipeline:c("|>",0),nullishCoalescing:c("??",1),logicalOR:c("||",1),logicalAND:c("&&",2),bitwiseOR:c("|",3),bitwiseXOR:c("^",4),bitwiseAND:c("&",5),equality:c("==/!=/===/!==",6),relational:c("</>/<=/>=",7),bitShift:c("<</>>/>>>",8),plusMin:new o("+/-",{beforeExpr:s,binop:9,prefix:n,startsExpr:i}),modulo:new o("%",{binop:10,startsExpr:i}),star:new o("*",{binop:10}),slash:c("/",10),exponent:new o("**",{beforeExpr:s,binop:11,rightAssociative:!0}),_break:p("break"),_case:p("case",{beforeExpr:s}),_catch:p("catch"),_continue:p("continue"),_debugger:p("debugger"),_default:p("default",{beforeExpr:s}),_do:p("do",{isLoop:r,beforeExpr:s}),_else:p("else",{beforeExpr:s}),_finally:p("finally"),_for:p("for",{isLoop:r}),_function:p("function",{startsExpr:i}),_if:p("if"),_return:p("return",{beforeExpr:s}),_switch:p("switch"),_throw:p("throw",{beforeExpr:s,prefix:n,startsExpr:i}
1),_try:p("try"),_var:p("var"),_const:p("const"),_while:p("while",{isLoop:r}),_with:p("with"),_new:p("new",{beforeExpr:s,startsExpr:i}),_this:p("this",{startsExpr:i}),_super:p("super",{startsExpr:i}),_class:p("class",{startsExpr:i}),_extends:p("extends",{beforeExpr:s}),_export:p("export"),_import:p("import",{startsExpr:i}),_null:p("null",{startsExpr:i}),_true:p("true",{startsExpr:i}),_false:p("false",{startsExpr:i}),_in:p("in",{beforeExpr:s,binop:7}),_instanceof:p("instanceof",{beforeExpr:s,binop:7}),_typeof:p("typeof",{beforeExpr:s,prefix:n,startsExpr:i}),_void:p("void",{beforeExpr:s,prefix:n,startsExpr:i}),_delete:p("delete",{beforeExpr:s,prefix:n,startsExpr:i})},u=/\r\n?|[\n\u2028\u2029]/,d=new RegExp(u.source,"g");function m(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const f=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function y(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}class x{constructor(t,e){this.line=void 0,this.column=void 0,this.line=t,this.column=e}}class P{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function b(t,e){void 0===t.trailingComments?t.trailingComments=e:t.trailingComments.unshift(...e)}function g(t,e){void 0===t.innerComments?t.innerComments=e:void 0!==e&&t.innerComments.unshift(...e)}function T(t,e,s){let i=null,r=e.length;for(;null===i&&r>0;)i=e[--r];null===i||i.start>s.start?g(t,s.comments):b(i,s.comments)}const A=Object.freeze({SyntaxError:"BABEL_PARSER_SYNTAX_ERROR",SourceTypeModuleError:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),w=S({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 str
1ing 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.",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'.",RecordExpressionH
1ashIncorrectStartSyntaxType:"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."},A.SyntaxError),E=S({ImportMetaOutsideModule:"import.meta may appear only with 'sourceType: \"module\"'",ImportOutsideModule:"'import' and 'export' may appear only with 'sourceType: \"module\"'"},A.SourceTypeModuleError);function S(t,e){const s={};return Object.keys(t).forEach((i=>{s[i]=Object.freeze({code:e,reasonCode:i,template:t[i]})})),Object.freeze(s)}class N{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const C={brace:new N("{"),template:new N("`",!0)};l.braceR.updateContext=t=>{t.pop()},l.braceL.updateContext=l.braceHashL.updateContext=l.dollarBraceL.updateContext=t=>{t.push(C.brace)},l.backQuote.updateContext=t=>{t[t.length-1]===C.template?t.pop():t.push(C.template)};
1let k="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",I="\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0
1a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";const v=new RegExp("["+k+"]"),L=new RegExp("["+k+I+"]");k=I=null;const M=[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,157,310,10,21,11,7,153,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,107,20,28,22,13,52,76,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,230,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,35,56,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,2749,1070,4050,582,8634,568,8,30,114,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,8952,286,50,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],D=[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,176,2,54,14,32,9,16,3,46,10,54,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,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,419,13,1495,6,110,6,6,9,4759,9,787719,239];function R(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function O(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&v.test(String.fromCharCode(t)):R(t,M)))}function F(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&L.test(String.fromCharCode(t)):R(t,M)||R(t,D))))}const B=["implements","interface","let","package","private","protected","public","static","yield"],_=["eval","arguments"],j=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"]),U=new Set(B),q=new Set(_);function H(t,e){return e&&"await"===t||"enum"===t}function z(t,e){return H(t,e)||U.has(t)}function V(t){return q.has(t)}function K(t,e){return z(t,e)||V(t)}function W(t){return j.has(t)}const J=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 X=64,G=256,Q=259,Y=128,$=1024,Z=2048;class tt{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}}class et{constructor(t,e){this.scopeStack=[],this.undefinedExports=new Map,this.undefinedPrivateNames=new Map,this.raise=t,this.inModule=e}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(this.currentThisScopeFlags()&X)>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(t&X)>0&&0===(2&t)}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(128&e)return!0;
1if(323&e)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new tt(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(t){return!!(2&t.flags||!this.inModule&&1&t.flags)}declareName(t,e,s){let i=this.currentScope();if(8&e||16&e)this.checkRedeclarationInScope(i,t,e,s),16&e?i.functions.add(t):i.lexical.add(t),8&e&&this.maybeExportDefined(i,t);else if(4&e)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.var.add(t),this.maybeExportDefined(i,t),!(i.flags&Q));--r);this.inModule&&1&i.flags&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.inModule&&1&t.flags&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.raise(i,w.VarRedeclaration,e)}isRedeclaredInScope(t,e,s){return!!(1&s)&&(8&s?t.lexical.has(e)||t.functions.has(e)||t.var.has(e):16&s?t.lexical.has(e)||!this.treatFunctionsAsVarInScope(t)&&t.var.has(e):t.lexical.has(e)&&!(8&t.flags&&t.lexical.values().next().value===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.has(e))}checkLocalExport(t){const{name:e}=t,s=this.scopeStack[0];s.lexical.has(e)||s.var.has(e)||s.functions.has(e)||this.undefinedExports.set(e,t.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(e&Q)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(323&e&&!(4&e))return e}}}class st extends tt{constructor(...t){super(...t),this.declareFunctions=new Set}}class it extends et{createScope(t){return new st(t)}declareName(t,e,s){const i=this.currentScope();if(e&Z)return this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),void i.declareFunctions.add(t);super.declareName(...arguments)}isRedeclaredInScope(t,e,s){return!!super.isRedeclaredInScope(...arguments)||!!(s&Z)&&(!t.declareFunctions.has(e)&&(t.lexical.has(e)||t.functions.has(e)))}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}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=l.eof,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(t){this.strict=!1!==t.strictMode&&(!0===t.strictMode||"module"===t.sourceType),this.curLine=t.startLine,this.startLoc=this.endLoc=this.curPosition()}curPosition(){return new x(this.curLine,this.pos-this.lineStart)}clone(t){const e=new rt,s=Object.keys(this);for(let i=0,r=s.length;i<r;i++){const r=s[i];let a=this[r];!t&&Array.isArray(a)&&(a=a.slice()),e[r]=a}return e}}var at=function(t){return t>=48&&t<=57};const nt=new Set([103,109,115,105,121,117,100]),ot={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},ht={bin:[48,49]};ht.oct=[...ht.bin,50,51,52,53,54,55],ht.dec=[...ht.oct,56,57],ht.hex=[...ht.dec,65,66,67,68,69,70,97,98,99,100,101,102];class pt{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new P(t.startLoc,t.endLoc)}}class ct{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class lt{constructor(t){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new ct)}exit(){const t=this.stack.pop(),e=this.current();for(const[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.raise(i,w.InvalidPrivateFieldResolution,s)}declarePrivateName(t,e,s){const i=this.current();let r=i.privateNames.has(t);if(3&e){const s=r&&i.loneAccessors.get(t);if(s){const a=4&s,n=4&e;r=(3&s)===(3&e)||a!==n,r||i.loneAccessors.delete(t)}else r||i.loneAccessors.set(t,e)}r&&this.raise(s,w.PrivateNameRedeclaration,t),i.privateNames.add(t),i.undefinedPrivateNames.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.raise(e,w.InvalidPrivateFieldResolution,t)}}class ut{constructor(t=0){this.type=void 0,this.type=t}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class dt extends ut{constructor(t){super(t),this.errors=new Map}recordDeclarationError(t,e){this.errors.set(t,e)}clearDeclarationError(t){this.errors.delete(t)}
1iterateErrors(t){this.errors.forEach(t)}}class mt{constructor(t){this.stack=[new ut],this.raise=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const{stack:s}=this;let i=s.length-1,r=s[i];for(;!r.isCertainlyParameterDeclaration();){if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(t,e),r=s[--i]}this.raise(t,e)}recordParenthesizedIdentifierError(t,e){const{stack:s}=this,i=s[s.length-1];if(i.isCertainlyParameterDeclaration())this.raise(t,e);else{if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(t,e)}}recordAsyncArrowParametersError(t,e){const{stack:s}=this;let i=s.length-1,r=s[i];for(;r.canBeArrowParameterDeclaration();)2===r.type&&r.recordDeclarationError(t,e),r=s[--i]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(((e,s)=>{this.raise(s,e);let i=t.length-2,r=t[i];for(;r.canBeArrowParameterDeclaration();)r.clearDeclarationError(s),r=t[--i]}))}}function ft(){return new ut}class yt{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function xt(t,e){return(t?2:0)|(e?1:0)}class Pt{constructor(){this.shorthandAssign=-1,this.doubleProto=-1,this.optionalParameters=-1}}class bt{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new P(s),null!=t&&t.options.ranges&&(this.range=[e,0]),null!=t&&t.filename&&(this.loc.filename=t.filename)}}const gt=bt.prototype;function Tt(t){const{type:e,start:s,end:i,loc:r,range:a,extra:n,name:o}=t,h=Object.create(gt);return h.type=e,h.start=s,h.end=i,h.loc=r,h.range=a,h.extra=n,h.name=o,"Placeholder"===e&&(h.expectedNode=t.expectedNode),h}function At(t){const{type:e,start:s,end:i,loc:r,range:a,extra:n}=t;if("Placeholder"===e)return function(t){return Tt(t)}(t);const o=Object.create(gt);return o.type="StringLiteral",o.start=s,o.end=i,o.loc=r,o.range=a,o.extra=n,o.value=t.value,o}gt.__clone=function(){const t=new bt,e=Object.keys(this);for(let s=0,i=e.length;s<i;s++){const i=e[s];"leadingComments"!==i&&"trailingComments"!==i&&"innerComments"!==i&&(t[i]=this[i])}return t};const wt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Et=S({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%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.",OptionalBindingPattern:"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 `<T> async () => {}`, use `async <T>() => {}`.",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."},A.SyntaxError);function St(t){return"type"===t.importKind||"typeof"===t.importKind}function Nt(t){return(t.type===l.name||!!t.type.keyword)&&"from"!==t.value}const Ct={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const kt=/\*?\s*@((?:no)?flow)\b/;const It={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",A
1circ:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",lang:"\u2329",rang:"\u232a",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},vt=/^[\da-fA-F]+$/,Lt=/^\d+$/,Mt=S({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 <>...</>?"},A.SyntaxError);function Dt(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function Rt(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return Rt(t.object)+"."+Rt(t.property);throw new Error("Node had unexpected type: "+t.type)}C.j_oTag=new N("<tag"),C.j_cTag=new N("</tag"),C.j_expr=new N("<tag>...</tag>",!0),l.jsxName=new o("jsxName"),l.jsxText=new o("jsxText",{beforeE
1xpr:!0}),l.jsxTagStart=new o("jsxTagStart",{startsExpr:!0}),l.jsxTagEnd=new o("jsxTagEnd"),l.jsxTagStart.updateContext=t=>{t.push(C.j_expr,C.j_oTag)};class Ot extends tt{constructor(...t){super(...t),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}}class Ft extends et{createScope(t){return new Ot(t)}declareName(t,e,s){const i=this.currentScope();if(e&$)return this.maybeExportDefined(i,t),void i.exportOnlyBindings.add(t);super.declareName(...arguments),2&e&&(1&e||(this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t)),i.types.add(t)),256&e&&i.enums.add(t),512&e&&i.constEnums.add(t),e&Y&&i.classes.add(t)}isRedeclaredInScope(t,e,s){if(t.enums.has(e)){if(256&s){return!!(512&s)!==t.constEnums.has(e)}return!0}return s&Y&&t.classes.has(e)?!!t.lexical.has(e)&&!!(1&s):!!(2&s&&t.types.has(e))||super.isRedeclaredInScope(...arguments)}checkLocalExport(t){const e=this.scopeStack[0],{name:s}=t;e.types.has(s)||e.exportOnlyBindings.has(s)||super.checkLocalExport(t)}}function Bt(t){if(null==t)throw new Error(`Unexpected ${t} value.`);return t}function _t(t){if(!t)throw new Error("Assert fail")}const jt=S({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."},A.SyntaxError);function Ut(t){return"private"===t||"public"===t||"protected"===t}l.placeholder=new o("%%",{startsExpr:!0});const qt=S({ClassNameIsRequired:"A class name is required."},A.SyntaxError);function Ht(t,e){return t.some((t=>Array.isArray(t)?t[0]===e:t===e))}function zt(t,e,s){const i=t.find((t=>Array.isArray(t)?t[0]===e:t===e));return i&&Array.isArray(i)?i[1][s]:null}const Vt=["minimal","fsharp","hack","smart"],Kt=["%","#"],Wt=["hash","bar"];const Jt={estree:t=>class extends t{parseRegExpLiteral({pattern:t,flags:e}){let s=null;try{s=new RegExp(t,e)}catch(r){}const i=this.estreeParseLiteral(s);return i.regex={pattern:t,flags:e},i}parseBigIntLiteral(t){let e;try{e=BigInt(t)}catch(i){e=null}const s=this.estreeParseLiteral(e);return s.bigint=String(s.value||t),s}parseDecimalLiteral(t){const e=this.estreeParseLiteral(null);return e.decimal=String(e.value||t),e}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}
1directiveToStmt(t){const e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.extra.expressionValue,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}initFunction(t,e){super.initFunction(t,e),t.expression=!1}checkDeclaration(t){null!=t&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var e;return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"===typeof t.expression.value&&!(null!=(e=t.expression.extra)&&e.parenthesized)}stmtToDirective(t){const e=t.expression.value,s=super.stmtToDirective(t);return this.addExtra(s.value,"expressionValue",e),s}parseBlockBody(t,...e){super.parseBlockBody(t,...e);const s=t.directives.map((t=>this.directiveToStmt(t)));t.body=s.concat(t.body),delete t.directives}pushClassMethod(t,e,s,i,r,a){this.parseMethod(e,s,i,r,a,"ClassMethod",!0),e.typeParameters&&(e.value.typeParameters=e.typeParameters,delete e.typeParameters),t.body.push(e)}parseMaybePrivateName(...t){const e=super.parseMaybePrivateName(...t);return"PrivateName"===e.type&&this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(t){const e=super.getPrivateNameSV(t);return delete(t=t).id,t.name=e,t.type="PrivateIdentifier",t}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===t.type:super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,e){const s=super.parseLiteral(t,e);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(t,e,s=!1){super.parseFunctionBody(t,e,s),t.expression="BlockStatement"!==t.body.type}parseMethod(t,e,s,i,r,a,n=!1){let o=this.startNode();return o.kind=t.kind,o=super.parseMethod(o,e,s,i,r,a,n),o.type="FunctionExpression",delete o.kind,t.value=o,"ClassPrivateMethod"===a&&(t.computed=!1),a="MethodDefinition",this.finishNode(t,a)}parseClassProperty(...t){const e=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")&&(e.type="PropertyDefinition"),e}parseClassPrivateProperty(...t){const e=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")&&(e.type="PropertyDefinition",e.computed=!1),e}parseObjectMethod(t,e,s,i,r){const a=super.parseObjectMethod(t,e,s,i,r);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(t,e,s,i,r){const a=super.parseObjectProperty(t,e,s,i,r);return a&&(a.kind="init",a.type="Property"),a}isAssignable(t,e){return null!=t&&this.isObjectProperty(t)?this.isAssignable(t.value,e):super.isAssignable(t,e)}toAssignable(t,e=!1){return null!=t&&this.isObjectProperty(t)?(this.toAssignable(t.value,e),t):super.toAssignable(t,e)}toAssignableObjectExpressionProp(t,...e){"get"===t.kind||"set"===t.kind?this.raise(t.key.start,w.PatternHasAccessor):t.method?this.raise(t.key.start,w.PatternHasMethod):super.toAssignableObjectExpressionProp(t,...e)}finishCallExpression(t,e){if(super.finishCallExpression(t,e),"Import"===t.callee.type){var s;if(t.type="ImportExpression",t.source=t.arguments[0],this.hasPlugin("importAssertions"))t.attributes=null!=(s=t.arguments[1])?s:null;delete t.arguments,delete t.callee}return t}toReferencedArguments(t){"ImportExpression"!==t.type&&super.toReferencedArguments(t)}parseExport(t){switch(super.parseExport(t),t.type){case"ExportAllDeclaration":t.exported=null;break;case"ExportNamedDeclaration":1===t.specifiers.length&&"ExportNamespaceSpecifier"===t.specifiers[0].type&&(t.type="ExportAllDeclaration",t.exported=t.specifiers[0].exported,delete t.specifiers)}return t}parseSubscript(t,e,s,i,r){const a=super.parseSubscript(t,e,s,i,r);if(r.optionalChainMember){if("OptionalMemberExpression"!==a.type&&"OptionalCallExpression"!==a.type||(a.type=a.type.substring(8)),r.stop){const t=this.startNodeAtNode(a);return t.expression=a,this.finishNode(t,"ChainExpression")}}else"MemberExpression"!==a.type&&"CallExpression"!==a.type||(a.optional=!1);return a}hasPropertyAsPrivateName(t){return"ChainExpression"===t.type&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isOptionalChain(t){return"ChainExpression"===t.type}isObjectProperty(t){return"Property"===t.type&&"init"===t.kind&&!t.method}isObjectMethod(t){return t.method||"get"===t.kind||"set"===t.kind}},jsx:t=>class extends t{jsxReadToken(){let t="",e=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,Mt.UnterminatedJsxContent);const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?60===s&&this.state.exprAllowed?(++this.state.pos,this.finishToken(l.jsxTagStart)):super.getTokenFromCode(s):(t+=this.input.slice(e,this.state.pos),this.finishToken(l.jsxText,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:m(s)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){const e=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=t?"\n":"\r\n"):s=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,w.UnterminatedString);const i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):m(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(l.string,e)}jsxReadEntity(){let t,e="",s=0,i=this.input[this.state.pos];const r=++this.state.pos;for(;this.state.pos<this.length&&s++<10;){if(i=this.input[this.state.pos++],";"===i){"#"===e[0]?"x"===e[1]?(e=e.substr(2),vt.test(e)&&(t=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),Lt.test(e)&&(t=String.fromCodePoint(parseInt(e,10)))):t=It[e];break}e+=i}return t||(this.state.pos=r,"&")}jsxReadWord(){let t;const e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(F(t)||45===t);return this.finishToken(l.jsxName,this.input.slice(e,this.state.pos))}jsxParseIdentifier(){const t=this.startNode();return this.match(l.jsxName)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){const t=this.state.start,e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(l.colon))return s;const i=this.startNodeAt(t,e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){const t=this.state.start,e=this.state.startLoc;let s=this.jsxParseNamespacedName();if("JSXNamespacedName"===s.type)return s;for(;this.eat(l.dot);){const i=this.startNodeAt(t,e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case l.braceL:return t=this.startNode(),this.next(),t=this.jsxParseExpressionContainer(t),"JSXEmptyExpression"===t.expression.type&&this.raise(t.start,Mt.AttributeIsEmpty),t;case l.jsxTagStart:case l.string:return this.parseExprAtom();default:throw this.raise(this.state.start,Mt.UnsupportedJsxValue)}}jsxParseEmptyExpression(){const t=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.start,this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.expect(l.braceR),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t){if(this.match(l.braceR))t.expression=this.jsxParseEmptyExpression();else{const e=this.parseExpression();t.expression=e}return this.expect(l.braceR),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){const t=this.startNode();return this.eat(l.braceL)?(this.expect(l.ellipsis),t.argument=this.parseMaybeAssignAllowIn(),this.expect(l.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(l.eq)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(l.jsxTagEnd)?(this.expect(l.jsxTagEnd),this.finishNode(s,"JSXOpeningFragment")):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(t){const e=[];for(;!this.match(l.slash)&&!this.match(l.jsxTagEnd);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(l.slash),this.expect(l.jsxTagEnd),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t,e){const s=this.startNodeAt(t,e);return this.match(l.jsxTagEnd)?(this.expect(l.jsxTagEnd),this.finishNode(s,"JSXClosingFragment")):(s.name=this.jsxParseElementName(),this.expect(l.jsxTagEnd),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(t,e){const s=this.startNodeAt(t,e),i=[],r=this.jsxParseOpeningElementAt(t,e);let a=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case l.jsxTagStart:if(t=this.state.start,e=this.state.startLoc,this.next(),this.eat(l.slash)){a=this.jsxParseClosingElementAt(t,e);break t}i.push(this.jsxParseElementAt(t,e));break;case l.jsxText:i.push(this.parseExprAtom());break;case l.braceL:{const t=this.startNode();this.next(),this.match(l.ellipsis)?i.push(this.jsxParseSpreadChild(t)):i.push(this.jsxParseExpressionContainer(t));break}default:throw this.unexpected()}Dt(r)&&!Dt(a)?this.raise(a.start,Mt.MissingClosingTagFragment):!Dt(r)&&Dt(a)?this.raise(a.start,Mt.MissingClosingTagElement,Rt(r.name)):Dt(r)||Dt(a)||Rt(a.name)!==Rt(r.name)&&this.raise(a.start,Mt.MissingClosingTagElement,Rt(r.name))}if(Dt(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.isRelational("<"))throw this.raise(this.state.start,Mt.UnwrappedAdjacentJSXElements);return Dt(r)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}parseExprAtom(t){return this.match(l.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(l.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(l.jsxTagStart),this.jsxParseElement()):super.parseExprAtom(t)}createLookaheadState(t){const e=super.createLookaheadState(t);return e.inPropertyName=t.inPropertyName,e}getTokenFromCode(t){if(this.state.inPropertyName)return super.getTokenFromCode(t);const e=this.curContext();if(e===C.j_expr)return this.jsxReadToken();if(e===C.j_oTag||e===C.j_cTag){if(O(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(l.jsxTagEnd);if((34===t||39===t)&&e===C.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(l.jsxTagStart)):super.getTokenFromCode(t)}updateContext(t){super.updateContext(t);const{context:e,type:s}=this.state;if(s===l.slash&&t===l.jsxTagStart)e.splice(-2,2,C.j_cTag),this.state.exprAllowed=!1;else if(s===l.jsxTagEnd){const s=e.pop();s===C.j_oTag&&t===l.slash||s===C.j_cTag?(e.pop(),this.state.exprAllowed=e[e.length-1]===C.j_expr):this.state.exprAllowed=!0}else!s.keyword||t!==l.dot&&t!==l.questionDot?this.state.exprAllowed=s.beforeE
1xpr:this.state.exprAllowed=!1}},flow:t=>class extends t{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return it}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(t,e){return t!==l.string&&t!==l.semi&&t!==l.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(t,e)}addComment(t){if(void 0===this.flowPragma){const e=kt.exec(t.value);if(e)if("flow"===e[1])this.flowPragma="flow";else{if("noflow"!==e[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return super.addComment(t)}flowParseTypeInitialiser(t){const e=this.state.inType;this.state.inType=!0,this.expect(t||l.colon);const s=this.flowParseType();return this.state.inType=e,s}flowParsePredicate(){const t=this.startNode(),e=this.state.start;return this.next(),this.expectContextual("checks"),this.state.lastTokStart>e+1&&this.raise(e,Et.UnexpectedSpaceBetweenModuloChecks),this.eat(l.parenL)?(t.value=this.parseExpression(),this.expect(l.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const t=this.state.inType;this.state.inType=!0,this.expect(l.colon);let e=null,s=null;return this.match(l.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(l.modulo)&&(s=this.flowParsePredicate())),[e,s]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();const e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(l.parenL);const r=this.flowParseFunctionTypeParams();return s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(l.parenR),[s.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,e){if(this.match(l._class))return this.flowParseDeclareClass(t);if(this.match(l._function))return this.flowParseDeclareFunction(t);if(this.match(l._var))return this.flowParseDeclareVariable(t);if(this.eatContextual("module"))return this.match(l.dot)?this.flowParseDeclareModuleExports(t):(e&&this.raise(this.state.lastTokStart,Et.NestedDeclareModule),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(l._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(l.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();const e=t.body=this.startNode(),s=e.body=[];for(this.expect(l.braceL);!this.match(l.braceR);){let t=this.startNode();this.match(l._import)?(this.next(),this.isContextual("type")||this.match(l._typeof)||this.raise(this.state.lastTokStart,Et.InvalidNonTypeImportInDeclareModule),this.parseImport(t)):(this.expectContextual("declare",Et.UnsupportedStatementInDeclareModule),t=this.flowParseDeclare(t,!0)),s.push(t)}this.scope.exit(),this.expect(l.braceR),this.finishNode(e,"BlockStatement");let i=null,r=!1;return s.forEach((t=>{!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(r&&this.raise(t.start,Et.DuplicateDeclareModuleExports),"ES"===i&&this.raise(t.start,Et.AmbiguousDeclareModuleKind),i="CommonJS",r=!0):("CommonJS"===i&&this.raise(t.start,Et.AmbiguousDeclareModuleKind),i="ES")})),t.kind=i||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,e){if(this.expect(l._export),this.eat(l._default))return this.match(l._function)||this.match(l._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(l._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!e){const t=this.state.value,e=Ct[t];throw this.raise(this.state.start,Et.UnsupportedDeclareExportKind,t,e)}if(this.match(l._var)||this.match(l._function)||this.match(l._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(l.star)||this.match(l.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,e=!1){if(t.id=this.flowParseRestrictedIdentifier(!e,!0),this.scope.declareName(t.id.name,e?17:9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(l._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(l.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(l.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(l.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}flowParseInterfaceExtends(){const t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){"_"===t&&this.raise(this.state.start,Et.UnexpectedReservedUnderscore)}checkReservedType(t,e,s){wt.has(t)&&this.raise(e,s?Et.AssignReservedType:Et.UnexpectedReservedType,t)}flowParseRestrictedIdentifier(t,e){return this.checkReservedType(this.state.value,this.state.start,e),this.parseIdentifier(t)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(l.eq),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(l.colon)&&(t.supertype=this.flowParseTypeInitialiser(l.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(l.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameter(t=!1){const e=this.state.start,s=this.startNode(),i=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return s.name=r.name,s.variance=i,s.bound=r.typeAnnotation,this.match(l.eq)?(this.eat(l.eq),s.default=this.flowParseType()):t&&this.raise(e,Et.MissingTypeParamDefault),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(l.jsxTagStart)?this.next():this.unexpected();let s=!1;do{const t=this.flowParseTypeParameter(s);e.params.push(t),t.default&&(s=!0),this.isRelational(">")||this.expect(l.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(l.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(l.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){const t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(l._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(l.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(l.num)||this.match(l.string)?this.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,e,s){return t.static=e,this.lookahead().type===l.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(l.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(l.bracketR),this.expect(l.bracketR),this.isRelational("<")||this.match(l.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.
1start,t.loc.start))):(t.method=!1,this.eat(l.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(l.parenL),this.match(l._this)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(l.parenR)||this.expect(l.comma));!this.match(l.parenR)&&!this.match(l.ellipsis);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(l.parenR)||this.expect(l.comma);return this.eat(l.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(l.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,e){const s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:e,allowSpread:s,allowProto:i,allowInexact:r}){const a=this.state.inType;this.state.inType=!0;const n=this.startNode();let o,h;n.callProperties=[],n.properties=[],n.indexers=[],n.internalSlots=[];let p=!1;for(e&&this.match(l.braceBarL)?(this.expect(l.braceBarL),o=l.braceBarR,h=!0):(this.expect(l.braceL),o=l.braceR,h=!1),n.exact=h;!this.match(o);){let e=!1,a=null,o=null;const c=this.startNode();if(i&&this.isContextual("proto")){const e=this.lookahead();e.type!==l.colon&&e.type!==l.question&&(this.next(),a=this.state.start,t=!1)}if(t&&this.isContextual("static")){const t=this.lookahead();t.type!==l.colon&&t.type!==l.question&&(this.next(),e=!0)}const u=this.flowParseVariance();if(this.eat(l.bracketL))null!=a&&this.unexpected(a),this.eat(l.bracketL)?(u&&this.unexpected(u.start),n.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,e))):n.indexers.push(this.flowParseObjectTypeIndexer(c,e,u));else if(this.match(l.parenL)||this.isRelational("<"))null!=a&&this.unexpected(a),u&&this.unexpected(u.start),n.callProperties.push(this.flowParseObjectTypeCallProperty(c,e));else{let t="init";if(this.isContextual("get")||this.isContextual("set")){const e=this.lookahead();e.type!==l.name&&e.type!==l.string&&e.type!==l.num||(t=this.state.value,this.next())}const i=this.flowParseObjectTypeProperty(c,e,a,u,t,s,null!=r?r:!h);null===i?(p=!0,o=this.state.lastTokStart):n.properties.push(i)}this.flowObjectTypeSemicolon(),!o||this.match(l.braceR)||this.match(l.braceBarR)||this.raise(o,Et.UnexpectedExplicitInexactInObject)}this.expect(o),s&&(n.inexact=p);const c=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=a,c}flowParseObjectTypeProperty(t,e,s,i,r,a,n){if(this.eat(l.ellipsis)){return this.match(l.comma)||this.match(l.semi)||this.match(l.braceR)||this.match(l.braceBarR)?(a?n||this.raise(this.state.lastTokStart,Et.InexactInsideExact):this.raise(this.state.lastTokStart,Et.InexactInsideNonObject),i&&this.raise(i.start,Et.InexactVariance),null):(a||this.raise(this.state.lastTokStart,Et.UnexpectedSpreadType),null!=s&&this.unexpected(s),i&&this.raise(i.start,Et.SpreadVariance),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"))}{t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=r;let n=!1;return this.isRelational("<")||this.match(l.parenL)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(t),!a&&"constructor"===t.key.name&&t.value.this&&this.raise(t.value.this.start,Et.ThisParamBannedInConstructor)):("init"!==r&&this.unexpected(),t.method=!1,this.eat(l.question)&&(n=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=n,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){const e="get"===t.kind?0:1,s=t.start,i=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.value.this.start,"get"===t.kind?Et.GetterMayNotHaveThisParam:Et.SetterMayNotHaveThisParam),i!==e&&("get"===t.kind?this.raise(s,w.BadGetterArity):this.raise(s,w.BadSetterArity)),"set"===t.kind&&t.value.rest&&this.raise(s,w.BadSetterRestParameter)}flowObjectTypeSemicolon(){this.eat(l.semi)||this.eat(l.comma)||this.match(l.braceR)||this.match(l.braceBarR)||this.unexpected()}flowParseQualifiedTypeIdentifier(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(l.dot);){const s=this.startNodeAt(t,e);s.qualification=i,s.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(s,"QualifiedTypeIdentifier")}return i}flowParseGenericType(t,e,s){const i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){const t=this.startNode();return this.expect(l._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){const t=this.startNode();for(t.types=[],this.expect(l.bracketL);this.state.pos<this.length&&!this.match(l.bracketR)&&(t.types.push(this.flowParseType()),!this.match(l.bracketR));)this.expect(l.comma);return this.expect(l.bracketR),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let e=null,s=!1,i=null;const r=this.startNode(),a=this.lookahead(),n=this.state.type===l._this;return a.type===l.colon||a.type===l.question?(n&&!t&&this.raise(r.start,Et.ThisParamMustBeFirst),e=this.parseIdentifier(n),this.eat(l.question)&&(s=!0,n&&this.raise(r.start,Et.ThisParamMayNotBeOptional)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),r.name=e,r.optional=s,r.typeAnnotation=i,this.finishNode(r,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){const e=this.startNodeAt(t.
1start,t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let e=null,s=null;for(this.match(l._this)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(l.parenR)||this.expect(l.comma));!this.match(l.parenR)&&!this.match(l.ellipsis);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(l.parenR)||this.expect(l.comma);return this.eat(l.ellipsis)&&(e=this.flowParseFunctionTypeParam(!1)),{params:t,rest:e,_this:s}}flowIdentToTypeAnnotation(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,e,i)}}flowParsePrimaryType(){const t=this.state.start,e=this.state.startLoc,s=this.startNode();let i,r,a=!1;const n=this.state.noAnonFunctionType;switch(this.state.type){case l.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,e,s,this.parseIdentifier());case l.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case l.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case l.bracketL:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=n,r;case l.relational:if("<"===this.state.value)return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(l.parenL),i=this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(l.parenR),this.expect(l.arrow),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");break;case l.parenL:if(this.next(),!this.match(l.parenR)&&!this.match(l.ellipsis))if(this.match(l.name)||this.match(l._this)){const t=this.lookahead().type;a=t!==l.question&&t!==l.colon}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(l.comma)||this.match(l.parenR)&&this.lookahead().type===l.arrow))return this.expect(l.parenR),r;this.eat(l.comma)}return i=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),s.params=i.params,s.rest=i.rest,s.this=i._this,this.expect(l.parenR),this.expect(l.arrow),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case l.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case l._true:case l._false:return s.value=this.match(l._true),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case l.plusMin:if("-"===this.state.value){if(this.next(),this.match(l.num))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(l.bigint))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(this.state.start,Et.UnexpectedSubtractionOperand)}throw this.unexpected();case l.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case l.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case l._void:return this.next(),this.finishNode(s,"VoidTypeAnnotation");
1case l._null:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case l._this:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case l.star:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){const t=this.state.type.label;return this.next(),super.createIdentifier(s,t)}}throw this.unexpected()}flowParsePostfixType(){const t=this.state.start,e=this.state.startLoc;let s=this.flowParsePrimaryType(),i=!1;for(;(this.match(l.bracketL)||this.match(l.questionDot))&&!this.canInsertSemicolon();){const r=this.startNodeAt(t,e),a=this.eat(l.questionDot);i=i||a,this.expect(l.bracketL),!a&&this.match(l.bracketR)?(r.elementType=s,this.next(),s=this.finishNode(r,"ArrayTypeAnnotation")):(r.objectType=s,r.indexType=this.flowParseType(),this.expect(l.bracketR),i?(r.optional=a,s=this.finishNode(r,"OptionalIndexedAccessType")):s=this.finishNode(r,"IndexedAccessType"))}return s}flowParsePrefixType(){const t=this.startNode();return this.eat(l.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(l.arrow)){const e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.this=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){const t=this.startNode();this.eat(l.bitwiseAND);const e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(l.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){const t=this.startNode();this.eat(l.bitwiseOR);const e=this.flowParseIntersectionType();for(t.types=[e];this.eat(l.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){const t=this.state.inType;this.state.inType=!0;const e=this.flowParseUnionType();return this.state.inType=t,e}flowParseTypeOrImplicitInstantiation(){if(this.state.type===l.name&&"_"===this.state.value){const t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}flowParseTypeAnnotation(){const t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(t){const e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(l.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(l.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}parseFunctionBody(t,e,s=!1){return e?this.forwardNoArrowParamsConversionAt(t,(()=>super.parseFunctionBody(t,!0,s))):super.parseFunctionBody(t,!1,s)}parseFunctionBodyAndFinish(t,e,s=!1){if(this.match(l.colon)){const e=this.startNode();[e.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=e.typeAnnotation?this.finishNode(e,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(t,e,s)}parseStatement(t,e){if(this.state.strict&&this.match(l.name)&&"interface"===this.state.value){const t=this.lookahead();if(t.type===l.name||W(t.value)){const t=this.startNode();return this.next(),this.flowParseInterface(t)}}else if(this.shouldParseEnums()&&this.isContextual("enum")){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}const s=super.parseStatement(t,e);return void 0!==this.flowPragma||this.isValidDirective(s)||(this.flowPragma=null),s}
1parseExpressionStatement(t,e){if("Identifier"===e.type)if("declare"===e.name){if(this.match(l._class)||this.match(l.name)||this.match(l._function)||this.match(l._var)||this.match(l._export))return this.flowParseDeclare(t)}else if(this.match(l.name)){if("interface"===e.name)return this.flowParseInterface(t);if("type"===e.name)return this.flowParseTypeAlias(t);if("opaque"===e.name)return this.flowParseOpaqueType(t,!1)}return super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){return(!this.match(l.name)||!("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 t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,e,s,i){if(!this.match(l.question))return t;if(this.state.maybeInArrowParameters){const r=this.tryParse((()=>super.parseConditional(t,e,s)));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),t)}this.expect(l.question);const r=this.state.clone(),a=this.state.noArrowAt,n=this.startNodeAt(e,s);let{consequent:o,failed:h}=this.tryParseConditionalConsequent(),[p,c]=this.getArrowLikeExpressions(o);if(h||c.length>0){const t=[...a];if(c.length>0){this.state=r,this.state.noArrowAt=t;for(let e=0;e<c.length;e++)t.push(c[e].start);({consequent:o,failed:h}=this.tryParseConditionalConsequent()),[p,c]=this.getArrowLikeExpressions(o)}h&&p.length>1&&this.raise(r.start,Et.AmbiguousConditionalArrow),h&&1===p.length&&(this.state=r,this.state.noArrowAt=t.concat(p[0].start),({consequent:o,failed:h}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=a,this.expect(l.colon),n.test=t,n.consequent=o,n.alternate=this.forwardNoArrowParamsConversionAt(n,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(n,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const t=this.parseMaybeAssignAllowIn(),e=!this.match(l.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}getArrowLikeExpressions(t,e){const s=[t],i=[];for(;0!==s.length;){const t=s.pop();"ArrowFunctionExpression"===t.type?(t.typeParameters||!t.returnType?this.finishArrowValidation(t):i.push(t),s.push(t.body)):"ConditionalExpression"===t.type&&(s.push(t.consequent),s.push(t.alternate))}return e?(i.forEach((t=>this.finishArrowValidation(t))),[i,[]]):function(t,e){const s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}(i,(t=>t.params.every((t=>this.isAssignable(t,!0)))))}finishArrowValidation(t){var e;this.toAssignableList(t.params,null==(e=t.extra)?void 0:e.trailingComma,!1),this.scope.enter(6),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,e){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=e(),this.state.noArrowParamsConversionAt.pop()):s=e(),s}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(l.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(l.colon)){const i=this.startNodeAt(e,s);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}assertModuleNodeAllowed(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||super.assertModuleNodeAllowed(t)}parseExport(t){const e=super.parseExport(t);return"ExportNamedDeclaration"!==e.type&&"ExportAllDeclaration"!==e.type||(e.exportKind=e.exportKind||"value"),e}parseExportDeclaration(t){if(this.isContextual("type")){t.exportKind="type";const e=this.startNode();return this.next(),this.match(l.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(e)}if(this.isContextual("opaque")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseOpaqueType(e,!1)}if(this.isContextual("interface")){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.shouldParseEnums()&&this.isContextual("enum")){t.exportKind="value";const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDeclaration(t)}eatExportStar(t){return!!super.eatExportStar(...arguments)||!(!this.isContextual("type")||this.lookahead().type!==l.star)&&(t.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(t){const e=this.state.start,s=super.maybeParseExportNamespaceSpecifier(t);return s&&"type"===t.exportKind&&this.unexpected(e),s}parseClassId(t,e,s){super.parseClassId(t,e,s),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,e,s){const i=this.state.start;if(this.isContextual("declare")){if(this.parseClassMemberFromModifier(t,e))return;e.declare=!0}super.parseClassMember(t,e,s),e.declare&&("ClassProperty"!==e.type&&"ClassPrivateProperty"!==e.type&&"PropertyDefinition"!==e.type?this.raise(i,Et.DeclareClassElement):e.value&&this.raise(e.value.start,Et.DeclareClassFieldInitializer))}isIterator(t){return"iterator"===t||"asyncIterator"===t}readIterator(){const t=super.readWord1(),e="@@"+t;this.isIterator(t)&&this.state.inType||this.raise(this.state.pos,w.InvalidIdentifier,e),this.finishToken(l.name,e)}getTokenFromCode(t){const e=this.input.charCodeAt(this.state.pos+1);return 123===t&&124===e?this.finishOp(l.braceBarL,2):!this.state.inType||62!==t&&60!==t?this.state.inType&&63===t?46===e?this.finishOp(l.questionDot,2):this.finishOp(l.question,1):function(t,e){return 64===t&&64===e}(t,e)?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t):this.finishOp(l.relational,1)}isAssignable(t,e){return"TypeCastExpression"===t.type?this.isAssignable(t.expression,e):super.isAssignable(t,e)}toAssignable(t,e=!1){return"TypeCastExpression"===t.type?super.toAssignable(this.t
1ypeCastToParameter(t),e):super.toAssignable(t,e)}toAssignableList(t,e,s){for(let i=0;i<t.length;i++){const e=t[i];"TypeCastExpression"===(null==e?void 0:e.type)&&(t[i]=this.typeCastToParameter(e))}return super.toAssignableList(t,e,s)}toReferencedList(t,e){for(let i=0;i<t.length;i++){var s;const r=t[i];!r||"TypeCastExpression"!==r.type||null!=(s=r.extra)&&s.parenthesized||!(t.length>1)&&e||this.raise(r.typeAnnotation.start,Et.TypeCastInPattern)}return t}parseArrayLike(t,e,s,i){const r=super.parseArrayLike(t,e,s,i);return e&&!this.state.maybeInArrowParameters&&this.toReferencedList(r.elements),r}checkLVal(t,...e){if("TypeCastExpression"!==t.type)return super.checkLVal(t,...e)}parseClassProperty(t){return this.match(l.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(l.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(l.colon)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(l.colon)&&super.isNonstaticConstructor(t)}pushClassMethod(t,e,s,i,r,a){if(e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,e,s,i,r,a),e.params&&r){const t=e.params;t.length>0&&this.isThisParam(t[0])&&this.raise(e.start,Et.ThisParamBannedInConstructor)}else if("MethodDefinition"===e.type&&r&&e.value.params){const t=e.value.params;t.length>0&&this.isThisParam(t[0])&&this.raise(e.start,Et.ThisParamBannedInConstructor)}}pushClassPrivateMethod(t,e,s,i){e.variance&&this.unexpected(e.variance.start),delete e.variance,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,e,s,i)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();const e=t.implements=[];do{const t=this.startNode();t.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,e.push(this.finishNode(t,"ClassImplements"))}while(this.eat(l.comma))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);const e=this.getObjectOrClassMethodParams(t);if(e.length>0){const s=e[0];this.isThisParam(s)&&"get"===t.kind?this.raise(s.start,Et.GetterMayNotHaveThisParam):this.isThisParam(s)&&this.raise(s.start,Et.SetterMayNotHaveThisParam)}}parsePropertyName(t,e){const s=this.flowParseVariance(),i=super.parsePropertyName(t,e);return t.variance=s,i}parseObjPropValue(t,e,s,i,r,a,n,o){let h;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&!n&&(h=this.flowParseTypeParameterDeclaration(),this.match(l.parenL)||this.unexpected()),super.parseObjPropValue(t,e,s,i,r,a,n,o),h&&((t.value||t).typeParameters=h)}parseAssignableListItemTypes(t){return this.eat(l.question)&&("Identifier"!==t.type&&this.raise(t.start,Et.OptionalBindingPattern),this.isThisParam(t)&&this.raise(t.start,Et.ThisParamMayNotBeOptional),t.optional=!0),this.match(l.colon)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(t.start,Et.ThisParamAnnotationRequired),this.match(l.eq)&&this.isThisParam(t)&&this.raise(t.start,Et.ThisParamNoDefault),this.resetEndLocation(t),t}parseMaybeDefault(t,e,s){const i=super.parseMaybeDefault(t,e,s);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,Et.TypeBeforeInitializer),i}shouldParseDefaultImport(t){return St(t)?Nt(this.state):super.shouldParseDefaultImport(t)}parseImportSpecifierLocal(t,e,s,i){e.local=St(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),this.checkLVal(e.local,i,9),t.specifiers.push(this.finishNode(e,s))}maybeParseDefaultImportSpecifier(t){t.importKind="value";let e=null;if(this.match(l._typeof)?e="typeof":this.isContextual("type")&&(e="type"),e){const s=this.lookahead();"type"===e&&s.type===l.star&&this.unexpected(s.start),(Nt(s)||s.type===l.braceL||s.type===l.star)&&(this.next(),t.importKind=e)}return super.maybeParseDefaultImportSpecifier(t)}parseImportSpecifier(t){const e=this.startNode(),s=this.match(l.string),i=this.parseModuleExportName();let r=null;"Identifier"===i.type&&("type"===i.name?r="type":"typeof"===i.name&&(r="typeof"));let a=!1;if(this.isContextual("as")&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===r||this.match(l.name)||this.state.type.keyword?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=r,e.local=Tt(t))}else if(null!==r&&(this.match(l.name)||this.state.type.keyword))e.imported=this.parseIdentifier(!0),e.importKind=r,this.eatContextual("as")?e.local=this.parseIdentifier():(a=!0,e.local=Tt(e.imported));else{if(s)throw this.raise(e.start,w.ImportBindingIsString,i.value);a=!0,e.imported=i,e.importKind=null,e.local=Tt(e.imported)}const n=St(t),o=St(e);n&&o&&this.raise(e.start,Et.ImportTypeShorthandOnlyInPureImport),(n||o)&&this.checkReservedType(e.local.name,e.local.start,!0),!a||n||o||this.checkReservedWord(e.local.name,e.start,!0,!0),this.checkLVal(e.local,"import specifier",9),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}parseBindingAtom(){return this.state.type===l._this?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,e){const s=t.kind;"get"!==s&&"set"!==s&&this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),this.match(l.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){if(this.match(l.colon)){const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=e}return super.parseAsyncArrowFromCallExpression(t,e)}shouldParseAsyncArrow(){return this.match(l.colon)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,e){var s;let i,r=null;if(this.hasPlugin("jsx")&&(this.match(l.jsxTagStart)||this.isRelational("<"))){if
1(r=this.state.clone(),i=this.tryParse((()=>super.parseMaybeAssign(t,e)),r),!i.error)return i.node;const{context:s}=this.state,a=s[s.length-1];a===C.j_oTag?s.length-=2:a===C.j_expr&&(s.length-=1)}if(null!=(s=i)&&s.error||this.isRelational("<")){var a,n;let s;r=r||this.state.clone();const o=this.tryParse((i=>{var r;s=this.flowParseTypeParameterDeclaration();const a=this.forwardNoArrowParamsConversionAt(s,(()=>{const i=super.parseMaybeAssign(t,e);return this.resetStartLocationFromNode(i,s),i}));"ArrowFunctionExpression"!==a.type&&null!=(r=a.extra)&&r.parenthesized&&i();const n=this.maybeUnwrapTypeCastExpression(a);return n.typeParameters=s,this.resetStartLocationFromNode(n,s),a}),r);let h=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(s.start,Et.UnexpectedTypeParameterBeforeAsyncArrowFunction),o.node;h=o.node}if(null!=(a=i)&&a.node)return this.state=i.failState,i.node;if(h)return this.state=o.failState,h;if(null!=(n=i)&&n.thrown)throw i.error;if(o.thrown)throw o.error;throw this.raise(s.start,Et.UnexpectedTokenAfterTypeParameter)}return super.parseMaybeAssign(t,e)}parseArrow(t){if(this.match(l.colon)){const e=this.tryParse((()=>{const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=e,this.canInsertSemicolon()&&this.unexpected(),this.match(l.arrow)||this.unexpected(),s}));if(e.thrown)return null;e.error&&(this.state=e.failState),t.returnType=e.node.typeAnnotation?this.finishNode(e.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(l.colon)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,e){-1!==this.state.noArrowParamsConversionAt.indexOf(t.start)?t.params=e:super.setArrowFunctionParameters(t,e)}checkParams(t,e,s){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(t.start)){for(let e=0;e<t.params.length;e++)this.isThisParam(t.params[e])&&e>0&&this.raise(t.params[e].start,Et.ThisParamMustBeFirst);return super.checkParams(...arguments)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(t,e,s,i){if("Identifier"===t.type&&"async"===t.name&&-1!==this.state.noArrowAt.indexOf(e)){this.next();const i=this.startNodeAt(e,s);i.callee=t,i.arguments=this.parseCallExpressionArguments(l.parenR,!1),t=this.finishNode(i,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.isRelational("<")){const r=this.state.clone(),a=this.tryParse((t=>this.parseAsyncArrowWithTypeParameters(e,s)||t()),r);if(!a.error&&!a.aborted)return a.node;const n=this.tryParse((()=>super.parseSubscripts(t,e,s,i)),r);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(t,e,s,i)}parseSubscript(t,e,s,i,r){if(this.match(l.questionDot)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,t;this.next();const a=this.startNodeAt(e,s);return a.callee=t,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(l.parenL),a.arguments=this.parseCallExpressionArguments(l.parenR,!1),a.optional=!0,this.finishCallExpression(a,!0)}if(!i&&this.shouldParseTypes()&&this.isRelational("<")){const i=this.startNodeAt(e,s);i.callee=t;const a=this.tryParse((()=>(i.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(l.parenL),i.arguments=this.parseCallExpressionArguments(l.parenR,!1),r.optionalChainMember&&(i.optional=!1),this.finishCallExpression(i,r.optionalChainMember))));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(t,e,s,i,r)}parseNewArguments(t){let e=null;this.shouldParseTypes()&&this.isRelational("<")&&(e=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),t.typeArguments=e,super.parseNewArguments(t)}parseAsyncArrowWithTypeParameters(t,e){const s=this.startNodeAt(t,e);if(this.parseFunctionParams(s),this.parseArrow(s))return this.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(t){const e=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===e&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(t)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);124!==t||125!==e?super.readToken_pipe_amp(t):this.finishOp(l.braceBarR,2)}parseTopLevel(t,e){const s=super.parseTopLevel(t,e);return this.state.hasFlowComment&&this.raise(this.state.pos,Et.UnterminatedFlowComment),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment())return this.state.hasFlowComment&&this.unexpected(null,Et.NestedFlowComment),this.hasFlowCommentCompletion(),this.state.pos+=this.skipFlowComment(),void(this.state.hasFlowComment=!0);if(!this.state.hasFlowComment)return super.skipBlockComment();{const t=this.input.indexOf("*-/",this.state.pos+=2);if(-1===t)throw this.raise(this.state.pos-2,w.UnterminatedComment);this.state.pos=t+3}}skipFlowComment(){const{pos:t}=this.state;let e=2;for(;[32,9].includes(this.input.charCodeAt(t+e));)e++;const s=this.input.charCodeAt(e+t),i=this.input.charCodeAt(e+t+1);return 58===s&&58===i?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===s&&58!==i&&e}
1hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(this.state.pos,w.UnterminatedComment)}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,Et.EnumBooleanMemberNotInitialized,s,e)}flowEnumErrorInvalidMemberName(t,{enumName:e,memberName:s}){const i=s[0].toUpperCase()+s.slice(1);this.raise(t,Et.EnumInvalidMemberName,s,i,e)}flowEnumErrorDuplicateMemberName(t,{enumName:e,memberName:s}){this.raise(t,Et.EnumDuplicateMemberName,s,e)}flowEnumErrorInconsistentMemberValues(t,{enumName:e}){this.raise(t,Et.EnumInconsistentMemberValues,e)}flowEnumErrorInvalidExplicitType(t,{enumName:e,suppliedType:s}){return this.raise(t,null===s?Et.EnumInvalidExplicitTypeUnknownSupplied:Et.EnumInvalidExplicitType,e,s)}flowEnumErrorInvalidMemberInitializer(t,{enumName:e,explicitType:s,memberName:i}){let r=null;switch(s){case"boolean":case"number":case"string":r=Et.EnumInvalidMemberInitializerPrimaryType;break;case"symbol":r=Et.EnumInvalidMemberInitializerSymbolType;break;default:r=Et.EnumInvalidMemberInitializerUnknownType}return this.raise(t,r,e,i,s)}flowEnumErrorNumberMemberNotInitialized(t,{enumName:e,memberName:s}){this.raise(t,Et.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:e}){this.raise(t,Et.EnumStringMemberInconsistentlyInitailized,e)}flowEnumMemberInit(){const t=this.state.start,e=()=>this.match(l.comma)||this.match(l.braceR);switch(this.state.type){case l.num:{const s=this.parseNumericLiteral(this.state.value);return e()?{type:"number",pos:s.start,value:s}:{type:"invalid",pos:t}}case l.string:{const s=this.parseStringLiteral(this.state.value);return e()?{type:"string",pos:s.start,value:s}:{type:"invalid",pos:t}}case l._true:case l._false:{const s=this.parseBooleanLiteral(this.match(l._true));return e()?{type:"boolean",pos:s.start,value:s}:{type:"invalid",pos:t}}default:return{type:"invalid",pos:t}}}flowEnumMemberRaw(){const t=this.state.start;return{id:this.parseIdentifier(!0),init:this.eat(l.eq)?this.flowEnumMemberInit():{type:"none",pos:t}}}flowEnumCheckExplicitTypeMismatch(t,e,s){const{explicitType:i}=e;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(t,e)}flowEnumMembers({enumName:t,explicitType:e}){const s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let r=!1;for(;!this.match(l.braceR);){if(this.eat(l.ellipsis)){r=!0;break}const a=this.startNode(),{id:n,init:o}=this.flowEnumMemberRaw(),h=n.name;if(""===h)continue;/^[a-z]/.test(h)&&this.flowEnumErrorInvalidMemberName(n.start,{enumName:t,memberName:h}),s.has(h)&&this.flowEnumErrorDuplicateMemberName(n.start,{enumName:t,memberName:h}),s.add(h);const p={enumName:t,explicitType:e,memberName:h};switch(a.id=n,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.pos,p,"boolean"),a.init=o.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.pos,p,"number"),a.init=o.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.pos,p,"string"),a.init=o.value,i.stringMembers.push(this.finishNode(a,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.pos,p);case"none":switch(e){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.pos,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.pos,p);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(l.braceR)||this.expect(l.comma)}return{members:i,hasUnknownMembers:r}}flowEnumStringMembers(t,e,{enumName:s}){if(0===t.length)return e;if(0===e.length)return t;if(e.length>t.length){for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e.start,{enumName:s});return e}for(const i of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(i.start,{enumName:s});return t}flowEnumParseExplicitType({enumName:t}){if(this.eatContextual("of")){if(!this.match(l.name))throw this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:null});const{value:e}=this.state;return this.next(),"boolean"!==e&&"number"!==e&&"string"!==e&&"symbol"!==e&&this.flowEnumErrorInvalidExplicitType(this.state.start,{enumName:t,suppliedType:e}),e}return null}flowEnumBody(t,{enumName:e,nameLoc:s}){const i=this.flowEnumParseExplicitType({enumName:e});this.expect(l.braceL);const{members:r,hasUnknownMembers:a}=this.flowEnumMembers({enumName:e,explicitType:i});switch(t.hasUnknownMembers=a,i){case"boolean":return t.explicitType=!0,t.members=r.booleanMembers,this.expect(l.braceR),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=r.numberMembers,this.expect(l.braceR),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:e}
1),this.expect(l.braceR),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=r.defaultedMembers,this.expect(l.braceR),this.finishNode(t,"EnumSymbolBody");default:{const i=()=>(t.members=[],this.expect(l.braceR),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;const a=r.booleanMembers.length,n=r.numberMembers.length,o=r.stringMembers.length,h=r.defaultedMembers.length;if(a||n||o||h){if(a||n){if(!n&&!o&&a>=h){for(const t of r.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(t.start,{enumName:e,memberName:t.id.name});return t.members=r.booleanMembers,this.expect(l.braceR),this.finishNode(t,"EnumBooleanBody")}if(!a&&!o&&n>=h){for(const t of r.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(t.start,{enumName:e,memberName:t.id.name});return t.members=r.numberMembers,this.expect(l.braceR),this.finishNode(t,"EnumNumberBody")}return this.flowEnumErrorInconsistentMemberValues(s,{enumName:e}),i()}return t.members=this.flowEnumStringMembers(r.stringMembers,r.defaultedMembers,{enumName:e}),this.expect(l.braceR),this.finishNode(t,"EnumStringBody")}return i()}}}flowParseEnumDeclaration(t){const e=this.parseIdentifier();return t.id=e,t.body=this.flowEnumBody(this.startNode(),{enumName:e.name,nameLoc:e.start}),this.finishNode(t,"EnumDeclaration")}isLookaheadToken_lt(){const t=this.nextTokenStart();if(60===this.input.charCodeAt(t)){const e=this.input.charCodeAt(t+1);return 60!==e&&61!==e}return!1}maybeUnwrapTypeCastExpression(t){return"TypeCastExpression"===t.type?t.expression:t}},typescript:t=>class extends t{getScopeHandler(){return Ft}tsIsIdentifier(){return this.match(l.name)}tsTokenCanFollowModifier(){return(this.match(l.bracketL)||this.match(l.braceL)||this.match(l.star)||this.match(l.ellipsis)||this.match(l.privateName)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(t){if(!this.match(l.name))return;const e=this.state.value;return-1!==t.indexOf(e)&&this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))?e:void 0}tsParseModifiers(t,e,s,i){const r=(e,s,i,r)=>{s===i&&t[r]&&this.raise(e,jt.InvalidModifiersOrder,i,r)},a=(e,s,i,r)=>{(t[i]&&s===r||t[r]&&s===i)&&this.raise(e,jt.IncompatibleModifiers,i,r)};for(;;){const n=this.state.start,o=this.tsParseModifier(e.concat(null!=s?s:[]));if(!o)break;Ut(o)?t.accessibility?this.raise(n,jt.DuplicateAccessibilityModifier):(r(n,o,o,"override"),r(n,o,o,"static"),r(n,o,o,"readonly"),t.accessibility=o):(Object.hasOwnProperty.call(t,o)?this.raise(n,jt.DuplicateModifier,o):(r(n,o,"static","readonly"),r(n,o,"static","override"),r(n,o,"override","readonly"),r(n,o,"abstract","override"),a(n,o,"declare","override"),a(n,o,"static","abstract")),t[o]=!0),null!=s&&s.includes(o)&&this.raise(n,i,o)}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(l.braceR);case"HeritageClauseElement":return this.match(l.braceL);case"TupleElementTypes":return this.match(l.bracketR);case"TypeParametersOrArguments":return this.isRelational(">")}throw new Error("Unreachable")}tsParseList(t,e){const s=[];for(;!this.tsIsListTerminator(t);)s.push(e());return s}tsParseDelimitedList(t,e){return Bt(this.tsParseDelimitedListWorker(t,e,!0))}tsParseDelimitedListWorker(t,e,s){const i=[];for(;!this.tsIsListTerminator(t);){const r=e();if(null==r)return;if(i.push(r),!this.eat(l.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(l.comma))}}return i}tsParseBracketedList(t,e,s,i){i||(s?this.expect(l.bracketL):this.expectRelational("<"));const r=this.tsParseDelimitedList(t,e);return s?this.expect(l.bracketR):this.expectRelational(">"),r}tsParseImportType(){const t=this.startNode();return this.expect(l._import),this.expect(l.parenL),this.match(l.string)||this.raise(this.state.start,jt.UnsupportedImportTypeArgument),t.argument=this.parseExprAtom(),this.expect(l.parenR),this.eat(l.dot)&&(t.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseEntityName(t){let e=this.parseIdentifier();for(;this.eat(l.dot);){const s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}tsParseTypeReference(){const t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();const e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),e.asserts=!1,this.finishNode(e,"TSTypePredicate")}tsParseThisTypeNode(){const t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){const t=this.startNode();return this.expect(l._typeof),this.match(l._import)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(){const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(l._extends),t.default=this.tsEatThenParseType(l.eq),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(){if(this.isRelational("<"))return this.tsParseTypeParameters()}tsParseTypeParameters(){const t=this.startNode();return this.isRelational("<")||this.match(l.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),0===t.params.length&&this.raise(t.start,jt.EmptyTypeParameters),this.finishNode(t,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){return this.lookahead().type===l._const?(this.next(),this.tsParseTypeReference()):null}tsFillSignature(t,e){const s=t===l.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(l.parenL),e.parameters=this.tsParseBindingListForSignature(),(s||this.match(t))&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){return this.parseBindingList(l.parenR,41).map((t=>("Identifier"!==t.type&&"RestElement"!==t.type&&"ObjectPattern"!==t.type&&"ArrayPattern"!==t.type&&this.raise(t.start,jt.UnsupportedSignatureParameterKind,t.type),t)))}tsParseTypeMemberSemicolon(){this.eat(l.comma)||this.isLineTerminator()||this.expect(l.semi)}tsParseSignatureMember(t,e){return this.tsFillSignature(l.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}
1tsIsUnambiguouslyIndexSignature(){return this.next(),this.eat(l.name)&&this.match(l.colon)}tsTryParseIndexSignature(t){if(!this.match(l.bracketL)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(l.bracketL);const e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(l.bracketR),t.parameters=[e];const s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,e){this.eat(l.question)&&(t.optional=!0);const s=t;if(this.match(l.parenL)||this.isRelational("<")){e&&this.raise(t.start,jt.ReadonlyForMethodSignature);const i=s;if(i.kind&&this.isRelational("<")&&this.raise(this.state.pos,jt.AccesorCannotHaveTypeParameters),this.tsFillSignature(l.colon,i),this.tsParseTypeMemberSemicolon(),"get"===i.kind)i.parameters.length>0&&(this.raise(this.state.pos,w.BadGetterArity),this.isThisParam(i.parameters[0])&&this.raise(this.state.pos,jt.AccesorCannotDeclareThisParameter));else if("set"===i.kind){if(1!==i.parameters.length)this.raise(this.state.pos,w.BadSetterArity);else{const t=i.parameters[0];this.isThisParam(t)&&this.raise(this.state.pos,jt.AccesorCannotDeclareThisParameter),"Identifier"===t.type&&t.optional&&this.raise(this.state.pos,jt.SetAccesorCannotHaveOptionalParameter),"RestElement"===t.type&&this.raise(this.state.pos,jt.SetAccesorCannotHaveRestParameter)}i.typeAnnotation&&this.raise(i.typeAnnotation.start,jt.SetAccesorCannotHaveReturnType)}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}{const t=s;e&&(t.readonly=!0);const i=this.tsTryParseTypeAnnotation();return i&&(t.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSPropertySignature")}}tsParseTypeMember(){const t=this.startNode();if(this.match(l.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(l._new)){const e=this.startNode();return this.next(),this.match(l.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers(t,["readonly"],["declare","abstract","private","protected","public","static","override"],jt.InvalidModifierOnTypeMember);const e=this.tsTryParseIndexSignature(t);return e||(this.parsePropertyName(t,!1),t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||!this.tsTokenCanFollowModifier()||(t.kind=t.key.name,this.parsePropertyName(t,!1)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){const t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(l.braceL);const t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(l.braceR),t}tsIsStartOfMappedType(){return this.next(),this.eat(l.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(l.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(l._in))))}tsParseMappedTypeParameter(){const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(l._in),this.finishNode(t,"TSTypeParameter")}tsParseMappedType(){const t=this.startNode();return this.expect(l.braceL),this.match(l.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(l.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),t.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(l.bracketR),this.match(l.plusMin)?(t.optional=this.state.value,this.next(),this.expect(l.question)):this.eat(l.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(l.braceR),this.finishNode(t,"TSMappedType")}tsParseTupleType(){const t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let e=!1,s=null;
1return t.elementTypes.forEach((t=>{var i;let{type:r}=t;!e||"TSRestType"===r||"TSOptionalType"===r||"TSNamedTupleMember"===r&&t.optional||this.raise(t.start,jt.OptionalTypeBeforeRequired),e=e||"TSNamedTupleMember"===r&&t.optional||"TSOptionalType"===r,"TSRestType"===r&&(r=(t=t.typeAnnotation).type);const a="TSNamedTupleMember"===r;s=null!=(i=s)?i:a,s!==a&&this.raise(t.start,jt.MixedLabeledAndUnlabeledElements)})),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){const{start:t,startLoc:e}=this.state,s=this.eat(l.ellipsis);let i=this.tsParseType();const r=this.eat(l.question);if(this.eat(l.colon)){const t=this.startNodeAtNode(i);t.optional=r,"TSTypeReference"!==i.type||i.typeParameters||"Identifier"!==i.typeName.type?(this.raise(i.start,jt.InvalidTupleMemberLabel),t.label=i):t.label=i.typeName,t.elementType=this.tsParseType(),i=this.finishNode(t,"TSNamedTupleMember")}else if(r){const t=this.startNodeAtNode(i);t.typeAnnotation=i,i=this.finishNode(t,"TSOptionalType")}if(s){const s=this.startNodeAt(t,e);s.typeAnnotation=i,i=this.finishNode(s,"TSRestType")}return i}tsParseParenthesizedType(){const t=this.startNode();return this.expect(l.parenL),t.typeAnnotation=this.tsParseType(),this.expect(l.parenR),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,e){const s=this.startNode();return"TSConstructorType"===t&&(s.abstract=!!e,e&&this.next(),this.next()),this.tsFillSignature(l.arrow,s),this.finishNode(s,t)}tsParseLiteralTypeNode(){const t=this.startNode();return t.literal=(()=>{switch(this.state.type){case l.num:case l.bigint:case l.string:case l._true:case l._false:return this.parseExprAtom();default:throw this.unexpected()}})(),this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){const t=this.startNode();return t.literal=this.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const t=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case l.name:case l._void:case l._null:{const t=this.match(l._void)?"TSVoidKeyword":this.match(l._null)?"TSNullKeyword":function(t){switch(t){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!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}case l.string:case l.num:case l.bigint:case l._true:case l._false:return this.tsParseLiteralTypeNode();case l.plusMin:if("-"===this.state.value){const t=this.startNode(),e=this.lookahead();if(e.type!==l.num&&e.type!==l.bigint)throw this.unexpected();return t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case l._this:return this.tsParseThisTypeOrThisTypePredicate();case l._typeof:return this.tsParseTypeQuery();case l._import:return this.tsParseImportType();case l.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case l.bracketL:return this.tsParseTupleType();case l.parenL:return this.tsParseParenthesizedType();case l.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}tsParseArrayTypeOrHigher(){let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(l.bracketL);)if(this.match(l.bracketR)){const e=this.startNodeAtNode(t);e.elementType=t,this.expect(l.bracketR),t=this.finishNode(e,"TSArrayType")}else{const e=this.startNodeAtNode(t);e.objectType=t,e.indexType=this.tsParseType(),this.expect(l.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}tsParseTypeOperator(t){const e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,jt.UnexpectedReadonly)}}tsParseInferType(){const t=this.startNode();this.expectContextual("infer");const e=this.startNode();return e.name=this.tsParseTypeParameterName(),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseTypeOperatorOrHigher(){const t=["keyof","unique","readonly"].find((t=>this.isContextual(t)));return t?this.tsParseTypeOperator(t):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}tsParseUnionOrIntersectionType(t,e,s){const i=this.startNode(),r=this.eat(s),a=[];do{a.push(e())}while(this.eat(s));return 1!==a.length||r?(i.types=a,this.finishNode(i,t)):a[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),l.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),l.bitwiseOR)}tsIsStartOfFunctionType(){return!!this.isRelational("<")||this.match(l.parenL)&&this.tsLookAhead(this.tsIsUnambiguou
1slyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(this.match(l.name)||this.match(l._this))return this.next(),!0;if(this.match(l.braceL)){let t=1;for(this.next();t>0;)this.match(l.braceL)?++t:this.match(l.braceR)&&--t,this.next();return!0}if(this.match(l.bracketL)){let t=1;for(this.next();t>0;)this.match(l.bracketL)?++t:this.match(l.bracketR)&&--t,this.next();return!0}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(l.parenR)||this.match(l.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(l.colon)||this.match(l.comma)||this.match(l.question)||this.match(l.eq))return!0;if(this.match(l.parenR)&&(this.next(),this.match(l.arrow)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType((()=>{const e=this.startNode();this.expect(t);const s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(l._this)){let t=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===t.type?(s.parameterName=t,s.asserts=!0,s.typeAnnotation=null,t=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(t,s),t.asserts=!0),e.typeAnnotation=t,this.finishNode(e,"TSTypeAnnotation")}const r=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!r)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,e.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,e);const a=this.tsParseTypeAnnotation(!1);return s.parameterName=r,s.typeAnnotation=a,s.asserts=i,e.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(l.colon)?this.tsParseTypeOrTypePredicateAnnotation(l.colon):void 0}tsTryParseTypeAnnotation(){return this.match(l.colon)?this.tsParseTypeAnnotation():void 0}tsTryParseType(){return this.tsEatThenParseType(l.colon)}tsParseTypePredicatePrefix(){const t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(!this.match(l.name)||"asserts"!==this.state.value||this.hasPrecedingLineBreak())return!1;const t=this.state.containsEsc;return this.next(),!(!this.match(l.name)&&!this.match(l._this))&&(t&&this.raise(this.state.lastTokStart,w.InvalidEscapedReservedWord,"asserts"),!0)}tsParseTypeAnnotation(t=!0,e=this.startNode()){return this.tsInType((()=>{t&&this.expect(l.colon),e.typeAnnotation=this.tsParseType()})),this.finishNode(e,"TSTypeAnnotation")}tsParseType(){_t(this.state.inType);const t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(l._extends))return t;const e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(l.question),e.trueType=this.tsParseType(),this.expect(l.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual("abstract")&&this.lookahead().type===l._new}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(l._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){const t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){const e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,jt.EmptyHeritageClauseType,t),s}tsParseExpressionWithTypeArguments(){const t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}tsParseInterfaceDeclaration(t){this.match(l.name)?(t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript interface declaration",130)):(t.id=null,this.raise(this.state.start,jt.MissingInterfaceName)),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(l._extends)&&(t.extends=this.tsParseHeritageClause("extends"));const e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript type alias",2),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsInType((()=>
1{if(this.expect(l.eq),this.isContextual("intrinsic")&&this.lookahead().type!==l.dot){const t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInNoContext(t){const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}tsInType(t){const e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}tsEatThenParseType(t){return this.match(t)?this.tsNextThenParseType():void 0}tsExpectThenParseType(t){return this.tsDoThenParseType((()=>this.expect(t)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(t){return this.tsInType((()=>(t(),this.tsParseType())))}tsParseEnumMember(){const t=this.startNode();return t.id=this.match(l.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(l.eq)&&(t.initializer=this.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,"typescript enum declaration",e?779:267),this.expect(l.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(l.braceR),this.finishNode(t,"TSEnumDeclaration")}tsParseModuleBlock(){const t=this.startNode();return this.scope.enter(0),this.expect(l.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,l.braceR),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,e=!1){if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,"module or namespace declaration",1024),this.eat(l.dot)){const e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e,!0),t.body=e}else this.scope.enter(G),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(l.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(l.braceL)?(this.scope.enter(G),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,e){t.isExport=e||!1,t.id=this.parseIdentifier(),this.checkLVal(t.id,"import equals declaration",9),this.expect(l.eq);const s=this.tsParseModuleReference();return"type"===t.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(s.start,jt.ImportAliasHasImportType),t.moduleReference=s,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual("require")&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const t=this.startNode();if(this.expectContextual("require"),this.expect(l.parenL),!this.match(l.string))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(l.parenR),this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){const e=this.state.clone(),s=t();return this.state=e,s}tsTryParseAndCatch(t){const e=this.tryParse((e=>t()||e()));if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}tsTryParse(t){const e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}tsTryParseDeclare(t){if(this.isLineTerminator())return;let e,s=this.state.type;return this.isContextual("let")&&(s=l._var,e="let"),this.tsInAmbientContext((()=>{switch(s){case l._function:return t.declare=!0,this.parseFunctionStatement(t,!1,!0);case l._class:return t.declare=!0,this.parseClass(t,!0,!1);case l._const:if(this.match(l._const)&&this.isLookaheadContextual("enum"))return this.expect(l._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case l._var:return e=e||this.state.value,this.parseVarStatement(t,e);case l.name:{const e=this.state.value;return"global"===e?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,e,!0)}}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}
1tsParseExpressionStatement(t,e){switch(e.name){case"declare":{const e=this.tsTryParseDeclare(t);if(e)return e.declare=!0,e;break}case"global":if(this.match(l.braceL)){this.scope.enter(G),this.prodParam.enter(0);const s=t;return s.global=!0,s.id=e,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}tsParseDeclaration(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(l._class)||this.match(l.name)))return this.tsParseAbstractDeclaration(t);break;case"enum":if(s||this.match(l.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminator(s)&&this.match(l.name))return this.tsParseInterfaceDeclaration(t);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(l.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(this.match(l.name))return this.tsParseModuleOrNamespaceDeclaration(t)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&this.match(l.name))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminator(s)&&this.match(l.name))return this.tsParseTypeAliasDeclaration(t)}}tsCheckLineTerminator(t){return t?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t,e){if(!this.isRelational("<"))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const i=this.tsTryParseAndCatch((()=>{const s=this.startNodeAt(t,e);return s.typeParameters=this.tsParseTypeParameters(),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(l.arrow),s}));return this.state.maybeInArrowParameters=s,i?this.parseArrowExpression(i,null,!0):void 0}tsParseTypeArguments(){const t=this.startNode();return t.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expectRelational("<"),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===t.params.length&&this.raise(t.start,jt.EmptyTypeArguments),this.expectRelational(">"),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){if(this.match(l.name))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(t,e){const s=this.state.start,i=this.state.startLoc;let r,a=!1,n=!1;if(void 0!==t){const e={};this.tsParseModifiers(e,["public","private","protected","override","readonly"]),r=e.accessibility,n=e.override,a=e.readonly,!1===t&&(r||a||n)&&this.raise(s,jt.UnexpectedParameterModifier)}const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);const h=this.parseMaybeDefault(o.start,o.loc.start,o);if(r||a||n){const t=this.startNodeAt(s,i);return e.length&&(t.decorators=e),r&&(t.accessibility=r),a&&(t.readonly=a),n&&(t.override=n),"Identifier"!==h.type&&"AssignmentPattern"!==h.type&&this.raise(t.start,jt.UnsupportedParameterPropertyKind),t.parameter=h,this.finishNode(t,"TSParameterProperty")}return e.length&&(o.decorators=e),h}parseFunctionBodyAndFinish(t,e,s=!1){this.match(l.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(l.colon));const i="FunctionDeclaration"===e?"TSDeclareFunction":"ClassMethod"===e?"TSDeclareMethod":void 0;i&&!this.match(l.braceL)&&this.isLineTerminator()?this.finishNode(t,i):"TSDeclareFunction"===i&&this.state.isAmbientContext&&(this.raise(t.start,jt.DeclareFunctionHasImplementation),t.declare)?super.parseFunctionBodyAndFinish(t,i,s):super.parseFunctionBodyAndFinish(t,e,s)}registerFunctionStatementId(t){!t.body&&t.id?this.checkLVal(t.id,"function name",1024):super.registerFunctionStatementId(...arguments)}tsCheckForInvalidTypeCasts(t){t.forEach((t=>{"TSTypeCastExpression"===(null==t?void 0:t.type)&&this.raise(t.typeAnnotation.start,jt.UnexpectedTypeAnnotation)}))}toReferencedList(t,e){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(...t){const e=super.parseArrayLike(...t);return"ArrayExpression"===e.type&&this.tsCheckForInvalidTypeCasts(e.elements),e}parseSubscript(t,e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(l.bang)){this.state.exprAllowed=!1,this.next();const i=this.startNodeAt(e,s);return i.expression=t,this.finishNode(i,"TSNonNullExpression")}let a=!1;if(this.match(l.questionDot)&&60===this.lookaheadCharCode()){if(i)return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}if(this.isRelational("<")){let n;const o=this.tsTryParseAndCatch((()=>
1{if(!i&&this.atPossibleAsyncArrow(t)){const t=this.tsTryParseGenericAsyncArrowFunction(e,s);if(t)return t}const o=this.startNodeAt(e,s);o.callee=t;const h=this.tsParseTypeArguments();if(h){if(a&&!this.match(l.parenL)&&(n=this.state.pos,this.unexpected()),!i&&this.eat(l.parenL))return o.arguments=this.parseCallExpressionArguments(l.parenR,!1),this.tsCheckForInvalidTypeCasts(o.arguments),o.typeParameters=h,r.optionalChainMember&&(o.optional=a),this.finishCallExpression(o,r.optionalChainMember);if(this.match(l.backQuote)){const i=this.parseTaggedTemplateExpression(t,e,s,r);return i.typeParameters=h,i}}this.unexpected()}));if(n&&this.unexpected(n,l.parenL),o)return o}return super.parseSubscript(t,e,s,i,r)}parseNewArguments(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch((()=>{const t=this.tsParseTypeArguments();return this.match(l.parenL)||this.unexpected(),t}));e&&(t.typeParameters=e)}super.parseNewArguments(t)}parseExprOp(t,e,s,i){if(Bt(l._in.binop)>i&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){const r=this.startNodeAt(e,s);r.expression=t;const a=this.tsTryNextParseConstantContext();return r.typeAnnotation=a||this.tsNextThenParseType(),this.finishNode(r,"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(r,e,s,i)}return super.parseExprOp(t,e,s,i)}checkReservedWord(t,e,s,i){}checkDuplicateExports(){}parseImport(t){if(t.importKind="value",this.match(l.name)||this.match(l.star)||this.match(l.braceL)){let e=this.lookahead();if(!this.isContextual("type")||e.type===l.comma||e.type===l.name&&"from"===e.value||e.type===l.eq||(t.importKind="type",this.next(),e=this.lookahead()),this.match(l.name)&&e.type===l.eq)return this.tsParseImportEqualsDeclaration(t)}const e=super.parseImport(t);return"type"===e.importKind&&e.specifiers.length>1&&"ImportDefaultSpecifier"===e.specifiers[0].type&&this.raise(e.start,jt.TypeImportCannotSpecifyDefaultAndNamed),e}parseExport(t){if(this.match(l._import))return this.next(),this.isContextual("type")&&61!==this.lookaheadCharCode()?(t.importKind="type",this.next()):t.importKind="value",this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(l.eq)){const e=t;return e.expression=this.parseExpression(),this.semicolon(),this.finishNode(e,"TSExportAssignment")}if(this.eatContextual("as")){const e=t;return this.expectContextual("namespace"),e.id=this.parseIdentifier(),this.semicolon(),this.finishNode(e,"TSNamespaceExportDeclaration")}return this.isContextual("type")&&this.lookahead().type===l.braceL?(this.next(),t.exportKind="type"):t.exportKind="value",super.parseExport(t)}isAbstractClass(){return this.isContextual("abstract")&&this.lookahead().type===l._class}parseExportDefaultExpression(){if(this.isAbstractClass()){const t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0),t}if("interface"===this.state.value){const t=this.startNode();this.next();const e=this.tsParseInterfaceDeclaration(t);if(e)return e}return super.parseExportDefaultExpression()}parseStatementContent(t,e){if(this.state.type===l._const){const t=this.lookahead();if(t.type===l.name&&"enum"===t.value){const t=this.startNode();return this.expect(l._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0)}}return super.parseStatementContent(t,e)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,e){return e.some((e=>Ut(e)?t.accessibility===e:!!t[e]))}parseClassMember(t,e,s){const i=["declare","private","public","protected","override","abstract","readonly"];this.tsParseModifiers(e,i.concat(["static"]));const r=()=>{const r=!!e.static;r&&this.eat(l.braceL)?(this.tsHasSomeModifiers(e,i)&&this.raise(this.state.pos,jt.StaticBlockCannotHaveModifier),this.parseClassStaticBlock(t,e)):this.parseClassMemberWithIsStatic(t,e,s,r)};e.declare?this.tsInAmbientContext(r):r()}parseClassMemberWithIsStatic(t,e,s,i){const r=this.tsTryParseIndexSignature(e);if(r)return t.body.push(r),e.abstract&&this.raise(e.start,jt.IndexSignatureHasAbstract),e.accessibility&&this.raise(e.start,jt.IndexSignatureHasAccessibility,e.accessibility),e.declare&&this.raise(e.start,jt.IndexSignatureHasDeclare),void(e.override&&this.raise(e.start,jt.IndexSignatureHasOverride));!this.state.inAbstractClass&&e.abstract&&this.raise(e.start,jt.NonAbstractClassHasAb
1stractMethod),e.override&&(s.hadSuperClass||this.raise(e.start,jt.OverrideNotInSubClass)),super.parseClassMemberWithIsStatic(t,e,s,i)}parsePostMemberNameModifiers(t){this.eat(l.question)&&(t.optional=!0),t.readonly&&this.match(l.parenL)&&this.raise(t.start,jt.ClassMethodHasReadonly),t.declare&&this.match(l.parenL)&&this.raise(t.start,jt.ClassMethodHasDeclare)}parseExpressionStatement(t,e){return("Identifier"===e.type?this.tsParseExpressionStatement(t,e):void 0)||super.parseExpressionStatement(t,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(t,e,s,i){if(!this.state.maybeInArrowParameters||!this.match(l.question))return super.parseConditional(t,e,s,i);const r=this.tryParse((()=>super.parseConditional(t,e,s)));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),t)}parseParenItem(t,e,s){if(t=super.parseParenItem(t,e,s),this.eat(l.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(l.colon)){const i=this.startNodeAt(e,s);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t}parseExportDeclaration(t){const e=this.state.start,s=this.state.startLoc,i=this.eatContextual("declare");if(i&&(this.isContextual("declare")||!this.shouldParseExportDeclaration()))throw this.raise(this.state.start,jt.ExpectedAmbientAfterExportDeclare);let r;return this.match(l.name)&&(r=this.tsTryParseExportDeclaration()),r||(r=super.parseExportDeclaration(t)),r&&("TSInterfaceDeclaration"===r.type||"TSTypeAliasDeclaration"===r.type||i)&&(t.exportKind="type"),r&&i&&(this.resetStartLocation(r,e,s),r.declare=!0),r}parseClassId(t,e,s){if((!e||s)&&this.isContextual("implements"))return;super.parseClassId(t,e,s,t.declare?1024:139);const i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i)}parseClassPropertyAnnotation(t){!t.optional&&this.eat(l.bang)&&(t.definite=!0);const e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&this.match(l.eq)&&this.raise(this.state.start,jt.DeclareClassFieldHasInitializer),t.abstract&&this.match(l.eq)){const{key:e}=t;this.raise(this.state.start,jt.AbstractPropertyHasInitializer,"Identifier"!==e.type||t.computed?`[${this.input.slice(e.start,e.end)}]`:e.name)}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(t.start,jt.PrivateElementHasAbstract),t.accessibility&&this.raise(t.start,jt.PrivateElementHasAccessibility,t.accessibility),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}pushClassMethod(t,e,s,i,r,a){const n=this.tsTryParseTypeParameters();n&&r&&this.raise(n.start,jt.ConstructorHasTypeParameters),!e.declare||"get"!==e.kind&&"set"!==e.kind||this.raise(e.start,jt.DeclareAccessor,e.kind),n&&(e.typeParameters=n),super.pushClassMethod(t,e,s,i,r,a)}pushClassPrivateMethod(t,e,s,i){const r=this.tsTryParseTypeParameters();r&&(e.typeParameters=r),super.pushClassPrivateMethod(t,e,s,i)}parseClassSuper(t){super.parseClassSuper(t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,...e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseObjPropValue(t,...e)}parseFunctionParams(t,e){const s=this.tsTryParseTypeParameters();s&&(t.typeParameters=s),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),"Identifier"===t.id.type&&this.eat(l.bang)&&(t.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(t.id.typeAnnotation=s,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){return this.match(l.colon)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,e)}parseMaybeAssign(...t){var e,s,i,r,a,n,o;let h,p,c,u;if(this.hasPlugin("jsx")&&(this.match(l.jsxTagStart)||this.isRelational("<"))){if(h=this.state.clone(),p=this.tryParse((()=>super.parseMaybeAssign(...t)),h),!p.error)return p.node;const{context:e}=this.state;e[e.length-1]===C.j_oTag?e.length-=2:e[e.length-1]===C.j_expr&&(e.length-=1)}if((null==(e=p)||!e.error)&&!this.isRelational("<"))return super.parseMaybeAssign(...t);h=h||this.state.clone();const d=this.tryParse((e=>{var s,i;u=this.tsParseTypeParameters();const r=super.parseMaybeAssign(...t);return("ArrowFunctionExpression"!==r.type||null!=(s=r.extra)&&s.parenthesized)&&e(),0!==(null==(i=u)?void 0:i.params.length)&&this.resetStartLocationFromNode(r,u),r.typeParameters=u,r}),h);if(!d.error&&!d.aborted)return d.node;if(!p&&(_t(!this.hasPlugin("jsx")),c=this.tryParse((()=>super.parseMaybeAssign(...t)),h),!c.error))return c.node;if(null!=(s=p)&&s.node)return this.state=p.failState,p.node;
1if(d.node)return this.state=d.failState,d.node;if(null!=(i=c)&&i.node)return this.state=c.failState,c.node;if(null!=(r=p)&&r.thrown)throw p.error;if(d.thrown)throw d.error;if(null!=(a=c)&&a.thrown)throw c.error;throw(null==(n=p)?void 0:n.error)||d.error||(null==(o=c)?void 0:o.error)}parseMaybeUnary(t){return!this.hasPlugin("jsx")&&this.isRelational("<")?this.tsParseTypeAssertion():super.parseMaybeUnary(t)}parseArrow(t){if(this.match(l.colon)){const e=this.tryParse((t=>{const e=this.tsParseTypeOrTypePredicateAnnotation(l.colon);return!this.canInsertSemicolon()&&this.match(l.arrow)||t(),e}));if(e.aborted)return;e.thrown||(e.error&&(this.state=e.failState),t.returnType=e.node)}return super.parseArrow(t)}parseAssignableListItemTypes(t){this.eat(l.question)&&("Identifier"===t.type||this.state.isAmbientContext||this.state.inType||this.raise(t.start,jt.PatternIsOptional),t.optional=!0);const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}isAssignable(t,e){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,e);case"TSParameterProperty":return!0;default:return super.isAssignable(t,e)}}toAssignable(t,e=!1){switch(t.type){case"TSTypeCastExpression":return super.toAssignable(this.t
1ypeCastToParameter(t),e);case"TSParameterProperty":default:return super.toAssignable(t,e);case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(t,e);case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return t.expression=this.toAssignable(t.expression,e),t}}toAssignableParenthesizedExpression(t,e){switch(t.expression.type){case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return t.expression=this.toAssignable(t.expression,e),t;default:return super.toAssignable(t,e)}}checkLVal(t,e,...s){var i;switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,"parameter property",...s);case"TSAsExpression":case"TSTypeAssertion":if(!s[0]&&"parenthesized expression"!==e&&(null==(i=t.extra)||!i.parenthesized)){this.raise(t.start,w.InvalidLhs,e);break}return void this.checkLVal(t.expression,"parenthesized expression",...s);case"TSNonNullExpression":return void this.checkLVal(t.expression,e,...s);default:return void super.checkLVal(t,e,...s)}}parseBindingAtom(){return this.state.type===l._this?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t){if(this.isRelational("<")){const e=this.tsParseTypeArguments();if(this.match(l.parenL)){const s=super.parseMaybeDecoratorArguments(t);return s.typeParameters=e,s}this.unexpected(this.state.start,l.parenL)}return super.parseMaybeDecoratorArguments(t)}checkCommaAfterRest(t){this.state.isAmbientContext&&this.match(l.comma)&&this.lookaheadCharCode()===t?this.next():super.checkCommaAfterRest(t)}isClassMethod(){return this.isRelational("<")||super.isClassMethod()}isClassProperty(){return this.match(l.bang)||this.match(l.colon)||super.isClassProperty()}parseMaybeDefault(...t){const e=super.parseMaybeDefault(...t);return"AssignmentPattern"===e.type&&e.typeAnnotation&&e.right.start<e.typeAnnotation.start&&this.raise(e.typeAnnotation.start,jt.TypeAnnotationAfterAssign),e}getTokenFromCode(t){return!this.state.inType||62!==t&&60!==t?super.getTokenFromCode(t):this.finishOp(l.relational,1)}reScan_lt_gt(){if(this.match(l.relational)){const t=this.input.charCodeAt(this.state.start);60!==t&&62!==t||(this.state.pos-=1,this.readToken_lt_gt(t))}}toAssignableList(t){for(let e=0;e<t.length;e++){const s=t[e];if(s)switch(s.type){case"TSTypeCastExpression":t[e]=this.typeCastToParameter(s);break;case"TSAsExpression":case"TSTypeAssertion":this.state.maybeInArrowParameters?this.raise(s.start,jt.UnexpectedTypeCastInParameter):t[e]=this.typeCastToParameter(s)}}return super.toAssignableList(...arguments)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(l.colon)?t.every((t=>this.isAssignable(t,!0))):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(l.colon)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.isRelational("<")){const e=this.tsTryParseAndCatch((()=>this.tsParseTypeArguments()));e&&(t.typeParameters=e)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){const e=super.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t)[0];return s&&this.isThisParam(s)?e+1:e}parseCatchClauseParam(){const t=super.parseCatchClauseParam(),e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e,this.resetEndLocation(t)),t}tsInAmbientContext(t){const e=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return t()}finally{this.state.isAmbientContext=e}}parseClass(t,...e){const s=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,...e)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(t){if(this.match(l._class))return t.abstract=!0,this.parseClass(t,!0,!1);if(this.isContextual("interface")){if(!this.hasFollowingLineBreak())return t.abstract=!0,this.raise(t.start,jt.NonClassMethodPropertyHasAbstractModifer),this.next(),this.tsParseInterfaceDeclaration(t)}else this.unexpected(null,l._class)}parseMethod(...t){const e=super.parseMethod(...t);if(e.abstract){if(this.hasPlugin("estree")?!!e.value.body:!!e.body){const{key:t}=e;this.raise(e.start,jt.AbstractMethodHasImplementation,"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name)}}return e}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}},v8intrinsic:t=>class extends t{parseV8Intrinsic(){if(this.match(l.modulo)){const t=this.state.start,e=this.startNode();if(this.eat(l.modulo),this.match(l.name)){const t=this.parseIdentifierName(this.state.start),s=this.createIdentifier(e,t);if(s.type="V8IntrinsicIdentifier",this.match(l.parenL))return s}this.unexpected(t)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}},placeholders:t=>class extends t{parsePlaceholder(t){if(this.match(l.placeholder)){const e=this.startNode();return this.next(),this.assertNoSpace("Unexpected space in placeholder."),e.name=super.parseIdentifier(!0),this.assertNoSpace("Unexpected space in placeholder."),this.expect(l.placeholder),this.finishPlaceholder(e,t)}}finishPlaceholder(t,e){const s=!(!t.expectedNode||"Placeholder"!==t.type);return t.expectedNode=e,s?t:this.finishNode(t,"Placeholder")}getTokenFromCode(t){return 37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.placeholder,2):super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(t){void 0!==t&&super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}checkLVal(t){"Placeholder"!==t.type&&super.checkLVal(...arguments)}toAssignable(t){return t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?(t.expectedNode="Pattern",t):super.toAssignable(...arguments)}isLet(t){if(super.isLet(t))return!0;
1if(!this.isContextual("let"))return!1;if(t)return!1;return this.lookahead().type===l.placeholder}verifyBreakContinue(t){t.label&&"Placeholder"===t.label.type||super.verifyBreakContinue(...arguments)}parseExpressionStatement(t,e){if("Placeholder"!==e.type||e.extra&&e.extra.parenthesized)return super.parseExpressionStatement(...arguments);if(this.match(l.colon)){const s=t;return s.label=this.finishPlaceholder(e,"Identifier"),this.next(),s.body=this.parseStatement("label"),this.finishNode(s,"LabeledStatement")}return this.semicolon(),t.name=e.name,this.finishPlaceholder(t,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(t,e,s){const i=e?"ClassDeclaration":"ClassExpression";this.next(),this.takeDecorators(t);const r=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(l._extends)||this.match(l.placeholder)||this.match(l.braceL))t.id=a;else{if(s||!e)return t.id=null,t.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(t,i);this.unexpected(null,qt.ClassNameIsRequired)}else this.parseClassId(t,e,s);return this.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!t.superClass,r),this.finishNode(t,i)}parseExport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseExport(...arguments);if(!this.isContextual("from")&&!this.match(l.comma))return t.specifiers=[],t.source=null,t.declaration=this.finishPlaceholder(e,"Declaration"),this.finishNode(t,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=e,t.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(t)}isExportDefaultSpecifier(){if(this.match(l._default)){const t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(l.placeholder.label,this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t){return!!(t.specifiers&&t.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(t){const{specifiers:e}=t;null!=e&&e.length&&(t.specifiers=e.filter((t=>"Placeholder"===t.exported.type))),super.checkExport(t),t.specifiers=e}parseImport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseImport(...arguments);if(t.specifiers=[],!this.isContextual("from")&&!this.match(l.comma))return t.source=this.finishPlaceholder(e,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");const s=this.startNodeAtNode(e);if(s.local=e,this.finishNode(s,"ImportDefaultSpecifier"),t.specifiers.push(s),this.eat(l.comma)){this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)}return this.expectContextual("from"),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}}},Xt=Object.keys(Jt),Gt={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 Qt=t=>"ParenthesizedExpression"===t.type?Qt(t.expression):t;const Yt={kind:"loop"},$t={kind:"switch"},Zt=/[\uD800-\uDFFF]/u,te=/in(?:stanceof)?/y;class ee extends class extends class extends class extends class extends class extends class extends class extends class extends class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){return this.plugins.has(t)}getPluginOption(t,e){if(this.hasPlugin(t))return this.plugins.get(t)[e]}}{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.comments.push(t)}processComment(t){const{commentStack:e}=this.state,s=e.length;if(0===s)return;let i=s-1;const r=e[i];r.start===t.end&&(r.leadingNode=t,i--);const{start:a}=t;for(;i>=0;i--){const s=e[i],r=s.end;if(!(r>
1a)){r===a&&(s.trailingNode=t);break}s.containingNode=t,this.finalizeComment(s),e.splice(i,1)}}finalizeComment(t){const{comments:e}=t;if(null!==t.leadingNode||null!==t.trailingNode)null!==t.leadingNode&&b(t.leadingNode,e),null!==t.trailingNode&&(t.trailingNode.leadingComments=e);else{const{containingNode:s,start:i}=t;if(44===this.input.charCodeAt(i-1))switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":T(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":T(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":T(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":T(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":T(s,s.specifiers,t);break;default:g(s,e)}else g(s,e)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:s}=e;if(0===s)return;const i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}}{getLocationForPosition(t){let e;return e=t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){let s,i=1,r=0;for(d.lastIndex=0;(s=d.exec(t))&&s.index<e;)i++,r=d.lastIndex;return new x(i,e-r)}(this.input,t),e}raise(t,{code:e,reasonCode:s,template:i},...r){return this.raiseWithData(t,{code:e,reasonCode:s},i,...r)}raiseOverwrite(t,{code:e,template:s},...i){const r=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,((t,e)=>i[e]))+` (${r.line}:${r.column})`;if(this.options.errorRecovery){const e=this.state.errors;for(let s=e.length-1;s>=0;s--){const i=e[s];if(i.pos===t)return Object.assign(i,{message:a});if(i.pos<t)break}}return this._raise({code:e,loc:r,pos:t},a)}raiseWithData(t,e,s,...i){const r=this.getLocationForPosition(t),a=s.replace(/%(\d+)/g,((t,e)=>i[e]))+` (${r.line}:${r.column})`;return this._raise(Object.assign({loc:r,pos:t},e),a)}_raise(t,e){const s=new SyntaxError(e);if(Object.assign(s,t),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(s),s;throw s}}{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.state=new rt,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new pt(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(t){return!!this.match(t)&&(this.next(),!0)}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,lastTokEnd:t.end,context:[this.curContext()],inType:t.inType}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){f.lastIndex=t;return t+f.exec(this.input)[0].length}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if(55296===(64512&e)&&++t<this.input.length){const s=this.input.charCodeAt(t);56320===(64512&s)&&(e=65536+((1023&e)<<10)+(1023&s))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(((t,e)=>this.raise(e,t))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){const t=this.curContext();t.preserveSpace||this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(l.eof):t===C.template?this.readTmplToken():this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(){let t;this.isLookahead||(t=this.state.curPosition());const e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+2);if(-1===s)throw this.raise(e,w.UnterminatedComment);let i;for(this.state.pos=s+2,d.lastIndex=e;(i=d.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;if(this.isLookahead)return;const r={type:"CommentBlock",value:this.input.slice(e+2,s),start:e,end:s+2,loc:new P(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(t){const e=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!m(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const r=this.state.pos,a={type:"CommentLine",value:this.input.slice(e+t,r),start:e,end:r,loc:new P(s,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){const t=this.state.pos,e=[];t:for(;this.state.pos<this.length;){const s=this.input.charCodeAt(this.state.pos);switch(s){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 t=this.skipBlockComment();void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t));break}case 47:{const t=this.skipLineComment(2);void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t));break}default:break t}break;default:if(y(s))++this.state.pos;else if(45!==s||this.inModule){if(60!==s||this.inModule)break t;{const t=this.state.pos;if(33!==this.input.charCodeAt(t+1)||45!==this.input.charCodeAt(t+2)||45!==this.input.charCodeAt(t+3))break t;{const t=this.skipLineComment(4);void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t))}}}else{const s=this.state.pos;if(45!==this.input.charCodeAt(s+1)||62!==this.input.charCodeAt(s+2)||!(0===t||this.state.lineStart>t))break t;{const t=this.skipLineComment(3);void 0!==t&&(this.addComment(t),this.options.attachComment&&e.push(t))}}}}if(e.length>0){const s={start:t,end:this.state.pos,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(t,e){this.state.end=this.state.pos;const s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||(this.state.endLoc=this.state.curPosition(),this.updateContext(s))}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(this.state.pos,w.UnexpectedDigitAfterHash);if(123===e||91===e&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"hash"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,123===e?w.RecordExpressionH
1ashIncorrectStartSyntaxType:w.TupleExpressionHashIncorrectStartSyntaxType);this.state.pos+=2,123===e?this.finishToken(l.braceHashL):this.finishToken(l.bracketHashL)}else O(e)?(++this.state.pos,this.finishToken(l.privateName,this.readWord1(e))):92===e?(++this.state.pos,this.finishToken(l.privateName,this.readWord1())):this.finishOp(l.hash,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(l.ellipsis)):(++this.state.pos,this.finishToken(l.dot))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.slashAssign,2):this.finishOp(l.slash,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(33!==t)return!1;const e=this.state.pos;for(this.state.pos+=1;!m(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);const s=this.input.slice(e+2,this.state.pos);return this.finishToken(l.interpreterDirective,s),!0}readToken_mult_modulo(t){let e=42===t?l.star:l.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1);42===t&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=l.exponent),61!==i||this.state.inType||(s++,e=37===t?l.moduloAssign:l.assign),this.finishOp(e,s)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(l.pipeline,2);if(this.hasPlugin("recordAndTuple")&&125===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,w.RecordExpressionBarIncorrectEndSyntaxType);return this.state.pos+=2,void this.finishToken(l.braceBarR)}if(this.hasPlugin("recordAndTuple")&&93===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(this.state.pos,w.TupleExpressionBarIncorrectEndSyntaxType);return this.state.pos+=2,void this.finishToken(l.bracketBarR)}}61!==e?this.finishOp(124===t?l.bitwiseOR:l.bitwiseAND,1):this.finishOp(l.assign,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(l.assign,3):this.finishOp(124===t?l.logicalOR:l.logicalAND,2)}readToken_caret(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.assign,2):this.finishOp(l.bitwiseXOR,1)}readToken_plus_min(t){const e=this.input.charCodeAt(this.state.pos+1);e!==t?61===e?this.finishOp(l.assign,2):this.finishOp(l.plusMin,1):this.finishOp(l.incDec,2)}readToken_lt_gt(t){const e=this.input.charCodeAt(this.state.pos+1);let s=1;if(e===t)return s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?void this.finishOp(l.assign,s+1):void this.finishOp(l.bitShift,s);61===e&&(s=2),this.finishOp(l.relational,s)}readToken_eq_excl(t){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(l.arrow)):void this.finishOp(61===t?l.eq:l.bang,1);
1this.finishOp(l.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63===t?61===e?this.finishOp(l.assign,3):this.finishOp(l.nullishCoalescing,2):46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(l.question)):(this.state.pos+=2,this.finishToken(l.questionDot))}getTokenFromCode(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(l.parenL);case 41:return++this.state.pos,void this.finishToken(l.parenR);case 59:return++this.state.pos,void this.finishToken(l.semi);case 44:return++this.state.pos,void this.finishToken(l.comma);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,w.TupleExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(l.bracketBarL)}else++this.state.pos,this.finishToken(l.bracketL);return;case 93:return++this.state.pos,void this.finishToken(l.bracketR);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,w.RecordExpressionBarIncorrectStartSyntaxType);this.state.pos+=2,this.finishToken(l.braceBarL)}else++this.state.pos,this.finishToken(l.braceL);return;case 125:return++this.state.pos,void this.finishToken(l.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(l.doubleColon,2):(++this.state.pos,this.finishToken(l.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(l.backQuote);case 48:{const t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(l.tilde,1);case 64:return++this.state.pos,void this.finishToken(l.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(O(t))return void this.readWord(t)}throw this.raise(this.state.pos,w.InvalidOrUnexpectedToken,String.fromCodePoint(t))}finishOp(t,e){const s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){const t=this.state.start+1;let e,s,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(t,w.UnterminatedRegExp);const r=this.input.charCodeAt(i);if(m(r))throw this.raise(t,w.UnterminatedRegExp);if(e)e=!1;else{if(91===r)s=!0;else if(93===r&&s)s=!1;else if(47===r&&!s)break;e=92===r}}const r=this.input.slice(t,i);++i;let a="";for(;i<this.length;){const t=this.codePointAtPos(i),e=String.fromCharCode(t);if(nt.has(t))a.includes(e)&&this.raise(i+1,w.DuplicateRegExpFlags);else{if(!F(t)&&92!==t)break;this.raise(i+1,w.MalformedRegExpFlags)}++i,a+=e}this.state.pos=i,this.finishToken(l.regexp,{pattern:r,flags:a})}readInt(t,e,s,i=!0){const r=this.state.pos,a=16===t?ot.hex:ot.decBinOct,n=16===t?ht.hex:10===t?ht.dec:8===t?ht.oct:ht.bin;let o=!1,h=0;for(let p=0,c=null==e?1/0:e;p<c;++p){const e=this.input.charCodeAt(this.state.pos);let r;if(95!==e){if(r=e>=97?e-97+10:e>=65?e-65+10:at(e)?e-48:1/0,r>=t)if(this.options.errorRecovery&&r<=9)r=0,this.raise(this.state.start+p+2,w.InvalidDigit,t);else{if(!s)break;r=0,o=!0}++this.state.pos,h=h*t+r}else{const t=this.input.charCodeAt(this.state.pos-1),e=this.input.charCodeAt(this.state.pos+1);(-1===n.indexOf(e)||a.indexOf(t)>-1||a.indexOf(e)>-1||Number.isNaN(e))&&this.raise(this.state.pos,w.UnexpectedNumericSeparator),i||this.raise(this.state.pos,w.NumericSeparatorInEscapeSequence),++this.state.pos}}return this.state.pos===r||null!=e&&this.state.pos-r!==e||o?null:h}readRadixNumber(t){const e=this.state.pos;let s=!1;this.state.pos+=2;const i=this.readInt(t);
1null==i&&this.raise(this.state.start+2,w.InvalidDigit,t);const r=this.input.charCodeAt(this.state.pos);if(110===r)++this.state.pos,s=!0;else if(109===r)throw this.raise(e,w.InvalidDecimal);if(O(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,w.NumberIdentifier);if(s){const t=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(l.bigint,t)}else this.finishToken(l.num,i)}readNumber(t){const e=this.state.pos;let s=!1,i=!1,r=!1,a=!1,n=!1;t||null!==this.readInt(10)||this.raise(e,w.InvalidNumber);const o=this.state.pos-e>=2&&48===this.input.charCodeAt(e);if(o){const t=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(e,w.StrictOctalLiteral),!this.state.strict){const s=t.indexOf("_");s>0&&this.raise(s+e,w.ZeroDigitNumericSeparator)}n=o&&!/[89]/.test(t)}let h=this.input.charCodeAt(this.state.pos);if(46!==h||n||(++this.state.pos,this.readInt(10),s=!0,h=this.input.charCodeAt(this.state.pos)),69!==h&&101!==h||n||(h=this.input.charCodeAt(++this.state.pos),43!==h&&45!==h||++this.state.pos,null===this.readInt(10)&&this.raise(e,w.InvalidOrMissingExponent),s=!0,a=!0,h=this.input.charCodeAt(this.state.pos)),110===h&&((s||o)&&this.raise(e,w.InvalidBigIntLiteral),++this.state.pos,i=!0),109===h&&(this.expectPlugin("decimal",this.state.pos),(a||o)&&this.raise(e,w.InvalidDecimal),++this.state.pos,r=!0),O(this.codePointAtPos(this.state.pos)))throw this.raise(this.state.pos,w.NumberIdentifier);const p=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i)return void this.finishToken(l.bigint,p);if(r)return void this.finishToken(l.decimal,p);const c=n?parseInt(p,8):parseFloat(p);this.finishToken(l.num,c)}readCodePoint(t){let e;if(123===this.input.charCodeAt(this.state.pos)){const s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,t),++this.state.pos,null!==e&&e>1114111){if(!t)return null;this.raise(s,w.InvalidCodePoint)}}else e=this.readHexChar(4,!1,t);return e}readString(t){let e="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,w.UnterminatedString);const i=this.input.charCodeAt(this.state.pos);if(i===t)break;if(92===i)e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===i||8233===i)++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;else{if(m(i))throw this.raise(this.state.start,w.UnterminatedString);++this.state.pos}}e+=this.input.slice(s,this.state.pos++),this.finishToken(l.string,e)}readTmplToken(){let t="",e=this.state.pos,s=!1;for(;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,w.UnterminatedTemplate);const i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(l.template)?36===i?(this.state.pos+=2,void this.finishToken(l.dollarBraceL)):(++this.state.pos,void this.finishToken(l.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(l.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);const i=this.readEscapedChar(!0);null===i?s=!0:t+=i,e=this.state.pos}else if(m(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}recordStrictModeErrors(t,e){this.state.strict&&!this.state.strictErrors.has(t)?this.raise(t,e):this.state.strictErrors.set(t,e)}readEscapedChar(t){const e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:{const t=this.readHexChar(2,!1,e);return null===t?null:String.fromCharCode(t)}case 117:{const t=this.readCodePoint(e);return null===t?null:String.fromCodePoint(t)}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(t)return null;this.recordStrictModeErrors(this.state.pos-1,w.StrictNumericEscape);default:if(s>=48&&s<=55){const e=this.state.pos-1;let s=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(s,8);i>255&&(s=s.slice(0,-1),i=parseInt(s,8)),this.state.pos+=s.length-1;const r=this.input.charCodeAt(this.state.pos);if("0"!==s||56===r||57===r){if(t)return null;this.recordStrictModeErrors(e,w.StrictNumericEscape)}return String.fromCharCode(i)}return String.fromCharCode(s)}}readHexChar(t,e,s){const i=this.state.pos,r=this.readInt(16,t,e,!1);return null===r&&(s?this.raise(i,w.InvalidEscapeSequence):this.state.pos=i-1),r}readWord1(t){this.state.containsEsc=!1;let e="";const s=this.state.pos;let i=this.state.pos;for(void 0!==t&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){const t=this.codePointAtPos(this.state.pos);if(F(t))this.state.pos+=t<=65535?1:2;else{if(92!==t)break;{this.state.containsEsc=!0,e+=this.input.slice(i,this.state.pos);const t=this.state.pos,r=this.state.pos===s?O:F;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(this.state.pos,w.MissingUnicodeEscape),i=this.state.pos-1;continue}++this.state.pos;const a=this.readCodePoint(!0);null!==a&&(r(a)||this.raise(t,w.EscapedCharNotAnIdentifier),e+=String.fromCodePoint(a)),i=this.state.pos}}}return e+this.input.slice(i,this.state.pos)}readWord(t){const e=this.readWord1(t),s=h.get(e)||l.name;this.finishToken(s,e)}checkKeywordEscapes(){const t=this.state.type.keyword;t&&this.state.containsEsc&&this.raise(this.state.start,w.InvalidEscapedReservedWord,t)}updateContext(t){var e,s;null==(e=(s=this.state.type).updateContext)||e.call(s,this.state.context)}}{addExtra(t,e,s){if(!t)return;(t.extra=t.extra||{})[e]=s}isRelational(t){return this.match(l.relational)&&this.state.value===t}expectRelational(t){this.isRelational(t)?this.next():this.unexpected(null,l.relational)}isContextual(t){return this.match(l.name)&&this.state.value===t&&!this.state.containsEsc}isUnparsedContextual(t,e){const s=t+e.length;if(this.input.slice(t,s)===e){const t=this.input.charCodeAt(s);return!(F(t)||55296===(64512&t))}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)&&this.eat(l.name)}
1expectContextual(t,e){this.eatContextual(t)||this.unexpected(null,e)}canInsertSemicolon(){return this.match(l.eof)||this.match(l.braceR)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return u.test(this.input.slice(this.state.lastTokEnd,this.state.start))}hasFollowingLineBreak(){return u.test(this.input.slice(this.state.end,this.nextTokenStart()))}isLineTerminator(){return this.eat(l.semi)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(l.semi))||this.raise(this.state.lastTokEnd,w.MissingSemicolon)}expect(t,e){this.eat(t)||this.unexpected(e,t)}assertNoSpace(t="Unexpected space."){this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,{code:A.SyntaxError,reasonCode:"UnexpectedSpace",template:t})}unexpected(t,e={code:A.SyntaxError,reasonCode:"UnexpectedToken",template:"Unexpected token"}){throw e instanceof o&&(e={code:A.SyntaxError,reasonCode:"UnexpectedToken",template:`Unexpected token, expected "${e.label}"`}),this.raise(null!=t?t:this.state.start,e)}expectPlugin(t,e){if(!this.hasPlugin(t))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:[t]},`This experimental syntax requires enabling the parser plugin: '${t}'`);return!0}expectOnePlugin(t,e){if(!t.some((t=>this.hasPlugin(t))))throw this.raiseWithData(null!=e?e:this.state.start,{missingPlugin:t},`This experimental syntax requires enabling one of the following parser plugin(s): '${t.join(", ")}'`)}tryParse(t,e=this.state.clone()){const s={node:null};try{const i=t(((t=null)=>{throw s.node=t,s}));if(this.state.errors.length>e.errors.length){const t=this.state;return this.state=e,this.state.tokensLength=t.tokensLength,{node:i,error:t.errors[e.errors.length],thrown:!1,aborted:!1,failState:t}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){const t=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:t};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:t};throw i}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssign:s,doubleProto:i,optionalParameters:r}=t;if(!e)return s>=0||i>=0||r>=0;s>=0&&this.unexpected(s),i>=0&&this.raise(i,w.DuplicateProto),r>=0&&this.unexpected(r)}isLiteralPropertyName(){return this.match(l.name)||!!this.state.type.keyword||this.match(l.string)||this.match(l.num)||this.match(l.bigint)||this.match(l.decimal)}isPrivateName(t){return"PrivateName"===t.type}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&this.isPrivateName(t.property)}isOptionalChain(t){return"OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type}isObjectProperty(t){return"ObjectProperty"===t.type}isObjectMethod(t){return"ObjectMethod"===t.type}initializeScopes(t="module"===this.options.sourceType){const e=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=t;const r=this.scope,a=this.getScopeHandler();this.scope=new a(this.raise.bind(this),this.inModule);const n=this.prodParam;this.prodParam=new yt;const o=this.classScope;this.classScope=new lt(this.raise.bind(this));const h=this.expressionScope;return this.expressionScope=new mt(this.raise.bind(this)),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=n,this.classScope=o,this.expressionScope=h}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}}{startNode(){return new bt(this,this.state.start,this.state.startLoc)}startNodeAt(t,e){return new bt(this,t,e)}startNodeAtNode(t){return this.startNodeAt(t.start,t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEnd,this.state.lastTokEndLoc)}finishNodeAt(t,e,s,i){return t.type=e,t.end=s,t.loc.end=i,this.options.ranges&&(t.range[1]=s),this.options.attachComment&&this.processComment(t),t}resetStartLocation(t,e,s){t.start=e,t.loc.start=s,this.options.ranges&&(t.range[0]=e)}resetEndLocation(t,e=this.state.lastTokEnd,s=this.state.lastTokEndLoc){t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}{toAssignable(t,e=!1){var s,i;let r;switch(("ParenthesizedExpression"===t.type||null!=(s=t.extra)&&s.parenthesized)&&(r=Qt(t),e?"Identifier"===r.type?this.expressionScope.recordParenthesizedIdentifierError(t.start,w.InvalidParenthesizedAssignment):"MemberExpression"!==r.type&&this.raise(t.start,w.InvalidParenthesizedAssignment):this.raise(t.start,w.InvalidParenthesizedAssignment)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let s=0,i=t.properties.length,r=i-1;s<i;s++){var a;const i=t.properties[s],n=s===r;this.toAssignableObjectExpressionProp(i,n,e),n&&"RestElement"===i.type&&null!=(a=t.extra)&&a.trailingComma&&this.raiseRestNotLast(t.extra.trailingComma)}break;case"ObjectProperty":this.toAssignable(t.value,e);break;case"SpreadElement":{this.checkToRestConversion(t),t.type="RestElement";const s=t.argument;this.toAssignable(s,e);break}case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,null==(i=t.extra)?void 0:i.trailingComma,e);break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,w.MissingEqInAssignment),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(r,e)}return t}toAssignableObjectExpressionProp(t,e,s){if("ObjectMethod"===t.type){const e="get"===t.kind||"set"===t.kind?w.PatternHasAccessor:w.PatternHasMethod;this.raise(t.key.start,e)}else"SpreadElement"!==t.type||e?this.toAssignable(t,s):this.raiseRestNotLast(t.start)}toAssignableList(t,e,s){let i=t.length;if(i){const r=t[i-1];if("RestElement"===(null==r?void 0:r.type))--i;else if("SpreadElement"===(null==r?void 0:r.type)){r.type="RestElement";let t=r.argument;
1this.toAssignable(t,s),t=Qt(t),"Identifier"!==t.type&&"MemberExpression"!==t.type&&"ArrayPattern"!==t.type&&"ObjectPattern"!==t.type&&this.unexpected(t.start),e&&this.raiseTrailingCommaAfterRest(e),--i}}for(let r=0;r<i;r++){const e=t[r];e&&(this.toAssignable(e,s),"RestElement"===e.type&&this.raiseRestNotLast(e.start))}return t}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const e=t.properties.length-1;return t.properties.every(((t,s)=>"ObjectMethod"!==t.type&&(s===e||"SpreadElement"!==t.type)&&this.isAssignable(t)))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every((t=>this.isAssignable(t)));case"AssignmentExpression":return"="===t.operator;case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const s of t)"ArrayExpression"===(null==s?void 0:s.type)&&this.toReferencedListDeep(s.elements)}parseSpread(t,e){const s=this.startNode();return this.next(),s.argument=this.parseMaybeAssignAllowIn(t,void 0,e),this.finishNode(s,"SpreadElement")}parseRestBinding(){const t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case l.bracketL:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(l.bracketR,93,!0),this.finishNode(t,"ArrayPattern")}case l.braceL:return this.parseObjectLike(l.braceR,!0)}return this.parseIdentifier()}parseBindingList(t,e,s,i){const r=[];let a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(l.comma),s&&this.match(l.comma))r.push(null);else{if(this.eat(t))break;if(this.match(l.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRestBinding())),this.checkCommaAfterRest(e),this.expect(t);break}{const t=[];for(this.match(l.at)&&this.hasPlugin("decorators")&&this.raise(this.state.start,w.UnsupportedParameterDecorator);this.match(l.at);)t.push(this.parseDecorator());r.push(this.parseAssignableListItem(i,t))}}return r}parseAssignableListItem(t,e){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s);const i=this.parseMaybeDefault(s.start,s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t){return t}parseMaybeDefault(t,e,s){var i,r,a;if(e=null!=(i=e)?i:this.state.startLoc,t=null!=(r=t)?r:this.state.start,s=null!=(a=s)?a:this.parseBindingAtom(),!this.eat(l.eq))return s;const n=this.startNodeAt(t,e);return n.left=s,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}checkLVal(t,e,s=64,i,r,a=!1){switch(t.type){case"Identifier":{const{name:e}=t;this.state.strict&&(a?K(e,this.inModule):V(e))&&this.raise(t.start,64===s?w.StrictEvalArguments:w.StrictEvalArgumentsBinding,e),i&&(i.has(e)?this.raise(t.start,w.ParamDupe):i.add(e)),r&&"let"===e&&this.raise(t.start,w.LetInLexicalBinding),64&s||this.scope.declareName(e,s,t.start);break}case"MemberExpression":64!==s&&this.raise(t.start,w.InvalidPropertyBindingPattern);break;case"ObjectPattern":for(let e of t.properties){if(this.isObjectProperty(e))e=e.value;else if(this.isObjectMethod(e))continue;this.checkLVal(e,"object destructuring pattern",s,i,r)}break;case"ArrayPattern":for(const e of t.elements)e&&this.checkLVal(e,"array destructuring pattern",s,i,r);break;case"AssignmentPattern":this.checkLVal(t.left,"assignment pattern",s,i);break;case"RestElement":this.checkLVal(t.argument,"rest element",s,i);break;case"ParenthesizedExpression":this.checkLVal(t.expression,"parenthesized expression",s,i);break;default:this.raise(t.start,64===s?w.InvalidLhs:w.InvalidLhsBinding,e)}}checkToRestConversion(t){"Identifier"!==t.argument.type&&"MemberExpression"!==t.argument.type&&this.raise(t.argument.start,w.InvalidRestAssignmentPattern)}checkCommaAfterRest(t){this.match(l.comma)&&(this.lookaheadCharCode()===t?this.raiseTrailingCommaAfterRest(this.state.start):this.raiseRestNotLast(this.state.start))}raiseRestNotLast(t){throw this.raise(t,w.ElementAfterRest)}raiseTrailingCommaAfterRest(t){this.raise(t,w.RestTrailingComma)}}{checkProto(t,e,s,i){if("SpreadElement"===t.type||this.isObjectMethod(t)||t.computed||t.shorthand)return;const r=t.key;if("__proto__"===("Identifier"===r.type?r.name:r.value)){if(e)return void this.raise(r.start,w.RecordNoProto);s.used&&(i?-1===i.doubleProto&&(i.doubleProto=r.start):this.raise(r.start,w.DuplicateProto)),s.used=!0}}
1shouldExitDescending(t,e){return"ArrowFunctionExpression"===t.type&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();const t=this.parseExpression();return this.match(l.eof)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd((()=>this.parseExpressionBase(e))):this.allowInAnd((()=>this.parseExpressionBase(e)))}parseExpressionBase(t){const e=this.state.start,s=this.state.startLoc,i=this.parseMaybeAssign(t);if(this.match(l.comma)){const r=this.startNodeAt(e,s);for(r.expressions=[i];this.eat(l.comma);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return i}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd((()=>this.parseMaybeAssign(t,e)))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd((()=>this.parseMaybeAssign(t,e)))}setOptionalParametersError(t,e){var s;t.optionalParameters=null!=(s=null==e?void 0:e.pos)?s:this.state.start}parseMaybeAssign(t,e){const s=this.state.start,i=this.state.startLoc;if(this.isContextual("yield")&&this.prodParam.hasYield){let t=this.parseYield();return e&&(t=e.call(this,t,s,i)),t}let r;t?r=!1:(t=new Pt,r=!0),(this.match(l.parenL)||this.match(l.name))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s,i)),this.state.type.isAssign){const e=this.startNodeAt(s,i),r=this.state.value;e.operator=r;if("BinaryExpression"===a.type&&"|>"===a.operator&&"hack"===this.getPluginOption("pipelineOperator","proposal"))throw this.raise(this.state.start,w.PipeBodyIsTighter,r);return this.match(l.eq)?(e.left=this.toAssignable(a,!0),t.doubleProto=-1):e.left=a,t.shorthandAssign>=e.left.start&&(t.shorthandAssign=-1),this.checkLVal(a,"assignment expression"),this.next(),e.right=this.parseMaybeAssign(),this.finishNode(e,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),a}parseMaybeConditional(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,i)?r:this.parseConditional(r,e,s,t)}parseConditional(t,e,s,i){if(this.eat(l.question)){const i=this.startNodeAt(e,s);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(l.colon),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseExprOps(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseMaybeUnary(t);return this.shouldExitDescending(r,i)?r:this.parseExprOp(r,e,s,-1)}parseExprOp(t,e,s,i){let r=this.state.type.binop;if(null!=r&&(this.prodParam.hasIn||!this.match(l._in))&&r>i){const a=this.state.type;if(a===l.pipeline){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const n=this.startNodeAt(e,s);n.left=t,n.operator=this.state.value;const o=a===l.logicalOR||a===l.logicalAND,h=a===l.nullishCoalescing;if(h&&(r=l.logicalAND.binop),this.next(),a===l.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(l.name)&&"await"===this.state.value&&this.prodParam.hasAwait)throw this.raise(this.state.start,w.UnexpectedAwaitAfterPipelineBody);n.right=this.parseExprOpRightExpr(a,r),this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression");const p=this.state.type;if(h&&(p===l.logicalOR||p===l.logicalAND)||o&&p===l.nullishCoalescing)throw this.raise(this.state.start,w.MixingCoalesceWithLogical);return this.parseExprOp(n,e,s,i)}return t}parseExprOpRightExpr(t,e){const s=this.state.start,i=this.state.startLoc;if(t===l.pipeline)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>{const i=this.parseHackPipeBody(t,e);return this.checkHackPipeBodyEarlyErrors(s),i}));case"smart":return this.withTopicBindingContext((()=>{const r=this.parseHackPipeBody(t,e);return this.parseSmartPipelineBodyInStyle(r,s,i)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(e)))}return this.parseExprOpBaseRightExpr(t,e)}parseExprOpBaseRightExpr(t,e){const s=this.state.start,i=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),s,i,t.rightAssociative?e-1:e)}parseHackPipeBody(t,e){if(this.prodParam.hasYield&&this.isContextual("yield"))throw this.raise(this.state.start,w.PipeBodyIsTighter,this.state.value);return this.parseExprOpBaseRightExpr(t,e)}checkExponentialAfterUnary(t){this.match(l.exponent)&&this.raise(t.argument.start,w.UnexpectedTokenUnaryExponentiation)}parseMaybeUnary(t,e){const s=this.state.start,i=this.state.startLoc,r=this.isContextual("await");if(r&&this.isAwaitAllowed()){this.next();const t=this.parseAwait(s,i);return e||this.checkExponentialAfterUnary(t),t}const a=this.match(l.incDec),n=this.startNode();if(this.state.type.prefix){n.operator=this.state.value,n.prefix=!0,this.match(l._throw)&&this.expectPlugin("throwExpressions");const s=this.match(l._delete);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&s){const t=n.argument;"Identifier"===t.type?this.raise(n.start,w.StrictDelete):this.hasPropertyAsPrivateName(t)&&this.raise(n.start,w.DeletePrivateField)}if(!a)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}
1const o=this.parseUpdate(n,a,t);if(r){if((this.hasPlugin("v8intrinsic")?this.state.type.startsExpr:this.state.type.startsExpr&&!this.match(l.modulo))&&!this.isAmbiguousAwait())return this.raiseOverwrite(s,w.AwaitNotInAsyncContext),this.parseAwait(s,i)}return o}parseUpdate(t,e,s){if(e)return this.checkLVal(t.argument,"prefix operation"),this.finishNode(t,"UpdateExpression");const i=this.state.start,r=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){const t=this.startNodeAt(i,r);t.operator=this.state.value,t.prefix=!1,t.argument=a,this.checkLVal(a,"postfix operation"),this.next(),a=this.finishNode(t,"UpdateExpression")}return a}parseExprSubscripts(t){const e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,i)?r:this.parseSubscripts(r,e,s)}parseSubscripts(t,e,s,i){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{t=this.parseSubscript(t,e,s,i,r),r.maybeAsyncArrow=!1}while(!r.stop);return t}parseSubscript(t,e,s,i,r){if(!i&&this.eat(l.doubleColon))return this.parseBind(t,e,s,i,r);if(this.match(l.backQuote))return this.parseTaggedTemplateExpression(t,e,s,r);let a=!1;if(this.match(l.questionDot)){if(i&&40===this.lookaheadCharCode())return r.stop=!0,t;r.optionalChainMember=a=!0,this.next()}return!i&&this.match(l.parenL)?this.parseCoverCallAndAsyncArrowHead(t,e,s,r,a):a||this.match(l.bracketL)||this.eat(l.dot)?this.parseMember(t,e,s,r,a):(r.stop=!0,t)}parseMember(t,e,s,i,r){const a=this.startNodeAt(e,s),n=this.eat(l.bracketL);a.object=t,a.computed=n;const o=!n&&this.match(l.privateName)&&this.state.value,h=n?this.parseExpression():o?this.parsePrivateName():this.parseIdentifier(!0);return!1!==o&&("Super"===a.object.type&&this.raise(e,w.SuperPrivateField),this.classScope.usePrivateName(o,h.start)),a.property=h,n&&this.expect(l.bracketR),i.optionalChainMember?(a.optional=r,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,i,r){const a=this.startNodeAt(e,s);return a.object=t,a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s,i)}parseCoverCallAndAsyncArrowHead(t,e,s,i,r){const a=this.state.maybeInArrowParameters;let n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e,s);return o.callee=t,i.maybeAsyncArrow&&(this.expressionScope.enter(new dt(2)),n=new Pt),i.optionalChainMember&&(o.optional=r),o.arguments=r?this.parseCallExpressionArguments(l.parenR):this.parseCallExpressionArguments(l.parenR,"Import"===t.type,"Super"!==t.type,o,n),this.finishCallExpression(o,i.optionalChainMember),i.maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!r?(i.stop=!0,this.expressionScope.validateAsPattern(),this.expressionScope.exit(),o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),o)):(i.maybeAsyncArrow&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(o)),this.state.maybeInArrowParameters=a,o}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s,i){const r=this.startNodeAt(e,s);return r.tag=t,r.quasi=this.parseTemplate(!0),i.optionalChainMember&&this.raise(e,w.OptionalChainingNoTemplate),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(2===t.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===t.arguments.length||t.arguments.length>2)this.raise(t.start,w.ImportCallArity,this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?"one or two arguments":"one argument");else for(const s of t.arguments)"SpreadElement"===s.type&&this.raise(s.start,w.ImportCallSpreadArgument);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(n)n=!1;else if(this.expect(l.comma),this.match(t)){!e||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(this.state.lastTokStart,w.ImportCallArgumentTrailingComma),i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}a.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(l.arrow)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(l.arrow),this.parseArrowExpression(t,e.arguments,!0,null==(s=e.extra)?void 0:s.trailingComma),g(t,e.innerComments),g(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}parseExprAtom(t){let e;switch(this.state.type){case l._super:return this.parseSuper();case l._import:return e=this.startNode(),this.next(),this.match(l.dot)?this.parseImportMetaProperty(e):(this.match(l.parenL)||this.raise(this.state.lastTokStart,w.UnsupportedImport),this.finishNode(e,"Import"));case l._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case l.name:{if(this.isContextual("module")&&123===this.lookaheadCharCode()&&!this.hasFollowingLineBreak())return this.parseModuleExpression();const t=this.state.potentialArrowAt===this.state.start,e=this.state.containsEsc,s=this.parseIdentifier();if(!e&&"async"===s.name&&!this.canInsertSemicolon()){if(this.match(l._function))return this.resetPreviousNodeTrailingComments(s),this.next(),this.parseFunction(this.startNodeAtNode(s),void 0,!0);if(this.match(l.name))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(s)):s;if(this.match(l._do))return this.resetPreviousNodeTrailingComments(s),this.parseDo(this.startNodeAtNode(s),!0)}return t&&this.match(l.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}case l._do:return this.parseDo(this.startNode(),!1);case l.slash:case l.slashAssign:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case l.num:return this.parseNumericLiteral(this.state.value);case l.bigint:return this.parseBigIntLiteral(this.state.value);case l.decimal:return this.parseDecimalLiteral(this.state.value);case l.string:return this.parseStringLiteral(this.state.value);case l._null:return this.parseNullLiteral();case l._true:return this.parseBooleanLiteral(!0);case l._false:return this.parseBooleanLiteral(!1);case l.parenL:{const t=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(t)}case l.bracketBarL:case l.bracketHashL:return this.parseArrayLike(this.state.type===l.bracketBarL?l.bracketBarR:l.bracketR,!1,!0,t);case l.bracketL:return this.parseArrayLike(l.bracketR,!0,!1,t);case l.braceBarL:case l.braceHashL:return this.parseObjectLike(this.state.type===l.braceBarL?l.braceBarR:l.braceR,!1,!0,t);case l.braceL:return this.parseObjectLike(l.braceR,!1,!1,t);case l._function:return this.parseFunctionOrFunctionSent();case l.at:this.parseDecorators();case l._class:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case l._new:return this.parseNewOrNewTarget();case l.backQuote:return this.parseTemplate(!1);case l.doubleColon:{e=this.startNode(),this.next(),e.object=null;const t=e.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(e,"BindExpression");throw this.raise(t.start,w.UnsupportedBind)}case l.privateName:{const{value:t,start:s}=this.state;return e=this.parsePrivateName(),this.match(l._in)?this.classScope.usePrivateName(t,s):this.raise(s,w.PrivateInExpectedIn,t),e}case l.moduloAssign:if("hack"!==this.getPluginOption("pipelineOperator","proposal")||"%"!==this.getPluginOption("pipelineOperator","topicToken"))throw this.unexpected();this.state.value="%",this.state.type=l.modulo,this.state.pos--,this.state.end--,this.state.endLoc.column--;case l.modulo:case l.hash:{const t=this.getPluginOption("pipelineOperator","proposal");if(t){e=this.startNode();const s=this.state.start,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}}case l.relational:if("<"===this.state.value){const t=this.input.codePointAt(this.nextTokenStart());(O(t)||62===t)&&this.expectOnePlugin(["jsx","flow","typescript"])}default:throw this.unexpected()}}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i)){let i;return i="smart"===s?"PipelinePrimaryTopicReference":"TopicReference",this.topicReferenceIsAllowedInCurrentContext()||("smart"===s?this.raise(e,w.PrimaryTopicNotAllowed):this.raise(e,w.PipeTopicUnbound)),this.registerTopicReference(),this.finishNode(t,i)}throw this.raise(e,w.PipeTopicUnconfiguredToken,i.label)}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":{const t=this.getPluginOption("pipelineOperator","topicToken");return s.label===t}case"smart":return s===l.hash;default:throw this.raise(e,w.PipeTopicRequiresHackPipes)}}
1parseAsyncArrowUnaryFunction(t){this.prodParam.enter(xt(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(this.state.pos,w.LineTerminatorBeforeArrow),this.expect(l.arrow),this.parseArrowExpression(t,e,!0),t}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),!this.match(l.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(t.start,w.UnexpectedSuper):this.raise(t.start,w.SuperNotAllowed),this.match(l.parenL)||this.match(l.bracketL)||this.match(l.dot)||this.raise(t.start,w.UnsupportedSuper),this.finishNode(t,"Super")}parseMaybePrivateName(t){return this.match(l.privateName)?(t||this.raise(this.state.start+1,w.UnexpectedPrivateField),this.parsePrivateName()):this.parseIdentifier(!0)}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(this.state.start+1,new x(this.state.curLine,this.state.start+1-this.state.lineStart)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(l.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());const i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,w.UnsupportedMetaProperty,e.name,s),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){const e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.next(),this.isContextual("meta")&&(this.inModule||this.raise(e.start,E.ImportMetaOutsideModule),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){const s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.start,s=this.state.startLoc;let i;this.next(),this.expressionScope.enter(new dt(1));const r=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const n=this.state.start,o=this.state.startLoc,h=[],p=new Pt;let c,u,d=!0;for(;!this.match(l.parenR);){if(d)d=!1;else if(this.expect(l.comma,-1===p.optionalParameters?null:p.optionalParameters),this.match(l.parenR)){u=this.state.start;break}if(this.match(l.ellipsis)){const t=this.state.start,e=this.state.startLoc;c=this.state.start,h.push(this.parseParenItem(this.parseRestBinding(),t,e)),this.checkCommaAfterRest(41);break}h.push(this.parseMaybeAssignAllowIn(p,this.parseParenItem))}const m=this.state.lastTokEnd,f=this.state.lastTokEndLoc;this.expect(l.parenR),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=a;let y=this.startNodeAt(e,s);if(t&&this.shouldParseArrow(h)&&(y=this.parseArrow(y)))return this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(y,h,!1),y;if(this.expressionScope.exit(),h.length||this.unexpected(this.state.lastTokStart),u&&this.unexpected(u),c&&this.unexpected(c),this.checkExpressionErrors(p,!0),this.toReferencedListDeep(h,!0),h.length>1?(i=this.startNodeAt(n,o),i.expressions=h,this.finishNode(i,"SequenceExpression"),i.end=m,i.loc.end=f):i=h[0],!this.options.createParenthesizedExpressions)return this.addExtra(i,"parenthesized",!0),this.addExtra(i,"parenStart",e),i;const x=this.startNodeAt(e,s);return x.expression=i,this.finishNode(x,"ParenthesizedExpression"),x}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(l.arrow))return t}parseParenItem(t,e,s){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(l.dot)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const s=this.parseMetaProperty(t,e,"target");return this.scope.inNonArrowFunction||this.scope.inClass||this.raise(s.start,w.UnexpectedNewTarget),s}return this.parseNew(t)}parseNew(t){return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,w.ImportCallNotNewExpression):this.isOptionalChain(t.callee)?this.raise(this.state.lastTokEnd,w.OptionalChainingNoNew):this.eat(l.questionDot)&&this.raise(this.state.start,w.OptionalChainingNoNew),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}parseNewArguments(t){if(this.eat(l.parenL)){const e=this.parseExprList(l.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}parseTemplateElement(t){const e=this.startNode();return null===this.state.value&&(t||this.raise(this.state.start+1,w.InvalidEscapeSequenceTemplate)),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(l.backQuote),this.finishNode(e,"TemplateElement")}parseTemplate(t){const e=this.startNode();this.next(),e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(l.dollarBraceL),e.expressions.push(this.parseTemplateSubstitution()),this.expect(l.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let n=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(l.comma),this.match(t)){this.addExtra(o,"trailingComma",this.state.lastTokStart);break}const r=this.parsePropertyDefinition(e,i);e||this.checkProto(r,s,a,i),s&&!this.isObjectProperty(r)&&"SpreadElement"!==r.type&&this.raise(r.start,w.InvalidRecordProperty),r.shorthand&&this.addExtra(r,"shorthand",!0),o.properties.push(r)}this.next(),this.state.inFSharpPipelineDirectBody=r;let h="ObjectExpression";return e?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(o,h)}maybeAsyncOrAccessorProp(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(l.bracketL)||this.match(l.star))}parsePropertyDefinition(t,e){let s=[];if(this.match(l.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,w.UnsupportedPropertyDecorator);this.match(l.at);)s.push(this.parseDecorator());const i=this.startNode();let r,a,n=!1,o=!1,h=!1;if(this.match(l.ellipsis))return s.length&&this.unexpected(),t?(this.next(),i.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(i,"RestElement")):this.parseSpread();s.length&&(i.decorators=s,s=[]),i.method=!1,(t||e)&&(r=this.state.start,a=this.state.startLoc),t||(n=this.eat(l.star));const p=this.state.containsEsc,c=this.parsePropertyName(i,!1);if(!t&&!n&&!p&&this.maybeAsyncOrAccessorProp(i)){const t=c.name;"async"!==t||this.hasPrecedingLineBreak()||(o=!0,this.resetPreviousNodeTrailingComments(c),n=this.eat(l.star),this.parsePropertyName(i,!1)),"get"!==t&&"set"!==t||(h=!0,this.resetPreviousNodeTrailingComments(c),i.kind=t,this.match(l.star)&&(n=!0,this.raise(this.state.pos,w.AccessorIsGenerator,t),this.next()),this.parsePropertyName(i,!1))}return this.parseObjPropValue(i,r,a,n,o,t,h,e),i}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t),r=t.start;i.length!==s&&("get"===t.kind?this.raise(r,w.BadGetterArity):this.raise(r,w.BadSetterArity)),"set"===t.kind&&"RestElement"===(null==(e=i[i.length-1])?void 0:e.type)&&this.raise(r,w.BadSetterRestParameter)}parseObjectMethod(t,e,s,i,r){return r?(this.parseMethod(t,e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):s||e||this.match(l.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):void 0}parseObjectProperty(t,e,s,i,r){return t.shorthand=!1,this.eat(l.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!1),i?t.value=this.parseMaybeDefault(e,s,Tt(t.key)):this.match(l.eq)&&r?(-1===r.shorthandAssign&&(r.shorthandAssign=this.state.start),t.value=this.parseMaybeDefault(e,s,Tt(t.key))):t.value=Tt(t.key),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}parseObjPropValue(t,e,s,i,r,a,n,o){const h=this.parseObjectMethod(t,i,r,a,n)||this.parseObjectProperty(t,e,s,a,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(l.bracketL))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(l.bracketR);else{const s=this.state.inPropertyName;this.state.inPropertyName=!0;const i=this.state.type;t.key=i===l.num||i===l.string||i===l.bigint||i===l.decimal?this.parseExprAtom():this.parseMaybePrivateName(e),i!==l.privateName&&(t.computed=!1),this.state.inPropertyName=s}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=!!e}parseMethod(t,e,s,i,r,a,n=!1){this.initFunction(t,s),t.generator=!!e;const o=i;return this.scope.enter(18|(n?X:0)|(r?32:0)),this.prodParam.enter(
1xt(s,t.generator)),this.parseFunctionParams(t,o),this.parseFunctionBodyAndFinish(t,a,!0),this.prodParam.exit(),this.scope.exit(),t}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,i,a),this.state.inFSharpPipelineDirectBody=r,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=xt(s,!1);!this.match(l.bracketL)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(t,s);const a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){t.params=this.toAssignableList(e,s,!1)}parseFunctionBodyAndFinish(t,e,s=!1){this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){const i=e&&!this.match(l.braceL);if(this.expressionScope.enter(ft()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const i=this.state.strict,r=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),t.body=this.parseBlock(!0,!1,(r=>{const a=!this.isSimpleParamList(t.params);if(r&&a){const e="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(e,w.IllegalLanguageModeDirective)}const n=!i&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!a,e,n),this.state.strict&&t.id&&this.checkLVal(t.id,"function name",65,void 0,void 0,n)})),this.prodParam.exit(),this.expressionScope.exit(),this.state.labels=r}}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if("Identifier"!==t[e].type)return!1;return!0}checkParams(t,e,s,i=!0){const r=new Set;for(const a of t.params)this.checkLVal(a,"function parameter list",5,e?null:r,void 0,i)}parseExprList(t,e,s,i){const r=[];let a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(l.comma),this.match(t)){i&&this.addExtra(i,"trailingComma",this.state.lastTokStart),this.next();break}r.push(this.parseExprListItem(e,s))}return r}parseExprListItem(t,e,s){let i;if(this.match(l.comma))t||this.raise(this.state.pos,w.UnexpectedToken,","),i=null;else if(this.match(l.ellipsis)){const t=this.state.start,s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(e),t,s)}else if(this.match(l.question)){this.expectPlugin("partialApplication"),s||this.raise(this.state.start,w.UnexpectedArgumentPlaceholder);const t=this.startNode();this.next(),i=this.finishNode(t,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return i}parseIdentifier(t){const e=this.startNode(),s=this.parseIdentifierName(e.start,t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t,e){let s;const{start:i,type:r}=this.state;if(r===l.name)s=this.state.value;else{if(!r.keyword)throw this.unexpected();s=r.keyword}return e?this.state.type=l.name:this.checkReservedWord(s,i,!!r.keyword,!1),this.next(),s}checkReservedWord(t,e,s,i){if(t.length>10)return;if(!function(t){return J.has(t)}(t))return;if("yield"===t){if(this.prodParam.hasYield)return void this.raise(e,w.YieldBindingIdentifier)}else if("await"===t){if(this.prodParam.hasAwait)return void this.raise(e,w.AwaitBindingIdentifier);if(this.scope.inStaticBlock)return void this.raise(e,w.AwaitBindingIdentifierInStaticBlock);this.expressionScope.recordAsyncArrowParametersError(e,w.AwaitBindingIdentifier)}else if("arguments"===t&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(e,w.ArgumentsInClass);if(s&&W(t))return void this.raise(e,w.UnexpectedKeyword,t);(this.state.strict?i?K:z:H)(t,this.inModule)&&this.raise(e,w.UnexpectedReservedWord,t)}isAwaitAllowed(){return!!this.prodParam.hasAwait||!(!this.options.allowAwaitOutsideFunction||this.scope.inFunction)}parseAwait(t,e){const s=this.startNodeAt(t,e);return this.expressionScope.recordParameterInitializerError(s.start,w.AwaitExpressionFormalParameter),this.eat(l.star)&&this.raise(s.start,w.ObsoleteAwaitStar),this.scope.inFunction||this.options.allowA
1waitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(s.argument=this.parseMaybeUnary(null,!0)),this.finishNode(s,"AwaitExpression")}isAmbiguousAwait(){return this.hasPrecedingLineBreak()||this.match(l.plusMin)||this.match(l.parenL)||this.match(l.bracketL)||this.match(l.backQuote)||this.match(l.regexp)||this.match(l.slash)||this.hasPlugin("v8intrinsic")&&this.match(l.modulo)}parseYield(){const t=this.startNode();this.expressionScope.recordParameterInitializerError(t.start,w.YieldInParameter),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(l.star),this.state.type){case l.semi:case l.eof:case l.braceR:case l.parenR:case l.bracketR:case l.braceBarR:case l.colon:case l.comma:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}checkPipelineAtInfixOperator(t,e){"smart"===this.getPluginOption("pipelineOperator","proposal")&&"SequenceExpression"===t.type&&this.raise(e,w.PipelineHeadSequenceExpression)}checkHackPipeBodyEarlyErrors(t){if(this.match(l.arrow))throw this.raise(this.state.start,w.PipeBodyIsTighter,l.arrow.label);this.topicReferenceWasUsedInCurrentContext()||this.raise(t,w.PipeTopicUnused)}parseSmartPipelineBodyInStyle(t,e,s){const i=this.startNodeAt(e,s);return this.isSimpleReference(t)?(i.callee=t,this.finishNode(i,"PipelineBareFunction")):(this.checkSmartPipeTopicBodyEarlyErrors(e),i.expression=t,this.finishNode(i,"PipelineTopicExpression"))}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(l.arrow))throw this.raise(this.state.start,w.PipelineBodyNoArrow);this.topicReferenceWasUsedInCurrentContext()||this.raise(t,w.PipelineTopicUnused)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if("smart"!==this.getPluginOption("pipelineOperator","proposal"))return t();{const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(8|e);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(-9&e);try{return t()}finally{this.prodParam.exit()}}return t()}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(t){const e=this.state.start,s=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnary(),e,s,t);return this.state.inFSharpPipelineDirectBody=i,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.eat(l.braceL);const e=this.initializeScopes(!0);this.enterInitialScopes();const s=this.startNode();try{t.body=this.parseProgram(s,l.braceR,"module")}finally{e()}return this.eat(l.braceR),this.finishNode(t,"ModuleExpression")}}{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.state.comments,this.options.tokens&&(t.tokens=function(t){for(let e=0;e<t.length;e++){const s=t[e];if(s.type===l.privateName){const{loc:i,start:r,value:a,end:n}=s,o=r+1,h=new x(i.start.line,i.start.column+1);t.splice(e,1,new pt({type:l.hash,value:"#",start:r,end:o,startLoc:i.start,endLoc:h}),new pt({type:l.name,value:a,start:o,end:n,startLoc:h,endLoc:i.end}))}}return t}(this.tokens)),this.finishNode(t,"File")}parseProgram(t,e=l.eof,s=this.options.sourceType){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[i]of Array.from(this.scope.undefinedExports)){const t=this.scope.undefinedExports.get(i);this.raise(t,w.ModuleExportUndefined,i)}return this.finishNode(t,"Program")}stmtToDirective(t){const e=t;e.type="Directive",e.value=e.expression,delete e.expression;const s=e.value,i=this.input.slice(s.start,s.end),r=s.value=i.slice(1,-1);return this.addExtra(s,"raw",i),this.addExtra(s,"rawValue",r),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(l.interpreterDirective))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(t){return!!this.isContextual("let")&&this.isLetKeyword(t)}isLetKeyword(t){const e=this.nextTokenStart(),s=this.codePointAtPos(e);if(92===s||91===s)return!0;
1if(t)return!1;if(123===s)return!0;if(O(s)){te.lastIndex=e;const t=te.exec(this.input);if(null!==t){const s=this.codePointAtPos(e+t[0].length);if(!F(s)&&92!==s)return!1}return!0}return!1}parseStatement(t,e){return this.match(l.at)&&this.parseDecorators(!0),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type;const i=this.startNode();let r;switch(this.isLet(t)&&(s=l._var,r="let"),s){case l._break:case l._continue:return this.parseBreakContinueStatement(i,s.keyword);case l._debugger:return this.parseDebuggerStatement(i);case l._do:return this.parseDoStatement(i);case l._for:return this.parseForStatement(i);case l._function:if(46===this.lookaheadCharCode())break;return t&&(this.state.strict?this.raise(this.state.start,w.StrictFunction):"if"!==t&&"label"!==t&&this.raise(this.state.start,w.SloppyFunction)),this.parseFunctionStatement(i,!1,!t);case l._class:return t&&this.unexpected(),this.parseClass(i,!0);case l._if:return this.parseIfStatement(i);case l._return:return this.parseReturnStatement(i);case l._switch:return this.parseSwitchStatement(i);case l._throw:return this.parseThrowStatement(i);case l._try:return this.parseTryStatement(i);case l._const:case l._var:return r=r||this.state.value,t&&"var"!==r&&this.raise(this.state.start,w.UnexpectedLexicalDeclaration),this.parseVarStatement(i,r);case l._while:return this.parseWhileStatement(i);case l._with:return this.parseWithStatement(i);case l.braceL:return this.parseBlock();case l.semi:return this.parseEmptyStatement(i);case l._import:{const t=this.lookaheadCharCode();if(40===t||46===t)break}case l._export:{let t;return this.options.allowImportExportEverywhere||e||this.raise(this.state.start,w.UnexpectedImportExport),this.next(),s===l._import?(t=this.parseImport(i),"ImportDeclaration"!==t.type||t.importKind&&"value"!==t.importKind||(this.sawUnambiguousESM=!0)):(t=this.parseExport(i),("ExportNamedDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&("ExportAllDeclaration"!==t.type||t.exportKind&&"value"!==t.exportKind)&&"ExportDefaultDeclaration"!==t.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(i),t}default:if(this.isAsyncFunction())return t&&this.raise(this.state.start,w.AsyncFunctionInSingleStatementContext),this.next(),this.parseFunctionStatement(i,!0,!t)}const a=this.state.value,n=this.parseExpression();return s===l.name&&"Identifier"===n.type&&this.eat(l.colon)?this.parseLabeledStatement(i,a,n,t):this.parseExpressionStatement(i,n)}assertModuleNodeAllowed(t){this.options.allowImportExportEverywhere||this.inModule||this.raise(t.start,E.ImportOutsideModule)}takeDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];e.length&&(t.decorators=e,this.resetStartLocationFromNode(t,e[0]),this.state.decoratorStack[this.state.decoratorStack.length-1]=[])}canHaveLeadingDecorator(){return this.match(l._class)}parseDecorators(t){const e=this.state.decoratorStack[this.state.decoratorStack.length-1];for(;this.match(l.at);){const t=this.parseDecorator();e.push(t)}if(this.match(l._export))t||this.unexpected(),this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,w.DecoratorExportClass);else if(!this.canHaveLeadingDecorator())throw this.raise(this.state.start,w.UnexpectedLeadingDecorator)}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const e=this.state.start,s=this.state.startLoc;let i;if(this.eat(l.parenL))i=this.parseExpression(),this.expect(l.parenR);else for(i=this.parseIdentifier(!1);this.eat(l.dot);){const t=this.startNodeAt(e,s);t.object=i,t.property=this.parseIdentifier(!0),t.computed=!1,i=this.finishNode(t,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(i),this.state.decoratorStack.pop()}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(l.parenL)){const e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(l.parenR,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}
1parseBreakContinueStatement(t,e){const s="break"===e;return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){const s="break"===e;let i;for(i=0;i<this.state.labels.length;++i){const e=this.state.labels[i];if(null==t.label||e.name===t.label.name){if(null!=e.kind&&(s||"loop"===e.kind))break;if(t.label&&s)break}}i===this.state.labels.length&&this.raise(t.start,w.IllegalBreakContinue,e)}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(l.parenL);const t=this.parseExpression();return this.expect(l.parenR),t}parseDoStatement(t){return this.next(),this.state.labels.push(Yt),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("do"))),this.state.labels.pop(),this.expect(l._while),t.test=this.parseHeaderExpression(),this.eat(l.semi),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Yt);let e=-1;if(this.isAwaitAllowed()&&this.eatContextual("await")&&(e=this.state.lastTokStart),this.scope.enter(0),this.expect(l.parenL),this.match(l.semi))return e>-1&&this.unexpected(e),this.parseFor(t,null);const s=this.isContextual("let"),i=s&&this.isLetKeyword();if(this.match(l._var)||this.match(l._const)||i){const s=this.startNode(),r=i?"let":this.state.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.match(l._in)||this.isContextual("of"))&&1===s.declarations.length?this.parseForIn(t,s,e):(e>-1&&this.unexpected(e),this.parseFor(t,s))}const r=this.match(l.name)&&!this.state.containsEsc,a=new Pt,n=this.parseExpression(!0,a),o=this.isContextual("of");if(o&&(s?this.raise(n.start,w.ForOfLet):-1===e&&r&&"Identifier"===n.type&&"async"===n.name&&this.raise(n.start,w.ForOfAsync)),o||this.match(l._in)){this.toAssignable(n,!0);const s=o?"for-of statement":"for-in statement";return this.checkLVal(n,s),this.parseForIn(t,n,e)}return this.checkExpressionErrors(a,!0),e>-1&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?0:2),e)}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(l._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}
1parseReturnStatement(t){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(this.state.start,w.IllegalReturn),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];let s,i;for(this.expect(l.braceL),this.state.labels.push($t),this.scope.enter(0);!this.match(l.braceR);)if(this.match(l._case)||this.match(l._default)){const t=this.match(l._case);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),t?s.test=this.parseExpression():(i&&this.raise(this.state.lastTokStart,w.MultipleDefaultsInSwitch),i=!0,s.test=null),this.expect(l.colon)}else s?s.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(this.state.lastTokEnd,w.NewlineAfterThrow),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom(),e="Identifier"===t.type;return this.scope.enter(e?8:0),this.checkLVal(t,"catch clause",9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(l._catch)){const e=this.startNode();this.next(),this.match(l.parenL)?(this.expect(l.parenL),e.param=this.parseCatchClauseParam(),this.expect(l.parenR)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(l._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,w.NoCatchOrFinally),this.finishNode(t,"TryStatement")}parseVarStatement(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Yt),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("while"))),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(this.state.start,w.StrictWith),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("with"))),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(const a of this.state.labels)a.name===e&&this.raise(s.start,w.LabelRedeclaration,e);const r=this.state.type.isLoop?"loop":this.match(l._switch)?"switch":null;for(let a=this.state.labels.length-1;a>=0;a--){const e=this.state.labels[a];if(e.statementStart!==t.start)break;e.statementStart=this.state.start,e.kind=r}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){const i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(l.braceL),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,l.braceR,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){const a=t.body=[],n=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?n:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){const a=this.state.strict;let n=!1,o=!1;for(;!this.match(i);){const i=this.parseStatement(null,s);if(e&&!o){if(this.isValidDirective(i)){const t=this.stmtToDirective(i);e.push(t),n||"use strict"!==t.value.value||(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}t.push(i)}r&&r.call(this,n),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(l.semi)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(l.parenR)?null:this.parseExpression(),this.expect(l.parenR),t.body=this.withSmartMixTopicForbiddingContext((()=>
1this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){const i=this.match(l._in);return this.next(),i?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||i&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,w.InvalidLhs,"for-loop"):this.raise(e.start,w.ForInOfLoopInitializer,i?"for-in":"for-of"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(l.parenR),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("for"))),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s){const i=t.declarations=[],r=this.hasPlugin("typescript");for(t.kind=s;;){const t=this.startNode();if(this.parseVarId(t,s),this.eat(l.eq)?t.init=e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():("const"!==s||this.match(l._in)||this.isContextual("of")?"Identifier"===t.id.type||e&&(this.match(l._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,w.DeclarationMissingInitializer,"Complex binding patterns"):r||this.raise(this.state.lastTokEnd,w.DeclarationMissingInitializer,"Const declarations"),t.init=null),i.push(this.finishNode(t,"VariableDeclarator")),!this.eat(l.comma))break}return t}parseVarId(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"variable declaration","var"===e?5:9,void 0,"var"!==e)}parseFunction(t,e=0,s=!1){const i=1&e,r=2&e,a=!!i&&!(4&e);this.initFunction(t,s),this.match(l.star)&&r&&this.raise(this.state.start,w.GeneratorInSingleStatementContext),t.generator=this.eat(l.star),i&&(t.id=this.parseFunctionId(a));const n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(xt(s,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),i&&!r&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=n,t}parseFunctionId(t){return t||this.match(l.name)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(l.parenL),this.expressionScope.enter(new ut(3)),t.params=this.parseBindingList(l.parenR,41,!1,e),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:9:17,t.id.start)}parseClass(t,e,s){this.next(),this.takeDecorators(t);const i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(l.eq)||this.match(l.semi)||this.match(l.braceR)}isClassMethod(){return this.match(l.parenL)}isNonstaticConstructor(t){return!t.computed&&!t.static&&("constructor"===t.key.name||"constructor"===t.key.value)}parseClassBody(t,e){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:t};let i=[];const r=this.startNode();if(r.body=[],this.expect(l.braceL),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(l.braceR);){if(this.eat(l.semi)){if(i.length>0)throw this.raise(this.state.lastTokEnd,w.DecoratorSemicolon);continue}if(this.match(l.at)){i.push(this.parseDecorator());continue}const t=this.startNode();i.length&&(t.decorators=i,this.resetStartLocationFromNode(t,i[0]),i=[]),this.parseClassMember(r,t,s),"constructor"===t.kind&&t.decorators&&t.decorators.length>0&&this.raise(t.start,w.DecoratorConstructor)}})),this.state.strict=e,this.next(),i.length)throw this.raise(this.state.start,w.TrailingDecorator);return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(t,e){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}if(this.isClassProperty()){const i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){const i=this.isContextual("static");if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(l.braceL))return void this.parseClassStaticBlock(t,e)}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){const r=e,a=e,n=e,o=e,h=r,p=r;if(e.static=i,this.eat(l.star)){h.kind="method";const e=this.match(l.privateName);return this.parseClassElementName(h),e?void this.pushClassPrivateMethod(t,a,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,w.ConstructorIsGenerator),void this.pushClassMethod(t,r,!0,!1,!1,!1))}const c=this.match(l.name)&&!this.state.containsEsc,u=this.match(l.privateName),d=this.parseClassElementName(e),m=this.state.start;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(h.kind="method",u)return void this.pushClassPrivateMethod(t,a,!1,!1);const i=this.isNonstaticConstructor(r);let n=!1;i&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(d.start,w.DuplicateConstructor),i&&this.hasPlugin("typescript")&&e.override&&this.raise(d.start,w.OverrideOnConstructor),s.hadConstructor=!0,n=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,i,n)}else if(this.isClassProperty())u?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(c&&"async"===d.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(d);const e=this.eat(l.star);p.optional&&this.unexpected(m),h.kind="method";const s=this.match(l.privateName);this.parseClassElementName(h),this.parsePostMemberNameModifiers(p),s?this.pushClassPrivateMethod(t,a,e,!0):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,w.ConstructorIsAsync),this.pushClassMethod(t,r,e,!0,!1,!1))}else if(!c||"get"!==d.name&&"set"!==d.name||this.match(l.star)&&this.isLineTerminator())this.isLineTerminator()?u?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected();else{this.resetPreviousNodeTrailingComments(d),h.kind=d.name;const e=this.match(l.privateName);this.parseClassElementName(r),e?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,w.ConstructorIsAccessor),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}}parseClassElementName(t){const{type:e,value:s,start:i}=this.state;return e!==l.name&&e!==l.string||!t.static||"prototype"!==s||this.raise(i,w.StaticPrototype),e===l.privateName&&"constructor"===s&&this.raise(i,w.ConstructorClassPrivateField),this.parsePropertyName(t,!0)}parseClassStaticBlock(t,e){var s;this.expectPlugin("classStaticBlock",e.start),this.scope.enter(208);const i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const r=e.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,l.braceR),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),null!=(s=e.decorators)&&s.length&&this.raise(e.start,w.DecoratorStaticBlock)}pushClassProperty(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,w.ConstructorClassField),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.start)}pushClassMethod(t,e,s,i,r,a){t.body.push(this.parseMethod(e,s,i,r,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){const r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);const a="get"===r.kind?r.static?6:2:"set"===r.kind?r.static?5:1:0;this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),a,r.key.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(ft()),this.prodParam.enter(0),t.value=this.eat(l.eq)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,i=139){this.match(l.name)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,"class 
1name",i)):s||!e?t.id=null:this.unexpected(null,w.MissingClassName)}parseClassSuper(t){t.superClass=this.eat(l._extends)?this.parseExprSubscripts():null}parseExport(t){const e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(l.comma),i=s&&this.eatExportStar(t),r=i&&this.maybeParseExportNamespaceSpecifier(t),a=s&&(!r||this.eat(l.comma)),n=e||i;if(i&&!r)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");const o=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!i&&!o||r&&a&&!o)throw this.unexpected(null,l.braceL);let h;if(n||o?(h=!1,this.parseExportFrom(t,n)):h=this.maybeParseExportDeclaration(t),n||o||h)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(l._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,l.braceL)}eatExportStar(t){return this.eat(l.star)}maybeParseExportDefaultSpecifier(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual("as")){t.specifiers||(t.specifiers=[]);const e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){return!!this.match(l.braceL)&&(t.specifiers||(t.specifiers=[]),t.specifiers.push(...this.parseExportSpecifiers()),t.source=null,t.declaration=null,!0)}maybeParseExportDeclaration(t){return!!this.shouldParseExportDeclaration()&&(t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t),!0)}isAsyncFunction(){if(!this.isContextual("async"))return!1;const t=this.nextTokenStart();return!u.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode(),e=this.isAsyncFunction();if(this.match(l._function)||e)return this.next(),e&&this.next(),this.parseFunction(t,5,e);if(this.match(l._class))return this.parseClass(t,!0,!0);if(this.match(l.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,w.DecoratorBeforeExport),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(l._const)||this.match(l._var)||this.isLet())throw this.raise(this.state.start,w.UnsupportedDefaultExport);{const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}}parseExportDeclaration(t){return this.parseStatement(null)}isExportDefaultSpecifier(){if(this.match(l.name)){const t=this.state.value;if("async"===t&&!this.state.containsEsc||"let"===t)return!1;if(("type"===t||"interface"===t)&&!this.state.containsEsc){const t=this.lookahead();if(t.type===l.name&&"from"!==t.value||t.type===l.braceL)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(l._default))return!1;const t=this.nextTokenStart(),e=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||this.match(l.name)&&e)return!0;if(this.match(l._default)&&e){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(t,e){if(this.eatContextual("from")){t.source=this.parseImportSource(),this.checkExport(t);const e=this.maybeParseImportAssertions();e&&(t.assertions=e)}else e?this.unexpected():t.source=null;this.semicolon()}shouldParseExportDeclaration(){if(this.match(l.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,w.DecoratorBeforeExport)}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}
1checkExport(t,e,s,i){if(e)if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var r;const e=t.declaration;"Identifier"!==e.type||"from"!==e.name||e.end-e.start!==4||null!=(r=e.extra)&&r.parenthesized||this.raise(e.start,w.ExportDefaultFromAsIdentifier)}}else if(t.specifiers&&t.specifiers.length)for(const a of t.specifiers){const{exported:t}=a,e="Identifier"===t.type?t.name:t.value;if(this.checkDuplicateExports(a,e),!i&&a.local){const{local:t}=a;"Identifier"!==t.type?this.raise(a.start,w.ExportBindingIsString,t.value,e):(this.checkReservedWord(t.name,t.start,!0,!1),this.scope.checkLocalExport(t))}}else if(t.declaration)if("FunctionDeclaration"===t.declaration.type||"ClassDeclaration"===t.declaration.type){const e=t.declaration.id;if(!e)throw new Error("Assertion failure");this.checkDuplicateExports(t,e.name)}else if("VariableDeclaration"===t.declaration.type)for(const a of t.declaration.declarations)this.checkDeclaration(a.id);if(this.state.decoratorStack[this.state.decoratorStack.length-1].length)throw this.raise(t.start,w.UnsupportedDecoratorExport)}checkDeclaration(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(const e of t.properties)this.checkDeclaration(e);else if("ArrayPattern"===t.type)for(const e of t.elements)e&&this.checkDeclaration(e);else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&this.raise(t.start,"default"===e?w.DuplicateDefaultExport:w.DuplicateExport,e),this.exportedIdentifiers.add(e)}parseExportSpecifiers(){const t=[];let e=!0;for(this.expect(l.braceL);!this.eat(l.braceR);){if(e)e=!1;else if(this.expect(l.comma),this.eat(l.braceR))break;const s=this.startNode(),i=this.match(l.string),r=this.parseModuleExportName();s.local=r,this.eatContextual("as")?s.exported=this.parseModuleExportName():s.exported=i?At(r):Tt(r),t.push(this.finishNode(s,"ExportSpecifier"))}return t}parseModuleExportName(){if(this.match(l.string)){const t=this.parseStringLiteral(this.state.value),e=t.value.match(Zt);return e&&this.raise(t.start,w.ModuleExportNameHasLoneSurrogate,e[0].charCodeAt(0).toString(16)),t}return this.parseIdentifier(!0)}parseImport(t){if(t.specifiers=[],!this.match(l.string)){const e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(l.comma),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual("from")}t.source=this.parseImportSource();const e=this.maybeParseImportAssertions();if(e)t.assertions=e;else{const e=this.maybeParseModuleAttributes();e&&(t.attributes=e)}return this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(l.string)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(t){return this.match(l.name)}parseImportSpecifierLocal(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,i,9),t.specifiers.push(this.finishNode(e,s))}parseAssertEntries(){const t=[],e=new Set;do{if(this.match(l.braceR))break;const s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(this.state.start,w.ModuleAttributesWithDuplicateKeys,i),e.add(i),this.match(l.string)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(l.colon),!this.match(l.string))throw this.unexpected(this.state.start,w.ModuleAttributeInvalidValue);s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),t.push(s)}while(this.eat(l.comma));return t}maybeParseModuleAttributes(){if(!this.match(l._with)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();const t=[],e=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),"type"!==s.key.name&&this.raise(s.key.start,w.ModuleAttributeDifferentFromType,s.key.name),e.has(s.key.name)&&this.raise(s.key.start,w.ModuleAttributesWithDuplicateKeys,s.key.name),e.add(s.key.name),this.expect(l.colon),!this.match(l.string))throw this.unexpected(this.state.start,w.ModuleAttributeInvalidValue);s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),t.pu
1sh(s)}while(this.eat(l.comma));return t}maybeParseImportAssertions(){if(!this.isContextual("assert")||this.hasPrecedingLineBreak())return this.hasPlugin("importAssertions")?[]:null;this.expectPlugin("importAssertions"),this.next(),this.eat(l.braceL);const t=this.parseAssertEntries();return this.eat(l.braceR),t}maybeParseDefaultImportSpecifier(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}maybeParseStarImportSpecifier(t){if(this.match(l.star)){const e=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(l.braceL);!this.eat(l.braceR);){if(e)e=!1;else{if(this.eat(l.colon))throw this.raise(this.state.start,w.DestructureNamedImport);if(this.expect(l.comma),this.eat(l.braceR))break}this.parseImportSpecifier(t)}}parseImportSpecifier(t){const e=this.startNode(),s=this.match(l.string);if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdentifier();else{const{imported:t}=e;if(s)throw this.raise(e.start,w.ImportBindingIsString,t.value);this.checkReservedWord(t.name,e.start,!0,!0),e.local=Tt(t)}this.checkLVal(e.local,"import specifier",9),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}isThisParam(t){return"Identifier"===t.type&&"this"===t.name}}{constructor(t,e){super(t=function(t){const e={};for(const s of Object.keys(Gt))e[s]=t&&null!=t[s]?t[s]:Gt[s];return e}(t),e),this.options=t,this.initializeScopes(),this.plugins=function(t){const e=new Map;for(const s of t){const[t,i]=Array.isArray(s)?s:[s,{}];e.has(t)||e.set(t,i||{})}return e}(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return et}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}}function se(t,e){let s=ee;return null!=t&&t.plugins&&(!function(t){if(Ht(t,"decorators")){if(Ht(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=zt(t,"decorators","decoratorsBeforeExport");if(null==e)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 e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(Ht(t,"flow")&&Ht(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Ht(t,"placeholders")&&Ht(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Ht(t,"pipelineOperator")){const e=zt(t,"pipelineOperator","proposal");if(!Vt.includes(e)){const t=Vt.map((t=>`"${t}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}const s=Ht(t,"recordAndTuple")&&"hash"===zt(t,"recordAndTuple","syntaxType");if("hack"===e){if(Ht(t,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Ht(t,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const e=zt(t,"pipelineOperator","topicToken");if(!Kt.includes(e)){const t=Kt.map((t=>`"${t}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${t}.`)}if("#"===e&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===e&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Ht(t,"moduleAttributes")){if(Ht(t,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if("may-2020"!==zt(t,"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(Ht(t,"recordAndTuple")&&!Wt.includes(zt(t,"recordAndTuple","syntaxType")))throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+Wt.map((t=>`'${t}'`)).join(", "));if(Ht(t,"asyncDoExpressions")&&!Ht(t,"doExpressions")){const t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}}(t.plugins),s=function(t){const e=Xt.filter((e=>Ht(t,e))),s=e.join("/");let i=ie[s];if(!i){i=ee;for(const t of e)i=Jt[t](i);ie[s]=i}return i}(t.plugins)),new s(t,e)}const ie={};e.parse=function(t,e){var s;
1if("unambiguous"!==(null==(s=e)?void 0:s.sourceType))return se(e,t).parse();e=Object.assign({},e);try{e.sourceType="module";const s=se(e,t),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",se(e,t).parse()}catch(i){}else r.program.sourceType="script";return r}catch(r){try{return e.sourceType="script",se(e,t).parse()}catch(a){}throw r}},e.parseExpression=function(t,e){const s=se(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()},e.tokTypes=l}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.