diff --git a/package.json b/package.json index 1ced03b5f7a45..08dd307176a9e 100644 --- a/package.json +++ b/package.json @@ -236,14 +236,16 @@ "typescript": "5.1.3", "unfetch": "4.2.0", "wait-port": "0.2.2", - "webpack": "5.74.0", + "webpack": "5.86.0", "webpack-bundle-analyzer": "4.7.0", "whatwg-fetch": "3.0.0", "ws": "8.2.3" }, "resolutions": { + "webpack": "5.86.0", "browserslist": "4.20.2", "caniuse-lite": "1.0.30001406", + "@types/node": "20.2.5", "@babel/core": "7.18.0", "@babel/parser": "7.18.0", "@babel/types": "7.18.0", diff --git a/packages/next/package.json b/packages/next/package.json index 1c8b189a0950d..71dc3f2d05999 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -305,7 +305,7 @@ "vm-browserify": "1.1.2", "watchpack": "2.4.0", "web-vitals": "3.0.0", - "webpack": "5.74.0", + "webpack": "5.86.0", "webpack-sources1": "npm:webpack-sources@1.4.3", "webpack-sources3": "npm:webpack-sources@3.2.3", "ws": "8.2.3" diff --git a/packages/next/src/build/webpack/loaders/utils.ts b/packages/next/src/build/webpack/loaders/utils.ts index 404dfe09dbb14..5a06fb158df37 100644 --- a/packages/next/src/build/webpack/loaders/utils.ts +++ b/packages/next/src/build/webpack/loaders/utils.ts @@ -6,7 +6,7 @@ const imageRegex = new RegExp(`\\.(${imageExtensions.join('|')})$`) export function isClientComponentEntryModule(mod: { resource: string - buildInfo: any + buildInfo?: any }) { const rscInfo = mod.buildInfo.rsc const hasClientDirective = rscInfo?.isClientRef @@ -40,9 +40,9 @@ export function isCSSMod(mod: { export function getActions(mod: { resource: string - buildInfo: any + buildInfo?: any }): undefined | string[] { - return mod.buildInfo.rsc?.actions + return mod.buildInfo?.rsc?.actions } export function generateActionId(filePath: string, exportName: string) { diff --git a/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts b/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts index c7fcaa45cc781..4f5e2a955befd 100644 --- a/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts +++ b/packages/next/src/build/webpack/plugins/flight-manifest-plugin.ts @@ -136,8 +136,8 @@ export class ClientReferenceManifestPlugin { // Collect client requests function collectClientRequest(mod: webpack.NormalModule) { - if (mod.resource === '' && mod.buildInfo.rsc) { - const { requests = [] } = mod.buildInfo.rsc + if (mod.resource === '' && mod.buildInfo?.rsc) { + const { requests = [] } = mod.buildInfo?.rsc requests.forEach((r: string) => { clientRequestsSet.add(r) }) @@ -150,7 +150,7 @@ export class ClientReferenceManifestPlugin { function getAppPathRequiredChunks() { return chunkGroup.chunks .map((requiredChunk: webpack.Chunk) => { - if (SYSTEM_ENTRYPOINTS.has(requiredChunk.name)) { + if (SYSTEM_ENTRYPOINTS.has(requiredChunk.name || '')) { return null } @@ -265,7 +265,7 @@ export class ClientReferenceManifestPlugin { } return null }), - ...(mod.buildInfo.rsc?.clientRefs || []), + ...(mod.buildInfo?.rsc?.clientRefs || []), ] .filter(Boolean) .flat() diff --git a/packages/next/src/bundles/webpack/packages/lazy-compilation-node.js b/packages/next/src/bundles/webpack/packages/lazy-compilation-node.js index 5dd417b7b0ade..da4058583b11e 100644 --- a/packages/next/src/bundles/webpack/packages/lazy-compilation-node.js +++ b/packages/next/src/bundles/webpack/packages/lazy-compilation-node.js @@ -3,11 +3,17 @@ "use strict"; var urlBase = decodeURIComponent(__resourceQuery.slice(1)); + +/** + * @param {{ data: string, onError: (err: Error) => void, active: boolean, module: module }} options options + * @returns {() => void} function to destroy response + */ exports.keepAlive = function (options) { var data = options.data; var onError = options.onError; var active = options.active; var module = options.module; + /** @type {import("http").IncomingMessage} */ var response; var request = ( urlBase.startsWith("https") ? require("https") : require("http") @@ -27,6 +33,10 @@ exports.keepAlive = function (options) { } } ); + + /** + * @param {Error} err error + */ function errorHandler(err) { err.message = "Problem communicating active modules to the server: " + err.message; diff --git a/packages/next/src/bundles/webpack/packages/lazy-compilation-web.js b/packages/next/src/bundles/webpack/packages/lazy-compilation-web.js index 62d955c5a22bf..ec8253f0a3cac 100644 --- a/packages/next/src/bundles/webpack/packages/lazy-compilation-web.js +++ b/packages/next/src/bundles/webpack/packages/lazy-compilation-web.js @@ -9,6 +9,7 @@ if (typeof EventSource !== "function") { } var urlBase = decodeURIComponent(__resourceQuery.slice(1)); +/** @type {EventSource | undefined} */ var activeEventSource; var activeKeys = new Map(); var errorHandlers = new Set(); @@ -19,6 +20,10 @@ var updateEventSource = function updateEventSource() { activeEventSource = new EventSource( urlBase + Array.from(activeKeys.keys()).join("@") ); + /** + * @this {EventSource} + * @param {Event & { message?: string, filename?: string, lineno?: number, colno?: number, error?: Error }} event event + */ activeEventSource.onerror = function (event) { errorHandlers.forEach(function (onError) { onError( @@ -42,6 +47,10 @@ var updateEventSource = function updateEventSource() { } }; +/** + * @param {{ data: string, onError: (err: Error) => void, active: boolean, module: module }} options options + * @returns {() => void} function to destroy response + */ exports.keepAlive = function (options) { var data = options.data; var onError = options.onError; diff --git a/packages/next/src/compiled/babel/bundle.js b/packages/next/src/compiled/babel/bundle.js index 36f3912fa2f77..fd0a815ec005e 100644 --- a/packages/next/src/compiled/babel/bundle.js +++ b/packages/next/src/compiled/babel/bundle.js @@ -1907,4 +1907,4 @@ export default function _identity(x) { return x; } -`},5262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;t.ensure=ensure;t.get=get;t.getDependencies=getDependencies;t.list=void 0;t.minVersion=minVersion;var n=r(7734);var s=r(6953);var i=r(6337);const{assignmentExpression:a,cloneNode:o,expressionStatement:l,file:c,identifier:u}=s;function makePath(e){const t=[];for(;e.parentPath;e=e.parentPath){t.push(e.key);if(e.inList)t.push(e.listKey)}return t.reverse().join(".")}let p=undefined;function getHelperMetadata(e){const t=new Set;const r=new Set;const s=new Map;let a;let o;const l=[];const c=[];const u=[];const p={ImportDeclaration(e){const t=e.node.source.value;if(!i.default[t]){throw e.buildCodeFrameError(`Unknown helper ${t}`)}if(e.get("specifiers").length!==1||!e.get("specifiers.0").isImportDefaultSpecifier()){throw e.buildCodeFrameError("Helpers can only import a default value")}const r=e.node.specifiers[0].local;s.set(r,t);c.push(makePath(e))},ExportDefaultDeclaration(e){const t=e.get("declaration");if(!t.isFunctionDeclaration()||!t.node.id){throw t.buildCodeFrameError("Helpers can only export named function declarations")}a=t.node.id.name;o=makePath(e)},ExportAllDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},ExportNamedDeclaration(e){throw e.buildCodeFrameError("Helpers can only export default")},Statement(e){if(e.isModuleDeclaration())return;e.skip()}};const f={Program(e){const t=e.scope.getAllBindings();Object.keys(t).forEach((e=>{if(e===a)return;if(s.has(t[e].identifier))return;r.add(e)}))},ReferencedIdentifier(e){const r=e.node.name;const n=e.scope.getBinding(r);if(!n){t.add(r)}else if(s.has(n.identifier)){u.push(makePath(e))}},AssignmentExpression(e){const t=e.get("left");if(!(a in t.getBindingIdentifiers()))return;if(!t.isIdentifier()){throw t.buildCodeFrameError("Only simple assignments to exports are allowed in helpers")}const r=e.scope.getBinding(a);if(r!=null&&r.scope.path.isProgram()){l.push(makePath(e))}}};(0,n.default)(e.ast,p,e.scope);(0,n.default)(e.ast,f,e.scope);if(!o)throw new Error("Helpers must have a default export.");l.reverse();return{globals:Array.from(t),localBindingNames:Array.from(r),dependencies:s,exportBindingAssignments:l,exportPath:o,exportName:a,importBindingsReferences:u,importPaths:c}}function permuteHelperAST(e,t,r,n,s){if(n&&!r){throw new Error("Unexpected local bindings for module-based helpers.")}if(!r)return;const{localBindingNames:i,dependencies:c,exportBindingAssignments:p,exportPath:f,exportName:d,importBindingsReferences:h,importPaths:m}=t;const y={};c.forEach(((e,t)=>{y[t.name]=typeof s==="function"&&s(e)||t}));const g={};const b=new Set(n||[]);i.forEach((e=>{let t=e;while(b.has(t))t="_"+t;if(t!==e)g[e]=t}));if(r.type==="Identifier"&&d!==r.name){g[d]=r.name}const{path:T}=e;const S=T.get(f);const E=m.map((e=>T.get(e)));const x=h.map((e=>T.get(e)));const P=S.get("declaration");if(r.type==="Identifier"){S.replaceWith(P)}else if(r.type==="MemberExpression"){p.forEach((e=>{const t=T.get(e);t.replaceWith(a("=",r,t.node))}));S.replaceWith(P);T.pushContainer("body",l(a("=",r,u(d))))}else{throw new Error("Unexpected helper format.")}Object.keys(g).forEach((e=>{T.scope.rename(e,g[e])}));for(const e of E)e.remove();for(const e of x){const t=o(y[e.node.name]);e.replaceWith(t)}}const f=Object.create(null);function loadHelper(e){if(!f[e]){const t=i.default[e];if(!t){throw Object.assign(new ReferenceError(`Unknown helper ${e}`),{code:"BABEL_HELPER_UNKNOWN",helper:e})}const fn=()=>{{if(!p){const e={ast:c(t.ast()),path:null};(0,n.default)(e.ast,{Program:t=>(e.path=t).stop()});return e}}return new p({filename:`babel-helper://${e}`},{ast:c(t.ast()),code:"[internal Babel helper code]",inputMap:null})};let r=null;f[e]={minVersion:t.minVersion,build(e,t,n){const s=fn();r||(r=getHelperMetadata(s));permuteHelperAST(s,r,t,n,e);return{nodes:s.ast.program.body,globals:r.globals}},getDependencies(){r||(r=getHelperMetadata(fn()));return Array.from(r.dependencies.values())}}}return f[e]}function get(e,t,r,n){return loadHelper(e).build(t,r,n)}function minVersion(e){return loadHelper(e).minVersion}function getDependencies(e){return loadHelper(e).getDependencies()}function ensure(e,t){p||(p=t);loadHelper(e)}const d=Object.keys(i.default).map((e=>e.replace(/^_/,"")));t.list=d;var h=get;t["default"]=h},9038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=highlight;t.getChalk=getChalk;t.shouldHighlight=shouldHighlight;var n=r(8874);var s=r(7239);var i=r(8542);const a=new Set(["as","async","from","get","of","set"]);function getDefs(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}const o=/\r\n|[\n\r\u2028\u2029]/;const l=/^[()[\]{}]$/;let c;{const e=/^[a-z][\w-]*$/i;const getTokenType=function(t,r,n){if(t.type==="name"){if((0,s.isKeyword)(t.value)||(0,s.isStrictReservedWord)(t.value,true)||a.has(t.value)){return"keyword"}if(e.test(t.value)&&(n[r-1]==="<"||n.substr(r-2,2)=="t(e))).join("\n")}else{r+=s}}return r}function shouldHighlight(e){return!!i.supportsColor||e.forceColor}function getChalk(e){return e.forceColor?new i.constructor({enabled:true,level:1}):i}function highlight(e,t={}){if(e!==""&&shouldHighlight(t)){const r=getChalk(t);const n=getDefs(r);return highlightTokens(n,e)}else{return e}}},9113:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var s,i;for(i=0;i=0)continue;r[s]=e[s]}return r}class Position{constructor(e,t,r){this.line=void 0;this.column=void 0;this.index=void 0;this.line=e;this.column=t;this.index=r}}class SourceLocation{constructor(e,t){this.start=void 0;this.end=void 0;this.filename=void 0;this.identifierName=void 0;this.start=e;this.end=t}}function createPositionWithColumnOffset(e,t){const{line:r,column:n,index:s}=e;return new Position(r,n+t,s+t)}const r=Object.freeze({SyntaxError:"BABEL_PARSER_SYNTAX_ERROR",SourceTypeModuleError:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"});const reflect=(e,t=e.length-1)=>({get(){return e.reduce(((e,t)=>e[t]),this)},set(r){e.reduce(((e,n,s)=>s===t?e[n]=r:e[n]),this)}});const instantiate=(e,t,r)=>Object.keys(r).map((e=>[e,r[e]])).filter((([,e])=>!!e)).map((([e,t])=>[e,typeof t==="function"?{value:t,enumerable:false}:typeof t.reflect==="string"?Object.assign({},t,reflect(t.reflect.split("."))):t])).reduce(((e,[t,r])=>Object.defineProperty(e,t,Object.assign({configurable:true},r))),Object.assign(new e,t));var ModuleErrors=e=>({ImportMetaOutsideModule:e(`import.meta may appear only with 'sourceType: "module"'`,{code:r.SourceTypeModuleError}),ImportOutsideModule:e(`'import' and 'export' may appear only with 'sourceType: "module"'`,{code:r.SourceTypeModuleError})});const n={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"};const toNodeDescription=({type:e,prefix:t})=>e==="UpdateExpression"?n.UpdateExpression[String(t)]:n[e];var StandardErrors=e=>({AccessorIsGenerator:e((({kind:e})=>`A ${e}ter cannot be a generator.`)),ArgumentsInClass:e("'arguments' is only allowed in functions and class methods."),AsyncFunctionInSingleStatementContext:e("Async functions can only be declared at the top level or inside a block."),AwaitBindingIdentifier:e("Can not use 'await' as identifier inside an async function."),AwaitBindingIdentifierInStaticBlock:e("Can not use 'await' as identifier inside a static block."),AwaitExpressionFormalParameter:e("'await' is not allowed in async function parameters."),AwaitNotInAsyncContext:e("'await' is only allowed within async functions and at the top levels of modules."),AwaitNotInAsyncFunction:e("'await' is only allowed within async functions."),BadGetterArity:e("A 'get' accesor must not have any formal parameters."),BadSetterArity:e("A 'set' accesor must have exactly one formal parameter."),BadSetterRestParameter:e("A 'set' accesor function argument must not be a rest parameter."),ConstructorClassField:e("Classes may not have a field named 'constructor'."),ConstructorClassPrivateField:e("Classes may not have a private field named '#constructor'."),ConstructorIsAccessor:e("Class constructor may not be an accessor."),ConstructorIsAsync:e("Constructor can't be an async function."),ConstructorIsGenerator:e("Constructor can't be a generator."),DeclarationMissingInitializer:e((({kind:e})=>`Missing initializer in ${e} declaration.`)),DecoratorBeforeExport:e("Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax."),DecoratorConstructor:e("Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"),DecoratorExportClass:e("Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead."),DecoratorSemicolon:e("Decorators must not be followed by a semicolon."),DecoratorStaticBlock:e("Decorators can't be used with a static block."),DeletePrivateField:e("Deleting a private field is not allowed."),DestructureNamedImport:e("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),DuplicateConstructor:e("Duplicate constructor in the same class."),DuplicateDefaultExport:e("Only one default export allowed per module."),DuplicateExport:e((({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`)),DuplicateProto:e("Redefinition of __proto__ property."),DuplicateRegExpFlags:e("Duplicate regular expression flag."),ElementAfterRest:e("Rest element must be last element."),EscapedCharNotAnIdentifier:e("Invalid Unicode escape."),ExportBindingIsString:e((({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`)),ExportDefaultFromAsIdentifier:e("'from' is not allowed as an identifier after 'export default'."),ForInOfLoopInitializer:e((({type:e})=>`'${e==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`)),ForOfAsync:e("The left-hand side of a for-of loop may not be 'async'."),ForOfLet:e("The left-hand side of a for-of loop may not start with 'let'."),GeneratorInSingleStatementContext:e("Generators can only be declared at the top level or inside a block."),IllegalBreakContinue:e((({type:e})=>`Unsyntactic ${e==="BreakStatement"?"break":"continue"}.`)),IllegalLanguageModeDirective:e("Illegal 'use strict' directive in function with non-simple parameter list."),IllegalReturn:e("'return' outside of function."),ImportBindingIsString:e((({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`)),ImportCallArgumentTrailingComma:e("Trailing comma is disallowed inside import(...) arguments."),ImportCallArity:e((({maxArgumentCount:e})=>`\`import()\` requires exactly ${e===1?"one argument":"one or two arguments"}.`)),ImportCallNotNewExpression:e("Cannot use new with import(...)."),ImportCallSpreadArgument:e("`...` is not allowed in `import()`."),IncompatibleRegExpUVFlags:e("The 'u' and 'v' regular expression flags cannot be enabled at the same time."),InvalidBigIntLiteral:e("Invalid BigIntLiteral."),InvalidCodePoint:e("Code point out of bounds."),InvalidCoverInitializedName:e("Invalid shorthand property initializer."),InvalidDecimal:e("Invalid decimal."),InvalidDigit:e((({radix:e})=>`Expected number in radix ${e}.`)),InvalidEscapeSequence:e("Bad character escape sequence."),InvalidEscapeSequenceTemplate:e("Invalid escape sequence in template."),InvalidEscapedReservedWord:e((({reservedWord:e})=>`Escape sequence in keyword ${e}.`)),InvalidIdentifier:e((({identifierName:e})=>`Invalid identifier ${e}.`)),InvalidLhs:e((({ancestor:e})=>`Invalid left-hand side in ${toNodeDescription(e)}.`)),InvalidLhsBinding:e((({ancestor:e})=>`Binding invalid left-hand side in ${toNodeDescription(e)}.`)),InvalidNumber:e("Invalid number."),InvalidOrMissingExponent:e("Floating-point numbers require a valid exponent after the 'e'."),InvalidOrUnexpectedToken:e((({unexpected:e})=>`Unexpected character '${e}'.`)),InvalidParenthesizedAssignment:e("Invalid parenthesized assignment pattern."),InvalidPrivateFieldResolution:e((({identifierName:e})=>`Private name #${e} is not defined.`)),InvalidPropertyBindingPattern:e("Binding member expression."),InvalidRecordProperty:e("Only properties and spread elements are allowed in record definitions."),InvalidRestAssignmentPattern:e("Invalid rest operator's argument."),LabelRedeclaration:e((({labelName:e})=>`Label '${e}' is already declared.`)),LetInLexicalBinding:e("'let' is not allowed to be used as a name in 'let' or 'const' declarations."),LineTerminatorBeforeArrow:e("No line break is allowed before '=>'."),MalformedRegExpFlags:e("Invalid regular expression flag."),MissingClassName:e("A class name is required."),MissingEqInAssignment:e("Only '=' operator can be used for specifying default value."),MissingSemicolon:e("Missing semicolon."),MissingPlugin:e((({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`)),MissingOneOfPlugins:e((({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).join(", ")}.`)),MissingUnicodeEscape:e("Expecting Unicode escape sequence \\uXXXX."),MixingCoalesceWithLogical:e("Nullish coalescing operator(??) requires parens when mixing with logical operators."),ModuleAttributeDifferentFromType:e("The only accepted module attribute is `type`."),ModuleAttributeInvalidValue:e("Only string literals are allowed as module attribute values."),ModuleAttributesWithDuplicateKeys:e((({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`)),ModuleExportNameHasLoneSurrogate:e((({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`)),ModuleExportUndefined:e((({localName:e})=>`Export '${e}' is not defined.`)),MultipleDefaultsInSwitch:e("Multiple default clauses."),NewlineAfterThrow:e("Illegal newline after throw."),NoCatchOrFinally:e("Missing catch or finally clause."),NumberIdentifier:e("Identifier directly after number."),NumericSeparatorInEscapeSequence:e("Numeric separators are not allowed inside unicode escape sequences or hex escape sequences."),ObsoleteAwaitStar:e("'await*' has been removed from the async functions proposal. Use Promise.all() instead."),OptionalChainingNoNew:e("Constructors in/after an Optional Chain are not allowed."),OptionalChainingNoTemplate:e("Tagged Template Literals are not allowed in optionalChain."),OverrideOnConstructor:e("'override' modifier cannot appear on a constructor declaration."),ParamDupe:e("Argument name clash."),PatternHasAccessor:e("Object pattern can't contain getter or setter."),PatternHasMethod:e("Object pattern can't contain methods."),PrivateInExpectedIn:e((({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`)),PrivateNameRedeclaration:e((({identifierName:e})=>`Duplicate private name #${e}.`)),RecordExpressionBarIncorrectEndSyntaxType:e("Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'."),RecordExpressionBarIncorrectStartSyntaxType:e("Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'."),RecordExpressionHashIncorrectStartSyntaxType:e("Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'."),RecordNoProto:e("'__proto__' is not allowed in Record expressions."),RestTrailingComma:e("Unexpected trailing comma after rest element."),SloppyFunction:e("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:e("Classes may not have static property named prototype."),SuperNotAllowed:e("`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:e("Private fields can't be accessed on super."),TrailingDecorator:e("Decorators must be attached to a class element."),TupleExpressionBarIncorrectEndSyntaxType:e("Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'."),TupleExpressionBarIncorrectStartSyntaxType:e("Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'."),TupleExpressionHashIncorrectStartSyntaxType:e("Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'."),UnexpectedArgumentPlaceholder:e("Unexpected argument placeholder."),UnexpectedAwaitAfterPipelineBody:e('Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.'),UnexpectedDigitAfterHash:e("Unexpected digit after hash token."),UnexpectedImportExport:e("'import' and 'export' may only appear at the top level."),UnexpectedKeyword:e((({keyword:e})=>`Unexpected keyword '${e}'.`)),UnexpectedLeadingDecorator:e("Leading decorators must be attached to a class declaration."),UnexpectedLexicalDeclaration:e("Lexical declaration cannot appear in a single-statement context."),UnexpectedNewTarget:e("`new.target` can only be used in functions or class properties."),UnexpectedNumericSeparator:e("A numeric separator is only allowed between two digits."),UnexpectedPrivateField:e("Unexpected private name."),UnexpectedReservedWord:e((({reservedWord:e})=>`Unexpected reserved word '${e}'.`)),UnexpectedSuper:e("'super' is only allowed in object methods and classes."),UnexpectedToken:e((({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`)),UnexpectedTokenUnaryExponentiation:e("Illegal expression. Wrap left hand side or entire exponentiation in parentheses."),UnsupportedBind:e("Binding should be performed on object property."),UnsupportedDecoratorExport:e("A decorated export must export a class declaration."),UnsupportedDefaultExport:e("Only expressions, functions or classes are allowed as the `default` export."),UnsupportedImport:e("`import` can only be used in `import()` or `import.meta`."),UnsupportedMetaProperty:e((({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`)),UnsupportedParameterDecorator:e("Decorators cannot be used to decorate parameters."),UnsupportedPropertyDecorator:e("Decorators cannot be used to decorate object literal properties."),UnsupportedSuper:e("'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])."),UnterminatedComment:e("Unterminated comment."),UnterminatedRegExp:e("Unterminated regular expression."),UnterminatedString:e("Unterminated string constant."),UnterminatedTemplate:e("Unterminated template."),VarRedeclaration:e((({identifierName:e})=>`Identifier '${e}' has already been declared.`)),YieldBindingIdentifier:e("Can not use 'yield' as identifier inside a generator."),YieldInParameter:e("Yield expression is not allowed in formal parameters."),ZeroDigitNumericSeparator:e("Numeric separator can not be used after leading 0.")});var StrictModeErrors=e=>({StrictDelete:e("Deleting local variable in strict mode."),StrictEvalArguments:e((({referenceName:e})=>`Assigning to '${e}' in strict mode.`)),StrictEvalArgumentsBinding:e((({bindingName:e})=>`Binding '${e}' in strict mode.`)),StrictFunction:e("In strict mode code, functions can only be declared at top level or inside a block."),StrictNumericEscape:e("The only valid numeric escape in strict mode is '\\0'."),StrictOctalLiteral:e("Legacy octal literals are not allowed in strict mode."),StrictWith:e("'with' in strict mode.")});const s=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var PipelineOperatorErrors=e=>({PipeBodyIsTighter:e("Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence."),PipeTopicRequiresHackPipes:e('Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'),PipeTopicUnbound:e("Topic reference is unbound; it must be inside a pipe body."),PipeTopicUnconfiguredToken:e((({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`)),PipeTopicUnused:e("Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once."),PipeUnparenthesizedBody:e((({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({type:e})}; please wrap it in parentheses.`)),PipelineBodyNoArrow:e('Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.'),PipelineBodySequenceExpression:e("Pipeline body may not be a comma-separated sequence expression."),PipelineHeadSequenceExpression:e("Pipeline head should not be a comma-separated sequence expression."),PipelineTopicUnused:e("Pipeline is in topic style but does not use topic reference."),PrimaryTopicNotAllowed:e("Topic reference was used in a lexical context without topic binding."),PrimaryTopicRequiresSmartPipeline:e('Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.')});const i=["toMessage"];function toParseErrorConstructor(e){let{toMessage:t}=e,r=_objectWithoutPropertiesLoose(e,i);return function constructor({loc:e,details:n}){return instantiate(SyntaxError,Object.assign({},r,{loc:e}),{clone(e={}){const t=e.loc||{};return constructor({loc:new Position("line"in t?t.line:this.loc.line,"column"in t?t.column:this.loc.column,"index"in t?t.index:this.loc.index),details:Object.assign({},this.details,e.details)})},details:{value:n,enumerable:false},message:{get(){return`${t(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:"loc.index",enumerable:true},missingPlugin:"missingPlugin"in n&&{reflect:"details.missingPlugin",enumerable:true}})}}function toParseErrorCredentials(e,t){return Object.assign({toMessage:typeof e==="string"?()=>e:e},t)}function ParseErrorEnum(e,t){if(Array.isArray(e)){return t=>ParseErrorEnum(t,e[0])}const n=e(toParseErrorCredentials);const s={};for(const e of Object.keys(n)){s[e]=toParseErrorConstructor(Object.assign({code:r.SyntaxError,reasonCode:e},t?{syntaxPlugin:t}:{},n[e]))}return s}const a=Object.assign({},ParseErrorEnum(ModuleErrors),ParseErrorEnum(StandardErrors),ParseErrorEnum(StrictModeErrors),ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));const{defineProperty:o}=Object;const toUnenumerable=(e,t)=>o(e,t,{enumerable:false,value:e[t]});function toESTreeLocation(e){toUnenumerable(e.loc.start,"index");toUnenumerable(e.loc.end,"index");return e}var estree=e=>class extends e{parse(){const e=toESTreeLocation(super.parse());if(this.options.tokens){e.tokens=e.tokens.map(toESTreeLocation)}return e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch(e){}const n=this.estreeParseLiteral(r);n.regex={pattern:e,flags:t};return n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const r=this.estreeParseLiteral(t);r.bigint=String(r.value||e);return r}parseDecimalLiteral(e){const t=null;const r=this.estreeParseLiteral(t);r.decimal=String(r.value||e);return r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){const t=e.value;const r=this.startNodeAt(e.start,e.loc.start);const n=this.startNodeAt(t.start,t.loc.start);n.value=t.extra.expressionValue;n.raw=t.extra.raw;r.expression=this.finishNodeAt(n,"Literal",t.loc.end);r.directive=t.extra.raw.slice(1,-1);return this.finishNodeAt(r,"ExpressionStatement",e.loc.end)}initFunction(e,t){super.initFunction(e,t);e.expression=false}checkDeclaration(e){if(e!=null&&this.isObjectProperty(e)){this.checkDeclaration(e.value)}else{super.checkDeclaration(e)}}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,...t){super.parseBlockBody(e,...t);const r=e.directives.map((e=>this.directiveToStmt(e)));e.body=r.concat(e.body);delete e.directives}pushClassMethod(e,t,r,n,s,i){this.parseMethod(t,r,n,s,i,"ClassMethod",true);if(t.typeParameters){t.value.typeParameters=t.typeParameters;delete t.typeParameters}e.body.push(t)}parsePrivateName(){const e=super.parsePrivateName();{if(!this.getPluginOption("estree","classFeatures")){return e}}return this.convertPrivateNameToPrivateIdentifier(e)}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);e=e;delete e.id;e.name=t;e.type="PrivateIdentifier";return e}isPrivateName(e){{if(!this.getPluginOption("estree","classFeatures")){return super.isPrivateName(e)}}return e.type==="PrivateIdentifier"}getPrivateNameSV(e){{if(!this.getPluginOption("estree","classFeatures")){return super.getPrivateNameSV(e)}}return e.name}parseLiteral(e,t){const r=super.parseLiteral(e,t);r.raw=r.extra.raw;delete r.extra;return r}parseFunctionBody(e,t,r=false){super.parseFunctionBody(e,t,r);e.expression=e.body.type!=="BlockStatement"}parseMethod(e,t,r,n,s,i,a=false){let o=this.startNode();o.kind=e.kind;o=super.parseMethod(o,t,r,n,s,i,a);o.type="FunctionExpression";delete o.kind;e.value=o;if(i==="ClassPrivateMethod"){e.computed=false}i="MethodDefinition";return this.finishNode(e,i)}parseClassProperty(...e){const t=super.parseClassProperty(...e);{if(!this.getPluginOption("estree","classFeatures")){return t}}t.type="PropertyDefinition";return t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);{if(!this.getPluginOption("estree","classFeatures")){return t}}t.type="PropertyDefinition";t.computed=false;return t}parseObjectMethod(e,t,r,n,s){const i=super.parseObjectMethod(e,t,r,n,s);if(i){i.type="Property";if(i.kind==="method")i.kind="init";i.shorthand=false}return i}parseObjectProperty(e,t,r,n,s){const i=super.parseObjectProperty(e,t,r,n,s);if(i){i.kind="init";i.type="Property"}return i}isValidLVal(e,...t){return e==="Property"?"value":super.isValidLVal(e,...t)}isAssignable(e,t){if(e!=null&&this.isObjectProperty(e)){return this.isAssignable(e.value,t)}return super.isAssignable(e,t)}toAssignable(e,t=false){if(e!=null&&this.isObjectProperty(e)){const{key:r,value:n}=e;if(this.isPrivateName(r)){this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start)}this.toAssignable(n,t)}else{super.toAssignable(e,t)}}toAssignableObjectExpressionProp(e){if(e.kind==="get"||e.kind==="set"){this.raise(a.PatternHasAccessor,{at:e.key})}else if(e.method){this.raise(a.PatternHasMethod,{at:e.key})}else{super.toAssignableObjectExpressionProp(...arguments)}}finishCallExpression(e,t){super.finishCallExpression(e,t);if(e.callee.type==="Import"){e.type="ImportExpression";e.source=e.arguments[0];if(this.hasPlugin("importAssertions")){var r;e.attributes=(r=e.arguments[1])!=null?r:null}delete e.arguments;delete e.callee}return e}toReferencedArguments(e){if(e.type==="ImportExpression"){return}super.toReferencedArguments(e)}parseExport(e){super.parseExport(e);switch(e.type){case"ExportAllDeclaration":e.exported=null;break;case"ExportNamedDeclaration":if(e.specifiers.length===1&&e.specifiers[0].type==="ExportNamespaceSpecifier"){e.type="ExportAllDeclaration";e.exported=e.specifiers[0].exported;delete e.specifiers}break}return e}parseSubscript(e,t,r,n,s){const i=super.parseSubscript(e,t,r,n,s);if(s.optionalChainMember){if(i.type==="OptionalMemberExpression"||i.type==="OptionalCallExpression"){i.type=i.type.substring(8)}if(s.stop){const e=this.startNodeAtNode(i);e.expression=i;return this.finishNode(e,"ChainExpression")}}else if(i.type==="MemberExpression"||i.type==="CallExpression"){i.optional=false}return i}hasPropertyAsPrivateName(e){if(e.type==="ChainExpression"){e=e.expression}return super.hasPropertyAsPrivateName(e)}isOptionalChain(e){return e.type==="ChainExpression"}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,t,r){return toESTreeLocation(super.finishNodeAt(e,t,r))}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t);toESTreeLocation(e)}};class TokContext{constructor(e,t){this.token=void 0;this.preserveSpace=void 0;this.token=e;this.preserveSpace=!!t}}const l={brace:new TokContext("{"),j_oTag:new TokContext("...",true)};{l.template=new TokContext("`",true)}const c=true;const u=true;const p=true;const f=true;const d=true;const h=true;class ExportedTokenType{constructor(e,t={}){this.label=void 0;this.keyword=void 0;this.beforeExpr=void 0;this.startsExpr=void 0;this.rightAssociative=void 0;this.isLoop=void 0;this.isAssign=void 0;this.prefix=void 0;this.postfix=void 0;this.binop=void 0;this.label=e;this.keyword=t.keyword;this.beforeExpr=!!t.beforeExpr;this.startsExpr=!!t.startsExpr;this.rightAssociative=!!t.rightAssociative;this.isLoop=!!t.isLoop;this.isAssign=!!t.isAssign;this.prefix=!!t.prefix;this.postfix=!!t.postfix;this.binop=t.binop!=null?t.binop:null;{this.updateContext=null}}}const m=new Map;function createKeyword(e,t={}){t.keyword=e;const r=createToken(e,t);m.set(e,r);return r}function createBinop(e,t){return createToken(e,{beforeExpr:c,binop:t})}let y=-1;const g=[];const b=[];const T=[];const S=[];const E=[];const x=[];function createToken(e,t={}){var r,n,s,i;++y;b.push(e);T.push((r=t.binop)!=null?r:-1);S.push((n=t.beforeExpr)!=null?n:false);E.push((s=t.startsExpr)!=null?s:false);x.push((i=t.prefix)!=null?i:false);g.push(new ExportedTokenType(e,t));return y}function createKeywordLike(e,t={}){var r,n,s,i;++y;m.set(e,y);b.push(e);T.push((r=t.binop)!=null?r:-1);S.push((n=t.beforeExpr)!=null?n:false);E.push((s=t.startsExpr)!=null?s:false);x.push((i=t.prefix)!=null?i:false);g.push(new ExportedTokenType("name",t));return y}const P={bracketL:createToken("[",{beforeExpr:c,startsExpr:u}),bracketHashL:createToken("#[",{beforeExpr:c,startsExpr:u}),bracketBarL:createToken("[|",{beforeExpr:c,startsExpr:u}),bracketR:createToken("]"),bracketBarR:createToken("|]"),braceL:createToken("{",{beforeExpr:c,startsExpr:u}),braceBarL:createToken("{|",{beforeExpr:c,startsExpr:u}),braceHashL:createToken("#{",{beforeExpr:c,startsExpr:u}),braceR:createToken("}"),braceBarR:createToken("|}"),parenL:createToken("(",{beforeExpr:c,startsExpr:u}),parenR:createToken(")"),comma:createToken(",",{beforeExpr:c}),semi:createToken(";",{beforeExpr:c}),colon:createToken(":",{beforeExpr:c}),doubleColon:createToken("::",{beforeExpr:c}),dot:createToken("."),question:createToken("?",{beforeExpr:c}),questionDot:createToken("?."),arrow:createToken("=>",{beforeExpr:c}),template:createToken("template"),ellipsis:createToken("...",{beforeExpr:c}),backQuote:createToken("`",{startsExpr:u}),dollarBraceL:createToken("${",{beforeExpr:c,startsExpr:u}),templateTail:createToken("...`",{startsExpr:u}),templateNonTail:createToken("...${",{beforeExpr:c,startsExpr:u}),at:createToken("@"),hash:createToken("#",{startsExpr:u}),interpreterDirective:createToken("#!..."),eq:createToken("=",{beforeExpr:c,isAssign:f}),assign:createToken("_=",{beforeExpr:c,isAssign:f}),slashAssign:createToken("_=",{beforeExpr:c,isAssign:f}),xorAssign:createToken("_=",{beforeExpr:c,isAssign:f}),moduloAssign:createToken("_=",{beforeExpr:c,isAssign:f}),incDec:createToken("++/--",{prefix:d,postfix:h,startsExpr:u}),bang:createToken("!",{beforeExpr:c,prefix:d,startsExpr:u}),tilde:createToken("~",{beforeExpr:c,prefix:d,startsExpr:u}),doubleCaret:createToken("^^",{startsExpr:u}),doubleAt:createToken("@@",{startsExpr:u}),pipeline:createBinop("|>",0),nullishCoalescing:createBinop("??",1),logicalOR:createBinop("||",1),logicalAND:createBinop("&&",2),bitwiseOR:createBinop("|",3),bitwiseXOR:createBinop("^",4),bitwiseAND:createBinop("&",5),equality:createBinop("==/!=/===/!==",6),lt:createBinop("/<=/>=",7),gt:createBinop("/<=/>=",7),relational:createBinop("/<=/>=",7),bitShift:createBinop("<>/>>>",8),bitShiftL:createBinop("<>/>>>",8),bitShiftR:createBinop("<>/>>>",8),plusMin:createToken("+/-",{beforeExpr:c,binop:9,prefix:d,startsExpr:u}),modulo:createToken("%",{binop:10,startsExpr:u}),star:createToken("*",{binop:10}),slash:createBinop("/",10),exponent:createToken("**",{beforeExpr:c,binop:11,rightAssociative:true}),_in:createKeyword("in",{beforeExpr:c,binop:7}),_instanceof:createKeyword("instanceof",{beforeExpr:c,binop:7}),_break:createKeyword("break"),_case:createKeyword("case",{beforeExpr:c}),_catch:createKeyword("catch"),_continue:createKeyword("continue"),_debugger:createKeyword("debugger"),_default:createKeyword("default",{beforeExpr:c}),_else:createKeyword("else",{beforeExpr:c}),_finally:createKeyword("finally"),_function:createKeyword("function",{startsExpr:u}),_if:createKeyword("if"),_return:createKeyword("return",{beforeExpr:c}),_switch:createKeyword("switch"),_throw:createKeyword("throw",{beforeExpr:c,prefix:d,startsExpr:u}),_try:createKeyword("try"),_var:createKeyword("var"),_const:createKeyword("const"),_with:createKeyword("with"),_new:createKeyword("new",{beforeExpr:c,startsExpr:u}),_this:createKeyword("this",{startsExpr:u}),_super:createKeyword("super",{startsExpr:u}),_class:createKeyword("class",{startsExpr:u}),_extends:createKeyword("extends",{beforeExpr:c}),_export:createKeyword("export"),_import:createKeyword("import",{startsExpr:u}),_null:createKeyword("null",{startsExpr:u}),_true:createKeyword("true",{startsExpr:u}),_false:createKeyword("false",{startsExpr:u}),_typeof:createKeyword("typeof",{beforeExpr:c,prefix:d,startsExpr:u}),_void:createKeyword("void",{beforeExpr:c,prefix:d,startsExpr:u}),_delete:createKeyword("delete",{beforeExpr:c,prefix:d,startsExpr:u}),_do:createKeyword("do",{isLoop:p,beforeExpr:c}),_for:createKeyword("for",{isLoop:p}),_while:createKeyword("while",{isLoop:p}),_as:createKeywordLike("as",{startsExpr:u}),_assert:createKeywordLike("assert",{startsExpr:u}),_async:createKeywordLike("async",{startsExpr:u}),_await:createKeywordLike("await",{startsExpr:u}),_from:createKeywordLike("from",{startsExpr:u}),_get:createKeywordLike("get",{startsExpr:u}),_let:createKeywordLike("let",{startsExpr:u}),_meta:createKeywordLike("meta",{startsExpr:u}),_of:createKeywordLike("of",{startsExpr:u}),_sent:createKeywordLike("sent",{startsExpr:u}),_set:createKeywordLike("set",{startsExpr:u}),_static:createKeywordLike("static",{startsExpr:u}),_yield:createKeywordLike("yield",{startsExpr:u}),_asserts:createKeywordLike("asserts",{startsExpr:u}),_checks:createKeywordLike("checks",{startsExpr:u}),_exports:createKeywordLike("exports",{startsExpr:u}),_global:createKeywordLike("global",{startsExpr:u}),_implements:createKeywordLike("implements",{startsExpr:u}),_intrinsic:createKeywordLike("intrinsic",{startsExpr:u}),_infer:createKeywordLike("infer",{startsExpr:u}),_is:createKeywordLike("is",{startsExpr:u}),_mixins:createKeywordLike("mixins",{startsExpr:u}),_proto:createKeywordLike("proto",{startsExpr:u}),_require:createKeywordLike("require",{startsExpr:u}),_keyof:createKeywordLike("keyof",{startsExpr:u}),_readonly:createKeywordLike("readonly",{startsExpr:u}),_unique:createKeywordLike("unique",{startsExpr:u}),_abstract:createKeywordLike("abstract",{startsExpr:u}),_declare:createKeywordLike("declare",{startsExpr:u}),_enum:createKeywordLike("enum",{startsExpr:u}),_module:createKeywordLike("module",{startsExpr:u}),_namespace:createKeywordLike("namespace",{startsExpr:u}),_interface:createKeywordLike("interface",{startsExpr:u}),_type:createKeywordLike("type",{startsExpr:u}),_opaque:createKeywordLike("opaque",{startsExpr:u}),name:createToken("name",{startsExpr:u}),string:createToken("string",{startsExpr:u}),num:createToken("num",{startsExpr:u}),bigint:createToken("bigint",{startsExpr:u}),decimal:createToken("decimal",{startsExpr:u}),regexp:createToken("regexp",{startsExpr:u}),privateName:createToken("#name",{startsExpr:u}),eof:createToken("eof"),jsxName:createToken("jsxName"),jsxText:createToken("jsxText",{beforeExpr:true}),jsxTagStart:createToken("jsxTagStart",{startsExpr:true}),jsxTagEnd:createToken("jsxTagEnd"),placeholder:createToken("%%",{startsExpr:true})};function tokenIsIdentifier(e){return e>=93&&e<=128}function tokenKeywordOrIdentifierIsKeyword(e){return e<=92}function tokenIsKeywordOrIdentifier(e){return e>=58&&e<=128}function tokenIsLiteralPropertyName(e){return e>=58&&e<=132}function tokenComesBeforeExpression(e){return S[e]}function tokenCanStartExpression(e){return E[e]}function tokenIsAssignment(e){return e>=29&&e<=33}function tokenIsFlowInterfaceOrTypeOrOpaque(e){return e>=125&&e<=127}function tokenIsLoop(e){return e>=90&&e<=92}function tokenIsKeyword(e){return e>=58&&e<=92}function tokenIsOperator(e){return e>=39&&e<=59}function tokenIsPostfix(e){return e===34}function tokenIsPrefix(e){return x[e]}function tokenIsTSTypeOperator(e){return e>=117&&e<=119}function tokenIsTSDeclarationStart(e){return e>=120&&e<=126}function tokenLabelName(e){return b[e]}function tokenOperatorPrecedence(e){return T[e]}function tokenIsBinaryOperator(e){return T[e]!==-1}function tokenIsRightAssociative(e){return e===57}function tokenIsTemplate(e){return e>=24&&e<=25}function getExportedToken(e){return g[e]}{g[8].updateContext=e=>{e.pop()};g[5].updateContext=g[7].updateContext=g[23].updateContext=e=>{e.push(l.brace)};g[22].updateContext=e=>{if(e[e.length-1]===l.template){e.pop()}else{e.push(l.template)}};g[138].updateContext=e=>{e.push(l.j_expr,l.j_oTag)}}let v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";let A="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const w=new RegExp("["+v+"]");const I=new RegExp("["+v+A+"]");v=A=null;const C=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];const O=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(e,t){let r=65536;for(let n=0,s=t.length;ne)return false;r+=t[n+1];if(r>=e)return true}return false}function isIdentifierStart(e){if(e<65)return e===36;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&w.test(String.fromCharCode(e))}return isInAstralSet(e,C)}function isIdentifierChar(e){if(e<48)return e===36;if(e<58)return true;if(e<65)return false;if(e<=90)return true;if(e<97)return e===95;if(e<=122)return true;if(e<=65535){return e>=170&&I.test(String.fromCharCode(e))}return isInAstralSet(e,C)||isInAstralSet(e,O)}const k={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const N=new Set(k.keyword);const _=new Set(k.strict);const D=new Set(k.strictBind);function isReservedWord(e,t){return t&&e==="await"||e==="enum"}function isStrictReservedWord(e,t){return isReservedWord(e,t)||_.has(e)}function isStrictBindOnlyReservedWord(e){return D.has(e)}function isStrictBindReservedWord(e,t){return isStrictReservedWord(e,t)||isStrictBindOnlyReservedWord(e)}function isKeyword(e){return N.has(e)}function isIteratorStart(e,t,r){return e===64&&t===64&&isIdentifierStart(r)}const M=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"]);function canBeReservedWord(e){return M.has(e)}const L=0,j=1,F=2,R=4,B=8,U=16,K=32,$=64,V=128,W=256,q=j|F|W;const H=1,G=2,X=4,J=8,z=16,Y=64,Q=128,Z=256,ee=512,te=1024,re=2048;const ne=H|G|J|Q,se=H|0|J|0,ie=H|0|X|0,ae=H|0|z|0,oe=0|G|0|Q,le=0|G|0|0,ce=H|G|J|Z,ue=0|0|0|te,pe=0|0|0|Y,fe=H|0|0|Y,de=ce|ee,he=0|0|0|te,me=re;const ye=4,ge=2,be=1,Te=ge|be;const Se=ge|ye,Ee=be|ye,xe=ge,Pe=be,ve=0;class BaseParser{constructor(){this.sawUnambiguousESM=false;this.ambiguousScriptDifferentAst=false}hasPlugin(e){if(typeof e==="string"){return this.plugins.has(e)}else{const[t,r]=e;if(!this.hasPlugin(t)){return false}const n=this.plugins.get(t);for(const e of Object.keys(r)){if((n==null?void 0:n[e])!==r[e]){return false}}return true}}getPluginOption(e,t){var r;return(r=this.plugins.get(e))==null?void 0:r[t]}}function setTrailingComments(e,t){if(e.trailingComments===undefined){e.trailingComments=t}else{e.trailingComments.unshift(...t)}}function setLeadingComments(e,t){if(e.leadingComments===undefined){e.leadingComments=t}else{e.leadingComments.unshift(...t)}}function setInnerComments(e,t){if(e.innerComments===undefined){e.innerComments=t}else{e.innerComments.unshift(...t)}}function adjustInnerComments(e,t,r){let n=null;let s=t.length;while(n===null&&s>0){n=t[--s]}if(n===null||n.start>r.start){setInnerComments(e,r.comments)}else{setTrailingComments(n,r.comments)}}class CommentsParser extends BaseParser{addComment(e){if(this.filename)e.loc.filename=this.filename;this.state.comments.push(e)}processComment(e){const{commentStack:t}=this.state;const r=t.length;if(r===0)return;let n=r-1;const s=t[n];if(s.start===e.end){s.leadingNode=e;n--}const{start:i}=e;for(;n>=0;n--){const r=t[n];const s=r.end;if(s>i){r.containingNode=e;this.finalizeComment(r);t.splice(n,1)}else{if(s===i){r.trailingNode=e}break}}}finalizeComment(e){const{comments:t}=e;if(e.leadingNode!==null||e.trailingNode!==null){if(e.leadingNode!==null){setTrailingComments(e.leadingNode,t)}if(e.trailingNode!==null){setLeadingComments(e.trailingNode,t)}}else{const{containingNode:r,start:n}=e;if(this.input.charCodeAt(n-1)===44){switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":adjustInnerComments(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":adjustInnerComments(r,r.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":adjustInnerComments(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":adjustInnerComments(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":adjustInnerComments(r,r.specifiers,e);break;default:{setInnerComments(r,t)}}}else{setInnerComments(r,t)}}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--){this.finalizeComment(e[t])}this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state;const{length:r}=t;if(r===0)return;const n=t[r-1];if(n.leadingNode===e){n.leadingNode=null}}takeSurroundingComments(e,t,r){const{commentStack:n}=this.state;const s=n.length;if(s===0)return;let i=s-1;for(;i>=0;i--){const s=n[i];const a=s.end;const o=s.start;if(o===r){s.leadingNode=e}else if(a===t){s.trailingNode=e}else if(a=48&&e<=57};const De=new Set([103,109,115,105,121,117,100,118]);const Me={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])};const Le={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};class Token{constructor(e){this.type=e.type;this.value=e.value;this.start=e.start;this.end=e.end;this.loc=new SourceLocation(e.startLoc,e.endLoc)}}class Tokenizer extends CommentsParser{constructor(e,t){super();this.isLookahead=void 0;this.tokens=[];this.state=new State;this.state.init(e);this.input=t;this.length=t.length;this.isLookahead=false}pushToken(e){this.tokens.length=this.state.tokensLength;this.tokens.push(e);++this.state.tokensLength}next(){this.checkKeywordEscapes();if(this.options.tokens){this.pushToken(new Token(this.state))}this.state.lastTokStart=this.state.start;this.state.lastTokEndLoc=this.state.endLoc;this.state.lastTokStartLoc=this.state.startLoc;this.nextToken()}eat(e){if(this.match(e)){this.next();return true}else{return false}}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e);this.isLookahead=true;this.nextToken();this.isLookahead=false;const t=this.state;this.state=e;return t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){Ie.lastIndex=e;return Ie.test(this.input)?Ie.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++ethis.raise(e,{at:t})));this.state.strictErrors.clear()}}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace();this.state.start=this.state.pos;if(!this.isLookahead)this.state.startLoc=this.state.curPosition();if(this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(){let e;if(!this.isLookahead)e=this.state.curPosition();const t=this.state.pos;const r=this.input.indexOf("*/",t+2);if(r===-1){throw this.raise(a.UnterminatedComment,{at:this.state.curPosition()})}this.state.pos=r+2;we.lastIndex=t+2;while(we.test(this.input)&&we.lastIndex<=r){++this.state.curLine;this.state.lineStart=we.lastIndex}if(this.isLookahead)return;const n={type:"CommentBlock",value:this.input.slice(t+2,r),start:t,end:r+2,loc:new SourceLocation(e,this.state.curPosition())};if(this.options.tokens)this.pushToken(n);return n}skipLineComment(e){const t=this.state.pos;let r;if(!this.isLookahead)r=this.state.curPosition();let n=this.input.charCodeAt(this.state.pos+=e);if(this.state.pose)){const e=this.skipLineComment(3);if(e!==undefined){this.addComment(e);if(this.options.attachComment)t.push(e)}}else{break e}}else if(r===60&&!this.inModule){const e=this.state.pos;if(this.input.charCodeAt(e+1)===33&&this.input.charCodeAt(e+2)===45&&this.input.charCodeAt(e+3)===45){const e=this.skipLineComment(4);if(e!==undefined){this.addComment(e);if(this.options.attachComment)t.push(e)}}else{break e}}else{break e}}}if(t.length>0){const r=this.state.pos;const n={start:e,end:r,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(e,t){this.state.end=this.state.pos;this.state.endLoc=this.state.curPosition();const r=this.state.type;this.state.type=e;this.state.value=t;if(!this.isLookahead){this.updateContext(r)}}replaceToken(e){this.state.type=e;this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter()){return}const e=this.state.pos+1;const t=this.codePointAtPos(e);if(t>=48&&t<=57){throw this.raise(a.UnexpectedDigitAfterHash,{at:this.state.curPosition()})}if(t===123||t===91&&this.hasPlugin("recordAndTuple")){this.expectPlugin("recordAndTuple");if(this.getPluginOption("recordAndTuple","syntaxType")!=="hash"){throw this.raise(t===123?a.RecordExpressionHashIncorrectStartSyntaxType:a.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()})}this.state.pos+=2;if(t===123){this.finishToken(7)}else{this.finishToken(1)}}else if(isIdentifierStart(t)){++this.state.pos;this.finishToken(134,this.readWord1(t))}else if(t===92){++this.state.pos;this.finishToken(134,this.readWord1())}else{this.finishOp(27,1)}}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(true);return}if(e===46&&this.input.charCodeAt(this.state.pos+2)===46){this.state.pos+=3;this.finishToken(21)}else{++this.state.pos;this.finishToken(16)}}readToken_slash(){const e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(31,2)}else{this.finishOp(56,1)}}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return false;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return false;const t=this.state.pos;this.state.pos+=1;while(!isNewLine(e)&&++this.state.pos=48&&t<=57)){this.state.pos+=2;this.finishToken(18)}else{++this.state.pos;this.finishToken(17)}}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos;this.finishToken(10);return;case 41:++this.state.pos;this.finishToken(11);return;case 59:++this.state.pos;this.finishToken(13);return;case 44:++this.state.pos;this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar"){throw this.raise(a.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()})}this.state.pos+=2;this.finishToken(2)}else{++this.state.pos;this.finishToken(0)}return;case 93:++this.state.pos;this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar"){throw this.raise(a.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()})}this.state.pos+=2;this.finishToken(6)}else{++this.state.pos;this.finishToken(5)}return;case 125:++this.state.pos;this.finishToken(8);return;case 58:if(this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58){this.finishOp(15,2)}else{++this.state.pos;this.finishToken(14)}return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(false);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(isIdentifierStart(e)){this.readWord(e);return}}throw this.raise(a.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){const r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t;this.finishToken(e,r)}readRegexp(){const e=this.state.startLoc;const t=this.state.start+1;let r,n;let{pos:s}=this.state;for(;;++s){if(s>=this.length){throw this.raise(a.UnterminatedRegExp,{at:createPositionWithColumnOffset(e,1)})}const t=this.input.charCodeAt(s);if(isNewLine(t)){throw this.raise(a.UnterminatedRegExp,{at:createPositionWithColumnOffset(e,1)})}if(r){r=false}else{if(t===91){n=true}else if(t===93&&n){n=false}else if(t===47&&!n){break}r=t===92}}const i=this.input.slice(t,s);++s;let o="";const nextPos=()=>createPositionWithColumnOffset(e,s+2-t);while(s=97){s=t-97+10}else if(t>=65){s=t-65+10}else if(_e(t)){s=t-48}else{s=Infinity}if(s>=e){if(this.options.errorRecovery&&s<=9){s=0;this.raise(a.InvalidDigit,{at:this.state.curPosition(),radix:e})}else if(r){s=0;l=true}else{break}}++this.state.pos;c=c*e+s}if(this.state.pos===s||t!=null&&this.state.pos-s!==t||l){return null}return c}readRadixNumber(e){const t=this.state.curPosition();let r=false;this.state.pos+=2;const n=this.readInt(e);if(n==null){this.raise(a.InvalidDigit,{at:createPositionWithColumnOffset(t,2),radix:e})}const s=this.input.charCodeAt(this.state.pos);if(s===110){++this.state.pos;r=true}else if(s===109){throw this.raise(a.InvalidDecimal,{at:t})}if(isIdentifierStart(this.codePointAtPos(this.state.pos))){throw this.raise(a.NumberIdentifier,{at:this.state.curPosition()})}if(r){const e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(131,e);return}this.finishToken(130,n)}readNumber(e){const t=this.state.pos;const r=this.state.curPosition();let n=false;let s=false;let i=false;let o=false;let l=false;if(!e&&this.readInt(10)===null){this.raise(a.InvalidNumber,{at:this.state.curPosition()})}const c=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(c){const e=this.input.slice(t,this.state.pos);this.recordStrictModeErrors(a.StrictOctalLiteral,{at:r});if(!this.state.strict){const t=e.indexOf("_");if(t>0){this.raise(a.ZeroDigitNumericSeparator,{at:createPositionWithColumnOffset(r,t)})}}l=c&&!/[89]/.test(e)}let u=this.input.charCodeAt(this.state.pos);if(u===46&&!l){++this.state.pos;this.readInt(10);n=true;u=this.input.charCodeAt(this.state.pos)}if((u===69||u===101)&&!l){u=this.input.charCodeAt(++this.state.pos);if(u===43||u===45){++this.state.pos}if(this.readInt(10)===null){this.raise(a.InvalidOrMissingExponent,{at:r})}n=true;o=true;u=this.input.charCodeAt(this.state.pos)}if(u===110){if(n||c){this.raise(a.InvalidBigIntLiteral,{at:r})}++this.state.pos;s=true}if(u===109){this.expectPlugin("decimal",this.state.curPosition());if(o||c){this.raise(a.InvalidDecimal,{at:r})}++this.state.pos;i=true}if(isIdentifierStart(this.codePointAtPos(this.state.pos))){throw this.raise(a.NumberIdentifier,{at:this.state.curPosition()})}const p=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s){this.finishToken(131,p);return}if(i){this.finishToken(132,p);return}const f=l?parseInt(p,8):parseFloat(p);this.finishToken(130,f)}readCodePoint(e){const t=this.input.charCodeAt(this.state.pos);let r;if(t===123){++this.state.pos;r=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,true,e);++this.state.pos;if(r!==null&&r>1114111){if(e){this.raise(a.InvalidCodePoint,{at:this.state.curPosition()})}else{return null}}}else{r=this.readHexChar(4,false,e)}return r}readString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length){throw this.raise(a.UnterminatedString,{at:this.state.startLoc})}const n=this.input.charCodeAt(this.state.pos);if(n===e)break;if(n===92){t+=this.input.slice(r,this.state.pos);t+=this.readEscapedChar(false);r=this.state.pos}else if(n===8232||n===8233){++this.state.pos;++this.state.curLine;this.state.lineStart=this.state.pos}else if(isNewLine(n)){throw this.raise(a.UnterminatedString,{at:this.state.startLoc})}else{++this.state.pos}}t+=this.input.slice(r,this.state.pos++);this.finishToken(129,t)}readTemplateContinuation(){if(!this.match(8)){this.unexpected(null,8)}this.state.pos--;this.readTemplateToken()}readTemplateToken(){let e="",t=this.state.pos,r=false;++this.state.pos;for(;;){if(this.state.pos>=this.length){throw this.raise(a.UnterminatedTemplate,{at:createPositionWithColumnOffset(this.state.startLoc,1)})}const n=this.input.charCodeAt(this.state.pos);if(n===96){++this.state.pos;e+=this.input.slice(t,this.state.pos);this.finishToken(24,r?null:e);return}if(n===36&&this.input.charCodeAt(this.state.pos+1)===123){this.state.pos+=2;e+=this.input.slice(t,this.state.pos);this.finishToken(25,r?null:e);return}if(n===92){e+=this.input.slice(t,this.state.pos);const n=this.readEscapedChar(true);if(n===null){r=true}else{e+=n}t=this.state.pos}else if(isNewLine(n)){e+=this.input.slice(t,this.state.pos);++this.state.pos;switch(n){case 13:if(this.input.charCodeAt(this.state.pos)===10){++this.state.pos}case 10:e+="\n";break;default:e+=String.fromCharCode(n);break}++this.state.curLine;this.state.lineStart=this.state.pos;t=this.state.pos}else{++this.state.pos}}}recordStrictModeErrors(e,{at:t}){const r=t.index;if(this.state.strict&&!this.state.strictErrors.has(r)){this.raise(e,{at:t})}else{this.state.strictErrors.set(r,[e,t])}}readEscapedChar(e){const t=!e;const r=this.input.charCodeAt(++this.state.pos);++this.state.pos;switch(r){case 110:return"\n";case 114:return"\r";case 120:{const e=this.readHexChar(2,false,t);return e===null?null:String.fromCharCode(e)}case 117:{const e=this.readCodePoint(t);return e===null?null:String.fromCodePoint(e)}case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.state.pos)===10){++this.state.pos}case 10:this.state.lineStart=this.state.pos;++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(e){return null}else{this.recordStrictModeErrors(a.StrictNumericEscape,{at:createPositionWithColumnOffset(this.state.curPosition(),-1)})}default:if(r>=48&&r<=55){const t=createPositionWithColumnOffset(this.state.curPosition(),-1);const r=this.input.slice(this.state.pos-1,this.state.pos+2).match(/^[0-7]+/);let n=r[0];let s=parseInt(n,8);if(s>255){n=n.slice(0,-1);s=parseInt(n,8)}this.state.pos+=n.length-1;const i=this.input.charCodeAt(this.state.pos);if(n!=="0"||i===56||i===57){if(e){return null}else{this.recordStrictModeErrors(a.StrictNumericEscape,{at:t})}}return String.fromCharCode(s)}return String.fromCharCode(r)}}readHexChar(e,t,r){const n=this.state.curPosition();const s=this.readInt(16,e,t,false);if(s===null){if(r){this.raise(a.InvalidEscapeSequence,{at:n})}else{this.state.pos=n.index-1}}return s}readWord1(e){this.state.containsEsc=false;let t="";const r=this.state.pos;let n=this.state.pos;if(e!==undefined){this.state.pos+=e<=65535?1:2}while(this.state.pos=0;t--){const r=a[t];if(r.loc.index===i){return a[t]=e({loc:s,details:n})}if(r.loc.indexthis.hasPlugin(e)))){throw this.raise(a.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}}}class Scope{constructor(e){this.var=new Set;this.lexical=new Set;this.functions=new Set;this.flags=e}}class ScopeHandler{constructor(e,t){this.parser=void 0;this.scopeStack=[];this.inModule=void 0;this.undefinedExports=new Map;this.parser=e;this.inModule=t}get inFunction(){return(this.currentVarScopeFlags()&F)>0}get allowSuper(){return(this.currentThisScopeFlags()&U)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&K)>0}get inClass(){return(this.currentThisScopeFlags()&$)>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(e&$)>0&&(e&F)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(t&V){return true}if(t&(q|$)){return false}}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&F)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Scope(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){this.scopeStack.pop()}treatFunctionsAsVarInScope(e){return!!(e.flags&(F|V)||!this.parser.inModule&&e.flags&j)}declareName(e,t,r){let n=this.currentScope();if(t&J||t&z){this.checkRedeclarationInScope(n,e,t,r);if(t&z){n.functions.add(e)}else{n.lexical.add(e)}if(t&J){this.maybeExportDefined(n,e)}}else if(t&X){for(let s=this.scopeStack.length-1;s>=0;--s){n=this.scopeStack[s];this.checkRedeclarationInScope(n,e,t,r);n.var.add(e);this.maybeExportDefined(n,e);if(n.flags&q)break}}if(this.parser.inModule&&n.flags&j){this.undefinedExports.delete(e)}}maybeExportDefined(e,t){if(this.parser.inModule&&e.flags&j){this.undefinedExports.delete(t)}}checkRedeclarationInScope(e,t,r,n){if(this.isRedeclaredInScope(e,t,r)){this.parser.raise(a.VarRedeclaration,{at:n,identifierName:t})}}isRedeclaredInScope(e,t,r){if(!(r&H))return false;if(r&J){return e.lexical.has(t)||e.functions.has(t)||e.var.has(t)}if(r&z){return e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t)}return e.lexical.has(t)&&!(e.flags&B&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t)}checkLocalExport(e){const{name:t}=e;const r=this.scopeStack[0];if(!r.lexical.has(t)&&!r.var.has(t)&&!r.functions.has(t)){this.undefinedExports.set(t,e.loc.start)}}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(t&q){return t}}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(t&(q|$)&&!(t&R)){return t}}}}class FlowScope extends Scope{constructor(...e){super(...e);this.declareFunctions=new Set}}class FlowScopeHandler extends ScopeHandler{createScope(e){return new FlowScope(e)}declareName(e,t,r){const n=this.currentScope();if(t&re){this.checkRedeclarationInScope(n,e,t,r);this.maybeExportDefined(n,e);n.declareFunctions.add(e);return}super.declareName(...arguments)}isRedeclaredInScope(e,t,r){if(super.isRedeclaredInScope(...arguments))return true;if(r&re){return!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t))}return false}checkLocalExport(e){if(!this.scopeStack[0].declareFunctions.has(e.name)){super.checkLocalExport(e)}}}class ClassScope{constructor(){this.privateNames=new Set;this.loneAccessors=new Map;this.undefinedPrivateNames=new Map}}class ClassScopeHandler{constructor(e){this.parser=void 0;this.stack=[];this.undefinedPrivateNames=new Map;this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new ClassScope)}exit(){const e=this.stack.pop();const t=this.current();for(const[r,n]of Array.from(e.undefinedPrivateNames)){if(t){if(!t.undefinedPrivateNames.has(r)){t.undefinedPrivateNames.set(r,n)}}else{this.parser.raise(a.InvalidPrivateFieldResolution,{at:n,identifierName:r})}}}declarePrivateName(e,t,r){const{privateNames:n,loneAccessors:s,undefinedPrivateNames:i}=this.current();let o=n.has(e);if(t&Te){const r=o&&s.get(e);if(r){const n=r&ye;const i=t&ye;const a=r&Te;const l=t&Te;o=a===l||n!==i;if(!o)s.delete(e)}else if(!o){s.set(e,t)}}if(o){this.parser.raise(a.PrivateNameRedeclaration,{at:r,identifierName:e})}n.add(e);i.delete(e)}usePrivateName(e,t){let r;for(r of this.stack){if(r.privateNames.has(e))return}if(r){r.undefinedPrivateNames.set(e,t)}else{this.parser.raise(a.InvalidPrivateFieldResolution,{at:t,identifierName:e})}}}const je=0,Fe=1,Re=2,Be=3;class ExpressionScope{constructor(e=je){this.type=void 0;this.type=e}canBeArrowParameterDeclaration(){return this.type===Re||this.type===Fe}isCertainlyParameterDeclaration(){return this.type===Be}}class ArrowHeadParsingScope extends ExpressionScope{constructor(e){super(e);this.declarationErrors=new Map}recordDeclarationError(e,{at:t}){const r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class ExpressionScopeHandler{constructor(e){this.parser=void 0;this.stack=[new ExpressionScope];this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){const r={at:t.loc.start};const{stack:n}=this;let s=n.length-1;let i=n[s];while(!i.isCertainlyParameterDeclaration()){if(i.canBeArrowParameterDeclaration()){i.recordDeclarationError(e,r)}else{return}i=n[--s]}this.parser.raise(e,r)}recordArrowParemeterBindingError(e,{at:t}){const{stack:r}=this;const n=r[r.length-1];const s={at:t.loc.start};if(n.isCertainlyParameterDeclaration()){this.parser.raise(e,s)}else if(n.canBeArrowParameterDeclaration()){n.recordDeclarationError(e,s)}else{return}}recordAsyncArrowParametersError({at:e}){const{stack:t}=this;let r=t.length-1;let n=t[r];while(n.canBeArrowParameterDeclaration()){if(n.type===Re){n.recordDeclarationError(a.AwaitBindingIdentifier,{at:e})}n=t[--r]}}validateAsPattern(){const{stack:e}=this;const t=e[e.length-1];if(!t.canBeArrowParameterDeclaration())return;t.iterateErrors((([t,r])=>{this.parser.raise(t,{at:r});let n=e.length-2;let s=e[n];while(s.canBeArrowParameterDeclaration()){s.clearDeclarationError(r.index);s=e[--n]}}))}}function newParameterDeclarationScope(){return new ExpressionScope(Be)}function newArrowHeadScope(){return new ArrowHeadParsingScope(Fe)}function newAsyncArrowScope(){return new ArrowHeadParsingScope(Re)}function newExpressionScope(){return new ExpressionScope}const Ue=0,Ke=1,$e=2,Ve=4,We=8;class ProductionParameterHandler{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&$e)>0}get hasYield(){return(this.currentFlags()&Ke)>0}get hasReturn(){return(this.currentFlags()&Ve)>0}get hasIn(){return(this.currentFlags()&We)>0}}function functionFlags(e,t){return(e?$e:0)|(t?Ke:0)}class UtilParser extends Tokenizer{addExtra(e,t,r,n=true){if(!e)return;const s=e.extra=e.extra||{};if(n){s[t]=r}else{Object.defineProperty(s,t,{enumerable:n,value:r})}}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){const r=e+t.length;if(this.input.slice(e,r)===t){const e=this.input.charCodeAt(r);return!(isIdentifierChar(e)||(e&64512)===55296)}return false}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){if(this.isContextual(e)){this.next();return true}return false}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null){throw this.raise(t,{at:this.state.startLoc})}throw this.unexpected(null,e)}}canInsertSemicolon(){return this.match(135)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Ae.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){Oe.lastIndex=this.state.end;return Oe.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=true){if(e?this.isLineTerminator():this.eat(13))return;this.raise(a.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){const r={node:null};try{const n=e(((e=null)=>{r.node=e;throw r}));if(this.state.errors.length>t.errors.length){const e=this.state;this.state=t;this.state.tokensLength=e.tokensLength;return{node:n,error:e.errors[t.errors.length],thrown:false,aborted:false,failState:e}}return{node:n,error:null,thrown:false,aborted:false,failState:null}}catch(e){const n=this.state;this.state=t;if(e instanceof SyntaxError){return{node:null,error:e,thrown:true,aborted:false,failState:n}}if(e===r){return{node:r.node,error:null,thrown:false,aborted:true,failState:n}}throw e}}checkExpressionErrors(e,t){if(!e)return false;const{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:s,optionalParametersLoc:i}=e;const o=!!r||!!n||!!i||!!s;if(!t){return o}if(r!=null){this.raise(a.InvalidCoverInitializedName,{at:r})}if(n!=null){this.raise(a.DuplicateProto,{at:n})}if(s!=null){this.raise(a.UnexpectedPrivateField,{at:s})}if(i!=null){this.unexpected(i)}}isLiteralPropertyName(){return tokenIsLiteralPropertyName(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isOptionalChain(e){return e.type==="OptionalMemberExpression"||e.type==="OptionalCallExpression"}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){const t=this.state.labels;this.state.labels=[];const r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const n=this.inModule;this.inModule=e;const s=this.scope;const i=this.getScopeHandler();this.scope=new i(this,e);const a=this.prodParam;this.prodParam=new ProductionParameterHandler;const o=this.classScope;this.classScope=new ClassScopeHandler(this);const l=this.expressionScope;this.expressionScope=new ExpressionScopeHandler(this);return()=>{this.state.labels=t;this.exportedIdentifiers=r;this.inModule=n;this.scope=s;this.prodParam=a;this.classScope=o;this.expressionScope=l}}enterInitialScopes(){let e=Ue;if(this.inModule){e|=$e}this.scope.enter(j);this.prodParam.enter(e)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;if(t!==null){this.expectPlugin("destructuringPrivate",t)}}}class ExpressionErrors{constructor(){this.shorthandAssignLoc=null;this.doubleProtoLoc=null;this.privateKeyLoc=null;this.optionalParametersLoc=null}}class Node{constructor(e,t,r){this.type="";this.start=t;this.end=0;this.loc=new SourceLocation(r);if(e!=null&&e.options.ranges)this.range=[t,0];if(e!=null&&e.filename)this.loc.filename=e.filename}}const qe=Node.prototype;{qe.__clone=function(){const e=new Node;const t=Object.keys(this);for(let r=0,n=t.length;r({AmbiguousConditionalArrow:e("Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),AmbiguousDeclareModuleKind:e("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:e((({reservedType:e})=>`Cannot overwrite reserved type ${e}.`)),DeclareClassElement:e("The `declare` modifier can only appear on class fields."),DeclareClassFieldInitializer:e("Initializers are not allowed in fields with the `declare` modifier."),DuplicateDeclareModuleExports:e("Duplicate `declare module.exports` statement."),EnumBooleanMemberNotInitialized:e((({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`)),EnumDuplicateMemberName:e((({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`)),EnumInconsistentMemberValues:e((({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`)),EnumInvalidExplicitType:e((({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`)),EnumInvalidExplicitTypeUnknownSupplied:e((({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`)),EnumInvalidMemberInitializerPrimaryType:e((({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`)),EnumInvalidMemberInitializerSymbolType:e((({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`)),EnumInvalidMemberInitializerUnknownType:e((({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`)),EnumInvalidMemberName:e((({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`)),EnumNumberMemberNotInitialized:e((({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`)),EnumStringMemberInconsistentlyInitailized:e((({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`)),GetterMayNotHaveThisParam:e("A getter cannot have a `this` parameter."),ImportTypeShorthandOnlyInPureImport:e("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:e("Explicit inexact syntax cannot appear inside an explicit exact object type."),InexactInsideNonObject:e("Explicit inexact syntax cannot appear in class or interface definitions."),InexactVariance:e("Explicit inexact syntax cannot have variance."),InvalidNonTypeImportInDeclareModule:e("Imports within a `declare module` body must always be `import type` or `import typeof`."),MissingTypeParamDefault:e("Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),NestedDeclareModule:e("`declare module` cannot be used inside another `declare module`."),NestedFlowComment:e("Cannot have a flow comment inside another flow comment."),PatternIsOptional:e("A binding pattern parameter cannot be optional in an implementation signature.",{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:e("A setter cannot have a `this` parameter."),SpreadVariance:e("Spread properties cannot have variance."),ThisParamAnnotationRequired:e("A type annotation is required for the `this` parameter."),ThisParamBannedInConstructor:e("Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions."),ThisParamMayNotBeOptional:e("The `this` parameter cannot be optional."),ThisParamMustBeFirst:e("The `this` parameter must be the first function parameter."),ThisParamNoDefault:e("The `this` parameter may not have a default value."),TypeBeforeInitializer:e("Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`."),TypeCastInPattern:e("The type cast expression is expected to be wrapped with parenthesis."),UnexpectedExplicitInexactInObject:e("Explicit inexact syntax must appear at the end of an inexact object."),UnexpectedReservedType:e((({reservedType:e})=>`Unexpected reserved type ${e}.`)),UnexpectedReservedUnderscore:e("`_` is only allowed as a type argument to call or new."),UnexpectedSpaceBetweenModuloChecks:e("Spaces between `%` and `checks` are not allowed here."),UnexpectedSpreadType:e("Spread operator cannot appear in class or interface definitions."),UnexpectedSubtractionOperand:e('Unexpected token, expected "number" or "bigint".'),UnexpectedTokenAfterTypeParameter:e("Expected an arrow function after this type parameter declaration."),UnexpectedTypeParameterBeforeAsyncArrowFunction:e("Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`."),UnsupportedDeclareExportKind:e((({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`)),UnsupportedStatementInDeclareModule:e("Only declares and type imports are allowed inside declare module."),UnterminatedFlowComment:e("Unterminated flow-comment.")})));function isEsModuleType(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function hasTypeImportKind(e){return e.importKind==="type"||e.importKind==="typeof"}function isMaybeDefaultImport(e){return tokenIsKeywordOrIdentifier(e)&&e!==97}const Xe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function partition(e,t){const r=[];const n=[];for(let s=0;sclass extends e{constructor(...e){super(...e);this.flowPragma=undefined}getScopeHandler(){return FlowScopeHandler}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){if(e!==129&&e!==13&&e!==28){if(this.flowPragma===undefined){this.flowPragma=null}}return super.finishToken(e,t)}addComment(e){if(this.flowPragma===undefined){const t=Je.exec(e.value);if(!t);else if(t[1]==="flow"){this.flowPragma="flow"}else if(t[1]==="noflow"){this.flowPragma="noflow"}else{throw new Error("Unexpected flow pragma")}}return super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=true;this.expect(e||14);const r=this.flowParseType();this.state.inType=t;return r}flowParsePredicate(){const e=this.startNode();const t=this.state.startLoc;this.next();this.expectContextual(107);if(this.state.lastTokStart>t.index+1){this.raise(Ge.UnexpectedSpaceBetweenModuloChecks,{at:t})}if(this.eat(10)){e.value=this.parseExpression();this.expect(11);return this.finishNode(e,"DeclaredPredicate")}else{return this.finishNode(e,"InferredPredicate")}}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=true;this.expect(14);let t=null;let r=null;if(this.match(54)){this.state.inType=e;r=this.flowParsePredicate()}else{t=this.flowParseType();this.state.inType=e;if(this.match(54)){r=this.flowParsePredicate()}}return[t,r]}flowParseDeclareClass(e){this.next();this.flowParseInterfaceish(e,true);return this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier();const r=this.startNode();const n=this.startNode();if(this.match(47)){r.typeParameters=this.flowParseTypeParameterDeclaration()}else{r.typeParameters=null}this.expect(10);const s=this.flowParseFunctionTypeParams();r.params=s.params;r.rest=s.rest;r.this=s._this;this.expect(11);[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser();n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation");t.typeAnnotation=this.finishNode(n,"TypeAnnotation");this.resetEndLocation(t);this.semicolon();this.scope.declareName(e.id.name,me,e.id.loc.start);return this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(80)){return this.flowParseDeclareClass(e)}else if(this.match(68)){return this.flowParseDeclareFunction(e)}else if(this.match(74)){return this.flowParseDeclareVariable(e)}else if(this.eatContextual(123)){if(this.match(16)){return this.flowParseDeclareModuleExports(e)}else{if(t){this.raise(Ge.NestedDeclareModule,{at:this.state.lastTokStartLoc})}return this.flowParseDeclareModule(e)}}else if(this.isContextual(126)){return this.flowParseDeclareTypeAlias(e)}else if(this.isContextual(127)){return this.flowParseDeclareOpaqueType(e)}else if(this.isContextual(125)){return this.flowParseDeclareInterface(e)}else if(this.match(82)){return this.flowParseDeclareExportDeclaration(e,t)}else{throw this.unexpected()}}flowParseDeclareVariable(e){this.next();e.id=this.flowParseTypeAnnotatableIdentifier(true);this.scope.declareName(e.id.name,ie,e.id.loc.start);this.semicolon();return this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(L);if(this.match(129)){e.id=this.parseExprAtom()}else{e.id=this.parseIdentifier()}const t=e.body=this.startNode();const r=t.body=[];this.expect(5);while(!this.match(8)){let e=this.startNode();if(this.match(83)){this.next();if(!this.isContextual(126)&&!this.match(87)){this.raise(Ge.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc})}this.parseImport(e)}else{this.expectContextual(121,Ge.UnsupportedStatementInDeclareModule);e=this.flowParseDeclare(e,true)}r.push(e)}this.scope.exit();this.expect(8);this.finishNode(t,"BlockStatement");let n=null;let s=false;r.forEach((e=>{if(isEsModuleType(e)){if(n==="CommonJS"){this.raise(Ge.AmbiguousDeclareModuleKind,{at:e})}n="ES"}else if(e.type==="DeclareModuleExports"){if(s){this.raise(Ge.DuplicateDeclareModuleExports,{at:e})}if(n==="ES"){this.raise(Ge.AmbiguousDeclareModuleKind,{at:e})}n="CommonJS";s=true}}));e.kind=n||"CommonJS";return this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){this.expect(82);if(this.eat(65)){if(this.match(68)||this.match(80)){e.declaration=this.flowParseDeclare(this.startNode())}else{e.declaration=this.flowParseType();this.semicolon()}e.default=true;return this.finishNode(e,"DeclareExportDeclaration")}else{if(this.match(75)||this.isLet()||(this.isContextual(126)||this.isContextual(125))&&!t){const e=this.state.value;throw this.raise(Ge.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:Xe[e]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(127)){e.declaration=this.flowParseDeclare(this.startNode());e.default=false;return this.finishNode(e,"DeclareExportDeclaration")}else if(this.match(55)||this.match(5)||this.isContextual(125)||this.isContextual(126)||this.isContextual(127)){e=this.parseExport(e);if(e.type==="ExportNamedDeclaration"){e.type="ExportDeclaration";e.default=false;delete e.exportKind}e.type="Declare"+e.type;return e}}throw this.unexpected()}flowParseDeclareModuleExports(e){this.next();this.expectContextual(108);e.typeAnnotation=this.flowParseTypeAnnotation();this.semicolon();return this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();this.flowParseTypeAlias(e);e.type="DeclareTypeAlias";return e}flowParseDeclareOpaqueType(e){this.next();this.flowParseOpaqueType(e,true);e.type="DeclareOpaqueType";return e}flowParseDeclareInterface(e){this.next();this.flowParseInterfaceish(e);return this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t=false){e.id=this.flowParseRestrictedIdentifier(!t,true);this.scope.declareName(e.id.name,t?ae:se,e.id.loc.start);if(this.match(47)){e.typeParameters=this.flowParseTypeParameterDeclaration()}else{e.typeParameters=null}e.extends=[];e.implements=[];e.mixins=[];if(this.eat(81)){do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12))}if(this.isContextual(114)){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12))}if(this.isContextual(110)){this.next();do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:false,allowSpread:false,allowProto:t,allowInexact:false})}flowParseInterfaceExtends(){const e=this.startNode();e.id=this.flowParseQualifiedTypeIdentifier();if(this.match(47)){e.typeParameters=this.flowParseTypeParameterInstantiation()}else{e.typeParameters=null}return this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){this.flowParseInterfaceish(e);return this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){if(e==="_"){this.raise(Ge.UnexpectedReservedUnderscore,{at:this.state.startLoc})}}checkReservedType(e,t,r){if(!He.has(e))return;this.raise(r?Ge.AssignReservedType:Ge.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){this.checkReservedType(this.state.value,this.state.startLoc,t);return this.parseIdentifier(e)}flowParseTypeAlias(e){e.id=this.flowParseRestrictedIdentifier(false,true);this.scope.declareName(e.id.name,se,e.id.loc.start);if(this.match(47)){e.typeParameters=this.flowParseTypeParameterDeclaration()}else{e.typeParameters=null}e.right=this.flowParseTypeInitialiser(29);this.semicolon();return this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){this.expectContextual(126);e.id=this.flowParseRestrictedIdentifier(true,true);this.scope.declareName(e.id.name,se,e.id.loc.start);if(this.match(47)){e.typeParameters=this.flowParseTypeParameterDeclaration()}else{e.typeParameters=null}e.supertype=null;if(this.match(14)){e.supertype=this.flowParseTypeInitialiser(14)}e.impltype=null;if(!t){e.impltype=this.flowParseTypeInitialiser(29)}this.semicolon();return this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=false){const t=this.state.startLoc;const r=this.startNode();const n=this.flowParseVariance();const s=this.flowParseTypeAnnotatableIdentifier();r.name=s.name;r.variance=n;r.bound=s.typeAnnotation;if(this.match(29)){this.eat(29);r.default=this.flowParseType()}else{if(e){this.raise(Ge.MissingTypeParamDefault,{at:t})}}return this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType;const t=this.startNode();t.params=[];this.state.inType=true;if(this.match(47)||this.match(138)){this.next()}else{this.unexpected()}let r=false;do{const e=this.flowParseTypeParameter(r);t.params.push(e);if(e.default){r=true}if(!this.match(48)){this.expect(12)}}while(!this.match(48));this.expect(48);this.state.inType=e;return this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode();const t=this.state.inType;e.params=[];this.state.inType=true;this.expect(47);const r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=false;while(!this.match(48)){e.params.push(this.flowParseType());if(!this.match(48)){this.expect(12)}}this.state.noAnonFunctionType=r;this.expect(48);this.state.inType=t;return this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode();const t=this.state.inType;e.params=[];this.state.inType=true;this.expect(47);while(!this.match(48)){e.params.push(this.flowParseTypeOrImplicitInstantiation());if(!this.match(48)){this.expect(12)}}this.expect(48);this.state.inType=t;return this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();this.expectContextual(125);e.extends=[];if(this.eat(81)){do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:false,allowExact:false,allowSpread:false,allowProto:false,allowInexact:false});return this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(130)||this.match(129)?this.parseExprAtom():this.parseIdentifier(true)}flowParseObjectTypeIndexer(e,t,r){e.static=t;if(this.lookahead().type===14){e.id=this.flowParseObjectPropertyKey();e.key=this.flowParseTypeInitialiser()}else{e.id=null;e.key=this.flowParseType()}this.expect(3);e.value=this.flowParseTypeInitialiser();e.variance=r;return this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){e.static=t;e.id=this.flowParseObjectPropertyKey();this.expect(3);this.expect(3);if(this.match(47)||this.match(10)){e.method=true;e.optional=false;e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start))}else{e.method=false;if(this.eat(17)){e.optional=true}e.value=this.flowParseTypeInitialiser()}return this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){e.params=[];e.rest=null;e.typeParameters=null;e.this=null;if(this.match(47)){e.typeParameters=this.flowParseTypeParameterDeclaration()}this.expect(10);if(this.match(78)){e.this=this.flowParseFunctionTypeParam(true);e.this.name=null;if(!this.match(11)){this.expect(12)}}while(!this.match(11)&&!this.match(21)){e.params.push(this.flowParseFunctionTypeParam(false));if(!this.match(11)){this.expect(12)}}if(this.eat(21)){e.rest=this.flowParseFunctionTypeParam(false)}this.expect(11);e.returnType=this.flowParseTypeInitialiser();return this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const r=this.startNode();e.static=t;e.value=this.flowParseObjectTypeMethodish(r);return this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:s}){const i=this.state.inType;this.state.inType=true;const a=this.startNode();a.callProperties=[];a.properties=[];a.indexers=[];a.internalSlots=[];let o;let l;let c=false;if(t&&this.match(6)){this.expect(6);o=9;l=true}else{this.expect(5);o=8;l=false}a.exact=l;while(!this.match(o)){let t=false;let i=null;let o=null;const u=this.startNode();if(n&&this.isContextual(115)){const t=this.lookahead();if(t.type!==14&&t.type!==17){this.next();i=this.state.startLoc;e=false}}if(e&&this.isContextual(104)){const e=this.lookahead();if(e.type!==14&&e.type!==17){this.next();t=true}}const p=this.flowParseVariance();if(this.eat(0)){if(i!=null){this.unexpected(i)}if(this.eat(0)){if(p){this.unexpected(p.loc.start)}a.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))}else{a.indexers.push(this.flowParseObjectTypeIndexer(u,t,p))}}else if(this.match(10)||this.match(47)){if(i!=null){this.unexpected(i)}if(p){this.unexpected(p.loc.start)}a.callProperties.push(this.flowParseObjectTypeCallProperty(u,t))}else{let e="init";if(this.isContextual(98)||this.isContextual(103)){const t=this.lookahead();if(tokenIsLiteralPropertyName(t.type)){e=this.state.value;this.next()}}const n=this.flowParseObjectTypeProperty(u,t,i,p,e,r,s!=null?s:!l);if(n===null){c=true;o=this.state.lastTokStartLoc}else{a.properties.push(n)}}this.flowObjectTypeSemicolon();if(o&&!this.match(8)&&!this.match(9)){this.raise(Ge.UnexpectedExplicitInexactInObject,{at:o})}}this.expect(o);if(r){a.inexact=c}const u=this.finishNode(a,"ObjectTypeAnnotation");this.state.inType=i;return u}flowParseObjectTypeProperty(e,t,r,n,s,i,a){if(this.eat(21)){const t=this.match(12)||this.match(13)||this.match(8)||this.match(9);if(t){if(!i){this.raise(Ge.InexactInsideNonObject,{at:this.state.lastTokStartLoc})}else if(!a){this.raise(Ge.InexactInsideExact,{at:this.state.lastTokStartLoc})}if(n){this.raise(Ge.InexactVariance,{at:n})}return null}if(!i){this.raise(Ge.UnexpectedSpreadType,{at:this.state.lastTokStartLoc})}if(r!=null){this.unexpected(r)}if(n){this.raise(Ge.SpreadVariance,{at:n})}e.argument=this.flowParseType();return this.finishNode(e,"ObjectTypeSpreadProperty")}else{e.key=this.flowParseObjectPropertyKey();e.static=t;e.proto=r!=null;e.kind=s;let a=false;if(this.match(47)||this.match(10)){e.method=true;if(r!=null){this.unexpected(r)}if(n){this.unexpected(n.loc.start)}e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.start,e.loc.start));if(s==="get"||s==="set"){this.flowCheckGetterSetterParams(e)}if(!i&&e.key.name==="constructor"&&e.value.this){this.raise(Ge.ThisParamBannedInConstructor,{at:e.value.this})}}else{if(s!=="init")this.unexpected();e.method=false;if(this.eat(17)){a=true}e.value=this.flowParseTypeInitialiser();e.variance=n}e.optional=a;return this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t=e.kind==="get"?0:1;const r=e.value.params.length+(e.value.rest?1:0);if(e.value.this){this.raise(e.kind==="get"?Ge.GetterMayNotHaveThisParam:Ge.SetterMayNotHaveThisParam,{at:e.value.this})}if(r!==t){this.raise(e.kind==="get"?a.BadGetterArity:a.BadSetterArity,{at:e})}if(e.kind==="set"&&e.value.rest){this.raise(a.BadSetterRestParameter,{at:e})}}flowObjectTypeSemicolon(){if(!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)){this.unexpected()}}flowParseQualifiedTypeIdentifier(e,t,r){e=e||this.state.start;t=t||this.state.startLoc;let n=r||this.flowParseRestrictedIdentifier(true);while(this.eat(16)){const r=this.startNodeAt(e,t);r.qualification=n;r.id=this.flowParseRestrictedIdentifier(true);n=this.finishNode(r,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,t,r){const n=this.startNodeAt(e,t);n.typeParameters=null;n.id=this.flowParseQualifiedTypeIdentifier(e,t,r);if(this.match(47)){n.typeParameters=this.flowParseTypeParameterInstantiation()}return this.finishNode(n,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();this.expect(87);e.argument=this.flowParsePrimaryType();return this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();e.types=[];this.expect(0);while(this.state.possuper.parseFunctionBody(e,true,r)))}return super.parseFunctionBody(e,false,r)}parseFunctionBodyAndFinish(e,t,r=false){if(this.match(14)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser();e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}super.parseFunctionBodyAndFinish(e,t,r)}parseStatement(e,t){if(this.state.strict&&this.isContextual(125)){const e=this.lookahead();if(tokenIsKeywordOrIdentifier(e.type)){const e=this.startNode();this.next();return this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(122)){const e=this.startNode();this.next();return this.flowParseEnumDeclaration(e)}const r=super.parseStatement(e,t);if(this.flowPragma===undefined&&!this.isValidDirective(r)){this.flowPragma=null}return r}parseExpressionStatement(e,t){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||tokenIsIdentifier(this.state.type)||this.match(68)||this.match(74)||this.match(82)){return this.flowParseDeclare(e)}}else if(tokenIsIdentifier(this.state.type)){if(t.name==="interface"){return this.flowParseInterface(e)}else if(t.name==="type"){return this.flowParseTypeAlias(e)}else if(t.name==="opaque"){return this.flowParseOpaqueType(e,false)}}}return super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){const{type:e}=this.state;if(tokenIsFlowInterfaceOrTypeOrOpaque(e)||this.shouldParseEnums()&&e===122){return!this.state.containsEsc}return super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;if(tokenIsFlowInterfaceOrTypeOrOpaque(e)||this.shouldParseEnums()&&e===122){return this.state.containsEsc}return super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(122)){const e=this.startNode();this.next();return this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(t===44||t===61||t===58||t===41){this.setOptionalParametersError(n);return e}}this.expect(17);const s=this.state.clone();const i=this.state.noArrowAt;const a=this.startNodeAt(t,r);let{consequent:o,failed:l}=this.tryParseConditionalConsequent();let[c,u]=this.getArrowLikeExpressions(o);if(l||u.length>0){const e=[...i];if(u.length>0){this.state=s;this.state.noArrowAt=e;for(let t=0;t1){this.raise(Ge.AmbiguousConditionalArrow,{at:s.startLoc})}if(l&&c.length===1){this.state=s;e.push(c[0].start);this.state.noArrowAt=e;({consequent:o,failed:l}=this.tryParseConditionalConsequent())}}this.getArrowLikeExpressions(o,true);this.state.noArrowAt=i;this.expect(14);a.test=e;a.consequent=o;a.alternate=this.forwardNoArrowParamsConversionAt(a,(()=>this.parseMaybeAssign(undefined,undefined)));return this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn();const t=!this.match(14);this.state.noArrowParamsConversionAt.pop();return{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const r=[e];const n=[];while(r.length!==0){const e=r.pop();if(e.type==="ArrowFunctionExpression"){if(e.typeParameters||!e.returnType){this.finishArrowValidation(e)}else{n.push(e)}r.push(e.body)}else if(e.type==="ConditionalExpression"){r.push(e.consequent);r.push(e.alternate)}}if(t){n.forEach((e=>this.finishArrowValidation(e)));return[n,[]]}return partition(n,(e=>e.params.every((e=>this.isAssignable(e,true)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,(t=e.extra)==null?void 0:t.trailingCommaLoc,false);this.scope.enter(F|R);super.checkParams(e,false,true);this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;if(this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1){this.state.noArrowParamsConversionAt.push(this.state.start);r=t();this.state.noArrowParamsConversionAt.pop()}else{r=t()}return r}parseParenItem(e,t,r){e=super.parseParenItem(e,t,r);if(this.eat(17)){e.optional=true;this.resetEndLocation(e)}if(this.match(14)){const n=this.startNodeAt(t,r);n.expression=e;n.typeAnnotation=this.flowParseTypeAnnotation();return this.finishNode(n,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){if(e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"){return}super.assertModuleNodeAllowed(e)}parseExport(e){const t=super.parseExport(e);if(t.type==="ExportNamedDeclaration"||t.type==="ExportAllDeclaration"){t.exportKind=t.exportKind||"value"}return t}parseExportDeclaration(e){if(this.isContextual(126)){e.exportKind="type";const t=this.startNode();this.next();if(this.match(5)){e.specifiers=this.parseExportSpecifiers(true);this.parseExportFrom(e);return null}else{return this.flowParseTypeAlias(t)}}else if(this.isContextual(127)){e.exportKind="type";const t=this.startNode();this.next();return this.flowParseOpaqueType(t,false)}else if(this.isContextual(125)){e.exportKind="type";const t=this.startNode();this.next();return this.flowParseInterface(t)}else if(this.shouldParseEnums()&&this.isContextual(122)){e.exportKind="value";const t=this.startNode();this.next();return this.flowParseEnumDeclaration(t)}else{return super.parseExportDeclaration(e)}}eatExportStar(e){if(super.eatExportStar(...arguments))return true;if(this.isContextual(126)&&this.lookahead().type===55){e.exportKind="type";this.next();this.next();return true}return false}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state;const r=super.maybeParseExportNamespaceSpecifier(e);if(r&&e.exportKind==="type"){this.unexpected(t)}return r}parseClassId(e,t,r){super.parseClassId(e,t,r);if(this.match(47)){e.typeParameters=this.flowParseTypeParameterDeclaration()}}parseClassMember(e,t,r){const{startLoc:n}=this.state;if(this.isContextual(121)){if(this.parseClassMemberFromModifier(e,t)){return}t.declare=true}super.parseClassMember(e,t,r);if(t.declare){if(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"){this.raise(Ge.DeclareClassElement,{at:n})}else if(t.value){this.raise(Ge.DeclareClassFieldInitializer,{at:t.value})}}}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){const e=super.readWord1();const t="@@"+e;if(!this.isIterator(e)||!this.state.inType){this.raise(a.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t})}this.finishToken(128,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);if(e===123&&t===124){return this.finishOp(6,2)}else if(this.state.inType&&(e===62||e===60)){return this.finishOp(e===62?48:47,1)}else if(this.state.inType&&e===63){if(t===46){return this.finishOp(18,2)}return this.finishOp(17,1)}else if(isIteratorStart(e,t,this.input.charCodeAt(this.state.pos+2))){this.state.pos+=2;return this.readIterator()}else{return super.getTokenFromCode(e)}}isAssignable(e,t){if(e.type==="TypeCastExpression"){return this.isAssignable(e.expression,t)}else{return super.isAssignable(e,t)}}toAssignable(e,t=false){if(!t&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"){e.left=this.typeCastToParameter(e.left)}super.toAssignable(...arguments)}toAssignableList(e,t,r){for(let t=0;t1||!t)){this.raise(Ge.TypeCastInPattern,{at:s.typeAnnotation})}}return e}parseArrayLike(e,t,r,n){const s=super.parseArrayLike(e,t,r,n);if(t&&!this.state.maybeInArrowParameters){this.toReferencedList(s.elements)}return s}isValidLVal(e,...t){return e==="TypeCastExpression"||super.isValidLVal(e,...t)}parseClassProperty(e){if(this.match(14)){e.typeAnnotation=this.flowParseTypeAnnotation()}return super.parseClassProperty(e)}parseClassPrivateProperty(e){if(this.match(14)){e.typeAnnotation=this.flowParseTypeAnnotation()}return super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,s,i){if(t.variance){this.unexpected(t.variance.loc.start)}delete t.variance;if(this.match(47)){t.typeParameters=this.flowParseTypeParameterDeclaration()}super.pushClassMethod(e,t,r,n,s,i);if(t.params&&s){const e=t.params;if(e.length>0&&this.isThisParam(e[0])){this.raise(Ge.ThisParamBannedInConstructor,{at:t})}}else if(t.type==="MethodDefinition"&&s&&t.value.params){const e=t.value.params;if(e.length>0&&this.isThisParam(e[0])){this.raise(Ge.ThisParamBannedInConstructor,{at:t})}}}pushClassPrivateMethod(e,t,r,n){if(t.variance){this.unexpected(t.variance.loc.start)}delete t.variance;if(this.match(47)){t.typeParameters=this.flowParseTypeParameterDeclaration()}super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){super.parseClassSuper(e);if(e.superClass&&this.match(47)){e.superTypeParameters=this.flowParseTypeParameterInstantiation()}if(this.isContextual(110)){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(true);if(this.match(47)){e.typeParameters=this.flowParseTypeParameterInstantiation()}else{e.typeParameters=null}t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const r=t[0];if(this.isThisParam(r)&&e.kind==="get"){this.raise(Ge.GetterMayNotHaveThisParam,{at:r})}else if(this.isThisParam(r)){this.raise(Ge.SetterMayNotHaveThisParam,{at:r})}}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,s,i,a,o){if(e.variance){this.unexpected(e.variance.loc.start)}delete e.variance;let l;if(this.match(47)&&!a){l=this.flowParseTypeParameterDeclaration();if(!this.match(10))this.unexpected()}super.parseObjPropValue(e,t,r,n,s,i,a,o);if(l){(e.value||e).typeParameters=l}}parseAssignableListItemTypes(e){if(this.eat(17)){if(e.type!=="Identifier"){this.raise(Ge.PatternIsOptional,{at:e})}if(this.isThisParam(e)){this.raise(Ge.ThisParamMayNotBeOptional,{at:e})}e.optional=true}if(this.match(14)){e.typeAnnotation=this.flowParseTypeAnnotation()}else if(this.isThisParam(e)){this.raise(Ge.ThisParamAnnotationRequired,{at:e})}if(this.match(29)&&this.isThisParam(e)){this.raise(Ge.ThisParamNoDefault,{at:e})}this.resetEndLocation(e);return e}parseMaybeDefault(e,t,r){const n=super.parseMaybeDefault(e,t,r);if(n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.startsuper.parseMaybeAssign(e,t)),n);if(!s.error)return s.node;const{context:r}=this.state;const i=r[r.length-1];if(i===l.j_oTag||i===l.j_expr){r.pop()}}if((r=s)!=null&&r.error||this.match(47)){var i,a;n=n||this.state.clone();let r;const o=this.tryParse((n=>{var s;r=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(r,(()=>{const n=super.parseMaybeAssign(e,t);this.resetStartLocationFromNode(n,r);return n}));if((s=i.extra)!=null&&s.parenthesized)n();const a=this.maybeUnwrapTypeCastExpression(i);if(a.type!=="ArrowFunctionExpression")n();a.typeParameters=r;this.resetStartLocationFromNode(a,r);return i}),n);let l=null;if(o.node&&this.maybeUnwrapTypeCastExpression(o.node).type==="ArrowFunctionExpression"){if(!o.error&&!o.aborted){if(o.node.async){this.raise(Ge.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:r})}return o.node}l=o.node}if((i=s)!=null&&i.node){this.state=s.failState;return s.node}if(l){this.state=o.failState;return l}if((a=s)!=null&&a.thrown)throw s.error;if(o.thrown)throw o.error;throw this.raise(Ge.UnexpectedTokenAfterTypeParameter,{at:r})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=true;const r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser();this.state.noAnonFunctionType=t;if(this.canInsertSemicolon())this.unexpected();if(!this.match(19))this.unexpected();return r}));if(t.thrown)return null;if(t.error)this.state=t.failState;e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){if(this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1){e.params=t}else{super.setArrowFunctionParameters(e,t)}}checkParams(e,t,r){if(r&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1){return}for(let t=0;t0){this.raise(Ge.ThisParamMustBeFirst,{at:e.params[t]})}}return super.checkParams(...arguments)}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,t,r,n){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(t)!==-1){this.next();const n=this.startNodeAt(t,r);n.callee=e;n.arguments=this.parseCallExpressionArguments(11,false);e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){const s=this.state.clone();const i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t,r)||e()),s);if(!i.error&&!i.aborted)return i.node;const a=this.tryParse((()=>super.parseSubscripts(e,t,r,n)),s);if(a.node&&!a.error)return a.node;if(i.node){this.state=i.failState;return i.node}if(a.node){this.state=a.failState;return a.node}throw i.error||a.error}return super.parseSubscripts(e,t,r,n)}parseSubscript(e,t,r,n,s){if(this.match(18)&&this.isLookaheadToken_lt()){s.optionalChainMember=true;if(n){s.stop=true;return e}this.next();const i=this.startNodeAt(t,r);i.callee=e;i.typeArguments=this.flowParseTypeParameterInstantiation();this.expect(10);i.arguments=this.parseCallExpressionArguments(11,false);i.optional=true;return this.finishCallExpression(i,true)}else if(!n&&this.shouldParseTypes()&&this.match(47)){const n=this.startNodeAt(t,r);n.callee=e;const i=this.tryParse((()=>{n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew();this.expect(10);n.arguments=this.parseCallExpressionArguments(11,false);if(s.optionalChainMember)n.optional=false;return this.finishCallExpression(n,s.optionalChainMember)}));if(i.node){if(i.error)this.state=i.failState;return i.node}}return super.parseSubscript(e,t,r,n,s)}parseNewCallee(e){super.parseNewCallee(e);let t=null;if(this.shouldParseTypes()&&this.match(47)){t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node}e.typeArguments=t}parseAsyncArrowWithTypeParameters(e,t){const r=this.startNodeAt(e,t);this.parseFunctionParams(r);if(!this.parseArrow(r))return;return this.parseArrowExpression(r,undefined,true)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=false;this.state.pos+=2;this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){const r=super.parseTopLevel(e,t);if(this.state.hasFlowComment){this.raise(Ge.UnterminatedFlowComment,{at:this.state.curPosition()})}return r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment){throw this.raise(Ge.NestedFlowComment,{at:this.state.startLoc})}this.hasFlowCommentCompletion();this.state.pos+=this.skipFlowComment();this.state.hasFlowComment=true;return}if(this.state.hasFlowComment){const e=this.input.indexOf("*-/",this.state.pos+2);if(e===-1){throw this.raise(a.UnterminatedComment,{at:this.state.curPosition()})}this.state.pos=e+2+3;return}return super.skipBlockComment()}skipFlowComment(){const{pos:e}=this.state;let t=2;while([32,9].includes(this.input.charCodeAt(e+t))){t++}const r=this.input.charCodeAt(t+e);const n=this.input.charCodeAt(t+e+1);if(r===58&&n===58){return t+2}if(this.input.slice(t+e,t+e+12)==="flow-include"){return t+12}if(r===58&&n!==58){return t}return false}hasFlowCommentCompletion(){const e=this.input.indexOf("*/",this.state.pos);if(e===-1){throw this.raise(a.UnterminatedComment,{at:this.state.curPosition()})}}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(Ge.EnumBooleanMemberNotInitialized,{at:e,memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(!t.explicitType?Ge.EnumInvalidMemberInitializerUnknownType:t.explicitType==="symbol"?Ge.EnumInvalidMemberInitializerSymbolType:Ge.EnumInvalidMemberInitializerPrimaryType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(Ge.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:r})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(Ge.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){const e=this.state.startLoc;const endOfInit=()=>this.match(12)||this.match(8);switch(this.state.type){case 130:{const t=this.parseNumericLiteral(this.state.value);if(endOfInit()){return{type:"number",loc:t.loc.start,value:t}}return{type:"invalid",loc:e}}case 129:{const t=this.parseStringLiteral(this.state.value);if(endOfInit()){return{type:"string",loc:t.loc.start,value:t}}return{type:"invalid",loc:e}}case 85:case 86:{const t=this.parseBooleanLiteral(this.match(85));if(endOfInit()){return{type:"boolean",loc:t.loc.start,value:t}}return{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc;const t=this.parseIdentifier(true);const r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:r}}flowEnumCheckExplicitTypeMismatch(e,t,r){const{explicitType:n}=t;if(n===null){return}if(n!==r){this.flowEnumErrorInvalidMemberInitializer(e,t)}}flowEnumMembers({enumName:e,explicitType:t}){const r=new Set;const n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let s=false;while(!this.match(8)){if(this.eat(21)){s=true;break}const i=this.startNode();const{id:a,init:o}=this.flowEnumMemberRaw();const l=a.name;if(l===""){continue}if(/^[a-z]/.test(l)){this.raise(Ge.EnumInvalidMemberName,{at:a,memberName:l,suggestion:l[0].toUpperCase()+l.slice(1),enumName:e})}if(r.has(l)){this.raise(Ge.EnumDuplicateMemberName,{at:a,memberName:l,enumName:e})}r.add(l);const c={enumName:e,explicitType:t,memberName:l};i.id=a;switch(o.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(o.loc,c,"boolean");i.init=o.value;n.booleanMembers.push(this.finishNode(i,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(o.loc,c,"number");i.init=o.value;n.numberMembers.push(this.finishNode(i,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(o.loc,c,"string");i.init=o.value;n.stringMembers.push(this.finishNode(i,"EnumStringMember"));break}case"invalid":{throw this.flowEnumErrorInvalidMemberInitializer(o.loc,c)}case"none":{switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,c);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,c);break;default:n.defaultedMembers.push(this.finishNode(i,"EnumDefaultedMember"))}}}if(!this.match(8)){this.expect(12)}}return{members:n,hasUnknownMembers:s}}flowEnumStringMembers(e,t,{enumName:r}){if(e.length===0){return t}else if(t.length===0){return e}else if(t.length>e.length){for(const t of e){this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:r})}return t}else{for(const e of t){this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:r})}return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!tokenIsIdentifier(this.state.type)){throw this.raise(Ge.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e})}const{value:t}=this.state;this.next();if(t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"){this.raise(Ge.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t})}return t}flowEnumBody(e,t){const r=t.name;const n=t.loc.start;const s=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:i,hasUnknownMembers:a}=this.flowEnumMembers({enumName:r,explicitType:s});e.hasUnknownMembers=a;switch(s){case"boolean":e.explicitType=true;e.members=i.booleanMembers;this.expect(8);return this.finishNode(e,"EnumBooleanBody");case"number":e.explicitType=true;e.members=i.numberMembers;this.expect(8);return this.finishNode(e,"EnumNumberBody");case"string":e.explicitType=true;e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:r});this.expect(8);return this.finishNode(e,"EnumStringBody");case"symbol":e.members=i.defaultedMembers;this.expect(8);return this.finishNode(e,"EnumSymbolBody");default:{const empty=()=>{e.members=[];this.expect(8);return this.finishNode(e,"EnumStringBody")};e.explicitType=false;const t=i.booleanMembers.length;const s=i.numberMembers.length;const a=i.stringMembers.length;const o=i.defaultedMembers.length;if(!t&&!s&&!a&&!o){return empty()}else if(!t&&!s){e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:r});this.expect(8);return this.finishNode(e,"EnumStringBody")}else if(!s&&!a&&t>=o){for(const e of i.defaultedMembers){this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name})}e.members=i.booleanMembers;this.expect(8);return this.finishNode(e,"EnumBooleanBody")}else if(!t&&!a&&s>=o){for(const e of i.defaultedMembers){this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name})}e.members=i.numberMembers;this.expect(8);return this.finishNode(e,"EnumNumberBody")}else{this.raise(Ge.EnumInconsistentMemberValues,{at:n,enumName:r});return empty()}}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();e.id=t;e.body=this.flowEnumBody(this.startNode(),t);return this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){const t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return false}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}};const ze={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};const Ye=ParseErrorEnum`jsx`((e=>({AttributeIsEmpty:e("JSX attributes must only be assigned a non-empty expression."),MissingClosingTagElement:e((({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`)),MissingClosingTagFragment:e("Expected corresponding JSX closing tag for <>."),UnexpectedSequenceExpression:e("Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?"),UnexpectedToken:e((({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`)),UnsupportedJsxValue:e("JSX value should be either an expression or a quoted JSX text."),UnterminatedJsxContent:e("Unterminated JSX contents."),UnwrappedAdjacentJSXElements:e("Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?")})));function isFragment(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":false}function getQualifiedJSXName(e){if(e.type==="JSXIdentifier"){return e.name}if(e.type==="JSXNamespacedName"){return e.namespace.name+":"+e.name.name}if(e.type==="JSXMemberExpression"){return getQualifiedJSXName(e.object)+"."+getQualifiedJSXName(e.property)}throw new Error("Node had unexpected type: "+e.type)}var jsx=e=>class extends e{jsxReadToken(){let e="";let t=this.state.pos;for(;;){if(this.state.pos>=this.length){throw this.raise(Ye.UnterminatedJsxContent,{at:this.state.startLoc})}const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){if(r===60&&this.state.canStartJSXElement){++this.state.pos;return this.finishToken(138)}return super.getTokenFromCode(r)}e+=this.input.slice(t,this.state.pos);return this.finishToken(137,e);case 38:e+=this.input.slice(t,this.state.pos);e+=this.jsxReadEntity();t=this.state.pos;break;case 62:case 125:default:if(isNewLine(r)){e+=this.input.slice(t,this.state.pos);e+=this.jsxReadNewLine(true);t=this.state.pos}else{++this.state.pos}}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let r;++this.state.pos;if(t===13&&this.input.charCodeAt(this.state.pos)===10){++this.state.pos;r=e?"\n":"\r\n"}else{r=String.fromCharCode(t)}++this.state.curLine;this.state.lineStart=this.state.pos;return r}jsxReadString(e){let t="";let r=++this.state.pos;for(;;){if(this.state.pos>=this.length){throw this.raise(a.UnterminatedString,{at:this.state.startLoc})}const n=this.input.charCodeAt(this.state.pos);if(n===e)break;if(n===38){t+=this.input.slice(r,this.state.pos);t+=this.jsxReadEntity();r=this.state.pos}else if(isNewLine(n)){t+=this.input.slice(r,this.state.pos);t+=this.jsxReadNewLine(false);r=this.state.pos}else{++this.state.pos}}t+=this.input.slice(r,this.state.pos++);return this.finishToken(129,t)}jsxReadEntity(){const e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let e=10;if(this.codePointAtPos(this.state.pos)===120){e=16;++this.state.pos}const t=this.readInt(e,undefined,false,"bail");if(t!==null&&this.codePointAtPos(this.state.pos)===59){++this.state.pos;return String.fromCodePoint(t)}}else{let t=0;let r=false;while(t++<10&&this.state.posObject.hasOwnProperty.call(e,t)&&e[t];function nonNull(e){if(e==null){throw new Error(`Unexpected ${e} value.`)}return e}function assert(e){if(!e){throw new Error("Assert fail")}}function tsTokenCanStartExpression(e){return tokenCanStartExpression(e)||tokenIsBinaryOperator(e)}const Qe=ParseErrorEnum`typescript`((e=>({AbstractMethodHasImplementation:e((({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`)),AbstractPropertyHasInitializer:e((({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`)),AccesorCannotDeclareThisParameter:e("'get' and 'set' accessors cannot declare 'this' parameters."),AccesorCannotHaveTypeParameters:e("An accessor cannot have type parameters."),CannotFindName:e((({name:e})=>`Cannot find name '${e}'.`)),ClassMethodHasDeclare:e("Class methods cannot have the 'declare' modifier."),ClassMethodHasReadonly:e("Class methods cannot have the 'readonly' modifier."),ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:e("A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),ConstructorHasTypeParameters:e("Type parameters cannot appear on a constructor declaration."),DeclareAccessor:e((({kind:e})=>`'declare' is not allowed in ${e}ters.`)),DeclareClassFieldHasInitializer:e("Initializers are not allowed in ambient contexts."),DeclareFunctionHasImplementation:e("An implementation cannot be declared in ambient contexts."),DuplicateAccessibilityModifier:e((({modifier:e})=>`Accessibility modifier already seen.`)),DuplicateModifier:e((({modifier:e})=>`Duplicate modifier: '${e}'.`)),EmptyHeritageClauseType:e((({token:e})=>`'${e}' list cannot be empty.`)),EmptyTypeArguments:e("Type argument list cannot be empty."),EmptyTypeParameters:e("Type parameter list cannot be empty."),ExpectedAmbientAfterExportDeclare:e("'export declare' must be followed by an ambient declaration."),ImportAliasHasImportType:e("An import alias can not use 'import type'."),IncompatibleModifiers:e((({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`)),IndexSignatureHasAbstract:e("Index signatures cannot have the 'abstract' modifier."),IndexSignatureHasAccessibility:e((({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`)),IndexSignatureHasDeclare:e("Index signatures cannot have the 'declare' modifier."),IndexSignatureHasOverride:e("'override' modifier cannot appear on an index signature."),IndexSignatureHasStatic:e("Index signatures cannot have the 'static' modifier."),InitializerNotAllowedInAmbientContext:e("Initializers are not allowed in ambient contexts."),InvalidModifierOnTypeMember:e((({modifier:e})=>`'${e}' modifier cannot appear on a type member.`)),InvalidModifierOnTypeParameter:e((({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`)),InvalidModifierOnTypeParameterPositions:e((({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`)),InvalidModifiersOrder:e((({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`)),InvalidTupleMemberLabel:e("Tuple members must be labeled with a simple identifier."),MissingInterfaceName:e("'interface' declarations must be followed by an identifier."),MixedLabeledAndUnlabeledElements:e("Tuple members must all have names or all not have names."),NonAbstractClassHasAbstractMethod:e("Abstract methods can only appear within an abstract class."),NonClassMethodPropertyHasAbstractModifer:e("'abstract' modifier can only appear on a class, method, or property declaration."),OptionalTypeBeforeRequired:e("A required element cannot follow an optional element."),OverrideNotInSubClass:e("This member cannot have an 'override' modifier because its containing class does not extend another class."),PatternIsOptional:e("A binding pattern parameter cannot be optional in an implementation signature."),PrivateElementHasAbstract:e("Private elements cannot have the 'abstract' modifier."),PrivateElementHasAccessibility:e((({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`)),ReadonlyForMethodSignature:e("'readonly' modifier can only appear on a property declaration or index signature."),ReservedArrowTypeParam:e("This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`."),ReservedTypeAssertion:e("This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),SetAccesorCannotHaveOptionalParameter:e("A 'set' accessor cannot have an optional parameter."),SetAccesorCannotHaveRestParameter:e("A 'set' accessor cannot have rest parameter."),SetAccesorCannotHaveReturnType:e("A 'set' accessor cannot have a return type annotation."),SingleTypeParameterWithoutTrailingComma:e((({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`)),StaticBlockCannotHaveModifier:e("Static class blocks cannot have any modifier."),TypeAnnotationAfterAssign:e("Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`."),TypeImportCannotSpecifyDefaultAndNamed:e("A type-only import can specify a default import or named bindings, but not both."),TypeModifierIsUsedInTypeExports:e("The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),TypeModifierIsUsedInTypeImports:e("The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),UnexpectedParameterModifier:e("A parameter property is only allowed in a constructor implementation."),UnexpectedReadonly:e("'readonly' type modifier is only permitted on array and tuple literal types."),UnexpectedTypeAnnotation:e("Did not expect a type annotation here."),UnexpectedTypeCastInParameter:e("Unexpected type cast in parameter position."),UnsupportedImportTypeArgument:e("Argument in a type import must be a string literal."),UnsupportedParameterPropertyKind:e("A parameter property may not be declared using a binding pattern."),UnsupportedSignatureParameterKind:e((({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`))})));function keywordTypeFromName(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return undefined}}function tsIsAccessModifier(e){return e==="private"||e==="public"||e==="protected"}function tsIsVarianceAnnotations(e){return e==="in"||e==="out"}var typescript=e=>class extends e{getScopeHandler(){return TypeScriptScopeHandler}tsIsIdentifier(){return tokenIsIdentifier(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(134)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){this.next();return this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!tokenIsIdentifier(this.state.type)&&this.state.type!==58){return undefined}const r=this.state.value;if(e.indexOf(r)!==-1){if(t&&this.tsIsStartOfStaticBlocks()){return undefined}if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))){return r}}return undefined}tsParseModifiers({modified:e,allowedModifiers:t,disallowedModifiers:r,stopOnStartOfClassStaticBlock:n,errorTemplate:s=Qe.InvalidModifierOnTypeMember}){const enforceOrder=(t,r,n,s)=>{if(r===n&&e[s]){this.raise(Qe.InvalidModifiersOrder,{at:t,orderedModifiers:[n,s]})}};const incompatible=(t,r,n,s)=>{if(e[n]&&r===s||e[s]&&r===n){this.raise(Qe.IncompatibleModifiers,{at:t,modifiers:[n,s]})}};for(;;){const{startLoc:i}=this.state;const a=this.tsParseModifier(t.concat(r!=null?r:[]),n);if(!a)break;if(tsIsAccessModifier(a)){if(e.accessibility){this.raise(Qe.DuplicateAccessibilityModifier,{at:i,modifier:a})}else{enforceOrder(i,a,a,"override");enforceOrder(i,a,a,"static");enforceOrder(i,a,a,"readonly");e.accessibility=a}}else if(tsIsVarianceAnnotations(a)){if(e[a]){this.raise(Qe.DuplicateModifier,{at:i,modifier:a})}e[a]=true;enforceOrder(i,a,"in","out")}else{if(Object.hasOwnProperty.call(e,a)){this.raise(Qe.DuplicateModifier,{at:i,modifier:a})}else{enforceOrder(i,a,"static","readonly");enforceOrder(i,a,"static","override");enforceOrder(i,a,"override","readonly");enforceOrder(i,a,"abstract","override");incompatible(i,a,"declare","override");incompatible(i,a,"static","abstract")}e[a]=true}if(r!=null&&r.includes(a)){this.raise(s,{at:i,modifier:a})}}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}throw new Error("Unreachable")}tsParseList(e,t){const r=[];while(!this.tsIsListTerminator(e)){r.push(t())}return r}tsParseDelimitedList(e,t,r){return nonNull(this.tsParseDelimitedListWorker(e,t,true,r))}tsParseDelimitedListWorker(e,t,r,n){const s=[];let i=-1;for(;;){if(this.tsIsListTerminator(e)){break}i=-1;const n=t();if(n==null){return undefined}s.push(n);if(this.eat(12)){i=this.state.lastTokStart;continue}if(this.tsIsListTerminator(e)){break}if(r){this.expect(12)}return undefined}if(n){n.value=i}return s}tsParseBracketedList(e,t,r,n,s){if(!n){if(r){this.expect(0)}else{this.expect(47)}}const i=this.tsParseDelimitedList(e,t,s);if(r){this.expect(3)}else{this.expect(48)}return i}tsParseImportType(){const e=this.startNode();this.expect(83);this.expect(10);if(!this.match(129)){this.raise(Qe.UnsupportedImportTypeArgument,{at:this.state.startLoc})}e.argument=this.parseExprAtom();this.expect(11);if(this.eat(16)){e.qualifier=this.tsParseEntityName()}if(this.match(47)){e.typeParameters=this.tsParseTypeArguments()}return this.finishNode(e,"TSImportType")}tsParseEntityName(e=true){let t=this.parseIdentifier(e);while(this.eat(16)){const r=this.startNodeAtNode(t);r.left=t;r.right=this.parseIdentifier(e);t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();e.typeName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.match(47)){e.typeParameters=this.tsParseTypeArguments()}return this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);t.parameterName=e;t.typeAnnotation=this.tsParseTypeAnnotation(false);t.asserts=false;return this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();this.next();return this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();this.expect(87);if(this.match(83)){e.exprName=this.tsParseImportType()}else{e.exprName=this.tsParseEntityName()}if(!this.hasPrecedingLineBreak()&&this.match(47)){e.typeParameters=this.tsParseTypeArguments()}return this.finishNode(e,"TSTypeQuery")}tsParseInOutModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Qe.InvalidModifierOnTypeParameter})}tsParseNoneModifiers(e){this.tsParseModifiers({modified:e,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:Qe.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(e=this.tsParseNoneModifiers.bind(this)){const t=this.startNode();e(t);t.name=this.tsParseTypeParameterName();t.constraint=this.tsEatThenParseType(81);t.default=this.tsEatThenParseType(29);return this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47)){return this.tsParseTypeParameters(e)}}tsParseTypeParameters(e){const t=this.startNode();if(this.match(47)||this.match(138)){this.next()}else{this.unexpected()}const r={value:-1};t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),false,true,r);if(t.params.length===0){this.raise(Qe.EmptyTypeParameters,{at:t})}if(r.value!==-1){this.addExtra(t,"trailingComma",r.value)}return this.finishNode(t,"TSTypeParameterDeclaration")}tsTryNextParseConstantContext(){if(this.lookahead().type!==75)return null;this.next();const e=this.tsParseTypeReference();if(e.typeParameters){this.raise(Qe.CannotFindName,{at:e.typeName,name:"const"})}return e}tsFillSignature(e,t){const r=e===19;const n="parameters";const s="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters();this.expect(10);t[n]=this.tsParseBindingListForSignature();if(r){t[s]=this.tsParseTypeOrTypePredicateAnnotation(e)}else if(this.match(e)){t[s]=this.tsParseTypeOrTypePredicateAnnotation(e)}}tsParseBindingListForSignature(){return this.parseBindingList(11,41).map((e=>{if(e.type!=="Identifier"&&e.type!=="RestElement"&&e.type!=="ObjectPattern"&&e.type!=="ArrayPattern"){this.raise(Qe.UnsupportedSignatureParameterKind,{at:e,type:e.type})}return e}))}tsParseTypeMemberSemicolon(){if(!this.eat(12)&&!this.isLineTerminator()){this.expect(13)}}tsParseSignatureMember(e,t){this.tsFillSignature(14,t);this.tsParseTypeMemberSemicolon();return this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){this.next();if(tokenIsIdentifier(this.state.type)){this.next();return this.match(14)}return false}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))){return undefined}this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation();this.resetEndLocation(t);this.expect(3);e.parameters=[t];const r=this.tsTryParseTypeAnnotation();if(r)e.typeAnnotation=r;this.tsParseTypeMemberSemicolon();return this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){if(this.eat(17))e.optional=true;const r=e;if(this.match(10)||this.match(47)){if(t){this.raise(Qe.ReadonlyForMethodSignature,{at:e})}const n=r;if(n.kind&&this.match(47)){this.raise(Qe.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()})}this.tsFillSignature(14,n);this.tsParseTypeMemberSemicolon();const s="parameters";const i="typeAnnotation";if(n.kind==="get"){if(n[s].length>0){this.raise(a.BadGetterArity,{at:this.state.curPosition()});if(this.isThisParam(n[s][0])){this.raise(Qe.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()})}}}else if(n.kind==="set"){if(n[s].length!==1){this.raise(a.BadSetterArity,{at:this.state.curPosition()})}else{const e=n[s][0];if(this.isThisParam(e)){this.raise(Qe.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()})}if(e.type==="Identifier"&&e.optional){this.raise(Qe.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()})}if(e.type==="RestElement"){this.raise(Qe.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}}if(n[i]){this.raise(Qe.SetAccesorCannotHaveReturnType,{at:n[i]})}}else{n.kind="method"}return this.finishNode(n,"TSMethodSignature")}else{const e=r;if(t)e.readonly=true;const n=this.tsTryParseTypeAnnotation();if(n)e.typeAnnotation=n;this.tsParseTypeMemberSemicolon();return this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47)){return this.tsParseSignatureMember("TSCallSignatureDeclaration",e)}if(this.match(77)){const t=this.startNode();this.next();if(this.match(10)||this.match(47)){return this.tsParseSignatureMember("TSConstructSignatureDeclaration",e)}else{e.key=this.createIdentifier(t,"new");return this.tsParsePropertyOrMethodSignature(e,false)}}this.tsParseModifiers({modified:e,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});const t=this.tsTryParseIndexSignature(e);if(t){return t}this.parsePropertyName(e);if(!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()){e.kind=e.key.name;this.parsePropertyName(e)}return this.tsParsePropertyOrMethodSignature(e,!!e.readonly)}tsParseTypeLiteral(){const e=this.startNode();e.members=this.tsParseObjectTypeMembers();return this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));this.expect(8);return e}tsIsStartOfMappedType(){this.next();if(this.eat(53)){return this.isContextual(118)}if(this.isContextual(118)){this.next()}if(!this.match(0)){return false}this.next();if(!this.tsIsIdentifier()){return false}this.next();return this.match(58)}tsParseMappedTypeParameter(){const e=this.startNode();e.name=this.tsParseTypeParameterName();e.constraint=this.tsExpectThenParseType(58);return this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();this.expect(5);if(this.match(53)){e.readonly=this.state.value;this.next();this.expectContextual(118)}else if(this.eatContextual(118)){e.readonly=true}this.expect(0);e.typeParameter=this.tsParseMappedTypeParameter();e.nameType=this.eatContextual(93)?this.tsParseType():null;this.expect(3);if(this.match(53)){e.optional=this.state.value;this.next();this.expect(17)}else if(this.eat(17)){e.optional=true}e.typeAnnotation=this.tsTryParseType();this.semicolon();this.expect(8);return this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),true,false);let t=false;let r=null;e.elementTypes.forEach((e=>{var n;let{type:s}=e;if(t&&s!=="TSRestType"&&s!=="TSOptionalType"&&!(s==="TSNamedTupleMember"&&e.optional)){this.raise(Qe.OptionalTypeBeforeRequired,{at:e})}t=t||s==="TSNamedTupleMember"&&e.optional||s==="TSOptionalType";if(s==="TSRestType"){e=e.typeAnnotation;s=e.type}const i=s==="TSNamedTupleMember";r=(n=r)!=null?n:i;if(r!==i){this.raise(Qe.MixedLabeledAndUnlabeledElements,{at:e})}}));return this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{start:e,startLoc:t}=this.state;const r=this.eat(21);let n=this.tsParseType();const s=this.eat(17);const i=this.eat(14);if(i){const e=this.startNodeAtNode(n);e.optional=s;if(n.type==="TSTypeReference"&&!n.typeParameters&&n.typeName.type==="Identifier"){e.label=n.typeName}else{this.raise(Qe.InvalidTupleMemberLabel,{at:n});e.label=n}e.elementType=this.tsParseType();n=this.finishNode(e,"TSNamedTupleMember")}else if(s){const e=this.startNodeAtNode(n);e.typeAnnotation=n;n=this.finishNode(e,"TSOptionalType")}if(r){const r=this.startNodeAt(e,t);r.typeAnnotation=n;n=this.finishNode(r,"TSRestType")}return n}tsParseParenthesizedType(){const e=this.startNode();this.expect(10);e.typeAnnotation=this.tsParseType();this.expect(11);return this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const r=this.startNode();if(e==="TSConstructorType"){r.abstract=!!t;if(t)this.next();this.next()}this.tsFillSignature(19,r);return this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();e.literal=(()=>{switch(this.state.type){case 130:case 131:case 129:case 85:case 86:return this.parseExprAtom();default:throw this.unexpected()}})();return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();e.literal=this.parseTemplate(false);return this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){if(this.state.inType)return this.tsParseType();return super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();if(this.isContextual(113)&&!this.hasPrecedingLineBreak()){return this.tsParseThisTypePredicate(e)}else{return e}}tsParseNonArrayType(){switch(this.state.type){case 129:case 130:case 131:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const e=this.startNode();const t=this.lookahead();if(t.type!==130&&t.type!==131){throw this.unexpected()}e.literal=this.parseMaybeUnary();return this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(tokenIsIdentifier(e)||e===88||e===84){const t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":keywordTypeFromName(this.state.value);if(t!==undefined&&this.lookaheadCharCode()!==46){const e=this.startNode();this.next();return this.finishNode(e,t)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(0)){if(this.match(3)){const t=this.startNodeAtNode(e);t.elementType=e;this.expect(3);e=this.finishNode(t,"TSArrayType")}else{const t=this.startNodeAtNode(e);t.objectType=e;t.indexType=this.tsParseType();this.expect(3);e=this.finishNode(t,"TSIndexedAccessType")}}return e}tsParseTypeOperator(){const e=this.startNode();const t=this.state.value;this.next();e.operator=t;e.typeAnnotation=this.tsParseTypeOperatorOrHigher();if(t==="readonly"){this.tsCheckTypeAnnotationForReadOnly(e)}return this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Qe.UnexpectedReadonly,{at:e})}}tsParseInferType(){const e=this.startNode();this.expectContextual(112);const t=this.startNode();t.name=this.tsParseTypeParameterName();t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType()));e.typeParameter=this.finishNode(t,"TSTypeParameter");return this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17)){return e}}}tsParseTypeOperatorOrHigher(){const e=tokenIsTSTypeOperator(this.state.type)&&!this.state.containsEsc;return e?this.tsParseTypeOperator():this.isContextual(112)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){const n=this.startNode();const s=this.eat(r);const i=[];do{i.push(t())}while(this.eat(r));if(i.length===1&&!s){return i[0]}n.types=i;return this.finishNode(n,e)}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){if(this.match(47)){return true}return this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(tokenIsIdentifier(this.state.type)||this.match(78)){this.next();return true}if(this.match(5)){const{errors:e}=this.state;const t=e.length;try{this.parseObjectLike(8,true);return e.length===t}catch(e){return false}}if(this.match(0)){this.next();const{errors:e}=this.state;const t=e.length;try{this.parseBindingList(3,93,true);return e.length===t}catch(e){return false}}return false}tsIsUnambiguouslyStartOfFunctionType(){this.next();if(this.match(11)||this.match(21)){return true}if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29)){return true}if(this.match(11)){this.next();if(this.match(19)){return true}}}return false}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const r=this.startNode();const n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();if(e.type==="TSThisType"){r.parameterName=e;r.asserts=true;r.typeAnnotation=null;e=this.finishNode(r,"TSTypePredicate")}else{this.resetStartLocationFromNode(e,r);e.asserts=true}t.typeAnnotation=e;return this.finishNode(t,"TSTypeAnnotation")}const s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s){if(!n){return this.tsParseTypeAnnotation(false,t)}r.parameterName=this.parseIdentifier();r.asserts=n;r.typeAnnotation=null;t.typeAnnotation=this.finishNode(r,"TSTypePredicate");return this.finishNode(t,"TSTypeAnnotation")}const i=this.tsParseTypeAnnotation(false);r.parameterName=s;r.typeAnnotation=i;r.asserts=n;t.typeAnnotation=this.finishNode(r,"TSTypePredicate");return this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(14)?this.tsParseTypeOrTypePredicateAnnotation(14):undefined}tsTryParseTypeAnnotation(){return this.match(14)?this.tsParseTypeAnnotation():undefined}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(113)&&!this.hasPrecedingLineBreak()){this.next();return e}}tsParseTypePredicateAsserts(){if(this.state.type!==106){return false}const e=this.state.containsEsc;this.next();if(!tokenIsIdentifier(this.state.type)&&!this.match(78)){return false}if(e){this.raise(a.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"})}return true}tsParseTypeAnnotation(e=true,t=this.startNode()){this.tsInType((()=>{if(e)this.expect(14);t.typeAnnotation=this.tsParseType()}));return this.finishNode(t,"TSTypeAnnotation")}tsParseType(){assert(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81)){return e}const t=this.startNodeAtNode(e);t.checkType=e;t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType()));this.expect(17);t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType()));this.expect(14);t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType()));return this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(120)&&this.lookahead().type===77}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType()){return this.tsParseFunctionOrConstructorType("TSFunctionType")}if(this.match(77)){return this.tsParseFunctionOrConstructorType("TSConstructorType")}else if(this.isAbstractConstructorSignature()){return this.tsParseFunctionOrConstructorType("TSConstructorType",true)}return this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){if(this.getPluginOption("typescript","disallowAmbiguousJSXLike")){this.raise(Qe.ReservedTypeAssertion,{at:this.state.startLoc})}const e=this.startNode();const t=this.tsTryNextParseConstantContext();e.typeAnnotation=t||this.tsNextThenParseType();this.expect(48);e.expression=this.parseMaybeUnary();return this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.startLoc;const r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{const e=this.startNode();e.expression=this.tsParseEntityName();if(this.match(47)){e.typeParameters=this.tsParseTypeArguments()}return this.finishNode(e,"TSExpressionWithTypeArguments")}));if(!r.length){this.raise(Qe.EmptyHeritageClauseType,{at:t,token:e})}return r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(125);if(t.declare)e.declare=true;if(tokenIsIdentifier(this.state.type)){e.id=this.parseIdentifier();this.checkIdentifier(e.id,oe)}else{e.id=null;this.raise(Qe.MissingInterfaceName,{at:this.state.startLoc})}e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));if(this.eat(81)){e.extends=this.tsParseHeritageClause("extends")}const r=this.startNode();r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this));e.body=this.finishNode(r,"TSInterfaceBody");return this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){e.id=this.parseIdentifier();this.checkIdentifier(e.id,le);e.typeAnnotation=this.tsInType((()=>{e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));this.expect(29);if(this.isContextual(111)&&this.lookahead().type!==16){const e=this.startNode();this.next();return this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()}));this.semicolon();return this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){const t=this.state.inType;this.state.inType=true;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=true;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=false;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){return!this.match(e)?undefined:this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsDoThenParseType((()=>this.expect(e)))}tsNextThenParseType(){return this.tsDoThenParseType((()=>this.next()))}tsDoThenParseType(e){return this.tsInType((()=>{e();return this.tsParseType()}))}tsParseEnumMember(){const e=this.startNode();e.id=this.match(129)?this.parseExprAtom():this.parseIdentifier(true);if(this.eat(29)){e.initializer=this.parseMaybeAssignAllowIn()}return this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){if(t.const)e.const=true;if(t.declare)e.declare=true;this.expectContextual(122);e.id=this.parseIdentifier();this.checkIdentifier(e.id,e.const?de:ce);this.expect(5);e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this));this.expect(8);return this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){const e=this.startNode();this.scope.enter(L);this.expect(5);this.parseBlockOrModuleBlockBody(e.body=[],undefined,true,8);this.scope.exit();return this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=false){e.id=this.parseIdentifier();if(!t){this.checkIdentifier(e.id,he)}if(this.eat(16)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,true);e.body=t}else{this.scope.enter(W);this.prodParam.enter(Ue);e.body=this.tsParseModuleBlock();this.prodParam.exit();this.scope.exit()}return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){if(this.isContextual(109)){e.global=true;e.id=this.parseIdentifier()}else if(this.match(129)){e.id=this.parseExprAtom()}else{this.unexpected()}if(this.match(5)){this.scope.enter(W);this.prodParam.enter(Ue);e.body=this.tsParseModuleBlock();this.prodParam.exit();this.scope.exit()}else{this.semicolon()}return this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){e.isExport=t||false;e.id=this.parseIdentifier();this.checkIdentifier(e.id,se);this.expect(29);const r=this.tsParseModuleReference();if(e.importKind==="type"&&r.type!=="TSExternalModuleReference"){this.raise(Qe.ImportAliasHasImportType,{at:r})}e.moduleReference=r;this.semicolon();return this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(116)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(false)}tsParseExternalModuleReference(){const e=this.startNode();this.expectContextual(116);this.expect(10);if(!this.match(129)){throw this.unexpected()}e.expression=this.parseExprAtom();this.expect(11);return this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone();const r=e();this.state=t;return r}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(t.aborted||!t.node)return undefined;if(t.error)this.state=t.failState;return t.node}tsTryParse(e){const t=this.state.clone();const r=e();if(r!==undefined&&r!==false){return r}else{this.state=t;return undefined}}tsTryParseDeclare(e){if(this.isLineTerminator()){return}let t=this.state.type;let r;if(this.isContextual(99)){t=74;r="let"}return this.tsInAmbientContext((()=>{if(t===68){e.declare=true;return this.parseFunctionStatement(e,false,true)}if(t===80){e.declare=true;return this.parseClass(e,true,false)}if(t===122){return this.tsParseEnumDeclaration(e,{declare:true})}if(t===109){return this.tsParseAmbientExternalModuleDeclaration(e)}if(t===75||t===74){if(!this.match(75)||!this.isLookaheadContextual("enum")){e.declare=true;return this.parseVarStatement(e,r||this.state.value,true)}this.expect(75);return this.tsParseEnumDeclaration(e,{const:true,declare:true})}if(t===125){const t=this.tsParseInterfaceDeclaration(e,{declare:true});if(t)return t}if(tokenIsIdentifier(t)){return this.tsParseDeclaration(e,this.state.value,true)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,true)}tsParseExpressionStatement(e,t){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);if(t){t.declare=true;return t}break}case"global":if(this.match(5)){this.scope.enter(W);this.prodParam.enter(Ue);const r=e;r.global=true;r.id=t;r.body=this.tsParseModuleBlock();this.scope.exit();this.prodParam.exit();return this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,false)}}tsParseDeclaration(e,t,r){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||tokenIsIdentifier(this.state.type))){return this.tsParseAbstractDeclaration(e)}break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(129)){return this.tsParseAmbientExternalModuleDeclaration(e)}else if(tokenIsIdentifier(this.state.type)){return this.tsParseModuleOrNamespaceDeclaration(e)}}break;case"namespace":if(this.tsCheckLineTerminator(r)&&tokenIsIdentifier(this.state.type)){return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"type":if(this.tsCheckLineTerminator(r)&&tokenIsIdentifier(this.state.type)){return this.tsParseTypeAliasDeclaration(e)}break}}tsCheckLineTerminator(e){if(e){if(this.hasFollowingLineBreak())return false;this.next();return true}return!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e,t){if(!this.match(47)){return undefined}const r=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=true;const n=this.tsTryParseAndCatch((()=>{const r=this.startNodeAt(e,t);r.typeParameters=this.tsParseTypeParameters();super.parseFunctionParams(r);r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation();this.expect(19);return r}));this.state.maybeInArrowParameters=r;if(!n){return undefined}return this.parseArrowExpression(n,null,true)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==47){return undefined}return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();e.params=this.tsInType((()=>this.tsInNoContext((()=>{this.expect(47);return this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))}))));if(e.params.length===0){this.raise(Qe.EmptyTypeArguments,{at:e})}this.expect(48);return this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return tokenIsTSDeclarationStart(this.state.type)}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return false;return super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){const r=this.state.start;const n=this.state.startLoc;let s;let i=false;let a=false;if(e!==undefined){const t={};this.tsParseModifiers({modified:t,allowedModifiers:["public","private","protected","override","readonly"]});s=t.accessibility;a=t.override;i=t.readonly;if(e===false&&(s||i||a)){this.raise(Qe.UnexpectedParameterModifier,{at:n})}}const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o);const l=this.parseMaybeDefault(o.start,o.loc.start,o);if(s||i||a){const e=this.startNodeAt(r,n);if(t.length){e.decorators=t}if(s)e.accessibility=s;if(i)e.readonly=i;if(a)e.override=a;if(l.type!=="Identifier"&&l.type!=="AssignmentPattern"){this.raise(Qe.UnsupportedParameterPropertyKind,{at:e})}e.parameter=l;return this.finishNode(e,"TSParameterProperty")}if(t.length){o.decorators=t}return l}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}parseFunctionBodyAndFinish(e,t,r=false){if(this.match(14)){e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14)}const n=t==="FunctionDeclaration"?"TSDeclareFunction":t==="ClassMethod"||t==="ClassPrivateMethod"?"TSDeclareMethod":undefined;if(n&&!this.match(5)&&this.isLineTerminator()){this.finishNode(e,n);return}if(n==="TSDeclareFunction"&&this.state.isAmbientContext){this.raise(Qe.DeclareFunctionHasImplementation,{at:e});if(e.declare){super.parseFunctionBodyAndFinish(e,n,r);return}}super.parseFunctionBodyAndFinish(e,t,r)}registerFunctionStatementId(e){if(!e.body&&e.id){this.checkIdentifier(e.id,ue)}else{super.registerFunctionStatementId(...arguments)}}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{if((e==null?void 0:e.type)==="TSTypeCastExpression"){this.raise(Qe.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}}))}toReferencedList(e,t){this.tsCheckForInvalidTypeCasts(e);return e}parseArrayLike(...e){const t=super.parseArrayLike(...e);if(t.type==="ArrayExpression"){this.tsCheckForInvalidTypeCasts(t.elements)}return t}parseSubscript(e,t,r,n,s){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=false;this.next();const n=this.startNodeAt(t,r);n.expression=e;return this.finishNode(n,"TSNonNullExpression")}let i=false;if(this.match(18)&&this.lookaheadCharCode()===60){if(n){s.stop=true;return e}s.optionalChainMember=i=true;this.next()}if(this.match(47)||this.match(51)){let a;const o=this.tsTryParseAndCatch((()=>{if(!n&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t,r);if(e){return e}}const o=this.tsParseTypeArgumentsInExpression();if(!o)throw this.unexpected();if(i&&!this.match(10)){a=this.state.curPosition();throw this.unexpected()}if(tokenIsTemplate(this.state.type)){const n=this.parseTaggedTemplateExpression(e,t,r,s);n.typeParameters=o;return n}if(!n&&this.eat(10)){const n=this.startNodeAt(t,r);n.callee=e;n.arguments=this.parseCallExpressionArguments(11,false);this.tsCheckForInvalidTypeCasts(n.arguments);n.typeParameters=o;if(s.optionalChainMember){n.optional=i}return this.finishCallExpression(n,s.optionalChainMember)}if(tsTokenCanStartExpression(this.state.type)&&this.state.type!==10){throw this.unexpected()}const l=this.startNodeAt(t,r);l.expression=e;l.typeParameters=o;return this.finishNode(l,"TSInstantiationExpression")}));if(a){this.unexpected(a,10)}if(o)return o}return super.parseSubscript(e,t,r,n,s)}parseNewCallee(e){var t;super.parseNewCallee(e);const{callee:r}=e;if(r.type==="TSInstantiationExpression"&&!((t=r.extra)!=null&&t.parenthesized)){e.typeParameters=r.typeParameters;e.callee=r.expression}}parseExprOp(e,t,r,n){if(tokenOperatorPrecedence(58)>n&&!this.hasPrecedingLineBreak()&&this.isContextual(93)){const s=this.startNodeAt(t,r);s.expression=e;const i=this.tsTryNextParseConstantContext();if(i){s.typeAnnotation=i}else{s.typeAnnotation=this.tsNextThenParseType()}this.finishNode(s,"TSAsExpression");this.reScan_lt_gt();return this.parseExprOp(s,t,r,n)}return super.parseExprOp(e,t,r,n)}checkReservedWord(e,t,r,n){if(!this.state.isAmbientContext){super.checkReservedWord(e,t,r,n)}}checkDuplicateExports(){}parseImport(e){e.importKind="value";if(tokenIsIdentifier(this.state.type)||this.match(55)||this.match(5)){let t=this.lookahead();if(this.isContextual(126)&&t.type!==12&&t.type!==97&&t.type!==29){e.importKind="type";this.next();t=this.lookahead()}if(tokenIsIdentifier(this.state.type)&&t.type===29){return this.tsParseImportEqualsDeclaration(e)}}const t=super.parseImport(e);if(t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"){this.raise(Qe.TypeImportCannotSpecifyDefaultAndNamed,{at:t})}return t}parseExport(e){if(this.match(83)){this.next();if(this.isContextual(126)&&this.lookaheadCharCode()!==61){e.importKind="type";this.next()}else{e.importKind="value"}return this.tsParseImportEqualsDeclaration(e,true)}else if(this.eat(29)){const t=e;t.expression=this.parseExpression();this.semicolon();return this.finishNode(t,"TSExportAssignment")}else if(this.eatContextual(93)){const t=e;this.expectContextual(124);t.id=this.parseIdentifier();this.semicolon();return this.finishNode(t,"TSNamespaceExportDeclaration")}else{if(this.isContextual(126)&&this.lookahead().type===5){this.next();e.exportKind="type"}else{e.exportKind="value"}return super.parseExport(e)}}isAbstractClass(){return this.isContextual(120)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();this.next();e.abstract=true;this.parseClass(e,true,true);return e}if(this.match(125)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=false){const{isAmbientContext:n}=this.state;const s=super.parseVarStatement(e,t,r||n);if(!n)return s;for(const{id:e,init:r}of s.declarations){if(!r)continue;if(t!=="const"||!!e.typeAnnotation){this.raise(Qe.InitializerNotAllowedInAmbientContext,{at:r})}else if(r.type!=="StringLiteral"&&r.type!=="BooleanLiteral"&&r.type!=="NumericLiteral"&&r.type!=="BigIntLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)&&!isPossiblyLiteralEnum(r)){this.raise(Qe.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:r})}}return s}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){const e=this.startNode();this.expect(75);return this.tsParseEnumDeclaration(e,{const:true})}if(this.isContextual(122)){return this.tsParseEnumDeclaration(this.startNode())}if(this.isContextual(125)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>{if(tsIsAccessModifier(t)){return e.accessibility===t}return!!e[t]}))}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&this.lookaheadCharCode()===123}parseClassMember(e,t,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({modified:t,allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:true,errorTemplate:Qe.InvalidModifierOnTypeParameterPositions});const callParseClassMemberWithIsStatic=()=>{if(this.tsIsStartOfStaticBlocks()){this.next();this.next();if(this.tsHasSomeModifiers(t,n)){this.raise(Qe.StaticBlockCannotHaveModifier,{at:this.state.curPosition()})}this.parseClassStaticBlock(e,t)}else{this.parseClassMemberWithIsStatic(e,t,r,!!t.static)}};if(t.declare){this.tsInAmbientContext(callParseClassMemberWithIsStatic)}else{callParseClassMemberWithIsStatic()}}parseClassMemberWithIsStatic(e,t,r,n){const s=this.tsTryParseIndexSignature(t);if(s){e.body.push(s);if(t.abstract){this.raise(Qe.IndexSignatureHasAbstract,{at:t})}if(t.accessibility){this.raise(Qe.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility})}if(t.declare){this.raise(Qe.IndexSignatureHasDeclare,{at:t})}if(t.override){this.raise(Qe.IndexSignatureHasOverride,{at:t})}return}if(!this.state.inAbstractClass&&t.abstract){this.raise(Qe.NonAbstractClassHasAbstractMethod,{at:t})}if(t.override){if(!r.hadSuperClass){this.raise(Qe.OverrideNotInSubClass,{at:t})}}super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){const t=this.eat(17);if(t)e.optional=true;if(e.readonly&&this.match(10)){this.raise(Qe.ClassMethodHasReadonly,{at:e})}if(e.declare&&this.match(10)){this.raise(Qe.ClassMethodHasDeclare,{at:e})}}parseExpressionStatement(e,t){const r=t.type==="Identifier"?this.tsParseExpressionStatement(e,t):undefined;return r||super.parseExpressionStatement(e,t)}shouldParseExportDeclaration(){if(this.tsIsDeclarationStart())return true;return super.shouldParseExportDeclaration()}parseConditional(e,t,r,n){if(!this.state.maybeInArrowParameters||!this.match(17)){return super.parseConditional(e,t,r,n)}const s=this.tryParse((()=>super.parseConditional(e,t,r)));if(!s.node){if(s.error){super.setOptionalParametersError(n,s.error)}return e}if(s.error)this.state=s.failState;return s.node}parseParenItem(e,t,r){e=super.parseParenItem(e,t,r);if(this.eat(17)){e.optional=true;this.resetEndLocation(e)}if(this.match(14)){const n=this.startNodeAt(t,r);n.expression=e;n.typeAnnotation=this.tsParseTypeAnnotation();return this.finishNode(n,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(121)){return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)))}const t=this.state.start;const r=this.state.startLoc;const n=this.eatContextual(121);if(n&&(this.isContextual(121)||!this.shouldParseExportDeclaration())){throw this.raise(Qe.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc})}const s=tokenIsIdentifier(this.state.type);const i=s&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);if(!i)return null;if(i.type==="TSInterfaceDeclaration"||i.type==="TSTypeAliasDeclaration"||n){e.exportKind="type"}if(n){this.resetStartLocation(i,t,r);i.declare=true}return i}parseClassId(e,t,r){if((!t||r)&&this.isContextual(110)){return}super.parseClassId(e,t,r,e.declare?ue:ne);const n=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));if(n)e.typeParameters=n}parseClassPropertyAnnotation(e){if(!e.optional&&this.eat(35)){e.definite=true}const t=this.tsTryParseTypeAnnotation();if(t)e.typeAnnotation=t}parseClassProperty(e){this.parseClassPropertyAnnotation(e);if(this.state.isAmbientContext&&this.match(29)){this.raise(Qe.DeclareClassFieldHasInitializer,{at:this.state.startLoc})}if(e.abstract&&this.match(29)){const{key:t}=e;this.raise(Qe.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:t.type==="Identifier"&&!e.computed?t.name:`[${this.input.slice(t.start,t.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){if(e.abstract){this.raise(Qe.PrivateElementHasAbstract,{at:e})}if(e.accessibility){this.raise(Qe.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility})}this.parseClassPropertyAnnotation(e);return super.parseClassPrivateProperty(e)}pushClassMethod(e,t,r,n,s,i){const a=this.tsTryParseTypeParameters();if(a&&s){this.raise(Qe.ConstructorHasTypeParameters,{at:a})}const{declare:o=false,kind:l}=t;if(o&&(l==="get"||l==="set")){this.raise(Qe.DeclareAccessor,{at:t,kind:l})}if(a)t.typeParameters=a;super.pushClassMethod(e,t,r,n,s,i)}pushClassPrivateMethod(e,t,r,n){const s=this.tsTryParseTypeParameters();if(s)t.typeParameters=s;super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){if(e.type==="TSDeclareMethod")return;if(e.type==="MethodDefinition"&&!e.value.body)return;super.declareClassPrivateMethodInScope(e,t)}parseClassSuper(e){super.parseClassSuper(e);if(e.superClass&&(this.match(47)||this.match(51))){e.superTypeParameters=this.tsParseTypeArgumentsInExpression()}if(this.eatContextual(110)){e.implements=this.tsParseHeritageClause("implements")}}parseObjPropValue(e,...t){const r=this.tsTryParseTypeParameters();if(r)e.typeParameters=r;super.parseObjPropValue(e,...t)}parseFunctionParams(e,t){const r=this.tsTryParseTypeParameters();if(r)e.typeParameters=r;super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t);if(e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)){e.definite=true}const r=this.tsTryParseTypeAnnotation();if(r){e.id.typeAnnotation=r;this.resetEndLocation(e.id)}}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){e.returnType=this.tsParseTypeAnnotation()}return super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(...e){var t,r,n,s,i,a,o;let c;let u;let p;if(this.hasPlugin("jsx")&&(this.match(138)||this.match(47))){c=this.state.clone();u=this.tryParse((()=>super.parseMaybeAssign(...e)),c);if(!u.error)return u.node;const{context:t}=this.state;const r=t[t.length-1];if(r===l.j_oTag||r===l.j_expr){t.pop()}}if(!((t=u)!=null&&t.error)&&!this.match(47)){return super.parseMaybeAssign(...e)}let f;c=c||this.state.clone();const d=this.tryParse((t=>{var r,n,s;f=this.tsParseTypeParameters();const i=super.parseMaybeAssign(...e);if(i.type!=="ArrowFunctionExpression"||(r=i.extra)!=null&&r.parenthesized){t()}if(((n=f)==null?void 0:n.params.length)!==0){this.resetStartLocationFromNode(i,f)}i.typeParameters=f;if(this.hasPlugin("jsx")&&i.typeParameters.params.length===1&&!((s=i.typeParameters.extra)!=null&&s.trailingComma)){const e=i.typeParameters.params[0];if(!e.constraint);}return i}),c);if(!d.error&&!d.aborted){if(f)this.reportReservedArrowTypeParam(f);return d.node}if(!u){assert(!this.hasPlugin("jsx"));p=this.tryParse((()=>super.parseMaybeAssign(...e)),c);if(!p.error)return p.node}if((r=u)!=null&&r.node){this.state=u.failState;return u.node}if(d.node){this.state=d.failState;if(f)this.reportReservedArrowTypeParam(f);return d.node}if((n=p)!=null&&n.node){this.state=p.failState;return p.node}if((s=u)!=null&&s.thrown)throw u.error;if(d.thrown)throw d.error;if((i=p)!=null&&i.thrown)throw p.error;throw((a=u)==null?void 0:a.error)||d.error||((o=p)==null?void 0:o.error)}reportReservedArrowTypeParam(e){var t;if(e.params.length===1&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")){this.raise(Qe.ReservedArrowTypeParam,{at:e})}}parseMaybeUnary(e){if(!this.hasPlugin("jsx")&&this.match(47)){return this.tsParseTypeAssertion()}else{return super.parseMaybeUnary(e)}}parseArrow(e){if(this.match(14)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(14);if(this.canInsertSemicolon()||!this.match(19))e();return t}));if(t.aborted)return;if(!t.thrown){if(t.error)this.state=t.failState;e.returnType=t.node}}return super.parseArrow(e)}parseAssignableListItemTypes(e){if(this.eat(17)){if(e.type!=="Identifier"&&!this.state.isAmbientContext&&!this.state.inType){this.raise(Qe.PatternIsOptional,{at:e})}e.optional=true}const t=this.tsTryParseTypeAnnotation();if(t)e.typeAnnotation=t;this.resetEndLocation(e);return e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return true;default:return super.isAssignable(e,t)}}toAssignable(e,t=false){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(t){this.expressionScope.recordArrowParemeterBindingError(Qe.UnexpectedTypeCastInParameter,{at:e})}else{this.raise(Qe.UnexpectedTypeCastInParameter,{at:e})}this.toAssignable(e.expression,t);break;case"AssignmentExpression":if(!t&&e.left.type==="TSTypeCastExpression"){e.left=this.typeCastToParameter(e.left)}default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,false);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){return getOwn$1({TSTypeCastExpression:true,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==pe||!t)&&["expression",true],TSTypeAssertion:(r!==pe||!t)&&["expression",true]},e)||super.isValidLVal(e,t,r)}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(true);default:return super.parseBindingAtom()}}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){const t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(e);r.typeParameters=t;return r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){if(this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e){this.next();return false}else{return super.checkCommaAfterRest(e)}}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(...e){const t=super.parseMaybeDefault(...e);if(t.type==="AssignmentPattern"&&t.typeAnnotation&&t.right.startthis.isAssignable(e,true)))}return super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));if(t)e.typeParameters=t}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e);const r=this.getObjectOrClassMethodParams(e);const n=r[0];const s=n&&this.isThisParam(n);return s?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam();const t=this.tsTryParseTypeAnnotation();if(t){e.typeAnnotation=t;this.resetEndLocation(e)}return e}tsInAmbientContext(e){const t=this.state.isAmbientContext;this.state.isAmbientContext=true;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,...t){const r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,...t)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e){if(this.match(80)){e.abstract=true;return this.parseClass(e,true,false)}else if(this.isContextual(125)){if(!this.hasFollowingLineBreak()){e.abstract=true;this.raise(Qe.NonClassMethodPropertyHasAbstractModifer,{at:e});return this.tsParseInterfaceDeclaration(e)}}else{this.unexpected(null,80)}}parseMethod(...e){const t=super.parseMethod(...e);if(t.abstract){const e=this.hasPlugin("estree")?!!t.value.body:!!t.body;if(e){const{key:e}=t;this.raise(Qe.AbstractMethodHasImplementation,{at:t,methodName:e.type==="Identifier"&&!t.computed?e.name:`[${this.input.slice(e.start,e.end)}]`})}}return t}tsParseTypeParameterName(){const e=this.parseIdentifier();return e.name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){if(this.shouldParseAsAmbientContext()){this.state.isAmbientContext=true}return super.parse()}getExpression(){if(this.shouldParseAsAmbientContext()){this.state.isAmbientContext=true}return super.getExpression()}parseExportSpecifier(e,t,r,n){if(!t&&n){this.parseTypeOnlyImportExportSpecifier(e,false,r);return this.finishNode(e,"ExportSpecifier")}e.exportKind="value";return super.parseExportSpecifier(e,t,r,n)}parseImportSpecifier(e,t,r,n){if(!t&&n){this.parseTypeOnlyImportExportSpecifier(e,true,r);return this.finishNode(e,"ImportSpecifier")}e.importKind="value";return super.parseImportSpecifier(e,t,r,n)}parseTypeOnlyImportExportSpecifier(e,t,r){const n=t?"imported":"local";const s=t?"local":"exported";let i=e[n];let a;let o=false;let l=true;const c=i.loc.start;if(this.isContextual(93)){const e=this.parseIdentifier();if(this.isContextual(93)){const r=this.parseIdentifier();if(tokenIsKeywordOrIdentifier(this.state.type)){o=true;i=e;a=t?this.parseIdentifier():this.parseModuleExportName();l=false}else{a=r;l=false}}else if(tokenIsKeywordOrIdentifier(this.state.type)){l=false;a=t?this.parseIdentifier():this.parseModuleExportName()}else{o=true;i=e}}else if(tokenIsKeywordOrIdentifier(this.state.type)){o=true;if(t){i=this.parseIdentifier(true);if(!this.isContextual(93)){this.checkReservedWord(i.name,i.loc.start,true,true)}}else{i=this.parseModuleExportName()}}if(o&&r){this.raise(t?Qe.TypeModifierIsUsedInTypeImports:Qe.TypeModifierIsUsedInTypeExports,{at:c})}e[n]=i;e[s]=a;const u=t?"importKind":"exportKind";e[u]=o?"type":"value";if(l&&this.eatContextual(93)){e[s]=t?this.parseIdentifier():this.parseModuleExportName()}if(!e[s]){e[s]=cloneIdentifier(e[n])}if(t){this.checkIdentifier(e[s],se)}}};function isPossiblyLiteralEnum(e){if(e.type!=="MemberExpression")return false;const{computed:t,property:r}=e;if(t&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)){return false}return isUncomputedMemberExpressionChain(e.object)}function isUncomputedMemberExpressionChain(e){if(e.type==="Identifier")return true;if(e.type!=="MemberExpression")return false;if(e.computed)return false;return isUncomputedMemberExpressionChain(e.object)}const Ze=ParseErrorEnum`placeholders`((e=>({ClassNameIsRequired:e("A class name is required."),UnexpectedSpace:e("Unexpected space in placeholder.")})));var placeholders=e=>class extends e{parsePlaceholder(e){if(this.match(140)){const t=this.startNode();this.next();this.assertNoSpace();t.name=super.parseIdentifier(true);this.assertNoSpace();this.expect(140);return this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){const r=!!(e.expectedNode&&e.type==="Placeholder");e.expectedNode=t;return r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){if(e===37&&this.input.charCodeAt(this.state.pos+1)===37){return this.finishOp(140,2)}return super.getTokenFromCode(...arguments)}parseExprAtom(){return this.parsePlaceholder("Expression")||super.parseExprAtom(...arguments)}parseIdentifier(){return this.parsePlaceholder("Identifier")||super.parseIdentifier(...arguments)}checkReservedWord(e){if(e!==undefined)super.checkReservedWord(...arguments)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom(...arguments)}isValidLVal(e,...t){return e==="Placeholder"||super.isValidLVal(e,...t)}toAssignable(e){if(e&&e.type==="Placeholder"&&e.expectedNode==="Expression"){e.expectedNode="Pattern"}else{super.toAssignable(...arguments)}}isLet(e){if(super.isLet(e)){return true}if(!this.isContextual(99)){return false}if(e)return false;const t=this.lookahead();if(t.type===140){return true}return false}verifyBreakContinue(e){if(e.label&&e.label.type==="Placeholder")return;super.verifyBreakContinue(...arguments)}parseExpressionStatement(e,t){if(t.type!=="Placeholder"||t.extra&&t.extra.parenthesized){return super.parseExpressionStatement(...arguments)}if(this.match(14)){const r=e;r.label=this.finishPlaceholder(t,"Identifier");this.next();r.body=this.parseStatement("label");return this.finishNode(r,"LabeledStatement")}this.semicolon();e.name=t.name;return this.finishPlaceholder(e,"Statement")}parseBlock(){return this.parsePlaceholder("BlockStatement")||super.parseBlock(...arguments)}parseFunctionId(){return this.parsePlaceholder("Identifier")||super.parseFunctionId(...arguments)}parseClass(e,t,r){const n=t?"ClassDeclaration":"ClassExpression";this.next();this.takeDecorators(e);const s=this.state.strict;const i=this.parsePlaceholder("Identifier");if(i){if(this.match(81)||this.match(140)||this.match(5)){e.id=i}else if(r||!t){e.id=null;e.body=this.finishPlaceholder(i,"ClassBody");return this.finishNode(e,n)}else{throw this.raise(Ze.ClassNameIsRequired,{at:this.state.startLoc})}}else{this.parseClassId(e,t,r)}this.parseClassSuper(e);e.body=this.parsePlaceholder("ClassBody")||this.parseClassBody(!!e.superClass,s);return this.finishNode(e,n)}parseExport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseExport(...arguments);if(!this.isContextual(97)&&!this.match(12)){e.specifiers=[];e.source=null;e.declaration=this.finishPlaceholder(t,"Declaration");return this.finishNode(e,"ExportNamedDeclaration")}this.expectPlugin("exportDefaultFrom");const r=this.startNode();r.exported=t;e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")];return super.parseExport(e)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")){if(this.input.startsWith(tokenLabelName(140),this.nextTokenStartSince(e+4))){return true}}}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e){if(e.specifiers&&e.specifiers.length>0){return true}return super.maybeParseExportDefaultSpecifier(...arguments)}checkExport(e){const{specifiers:t}=e;if(t!=null&&t.length){e.specifiers=t.filter((e=>e.exported.type==="Placeholder"))}super.checkExport(e);e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(...arguments);e.specifiers=[];if(!this.isContextual(97)&&!this.match(12)){e.source=this.finishPlaceholder(t,"StringLiteral");this.semicolon();return this.finishNode(e,"ImportDeclaration")}const r=this.startNodeAtNode(t);r.local=t;this.finishNode(r,"ImportDefaultSpecifier");e.specifiers.push(r);if(this.eat(12)){const t=this.maybeParseStarImportSpecifier(e);if(!t)this.parseNamedImportSpecifiers(e)}this.expectContextual(97);e.source=this.parseImportSource();this.semicolon();return this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource(...arguments)}assertNoSpace(){if(this.state.start>this.state.lastTokEndLoc.index){this.raise(Ze.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}};var v8intrinsic=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc;const t=this.startNode();this.next();if(tokenIsIdentifier(this.state.type)){const e=this.parseIdentifierName(this.state.start);const r=this.createIdentifier(t,e);r.type="V8IntrinsicIdentifier";if(this.match(10)){return r}}this.unexpected(e)}}parseExprAtom(){return this.parseV8Intrinsic()||super.parseExprAtom(...arguments)}};function hasPlugin(e,t){const[r,n]=typeof t==="string"?[t,{}]:t;const s=Object.keys(n);const i=s.length===0;return e.some((e=>{if(typeof e==="string"){return i&&e===r}else{const[t,i]=e;if(t!==r){return false}for(const e of s){if(i[e]!==n[e]){return false}}return true}}))}function getPluginOption(e,t,r){const n=e.find((e=>{if(Array.isArray(e)){return e[0]===t}else{return e===t}}));if(n&&Array.isArray(n)){return n[1][r]}return null}const et=["minimal","fsharp","hack","smart"];const tt=["^^","@@","^","%","#"];const rt=["hash","bar"];function validatePlugins(e){if(hasPlugin(e,"decorators")){if(hasPlugin(e,"decorators-legacy")){throw new Error("Cannot use the decorators and decorators-legacy plugin together")}const t=getPluginOption(e,"decorators","decoratorsBeforeExport");if(t==null){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'.")}else if(typeof t!=="boolean"){throw new Error("'decoratorsBeforeExport' must be a boolean.")}}if(hasPlugin(e,"flow")&&hasPlugin(e,"typescript")){throw new Error("Cannot combine flow and typescript plugins.")}if(hasPlugin(e,"placeholders")&&hasPlugin(e,"v8intrinsic")){throw new Error("Cannot combine placeholders and v8intrinsic plugins.")}if(hasPlugin(e,"pipelineOperator")){const t=getPluginOption(e,"pipelineOperator","proposal");if(!et.includes(t)){const e=et.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}const r=hasPlugin(e,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(hasPlugin(e,"placeholders")){throw new Error("Cannot combine placeholders plugin and Hack-style pipes.")}if(hasPlugin(e,"v8intrinsic")){throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.")}const t=getPluginOption(e,"pipelineOperator","topicToken");if(!tt.includes(t)){const e=tt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if(t==="#"&&r){throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}}else if(t==="smart"&&r){throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}}if(hasPlugin(e,"moduleAttributes")){{if(hasPlugin(e,"importAssertions")){throw new Error("Cannot combine importAssertions and moduleAttributes plugins.")}const t=getPluginOption(e,"moduleAttributes","version");if(t!=="may-2020"){throw new Error("The 'moduleAttributes' plugin requires a 'version' option,"+" representing the last proposal update. Currently, the"+" only supported value is 'may-2020'.")}}}if(hasPlugin(e,"recordAndTuple")&&!rt.includes(getPluginOption(e,"recordAndTuple","syntaxType"))){throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: "+rt.map((e=>`'${e}'`)).join(", "))}if(hasPlugin(e,"asyncDoExpressions")&&!hasPlugin(e,"doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");e.missingPlugins="doExpressions";throw e}}const nt={estree:estree,jsx:jsx,flow:flow,typescript:typescript,v8intrinsic:v8intrinsic,placeholders:placeholders};const st=Object.keys(nt);const it={sourceType:"script",sourceFilename:undefined,startColumn:0,startLine:1,allowAwaitOutsideFunction:false,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowSuperOutsideMethod:false,allowUndeclaredExports:false,plugins:[],strictMode:null,ranges:false,tokens:false,createParenthesizedExpressions:false,errorRecovery:false,attachComment:true};function getOptions(e){const t={};for(const r of Object.keys(it)){t[r]=e&&e[r]!=null?e[r]:it[r]}return t}const getOwn=(e,t)=>Object.hasOwnProperty.call(e,t)&&e[t];const unwrapParenthesizedExpression=e=>e.type==="ParenthesizedExpression"?unwrapParenthesizedExpression(e.expression):e;class LValParser extends NodeUtils{toAssignable(e,t=false){var r,n;let s=undefined;if(e.type==="ParenthesizedExpression"||(r=e.extra)!=null&&r.parenthesized){s=unwrapParenthesizedExpression(e);if(t){if(s.type==="Identifier"){this.expressionScope.recordArrowParemeterBindingError(a.InvalidParenthesizedAssignment,{at:e})}else if(s.type!=="MemberExpression"){this.raise(a.InvalidParenthesizedAssignment,{at:e})}}else{this.raise(a.InvalidParenthesizedAssignment,{at:e})}}switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,n=e.properties.length,s=n-1;re.type!=="ObjectMethod"&&(r===t||e.type!=="SpreadElement")&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>e===null||this.isAssignable(e)));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return false}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e){if((t==null?void 0:t.type)==="ArrayExpression"){this.toReferencedListDeep(t.elements)}}}parseSpread(e,t){const r=this.startNode();this.next();r.argument=this.parseMaybeAssignAllowIn(e,undefined,t);return this.finishNode(r,"SpreadElement")}parseRestBinding(){const e=this.startNode();this.next();e.argument=this.parseBindingAtom();return this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();this.next();e.elements=this.parseBindingList(3,93,true);return this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,true)}return this.parseIdentifier()}parseBindingList(e,t,r,n){const s=[];let i=true;while(!this.eat(e)){if(i){i=false}else{this.expect(12)}if(r&&this.match(12)){s.push(null)}else if(this.eat(e)){break}else if(this.match(21)){s.push(this.parseAssignableListItemTypes(this.parseRestBinding()));if(!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];if(this.match(26)&&this.hasPlugin("decorators")){this.raise(a.UnsupportedParameterDecorator,{at:this.state.startLoc})}while(this.match(26)){e.push(this.parseDecorator())}s.push(this.parseAssignableListItem(n,e))}}return s}parseBindingRestProperty(e){this.next();e.argument=this.parseIdentifier();this.checkCommaAfterRest(125);return this.finishNode(e,"RestElement")}parseBindingProperty(){const e=this.startNode();const{type:t,start:r,startLoc:n}=this.state;if(t===21){return this.parseBindingRestProperty(e)}else if(t===134){this.expectPlugin("destructuringPrivate",n);this.classScope.usePrivateName(this.state.value,n);e.key=this.parsePrivateName()}else{this.parsePropertyName(e)}e.method=false;this.parseObjPropValue(e,r,n,false,false,true,false);return e}parseAssignableListItem(e,t){const r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r);const n=this.parseMaybeDefault(r.start,r.loc.start,r);if(t.length){r.decorators=t}return n}parseAssignableListItemTypes(e){return e}parseMaybeDefault(e,t,r){var n,s,i;t=(n=t)!=null?n:this.state.startLoc;e=(s=e)!=null?s:this.state.start;r=(i=r)!=null?i:this.parseBindingAtom();if(!this.eat(29))return r;const a=this.startNodeAt(e,t);a.left=r;a.right=this.parseMaybeAssignAllowIn();return this.finishNode(a,"AssignmentPattern")}isValidLVal(e,t,r){return getOwn({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},e)}checkLVal(e,{in:t,binding:r=pe,checkClashes:n=false,strictModeChanged:s=false,allowingSloppyLetBinding:i=!(r&J),hasParenthesizedAncestor:o=false}){var l;const c=e.type;if(this.isObjectMethod(e))return;if(c==="MemberExpression"){if(r!==pe){this.raise(a.InvalidPropertyBindingPattern,{at:e})}return}if(e.type==="Identifier"){this.checkIdentifier(e,r,s,i);const{name:t}=e;if(n){if(n.has(t)){this.raise(a.ParamDupe,{at:e})}else{n.add(t)}}return}const u=this.isValidLVal(e.type,!(o||(l=e.extra)!=null&&l.parenthesized)&&t.type==="AssignmentExpression",r);if(u===true)return;if(u===false){const n=r===pe?a.InvalidLhs:a.InvalidLhsBinding;this.raise(n,{at:e,ancestor:t.type==="UpdateExpression"?{type:"UpdateExpression",prefix:t.prefix}:{type:t.type}});return}const[p,f]=Array.isArray(u)?u:[u,c==="ParenthesizedExpression"];const d=e.type==="ArrayPattern"||e.type==="ObjectPattern"||e.type==="ParenthesizedExpression"?e:t;for(const t of[].concat(e[p])){if(t){this.checkLVal(t,{in:d,binding:r,checkClashes:n,allowingSloppyLetBinding:i,strictModeChanged:s,hasParenthesizedAncestor:f})}}}checkIdentifier(e,t,r=false,n=!(t&J)){if(this.state.strict&&(r?isStrictBindReservedWord(e.name,this.inModule):isStrictBindOnlyReservedWord(e.name))){if(t===pe){this.raise(a.StrictEvalArguments,{at:e,referenceName:e.name})}else{this.raise(a.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})}}if(!n&&e.name==="let"){this.raise(a.LetInLexicalBinding,{at:e})}if(!(t&pe)){this.declareNameFromIdentifier(e,t)}}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(a.InvalidRestAssignmentPattern,{at:e})}}checkCommaAfterRest(e){if(!this.match(12)){return false}this.raise(this.lookaheadCharCode()===e?a.RestTrailingComma:a.ElementAfterRest,{at:this.state.startLoc});return true}}class ExpressionParser extends LValParser{checkProto(e,t,r,n){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand){return}const s=e.key;const i=s.type==="Identifier"?s.name:s.value;if(i==="__proto__"){if(t){this.raise(a.RecordNoProto,{at:s});return}if(r.used){if(n){if(n.doubleProtoLoc===null){n.doubleProtoLoc=s.loc.start}}else{this.raise(a.DuplicateProto,{at:s})}}r.used=true}}shouldExitDescending(e,t){return e.type==="ArrowFunctionExpression"&&e.start===t}getExpression(){this.enterInitialScopes();this.nextToken();const e=this.parseExpression();if(!this.match(135)){this.unexpected()}this.finalizeRemainingComments();e.comments=this.state.comments;e.errors=this.state.errors;if(this.options.tokens){e.tokens=this.tokens}return e}parseExpression(e,t){if(e){return this.disallowInAnd((()=>this.parseExpressionBase(t)))}return this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.start;const r=this.state.startLoc;const n=this.parseMaybeAssign(e);if(this.match(12)){const s=this.startNodeAt(t,r);s.expressions=[n];while(this.eat(12)){s.expressions.push(this.parseMaybeAssign(e))}this.toReferencedList(s.expressions);return this.finishNode(s,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var r;e.optionalParametersLoc=(r=t==null?void 0:t.loc)!=null?r:this.state.startLoc}parseMaybeAssign(e,t){const r=this.state.start;const n=this.state.startLoc;if(this.isContextual(105)){if(this.prodParam.hasYield){let e=this.parseYield();if(t){e=t.call(this,e,r,n)}return e}}let s;if(e){s=false}else{e=new ExpressionErrors;s=true}const{type:i}=this.state;if(i===10||tokenIsIdentifier(i)){this.state.potentialArrowAt=this.state.start}let a=this.parseMaybeConditional(e);if(t){a=t.call(this,a,r,n)}if(tokenIsAssignment(this.state.type)){const t=this.startNodeAt(r,n);const s=this.state.value;t.operator=s;if(this.match(29)){this.toAssignable(a,true);t.left=a;if(e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=r){e.doubleProtoLoc=null}if(e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=r){e.shorthandAssignLoc=null}if(e.privateKeyLoc!=null&&e.privateKeyLoc.index>=r){this.checkDestructuringPrivate(e);e.privateKeyLoc=null}}else{t.left=a}this.next();t.right=this.parseMaybeAssign();this.checkLVal(a,{in:this.finishNode(t,"AssignmentExpression")});return t}else if(s){this.checkExpressionErrors(e,true)}return a}parseMaybeConditional(e){const t=this.state.start;const r=this.state.startLoc;const n=this.state.potentialArrowAt;const s=this.parseExprOps(e);if(this.shouldExitDescending(s,n)){return s}return this.parseConditional(s,t,r,e)}parseConditional(e,t,r,n){if(this.eat(17)){const n=this.startNodeAt(t,r);n.test=e;n.consequent=this.parseMaybeAssignAllowIn();this.expect(14);n.alternate=this.parseMaybeAssign();return this.finishNode(n,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(134)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.start;const r=this.state.startLoc;const n=this.state.potentialArrowAt;const s=this.parseMaybeUnaryOrPrivate(e);if(this.shouldExitDescending(s,n)){return s}return this.parseExprOp(s,t,r,-1)}parseExprOp(e,t,r,n){if(this.isPrivateName(e)){const t=this.getPrivateNameSV(e);if(n>=tokenOperatorPrecedence(58)||!this.prodParam.hasIn||!this.match(58)){this.raise(a.PrivateInExpectedIn,{at:e,identifierName:t})}this.classScope.usePrivateName(t,e.loc.start)}const s=this.state.type;if(tokenIsOperator(s)&&(this.prodParam.hasIn||!this.match(58))){let i=tokenOperatorPrecedence(s);if(i>n){if(s===39){this.expectPlugin("pipelineOperator");if(this.state.inFSharpPipelineDirectBody){return e}this.checkPipelineAtInfixOperator(e,r)}const o=this.startNodeAt(t,r);o.left=e;o.operator=this.state.value;const l=s===41||s===42;const c=s===40;if(c){i=tokenOperatorPrecedence(42)}this.next();if(s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])){if(this.state.type===96&&this.prodParam.hasAwait){throw this.raise(a.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc})}}o.right=this.parseExprOpRightExpr(s,i);this.finishNode(o,l||c?"LogicalExpression":"BinaryExpression");const u=this.state.type;if(c&&(u===41||u===42)||l&&u===40){throw this.raise(a.MixingCoalesceWithLogical,{at:this.state.startLoc})}return this.parseExprOp(o,t,r,n)}}return e}parseExprOpRightExpr(e,t){const r=this.state.start;const n=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(105)){throw this.raise(a.PipeBodyIsTighter,{at:this.state.startLoc})}return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r,n)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){const r=this.state.start;const n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,n,tokenIsRightAssociative(e)?t-1:t)}parseHackPipeBody(){var e;const{startLoc:t}=this.state;const r=this.parseMaybeAssign();const n=s.has(r.type);if(n&&!((e=r.extra)!=null&&e.parenthesized)){this.raise(a.PipeUnparenthesizedBody,{at:t,type:r.type})}if(!this.topicReferenceWasUsedInCurrentContext()){this.raise(a.PipeTopicUnused,{at:t})}return r}checkExponentialAfterUnary(e){if(this.match(57)){this.raise(a.UnexpectedTokenUnaryExponentiation,{at:e.argument})}}parseMaybeUnary(e,t){const r=this.state.start;const n=this.state.startLoc;const s=this.isContextual(96);if(s&&this.isAwaitAllowed()){this.next();const e=this.parseAwait(r,n);if(!t)this.checkExponentialAfterUnary(e);return e}const i=this.match(34);const o=this.startNode();if(tokenIsPrefix(this.state.type)){o.operator=this.state.value;o.prefix=true;if(this.match(72)){this.expectPlugin("throwExpressions")}const r=this.match(89);this.next();o.argument=this.parseMaybeUnary(null,true);this.checkExpressionErrors(e,true);if(this.state.strict&&r){const e=o.argument;if(e.type==="Identifier"){this.raise(a.StrictDelete,{at:o})}else if(this.hasPropertyAsPrivateName(e)){this.raise(a.DeletePrivateField,{at:o})}}if(!i){if(!t)this.checkExponentialAfterUnary(o);return this.finishNode(o,"UnaryExpression")}}const l=this.parseUpdate(o,i,e);if(s){const{type:e}=this.state;const t=this.hasPlugin("v8intrinsic")?tokenCanStartExpression(e):tokenCanStartExpression(e)&&!this.match(54);if(t&&!this.isAmbiguousAwait()){this.raiseOverwrite(a.AwaitNotInAsyncContext,{at:n});return this.parseAwait(r,n)}}return l}parseUpdate(e,t,r){if(t){this.checkLVal(e.argument,{in:this.finishNode(e,"UpdateExpression")});return e}const n=this.state.start;const s=this.state.startLoc;let i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,false))return i;while(tokenIsPostfix(this.state.type)&&!this.canInsertSemicolon()){const e=this.startNodeAt(n,s);e.operator=this.state.value;e.prefix=false;e.argument=i;this.next();this.checkLVal(i,{in:i=this.finishNode(e,"UpdateExpression")})}return i}parseExprSubscripts(e){const t=this.state.start;const r=this.state.startLoc;const n=this.state.potentialArrowAt;const s=this.parseExprAtom(e);if(this.shouldExitDescending(s,n)){return s}return this.parseSubscripts(s,t,r)}parseSubscripts(e,t,r,n){const s={optionalChainMember:false,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:false};do{e=this.parseSubscript(e,t,r,n,s);s.maybeAsyncArrow=false}while(!s.stop);return e}parseSubscript(e,t,r,n,s){const{type:i}=this.state;if(!n&&i===15){return this.parseBind(e,t,r,n,s)}else if(tokenIsTemplate(i)){return this.parseTaggedTemplateExpression(e,t,r,s)}let a=false;if(i===18){if(n&&this.lookaheadCharCode()===40){s.stop=true;return e}s.optionalChainMember=a=true;this.next()}if(!n&&this.match(10)){return this.parseCoverCallAndAsyncArrowHead(e,t,r,s,a)}else{const n=this.eat(0);if(n||a||this.eat(16)){return this.parseMember(e,t,r,s,n,a)}else{s.stop=true;return e}}}parseMember(e,t,r,n,s,i){const o=this.startNodeAt(t,r);o.object=e;o.computed=s;if(s){o.property=this.parseExpression();this.expect(3)}else if(this.match(134)){if(e.type==="Super"){this.raise(a.SuperPrivateField,{at:r})}this.classScope.usePrivateName(this.state.value,this.state.startLoc);o.property=this.parsePrivateName()}else{o.property=this.parseIdentifier(true)}if(n.optionalChainMember){o.optional=i;return this.finishNode(o,"OptionalMemberExpression")}else{return this.finishNode(o,"MemberExpression")}}parseBind(e,t,r,n,s){const i=this.startNodeAt(t,r);i.object=e;this.next();i.callee=this.parseNoCallExpr();s.stop=true;return this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}parseCoverCallAndAsyncArrowHead(e,t,r,n,s){const i=this.state.maybeInArrowParameters;let a=null;this.state.maybeInArrowParameters=true;this.next();let o=this.startNodeAt(t,r);o.callee=e;const{maybeAsyncArrow:l,optionalChainMember:c}=n;if(l){this.expressionScope.enter(newAsyncArrowScope());a=new ExpressionErrors}if(c){o.optional=s}if(s){o.arguments=this.parseCallExpressionArguments(11)}else{o.arguments=this.parseCallExpressionArguments(11,e.type==="Import",e.type!=="Super",o,a)}this.finishCallExpression(o,c);if(l&&this.shouldParseAsyncArrow()&&!s){n.stop=true;this.checkDestructuringPrivate(a);this.expressionScope.validateAsPattern();this.expressionScope.exit();o=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),o)}else{if(l){this.checkExpressionErrors(a,true);this.expressionScope.exit()}this.toReferencedArguments(o)}this.state.maybeInArrowParameters=i;return o}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r,n){const s=this.startNodeAt(t,r);s.tag=e;s.quasi=this.parseTemplate(true);if(n.optionalChainMember){this.raise(a.OptionalChainingNoTemplate,{at:r})}return this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import"){if(e.arguments.length===2){{if(!this.hasPlugin("moduleAttributes")){this.expectPlugin("importAssertions")}}}if(e.arguments.length===0||e.arguments.length>2){this.raise(a.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1})}else{for(const t of e.arguments){if(t.type==="SpreadElement"){this.raise(a.ImportCallSpreadArgument,{at:t})}}}}return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,n,s){const i=[];let o=true;const l=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=false;while(!this.eat(e)){if(o){o=false}else{this.expect(12);if(this.match(e)){if(t&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")){this.raise(a.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc})}if(n){this.addTrailingCommaExtraToNode(n)}this.next();break}}i.push(this.parseExprListItem(false,s,r))}this.state.inFSharpPipelineDirectBody=l;return i}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;this.resetPreviousNodeTrailingComments(t);this.expect(19);this.parseArrowExpression(e,t.arguments,true,(r=t.extra)==null?void 0:r.trailingCommaLoc);if(t.innerComments){setInnerComments(e,t.innerComments)}if(t.callee.trailingComments){setInnerComments(e,t.callee.trailingComments)}return e}parseNoCallExpr(){const e=this.state.start;const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,true)}parseExprAtom(e){let t;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:t=this.startNode();this.next();if(this.match(16)){return this.parseImportMetaProperty(t)}if(!this.match(10)){this.raise(a.UnsupportedImport,{at:this.state.lastTokStartLoc})}return this.finishNode(t,"Import");case 78:t=this.startNode();this.next();return this.finishNode(t,"ThisExpression");case 90:{return this.parseDo(this.startNode(),false)}case 56:case 31:{this.readRegexp();return this.parseRegExpLiteral(this.state.value)}case 130:return this.parseNumericLiteral(this.state.value);case 131:return this.parseBigIntLiteral(this.state.value);case 132:return this.parseDecimalLiteral(this.state.value);case 129:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(true);case 86:return this.parseBooleanLiteral(false);case 10:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 2:case 1:{return this.parseArrayLike(this.state.type===2?4:3,false,true)}case 0:{return this.parseArrayLike(3,true,false,e)}case 6:case 7:{return this.parseObjectLike(this.state.type===6?9:8,false,true)}case 5:{return this.parseObjectLike(8,false,false,e)}case 68:return this.parseFunctionOrFunctionSent();case 26:this.parseDecorators();case 80:t=this.startNode();this.takeDecorators(t);return this.parseClass(t,false);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(false);case 15:{t=this.startNode();this.next();t.object=null;const e=t.callee=this.parseNoCallExpr();if(e.type==="MemberExpression"){return this.finishNode(t,"BindExpression")}else{throw this.raise(a.UnsupportedBind,{at:e})}}case 134:{this.raise(a.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value});return this.parsePrivateName()}case 33:{return this.parseTopicReferenceThenEqualsSign(54,"%")}case 32:{return this.parseTopicReferenceThenEqualsSign(44,"^")}case 37:case 38:{return this.parseTopicReference("hack")}case 44:case 54:case 27:{const e=this.getPluginOption("pipelineOperator","proposal");if(e){return this.parseTopicReference(e)}else{throw this.unexpected()}}case 47:{const e=this.input.codePointAt(this.nextTokenStart());if(isIdentifierStart(e)||e===62){this.expectOnePlugin(["jsx","flow","typescript"]);break}else{throw this.unexpected()}}default:if(tokenIsIdentifier(r)){if(this.isContextual(123)&&this.lookaheadCharCode()===123&&!this.hasFollowingLineBreak()){return this.parseModuleExpression()}const e=this.state.potentialArrowAt===this.state.start;const t=this.state.containsEsc;const r=this.parseIdentifier();if(!t&&r.name==="async"&&!this.canInsertSemicolon()){const{type:e}=this.state;if(e===68){this.resetPreviousNodeTrailingComments(r);this.next();return this.parseFunction(this.startNodeAtNode(r),undefined,true)}else if(tokenIsIdentifier(e)){if(this.lookaheadCharCode()===61){return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r))}else{return r}}else if(e===90){this.resetPreviousNodeTrailingComments(r);return this.parseDo(this.startNodeAtNode(r),true)}}if(e&&this.match(19)&&!this.canInsertSemicolon()){this.next();return this.parseArrowExpression(this.startNodeAtNode(r),[r],false)}return r}else{throw this.unexpected()}}}parseTopicReferenceThenEqualsSign(e,t){const r=this.getPluginOption("pipelineOperator","proposal");if(r){this.state.type=e;this.state.value=t;this.state.pos--;this.state.end--;this.state.endLoc=createPositionWithColumnOffset(this.state.endLoc,-1);return this.parseTopicReference(r)}else{throw this.unexpected()}}parseTopicReference(e){const t=this.startNode();const r=this.state.startLoc;const n=this.state.type;this.next();return this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n)){const n=r==="smart"?"PipelinePrimaryTopicReference":"TopicReference";if(!this.topicReferenceIsAllowedInCurrentContext()){this.raise(r==="smart"?a.PrimaryTopicNotAllowed:a.PipeTopicUnbound,{at:t})}this.registerTopicReference();return this.finishNode(e,n)}else{throw this.raise(a.PipeTopicUnconfiguredToken,{at:t,token:tokenLabelName(n)})}}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":{return this.hasPlugin(["pipelineOperator",{topicToken:tokenLabelName(r)}])}case"smart":return r===27;default:throw this.raise(a.PipeTopicRequiresHackPipes,{at:t})}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(functionFlags(true,this.prodParam.hasYield));const t=[this.parseIdentifier()];this.prodParam.exit();if(this.hasPrecedingLineBreak()){this.raise(a.LineTerminatorBeforeArrow,{at:this.state.curPosition()})}this.expect(19);this.parseArrowExpression(e,t,true);return e}parseDo(e,t){this.expectPlugin("doExpressions");if(t){this.expectPlugin("asyncDoExpressions")}e.async=t;this.next();const r=this.state.labels;this.state.labels=[];if(t){this.prodParam.enter($e);e.body=this.parseBlock();this.prodParam.exit()}else{e.body=this.parseBlock()}this.state.labels=r;return this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();this.next();if(this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod){this.raise(a.SuperNotAllowed,{at:e})}else if(!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod){this.raise(a.UnexpectedSuper,{at:e})}if(!this.match(10)&&!this.match(0)&&!this.match(16)){this.raise(a.UnsupportedSuper,{at:e})}return this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode();const t=this.startNodeAt(this.state.start+1,new Position(this.state.curLine,this.state.start+1-this.state.lineStart,this.state.start+1));const r=this.state.value;this.next();e.id=this.createIdentifier(t,r);return this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();this.next();if(this.prodParam.hasYield&&this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");this.next();if(this.match(102)){this.expectPlugin("functionSent")}else if(!this.hasPlugin("functionSent")){this.unexpected()}return this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;const n=this.state.containsEsc;e.property=this.parseIdentifier(true);if(e.property.name!==r||n){this.raise(a.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:r})}return this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),"import");this.next();if(this.isContextual(100)){if(!this.inModule){this.raise(a.ImportMetaOutsideModule,{at:t})}this.sawUnambiguousESM=true}return this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,r){this.addExtra(r,"rawValue",e);this.addExtra(r,"raw",this.input.slice(r.start,this.state.end));r.value=e;this.next();return this.finishNode(r,t)}parseLiteral(e,t){const r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const t=this.parseLiteral(e.value,"RegExpLiteral");t.pattern=e.pattern;t.flags=e.flags;return t}parseBooleanLiteral(e){const t=this.startNode();t.value=e;this.next();return this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();this.next();return this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.start;const r=this.state.startLoc;let n;this.next();this.expressionScope.enter(newArrowHeadScope());const s=this.state.maybeInArrowParameters;const i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=true;this.state.inFSharpPipelineDirectBody=false;const a=this.state.start;const o=this.state.startLoc;const l=[];const c=new ExpressionErrors;let u=true;let p;let f;while(!this.match(11)){if(u){u=false}else{this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc);if(this.match(11)){f=this.state.startLoc;break}}if(this.match(21)){const e=this.state.start;const t=this.state.startLoc;p=this.state.startLoc;l.push(this.parseParenItem(this.parseRestBinding(),e,t));if(!this.checkCommaAfterRest(41)){break}}else{l.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}}const d=this.state.lastTokEndLoc;this.expect(11);this.state.maybeInArrowParameters=s;this.state.inFSharpPipelineDirectBody=i;let h=this.startNodeAt(t,r);if(e&&this.shouldParseArrow(l)&&(h=this.parseArrow(h))){this.checkDestructuringPrivate(c);this.expressionScope.validateAsPattern();this.expressionScope.exit();this.parseArrowExpression(h,l,false);return h}this.expressionScope.exit();if(!l.length){this.unexpected(this.state.lastTokStartLoc)}if(f)this.unexpected(f);if(p)this.unexpected(p);this.checkExpressionErrors(c,true);this.toReferencedListDeep(l,true);if(l.length>1){n=this.startNodeAt(a,o);n.expressions=l;this.finishNode(n,"SequenceExpression");this.resetEndLocation(n,d)}else{n=l[0]}return this.wrapParenthesis(t,r,n)}wrapParenthesis(e,t,r){if(!this.options.createParenthesizedExpressions){this.addExtra(r,"parenthesized",true);this.addExtra(r,"parenStart",e);this.takeSurroundingComments(r,e,this.state.lastTokEndLoc.index);return r}const n=this.startNodeAt(e,t);n.expression=r;this.finishNode(n,"ParenthesizedExpression");return n}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19)){return e}}parseParenItem(e,t,r){return e}parseNewOrNewTarget(){const e=this.startNode();this.next();if(this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const r=this.parseMetaProperty(e,t,"target");if(!this.scope.inNonArrowFunction&&!this.scope.inClass){this.raise(a.UnexpectedNewTarget,{at:r})}return r}return this.parseNew(e)}parseNew(e){this.parseNewCallee(e);if(this.eat(10)){const t=this.parseExprList(11);this.toReferencedList(t);e.arguments=t}else{e.arguments=[]}return this.finishNode(e,"NewExpression")}parseNewCallee(e){e.callee=this.parseNoCallExpr();if(e.callee.type==="Import"){this.raise(a.ImportCallNotNewExpression,{at:e.callee})}else if(this.isOptionalChain(e.callee)){this.raise(a.OptionalChainingNoNew,{at:this.state.lastTokEndLoc})}else if(this.eat(18)){this.raise(a.OptionalChainingNoNew,{at:this.state.startLoc})}}parseTemplateElement(e){const{start:t,startLoc:r,end:n,value:s}=this.state;const i=t+1;const o=this.startNodeAt(i,createPositionWithColumnOffset(r,1));if(s===null){if(!e){this.raise(a.InvalidEscapeSequenceTemplate,{at:createPositionWithColumnOffset(r,2)})}}const l=this.match(24);const c=l?-1:-2;const u=n+c;o.value={raw:this.input.slice(i,u).replace(/\r\n?/g,"\n"),cooked:s===null?null:s.slice(1,c)};o.tail=l;this.next();this.finishNode(o,"TemplateElement");this.resetEndLocation(o,createPositionWithColumnOffset(this.state.lastTokEndLoc,c));return o}parseTemplate(e){const t=this.startNode();t.expressions=[];let r=this.parseTemplateElement(e);t.quasis=[r];while(!r.tail){t.expressions.push(this.parseTemplateSubstitution());this.readTemplateContinuation();t.quasis.push(r=this.parseTemplateElement(e))}return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){if(r){this.expectPlugin("recordAndTuple")}const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=false;const i=Object.create(null);let o=true;const l=this.startNode();l.properties=[];this.next();while(!this.match(e)){if(o){o=false}else{this.expect(12);if(this.match(e)){this.addTrailingCommaExtraToNode(l);break}}let s;if(t){s=this.parseBindingProperty()}else{s=this.parsePropertyDefinition(n);this.checkProto(s,r,i,n)}if(r&&!this.isObjectProperty(s)&&s.type!=="SpreadElement"){this.raise(a.InvalidRecordProperty,{at:s})}if(s.shorthand){this.addExtra(s,"shorthand",true)}l.properties.push(s)}this.next();this.state.inFSharpPipelineDirectBody=s;let c="ObjectExpression";if(t){c="ObjectPattern"}else if(r){c="RecordExpression"}return this.finishNode(l,c)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStart);this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,false)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26)){if(this.hasPlugin("decorators")){this.raise(a.UnsupportedPropertyDecorator,{at:this.state.startLoc})}while(this.match(26)){t.push(this.parseDecorator())}}const r=this.startNode();let n=false;let s=false;let i;let o;if(this.match(21)){if(t.length)this.unexpected();return this.parseSpread()}if(t.length){r.decorators=t;t=[]}r.method=false;if(e){i=this.state.start;o=this.state.startLoc}let l=this.eat(55);this.parsePropertyNamePrefixOperator(r);const c=this.state.containsEsc;const u=this.parsePropertyName(r,e);if(!l&&!c&&this.maybeAsyncOrAccessorProp(r)){const e=u.name;if(e==="async"&&!this.hasPrecedingLineBreak()){n=true;this.resetPreviousNodeTrailingComments(u);l=this.eat(55);this.parsePropertyName(r)}if(e==="get"||e==="set"){s=true;this.resetPreviousNodeTrailingComments(u);r.kind=e;if(this.match(55)){l=true;this.raise(a.AccessorIsGenerator,{at:this.state.curPosition(),kind:e});this.next()}this.parsePropertyName(r)}}this.parseObjPropValue(r,i,o,l,n,false,s,e);return r}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const r=this.getGetterSetterExpectedParamCount(e);const n=this.getObjectOrClassMethodParams(e);if(n.length!==r){this.raise(e.kind==="get"?a.BadGetterArity:a.BadSetterArity,{at:e})}if(e.kind==="set"&&((t=n[n.length-1])==null?void 0:t.type)==="RestElement"){this.raise(a.BadSetterRestParameter,{at:e})}}parseObjectMethod(e,t,r,n,s){if(s){this.parseMethod(e,t,false,false,false,"ObjectMethod");this.checkGetterSetterParams(e);return e}if(r||t||this.match(10)){if(n)this.unexpected();e.kind="method";e.method=true;return this.parseMethod(e,t,r,false,false,"ObjectMethod")}}parseObjectProperty(e,t,r,n,s){e.shorthand=false;if(this.eat(14)){e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(s);return this.finishNode(e,"ObjectProperty")}if(!e.computed&&e.key.type==="Identifier"){this.checkReservedWord(e.key.name,e.key.loc.start,true,false);if(n){e.value=this.parseMaybeDefault(t,r,cloneIdentifier(e.key))}else if(this.match(29)){const n=this.state.startLoc;if(s!=null){if(s.shorthandAssignLoc===null){s.shorthandAssignLoc=n}}else{this.raise(a.InvalidCoverInitializedName,{at:n})}e.value=this.parseMaybeDefault(t,r,cloneIdentifier(e.key))}else{e.value=cloneIdentifier(e.key)}e.shorthand=true;return this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,r,n,s,i,a,o){const l=this.parseObjectMethod(e,n,s,i,a)||this.parseObjectProperty(e,t,r,i,o);if(!l)this.unexpected();return l}parsePropertyName(e,t){if(this.eat(0)){e.computed=true;e.key=this.parseMaybeAssignAllowIn();this.expect(3)}else{const{type:r,value:n}=this.state;let s;if(tokenIsKeywordOrIdentifier(r)){s=this.parseIdentifier(true)}else{switch(r){case 130:s=this.parseNumericLiteral(n);break;case 129:s=this.parseStringLiteral(n);break;case 131:s=this.parseBigIntLiteral(n);break;case 132:s=this.parseDecimalLiteral(n);break;case 134:{const e=this.state.startLoc;if(t!=null){if(t.privateKeyLoc===null){t.privateKeyLoc=e}}else{this.raise(a.UnexpectedPrivateField,{at:e})}s=this.parsePrivateName();break}default:throw this.unexpected()}}e.key=s;if(r!==134){e.computed=false}}return e.key}initFunction(e,t){e.id=null;e.generator=false;e.async=!!t}parseMethod(e,t,r,n,s,i,a=false){this.initFunction(e,r);e.generator=!!t;const o=n;this.scope.enter(F|U|(a?$:0)|(s?K:0));this.prodParam.enter(functionFlags(r,e.generator));this.parseFunctionParams(e,o);this.parseFunctionBodyAndFinish(e,i,true);this.prodParam.exit();this.scope.exit();return e}parseArrayLike(e,t,r,n){if(r){this.expectPlugin("recordAndTuple")}const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=false;const i=this.startNode();this.next();i.elements=this.parseExprList(e,!r,n,i);this.state.inFSharpPipelineDirectBody=s;return this.finishNode(i,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(F|R);let s=functionFlags(r,false);if(!this.match(5)&&this.prodParam.hasIn){s|=We}this.prodParam.enter(s);this.initFunction(e,r);const i=this.state.maybeInArrowParameters;if(t){this.state.maybeInArrowParameters=true;this.setArrowFunctionParameters(e,t,n)}this.state.maybeInArrowParameters=false;this.parseFunctionBody(e,true);this.prodParam.exit();this.scope.exit();this.state.maybeInArrowParameters=i;return this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,false);e.params=t}parseFunctionBodyAndFinish(e,t,r=false){this.parseFunctionBody(e,false,r);this.finishNode(e,t)}parseFunctionBody(e,t,r=false){const n=t&&!this.match(5);this.expressionScope.enter(newExpressionScope());if(n){e.body=this.parseMaybeAssign();this.checkParams(e,false,t,false)}else{const n=this.state.strict;const s=this.state.labels;this.state.labels=[];this.prodParam.enter(this.prodParam.currentFlags()|Ve);e.body=this.parseBlock(true,false,(s=>{const i=!this.isSimpleParamList(e.params);if(s&&i){this.raise(a.IllegalLanguageModeDirective,{at:(e.kind==="method"||e.kind==="constructor")&&!!e.key?e.key.loc.end:e})}const o=!n&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!r&&!i,t,o);if(this.state.strict&&e.id){this.checkIdentifier(e.id,fe,o)}}));this.prodParam.exit();this.state.labels=s}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,r=e.length;t10){return}if(!canBeReservedWord(e)){return}if(e==="yield"){if(this.prodParam.hasYield){this.raise(a.YieldBindingIdentifier,{at:t});return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(a.AwaitBindingIdentifier,{at:t});return}if(this.scope.inStaticBlock){this.raise(a.AwaitBindingIdentifierInStaticBlock,{at:t});return}this.expressionScope.recordAsyncArrowParametersError({at:t})}else if(e==="arguments"){if(this.scope.inClassAndNotInNonArrowFunction){this.raise(a.ArgumentsInClass,{at:t});return}}if(r&&isKeyword(e)){this.raise(a.UnexpectedKeyword,{at:t,keyword:e});return}const s=!this.state.strict?isReservedWord:n?isStrictBindReservedWord:isStrictReservedWord;if(s(e,this.inModule)){this.raise(a.UnexpectedReservedWord,{at:t,reservedWord:e})}}isAwaitAllowed(){if(this.prodParam.hasAwait)return true;if(this.options.allowAwaitOutsideFunction&&!this.scope.inFunction){return true}return false}parseAwait(e,t){const r=this.startNodeAt(e,t);this.expressionScope.recordParameterInitializerError(a.AwaitExpressionFormalParameter,{at:r});if(this.eat(55)){this.raise(a.ObsoleteAwaitStar,{at:r})}if(!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction){if(this.isAmbiguousAwait()){this.ambiguousScriptDifferentAst=true}else{this.sawUnambiguousESM=true}}if(!this.state.soloAwait){r.argument=this.parseMaybeUnary(null,true)}return this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return true;const{type:e}=this.state;return e===53||e===10||e===0||tokenIsTemplate(e)||e===133||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(){const e=this.startNode();this.expressionScope.recordParameterInitializerError(a.YieldInParameter,{at:e});this.next();let t=false;let r=null;if(!this.hasPrecedingLineBreak()){t=this.eat(55);switch(this.state.type){case 13:case 135:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:r=this.parseMaybeAssign()}}e.delegate=t;e.argument=r;return this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){if(e.type==="SequenceExpression"){this.raise(a.PipelineHeadSequenceExpression,{at:t})}}}parseSmartPipelineBodyInStyle(e,t,r){const n=this.startNodeAt(t,r);if(this.isSimpleReference(e)){n.callee=e;return this.finishNode(n,"PipelineBareFunction")}else{this.checkSmartPipeTopicBodyEarlyErrors(r);n.expression=e;return this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return true;default:return false}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19)){throw this.raise(a.PipelineBodyNoArrow,{at:this.state.startLoc})}if(!this.topicReferenceWasUsedInCurrentContext()){this.raise(a.PipelineTopicUnused,{at:e})}}withTopicBindingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}else{return e()}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=true;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();const r=We&~t;if(r){this.prodParam.enter(t|We);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();const r=We&t;if(r){this.prodParam.enter(t&~We);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.start;const r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=true;const s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,r,e);this.state.inFSharpPipelineDirectBody=n;return s}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next();this.eat(5);const t=this.initializeScopes(true);this.enterInitialScopes();const r=this.startNode();try{e.body=this.parseProgram(r,8,"module")}finally{t()}this.eat(8);return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}}const at={kind:"loop"},ot={kind:"switch"};const lt=0,ct=1,ut=2,pt=4;const ft=/[\uD800-\uDFFF]/u;const dt=/in(?:stanceof)?/y;function babel7CompatTokens(e,t){for(let r=0;r0){for(const[e,t]of Array.from(this.scope.undefinedExports)){this.raise(a.ModuleExportUndefined,{at:t,localName:e})}}return this.finishNode(e,"Program")}stmtToDirective(e){const t=e;t.type="Directive";t.value=t.expression;delete t.expression;const r=t.value;const n=r.value;const s=this.input.slice(r.start,r.end);const i=r.value=s.slice(1,-1);this.addExtra(r,"raw",s);this.addExtra(r,"rawValue",i);this.addExtra(r,"expressionValue",n);r.type="DirectiveLiteral";return t}parseInterpreterDirective(){if(!this.match(28)){return null}const e=this.startNode();e.value=this.state.value;this.next();return this.finishNode(e,"InterpreterDirective")}isLet(e){if(!this.isContextual(99)){return false}return this.isLetKeyword(e)}isLetKeyword(e){const t=this.nextTokenStart();const r=this.codePointAtPos(t);if(r===92||r===91){return true}if(e)return false;if(r===123)return true;if(isIdentifierStart(r)){dt.lastIndex=t;if(dt.test(this.input)){const e=this.codePointAtPos(dt.lastIndex);if(!isIdentifierChar(e)&&e!==92){return false}}return true}return false}parseStatement(e,t){if(this.match(26)){this.parseDecorators(true)}return this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type;const n=this.startNode();let s;if(this.isLet(e)){r=74;s="let"}switch(r){case 60:return this.parseBreakContinueStatement(n,true);case 63:return this.parseBreakContinueStatement(n,false);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoStatement(n);case 91:return this.parseForStatement(n);case 68:if(this.lookaheadCharCode()===46)break;if(e){if(this.state.strict){this.raise(a.StrictFunction,{at:this.state.startLoc})}else if(e!=="if"&&e!=="label"){this.raise(a.SloppyFunction,{at:this.state.startLoc})}}return this.parseFunctionStatement(n,false,!e);case 80:if(e)this.unexpected();return this.parseClass(n,true);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 75:case 74:s=s||this.state.value;if(e&&s!=="var"){this.raise(a.UnexpectedLexicalDeclaration,{at:this.state.startLoc})}return this.parseVarStatement(n,s);case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{const e=this.lookaheadCharCode();if(e===40||e===46){break}}case 82:{if(!this.options.allowImportExportEverywhere&&!t){this.raise(a.UnexpectedImportExport,{at:this.state.startLoc})}this.next();let e;if(r===83){e=this.parseImport(n);if(e.type==="ImportDeclaration"&&(!e.importKind||e.importKind==="value")){this.sawUnambiguousESM=true}}else{e=this.parseExport(n);if(e.type==="ExportNamedDeclaration"&&(!e.exportKind||e.exportKind==="value")||e.type==="ExportAllDeclaration"&&(!e.exportKind||e.exportKind==="value")||e.type==="ExportDefaultDeclaration"){this.sawUnambiguousESM=true}}this.assertModuleNodeAllowed(n);return e}default:{if(this.isAsyncFunction()){if(e){this.raise(a.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc})}this.next();return this.parseFunctionStatement(n,true,!e)}}}const i=this.state.value;const o=this.parseExpression();if(tokenIsIdentifier(r)&&o.type==="Identifier"&&this.eat(14)){return this.parseLabeledStatement(n,i,o,e)}else{return this.parseExpressionStatement(n,o)}}assertModuleNodeAllowed(e){if(!this.options.allowImportExportEverywhere&&!this.inModule){this.raise(a.ImportOutsideModule,{at:e})}}takeDecorators(e){const t=this.state.decoratorStack[this.state.decoratorStack.length-1];if(t.length){e.decorators=t;this.resetStartLocationFromNode(e,t[0]);this.state.decoratorStack[this.state.decoratorStack.length-1]=[]}}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const t=this.state.decoratorStack[this.state.decoratorStack.length-1];while(this.match(26)){const e=this.parseDecorator();t.push(e)}if(this.match(82)){if(!e){this.unexpected()}if(this.hasPlugin("decorators")&&!this.getPluginOption("decorators","decoratorsBeforeExport")){this.raise(a.DecoratorExportClass,{at:this.state.startLoc})}}else if(!this.canHaveLeadingDecorator()){throw this.raise(a.UnexpectedLeadingDecorator,{at:this.state.startLoc})}}parseDecorator(){this.expectOnePlugin(["decorators-legacy","decorators"]);const e=this.startNode();this.next();if(this.hasPlugin("decorators")){this.state.decoratorStack.push([]);const t=this.state.start;const r=this.state.startLoc;let n;if(this.match(10)){const e=this.state.start;const t=this.state.startLoc;this.next();n=this.parseExpression();this.expect(11);n=this.wrapParenthesis(e,t,n)}else{n=this.parseIdentifier(false);while(this.eat(16)){const e=this.startNodeAt(t,r);e.object=n;e.property=this.parseIdentifier(true);e.computed=false;n=this.finishNode(e,"MemberExpression")}}e.expression=this.parseMaybeDecoratorArguments(n);this.state.decoratorStack.pop()}else{e.expression=this.parseExprSubscripts()}return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){const t=this.startNodeAtNode(e);t.callee=e;t.arguments=this.parseCallExpressionArguments(11,false);this.toReferencedList(t.arguments);return this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){this.next();if(this.isLineTerminator()){e.label=null}else{e.label=this.parseIdentifier();this.semicolon()}this.verifyBreakContinue(e,t);return this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;rthis.parseStatement("do")));this.state.labels.pop();this.expect(92);e.test=this.parseHeaderExpression();this.eat(13);return this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next();this.state.labels.push(at);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)){t=this.state.lastTokStartLoc}this.scope.enter(L);this.expect(10);if(this.match(13)){if(t!==null){this.unexpected(t)}return this.parseFor(e,null)}const r=this.isContextual(99);const n=r&&this.isLetKeyword();if(this.match(74)||this.match(75)||n){const r=this.startNode();const s=n?"let":this.state.value;this.next();this.parseVar(r,true,s);this.finishNode(r,"VariableDeclaration");if((this.match(58)||this.isContextual(101))&&r.declarations.length===1){return this.parseForIn(e,r,t)}if(t!==null){this.unexpected(t)}return this.parseFor(e,r)}const s=this.isContextual(95);const i=new ExpressionErrors;const o=this.parseExpression(true,i);const l=this.isContextual(101);if(l){if(r){this.raise(a.ForOfLet,{at:o})}if(t===null&&s&&o.type==="Identifier"){this.raise(a.ForOfAsync,{at:o})}}if(l||this.match(58)){this.checkDestructuringPrivate(i);this.toAssignable(o,true);const r=l?"ForOfStatement":"ForInStatement";this.checkLVal(o,{in:{type:r}});return this.parseForIn(e,o,t)}else{this.checkExpressionErrors(i,true)}if(t!==null){this.unexpected(t)}return this.parseFor(e,o)}parseFunctionStatement(e,t,r){this.next();return this.parseFunction(e,ct|(r?0:ut),t)}parseIfStatement(e){this.next();e.test=this.parseHeaderExpression();e.consequent=this.parseStatement("if");e.alternate=this.eat(66)?this.parseStatement("if"):null;return this.finishNode(e,"IfStatement")}parseReturnStatement(e){if(!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction){this.raise(a.IllegalReturn,{at:this.state.startLoc})}this.next();if(this.isLineTerminator()){e.argument=null}else{e.argument=this.parseExpression();this.semicolon()}return this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next();e.discriminant=this.parseHeaderExpression();const t=e.cases=[];this.expect(5);this.state.labels.push(ot);this.scope.enter(L);let r;for(let e;!this.match(8);){if(this.match(61)||this.match(65)){const n=this.match(61);if(r)this.finishNode(r,"SwitchCase");t.push(r=this.startNode());r.consequent=[];this.next();if(n){r.test=this.parseExpression()}else{if(e){this.raise(a.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc})}e=true;r.test=null}this.expect(14)}else{if(r){r.consequent.push(this.parseStatement(null))}else{this.unexpected()}}}this.scope.exit();if(r)this.finishNode(r,"SwitchCase");this.next();this.state.labels.pop();return this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){this.next();if(this.hasPrecedingLineBreak()){this.raise(a.NewlineAfterThrow,{at:this.state.lastTokEndLoc})}e.argument=this.parseExpression();this.semicolon();return this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();const t=e.type==="Identifier";this.scope.enter(t?B:0);this.checkLVal(e,{in:{type:"CatchClause"},binding:se,allowingSloppyLetBinding:true});return e}parseTryStatement(e){this.next();e.block=this.parseBlock();e.handler=null;if(this.match(62)){const t=this.startNode();this.next();if(this.match(10)){this.expect(10);t.param=this.parseCatchClauseParam();this.expect(11)}else{t.param=null;this.scope.enter(L)}t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(false,false)));this.scope.exit();e.handler=this.finishNode(t,"CatchClause")}e.finalizer=this.eat(67)?this.parseBlock():null;if(!e.handler&&!e.finalizer){this.raise(a.NoCatchOrFinally,{at:e})}return this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=false){this.next();this.parseVar(e,false,t,r);this.semicolon();return this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){this.next();e.test=this.parseHeaderExpression();this.state.labels.push(at);e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("while")));this.state.labels.pop();return this.finishNode(e,"WhileStatement")}parseWithStatement(e){if(this.state.strict){this.raise(a.StrictWith,{at:this.state.startLoc})}this.next();e.object=this.parseHeaderExpression();e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("with")));return this.finishNode(e,"WithStatement")}parseEmptyStatement(e){this.next();return this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(const e of this.state.labels){if(e.name===t){this.raise(a.LabelRedeclaration,{at:r,labelName:t})}}const s=tokenIsLoop(this.state.type)?"loop":this.match(71)?"switch":null;for(let t=this.state.labels.length-1;t>=0;t--){const r=this.state.labels[t];if(r.statementStart===e.start){r.statementStart=this.state.start;r.kind=s}else{break}}this.state.labels.push({name:t,kind:s,statementStart:this.state.start});e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label");this.state.labels.pop();e.label=r;return this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t){e.expression=t;this.semicolon();return this.finishNode(e,"ExpressionStatement")}parseBlock(e=false,t=true,r){const n=this.startNode();if(e){this.state.strictErrors.clear()}this.expect(5);if(t){this.scope.enter(L)}this.parseBlockBody(n,e,false,8,r);if(t){this.scope.exit()}return this.finishNode(n,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,s){const i=e.body=[];const a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:undefined,r,n,s)}parseBlockOrModuleBlockBody(e,t,r,n,s){const i=this.state.strict;let a=false;let o=false;while(!this.match(n)){const n=this.parseStatement(null,r);if(t&&!o){if(this.isValidDirective(n)){const e=this.stmtToDirective(n);t.push(e);if(!a&&e.value.value==="use strict"){a=true;this.setStrict(true)}continue}o=true;this.state.strictErrors.clear()}e.push(n)}if(s){s.call(this,a)}if(!i){this.setStrict(false)}this.next()}parseFor(e,t){e.init=t;this.semicolon(false);e.test=this.match(13)?null:this.parseExpression();this.semicolon(false);e.update=this.match(11)?null:this.parseExpression();this.expect(11);e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("for")));this.scope.exit();this.state.labels.pop();return this.finishNode(e,"ForStatement")}parseForIn(e,t,r){const n=this.match(58);this.next();if(n){if(r!==null)this.unexpected(r)}else{e.await=r!==null}if(t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")){this.raise(a.ForInOfLoopInitializer,{at:t,type:n?"ForInStatement":"ForOfStatement"})}if(t.type==="AssignmentPattern"){this.raise(a.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}})}e.left=t;e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn();this.expect(11);e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement("for")));this.scope.exit();this.state.labels.pop();return this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=false){const s=e.declarations=[];e.kind=r;for(;;){const e=this.startNode();this.parseVarId(e,r);e.init=!this.eat(29)?null:t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn();if(e.init===null&&!n){if(e.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(101)))){this.raise(a.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})}else if(r==="const"&&!(this.match(58)||this.isContextual(101))){this.raise(a.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})}}s.push(this.finishNode(e,"VariableDeclarator"));if(!this.eat(12))break}return e}parseVarId(e,t){e.id=this.parseBindingAtom();this.checkLVal(e.id,{in:{type:"VariableDeclarator"},binding:t==="var"?ie:se})}parseFunction(e,t=lt,r=false){const n=t&ct;const s=t&ut;const i=!!n&&!(t&pt);this.initFunction(e,r);if(this.match(55)&&s){this.raise(a.GeneratorInSingleStatementContext,{at:this.state.startLoc})}e.generator=this.eat(55);if(n){e.id=this.parseFunctionId(i)}const o=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=false;this.scope.enter(F);this.prodParam.enter(functionFlags(r,e.generator));if(!n){e.id=this.parseFunctionId()}this.parseFunctionParams(e,false);this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")}));this.prodParam.exit();this.scope.exit();if(n&&!s){this.registerFunctionStatementId(e)}this.state.maybeInArrowParameters=o;return e}parseFunctionId(e){return e||tokenIsIdentifier(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10);this.expressionScope.enter(newParameterDeclarationScope());e.params=this.parseBindingList(11,41,false,t);this.expressionScope.exit()}registerFunctionStatementId(e){if(!e.id)return;this.scope.declareName(e.id.name,this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?ie:se:ae,e.id.loc.start)}parseClass(e,t,r){this.next();this.takeDecorators(e);const n=this.state.strict;this.state.strict=true;this.parseClassId(e,t,r);this.parseClassSuper(e);e.body=this.parseClassBody(!!e.superClass,n);return this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(e){return!e.computed&&!e.static&&(e.key.name==="constructor"||e.key.value==="constructor")}parseClassBody(e,t){this.classScope.enter();const r={hadConstructor:false,hadSuperClass:e};let n=[];const s=this.startNode();s.body=[];this.expect(5);this.withSmartMixTopicForbiddingContext((()=>{while(!this.match(8)){if(this.eat(13)){if(n.length>0){throw this.raise(a.DecoratorSemicolon,{at:this.state.lastTokEndLoc})}continue}if(this.match(26)){n.push(this.parseDecorator());continue}const e=this.startNode();if(n.length){e.decorators=n;this.resetStartLocationFromNode(e,n[0]);n=[]}this.parseClassMember(s,e,r);if(e.kind==="constructor"&&e.decorators&&e.decorators.length>0){this.raise(a.DecoratorConstructor,{at:e})}}}));this.state.strict=t;this.next();if(n.length){throw this.raise(a.TrailingDecorator,{at:this.state.startLoc})}this.classScope.exit();return this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(e,t){const r=this.parseIdentifier(true);if(this.isClassMethod()){const n=t;n.kind="method";n.computed=false;n.key=r;n.static=false;this.pushClassMethod(e,n,false,false,false,false);return true}else if(this.isClassProperty()){const n=t;n.computed=false;n.key=r;n.static=false;e.body.push(this.parseClassProperty(n));return true}this.resetPreviousNodeTrailingComments(r);return false}parseClassMember(e,t,r){const n=this.isContextual(104);if(n){if(this.parseClassMemberFromModifier(e,t)){return}if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){const s=t;const i=t;const o=t;const l=t;const c=t;const u=s;const p=s;t.static=n;this.parsePropertyNamePrefixOperator(t);if(this.eat(55)){u.kind="method";const t=this.match(134);this.parseClassElementName(u);if(t){this.pushClassPrivateMethod(e,i,true,false);return}if(this.isNonstaticConstructor(s)){this.raise(a.ConstructorIsGenerator,{at:s.key})}this.pushClassMethod(e,s,true,false,false,false);return}const f=tokenIsIdentifier(this.state.type)&&!this.state.containsEsc;const d=this.match(134);const h=this.parseClassElementName(t);const m=this.state.startLoc;this.parsePostMemberNameModifiers(p);if(this.isClassMethod()){u.kind="method";if(d){this.pushClassPrivateMethod(e,i,false,false);return}const n=this.isNonstaticConstructor(s);let o=false;if(n){s.kind="constructor";if(r.hadConstructor&&!this.hasPlugin("typescript")){this.raise(a.DuplicateConstructor,{at:h})}if(n&&this.hasPlugin("typescript")&&t.override){this.raise(a.OverrideOnConstructor,{at:h})}r.hadConstructor=true;o=r.hadSuperClass}this.pushClassMethod(e,s,false,false,n,o)}else if(this.isClassProperty()){if(d){this.pushClassPrivateProperty(e,l)}else{this.pushClassProperty(e,o)}}else if(f&&h.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);const t=this.eat(55);if(p.optional){this.unexpected(m)}u.kind="method";const r=this.match(134);this.parseClassElementName(u);this.parsePostMemberNameModifiers(p);if(r){this.pushClassPrivateMethod(e,i,t,true)}else{if(this.isNonstaticConstructor(s)){this.raise(a.ConstructorIsAsync,{at:s.key})}this.pushClassMethod(e,s,t,true,false,false)}}else if(f&&(h.name==="get"||h.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(h);u.kind=h.name;const t=this.match(134);this.parseClassElementName(s);if(t){this.pushClassPrivateMethod(e,i,false,false)}else{if(this.isNonstaticConstructor(s)){this.raise(a.ConstructorIsAccessor,{at:s.key})}this.pushClassMethod(e,s,false,false,false,false)}this.checkGetterSetterParams(s)}else if(f&&h.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors");this.resetPreviousNodeTrailingComments(h);const t=this.match(134);this.parseClassElementName(o);this.pushClassAccessorProperty(e,c,t)}else if(this.isLineTerminator()){if(d){this.pushClassPrivateProperty(e,l)}else{this.pushClassProperty(e,o)}}else{this.unexpected()}}parseClassElementName(e){const{type:t,value:r}=this.state;if((t===128||t===129)&&e.static&&r==="prototype"){this.raise(a.StaticPrototype,{at:this.state.startLoc})}if(t===134){if(r==="constructor"){this.raise(a.ConstructorClassPrivateField,{at:this.state.startLoc})}const t=this.parsePrivateName();e.key=t;return t}return this.parsePropertyName(e)}parseClassStaticBlock(e,t){var r;this.scope.enter($|V|U);const n=this.state.labels;this.state.labels=[];this.prodParam.enter(Ue);const s=t.body=[];this.parseBlockOrModuleBlockBody(s,undefined,false,8);this.prodParam.exit();this.scope.exit();this.state.labels=n;e.body.push(this.finishNode(t,"StaticBlock"));if((r=t.decorators)!=null&&r.length){this.raise(a.DecoratorStaticBlock,{at:t})}}pushClassProperty(e,t){if(!t.computed&&(t.key.name==="constructor"||t.key.value==="constructor")){this.raise(a.ConstructorClassField,{at:t.key})}e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const r=this.parseClassPrivateProperty(t);e.body.push(r);this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),ve,r.key.loc.start)}pushClassAccessorProperty(e,t,r){if(!r&&!t.computed){const e=t.key;if(e.name==="constructor"||e.value==="constructor"){this.raise(a.ConstructorClassField,{at:e})}}const n=this.parseClassAccessorProperty(t);e.body.push(n);if(r){this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),ve,n.key.loc.start)}}pushClassMethod(e,t,r,n,s,i){e.body.push(this.parseMethod(t,r,n,s,i,"ClassMethod",true))}pushClassPrivateMethod(e,t,r,n){const s=this.parseMethod(t,r,n,false,false,"ClassPrivateMethod",true);e.body.push(s);const i=s.kind==="get"?s.static?Se:xe:s.kind==="set"?s.static?Ee:Pe:ve;this.declareClassPrivateMethodInScope(s,i)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){this.parseInitializer(e);this.semicolon();return this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){this.parseInitializer(e);this.semicolon();return this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){this.parseInitializer(e);this.semicolon();return this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter($|U);this.expressionScope.enter(newExpressionScope());this.prodParam.enter(Ue);e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null;this.expressionScope.exit();this.prodParam.exit();this.scope.exit()}parseClassId(e,t,r,n=ne){if(tokenIsIdentifier(this.state.type)){e.id=this.parseIdentifier();if(t){this.declareNameFromIdentifier(e.id,n)}}else{if(r||!t){e.id=null}else{throw this.raise(a.MissingClassName,{at:this.state.startLoc})}}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e){const t=this.maybeParseExportDefaultSpecifier(e);const r=!t||this.eat(12);const n=r&&this.eatExportStar(e);const s=n&&this.maybeParseExportNamespaceSpecifier(e);const i=r&&(!s||this.eat(12));const a=t||n;if(n&&!s){if(t)this.unexpected();this.parseExportFrom(e,true);return this.finishNode(e,"ExportAllDeclaration")}const o=this.maybeParseExportNamedSpecifiers(e);if(t&&r&&!n&&!o||s&&i&&!o){throw this.unexpected(null,5)}let l;if(a||o){l=false;this.parseExportFrom(e,a)}else{l=this.maybeParseExportDeclaration(e)}if(a||o||l){this.checkExport(e,true,false,!!e.source);return this.finishNode(e,"ExportNamedDeclaration")}if(this.eat(65)){e.declaration=this.parseExportDefaultExpression();this.checkExport(e,true,true);return this.finishNode(e,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const t=this.startNode();t.exported=this.parseIdentifier(true);e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")];return true}return false}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){if(!e.specifiers)e.specifiers=[];const t=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);this.next();t.exported=this.parseModuleExportName();e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier"));return true}return false}maybeParseExportNamedSpecifiers(e){if(this.match(5)){if(!e.specifiers)e.specifiers=[];const t=e.exportKind==="type";e.specifiers.push(...this.parseExportSpecifiers(t));e.source=null;e.declaration=null;if(this.hasPlugin("importAssertions")){e.assertions=[]}return true}return false}maybeParseExportDeclaration(e){if(this.shouldParseExportDeclaration()){e.specifiers=[];e.source=null;if(this.hasPlugin("importAssertions")){e.assertions=[]}e.declaration=this.parseExportDeclaration(e);return true}return false}isAsyncFunction(){if(!this.isContextual(95))return false;const e=this.nextTokenStart();return!Ae.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();const t=this.isAsyncFunction();if(this.match(68)||t){this.next();if(t){this.next()}return this.parseFunction(e,ct|pt,t)}if(this.match(80)){return this.parseClass(e,true,true)}if(this.match(26)){if(this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")){this.raise(a.DecoratorBeforeExport,{at:this.state.startLoc})}this.parseDecorators(false);return this.parseClass(e,true,true)}if(this.match(75)||this.match(74)||this.isLet()){throw this.raise(a.UnsupportedDefaultExport,{at:this.state.startLoc})}const r=this.parseMaybeAssignAllowIn();this.semicolon();return r}parseExportDeclaration(e){return this.parseStatement(null)}isExportDefaultSpecifier(){const{type:e}=this.state;if(tokenIsIdentifier(e)){if(e===95&&!this.state.containsEsc||e===99){return false}if((e===126||e===125)&&!this.state.containsEsc){const{type:e}=this.lookahead();if(tokenIsIdentifier(e)&&e!==97||e===5){this.expectOnePlugin(["flow","typescript"]);return false}}}else if(!this.match(65)){return false}const t=this.nextTokenStart();const r=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||tokenIsIdentifier(this.state.type)&&r){return true}if(this.match(65)&&r){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return e===34||e===39}return false}parseExportFrom(e,t){if(this.eatContextual(97)){e.source=this.parseImportSource();this.checkExport(e);const t=this.maybeParseImportAssertions();if(t){e.assertions=t}}else if(t){this.unexpected()}this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;if(e===26){this.expectOnePlugin(["decorators","decorators-legacy"]);if(this.hasPlugin("decorators")){if(this.getPluginOption("decorators","decoratorsBeforeExport")){throw this.raise(a.DecoratorBeforeExport,{at:this.state.startLoc})}return true}}return e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){if(t){if(r){this.checkDuplicateExports(e,"default");if(this.hasPlugin("exportDefaultFrom")){var s;const t=e.declaration;if(t.type==="Identifier"&&t.name==="from"&&t.end-t.start===4&&!((s=t.extra)!=null&&s.parenthesized)){this.raise(a.ExportDefaultFromAsIdentifier,{at:t})}}}else if(e.specifiers&&e.specifiers.length){for(const t of e.specifiers){const{exported:e}=t;const r=e.type==="Identifier"?e.name:e.value;this.checkDuplicateExports(t,r);if(!n&&t.local){const{local:e}=t;if(e.type!=="Identifier"){this.raise(a.ExportBindingIsString,{at:t,localName:e.value,exportName:r})}else{this.checkReservedWord(e.name,e.loc.start,true,false);this.scope.checkLocalExport(e)}}}}else if(e.declaration){if(e.declaration.type==="FunctionDeclaration"||e.declaration.type==="ClassDeclaration"){const t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if(e.declaration.type==="VariableDeclaration"){for(const t of e.declaration.declarations){this.checkDeclaration(t.id)}}}}const i=this.state.decoratorStack[this.state.decoratorStack.length-1];if(i.length){throw this.raise(a.UnsupportedDecoratorExport,{at:e})}}checkDeclaration(e){if(e.type==="Identifier"){this.checkDuplicateExports(e,e.name)}else if(e.type==="ObjectPattern"){for(const t of e.properties){this.checkDeclaration(t)}}else if(e.type==="ArrayPattern"){for(const t of e.elements){if(t){this.checkDeclaration(t)}}}else if(e.type==="ObjectProperty"){this.checkDeclaration(e.value)}else if(e.type==="RestElement"){this.checkDeclaration(e.argument)}else if(e.type==="AssignmentPattern"){this.checkDeclaration(e.left)}}checkDuplicateExports(e,t){if(this.exportedIdentifiers.has(t)){if(t==="default"){this.raise(a.DuplicateDefaultExport,{at:e})}else{this.raise(a.DuplicateExport,{at:e,exportName:t})}}this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let r=true;this.expect(5);while(!this.eat(8)){if(r){r=false}else{this.expect(12);if(this.eat(8))break}const n=this.isContextual(126);const s=this.match(129);const i=this.startNode();i.local=this.parseModuleExportName();t.push(this.parseExportSpecifier(i,s,e,n))}return t}parseExportSpecifier(e,t,r,n){if(this.eatContextual(93)){e.exported=this.parseModuleExportName()}else if(t){e.exported=cloneStringLiteral(e.local)}else if(!e.exported){e.exported=cloneIdentifier(e.local)}return this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(129)){const e=this.parseStringLiteral(this.state.value);const t=e.value.match(ft);if(t){this.raise(a.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)})}return e}return this.parseIdentifier(true)}parseImport(e){e.specifiers=[];if(!this.match(129)){const t=this.maybeParseDefaultImportSpecifier(e);const r=!t||this.eat(12);const n=r&&this.maybeParseStarImportSpecifier(e);if(r&&!n)this.parseNamedImportSpecifiers(e);this.expectContextual(97)}e.source=this.parseImportSource();const t=this.maybeParseImportAssertions();if(t){e.assertions=t}else{const t=this.maybeParseModuleAttributes();if(t){e.attributes=t}}this.semicolon();return this.finishNode(e,"ImportDeclaration")}parseImportSource(){if(!this.match(129))this.unexpected();return this.parseExprAtom()}shouldParseDefaultImport(e){return tokenIsIdentifier(this.state.type)}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier();e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t){this.checkLVal(e.local,{in:e,binding:se});return this.finishNode(e,t)}parseAssertEntries(){const e=[];const t=new Set;do{if(this.match(8)){break}const r=this.startNode();const n=this.state.value;if(t.has(n)){this.raise(a.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:n})}t.add(n);if(this.match(129)){r.key=this.parseStringLiteral(n)}else{r.key=this.parseIdentifier(true)}this.expect(14);if(!this.match(129)){throw this.raise(a.ModuleAttributeInvalidValue,{at:this.state.startLoc})}r.value=this.parseStringLiteral(this.state.value);this.finishNode(r,"ImportAttribute");e.push(r)}while(this.eat(12));return e}maybeParseModuleAttributes(){if(this.match(76)&&!this.hasPrecedingLineBreak()){this.expectPlugin("moduleAttributes");this.next()}else{if(this.hasPlugin("moduleAttributes"))return[];return null}const e=[];const t=new Set;do{const r=this.startNode();r.key=this.parseIdentifier(true);if(r.key.name!=="type"){this.raise(a.ModuleAttributeDifferentFromType,{at:r.key})}if(t.has(r.key.name)){this.raise(a.ModuleAttributesWithDuplicateKeys,{at:r.key,key:r.key.name})}t.add(r.key.name);this.expect(14);if(!this.match(129)){throw this.raise(a.ModuleAttributeInvalidValue,{at:this.state.startLoc})}r.value=this.parseStringLiteral(this.state.value);this.finishNode(r,"ImportAttribute");e.push(r)}while(this.eat(12));return e}maybeParseImportAssertions(){if(this.isContextual(94)&&!this.hasPrecedingLineBreak()){this.expectPlugin("importAssertions");this.next()}else{if(this.hasPlugin("importAssertions"))return[];return null}this.eat(5);const e=this.parseAssertEntries();this.eat(8);return e}maybeParseDefaultImportSpecifier(e){if(this.shouldParseDefaultImport(e)){this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier");return true}return false}maybeParseStarImportSpecifier(e){if(this.match(55)){const t=this.startNode();this.next();this.expectContextual(93);this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier");return true}return false}parseNamedImportSpecifiers(e){let t=true;this.expect(5);while(!this.eat(8)){if(t){t=false}else{if(this.eat(14)){throw this.raise(a.DestructureNamedImport,{at:this.state.startLoc})}this.expect(12);if(this.eat(8))break}const r=this.startNode();const n=this.match(129);const s=this.isContextual(126);r.imported=this.parseModuleExportName();const i=this.parseImportSpecifier(r,n,e.importKind==="type"||e.importKind==="typeof",s);e.specifiers.push(i)}}parseImportSpecifier(e,t,r,n){if(this.eatContextual(93)){e.local=this.parseIdentifier()}else{const{imported:r}=e;if(t){throw this.raise(a.ImportBindingIsString,{at:e,importName:r.value})}this.checkReservedWord(r.name,e.loc.start,true,true);if(!e.local){e.local=cloneIdentifier(r)}}return this.finishImportSpecifier(e,"ImportSpecifier")}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}}class Parser extends StatementParser{constructor(e,t){e=getOptions(e);super(e,t);this.options=e;this.initializeScopes();this.plugins=pluginsMap(this.options.plugins);this.filename=e.sourceFilename}getScopeHandler(){return ScopeHandler}parse(){this.enterInitialScopes();const e=this.startNode();const t=this.startNode();this.nextToken();e.errors=null;this.parseTopLevel(e,t);e.errors=this.state.errors;return e}}function pluginsMap(e){const t=new Map;for(const r of e){const[e,n]=Array.isArray(r)?r:[r,{}];if(!t.has(e))t.set(e,n||{})}return t}function parse(e,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";const r=getParser(t,e);const n=r.parse();if(r.sawUnambiguousESM){return n}if(r.ambiguousScriptDifferentAst){try{t.sourceType="script";return getParser(t,e).parse()}catch(e){}}else{n.program.sourceType="script"}return n}catch(r){try{t.sourceType="script";return getParser(t,e).parse()}catch(e){}throw r}}else{return getParser(t,e).parse()}}function parseExpression(e,t){const r=getParser(t,e);if(r.options.strictMode){r.state.strict=true}return r.getExpression()}function generateExportedTokenTypes(e){const t={};for(const r of Object.keys(e)){t[r]=getExportedToken(e[r])}return t}const ht=generateExportedTokenTypes(P);function getParser(e,t){let r=Parser;if(e!=null&&e.plugins){validatePlugins(e.plugins);r=getParserClass(e.plugins)}return new r(e,t)}const mt={};function getParserClass(e){const t=st.filter((t=>hasPlugin(e,t)));const r=t.join("/");let n=mt[r];if(!n){n=Parser;for(const e of t){n=nt[e](n)}mt[r]=n}return n}t.parse=parse;t.parseExpression=parseExpression;t.tokTypes=ht},6071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=createTemplateBuilder;var n=r(3008);var s=r(7062);var i=r(8436);const a=(0,n.validate)({placeholderPattern:false});function createTemplateBuilder(e,t){const r=new WeakMap;const o=new WeakMap;const l=t||(0,n.validate)(null);return Object.assign(((t,...a)=>{if(typeof t==="string"){if(a.length>1)throw new Error("Unexpected extra params.");return extendedTrace((0,s.default)(e,t,(0,n.merge)(l,(0,n.validate)(a[0]))))}else if(Array.isArray(t)){let n=r.get(t);if(!n){n=(0,i.default)(e,t,l);r.set(t,n)}return extendedTrace(n(a))}else if(typeof t==="object"&&t){if(a.length>0)throw new Error("Unexpected extra params.");return createTemplateBuilder(e,(0,n.merge)(l,(0,n.validate)(t)))}throw new Error(`Unexpected template param ${typeof t}`)}),{ast:(t,...r)=>{if(typeof t==="string"){if(r.length>1)throw new Error("Unexpected extra params.");return(0,s.default)(e,t,(0,n.merge)((0,n.merge)(l,(0,n.validate)(r[0])),a))()}else if(Array.isArray(t)){let s=o.get(t);if(!s){s=(0,i.default)(e,t,(0,n.merge)(l,a));o.set(t,s)}return s(r)()}throw new Error(`Unexpected template param ${typeof t}`)}})}function extendedTrace(e){let t="";try{throw new Error}catch(e){if(e.stack){t=e.stack.split("\n").slice(3).join("\n")}}return r=>{try{return e(r)}catch(e){e.stack+=`\n =============\n${t}`;throw e}}}},1204:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.statements=t.statement=t.smart=t.program=t.expression=void 0;var n=r(6953);const{assertExpressionStatement:s}=n;function makeStatementFormatter(e){return{code:e=>`/* @babel/template */;\n${e}`,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}const i=makeStatementFormatter((e=>{if(e.length>1){return e}else{return e[0]}}));t.smart=i;const a=makeStatementFormatter((e=>e));t.statements=a;const o=makeStatementFormatter((e=>{if(e.length===0){throw new Error("Found nothing to return.")}if(e.length>1){throw new Error("Found multiple statements but wanted one")}return e[0]}));t.statement=o;const l={code:e=>`(\n${e}\n)`,validate:e=>{if(e.program.body.length>1){throw new Error("Found multiple statements but wanted one")}if(l.unwrap(e).start===0){throw new Error("Parse result included parens.")}},unwrap:({program:e})=>{const[t]=e.body;s(t);return t.expression}};t.expression=l;const c={code:e=>e,validate:()=>{},unwrap:e=>e.program};t.program=c},5292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.statements=t.statement=t.smart=t.program=t.expression=t["default"]=void 0;var n=r(1204);var s=r(6071);const i=(0,s.default)(n.smart);t.smart=i;const a=(0,s.default)(n.statement);t.statement=a;const o=(0,s.default)(n.statements);t.statements=o;const l=(0,s.default)(n.expression);t.expression=l;const c=(0,s.default)(n.program);t.program=c;var u=Object.assign(i.bind(undefined),{smart:i,statement:a,statements:o,expression:l,program:c,ast:i.ast});t["default"]=u},8436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=literalTemplate;var n=r(3008);var s=r(5095);var i=r(1519);function literalTemplate(e,t,r){const{metadata:s,names:a}=buildLiteralData(e,t,r);return t=>{const r={};t.forEach(((e,t)=>{r[a[t]]=e}));return t=>{const a=(0,n.normalizeReplacements)(t);if(a){Object.keys(a).forEach((e=>{if(Object.prototype.hasOwnProperty.call(r,e)){throw new Error("Unexpected replacement overlap.")}}))}return e.unwrap((0,i.default)(s,a?Object.assign(a,r):r))}}}function buildLiteralData(e,t,r){let n;let i;let a;let o="";do{o+="$";const l=buildTemplateCode(t,o);n=l.names;i=new Set(n);a=(0,s.default)(e,e.code(l.code),{parser:r.parser,placeholderWhitelist:new Set(l.names.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders})}while(a.placeholders.some((e=>e.isDuplicate&&i.has(e.name))));return{metadata:a,names:n}}function buildTemplateCode(e,t){const r=[];let n=e[0];for(let s=1;s{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.merge=merge;t.normalizeReplacements=normalizeReplacements;t.validate=validate;const r=["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"];function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var s,i;for(i=0;i=0)continue;r[s]=e[s]}return r}function merge(e,t){const{placeholderWhitelist:r=e.placeholderWhitelist,placeholderPattern:n=e.placeholderPattern,preserveComments:s=e.preserveComments,syntacticPlaceholders:i=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:r,placeholderPattern:n,preserveComments:s,syntacticPlaceholders:i}}function validate(e){if(e!=null&&typeof e!=="object"){throw new Error("Unknown template options.")}const t=e||{},{placeholderWhitelist:n,placeholderPattern:s,preserveComments:i,syntacticPlaceholders:a}=t,o=_objectWithoutPropertiesLoose(t,r);if(n!=null&&!(n instanceof Set)){throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined")}if(s!=null&&!(s instanceof RegExp)&&s!==false){throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined")}if(i!=null&&typeof i!=="boolean"){throw new Error("'.preserveComments' must be a boolean, null, or undefined")}if(a!=null&&typeof a!=="boolean"){throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined")}if(a===true&&(n!=null||s!=null)){throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible"+" with '.syntacticPlaceholders: true'")}return{parser:o,placeholderWhitelist:n||undefined,placeholderPattern:s==null?undefined:s,preserveComments:i==null?undefined:i,syntacticPlaceholders:a==null?undefined:a}}function normalizeReplacements(e){if(Array.isArray(e)){return e.reduce(((e,t,r)=>{e["$"+r]=t;return e}),{})}else if(typeof e==="object"||e==null){return e||undefined}throw new Error("Template replacements must be an array, object, null, or undefined")}},5095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=parseAndBuildMetadata;var n=r(6953);var s=r(9113);var i=r(1811);const{isCallExpression:a,isExpressionStatement:o,isFunction:l,isIdentifier:c,isJSXIdentifier:u,isNewExpression:p,isPlaceholder:f,isStatement:d,isStringLiteral:h,removePropertiesDeep:m,traverse:y}=n;const g=/^[_$A-Z0-9]+$/;function parseAndBuildMetadata(e,t,r){const{placeholderWhitelist:n,placeholderPattern:s,preserveComments:i,syntacticPlaceholders:a}=r;const o=parseWithCodeFrame(t,r.parser,a);m(o,{preserveComments:i});e.validate(o);const l={placeholders:[],placeholderNames:new Set};const c={placeholders:[],placeholderNames:new Set};const u={value:undefined};y(o,placeholderVisitorHandler,{syntactic:l,legacy:c,isLegacyRef:u,placeholderWhitelist:n,placeholderPattern:s,syntacticPlaceholders:a});return Object.assign({ast:o},u.value?c:l)}function placeholderVisitorHandler(e,t,r){var n;let s;if(f(e)){if(r.syntacticPlaceholders===false){throw new Error("%%foo%%-style placeholders can't be used when "+"'.syntacticPlaceholders' is false.")}else{s=e.name.name;r.isLegacyRef.value=false}}else if(r.isLegacyRef.value===false||r.syntacticPlaceholders){return}else if(c(e)||u(e)){s=e.name;r.isLegacyRef.value=true}else if(h(e)){s=e.value;r.isLegacyRef.value=true}else{return}if(!r.isLegacyRef.value&&(r.placeholderPattern!=null||r.placeholderWhitelist!=null)){throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible"+" with '.syntacticPlaceholders: true'")}if(r.isLegacyRef.value&&(r.placeholderPattern===false||!(r.placeholderPattern||g).test(s))&&!((n=r.placeholderWhitelist)!=null&&n.has(s))){return}t=t.slice();const{node:i,key:m}=t[t.length-1];let y;if(h(e)||f(e,{expectedNode:"StringLiteral"})){y="string"}else if(p(i)&&m==="arguments"||a(i)&&m==="arguments"||l(i)&&m==="params"){y="param"}else if(o(i)&&!f(e)){y="statement";t=t.slice(0,-1)}else if(d(e)&&f(e)){y="statement"}else{y="other"}const{placeholders:b,placeholderNames:T}=r.isLegacyRef.value?r.legacy:r.syntactic;b.push({name:s,type:y,resolve:e=>resolveAncestors(e,t),isDuplicate:T.has(s)});T.add(s)}function resolveAncestors(e,t){let r=e;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=populatePlaceholders;var n=r(6953);const{blockStatement:s,cloneNode:i,emptyStatement:a,expressionStatement:o,identifier:l,isStatement:c,isStringLiteral:u,stringLiteral:p,validate:f}=n;function populatePlaceholders(e,t){const r=i(e.ast);if(t){e.placeholders.forEach((e=>{if(!Object.prototype.hasOwnProperty.call(t,e.name)){const t=e.name;throw new Error(`Error: No substitution given for "${t}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${t}'])}\n - { placeholderPattern: /^${t}$/ }`)}}));Object.keys(t).forEach((t=>{if(!e.placeholderNames.has(t)){throw new Error(`Unknown substitution "${t}" given`)}}))}e.placeholders.slice().reverse().forEach((e=>{try{applyReplacement(e,r,t&&t[e.name]||null)}catch(t){t.message=`@babel/template placeholder "${e.name}": ${t.message}`;throw t}}));return r}function applyReplacement(e,t,r){if(e.isDuplicate){if(Array.isArray(r)){r=r.map((e=>i(e)))}else if(typeof r==="object"){r=i(r)}}const{parent:n,key:d,index:h}=e.resolve(t);if(e.type==="string"){if(typeof r==="string"){r=p(r)}if(!r||!u(r)){throw new Error("Expected string substitution")}}else if(e.type==="statement"){if(h===undefined){if(!r){r=a()}else if(Array.isArray(r)){r=s(r)}else if(typeof r==="string"){r=o(l(r))}else if(!c(r)){r=o(r)}}else{if(r&&!Array.isArray(r)){if(typeof r==="string"){r=l(r)}if(!c(r)){r=o(r)}}}}else if(e.type==="param"){if(typeof r==="string"){r=l(r)}if(h===undefined)throw new Error("Assertion failure.")}else{if(typeof r==="string"){r=l(r)}if(Array.isArray(r)){throw new Error("Cannot replace single expression with an array.")}}if(h===undefined){f(n,d,r);n[d]=r}else{const t=n[d].slice();if(e.type==="statement"||e.type==="param"){if(r==null){t.splice(h,1)}else if(Array.isArray(r)){t.splice(h,1,...r)}else{t[h]=r}}else{t[h]=r}f(n,d,t);n[d]=t}}},7062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=stringTemplate;var n=r(3008);var s=r(5095);var i=r(1519);function stringTemplate(e,t,r){t=e.code(t);let a;return o=>{const l=(0,n.normalizeReplacements)(o);if(!a)a=(0,s.default)(e,t,r);return e.unwrap((0,i.default)(a,l))}}},5762:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.clear=clear;t.clearPath=clearPath;t.clearScope=clearScope;t.scope=t.path=void 0;let r=new WeakMap;t.path=r;let n=new WeakMap;t.scope=n;function clear(){clearPath();clearScope()}function clearPath(){t.path=r=new WeakMap}function clearScope(){t.scope=n=new WeakMap}},9876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(3311);var s=r(6953);const{VISITOR_KEYS:i}=s;class TraversalContext{constructor(e,t,r,n){this.queue=null;this.priorityQueue=null;this.parentPath=n;this.scope=e;this.state=r;this.opts=t}shouldVisit(e){const t=this.opts;if(t.enter||t.exit)return true;if(t[e.type])return true;const r=i[e.type];if(!(r!=null&&r.length))return false;for(const t of r){if(e[t])return true}return false}create(e,t,r,s){return n.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:s})}maybeQueue(e,t){if(this.queue){if(t){this.queue.push(e)}else{this.priorityQueue.push(e)}}}visitMultiple(e,t,r){if(e.length===0)return false;const n=[];for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;class Hub{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(e,t,r=TypeError){return new r(t)}}t["default"]=Hub},7734:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"Hub",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"NodePath",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"Scope",{enumerable:true,get:function(){return l.default}});t.visitors=t["default"]=void 0;var n=r(1788);t.visitors=n;var s=r(6953);var i=r(5762);var a=r(2084);var o=r(3311);var l=r(2593);var c=r(2858);const{VISITOR_KEYS:u,removeProperties:p,traverseFast:f}=s;function traverse(e,t={},r,s,i){if(!e)return;if(!t.noScope&&!r){if(e.type!=="Program"&&e.type!=="File"){throw new Error("You must pass a scope and parentPath unless traversing a Program/File. "+`Instead of that you tried to traverse a ${e.type} node without `+"passing scope and parentPath.")}}if(!u[e.type]){return}n.explode(t);(0,a.traverseNode)(e,t,r,s,i)}var d=traverse;t["default"]=d;traverse.visitors=n;traverse.verify=n.verify;traverse.explode=n.explode;traverse.cheap=function(e,t){return f(e,t)};traverse.node=function(e,t,r,n,s,i){(0,a.traverseNode)(e,t,r,n,s,i)};traverse.clearNode=function(e,t){p(e,t);i.path.delete(e)};traverse.removeProperties=function(e,t){f(e,traverse.clearNode,t);return e};function hasDenylistedType(e,t){if(e.node.type===t.type){t.has=true;e.stop()}}traverse.hasType=function(e,t,r){if(r!=null&&r.includes(e.type))return false;if(e.type===t)return true;const n={has:false,type:t};traverse(e,{noScope:true,denylist:r,enter:hasDenylistedType},null,n);return n.has};traverse.cache=i},9586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.find=find;t.findParent=findParent;t.getAncestry=getAncestry;t.getDeepestCommonAncestorFrom=getDeepestCommonAncestorFrom;t.getEarliestCommonAncestorFrom=getEarliestCommonAncestorFrom;t.getFunctionParent=getFunctionParent;t.getStatementParent=getStatementParent;t.inType=inType;t.isAncestor=isAncestor;t.isDescendant=isDescendant;var n=r(6953);var s=r(3311);const{VISITOR_KEYS:i}=n;function findParent(e){let t=this;while(t=t.parentPath){if(e(t))return t}return null}function find(e){let t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function getFunctionParent(){return this.findParent((e=>e.isFunction()))}function getStatementParent(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()){break}else{e=e.parentPath}}while(e);if(e&&(e.isProgram()||e.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return e}function getEarliestCommonAncestorFrom(e){return this.getDeepestCommonAncestorFrom(e,(function(e,t,r){let n;const s=i[e.type];for(const e of r){const r=e[t+1];if(!n){n=r;continue}if(r.listKey&&n.listKey===r.listKey){if(r.keya){n=r}}return n}))}function getDeepestCommonAncestorFrom(e,t){if(!e.length){return this}if(e.length===1){return e[0]}let r=Infinity;let n,s;const i=e.map((e=>{const t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==this);if(t.lengtht===e))}function inType(...e){let t=this;while(t){for(const r of e){if(t.node.type===r)return true}t=t.parentPath}return false}},4924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.addComment=addComment;t.addComments=addComments;t.shareCommentsWithSiblings=shareCommentsWithSiblings;var n=r(6953);const{addComment:s,addComments:i}=n;function shareCommentsWithSiblings(){if(typeof this.key==="string")return;const e=this.node;if(!e)return;const t=e.trailingComments;const r=e.leadingComments;if(!t&&!r)return;const n=this.getSibling(this.key-1);const s=this.getSibling(this.key+1);const i=Boolean(n.node);const a=Boolean(s.node);if(i&&!a){n.addComments("trailing",t)}else if(a&&!i){s.addComments("leading",r)}}function addComment(e,t,r){s(this.node,e,t,r)}function addComments(e,t){i(this.node,e,t)}},5357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._call=_call;t._getQueueContexts=_getQueueContexts;t._resyncKey=_resyncKey;t._resyncList=_resyncList;t._resyncParent=_resyncParent;t._resyncRemoved=_resyncRemoved;t.call=call;t.isBlacklisted=t.isDenylisted=isDenylisted;t.popContext=popContext;t.pushContext=pushContext;t.requeue=requeue;t.resync=resync;t.setContext=setContext;t.setKey=setKey;t.setScope=setScope;t.setup=setup;t.skip=skip;t.skipKey=skipKey;t.stop=stop;t.visit=visit;var n=r(2084);var s=r(3311);function call(e){const t=this.opts;this.debug(e);if(this.node){if(this._call(t[e]))return true}if(this.node){return this._call(t[this.node.type]&&t[this.node.type][e])}return false}function _call(e){if(!e)return false;for(const t of e){if(!t)continue;const e=this.node;if(!e)return true;const r=t.call(this.state,this,this.state);if(r&&typeof r==="object"&&typeof r.then==="function"){throw new Error(`You appear to be using a plugin with an async traversal visitor, `+`which your current version of Babel does not support. `+`If you're using a published plugin, you may need to upgrade `+`your @babel/core version.`)}if(r){throw new Error(`Unexpected return value from visitor method ${t}`)}if(this.node!==e)return true;if(this._traverseFlags>0)return true}return false}function isDenylisted(){var e;const t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1}function restoreContext(e,t){if(e.context!==t){e.context=t;e.state=t.state;e.opts=t.opts}}function visit(){if(!this.node){return false}if(this.isDenylisted()){return false}if(this.opts.shouldSkip&&this.opts.shouldSkip(this)){return false}const e=this.context;if(this.shouldSkip||this.call("enter")){this.debug("Skip...");return this.shouldStop}restoreContext(this,e);this.debug("Recursing into...");this.shouldStop=(0,n.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys);restoreContext(this,e);this.call("exit");return this.shouldStop}function skip(){this.shouldSkip=true}function skipKey(e){if(this.skipKeys==null){this.skipKeys={}}this.skipKeys[e]=true}function stop(){this._traverseFlags|=s.SHOULD_SKIP|s.SHOULD_STOP}function setScope(){if(this.opts&&this.opts.noScope)return;let e=this.parentPath;if(this.key==="key"&&e.isMethod())e=e.parentPath;let t;while(e&&!t){if(e.opts&&e.opts.noScope)return;t=e.scope;e=e.parentPath}this.scope=this.getScope(t);if(this.scope)this.scope.init()}function setContext(e){if(this.skipKeys!=null){this.skipKeys={}}this._traverseFlags=0;if(e){this.context=e;this.state=e.state;this.opts=e.opts}this.setScope();return this}function resync(){if(this.removed)return;this._resyncParent();this._resyncList();this._resyncKey()}function _resyncParent(){if(this.parentPath){this.parent=this.parentPath.node}}function _resyncKey(){if(!this.container)return;if(this.node===this.container[this.key])return;if(Array.isArray(this.container)){for(let e=0;e0){this.setContext(this.contexts[this.contexts.length-1])}else{this.setContext(undefined)}}function pushContext(e){this.contexts.push(e);this.setContext(e)}function setup(e,t,r,n){this.listKey=r;this.container=t;this.parentPath=e||this.parentPath;this.setKey(n)}function setKey(e){var t;this.key=e;this.node=this.container[this.key];this.type=(t=this.node)==null?void 0:t.type}function requeue(e=this){if(e.removed)return;const t=this.contexts;for(const r of t){r.maybeQueue(e)}}function _getQueueContexts(){let e=this;let t=this.contexts;while(!t.length){e=e.parentPath;if(!e)break;t=e.contexts}return t}},2455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.arrowFunctionToExpression=arrowFunctionToExpression;t.arrowFunctionToShadowed=arrowFunctionToShadowed;t.ensureBlock=ensureBlock;t.toComputedKey=toComputedKey;t.unwrapFunctionEnvironment=unwrapFunctionEnvironment;var n=r(6953);var s=r(474);var i=r(3613);var a=r(1788);const{arrowFunctionExpression:o,assignmentExpression:l,binaryExpression:c,blockStatement:u,callExpression:p,conditionalExpression:f,expressionStatement:d,identifier:h,isIdentifier:m,jsxIdentifier:y,logicalExpression:g,LOGICAL_OPERATORS:b,memberExpression:T,metaProperty:S,numericLiteral:E,objectExpression:x,restElement:P,returnStatement:v,sequenceExpression:A,spreadElement:w,stringLiteral:I,super:C,thisExpression:O,toExpression:k,unaryExpression:N}=n;function toComputedKey(){let e;if(this.isMemberExpression()){e=this.node.property}else if(this.isProperty()||this.isMethod()){e=this.node.key}else{throw new ReferenceError("todo")}if(!this.node.computed){if(m(e))e=I(e.name)}return e}function ensureBlock(){const e=this.get("body");const t=e.node;if(Array.isArray(e)){throw new Error("Can't convert array path to a block statement")}if(!t){throw new Error("Can't convert node without a body")}if(e.isBlockStatement()){return t}const r=[];let n="body";let s;let i;if(e.isStatement()){i="body";s=0;r.push(e.node)}else{n+=".body.0";if(this.isFunction()){s="argument";r.push(v(e.node))}else{s="expression";r.push(d(e.node))}}this.node.body=u(r);const a=this.get(n);e.setup(a,i?a.node[i]:a.node,i,s);return this.node}function arrowFunctionToShadowed(){if(!this.isArrowFunctionExpression())return;this.arrowFunctionToExpression()}function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration()){throw this.buildCodeFrameError("Can only unwrap the environment of a function.")}hoistFunctionEnvironment(this)}function arrowFunctionToExpression({allowInsertArrow:e=true,specCompliant:t=false,noNewArrows:r=!t}={}){if(!this.isArrowFunctionExpression()){throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.")}const{thisBinding:n,fnPath:s}=hoistFunctionEnvironment(this,r,e);s.ensureBlock();s.node.type="FunctionExpression";if(!r){const e=n?null:s.scope.generateUidIdentifier("arrowCheckId");if(e){s.parentPath.scope.push({id:e,init:x([])})}s.get("body").unshiftContainer("body",d(p(this.hub.addHelper("newArrowCheck"),[O(),e?h(e.name):h(n)])));s.replaceWith(p(T((0,i.default)(this,true)||s.node,h("bind")),[e?h(e.name):O()]))}}const _=(0,a.merge)([{CallExpression(e,{allSuperCalls:t}){if(!e.get("callee").isSuper())return;t.push(e)}},s.default]);function hoistFunctionEnvironment(e,t=true,r=true){let n;let s=e.findParent((e=>{if(e.isArrowFunctionExpression()){var t;(t=n)!=null?t:n=e;return false}return e.isFunction()||e.isProgram()||e.isClassProperty({static:false})||e.isClassPrivateProperty({static:false})}));const i=s.isClassMethod({kind:"constructor"});if(s.isClassProperty()||s.isClassPrivateProperty()){if(n){s=n}else if(r){e.replaceWith(p(o([],k(e.node)),[]));s=e.get("callee");e=s.get("body")}else{throw e.buildCodeFrameError("Unable to transform arrow inside class property")}}const{thisPaths:a,argumentsPaths:l,newTargetPaths:u,superProps:d,superCalls:m}=getScopeInformation(e);if(i&&m.length>0){if(!r){throw m[0].buildCodeFrameError("Unable to handle nested super() usage in arrow")}const e=[];s.traverse(_,{allSuperCalls:e});const t=getSuperBinding(s);e.forEach((e=>{const r=h(t);r.loc=e.node.callee.loc;e.get("callee").replaceWith(r)}))}if(l.length>0){const e=getBinding(s,"arguments",(()=>{const args=()=>h("arguments");if(s.scope.path.isProgram()){return f(c("===",N("typeof",args()),I("undefined")),s.scope.buildUndefinedNode(),args())}else{return args()}}));l.forEach((t=>{const r=h(e);r.loc=t.node.loc;t.replaceWith(r)}))}if(u.length>0){const e=getBinding(s,"newtarget",(()=>S(h("new"),h("target"))));u.forEach((t=>{const r=h(e);r.loc=t.node.loc;t.replaceWith(r)}))}if(d.length>0){if(!r){throw d[0].buildCodeFrameError("Unable to handle nested super.prop usage")}const e=d.reduce(((e,t)=>e.concat(standardizeSuperProperty(t))),[]);e.forEach((e=>{const t=e.node.computed?"":e.get("property").node.name;const r=e.parentPath.isAssignmentExpression({left:e.node});const n=e.parentPath.isCallExpression({callee:e.node});const i=getSuperPropBinding(s,r,t);const o=[];if(e.node.computed){o.push(e.get("property").node)}if(r){const t=e.parentPath.node.right;o.push(t)}const l=p(h(i),o);if(n){e.parentPath.unshiftContainer("arguments",O());e.replaceWith(T(l,h("call")));a.push(e.parentPath.get("arguments.0"))}else if(r){e.parentPath.replaceWith(l)}else{e.replaceWith(l)}}))}let g;if(a.length>0||!t){g=getThisBinding(s,i);if(t||i&&hasSuperClass(s)){a.forEach((e=>{const t=e.isJSX()?y(g):h(g);t.loc=e.node.loc;e.replaceWith(t)}));if(!t)g=null}}return{thisBinding:g,fnPath:e}}function isLogicalOp(e){return b.includes(e)}function standardizeSuperProperty(e){if(e.parentPath.isAssignmentExpression()&&e.parentPath.node.operator!=="="){const t=e.parentPath;const r=t.node.operator.slice(0,-1);const n=t.node.right;const s=isLogicalOp(r);if(e.node.computed){const i=e.scope.generateDeclaredUidIdentifier("tmp");const a=e.node.object;const o=e.node.property;t.get("left").replaceWith(T(a,l("=",i,o),true));t.get("right").replaceWith(rightExpression(s?"=":r,T(a,h(i.name),true),n))}else{const i=e.node.object;const a=e.node.property;t.get("left").replaceWith(T(i,a));t.get("right").replaceWith(rightExpression(s?"=":r,T(i,h(a.name)),n))}if(s){t.replaceWith(g(r,t.node.left,t.node.right))}else{t.node.operator="="}return[t.get("left"),t.get("right").get("left")]}else if(e.parentPath.isUpdateExpression()){const t=e.parentPath;const r=e.scope.generateDeclaredUidIdentifier("tmp");const n=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null;const s=[l("=",r,T(e.node.object,n?l("=",n,e.node.property):e.node.property,e.node.computed)),l("=",T(e.node.object,n?h(n.name):e.node.property,e.node.computed),c(e.parentPath.node.operator[0],h(r.name),E(1)))];if(!e.parentPath.node.prefix){s.push(h(r.name))}t.replaceWith(A(s));const i=t.get("expressions.0.right");const a=t.get("expressions.1.left");return[i,a]}return[e];function rightExpression(e,t,r){if(e==="="){return l("=",t,r)}else{return c(e,t,r)}}}function hasSuperClass(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}const D=(0,a.merge)([{CallExpression(e,{supers:t,thisBinding:r}){if(!e.get("callee").isSuper())return;if(t.has(e.node))return;t.add(e.node);e.replaceWithMultiple([e.node,l("=",h(r),h("this"))])}},s.default]);function getThisBinding(e,t){return getBinding(e,"this",(r=>{if(!t||!hasSuperClass(e))return O();e.traverse(D,{supers:new WeakSet,thisBinding:r})}))}function getSuperBinding(e){return getBinding(e,"supercall",(()=>{const t=e.scope.generateUidIdentifier("args");return o([P(t)],p(C(),[w(h(t.name))]))}))}function getSuperPropBinding(e,t,r){const n=t?"set":"get";return getBinding(e,`superprop_${n}:${r||""}`,(()=>{const n=[];let s;if(r){s=T(C(),h(r))}else{const t=e.scope.generateUidIdentifier("prop");n.unshift(t);s=T(C(),h(t.name),true)}if(t){const t=e.scope.generateUidIdentifier("value");n.push(t);s=l("=",s,h(t.name))}return o(n,s)}))}function getBinding(e,t,r){const n="binding:"+t;let s=e.getData(n);if(!s){const i=e.scope.generateUidIdentifier(t);s=i.name;e.setData(n,s);e.scope.push({id:i,init:r(s)})}return s}const M=(0,a.merge)([{ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){if(e.node.name!=="this")return;if(!e.parentPath.isJSXMemberExpression({object:e.node})&&!e.parentPath.isJSXOpeningElement({name:e.node})){return}t.push(e)},CallExpression(e,{superCalls:t}){if(e.get("callee").isSuper())t.push(e)},MemberExpression(e,{superProps:t}){if(e.get("object").isSuper())t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let r=e.scope;do{if(r.hasOwnBinding("arguments")){r.rename("arguments");return}if(r.path.isFunction()&&!r.path.isArrowFunctionExpression()){break}}while(r=r.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){if(!e.get("meta").isIdentifier({name:"new"}))return;if(!e.get("property").isIdentifier({name:"target"}))return;t.push(e)}},s.default]);function getScopeInformation(e){const t=[];const r=[];const n=[];const s=[];const i=[];e.traverse(M,{thisPaths:t,argumentsPaths:r,newTargetPaths:n,superProps:s,superCalls:i});return{thisPaths:t,argumentsPaths:r,newTargetPaths:n,superProps:s,superCalls:i}}},9889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.evaluate=evaluate;t.evaluateTruthy=evaluateTruthy;const r=["String","Number","Math"];const n=["random"];function evaluateTruthy(){const e=this.evaluate();if(e.confident)return!!e.value}function deopt(e,t){if(!t.confident)return;t.deoptPath=e;t.confident=false}function evaluateCached(e,t){const{node:r}=e;const{seen:n}=t;if(n.has(r)){const s=n.get(r);if(s.resolved){return s.value}else{deopt(e,t);return}}else{const s={resolved:false};n.set(r,s);const i=_evaluate(e,t);if(t.confident){s.resolved=true;s.value=i}return i}}function _evaluate(e,t){if(!t.confident)return;if(e.isSequenceExpression()){const r=e.get("expressions");return evaluateCached(r[r.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral()){return e.node.value}if(e.isNullLiteral()){return null}if(e.isTemplateLiteral()){return evaluateQuasis(e,e.node.quasis,t)}if(e.isTaggedTemplateExpression()&&e.get("tag").isMemberExpression()){const r=e.get("tag.object");const{node:{name:n}}=r;const s=e.get("tag.property");if(r.isIdentifier()&&n==="String"&&!e.scope.getBinding(n)&&s.isIdentifier()&&s.node.name==="raw"){return evaluateQuasis(e,e.node.quasi.quasis,t,true)}}if(e.isConditionalExpression()){const r=evaluateCached(e.get("test"),t);if(!t.confident)return;if(r){return evaluateCached(e.get("consequent"),t)}else{return evaluateCached(e.get("alternate"),t)}}if(e.isExpressionWrapper()){return evaluateCached(e.get("expression"),t)}if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:e.node})){const t=e.get("property");const r=e.get("object");if(r.isLiteral()&&t.isIdentifier()){const e=r.node.value;const n=typeof e;if(n==="number"||n==="string"){return e[t.node.name]}}}if(e.isReferencedIdentifier()){const r=e.scope.getBinding(e.node.name);if(r&&r.constantViolations.length>0){return deopt(r.path,t)}if(r&&e.node.start":return r>n;case"<=":return r<=n;case">=":return r>=n;case"==":return r==n;case"!=":return r!=n;case"===":return r===n;case"!==":return r!==n;case"|":return r|n;case"&":return r&n;case"^":return r^n;case"<<":return r<>":return r>>n;case">>>":return r>>>n}}if(e.isCallExpression()){const s=e.get("callee");let i;let a;if(s.isIdentifier()&&!e.scope.getBinding(s.node.name)&&r.indexOf(s.node.name)>=0){a=global[s.node.name]}if(s.isMemberExpression()){const e=s.get("object");const t=s.get("property");if(e.isIdentifier()&&t.isIdentifier()&&r.indexOf(e.node.name)>=0&&n.indexOf(t.node.name)<0){i=global[e.node.name];a=i[t.node.name]}if(e.isLiteral()&&t.isIdentifier()){const r=typeof e.node.value;if(r==="string"||r==="number"){i=e.node.value;a=i[t.node.name]}}}if(a){const r=e.get("arguments").map((e=>evaluateCached(e,t)));if(!t.confident)return;return a.apply(i,r)}}deopt(e,t)}function evaluateQuasis(e,t,r,n=false){let s="";let i=0;const a=e.get("expressions");for(const e of t){if(!r.confident)break;s+=n?e.value.raw:e.value.cooked;const t=a[i++];if(t)s+=String(evaluateCached(t,r))}if(!r.confident)return;return s}function evaluate(){const e={confident:true,deoptPath:null,seen:new Map};let t=evaluateCached(this,e);if(!e.confident)t=undefined;return{confident:e.confident,deopt:e.deoptPath,value:t}}},4690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._getKey=_getKey;t._getPattern=_getPattern;t.get=get;t.getAllNextSiblings=getAllNextSiblings;t.getAllPrevSiblings=getAllPrevSiblings;t.getBindingIdentifierPaths=getBindingIdentifierPaths;t.getBindingIdentifiers=getBindingIdentifiers;t.getCompletionRecords=getCompletionRecords;t.getNextSibling=getNextSibling;t.getOpposite=getOpposite;t.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;t.getOuterBindingIdentifiers=getOuterBindingIdentifiers;t.getPrevSibling=getPrevSibling;t.getSibling=getSibling;var n=r(3311);var s=r(6953);const{getBindingIdentifiers:i,getOuterBindingIdentifiers:a,isDeclaration:o,numericLiteral:l,unaryExpression:c}=s;const u=0;const p=1;function NormalCompletion(e){return{type:u,path:e}}function BreakCompletion(e){return{type:p,path:e}}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}return null}function addCompletionRecords(e,t,r){if(e){t.push(..._getCompletionRecords(e,r))}return t}function completionRecordForSwitch(e,t,r){let n=[];for(let s=0;s{e.type=p}))}function replaceBreakStatementInBreakCompletion(e,t){e.forEach((e=>{if(e.path.isBreakStatement({label:null})){if(t){e.path.replaceWith(c("void",l(0)))}else{e.path.remove()}}}))}function getStatementListCompletion(e,t){const r=[];if(t.canHaveBreak){let n=[];for(let s=0;s0&&o.every((e=>e.type===p))){if(n.length>0&&o.every((e=>e.path.isBreakStatement({label:null})))){normalCompletionToBreak(n);r.push(...n);if(n.some((e=>e.path.isDeclaration()))){r.push(...o);replaceBreakStatementInBreakCompletion(o,true)}replaceBreakStatementInBreakCompletion(o,false)}else{r.push(...o);if(!t.shouldPopulateBreak){replaceBreakStatementInBreakCompletion(o,true)}}break}if(s===e.length-1){r.push(...o)}else{n=[];for(let e=0;e=0;n--){const s=_getCompletionRecords(e[n],t);if(s.length>1||s.length===1&&!s[0].path.isVariableDeclaration()){r.push(...s);break}}}return r}function _getCompletionRecords(e,t){let r=[];if(e.isIfStatement()){r=addCompletionRecords(e.get("consequent"),r,t);r=addCompletionRecords(e.get("alternate"),r,t)}else if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement()){return addCompletionRecords(e.get("body"),r,t)}else if(e.isProgram()||e.isBlockStatement()){return getStatementListCompletion(e.get("body"),t)}else if(e.isFunction()){return _getCompletionRecords(e.get("body"),t)}else if(e.isTryStatement()){r=addCompletionRecords(e.get("block"),r,t);r=addCompletionRecords(e.get("handler"),r,t)}else if(e.isCatchClause()){return addCompletionRecords(e.get("body"),r,t)}else if(e.isSwitchStatement()){return completionRecordForSwitch(e.get("cases"),r,t)}else if(e.isSwitchCase()){return getStatementListCompletion(e.get("consequent"),{canHaveBreak:true,shouldPopulateBreak:false,inCaseClause:true})}else if(e.isBreakStatement()){r.push(BreakCompletion(e))}else{r.push(NormalCompletion(e))}return r}function getCompletionRecords(){const e=_getCompletionRecords(this,{canHaveBreak:false,shouldPopulateBreak:false,inCaseClause:false});return e.map((e=>e.path))}function getSibling(e){return n.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let e=this.key;let t=this.getSibling(++e);const r=[];while(t.node){r.push(t);t=this.getSibling(++e)}return r}function getAllPrevSiblings(){let e=this.key;let t=this.getSibling(--e);const r=[];while(t.node){r.push(t);t=this.getSibling(--e)}return r}function get(e,t=true){if(t===true)t=this.context;const r=e.split(".");if(r.length===1){return this._getKey(e,t)}else{return this._getPattern(r,t)}}function _getKey(e,t){const r=this.node;const s=r[e];if(Array.isArray(s)){return s.map(((i,a)=>n.default.get({listKey:e,parentPath:this,parent:r,container:s,key:a}).setContext(t)))}else{return n.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}}function _getPattern(e,t){let r=this;for(const n of e){if(n==="."){r=r.parentPath}else{if(Array.isArray(r)){r=r[n]}else{r=r.get(n,t)}}}return r}function getBindingIdentifiers(e){return i(this.node,e)}function getOuterBindingIdentifiers(e){return a(this.node,e)}function getBindingIdentifierPaths(e=false,t=false){const r=this;const n=[r];const s=Object.create(null);while(n.length){const r=n.shift();if(!r)continue;if(!r.node)continue;const a=i.keys[r.node.type];if(r.isIdentifier()){if(e){const e=s[r.node.name]=s[r.node.name]||[];e.push(r)}else{s[r.node.name]=r}continue}if(r.isExportDeclaration()){const e=r.get("declaration");if(o(e)){n.push(e)}continue}if(t){if(r.isFunctionDeclaration()){n.push(r.get("id"));continue}if(r.isFunctionExpression()){continue}}if(a){for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=t.SHOULD_STOP=t.SHOULD_SKIP=t.REMOVED=void 0;var n=r(714);var s=r(6937);var i=r(7734);var a=r(2593);var o=r(6953);var l=o;var c=r(5762);var u=r(3136);var p=r(9586);var f=r(9035);var d=r(4006);var h=r(9889);var m=r(2455);var y=r(2285);var g=r(5357);var b=r(9187);var T=r(3714);var S=r(4690);var E=r(4924);const{validate:x}=o;const P=s("babel");const v=1<<0;t.REMOVED=v;const A=1<<1;t.SHOULD_STOP=A;const w=1<<2;t.SHOULD_SKIP=w;class NodePath{constructor(e,t){this.contexts=[];this.state=null;this.opts=null;this._traverseFlags=0;this.skipKeys=null;this.parentPath=null;this.container=null;this.listKey=null;this.key=null;this.node=null;this.type=null;this.parent=t;this.hub=e;this.data=null;this.context=null;this.scope=null}static get({hub:e,parentPath:t,parent:r,container:n,listKey:s,key:i}){if(!e&&t){e=t.hub}if(!r){throw new Error("To get a node path the parent needs to exist")}const a=n[i];let o=c.path.get(r);if(!o){o=new Map;c.path.set(r,o)}let l=o.get(a);if(!l){l=new NodePath(e,r);if(a)o.set(a,l)}l.setup(t,n,s,i);return l}getScope(e){return this.isScope()?new a.default(this):e}setData(e,t){if(this.data==null){this.data=Object.create(null)}return this.data[e]=t}getData(e,t){if(this.data==null){this.data=Object.create(null)}let r=this.data[e];if(r===undefined&&t!==undefined)r=this.data[e]=t;return r}hasNode(){return this.node!=null}buildCodeFrameError(e,t=SyntaxError){return this.hub.buildError(this.node,e,t)}traverse(e,t){(0,i.default)(this.node,e,this.scope,t,this)}set(e,t){x(this.node,e,t);this.node[e]=t}getPathLocation(){const e=[];let t=this;do{let r=t.key;if(t.inList)r=`${t.listKey}[${r}]`;e.unshift(r)}while(t=t.parentPath);return e.join(".")}debug(e){if(!P.enabled)return;P(`${this.getPathLocation()} ${this.type}: ${e}`)}toString(){return(0,u.default)(this.node).code}get inList(){return!!this.listKey}set inList(e){if(!e){this.listKey=null}}get parentKey(){return this.listKey||this.key}get shouldSkip(){return!!(this._traverseFlags&w)}set shouldSkip(e){if(e){this._traverseFlags|=w}else{this._traverseFlags&=~w}}get shouldStop(){return!!(this._traverseFlags&A)}set shouldStop(e){if(e){this._traverseFlags|=A}else{this._traverseFlags&=~A}}get removed(){return!!(this._traverseFlags&v)}set removed(e){if(e){this._traverseFlags|=v}else{this._traverseFlags&=~v}}}Object.assign(NodePath.prototype,p,f,d,h,m,y,g,b,T,S,E);for(const e of l.TYPES){const t=`is${e}`;const r=l[t];NodePath.prototype[t]=function(e){return r(this.node,e)};NodePath.prototype[`assert${e}`]=function(t){if(!r(this.node,t)){throw new TypeError(`Expected node path of type ${e}`)}}}for(const e of Object.keys(n)){if(e[0]==="_")continue;if(l.TYPES.indexOf(e)<0)l.TYPES.push(e);const t=n[e];NodePath.prototype[`is${e}`]=function(e){return t.checkPath(this,e)}}var I=NodePath;t["default"]=I},9035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._getTypeAnnotation=_getTypeAnnotation;t.baseTypeStrictlyMatches=baseTypeStrictlyMatches;t.couldBeBaseType=couldBeBaseType;t.getTypeAnnotation=getTypeAnnotation;t.isBaseType=isBaseType;t.isGenericType=isGenericType;var n=r(594);var s=r(6953);const{anyTypeAnnotation:i,isAnyTypeAnnotation:a,isBooleanTypeAnnotation:o,isEmptyTypeAnnotation:l,isFlowBaseAnnotation:c,isGenericTypeAnnotation:u,isIdentifier:p,isMixedTypeAnnotation:f,isNumberTypeAnnotation:d,isStringTypeAnnotation:h,isTypeAnnotation:m,isUnionTypeAnnotation:y,isVoidTypeAnnotation:g,stringTypeAnnotation:b,voidTypeAnnotation:T}=s;function getTypeAnnotation(){if(this.typeAnnotation)return this.typeAnnotation;let e=this._getTypeAnnotation()||i();if(m(e))e=e.typeAnnotation;return this.typeAnnotation=e}const S=new WeakSet;function _getTypeAnnotation(){const e=this.node;if(!e){if(this.key==="init"&&this.parentPath.isVariableDeclarator()){const e=this.parentPath.parentPath;const t=e.parentPath;if(e.key==="left"&&t.isForInStatement()){return b()}if(e.key==="left"&&t.isForOfStatement()){return i()}return T()}else{return}}if(e.typeAnnotation){return e.typeAnnotation}if(S.has(e)){return}S.add(e);try{var t;let r=n[e.type];if(r){return r.call(this,e)}r=n[this.parentPath.type];if((t=r)!=null&&t.validParent){return this.parentPath.getTypeAnnotation()}}finally{S.delete(e)}}function isBaseType(e,t){return _isBaseType(e,this.getTypeAnnotation(),t)}function _isBaseType(e,t,r){if(e==="string"){return h(t)}else if(e==="number"){return d(t)}else if(e==="boolean"){return o(t)}else if(e==="any"){return a(t)}else if(e==="mixed"){return f(t)}else if(e==="empty"){return l(t)}else if(e==="void"){return g(t)}else{if(r){return false}else{throw new Error(`Unknown base type ${e}`)}}}function couldBeBaseType(e){const t=this.getTypeAnnotation();if(a(t))return true;if(y(t)){for(const r of t.types){if(a(r)||_isBaseType(e,r,true)){return true}}return false}else{return _isBaseType(e,t,true)}}function baseTypeStrictlyMatches(e){const t=this.getTypeAnnotation();const r=e.getTypeAnnotation();if(!a(t)&&c(t)){return r.type===t.type}return false}function isGenericType(e){const t=this.getTypeAnnotation();return u(t)&&p(t.id,{name:e})}},2694:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var n=r(6953);const{BOOLEAN_NUMBER_BINARY_OPERATORS:s,createFlowUnionType:i,createTSUnionType:a,createTypeAnnotationBasedOnTypeof:o,createUnionTypeAnnotation:l,isTSTypeAnnotation:c,numberTypeAnnotation:u,voidTypeAnnotation:p}=n;function _default(e){if(!this.isReferenced())return;const t=this.scope.getBinding(e.name);if(t){if(t.identifier.typeAnnotation){return t.identifier.typeAnnotation}else{return getTypeAnnotationBindingConstantViolations(t,this,e.name)}}if(e.name==="undefined"){return p()}else if(e.name==="NaN"||e.name==="Infinity"){return u()}else if(e.name==="arguments"){}}function getTypeAnnotationBindingConstantViolations(e,t,r){const n=[];const s=[];let o=getConstantViolationsBefore(e,t,s);const u=getConditionalAnnotation(e,t,r);if(u){const t=getConstantViolationsBefore(e,u.ifStatement);o=o.filter((e=>t.indexOf(e)<0));n.push(u.typeAnnotation)}if(o.length){o.push(...s);for(const e of o){n.push(e.getTypeAnnotation())}}if(!n.length){return}if(c(n[0])&&a){return a(n)}if(i){return i(n)}return l(n)}function getConstantViolationsBefore(e,t,r){const n=e.constantViolations.slice();n.unshift(e.path);return n.filter((e=>{e=e.resolve();const n=e._guessExecutionStatusRelativeTo(t);if(r&&n==="unknown")r.push(e);return n==="before"}))}function inferAnnotationFromBinaryExpression(e,t){const r=t.node.operator;const n=t.get("right").resolve();const i=t.get("left").resolve();let a;if(i.isIdentifier({name:e})){a=n}else if(n.isIdentifier({name:e})){a=i}if(a){if(r==="==="){return a.getTypeAnnotation()}if(s.indexOf(r)>=0){return u()}return}if(r!=="==="&&r!=="==")return;let l;let c;if(i.isUnaryExpression({operator:"typeof"})){l=i;c=n}else if(n.isUnaryExpression({operator:"typeof"})){l=n;c=i}if(!l)return;if(!l.get("argument").isIdentifier({name:e}))return;c=c.resolve();if(!c.isLiteral())return;const p=c.node.value;if(typeof p!=="string")return;return o(p)}function getParentConditionalPath(e,t,r){let n;while(n=t.parentPath){if(n.isIfStatement()||n.isConditionalExpression()){if(t.key==="test"){return}return n}if(n.isFunction()){if(n.parentPath.scope.getBinding(r)!==e)return}t=n}}function getConditionalAnnotation(e,t,r){const n=getParentConditionalPath(e,t,r);if(!n)return;const s=n.get("test");const o=[s];const u=[];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ArrayExpression=ArrayExpression;t.AssignmentExpression=AssignmentExpression;t.BinaryExpression=BinaryExpression;t.BooleanLiteral=BooleanLiteral;t.CallExpression=CallExpression;t.ConditionalExpression=ConditionalExpression;t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=Func;Object.defineProperty(t,"Identifier",{enumerable:true,get:function(){return s.default}});t.LogicalExpression=LogicalExpression;t.NewExpression=NewExpression;t.NullLiteral=NullLiteral;t.NumericLiteral=NumericLiteral;t.ObjectExpression=ObjectExpression;t.ParenthesizedExpression=ParenthesizedExpression;t.RegExpLiteral=RegExpLiteral;t.RestElement=RestElement;t.SequenceExpression=SequenceExpression;t.StringLiteral=StringLiteral;t.TaggedTemplateExpression=TaggedTemplateExpression;t.TemplateLiteral=TemplateLiteral;t.TypeCastExpression=TypeCastExpression;t.UnaryExpression=UnaryExpression;t.UpdateExpression=UpdateExpression;t.VariableDeclarator=VariableDeclarator;var n=r(6953);var s=r(2694);const{BOOLEAN_BINARY_OPERATORS:i,BOOLEAN_UNARY_OPERATORS:a,NUMBER_BINARY_OPERATORS:o,NUMBER_UNARY_OPERATORS:l,STRING_UNARY_OPERATORS:c,anyTypeAnnotation:u,arrayTypeAnnotation:p,booleanTypeAnnotation:f,buildMatchMemberExpression:d,createFlowUnionType:h,createTSUnionType:m,createUnionTypeAnnotation:y,genericTypeAnnotation:g,identifier:b,isTSTypeAnnotation:T,nullLiteralTypeAnnotation:S,numberTypeAnnotation:E,stringTypeAnnotation:x,tupleTypeAnnotation:P,unionTypeAnnotation:v,voidTypeAnnotation:A}=n;function VariableDeclarator(){var e;const t=this.get("id");if(!t.isIdentifier())return;const r=this.get("init");let n=r.getTypeAnnotation();if(((e=n)==null?void 0:e.type)==="AnyTypeAnnotation"){if(r.isCallExpression()&&r.get("callee").isIdentifier({name:"Array"})&&!r.scope.hasBinding("Array",true)){n=ArrayExpression()}}return n}function TypeCastExpression(e){return e.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(e){if(this.get("callee").isIdentifier()){return g(e.callee)}}function TemplateLiteral(){return x()}function UnaryExpression(e){const t=e.operator;if(t==="void"){return A()}else if(l.indexOf(t)>=0){return E()}else if(c.indexOf(t)>=0){return x()}else if(a.indexOf(t)>=0){return f()}}function BinaryExpression(e){const t=e.operator;if(o.indexOf(t)>=0){return E()}else if(i.indexOf(t)>=0){return f()}else if(t==="+"){const e=this.get("right");const t=this.get("left");if(t.isBaseType("number")&&e.isBaseType("number")){return E()}else if(t.isBaseType("string")||e.isBaseType("string")){return x()}return v([x(),E()])}}function LogicalExpression(){const e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];if(T(e[0])&&m){return m(e)}if(h){return h(e)}return y(e)}function ConditionalExpression(){const e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];if(T(e[0])&&m){return m(e)}if(h){return h(e)}return y(e)}function SequenceExpression(){return this.get("expressions").pop().getTypeAnnotation()}function ParenthesizedExpression(){return this.get("expression").getTypeAnnotation()}function AssignmentExpression(){return this.get("right").getTypeAnnotation()}function UpdateExpression(e){const t=e.operator;if(t==="++"||t==="--"){return E()}}function StringLiteral(){return x()}function NumericLiteral(){return E()}function BooleanLiteral(){return f()}function NullLiteral(){return S()}function RegExpLiteral(){return g(b("RegExp"))}function ObjectExpression(){return g(b("Object"))}function ArrayExpression(){return g(b("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return g(b("Function"))}const w=d("Array.from");const I=d("Object.keys");const C=d("Object.values");const O=d("Object.entries");function CallExpression(){const{callee:e}=this.node;if(I(e)){return p(x())}else if(w(e)||C(e)){return p(u())}else if(O(e)){return p(P([x(),u()]))}return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(e){e=e.resolve();if(e.isFunction()){if(e.is("async")){if(e.is("generator")){return g(b("AsyncIterator"))}else{return g(b("Promise"))}}else{if(e.node.returnType){return e.node.returnType}else{}}}}},2285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;t._guessExecutionStatusRelativeToDifferentFunctions=_guessExecutionStatusRelativeToDifferentFunctions;t._resolve=_resolve;t.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;t.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;t.equals=equals;t.getSource=getSource;t.has=has;t.is=void 0;t.isCompletionRecord=isCompletionRecord;t.isConstantExpression=isConstantExpression;t.isInStrictMode=isInStrictMode;t.isNodeType=isNodeType;t.isStatementOrBlock=isStatementOrBlock;t.isStatic=isStatic;t.isnt=isnt;t.matchesPattern=matchesPattern;t.referencesImport=referencesImport;t.resolve=resolve;t.willIMaybeExecuteBefore=willIMaybeExecuteBefore;var n=r(6953);const{STATEMENT_OR_BLOCK_KEYS:s,VISITOR_KEYS:i,isBlockStatement:a,isExpression:o,isIdentifier:l,isLiteral:c,isStringLiteral:u,isType:p,matchesPattern:f}=n;function matchesPattern(e,t){return f(this.node,e,t)}function has(e){const t=this.node&&this.node[e];if(t&&Array.isArray(t)){return!!t.length}else{return!!t}}function isStatic(){return this.scope.isStatic(this.node)}const d=has;t.is=d;function isnt(e){return!this.has(e)}function equals(e,t){return this.node[e]===t}function isNodeType(e){return p(this.type,e)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(e){if(this.key!=="body"||!this.parentPath.isArrowFunctionExpression()){return false}if(this.isExpression()){return a(e)}else if(this.isBlockStatement()){return o(e)}return false}function isCompletionRecord(e){let t=this;let r=true;do{const{type:n,container:s}=t;if(!r&&(t.isFunction()||n==="StaticBlock")){return!!e}r=false;if(Array.isArray(s)&&t.key!==s.length-1){return false}}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return true}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||a(this.container)){return false}else{return s.includes(this.key)}}function referencesImport(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?u(this.node.property,{value:t}):this.node.property.name===t)){const t=this.get("object");return t.isReferencedIdentifier()&&t.referencesImport(e,"*")}return false}const r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return false;const n=r.path;const s=n.parentPath;if(!s.isImportDeclaration())return false;if(s.node.source.value===e){if(!t)return true}else{return false}if(n.isImportDefaultSpecifier()&&t==="default"){return true}if(n.isImportNamespaceSpecifier()&&t==="*"){return true}if(n.isImportSpecifier()&&l(n.node.imported,{name:t})){return true}return false}function getSource(){const e=this.node;if(e.end){const t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function willIMaybeExecuteBefore(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function getOuterFunction(e){return(e.scope.getFunctionParent()||e.scope.getProgramParent()).path}function isExecutionUncertain(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return false}}function isExecutionUncertainInList(e,t){for(let r=0;r=0)return"after";if(r.this.indexOf(e)>=0)return"before";let n;const s={target:0,this:0};while(!n&&s.this=0){n=e}else{s.this++}}if(!n){throw new Error("Internal Babel error - The two compared nodes"+" don't appear to belong to the same program.")}if(isExecutionUncertainInList(r.this,s.this-1)||isExecutionUncertainInList(r.target,s.target-1)){return"unknown"}const a={this:r.this[s.this-1],target:r.target[s.target-1]};if(a.target.listKey&&a.this.listKey&&a.target.container===a.this.container){return a.target.key>a.this.key?"before":"after"}const o=i[n.type];const l={this:o.indexOf(a.this.parentKey),target:o.indexOf(a.target.parentKey)};return l.target>l.this?"before":"after"}const h=new WeakSet;function _guessExecutionStatusRelativeToDifferentFunctions(e){if(!e.isFunctionDeclaration()||e.parentPath.isExportDeclaration()){return"unknown"}const t=e.scope.getBinding(e.node.id.name);if(!t.references)return"before";const r=t.referencePaths;let n;for(const t of r){const r=!!t.find((t=>t.node===e.node));if(r)continue;if(t.key!=="callee"||!t.parentPath.isCallExpression()){return"unknown"}if(h.has(t.node))continue;h.add(t.node);const s=this._guessExecutionStatusRelativeTo(t);h.delete(t.node);if(n&&n!==s){return"unknown"}else{n=s}}return n}function resolve(e,t){return this._resolve(e,t)||this}function _resolve(e,t){if(t&&t.indexOf(this)>=0)return;t=t||[];t.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(e,t)}else{}}else if(this.isReferencedIdentifier()){const r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if(r.kind==="module")return;if(r.path!==this){const n=r.path.resolve(e,t);if(this.find((e=>e.node===n.node)))return;return n}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(e,t)}else if(e&&this.isMemberExpression()){const r=this.toComputedKey();if(!c(r))return;const n=r.value;const s=this.get("object").resolve(e,t);if(s.isObjectExpression()){const r=s.get("properties");for(const s of r){if(!s.isProperty())continue;const r=s.get("key");let i=s.isnt("computed")&&r.isIdentifier({name:n});i=i||r.isLiteral({value:n});if(i)return s.get("value").resolve(e,t)}}else if(s.isArrayExpression()&&!isNaN(+n)){const r=s.get("elements");const i=r[n];if(i)return i.resolve(e,t)}}}function isConstantExpression(){if(this.isIdentifier()){const e=this.scope.getBinding(this.node.name);if(!e)return false;return e.constant}if(this.isLiteral()){if(this.isRegExpLiteral()){return false}if(this.isTemplateLiteral()){return this.get("expressions").every((e=>e.isConstantExpression()))}return true}if(this.isUnaryExpression()){if(this.node.operator!=="void"){return false}return this.get("argument").isConstantExpression()}if(this.isBinaryExpression()){return this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return false}function isInStrictMode(){const e=this.isProgram()?this:this.parentPath;const t=e.find((e=>{if(e.isProgram({sourceType:"module"}))return true;if(e.isClass())return true;if(!e.isProgram()&&!e.isFunction())return false;if(e.isArrowFunctionExpression()&&!e.get("body").isBlockStatement()){return false}const t=e.isFunction()?e.node.body:e.node;for(const e of t.directives){if(e.value.value==="use strict"){return true}}}));return!!t}},3747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(6953);var s=n;const{react:i}=n;const{cloneNode:a,jsxExpressionContainer:o,variableDeclaration:l,variableDeclarator:c}=s;const u={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&i.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression()){return}if(e.node.name==="this"){let r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression()){break}}while(r=r.parent);if(r)t.breakOnScopePaths.push(r.path)}const r=e.scope.getBinding(e.node.name);if(!r)return;for(const n of r.constantViolations){if(n.scope!==r.path.scope){t.mutableBinding=true;e.stop();return}}if(r!==t.scope.getBinding(e.node.name))return;t.bindings[e.node.name]=r}};class PathHoister{constructor(e,t){this.breakOnScopePaths=void 0;this.bindings=void 0;this.mutableBinding=void 0;this.scopes=void 0;this.scope=void 0;this.path=void 0;this.attachAfter=void 0;this.breakOnScopePaths=[];this.bindings={};this.mutableBinding=false;this.scopes=[];this.scope=t;this.path=e;this.attachAfter=false}isCompatibleScope(e){for(const t of Object.keys(this.bindings)){const r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier)){return false}}return true}getCompatibleScopes(){let e=this.path.scope;do{if(this.isCompatibleScope(e)){this.scopes.push(e)}else{break}if(this.breakOnScopePaths.indexOf(e.path)>=0){break}}while(e=e.parent)}getAttachmentPath(){let e=this._getAttachmentPath();if(!e)return;let t=e.scope;if(t.path===e){t=e.scope.parent}if(t.path.isProgram()||t.path.isFunction()){for(const r of Object.keys(this.bindings)){if(!t.hasOwnBinding(r))continue;const n=this.bindings[r];if(n.kind==="param"||n.path.parentKey==="params"){continue}const s=this.getAttachmentParentForPath(n.path);if(s.key>=e.key){this.attachAfter=true;e=n.path;for(const t of n.constantViolations){if(this.getAttachmentParentForPath(t).key>e.key){e=t}}}}}return e}_getAttachmentPath(){const e=this.scopes;const t=e.pop();if(!t)return;if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;const e=t.path.get("body").get("body");for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hooks=void 0;const r=[function(e,t){const r=e.key==="test"&&(t.isWhile()||t.isSwitchCase())||e.key==="declaration"&&t.isExportDeclaration()||e.key==="body"&&t.isLabeledStatement()||e.listKey==="declarations"&&t.isVariableDeclaration()&&t.node.declarations.length===1||e.key==="expression"&&t.isExpressionStatement();if(r){t.remove();return true}},function(e,t){if(t.isSequenceExpression()&&t.node.expressions.length===1){t.replaceWith(t.node.expressions[0]);return true}},function(e,t){if(t.isBinary()){if(e.key==="left"){t.replaceWith(t.node.right)}else{t.replaceWith(t.node.left)}return true}},function(e,t){if(t.isIfStatement()&&(e.key==="consequent"||e.key==="alternate")||e.key==="body"&&(t.isLoop()||t.isArrowFunctionExpression())){e.replaceWith({type:"BlockStatement",body:[]});return true}}];t.hooks=r},714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Var=t.User=t.Statement=t.SpreadProperty=t.Scope=t.RestProperty=t.ReferencedMemberExpression=t.ReferencedIdentifier=t.Referenced=t.Pure=t.NumericLiteralTypeAnnotation=t.Generated=t.ForAwaitStatement=t.Flow=t.Expression=t.ExistentialTypeParam=t.BlockScoped=t.BindingIdentifier=void 0;var n=r(6953);const{isBinding:s,isBlockScoped:i,isExportDeclaration:a,isExpression:o,isFlow:l,isForStatement:c,isForXStatement:u,isIdentifier:p,isImportDeclaration:f,isImportSpecifier:d,isJSXIdentifier:h,isJSXMemberExpression:m,isMemberExpression:y,isReferenced:g,isScope:b,isStatement:T,isVar:S,isVariableDeclaration:E,react:x}=n;const{isCompatTag:P}=x;const v={types:["Identifier","JSXIdentifier"],checkPath(e,t){const{node:r,parent:n}=e;if(!p(r,t)&&!m(n,t)){if(h(r,t)){if(P(r.name))return false}else{return false}}return g(r,n,e.parentPath.parent)}};t.ReferencedIdentifier=v;const A={types:["MemberExpression"],checkPath({node:e,parent:t}){return y(e)&&g(e,t)}};t.ReferencedMemberExpression=A;const w={types:["Identifier"],checkPath(e){const{node:t,parent:r}=e;const n=e.parentPath.parent;return p(t)&&s(t,r,n)}};t.BindingIdentifier=w;const I={types:["Statement"],checkPath({node:e,parent:t}){if(T(e)){if(E(e)){if(u(t,{left:e}))return false;if(c(t,{init:e}))return false}return true}else{return false}}};t.Statement=I;const C={types:["Expression"],checkPath(e){if(e.isIdentifier()){return e.isReferencedIdentifier()}else{return o(e.node)}}};t.Expression=C;const O={types:["Scopable","Pattern"],checkPath(e){return b(e.node,e.parent)}};t.Scope=O;const k={checkPath(e){return g(e.node,e.parent)}};t.Referenced=k;const N={checkPath(e){return i(e.node)}};t.BlockScoped=N;const _={types:["VariableDeclaration"],checkPath(e){return S(e.node)}};t.Var=_;const D={checkPath(e){return e.node&&!!e.node.loc}};t.User=D;const M={checkPath(e){return!e.isUser()}};t.Generated=M;const L={checkPath(e,t){return e.scope.isPure(e.node,t)}};t.Pure=L;const j={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath({node:e}){if(l(e)){return true}else if(f(e)){return e.importKind==="type"||e.importKind==="typeof"}else if(a(e)){return e.exportKind==="type"}else if(d(e)){return e.importKind==="type"||e.importKind==="typeof"}else{return false}}};t.Flow=j;const F={types:["RestElement"],checkPath(e){return e.parentPath&&e.parentPath.isObjectPattern()}};t.RestProperty=F;const R={types:["RestElement"],checkPath(e){return e.parentPath&&e.parentPath.isObjectExpression()}};t.SpreadProperty=R;const B={types:["ExistsTypeAnnotation"]};t.ExistentialTypeParam=B;const U={types:["NumberLiteralTypeAnnotation"]};t.NumericLiteralTypeAnnotation=U;const K={types:["ForOfStatement"],checkPath({node:e}){return e.await===true}};t.ForAwaitStatement=K},3714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._containerInsert=_containerInsert;t._containerInsertAfter=_containerInsertAfter;t._containerInsertBefore=_containerInsertBefore;t._verifyNodeList=_verifyNodeList;t.hoist=hoist;t.insertAfter=insertAfter;t.insertBefore=insertBefore;t.pushContainer=pushContainer;t.unshiftContainer=unshiftContainer;t.updateSiblingKeys=updateSiblingKeys;var n=r(5762);var s=r(3747);var i=r(3311);var a=r(6953);const{arrowFunctionExpression:o,assertExpression:l,assignmentExpression:c,blockStatement:u,callExpression:p,cloneNode:f,expressionStatement:d,isAssignmentExpression:h,isCallExpression:m,isExpression:y,isIdentifier:g,isSequenceExpression:b,isSuper:T,thisExpression:S}=a;function insertBefore(e){this._assertUnremoved();const t=this._verifyNodeList(e);const{parentPath:r}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||r.isExportNamedDeclaration()||r.isExportDefaultDeclaration()&&this.isDeclaration()){return r.insertBefore(t)}else if(this.isNodeType("Expression")&&!this.isJSXElement()||r.isForStatement()&&this.key==="init"){if(this.node)t.push(this.node);return this.replaceExpressionWithStatements(t)}else if(Array.isArray(this.container)){return this._containerInsertBefore(t)}else if(this.isStatementOrBlock()){const e=this.node;const r=e&&(!this.isExpressionStatement()||e.expression!=null);this.replaceWith(u(r?[e]:[]));return this.unshiftContainer("body",t)}else{throw new Error("We don't know what to do with this node type. "+"We were previously a Statement but we can't fit in here?")}}function _containerInsert(e,t){this.updateSiblingKeys(e,t.length);const r=[];this.container.splice(e,0,...t);for(let n=0;ne[e.length-1];function isHiddenInSequenceExpression(e){return b(e.parent)&&(last(e.parent.expressions)!==e.node||isHiddenInSequenceExpression(e.parentPath))}function isAlmostConstantAssignment(e,t){if(!h(e)||!g(e.left)){return false}const r=t.getBlockParent();return r.hasOwnBinding(e.left.name)&&r.getOwnBinding(e.left.name).constantViolations.length<=1}function insertAfter(e){this._assertUnremoved();if(this.isSequenceExpression()){return last(this.get("expressions")).insertAfter(e)}const t=this._verifyNodeList(e);const{parentPath:r}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||r.isExportNamedDeclaration()||r.isExportDefaultDeclaration()&&this.isDeclaration()){return r.insertAfter(t.map((e=>y(e)?d(e):e)))}else if(this.isNodeType("Expression")&&!this.isJSXElement()&&!r.isJSXElement()||r.isForStatement()&&this.key==="init"){if(this.node){const e=this.node;let{scope:n}=this;if(n.path.isPattern()){l(e);this.replaceWith(p(o([],e),[]));this.get("callee.body").insertAfter(t);return[this]}if(isHiddenInSequenceExpression(this)){t.unshift(e)}else if(m(e)&&T(e.callee)){t.unshift(e);t.push(S())}else if(isAlmostConstantAssignment(e,n)){t.unshift(e);t.push(f(e.left))}else if(n.isPure(e,true)){t.push(e)}else{if(r.isMethod({computed:true,key:e})){n=n.parent}const s=n.generateDeclaredUidIdentifier();t.unshift(d(c("=",f(s),e)));t.push(d(f(s)))}}return this.replaceExpressionWithStatements(t)}else if(Array.isArray(this.container)){return this._containerInsertAfter(t)}else if(this.isStatementOrBlock()){const e=this.node;const r=e&&(!this.isExpressionStatement()||e.expression!=null);this.replaceWith(u(r?[e]:[]));return this.pushContainer("body",t)}else{throw new Error("We don't know what to do with this node type. "+"We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(e,t){if(!this.parent)return;const r=n.path.get(this.parent);for(const[,n]of r){if(n.key>=e){n.key+=t}}}function _verifyNodeList(e){if(!e){return[]}if(!Array.isArray(e)){e=[e]}for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._assertUnremoved=_assertUnremoved;t._callRemovalHooks=_callRemovalHooks;t._markRemoved=_markRemoved;t._remove=_remove;t._removeFromScope=_removeFromScope;t.remove=remove;var n=r(2472);var s=r(5762);var i=r(3311);function remove(){var e;this._assertUnremoved();this.resync();if(!((e=this.opts)!=null&&e.noScope)){this._removeFromScope()}if(this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings();this._remove();this._markRemoved()}function _removeFromScope(){const e=this.getBindingIdentifiers();Object.keys(e).forEach((e=>this.scope.removeBinding(e)))}function _callRemovalHooks(){for(const e of n.hooks){if(e(this,this.parentPath))return true}}function _remove(){if(Array.isArray(this.container)){this.container.splice(this.key,1);this.updateSiblingKeys(this.key,-1)}else{this._replaceWith(null)}}function _markRemoved(){this._traverseFlags|=i.SHOULD_SKIP|i.REMOVED;if(this.parent)s.path.get(this.parent).delete(this.node);this.node=null}function _assertUnremoved(){if(this.removed){throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}},4006:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._replaceWith=_replaceWith;t.replaceExpressionWithStatements=replaceExpressionWithStatements;t.replaceInline=replaceInline;t.replaceWith=replaceWith;t.replaceWithMultiple=replaceWithMultiple;t.replaceWithSourceString=replaceWithSourceString;var n=r(197);var s=r(7734);var i=r(3311);var a=r(5762);var o=r(9113);var l=r(6953);var c=r(6499);const{FUNCTION_TYPES:u,arrowFunctionExpression:p,assignmentExpression:f,awaitExpression:d,blockStatement:h,callExpression:m,cloneNode:y,expressionStatement:g,identifier:b,inheritLeadingComments:T,inheritTrailingComments:S,inheritsComments:E,isExpression:x,isProgram:P,isStatement:v,removeComments:A,returnStatement:w,toSequenceExpression:I,validate:C,yieldExpression:O}=l;function replaceWithMultiple(e){var t;this.resync();e=this._verifyNodeList(e);T(e[0],this.node);S(e[e.length-1],this.node);(t=a.path.get(this.parent))==null?void 0:t.delete(this.node);this.node=this.container[this.key]=null;const r=this.insertAfter(e);if(this.node){this.requeue()}else{this.remove()}return r}function replaceWithSourceString(e){this.resync();try{e=`(${e})`;e=(0,o.parse)(e)}catch(t){const r=t.loc;if(r){t.message+=" - make sure this is an expression.\n"+(0,n.codeFrameColumns)(e,{start:{line:r.line,column:r.column+1}});t.code="BABEL_REPLACE_SOURCE_ERROR"}throw t}e=e.program.body[0].expression;s.default.removeProperties(e);return this.replaceWith(e)}function replaceWith(e){this.resync();if(this.removed){throw new Error("You can't replace this node, we've already removed it")}if(e instanceof i.default){e=e.node}if(!e){throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead")}if(this.node===e){return[this]}if(this.isProgram()&&!P(e)){throw new Error("You can only replace a Program root node with another Program node")}if(Array.isArray(e)){throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`")}if(typeof e==="string"){throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`")}let t="";if(this.isNodeType("Statement")&&x(e)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)&&!this.parentPath.isExportDefaultDeclaration()){e=g(e);t="expression"}}if(this.isNodeType("Expression")&&v(e)){if(!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e)){return this.replaceExpressionWithStatements([e])}}const r=this.node;if(r){E(e,r);A(r)}this._replaceWith(e);this.type=e.type;this.setScope();this.requeue();return[t?this.get(t):this]}function _replaceWith(e){var t;if(!this.container){throw new ReferenceError("Container is falsy")}if(this.inList){C(this.parent,this.key,[e])}else{C(this.parent,this.key,e)}this.debug(`Replace with ${e==null?void 0:e.type}`);(t=a.path.get(this.parent))==null?void 0:t.set(e,this).delete(this.node);this.node=this.container[this.key]=e}function replaceExpressionWithStatements(e){this.resync();const t=I(e,this.scope);if(t){return this.replaceWith(t)[0].get("expressions")}const r=this.getFunctionParent();const n=r==null?void 0:r.is("async");const i=r==null?void 0:r.is("generator");const a=p([],h(e));this.replaceWith(m(a,[]));const o=this.get("callee");(0,c.default)(o.get("body"),(e=>{this.scope.push({id:e})}),"var");const l=this.get("callee").getCompletionRecords();for(const e of l){if(!e.isExpressionStatement())continue;const t=e.findParent((e=>e.isLoop()));if(t){let r=t.getData("expressionReplacementReturnUid");if(!r){r=o.scope.generateDeclaredUidIdentifier("ret");o.get("body").pushContainer("body",w(y(r)));t.setData("expressionReplacementReturnUid",r)}else{r=b(r.name)}e.get("expression").replaceWith(f("=",y(r),e.node.expression))}else{e.replaceWith(w(e.node.expression))}}o.arrowFunctionToExpression();const g=o;const T=n&&s.default.hasType(this.get("callee.body").node,"AwaitExpression",u);const S=i&&s.default.hasType(this.get("callee.body").node,"YieldExpression",u);if(T){g.set("async",true);if(!S){this.replaceWith(d(this.node))}}if(S){g.set("generator",true);this.replaceWith(O(this.node,true))}return g.get("body.body")}function replaceInline(e){this.resync();if(Array.isArray(e)){if(Array.isArray(this.container)){e=this._verifyNodeList(e);const t=this._containerInsertAfter(e);this.remove();return t}else{return this.replaceWithMultiple(e)}}else{return this.replaceWith(e)}}},8654:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;class Binding{constructor({identifier:e,scope:t,path:r,kind:n}){this.identifier=void 0;this.scope=void 0;this.path=void 0;this.kind=void 0;this.constantViolations=[];this.constant=true;this.referencePaths=[];this.referenced=false;this.references=0;this.identifier=e;this.scope=t;this.path=r;this.kind=n;this.clearValue()}deoptValue(){this.clearValue();this.hasDeoptedValue=true}setValue(e){if(this.hasDeoptedValue)return;this.hasValue=true;this.value=e}clearValue(){this.hasDeoptedValue=false;this.hasValue=false;this.value=null}reassign(e){this.constant=false;if(this.constantViolations.indexOf(e)!==-1){return}this.constantViolations.push(e)}reference(e){if(this.referencePaths.indexOf(e)!==-1){return}this.referenced=true;this.references++;this.referencePaths.push(e)}dereference(){this.references--;this.referenced=!!this.references}}t["default"]=Binding},2593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(3368);var s=r(7734);var i=r(8654);var a=r(6929);var o=r(6953);var l=r(5762);const{NOT_LOCAL_BINDING:c,callExpression:u,cloneNode:p,getBindingIdentifiers:f,identifier:d,isArrayExpression:h,isBinary:m,isClass:y,isClassBody:g,isClassDeclaration:b,isExportAllDeclaration:T,isExportDefaultDeclaration:S,isExportNamedDeclaration:E,isFunctionDeclaration:x,isIdentifier:P,isImportDeclaration:v,isLiteral:A,isMethod:w,isModuleDeclaration:I,isModuleSpecifier:C,isObjectExpression:O,isProperty:k,isPureish:N,isSuper:_,isTaggedTemplateExpression:D,isTemplateLiteral:M,isThisExpression:L,isUnaryExpression:j,isVariableDeclaration:F,matchesPattern:R,memberExpression:B,numericLiteral:U,toIdentifier:K,unaryExpression:$,variableDeclaration:V,variableDeclarator:W,isRecordExpression:q,isTupleExpression:H,isObjectProperty:G,isTopicReference:X,isMetaProperty:J,isPrivateName:z}=o;function gatherNodeParts(e,t){switch(e==null?void 0:e.type){default:if(I(e)){if((T(e)||E(e)||v(e))&&e.source){gatherNodeParts(e.source,t)}else if((E(e)||v(e))&&e.specifiers&&e.specifiers.length){for(const r of e.specifiers)gatherNodeParts(r,t)}else if((S(e)||E(e))&&e.declaration){gatherNodeParts(e.declaration,t)}}else if(C(e)){gatherNodeParts(e.local,t)}else if(A(e)){t.push(e.value)}break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":gatherNodeParts(e.object,t);gatherNodeParts(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":gatherNodeParts(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(const r of e.properties){gatherNodeParts(r,t)}break;case"SpreadElement":case"RestElement":gatherNodeParts(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":gatherNodeParts(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield");gatherNodeParts(e.argument,t);break;case"AwaitExpression":t.push("await");gatherNodeParts(e.argument,t);break;case"AssignmentExpression":gatherNodeParts(e.left,t);break;case"VariableDeclarator":gatherNodeParts(e.id,t);break;case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":gatherNodeParts(e.id,t);break;case"PrivateName":gatherNodeParts(e.id,t);break;case"ParenthesizedExpression":gatherNodeParts(e.expression,t);break;case"UnaryExpression":case"UpdateExpression":gatherNodeParts(e.argument,t);break;case"MetaProperty":gatherNodeParts(e.meta,t);gatherNodeParts(e.property,t);break;case"JSXElement":gatherNodeParts(e.openingElement,t);break;case"JSXOpeningElement":t.push(e.name);break;case"JSXFragment":gatherNodeParts(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":gatherNodeParts(e.namespace,t);gatherNodeParts(e.name,t);break}}const Y={ForStatement(e){const t=e.get("init");if(t.isVar()){const{scope:r}=e;const n=r.getFunctionParent()||r.getProgramParent();n.registerBinding("var",t)}},Declaration(e){if(e.isBlockScoped())return;if(e.isImportDeclaration())return;if(e.isExportDeclaration())return;const t=e.scope.getFunctionParent()||e.scope.getProgramParent();t.registerDeclaration(e)},ImportDeclaration(e){const t=e.scope.getBlockParent();t.registerDeclaration(e)},ReferencedIdentifier(e,t){t.references.push(e)},ForXStatement(e,t){const r=e.get("left");if(r.isPattern()||r.isIdentifier()){t.constantViolations.push(e)}else if(r.isVar()){const{scope:t}=e;const n=t.getFunctionParent()||t.getProgramParent();n.registerBinding("var",r)}},ExportDeclaration:{exit(e){const{node:t,scope:r}=e;if(T(t))return;const n=t.declaration;if(b(n)||x(n)){const t=n.id;if(!t)return;const s=r.getBinding(t.name);s==null?void 0:s.reference(e)}else if(F(n)){for(const t of n.declarations){for(const n of Object.keys(f(t))){const t=r.getBinding(n);t==null?void 0:t.reference(e)}}}}},LabeledStatement(e){e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){if(e.node.operator==="delete"){t.constantViolations.push(e)}},BlockScoped(e){let t=e.scope;if(t.path===e)t=t.parent;const r=t.getBlockParent();r.registerDeclaration(e);if(e.isClassDeclaration()&&e.node.id){const t=e.node.id;const r=t.name;e.scope.bindings[r]=e.scope.parent.getBinding(r)}},CatchClause(e){e.scope.registerBinding("let",e)},Function(e){const t=e.get("params");for(const r of t){e.scope.registerBinding("param",r)}if(e.isFunctionExpression()&&e.has("id")&&!e.get("id").node[c]){e.scope.registerBinding("local",e.get("id"),e)}},ClassExpression(e){if(e.has("id")&&!e.get("id").node[c]){e.scope.registerBinding("local",e)}}};let Q=0;class Scope{constructor(e){this.uid=void 0;this.path=void 0;this.block=void 0;this.labels=void 0;this.inited=void 0;this.bindings=void 0;this.references=void 0;this.globals=void 0;this.uids=void 0;this.data=void 0;this.crawling=void 0;const{node:t}=e;const r=l.scope.get(t);if((r==null?void 0:r.path)===e){return r}l.scope.set(t,this);this.uid=Q++;this.block=t;this.path=e;this.labels=new Map;this.inited=false}get parent(){var e;let t,r=this.path;do{const e=r.key==="key";r=r.parentPath;if(e&&r.isMethod())r=r.parentPath;if(r&&r.isScope())t=r}while(r&&!t);return(e=t)==null?void 0:e.scope}get parentBlock(){return this.path.parent}get hub(){return this.path.hub}traverse(e,t,r){(0,s.default)(e,t,this,r,this.path)}generateDeclaredUidIdentifier(e){const t=this.generateUidIdentifier(e);this.push({id:t});return p(t)}generateUidIdentifier(e){return d(this.generateUid(e))}generateUid(e="temp"){e=K(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");let t;let r=1;do{t=this._generateUid(e,r);r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));const n=this.getProgramParent();n.references[t]=true;n.uids[t]=true;return t}_generateUid(e,t){let r=e;if(t>1)r+=t;return`_${r}`}generateUidBasedOnNode(e,t){const r=[];gatherNodeParts(e,r);let n=r.join("$");n=n.replace(/^_/,"")||t||"ref";return this.generateUid(n.slice(0,20))}generateUidIdentifierBasedOnNode(e,t){return d(this.generateUidBasedOnNode(e,t))}isStatic(e){if(L(e)||_(e)||X(e)){return true}if(P(e)){const t=this.getBinding(e.name);if(t){return t.constant}else{return this.hasBinding(e.name)}}return false}maybeGenerateMemoised(e,t){if(this.isStatic(e)){return null}else{const r=this.generateUidIdentifierBasedOnNode(e);if(!t){this.push({id:r});return p(r)}return r}}checkBlockScopedCollisions(e,t,r,n){if(t==="param")return;if(e.kind==="local")return;const s=t==="let"||e.kind==="let"||e.kind==="const"||e.kind==="module"||e.kind==="param"&&t==="const";if(s){throw this.hub.buildError(n,`Duplicate declaration "${r}"`,TypeError)}}rename(e,t,r){const s=this.getBinding(e);if(s){t=t||this.generateUidIdentifier(e).name;return new n.default(s,e,t).rename(r)}}_renameFromMap(e,t,r,n){if(e[t]){e[r]=n;e[t]=null}}dump(){const e="-".repeat(60);console.log(e);let t=this;do{console.log("#",t.block.type);for(const e of Object.keys(t.bindings)){const r=t.bindings[e];console.log(" -",e,{constant:r.constant,references:r.references,violations:r.constantViolations.length,kind:r.kind})}}while(t=t.parent);console.log(e)}toArray(e,t,r){if(P(e)){const t=this.getBinding(e.name);if(t!=null&&t.constant&&t.path.isGenericType("Array")){return e}}if(h(e)){return e}if(P(e,{name:"arguments"})){return u(B(B(B(d("Array"),d("prototype")),d("slice")),d("call")),[e])}let n;const s=[e];if(t===true){n="toConsumableArray"}else if(t){s.push(U(t));n="slicedToArray"}else{n="toArray"}if(r){s.unshift(this.hub.addHelper(n));n="maybeArrayLike"}return u(this.hub.addHelper(n),s)}hasLabel(e){return!!this.getLabel(e)}getLabel(e){return this.labels.get(e)}registerLabel(e){this.labels.set(e.node.label.name,e)}registerDeclaration(e){if(e.isLabeledStatement()){this.registerLabel(e)}else if(e.isFunctionDeclaration()){this.registerBinding("hoisted",e.get("id"),e)}else if(e.isVariableDeclaration()){const t=e.get("declarations");for(const r of t){this.registerBinding(e.node.kind,r)}}else if(e.isClassDeclaration()){if(e.node.declare)return;this.registerBinding("let",e)}else if(e.isImportDeclaration()){const t=e.get("specifiers");for(const e of t){this.registerBinding("module",e)}}else if(e.isExportDeclaration()){const t=e.get("declaration");if(t.isClassDeclaration()||t.isFunctionDeclaration()||t.isVariableDeclaration()){this.registerDeclaration(t)}}else{this.registerBinding("unknown",e)}}buildUndefinedNode(){return $("void",U(0),true)}registerConstantViolation(e){const t=e.getBindingIdentifiers();for(const r of Object.keys(t)){const t=this.getBinding(r);if(t)t.reassign(e)}}registerBinding(e,t,r=t){if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){const r=t.get("declarations");for(const t of r){this.registerBinding(e,t)}return}const n=this.getProgramParent();const s=t.getOuterBindingIdentifiers(true);for(const t of Object.keys(s)){n.references[t]=true;for(const n of s[t]){const s=this.getOwnBinding(t);if(s){if(s.identifier===n)continue;this.checkBlockScopedCollisions(s,e,t,n)}if(s){this.registerConstantViolation(r)}else{this.bindings[t]=new i.default({identifier:n,scope:this,path:r,kind:e})}}}}addGlobal(e){this.globals[e.name]=e}hasUid(e){let t=this;do{if(t.uids[e])return true}while(t=t.parent);return false}hasGlobal(e){let t=this;do{if(t.globals[e])return true}while(t=t.parent);return false}hasReference(e){return!!this.getProgramParent().references[e]}isPure(e,t){if(P(e)){const r=this.getBinding(e.name);if(!r)return false;if(t)return r.constant;return true}else if(L(e)||J(e)||X(e)||z(e)){return true}else if(y(e)){var r;if(e.superClass&&!this.isPure(e.superClass,t)){return false}if(((r=e.decorators)==null?void 0:r.length)>0){return false}return this.isPure(e.body,t)}else if(g(e)){for(const r of e.body){if(!this.isPure(r,t))return false}return true}else if(m(e)){return this.isPure(e.left,t)&&this.isPure(e.right,t)}else if(h(e)||H(e)){for(const r of e.elements){if(r!==null&&!this.isPure(r,t))return false}return true}else if(O(e)||q(e)){for(const r of e.properties){if(!this.isPure(r,t))return false}return true}else if(w(e)){var n;if(e.computed&&!this.isPure(e.key,t))return false;if(((n=e.decorators)==null?void 0:n.length)>0){return false}return true}else if(k(e)){var s;if(e.computed&&!this.isPure(e.key,t))return false;if(((s=e.decorators)==null?void 0:s.length)>0){return false}if(G(e)||e.static){if(e.value!==null&&!this.isPure(e.value,t)){return false}}return true}else if(j(e)){return this.isPure(e.argument,t)}else if(D(e)){return R(e.tag,"String.raw")&&!this.hasBinding("String",true)&&this.isPure(e.quasi,t)}else if(M(e)){for(const r of e.expressions){if(!this.isPure(r,t))return false}return true}else{return N(e)}}setData(e,t){return this.data[e]=t}getData(e){let t=this;do{const r=t.data[e];if(r!=null)return r}while(t=t.parent)}removeData(e){let t=this;do{const r=t.data[e];if(r!=null)t.data[e]=null}while(t=t.parent)}init(){if(!this.inited){this.inited=true;this.crawl()}}crawl(){const e=this.path;this.references=Object.create(null);this.bindings=Object.create(null);this.globals=Object.create(null);this.uids=Object.create(null);this.data=Object.create(null);const t=this.getProgramParent();if(t.crawling)return;const r={references:[],constantViolations:[],assignments:[]};this.crawling=true;if(e.type!=="Program"&&Y._exploded){for(const t of Y.enter){t(e,r)}const t=Y[e.type];if(t){for(const n of t.enter){n(e,r)}}}e.traverse(Y,r);this.crawling=false;for(const e of r.assignments){const r=e.getBindingIdentifiers();for(const n of Object.keys(r)){if(e.scope.getBinding(n))continue;t.addGlobal(r[n])}e.scope.registerConstantViolation(e)}for(const e of r.references){const r=e.scope.getBinding(e.node.name);if(r){r.reference(e)}else{t.addGlobal(e.node)}}for(const e of r.constantViolations){e.scope.registerConstantViolation(e)}}push(e){let t=this.path;if(t.isPattern()){t=this.getPatternParent().path}else if(!t.isBlockStatement()&&!t.isProgram()){t=this.getBlockParent().path}if(t.isSwitchStatement()){t=(this.getFunctionParent()||this.getProgramParent()).path}if(t.isLoop()||t.isCatchClause()||t.isFunction()){t.ensureBlock();t=t.get("body")}const r=e.unique;const n=e.kind||"var";const s=e._blockHoist==null?2:e._blockHoist;const i=`declaration:${n}:${s}`;let a=!r&&t.getData(i);if(!a){const e=V(n,[]);e._blockHoist=s;[a]=t.unshiftContainer("body",[e]);if(!r)t.setData(i,a)}const o=W(e.id,e.init);const l=a.node.declarations.push(o);t.scope.registerBinding(n,a.get("declarations")[l-1])}getProgramParent(){let e=this;do{if(e.path.isProgram()){return e}}while(e=e.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let e=this;do{if(e.path.isFunctionParent()){return e}}while(e=e.parent);return null}getBlockParent(){let e=this;do{if(e.path.isBlockParent()){return e}}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getPatternParent(){let e=this;do{if(!e.path.isPattern()){return e.getBlockParent()}}while(e=e.parent.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const e=Object.create(null);let t=this;do{for(const r of Object.keys(t.bindings)){if(r in e===false){e[r]=t.bindings[r]}}t=t.parent}while(t);return e}getAllBindingsOfKind(...e){const t=Object.create(null);for(const r of e){let e=this;do{for(const n of Object.keys(e.bindings)){const s=e.bindings[n];if(s.kind===r)t[n]=s}e=e.parent}while(e)}return t}bindingIdentifierEquals(e,t){return this.getBindingIdentifier(e)===t}getBinding(e){let t=this;let r;do{const s=t.getOwnBinding(e);if(s){var n;if((n=r)!=null&&n.isPattern()&&s.kind!=="param"&&s.kind!=="local"){}else{return s}}else if(!s&&e==="arguments"&&t.path.isFunction()&&!t.path.isArrowFunctionExpression()){break}r=t.path}while(t=t.parent)}getOwnBinding(e){return this.bindings[e]}getBindingIdentifier(e){var t;return(t=this.getBinding(e))==null?void 0:t.identifier}getOwnBindingIdentifier(e){const t=this.bindings[e];return t==null?void 0:t.identifier}hasOwnBinding(e){return!!this.getOwnBinding(e)}hasBinding(e,t){if(!e)return false;if(this.hasOwnBinding(e))return true;if(this.parentHasBinding(e,t))return true;if(this.hasUid(e))return true;if(!t&&Scope.globals.includes(e))return true;if(!t&&Scope.contextVariables.includes(e))return true;return false}parentHasBinding(e,t){var r;return(r=this.parent)==null?void 0:r.hasBinding(e,t)}moveBindingTo(e,t){const r=this.getBinding(e);if(r){r.scope.removeOwnBinding(e);r.scope=t;t.bindings[e]=r}}removeOwnBinding(e){delete this.bindings[e]}removeBinding(e){var t;(t=this.getBinding(e))==null?void 0:t.scope.removeOwnBinding(e);let r=this;do{if(r.uids[e]){r.uids[e]=false}}while(r=r.parent)}}t["default"]=Scope;Scope.globals=Object.keys(a.builtin);Scope.contextVariables=["arguments","undefined","Infinity","NaN"]},3368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(8654);var s=r(7696);var i=r(6953);const{VISITOR_KEYS:a,assignmentExpression:o,identifier:l,toExpression:c,variableDeclaration:u,variableDeclarator:p}=i;const f={ReferencedIdentifier({node:e},t){if(e.name===t.oldName){e.name=t.newName}},Scope(e,t){if(!e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)){skipAllButComputedMethodKey(e)}},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;const r=e.getOuterBindingIdentifiers();for(const e in r){if(e===t.oldName)r[e].name=t.newName}}};class Renamer{constructor(e,t,r){this.newName=r;this.oldName=t;this.binding=e}maybeConvertFromExportDeclaration(e){const t=e.parentPath;if(!t.isExportDeclaration()){return}if(t.isExportDefaultDeclaration()&&!t.get("declaration").node.id){return}(0,s.default)(t)}maybeConvertFromClassFunctionDeclaration(e){return;if(!e.isFunctionDeclaration()&&!e.isClassDeclaration())return;if(this.binding.kind!=="hoisted")return;e.node.id=l(this.oldName);e.node._blockHoist=3;e.replaceWith(u("let",[p(l(this.newName),c(e.node))]))}maybeConvertFromClassFunctionExpression(e){return;if(!e.isFunctionExpression()&&!e.isClassExpression())return;if(this.binding.kind!=="local")return;e.node.id=l(this.oldName);this.binding.scope.parent.push({id:l(this.newName)});e.replaceWith(o("=",l(this.newName),e.node))}rename(e){const{binding:t,oldName:r,newName:n}=this;const{scope:s,path:i}=t;const a=i.find((e=>e.isDeclaration()||e.isFunctionExpression()||e.isClassExpression()));if(a){const e=a.getOuterBindingIdentifiers();if(e[r]===t.identifier){this.maybeConvertFromExportDeclaration(a)}}const o=e||s.block;if((o==null?void 0:o.type)==="SwitchStatement"){o.cases.forEach((e=>{s.traverse(e,f,this)}))}else{s.traverse(o,f,this)}if(!e){s.removeOwnBinding(r);s.bindings[n]=t;this.binding.identifier.name=n}if(a){this.maybeConvertFromClassFunctionDeclaration(a);this.maybeConvertFromClassFunctionExpression(a)}}}t["default"]=Renamer;function skipAllButComputedMethodKey(e){if(!e.isMethod()||!e.node.computed){e.skip();return}const t=a[e.type];for(const r of t){if(r!=="key")e.skipKey(r)}}},2084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.traverseNode=traverseNode;var n=r(9876);var s=r(6953);const{VISITOR_KEYS:i}=s;function traverseNode(e,t,r,s,a,o){const l=i[e.type];if(!l)return false;const c=new n.default(r,t,s,a);for(const t of l){if(o&&o[t])continue;if(c.visit(e,t)){return true}}return false}},1788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.explode=explode;t.merge=merge;t.verify=verify;var n=r(714);var s=r(6953);const{DEPRECATED_KEYS:i,FLIPPED_ALIAS_KEYS:a,TYPES:o}=s;function explode(e){if(e._exploded)return e;e._exploded=true;for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=t.split("|");if(r.length===1)continue;const n=e[t];delete e[t];for(const t of r){e[t]=n}}verify(e);delete e.__esModule;ensureEntranceObjects(e);ensureCallbackArrays(e);for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=n[t];if(!r)continue;const s=e[t];for(const e of Object.keys(s)){s[e]=wrapCheck(r,s[e])}delete e[t];if(r.types){for(const t of r.types){if(e[t]){mergePair(e[t],s)}else{e[t]=s}}}else{mergePair(e,s)}}for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=e[t];let n=a[t];const s=i[t];if(s){console.trace(`Visitor defined for ${t} but it has been renamed to ${s}`);n=[s]}if(!n)continue;delete e[t];for(const t of n){const n=e[t];if(n){mergePair(n,r)}else{e[t]=Object.assign({},r)}}}for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;ensureCallbackArrays(e[t])}return e}function verify(e){if(e._verified)return;if(typeof e==="function"){throw new Error("You passed `traverse()` a function when it expected a visitor object, "+"are you sure you didn't mean `{ enter: Function }`?")}for(const t of Object.keys(e)){if(t==="enter"||t==="exit"){validateVisitorMethods(t,e[t])}if(shouldIgnoreKey(t))continue;if(o.indexOf(t)<0){throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type`)}const r=e[t];if(typeof r==="object"){for(const e of Object.keys(r)){if(e==="enter"||e==="exit"){validateVisitorMethods(`${t}.${e}`,r[e])}else{throw new Error("You passed `traverse()` a visitor object with the property "+`${t} that has the invalid property ${e}`)}}}}e._verified=true}function validateVisitorMethods(e,t){const r=[].concat(t);for(const t of r){if(typeof t!=="function"){throw new TypeError(`Non-function found defined in ${e} with type ${typeof t}`)}}}function merge(e,t=[],r){const n={};for(let s=0;se.toString()}return n}));n[s]=i}return n}function ensureEntranceObjects(e){for(const t of Object.keys(e)){if(shouldIgnoreKey(t))continue;const r=e[t];if(typeof r==="function"){e[t]={enter:r}}}}function ensureCallbackArrays(e){if(e.enter&&!Array.isArray(e.enter))e.enter=[e.enter];if(e.exit&&!Array.isArray(e.exit))e.exit=[e.exit]}function wrapCheck(e,t){const newFn=function(r){if(e.checkPath(r)){return t.apply(this,arguments)}};newFn.toString=()=>t.toString();return newFn}function shouldIgnoreKey(e){if(e[0]==="_")return true;if(e==="enter"||e==="exit"||e==="shouldSkip")return true;if(e==="denylist"||e==="noScope"||e==="skipKeys"||e==="blacklist"){return true}return false}function mergePair(e,t){for(const r of Object.keys(t)){e[r]=[].concat(e[r]||[],t[r])}}},1828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=assertNode;var n=r(9598);function assertNode(e){if(!(0,n.default)(e)){var t;const r=(t=e==null?void 0:e.type)!=null?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${r}"`)}}},4155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertAccessor=assertAccessor;t.assertAnyTypeAnnotation=assertAnyTypeAnnotation;t.assertArgumentPlaceholder=assertArgumentPlaceholder;t.assertArrayExpression=assertArrayExpression;t.assertArrayPattern=assertArrayPattern;t.assertArrayTypeAnnotation=assertArrayTypeAnnotation;t.assertArrowFunctionExpression=assertArrowFunctionExpression;t.assertAssignmentExpression=assertAssignmentExpression;t.assertAssignmentPattern=assertAssignmentPattern;t.assertAwaitExpression=assertAwaitExpression;t.assertBigIntLiteral=assertBigIntLiteral;t.assertBinary=assertBinary;t.assertBinaryExpression=assertBinaryExpression;t.assertBindExpression=assertBindExpression;t.assertBlock=assertBlock;t.assertBlockParent=assertBlockParent;t.assertBlockStatement=assertBlockStatement;t.assertBooleanLiteral=assertBooleanLiteral;t.assertBooleanLiteralTypeAnnotation=assertBooleanLiteralTypeAnnotation;t.assertBooleanTypeAnnotation=assertBooleanTypeAnnotation;t.assertBreakStatement=assertBreakStatement;t.assertCallExpression=assertCallExpression;t.assertCatchClause=assertCatchClause;t.assertClass=assertClass;t.assertClassAccessorProperty=assertClassAccessorProperty;t.assertClassBody=assertClassBody;t.assertClassDeclaration=assertClassDeclaration;t.assertClassExpression=assertClassExpression;t.assertClassImplements=assertClassImplements;t.assertClassMethod=assertClassMethod;t.assertClassPrivateMethod=assertClassPrivateMethod;t.assertClassPrivateProperty=assertClassPrivateProperty;t.assertClassProperty=assertClassProperty;t.assertCompletionStatement=assertCompletionStatement;t.assertConditional=assertConditional;t.assertConditionalExpression=assertConditionalExpression;t.assertContinueStatement=assertContinueStatement;t.assertDebuggerStatement=assertDebuggerStatement;t.assertDecimalLiteral=assertDecimalLiteral;t.assertDeclaration=assertDeclaration;t.assertDeclareClass=assertDeclareClass;t.assertDeclareExportAllDeclaration=assertDeclareExportAllDeclaration;t.assertDeclareExportDeclaration=assertDeclareExportDeclaration;t.assertDeclareFunction=assertDeclareFunction;t.assertDeclareInterface=assertDeclareInterface;t.assertDeclareModule=assertDeclareModule;t.assertDeclareModuleExports=assertDeclareModuleExports;t.assertDeclareOpaqueType=assertDeclareOpaqueType;t.assertDeclareTypeAlias=assertDeclareTypeAlias;t.assertDeclareVariable=assertDeclareVariable;t.assertDeclaredPredicate=assertDeclaredPredicate;t.assertDecorator=assertDecorator;t.assertDirective=assertDirective;t.assertDirectiveLiteral=assertDirectiveLiteral;t.assertDoExpression=assertDoExpression;t.assertDoWhileStatement=assertDoWhileStatement;t.assertEmptyStatement=assertEmptyStatement;t.assertEmptyTypeAnnotation=assertEmptyTypeAnnotation;t.assertEnumBody=assertEnumBody;t.assertEnumBooleanBody=assertEnumBooleanBody;t.assertEnumBooleanMember=assertEnumBooleanMember;t.assertEnumDeclaration=assertEnumDeclaration;t.assertEnumDefaultedMember=assertEnumDefaultedMember;t.assertEnumMember=assertEnumMember;t.assertEnumNumberBody=assertEnumNumberBody;t.assertEnumNumberMember=assertEnumNumberMember;t.assertEnumStringBody=assertEnumStringBody;t.assertEnumStringMember=assertEnumStringMember;t.assertEnumSymbolBody=assertEnumSymbolBody;t.assertExistsTypeAnnotation=assertExistsTypeAnnotation;t.assertExportAllDeclaration=assertExportAllDeclaration;t.assertExportDeclaration=assertExportDeclaration;t.assertExportDefaultDeclaration=assertExportDefaultDeclaration;t.assertExportDefaultSpecifier=assertExportDefaultSpecifier;t.assertExportNamedDeclaration=assertExportNamedDeclaration;t.assertExportNamespaceSpecifier=assertExportNamespaceSpecifier;t.assertExportSpecifier=assertExportSpecifier;t.assertExpression=assertExpression;t.assertExpressionStatement=assertExpressionStatement;t.assertExpressionWrapper=assertExpressionWrapper;t.assertFile=assertFile;t.assertFlow=assertFlow;t.assertFlowBaseAnnotation=assertFlowBaseAnnotation;t.assertFlowDeclaration=assertFlowDeclaration;t.assertFlowPredicate=assertFlowPredicate;t.assertFlowType=assertFlowType;t.assertFor=assertFor;t.assertForInStatement=assertForInStatement;t.assertForOfStatement=assertForOfStatement;t.assertForStatement=assertForStatement;t.assertForXStatement=assertForXStatement;t.assertFunction=assertFunction;t.assertFunctionDeclaration=assertFunctionDeclaration;t.assertFunctionExpression=assertFunctionExpression;t.assertFunctionParent=assertFunctionParent;t.assertFunctionTypeAnnotation=assertFunctionTypeAnnotation;t.assertFunctionTypeParam=assertFunctionTypeParam;t.assertGenericTypeAnnotation=assertGenericTypeAnnotation;t.assertIdentifier=assertIdentifier;t.assertIfStatement=assertIfStatement;t.assertImmutable=assertImmutable;t.assertImport=assertImport;t.assertImportAttribute=assertImportAttribute;t.assertImportDeclaration=assertImportDeclaration;t.assertImportDefaultSpecifier=assertImportDefaultSpecifier;t.assertImportNamespaceSpecifier=assertImportNamespaceSpecifier;t.assertImportSpecifier=assertImportSpecifier;t.assertIndexedAccessType=assertIndexedAccessType;t.assertInferredPredicate=assertInferredPredicate;t.assertInterfaceDeclaration=assertInterfaceDeclaration;t.assertInterfaceExtends=assertInterfaceExtends;t.assertInterfaceTypeAnnotation=assertInterfaceTypeAnnotation;t.assertInterpreterDirective=assertInterpreterDirective;t.assertIntersectionTypeAnnotation=assertIntersectionTypeAnnotation;t.assertJSX=assertJSX;t.assertJSXAttribute=assertJSXAttribute;t.assertJSXClosingElement=assertJSXClosingElement;t.assertJSXClosingFragment=assertJSXClosingFragment;t.assertJSXElement=assertJSXElement;t.assertJSXEmptyExpression=assertJSXEmptyExpression;t.assertJSXExpressionContainer=assertJSXExpressionContainer;t.assertJSXFragment=assertJSXFragment;t.assertJSXIdentifier=assertJSXIdentifier;t.assertJSXMemberExpression=assertJSXMemberExpression;t.assertJSXNamespacedName=assertJSXNamespacedName;t.assertJSXOpeningElement=assertJSXOpeningElement;t.assertJSXOpeningFragment=assertJSXOpeningFragment;t.assertJSXSpreadAttribute=assertJSXSpreadAttribute;t.assertJSXSpreadChild=assertJSXSpreadChild;t.assertJSXText=assertJSXText;t.assertLVal=assertLVal;t.assertLabeledStatement=assertLabeledStatement;t.assertLiteral=assertLiteral;t.assertLogicalExpression=assertLogicalExpression;t.assertLoop=assertLoop;t.assertMemberExpression=assertMemberExpression;t.assertMetaProperty=assertMetaProperty;t.assertMethod=assertMethod;t.assertMiscellaneous=assertMiscellaneous;t.assertMixedTypeAnnotation=assertMixedTypeAnnotation;t.assertModuleDeclaration=assertModuleDeclaration;t.assertModuleExpression=assertModuleExpression;t.assertModuleSpecifier=assertModuleSpecifier;t.assertNewExpression=assertNewExpression;t.assertNoop=assertNoop;t.assertNullLiteral=assertNullLiteral;t.assertNullLiteralTypeAnnotation=assertNullLiteralTypeAnnotation;t.assertNullableTypeAnnotation=assertNullableTypeAnnotation;t.assertNumberLiteral=assertNumberLiteral;t.assertNumberLiteralTypeAnnotation=assertNumberLiteralTypeAnnotation;t.assertNumberTypeAnnotation=assertNumberTypeAnnotation;t.assertNumericLiteral=assertNumericLiteral;t.assertObjectExpression=assertObjectExpression;t.assertObjectMember=assertObjectMember;t.assertObjectMethod=assertObjectMethod;t.assertObjectPattern=assertObjectPattern;t.assertObjectProperty=assertObjectProperty;t.assertObjectTypeAnnotation=assertObjectTypeAnnotation;t.assertObjectTypeCallProperty=assertObjectTypeCallProperty;t.assertObjectTypeIndexer=assertObjectTypeIndexer;t.assertObjectTypeInternalSlot=assertObjectTypeInternalSlot;t.assertObjectTypeProperty=assertObjectTypeProperty;t.assertObjectTypeSpreadProperty=assertObjectTypeSpreadProperty;t.assertOpaqueType=assertOpaqueType;t.assertOptionalCallExpression=assertOptionalCallExpression;t.assertOptionalIndexedAccessType=assertOptionalIndexedAccessType;t.assertOptionalMemberExpression=assertOptionalMemberExpression;t.assertParenthesizedExpression=assertParenthesizedExpression;t.assertPattern=assertPattern;t.assertPatternLike=assertPatternLike;t.assertPipelineBareFunction=assertPipelineBareFunction;t.assertPipelinePrimaryTopicReference=assertPipelinePrimaryTopicReference;t.assertPipelineTopicExpression=assertPipelineTopicExpression;t.assertPlaceholder=assertPlaceholder;t.assertPrivate=assertPrivate;t.assertPrivateName=assertPrivateName;t.assertProgram=assertProgram;t.assertProperty=assertProperty;t.assertPureish=assertPureish;t.assertQualifiedTypeIdentifier=assertQualifiedTypeIdentifier;t.assertRecordExpression=assertRecordExpression;t.assertRegExpLiteral=assertRegExpLiteral;t.assertRegexLiteral=assertRegexLiteral;t.assertRestElement=assertRestElement;t.assertRestProperty=assertRestProperty;t.assertReturnStatement=assertReturnStatement;t.assertScopable=assertScopable;t.assertSequenceExpression=assertSequenceExpression;t.assertSpreadElement=assertSpreadElement;t.assertSpreadProperty=assertSpreadProperty;t.assertStandardized=assertStandardized;t.assertStatement=assertStatement;t.assertStaticBlock=assertStaticBlock;t.assertStringLiteral=assertStringLiteral;t.assertStringLiteralTypeAnnotation=assertStringLiteralTypeAnnotation;t.assertStringTypeAnnotation=assertStringTypeAnnotation;t.assertSuper=assertSuper;t.assertSwitchCase=assertSwitchCase;t.assertSwitchStatement=assertSwitchStatement;t.assertSymbolTypeAnnotation=assertSymbolTypeAnnotation;t.assertTSAnyKeyword=assertTSAnyKeyword;t.assertTSArrayType=assertTSArrayType;t.assertTSAsExpression=assertTSAsExpression;t.assertTSBaseType=assertTSBaseType;t.assertTSBigIntKeyword=assertTSBigIntKeyword;t.assertTSBooleanKeyword=assertTSBooleanKeyword;t.assertTSCallSignatureDeclaration=assertTSCallSignatureDeclaration;t.assertTSConditionalType=assertTSConditionalType;t.assertTSConstructSignatureDeclaration=assertTSConstructSignatureDeclaration;t.assertTSConstructorType=assertTSConstructorType;t.assertTSDeclareFunction=assertTSDeclareFunction;t.assertTSDeclareMethod=assertTSDeclareMethod;t.assertTSEntityName=assertTSEntityName;t.assertTSEnumDeclaration=assertTSEnumDeclaration;t.assertTSEnumMember=assertTSEnumMember;t.assertTSExportAssignment=assertTSExportAssignment;t.assertTSExpressionWithTypeArguments=assertTSExpressionWithTypeArguments;t.assertTSExternalModuleReference=assertTSExternalModuleReference;t.assertTSFunctionType=assertTSFunctionType;t.assertTSImportEqualsDeclaration=assertTSImportEqualsDeclaration;t.assertTSImportType=assertTSImportType;t.assertTSIndexSignature=assertTSIndexSignature;t.assertTSIndexedAccessType=assertTSIndexedAccessType;t.assertTSInferType=assertTSInferType;t.assertTSInstantiationExpression=assertTSInstantiationExpression;t.assertTSInterfaceBody=assertTSInterfaceBody;t.assertTSInterfaceDeclaration=assertTSInterfaceDeclaration;t.assertTSIntersectionType=assertTSIntersectionType;t.assertTSIntrinsicKeyword=assertTSIntrinsicKeyword;t.assertTSLiteralType=assertTSLiteralType;t.assertTSMappedType=assertTSMappedType;t.assertTSMethodSignature=assertTSMethodSignature;t.assertTSModuleBlock=assertTSModuleBlock;t.assertTSModuleDeclaration=assertTSModuleDeclaration;t.assertTSNamedTupleMember=assertTSNamedTupleMember;t.assertTSNamespaceExportDeclaration=assertTSNamespaceExportDeclaration;t.assertTSNeverKeyword=assertTSNeverKeyword;t.assertTSNonNullExpression=assertTSNonNullExpression;t.assertTSNullKeyword=assertTSNullKeyword;t.assertTSNumberKeyword=assertTSNumberKeyword;t.assertTSObjectKeyword=assertTSObjectKeyword;t.assertTSOptionalType=assertTSOptionalType;t.assertTSParameterProperty=assertTSParameterProperty;t.assertTSParenthesizedType=assertTSParenthesizedType;t.assertTSPropertySignature=assertTSPropertySignature;t.assertTSQualifiedName=assertTSQualifiedName;t.assertTSRestType=assertTSRestType;t.assertTSStringKeyword=assertTSStringKeyword;t.assertTSSymbolKeyword=assertTSSymbolKeyword;t.assertTSThisType=assertTSThisType;t.assertTSTupleType=assertTSTupleType;t.assertTSType=assertTSType;t.assertTSTypeAliasDeclaration=assertTSTypeAliasDeclaration;t.assertTSTypeAnnotation=assertTSTypeAnnotation;t.assertTSTypeAssertion=assertTSTypeAssertion;t.assertTSTypeElement=assertTSTypeElement;t.assertTSTypeLiteral=assertTSTypeLiteral;t.assertTSTypeOperator=assertTSTypeOperator;t.assertTSTypeParameter=assertTSTypeParameter;t.assertTSTypeParameterDeclaration=assertTSTypeParameterDeclaration;t.assertTSTypeParameterInstantiation=assertTSTypeParameterInstantiation;t.assertTSTypePredicate=assertTSTypePredicate;t.assertTSTypeQuery=assertTSTypeQuery;t.assertTSTypeReference=assertTSTypeReference;t.assertTSUndefinedKeyword=assertTSUndefinedKeyword;t.assertTSUnionType=assertTSUnionType;t.assertTSUnknownKeyword=assertTSUnknownKeyword;t.assertTSVoidKeyword=assertTSVoidKeyword;t.assertTaggedTemplateExpression=assertTaggedTemplateExpression;t.assertTemplateElement=assertTemplateElement;t.assertTemplateLiteral=assertTemplateLiteral;t.assertTerminatorless=assertTerminatorless;t.assertThisExpression=assertThisExpression;t.assertThisTypeAnnotation=assertThisTypeAnnotation;t.assertThrowStatement=assertThrowStatement;t.assertTopicReference=assertTopicReference;t.assertTryStatement=assertTryStatement;t.assertTupleExpression=assertTupleExpression;t.assertTupleTypeAnnotation=assertTupleTypeAnnotation;t.assertTypeAlias=assertTypeAlias;t.assertTypeAnnotation=assertTypeAnnotation;t.assertTypeCastExpression=assertTypeCastExpression;t.assertTypeParameter=assertTypeParameter;t.assertTypeParameterDeclaration=assertTypeParameterDeclaration;t.assertTypeParameterInstantiation=assertTypeParameterInstantiation;t.assertTypeScript=assertTypeScript;t.assertTypeofTypeAnnotation=assertTypeofTypeAnnotation;t.assertUnaryExpression=assertUnaryExpression;t.assertUnaryLike=assertUnaryLike;t.assertUnionTypeAnnotation=assertUnionTypeAnnotation;t.assertUpdateExpression=assertUpdateExpression;t.assertUserWhitespacable=assertUserWhitespacable;t.assertV8IntrinsicIdentifier=assertV8IntrinsicIdentifier;t.assertVariableDeclaration=assertVariableDeclaration;t.assertVariableDeclarator=assertVariableDeclarator;t.assertVariance=assertVariance;t.assertVoidTypeAnnotation=assertVoidTypeAnnotation;t.assertWhile=assertWhile;t.assertWhileStatement=assertWhileStatement;t.assertWithStatement=assertWithStatement;t.assertYieldExpression=assertYieldExpression;var n=r(4420);function assert(e,t,r){if(!(0,n.default)(e,t,r)){throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, `+`but instead got "${t.type}".`)}}function assertArrayExpression(e,t){assert("ArrayExpression",e,t)}function assertAssignmentExpression(e,t){assert("AssignmentExpression",e,t)}function assertBinaryExpression(e,t){assert("BinaryExpression",e,t)}function assertInterpreterDirective(e,t){assert("InterpreterDirective",e,t)}function assertDirective(e,t){assert("Directive",e,t)}function assertDirectiveLiteral(e,t){assert("DirectiveLiteral",e,t)}function assertBlockStatement(e,t){assert("BlockStatement",e,t)}function assertBreakStatement(e,t){assert("BreakStatement",e,t)}function assertCallExpression(e,t){assert("CallExpression",e,t)}function assertCatchClause(e,t){assert("CatchClause",e,t)}function assertConditionalExpression(e,t){assert("ConditionalExpression",e,t)}function assertContinueStatement(e,t){assert("ContinueStatement",e,t)}function assertDebuggerStatement(e,t){assert("DebuggerStatement",e,t)}function assertDoWhileStatement(e,t){assert("DoWhileStatement",e,t)}function assertEmptyStatement(e,t){assert("EmptyStatement",e,t)}function assertExpressionStatement(e,t){assert("ExpressionStatement",e,t)}function assertFile(e,t){assert("File",e,t)}function assertForInStatement(e,t){assert("ForInStatement",e,t)}function assertForStatement(e,t){assert("ForStatement",e,t)}function assertFunctionDeclaration(e,t){assert("FunctionDeclaration",e,t)}function assertFunctionExpression(e,t){assert("FunctionExpression",e,t)}function assertIdentifier(e,t){assert("Identifier",e,t)}function assertIfStatement(e,t){assert("IfStatement",e,t)}function assertLabeledStatement(e,t){assert("LabeledStatement",e,t)}function assertStringLiteral(e,t){assert("StringLiteral",e,t)}function assertNumericLiteral(e,t){assert("NumericLiteral",e,t)}function assertNullLiteral(e,t){assert("NullLiteral",e,t)}function assertBooleanLiteral(e,t){assert("BooleanLiteral",e,t)}function assertRegExpLiteral(e,t){assert("RegExpLiteral",e,t)}function assertLogicalExpression(e,t){assert("LogicalExpression",e,t)}function assertMemberExpression(e,t){assert("MemberExpression",e,t)}function assertNewExpression(e,t){assert("NewExpression",e,t)}function assertProgram(e,t){assert("Program",e,t)}function assertObjectExpression(e,t){assert("ObjectExpression",e,t)}function assertObjectMethod(e,t){assert("ObjectMethod",e,t)}function assertObjectProperty(e,t){assert("ObjectProperty",e,t)}function assertRestElement(e,t){assert("RestElement",e,t)}function assertReturnStatement(e,t){assert("ReturnStatement",e,t)}function assertSequenceExpression(e,t){assert("SequenceExpression",e,t)}function assertParenthesizedExpression(e,t){assert("ParenthesizedExpression",e,t)}function assertSwitchCase(e,t){assert("SwitchCase",e,t)}function assertSwitchStatement(e,t){assert("SwitchStatement",e,t)}function assertThisExpression(e,t){assert("ThisExpression",e,t)}function assertThrowStatement(e,t){assert("ThrowStatement",e,t)}function assertTryStatement(e,t){assert("TryStatement",e,t)}function assertUnaryExpression(e,t){assert("UnaryExpression",e,t)}function assertUpdateExpression(e,t){assert("UpdateExpression",e,t)}function assertVariableDeclaration(e,t){assert("VariableDeclaration",e,t)}function assertVariableDeclarator(e,t){assert("VariableDeclarator",e,t)}function assertWhileStatement(e,t){assert("WhileStatement",e,t)}function assertWithStatement(e,t){assert("WithStatement",e,t)}function assertAssignmentPattern(e,t){assert("AssignmentPattern",e,t)}function assertArrayPattern(e,t){assert("ArrayPattern",e,t)}function assertArrowFunctionExpression(e,t){assert("ArrowFunctionExpression",e,t)}function assertClassBody(e,t){assert("ClassBody",e,t)}function assertClassExpression(e,t){assert("ClassExpression",e,t)}function assertClassDeclaration(e,t){assert("ClassDeclaration",e,t)}function assertExportAllDeclaration(e,t){assert("ExportAllDeclaration",e,t)}function assertExportDefaultDeclaration(e,t){assert("ExportDefaultDeclaration",e,t)}function assertExportNamedDeclaration(e,t){assert("ExportNamedDeclaration",e,t)}function assertExportSpecifier(e,t){assert("ExportSpecifier",e,t)}function assertForOfStatement(e,t){assert("ForOfStatement",e,t)}function assertImportDeclaration(e,t){assert("ImportDeclaration",e,t)}function assertImportDefaultSpecifier(e,t){assert("ImportDefaultSpecifier",e,t)}function assertImportNamespaceSpecifier(e,t){assert("ImportNamespaceSpecifier",e,t)}function assertImportSpecifier(e,t){assert("ImportSpecifier",e,t)}function assertMetaProperty(e,t){assert("MetaProperty",e,t)}function assertClassMethod(e,t){assert("ClassMethod",e,t)}function assertObjectPattern(e,t){assert("ObjectPattern",e,t)}function assertSpreadElement(e,t){assert("SpreadElement",e,t)}function assertSuper(e,t){assert("Super",e,t)}function assertTaggedTemplateExpression(e,t){assert("TaggedTemplateExpression",e,t)}function assertTemplateElement(e,t){assert("TemplateElement",e,t)}function assertTemplateLiteral(e,t){assert("TemplateLiteral",e,t)}function assertYieldExpression(e,t){assert("YieldExpression",e,t)}function assertAwaitExpression(e,t){assert("AwaitExpression",e,t)}function assertImport(e,t){assert("Import",e,t)}function assertBigIntLiteral(e,t){assert("BigIntLiteral",e,t)}function assertExportNamespaceSpecifier(e,t){assert("ExportNamespaceSpecifier",e,t)}function assertOptionalMemberExpression(e,t){assert("OptionalMemberExpression",e,t)}function assertOptionalCallExpression(e,t){assert("OptionalCallExpression",e,t)}function assertClassProperty(e,t){assert("ClassProperty",e,t)}function assertClassAccessorProperty(e,t){assert("ClassAccessorProperty",e,t)}function assertClassPrivateProperty(e,t){assert("ClassPrivateProperty",e,t)}function assertClassPrivateMethod(e,t){assert("ClassPrivateMethod",e,t)}function assertPrivateName(e,t){assert("PrivateName",e,t)}function assertStaticBlock(e,t){assert("StaticBlock",e,t)}function assertAnyTypeAnnotation(e,t){assert("AnyTypeAnnotation",e,t)}function assertArrayTypeAnnotation(e,t){assert("ArrayTypeAnnotation",e,t)}function assertBooleanTypeAnnotation(e,t){assert("BooleanTypeAnnotation",e,t)}function assertBooleanLiteralTypeAnnotation(e,t){assert("BooleanLiteralTypeAnnotation",e,t)}function assertNullLiteralTypeAnnotation(e,t){assert("NullLiteralTypeAnnotation",e,t)}function assertClassImplements(e,t){assert("ClassImplements",e,t)}function assertDeclareClass(e,t){assert("DeclareClass",e,t)}function assertDeclareFunction(e,t){assert("DeclareFunction",e,t)}function assertDeclareInterface(e,t){assert("DeclareInterface",e,t)}function assertDeclareModule(e,t){assert("DeclareModule",e,t)}function assertDeclareModuleExports(e,t){assert("DeclareModuleExports",e,t)}function assertDeclareTypeAlias(e,t){assert("DeclareTypeAlias",e,t)}function assertDeclareOpaqueType(e,t){assert("DeclareOpaqueType",e,t)}function assertDeclareVariable(e,t){assert("DeclareVariable",e,t)}function assertDeclareExportDeclaration(e,t){assert("DeclareExportDeclaration",e,t)}function assertDeclareExportAllDeclaration(e,t){assert("DeclareExportAllDeclaration",e,t)}function assertDeclaredPredicate(e,t){assert("DeclaredPredicate",e,t)}function assertExistsTypeAnnotation(e,t){assert("ExistsTypeAnnotation",e,t)}function assertFunctionTypeAnnotation(e,t){assert("FunctionTypeAnnotation",e,t)}function assertFunctionTypeParam(e,t){assert("FunctionTypeParam",e,t)}function assertGenericTypeAnnotation(e,t){assert("GenericTypeAnnotation",e,t)}function assertInferredPredicate(e,t){assert("InferredPredicate",e,t)}function assertInterfaceExtends(e,t){assert("InterfaceExtends",e,t)}function assertInterfaceDeclaration(e,t){assert("InterfaceDeclaration",e,t)}function assertInterfaceTypeAnnotation(e,t){assert("InterfaceTypeAnnotation",e,t)}function assertIntersectionTypeAnnotation(e,t){assert("IntersectionTypeAnnotation",e,t)}function assertMixedTypeAnnotation(e,t){assert("MixedTypeAnnotation",e,t)}function assertEmptyTypeAnnotation(e,t){assert("EmptyTypeAnnotation",e,t)}function assertNullableTypeAnnotation(e,t){assert("NullableTypeAnnotation",e,t)}function assertNumberLiteralTypeAnnotation(e,t){assert("NumberLiteralTypeAnnotation",e,t)}function assertNumberTypeAnnotation(e,t){assert("NumberTypeAnnotation",e,t)}function assertObjectTypeAnnotation(e,t){assert("ObjectTypeAnnotation",e,t)}function assertObjectTypeInternalSlot(e,t){assert("ObjectTypeInternalSlot",e,t)}function assertObjectTypeCallProperty(e,t){assert("ObjectTypeCallProperty",e,t)}function assertObjectTypeIndexer(e,t){assert("ObjectTypeIndexer",e,t)}function assertObjectTypeProperty(e,t){assert("ObjectTypeProperty",e,t)}function assertObjectTypeSpreadProperty(e,t){assert("ObjectTypeSpreadProperty",e,t)}function assertOpaqueType(e,t){assert("OpaqueType",e,t)}function assertQualifiedTypeIdentifier(e,t){assert("QualifiedTypeIdentifier",e,t)}function assertStringLiteralTypeAnnotation(e,t){assert("StringLiteralTypeAnnotation",e,t)}function assertStringTypeAnnotation(e,t){assert("StringTypeAnnotation",e,t)}function assertSymbolTypeAnnotation(e,t){assert("SymbolTypeAnnotation",e,t)}function assertThisTypeAnnotation(e,t){assert("ThisTypeAnnotation",e,t)}function assertTupleTypeAnnotation(e,t){assert("TupleTypeAnnotation",e,t)}function assertTypeofTypeAnnotation(e,t){assert("TypeofTypeAnnotation",e,t)}function assertTypeAlias(e,t){assert("TypeAlias",e,t)}function assertTypeAnnotation(e,t){assert("TypeAnnotation",e,t)}function assertTypeCastExpression(e,t){assert("TypeCastExpression",e,t)}function assertTypeParameter(e,t){assert("TypeParameter",e,t)}function assertTypeParameterDeclaration(e,t){assert("TypeParameterDeclaration",e,t)}function assertTypeParameterInstantiation(e,t){assert("TypeParameterInstantiation",e,t)}function assertUnionTypeAnnotation(e,t){assert("UnionTypeAnnotation",e,t)}function assertVariance(e,t){assert("Variance",e,t)}function assertVoidTypeAnnotation(e,t){assert("VoidTypeAnnotation",e,t)}function assertEnumDeclaration(e,t){assert("EnumDeclaration",e,t)}function assertEnumBooleanBody(e,t){assert("EnumBooleanBody",e,t)}function assertEnumNumberBody(e,t){assert("EnumNumberBody",e,t)}function assertEnumStringBody(e,t){assert("EnumStringBody",e,t)}function assertEnumSymbolBody(e,t){assert("EnumSymbolBody",e,t)}function assertEnumBooleanMember(e,t){assert("EnumBooleanMember",e,t)}function assertEnumNumberMember(e,t){assert("EnumNumberMember",e,t)}function assertEnumStringMember(e,t){assert("EnumStringMember",e,t)}function assertEnumDefaultedMember(e,t){assert("EnumDefaultedMember",e,t)}function assertIndexedAccessType(e,t){assert("IndexedAccessType",e,t)}function assertOptionalIndexedAccessType(e,t){assert("OptionalIndexedAccessType",e,t)}function assertJSXAttribute(e,t){assert("JSXAttribute",e,t)}function assertJSXClosingElement(e,t){assert("JSXClosingElement",e,t)}function assertJSXElement(e,t){assert("JSXElement",e,t)}function assertJSXEmptyExpression(e,t){assert("JSXEmptyExpression",e,t)}function assertJSXExpressionContainer(e,t){assert("JSXExpressionContainer",e,t)}function assertJSXSpreadChild(e,t){assert("JSXSpreadChild",e,t)}function assertJSXIdentifier(e,t){assert("JSXIdentifier",e,t)}function assertJSXMemberExpression(e,t){assert("JSXMemberExpression",e,t)}function assertJSXNamespacedName(e,t){assert("JSXNamespacedName",e,t)}function assertJSXOpeningElement(e,t){assert("JSXOpeningElement",e,t)}function assertJSXSpreadAttribute(e,t){assert("JSXSpreadAttribute",e,t)}function assertJSXText(e,t){assert("JSXText",e,t)}function assertJSXFragment(e,t){assert("JSXFragment",e,t)}function assertJSXOpeningFragment(e,t){assert("JSXOpeningFragment",e,t)}function assertJSXClosingFragment(e,t){assert("JSXClosingFragment",e,t)}function assertNoop(e,t){assert("Noop",e,t)}function assertPlaceholder(e,t){assert("Placeholder",e,t)}function assertV8IntrinsicIdentifier(e,t){assert("V8IntrinsicIdentifier",e,t)}function assertArgumentPlaceholder(e,t){assert("ArgumentPlaceholder",e,t)}function assertBindExpression(e,t){assert("BindExpression",e,t)}function assertImportAttribute(e,t){assert("ImportAttribute",e,t)}function assertDecorator(e,t){assert("Decorator",e,t)}function assertDoExpression(e,t){assert("DoExpression",e,t)}function assertExportDefaultSpecifier(e,t){assert("ExportDefaultSpecifier",e,t)}function assertRecordExpression(e,t){assert("RecordExpression",e,t)}function assertTupleExpression(e,t){assert("TupleExpression",e,t)}function assertDecimalLiteral(e,t){assert("DecimalLiteral",e,t)}function assertModuleExpression(e,t){assert("ModuleExpression",e,t)}function assertTopicReference(e,t){assert("TopicReference",e,t)}function assertPipelineTopicExpression(e,t){assert("PipelineTopicExpression",e,t)}function assertPipelineBareFunction(e,t){assert("PipelineBareFunction",e,t)}function assertPipelinePrimaryTopicReference(e,t){assert("PipelinePrimaryTopicReference",e,t)}function assertTSParameterProperty(e,t){assert("TSParameterProperty",e,t)}function assertTSDeclareFunction(e,t){assert("TSDeclareFunction",e,t)}function assertTSDeclareMethod(e,t){assert("TSDeclareMethod",e,t)}function assertTSQualifiedName(e,t){assert("TSQualifiedName",e,t)}function assertTSCallSignatureDeclaration(e,t){assert("TSCallSignatureDeclaration",e,t)}function assertTSConstructSignatureDeclaration(e,t){assert("TSConstructSignatureDeclaration",e,t)}function assertTSPropertySignature(e,t){assert("TSPropertySignature",e,t)}function assertTSMethodSignature(e,t){assert("TSMethodSignature",e,t)}function assertTSIndexSignature(e,t){assert("TSIndexSignature",e,t)}function assertTSAnyKeyword(e,t){assert("TSAnyKeyword",e,t)}function assertTSBooleanKeyword(e,t){assert("TSBooleanKeyword",e,t)}function assertTSBigIntKeyword(e,t){assert("TSBigIntKeyword",e,t)}function assertTSIntrinsicKeyword(e,t){assert("TSIntrinsicKeyword",e,t)}function assertTSNeverKeyword(e,t){assert("TSNeverKeyword",e,t)}function assertTSNullKeyword(e,t){assert("TSNullKeyword",e,t)}function assertTSNumberKeyword(e,t){assert("TSNumberKeyword",e,t)}function assertTSObjectKeyword(e,t){assert("TSObjectKeyword",e,t)}function assertTSStringKeyword(e,t){assert("TSStringKeyword",e,t)}function assertTSSymbolKeyword(e,t){assert("TSSymbolKeyword",e,t)}function assertTSUndefinedKeyword(e,t){assert("TSUndefinedKeyword",e,t)}function assertTSUnknownKeyword(e,t){assert("TSUnknownKeyword",e,t)}function assertTSVoidKeyword(e,t){assert("TSVoidKeyword",e,t)}function assertTSThisType(e,t){assert("TSThisType",e,t)}function assertTSFunctionType(e,t){assert("TSFunctionType",e,t)}function assertTSConstructorType(e,t){assert("TSConstructorType",e,t)}function assertTSTypeReference(e,t){assert("TSTypeReference",e,t)}function assertTSTypePredicate(e,t){assert("TSTypePredicate",e,t)}function assertTSTypeQuery(e,t){assert("TSTypeQuery",e,t)}function assertTSTypeLiteral(e,t){assert("TSTypeLiteral",e,t)}function assertTSArrayType(e,t){assert("TSArrayType",e,t)}function assertTSTupleType(e,t){assert("TSTupleType",e,t)}function assertTSOptionalType(e,t){assert("TSOptionalType",e,t)}function assertTSRestType(e,t){assert("TSRestType",e,t)}function assertTSNamedTupleMember(e,t){assert("TSNamedTupleMember",e,t)}function assertTSUnionType(e,t){assert("TSUnionType",e,t)}function assertTSIntersectionType(e,t){assert("TSIntersectionType",e,t)}function assertTSConditionalType(e,t){assert("TSConditionalType",e,t)}function assertTSInferType(e,t){assert("TSInferType",e,t)}function assertTSParenthesizedType(e,t){assert("TSParenthesizedType",e,t)}function assertTSTypeOperator(e,t){assert("TSTypeOperator",e,t)}function assertTSIndexedAccessType(e,t){assert("TSIndexedAccessType",e,t)}function assertTSMappedType(e,t){assert("TSMappedType",e,t)}function assertTSLiteralType(e,t){assert("TSLiteralType",e,t)}function assertTSExpressionWithTypeArguments(e,t){assert("TSExpressionWithTypeArguments",e,t)}function assertTSInterfaceDeclaration(e,t){assert("TSInterfaceDeclaration",e,t)}function assertTSInterfaceBody(e,t){assert("TSInterfaceBody",e,t)}function assertTSTypeAliasDeclaration(e,t){assert("TSTypeAliasDeclaration",e,t)}function assertTSInstantiationExpression(e,t){assert("TSInstantiationExpression",e,t)}function assertTSAsExpression(e,t){assert("TSAsExpression",e,t)}function assertTSTypeAssertion(e,t){assert("TSTypeAssertion",e,t)}function assertTSEnumDeclaration(e,t){assert("TSEnumDeclaration",e,t)}function assertTSEnumMember(e,t){assert("TSEnumMember",e,t)}function assertTSModuleDeclaration(e,t){assert("TSModuleDeclaration",e,t)}function assertTSModuleBlock(e,t){assert("TSModuleBlock",e,t)}function assertTSImportType(e,t){assert("TSImportType",e,t)}function assertTSImportEqualsDeclaration(e,t){assert("TSImportEqualsDeclaration",e,t)}function assertTSExternalModuleReference(e,t){assert("TSExternalModuleReference",e,t)}function assertTSNonNullExpression(e,t){assert("TSNonNullExpression",e,t)}function assertTSExportAssignment(e,t){assert("TSExportAssignment",e,t)}function assertTSNamespaceExportDeclaration(e,t){assert("TSNamespaceExportDeclaration",e,t)}function assertTSTypeAnnotation(e,t){assert("TSTypeAnnotation",e,t)}function assertTSTypeParameterInstantiation(e,t){assert("TSTypeParameterInstantiation",e,t)}function assertTSTypeParameterDeclaration(e,t){assert("TSTypeParameterDeclaration",e,t)}function assertTSTypeParameter(e,t){assert("TSTypeParameter",e,t)}function assertStandardized(e,t){assert("Standardized",e,t)}function assertExpression(e,t){assert("Expression",e,t)}function assertBinary(e,t){assert("Binary",e,t)}function assertScopable(e,t){assert("Scopable",e,t)}function assertBlockParent(e,t){assert("BlockParent",e,t)}function assertBlock(e,t){assert("Block",e,t)}function assertStatement(e,t){assert("Statement",e,t)}function assertTerminatorless(e,t){assert("Terminatorless",e,t)}function assertCompletionStatement(e,t){assert("CompletionStatement",e,t)}function assertConditional(e,t){assert("Conditional",e,t)}function assertLoop(e,t){assert("Loop",e,t)}function assertWhile(e,t){assert("While",e,t)}function assertExpressionWrapper(e,t){assert("ExpressionWrapper",e,t)}function assertFor(e,t){assert("For",e,t)}function assertForXStatement(e,t){assert("ForXStatement",e,t)}function assertFunction(e,t){assert("Function",e,t)}function assertFunctionParent(e,t){assert("FunctionParent",e,t)}function assertPureish(e,t){assert("Pureish",e,t)}function assertDeclaration(e,t){assert("Declaration",e,t)}function assertPatternLike(e,t){assert("PatternLike",e,t)}function assertLVal(e,t){assert("LVal",e,t)}function assertTSEntityName(e,t){assert("TSEntityName",e,t)}function assertLiteral(e,t){assert("Literal",e,t)}function assertImmutable(e,t){assert("Immutable",e,t)}function assertUserWhitespacable(e,t){assert("UserWhitespacable",e,t)}function assertMethod(e,t){assert("Method",e,t)}function assertObjectMember(e,t){assert("ObjectMember",e,t)}function assertProperty(e,t){assert("Property",e,t)}function assertUnaryLike(e,t){assert("UnaryLike",e,t)}function assertPattern(e,t){assert("Pattern",e,t)}function assertClass(e,t){assert("Class",e,t)}function assertModuleDeclaration(e,t){assert("ModuleDeclaration",e,t)}function assertExportDeclaration(e,t){assert("ExportDeclaration",e,t)}function assertModuleSpecifier(e,t){assert("ModuleSpecifier",e,t)}function assertAccessor(e,t){assert("Accessor",e,t)}function assertPrivate(e,t){assert("Private",e,t)}function assertFlow(e,t){assert("Flow",e,t)}function assertFlowType(e,t){assert("FlowType",e,t)}function assertFlowBaseAnnotation(e,t){assert("FlowBaseAnnotation",e,t)}function assertFlowDeclaration(e,t){assert("FlowDeclaration",e,t)}function assertFlowPredicate(e,t){assert("FlowPredicate",e,t)}function assertEnumBody(e,t){assert("EnumBody",e,t)}function assertEnumMember(e,t){assert("EnumMember",e,t)}function assertJSX(e,t){assert("JSX",e,t)}function assertMiscellaneous(e,t){assert("Miscellaneous",e,t)}function assertTypeScript(e,t){assert("TypeScript",e,t)}function assertTSTypeElement(e,t){assert("TSTypeElement",e,t)}function assertTSType(e,t){assert("TSType",e,t)}function assertTSBaseType(e,t){assert("TSBaseType",e,t)}function assertNumberLiteral(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");assert("NumberLiteral",e,t)}function assertRegexLiteral(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");assert("RegexLiteral",e,t)}function assertRestProperty(e,t){console.trace("The node type RestProperty has been renamed to RestElement");assert("RestProperty",e,t)}function assertSpreadProperty(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");assert("SpreadProperty",e,t)}},4509:()=>{},8554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=createFlowUnionType;var n=r(3321);var s=r(271);function createFlowUnionType(e){const t=(0,s.default)(e);if(t.length===1){return t[0]}else{return(0,n.unionTypeAnnotation)(t)}}},9246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(3321);var s=createTypeAnnotationBasedOnTypeof;t["default"]=s;function createTypeAnnotationBasedOnTypeof(e){switch(e){case"string":return(0,n.stringTypeAnnotation)();case"number":return(0,n.numberTypeAnnotation)();case"undefined":return(0,n.voidTypeAnnotation)();case"boolean":return(0,n.booleanTypeAnnotation)();case"function":return(0,n.genericTypeAnnotation)((0,n.identifier)("Function"));case"object":return(0,n.genericTypeAnnotation)((0,n.identifier)("Object"));case"symbol":return(0,n.genericTypeAnnotation)((0,n.identifier)("Symbol"));case"bigint":return(0,n.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+e)}},3321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.anyTypeAnnotation=anyTypeAnnotation;t.argumentPlaceholder=argumentPlaceholder;t.arrayExpression=arrayExpression;t.arrayPattern=arrayPattern;t.arrayTypeAnnotation=arrayTypeAnnotation;t.arrowFunctionExpression=arrowFunctionExpression;t.assignmentExpression=assignmentExpression;t.assignmentPattern=assignmentPattern;t.awaitExpression=awaitExpression;t.bigIntLiteral=bigIntLiteral;t.binaryExpression=binaryExpression;t.bindExpression=bindExpression;t.blockStatement=blockStatement;t.booleanLiteral=booleanLiteral;t.booleanLiteralTypeAnnotation=booleanLiteralTypeAnnotation;t.booleanTypeAnnotation=booleanTypeAnnotation;t.breakStatement=breakStatement;t.callExpression=callExpression;t.catchClause=catchClause;t.classAccessorProperty=classAccessorProperty;t.classBody=classBody;t.classDeclaration=classDeclaration;t.classExpression=classExpression;t.classImplements=classImplements;t.classMethod=classMethod;t.classPrivateMethod=classPrivateMethod;t.classPrivateProperty=classPrivateProperty;t.classProperty=classProperty;t.conditionalExpression=conditionalExpression;t.continueStatement=continueStatement;t.debuggerStatement=debuggerStatement;t.decimalLiteral=decimalLiteral;t.declareClass=declareClass;t.declareExportAllDeclaration=declareExportAllDeclaration;t.declareExportDeclaration=declareExportDeclaration;t.declareFunction=declareFunction;t.declareInterface=declareInterface;t.declareModule=declareModule;t.declareModuleExports=declareModuleExports;t.declareOpaqueType=declareOpaqueType;t.declareTypeAlias=declareTypeAlias;t.declareVariable=declareVariable;t.declaredPredicate=declaredPredicate;t.decorator=decorator;t.directive=directive;t.directiveLiteral=directiveLiteral;t.doExpression=doExpression;t.doWhileStatement=doWhileStatement;t.emptyStatement=emptyStatement;t.emptyTypeAnnotation=emptyTypeAnnotation;t.enumBooleanBody=enumBooleanBody;t.enumBooleanMember=enumBooleanMember;t.enumDeclaration=enumDeclaration;t.enumDefaultedMember=enumDefaultedMember;t.enumNumberBody=enumNumberBody;t.enumNumberMember=enumNumberMember;t.enumStringBody=enumStringBody;t.enumStringMember=enumStringMember;t.enumSymbolBody=enumSymbolBody;t.existsTypeAnnotation=existsTypeAnnotation;t.exportAllDeclaration=exportAllDeclaration;t.exportDefaultDeclaration=exportDefaultDeclaration;t.exportDefaultSpecifier=exportDefaultSpecifier;t.exportNamedDeclaration=exportNamedDeclaration;t.exportNamespaceSpecifier=exportNamespaceSpecifier;t.exportSpecifier=exportSpecifier;t.expressionStatement=expressionStatement;t.file=file;t.forInStatement=forInStatement;t.forOfStatement=forOfStatement;t.forStatement=forStatement;t.functionDeclaration=functionDeclaration;t.functionExpression=functionExpression;t.functionTypeAnnotation=functionTypeAnnotation;t.functionTypeParam=functionTypeParam;t.genericTypeAnnotation=genericTypeAnnotation;t.identifier=identifier;t.ifStatement=ifStatement;t["import"]=_import;t.importAttribute=importAttribute;t.importDeclaration=importDeclaration;t.importDefaultSpecifier=importDefaultSpecifier;t.importNamespaceSpecifier=importNamespaceSpecifier;t.importSpecifier=importSpecifier;t.indexedAccessType=indexedAccessType;t.inferredPredicate=inferredPredicate;t.interfaceDeclaration=interfaceDeclaration;t.interfaceExtends=interfaceExtends;t.interfaceTypeAnnotation=interfaceTypeAnnotation;t.interpreterDirective=interpreterDirective;t.intersectionTypeAnnotation=intersectionTypeAnnotation;t.jSXAttribute=t.jsxAttribute=jsxAttribute;t.jSXClosingElement=t.jsxClosingElement=jsxClosingElement;t.jSXClosingFragment=t.jsxClosingFragment=jsxClosingFragment;t.jSXElement=t.jsxElement=jsxElement;t.jSXEmptyExpression=t.jsxEmptyExpression=jsxEmptyExpression;t.jSXExpressionContainer=t.jsxExpressionContainer=jsxExpressionContainer;t.jSXFragment=t.jsxFragment=jsxFragment;t.jSXIdentifier=t.jsxIdentifier=jsxIdentifier;t.jSXMemberExpression=t.jsxMemberExpression=jsxMemberExpression;t.jSXNamespacedName=t.jsxNamespacedName=jsxNamespacedName;t.jSXOpeningElement=t.jsxOpeningElement=jsxOpeningElement;t.jSXOpeningFragment=t.jsxOpeningFragment=jsxOpeningFragment;t.jSXSpreadAttribute=t.jsxSpreadAttribute=jsxSpreadAttribute;t.jSXSpreadChild=t.jsxSpreadChild=jsxSpreadChild;t.jSXText=t.jsxText=jsxText;t.labeledStatement=labeledStatement;t.logicalExpression=logicalExpression;t.memberExpression=memberExpression;t.metaProperty=metaProperty;t.mixedTypeAnnotation=mixedTypeAnnotation;t.moduleExpression=moduleExpression;t.newExpression=newExpression;t.noop=noop;t.nullLiteral=nullLiteral;t.nullLiteralTypeAnnotation=nullLiteralTypeAnnotation;t.nullableTypeAnnotation=nullableTypeAnnotation;t.numberLiteral=NumberLiteral;t.numberLiteralTypeAnnotation=numberLiteralTypeAnnotation;t.numberTypeAnnotation=numberTypeAnnotation;t.numericLiteral=numericLiteral;t.objectExpression=objectExpression;t.objectMethod=objectMethod;t.objectPattern=objectPattern;t.objectProperty=objectProperty;t.objectTypeAnnotation=objectTypeAnnotation;t.objectTypeCallProperty=objectTypeCallProperty;t.objectTypeIndexer=objectTypeIndexer;t.objectTypeInternalSlot=objectTypeInternalSlot;t.objectTypeProperty=objectTypeProperty;t.objectTypeSpreadProperty=objectTypeSpreadProperty;t.opaqueType=opaqueType;t.optionalCallExpression=optionalCallExpression;t.optionalIndexedAccessType=optionalIndexedAccessType;t.optionalMemberExpression=optionalMemberExpression;t.parenthesizedExpression=parenthesizedExpression;t.pipelineBareFunction=pipelineBareFunction;t.pipelinePrimaryTopicReference=pipelinePrimaryTopicReference;t.pipelineTopicExpression=pipelineTopicExpression;t.placeholder=placeholder;t.privateName=privateName;t.program=program;t.qualifiedTypeIdentifier=qualifiedTypeIdentifier;t.recordExpression=recordExpression;t.regExpLiteral=regExpLiteral;t.regexLiteral=RegexLiteral;t.restElement=restElement;t.restProperty=RestProperty;t.returnStatement=returnStatement;t.sequenceExpression=sequenceExpression;t.spreadElement=spreadElement;t.spreadProperty=SpreadProperty;t.staticBlock=staticBlock;t.stringLiteral=stringLiteral;t.stringLiteralTypeAnnotation=stringLiteralTypeAnnotation;t.stringTypeAnnotation=stringTypeAnnotation;t["super"]=_super;t.switchCase=switchCase;t.switchStatement=switchStatement;t.symbolTypeAnnotation=symbolTypeAnnotation;t.taggedTemplateExpression=taggedTemplateExpression;t.templateElement=templateElement;t.templateLiteral=templateLiteral;t.thisExpression=thisExpression;t.thisTypeAnnotation=thisTypeAnnotation;t.throwStatement=throwStatement;t.topicReference=topicReference;t.tryStatement=tryStatement;t.tSAnyKeyword=t.tsAnyKeyword=tsAnyKeyword;t.tSArrayType=t.tsArrayType=tsArrayType;t.tSAsExpression=t.tsAsExpression=tsAsExpression;t.tSBigIntKeyword=t.tsBigIntKeyword=tsBigIntKeyword;t.tSBooleanKeyword=t.tsBooleanKeyword=tsBooleanKeyword;t.tSCallSignatureDeclaration=t.tsCallSignatureDeclaration=tsCallSignatureDeclaration;t.tSConditionalType=t.tsConditionalType=tsConditionalType;t.tSConstructSignatureDeclaration=t.tsConstructSignatureDeclaration=tsConstructSignatureDeclaration;t.tSConstructorType=t.tsConstructorType=tsConstructorType;t.tSDeclareFunction=t.tsDeclareFunction=tsDeclareFunction;t.tSDeclareMethod=t.tsDeclareMethod=tsDeclareMethod;t.tSEnumDeclaration=t.tsEnumDeclaration=tsEnumDeclaration;t.tSEnumMember=t.tsEnumMember=tsEnumMember;t.tSExportAssignment=t.tsExportAssignment=tsExportAssignment;t.tSExpressionWithTypeArguments=t.tsExpressionWithTypeArguments=tsExpressionWithTypeArguments;t.tSExternalModuleReference=t.tsExternalModuleReference=tsExternalModuleReference;t.tSFunctionType=t.tsFunctionType=tsFunctionType;t.tSImportEqualsDeclaration=t.tsImportEqualsDeclaration=tsImportEqualsDeclaration;t.tSImportType=t.tsImportType=tsImportType;t.tSIndexSignature=t.tsIndexSignature=tsIndexSignature;t.tSIndexedAccessType=t.tsIndexedAccessType=tsIndexedAccessType;t.tSInferType=t.tsInferType=tsInferType;t.tSInstantiationExpression=t.tsInstantiationExpression=tsInstantiationExpression;t.tSInterfaceBody=t.tsInterfaceBody=tsInterfaceBody;t.tSInterfaceDeclaration=t.tsInterfaceDeclaration=tsInterfaceDeclaration;t.tSIntersectionType=t.tsIntersectionType=tsIntersectionType;t.tSIntrinsicKeyword=t.tsIntrinsicKeyword=tsIntrinsicKeyword;t.tSLiteralType=t.tsLiteralType=tsLiteralType;t.tSMappedType=t.tsMappedType=tsMappedType;t.tSMethodSignature=t.tsMethodSignature=tsMethodSignature;t.tSModuleBlock=t.tsModuleBlock=tsModuleBlock;t.tSModuleDeclaration=t.tsModuleDeclaration=tsModuleDeclaration;t.tSNamedTupleMember=t.tsNamedTupleMember=tsNamedTupleMember;t.tSNamespaceExportDeclaration=t.tsNamespaceExportDeclaration=tsNamespaceExportDeclaration;t.tSNeverKeyword=t.tsNeverKeyword=tsNeverKeyword;t.tSNonNullExpression=t.tsNonNullExpression=tsNonNullExpression;t.tSNullKeyword=t.tsNullKeyword=tsNullKeyword;t.tSNumberKeyword=t.tsNumberKeyword=tsNumberKeyword;t.tSObjectKeyword=t.tsObjectKeyword=tsObjectKeyword;t.tSOptionalType=t.tsOptionalType=tsOptionalType;t.tSParameterProperty=t.tsParameterProperty=tsParameterProperty;t.tSParenthesizedType=t.tsParenthesizedType=tsParenthesizedType;t.tSPropertySignature=t.tsPropertySignature=tsPropertySignature;t.tSQualifiedName=t.tsQualifiedName=tsQualifiedName;t.tSRestType=t.tsRestType=tsRestType;t.tSStringKeyword=t.tsStringKeyword=tsStringKeyword;t.tSSymbolKeyword=t.tsSymbolKeyword=tsSymbolKeyword;t.tSThisType=t.tsThisType=tsThisType;t.tSTupleType=t.tsTupleType=tsTupleType;t.tSTypeAliasDeclaration=t.tsTypeAliasDeclaration=tsTypeAliasDeclaration;t.tSTypeAnnotation=t.tsTypeAnnotation=tsTypeAnnotation;t.tSTypeAssertion=t.tsTypeAssertion=tsTypeAssertion;t.tSTypeLiteral=t.tsTypeLiteral=tsTypeLiteral;t.tSTypeOperator=t.tsTypeOperator=tsTypeOperator;t.tSTypeParameter=t.tsTypeParameter=tsTypeParameter;t.tSTypeParameterDeclaration=t.tsTypeParameterDeclaration=tsTypeParameterDeclaration;t.tSTypeParameterInstantiation=t.tsTypeParameterInstantiation=tsTypeParameterInstantiation;t.tSTypePredicate=t.tsTypePredicate=tsTypePredicate;t.tSTypeQuery=t.tsTypeQuery=tsTypeQuery;t.tSTypeReference=t.tsTypeReference=tsTypeReference;t.tSUndefinedKeyword=t.tsUndefinedKeyword=tsUndefinedKeyword;t.tSUnionType=t.tsUnionType=tsUnionType;t.tSUnknownKeyword=t.tsUnknownKeyword=tsUnknownKeyword;t.tSVoidKeyword=t.tsVoidKeyword=tsVoidKeyword;t.tupleExpression=tupleExpression;t.tupleTypeAnnotation=tupleTypeAnnotation;t.typeAlias=typeAlias;t.typeAnnotation=typeAnnotation;t.typeCastExpression=typeCastExpression;t.typeParameter=typeParameter;t.typeParameterDeclaration=typeParameterDeclaration;t.typeParameterInstantiation=typeParameterInstantiation;t.typeofTypeAnnotation=typeofTypeAnnotation;t.unaryExpression=unaryExpression;t.unionTypeAnnotation=unionTypeAnnotation;t.updateExpression=updateExpression;t.v8IntrinsicIdentifier=v8IntrinsicIdentifier;t.variableDeclaration=variableDeclaration;t.variableDeclarator=variableDeclarator;t.variance=variance;t.voidTypeAnnotation=voidTypeAnnotation;t.whileStatement=whileStatement;t.withStatement=withStatement;t.yieldExpression=yieldExpression;var n=r(1958);function arrayExpression(e=[]){return(0,n.default)({type:"ArrayExpression",elements:e})}function assignmentExpression(e,t,r){return(0,n.default)({type:"AssignmentExpression",operator:e,left:t,right:r})}function binaryExpression(e,t,r){return(0,n.default)({type:"BinaryExpression",operator:e,left:t,right:r})}function interpreterDirective(e){return(0,n.default)({type:"InterpreterDirective",value:e})}function directive(e){return(0,n.default)({type:"Directive",value:e})}function directiveLiteral(e){return(0,n.default)({type:"DirectiveLiteral",value:e})}function blockStatement(e,t=[]){return(0,n.default)({type:"BlockStatement",body:e,directives:t})}function breakStatement(e=null){return(0,n.default)({type:"BreakStatement",label:e})}function callExpression(e,t){return(0,n.default)({type:"CallExpression",callee:e,arguments:t})}function catchClause(e=null,t){return(0,n.default)({type:"CatchClause",param:e,body:t})}function conditionalExpression(e,t,r){return(0,n.default)({type:"ConditionalExpression",test:e,consequent:t,alternate:r})}function continueStatement(e=null){return(0,n.default)({type:"ContinueStatement",label:e})}function debuggerStatement(){return{type:"DebuggerStatement"}}function doWhileStatement(e,t){return(0,n.default)({type:"DoWhileStatement",test:e,body:t})}function emptyStatement(){return{type:"EmptyStatement"}}function expressionStatement(e){return(0,n.default)({type:"ExpressionStatement",expression:e})}function file(e,t=null,r=null){return(0,n.default)({type:"File",program:e,comments:t,tokens:r})}function forInStatement(e,t,r){return(0,n.default)({type:"ForInStatement",left:e,right:t,body:r})}function forStatement(e=null,t=null,r=null,s){return(0,n.default)({type:"ForStatement",init:e,test:t,update:r,body:s})}function functionDeclaration(e=null,t,r,s=false,i=false){return(0,n.default)({type:"FunctionDeclaration",id:e,params:t,body:r,generator:s,async:i})}function functionExpression(e=null,t,r,s=false,i=false){return(0,n.default)({type:"FunctionExpression",id:e,params:t,body:r,generator:s,async:i})}function identifier(e){return(0,n.default)({type:"Identifier",name:e})}function ifStatement(e,t,r=null){return(0,n.default)({type:"IfStatement",test:e,consequent:t,alternate:r})}function labeledStatement(e,t){return(0,n.default)({type:"LabeledStatement",label:e,body:t})}function stringLiteral(e){return(0,n.default)({type:"StringLiteral",value:e})}function numericLiteral(e){return(0,n.default)({type:"NumericLiteral",value:e})}function nullLiteral(){return{type:"NullLiteral"}}function booleanLiteral(e){return(0,n.default)({type:"BooleanLiteral",value:e})}function regExpLiteral(e,t=""){return(0,n.default)({type:"RegExpLiteral",pattern:e,flags:t})}function logicalExpression(e,t,r){return(0,n.default)({type:"LogicalExpression",operator:e,left:t,right:r})}function memberExpression(e,t,r=false,s=null){return(0,n.default)({type:"MemberExpression",object:e,property:t,computed:r,optional:s})}function newExpression(e,t){return(0,n.default)({type:"NewExpression",callee:e,arguments:t})}function program(e,t=[],r="script",s=null){return(0,n.default)({type:"Program",body:e,directives:t,sourceType:r,interpreter:s,sourceFile:null})}function objectExpression(e){return(0,n.default)({type:"ObjectExpression",properties:e})}function objectMethod(e="method",t,r,s,i=false,a=false,o=false){return(0,n.default)({type:"ObjectMethod",kind:e,key:t,params:r,body:s,computed:i,generator:a,async:o})}function objectProperty(e,t,r=false,s=false,i=null){return(0,n.default)({type:"ObjectProperty",key:e,value:t,computed:r,shorthand:s,decorators:i})}function restElement(e){return(0,n.default)({type:"RestElement",argument:e})}function returnStatement(e=null){return(0,n.default)({type:"ReturnStatement",argument:e})}function sequenceExpression(e){return(0,n.default)({type:"SequenceExpression",expressions:e})}function parenthesizedExpression(e){return(0,n.default)({type:"ParenthesizedExpression",expression:e})}function switchCase(e=null,t){return(0,n.default)({type:"SwitchCase",test:e,consequent:t})}function switchStatement(e,t){return(0,n.default)({type:"SwitchStatement",discriminant:e,cases:t})}function thisExpression(){return{type:"ThisExpression"}}function throwStatement(e){return(0,n.default)({type:"ThrowStatement",argument:e})}function tryStatement(e,t=null,r=null){return(0,n.default)({type:"TryStatement",block:e,handler:t,finalizer:r})}function unaryExpression(e,t,r=true){return(0,n.default)({type:"UnaryExpression",operator:e,argument:t,prefix:r})}function updateExpression(e,t,r=false){return(0,n.default)({type:"UpdateExpression",operator:e,argument:t,prefix:r})}function variableDeclaration(e,t){return(0,n.default)({type:"VariableDeclaration",kind:e,declarations:t})}function variableDeclarator(e,t=null){return(0,n.default)({type:"VariableDeclarator",id:e,init:t})}function whileStatement(e,t){return(0,n.default)({type:"WhileStatement",test:e,body:t})}function withStatement(e,t){return(0,n.default)({type:"WithStatement",object:e,body:t})}function assignmentPattern(e,t){return(0,n.default)({type:"AssignmentPattern",left:e,right:t})}function arrayPattern(e){return(0,n.default)({type:"ArrayPattern",elements:e})}function arrowFunctionExpression(e,t,r=false){return(0,n.default)({type:"ArrowFunctionExpression",params:e,body:t,async:r,expression:null})}function classBody(e){return(0,n.default)({type:"ClassBody",body:e})}function classExpression(e=null,t=null,r,s=null){return(0,n.default)({type:"ClassExpression",id:e,superClass:t,body:r,decorators:s})}function classDeclaration(e,t=null,r,s=null){return(0,n.default)({type:"ClassDeclaration",id:e,superClass:t,body:r,decorators:s})}function exportAllDeclaration(e){return(0,n.default)({type:"ExportAllDeclaration",source:e})}function exportDefaultDeclaration(e){return(0,n.default)({type:"ExportDefaultDeclaration",declaration:e})}function exportNamedDeclaration(e=null,t=[],r=null){return(0,n.default)({type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:r})}function exportSpecifier(e,t){return(0,n.default)({type:"ExportSpecifier",local:e,exported:t})}function forOfStatement(e,t,r,s=false){return(0,n.default)({type:"ForOfStatement",left:e,right:t,body:r,await:s})}function importDeclaration(e,t){return(0,n.default)({type:"ImportDeclaration",specifiers:e,source:t})}function importDefaultSpecifier(e){return(0,n.default)({type:"ImportDefaultSpecifier",local:e})}function importNamespaceSpecifier(e){return(0,n.default)({type:"ImportNamespaceSpecifier",local:e})}function importSpecifier(e,t){return(0,n.default)({type:"ImportSpecifier",local:e,imported:t})}function metaProperty(e,t){return(0,n.default)({type:"MetaProperty",meta:e,property:t})}function classMethod(e="method",t,r,s,i=false,a=false,o=false,l=false){return(0,n.default)({type:"ClassMethod",kind:e,key:t,params:r,body:s,computed:i,static:a,generator:o,async:l})}function objectPattern(e){return(0,n.default)({type:"ObjectPattern",properties:e})}function spreadElement(e){return(0,n.default)({type:"SpreadElement",argument:e})}function _super(){return{type:"Super"}}function taggedTemplateExpression(e,t){return(0,n.default)({type:"TaggedTemplateExpression",tag:e,quasi:t})}function templateElement(e,t=false){return(0,n.default)({type:"TemplateElement",value:e,tail:t})}function templateLiteral(e,t){return(0,n.default)({type:"TemplateLiteral",quasis:e,expressions:t})}function yieldExpression(e=null,t=false){return(0,n.default)({type:"YieldExpression",argument:e,delegate:t})}function awaitExpression(e){return(0,n.default)({type:"AwaitExpression",argument:e})}function _import(){return{type:"Import"}}function bigIntLiteral(e){return(0,n.default)({type:"BigIntLiteral",value:e})}function exportNamespaceSpecifier(e){return(0,n.default)({type:"ExportNamespaceSpecifier",exported:e})}function optionalMemberExpression(e,t,r=false,s){return(0,n.default)({type:"OptionalMemberExpression",object:e,property:t,computed:r,optional:s})}function optionalCallExpression(e,t,r){return(0,n.default)({type:"OptionalCallExpression",callee:e,arguments:t,optional:r})}function classProperty(e,t=null,r=null,s=null,i=false,a=false){return(0,n.default)({type:"ClassProperty",key:e,value:t,typeAnnotation:r,decorators:s,computed:i,static:a})}function classAccessorProperty(e,t=null,r=null,s=null,i=false,a=false){return(0,n.default)({type:"ClassAccessorProperty",key:e,value:t,typeAnnotation:r,decorators:s,computed:i,static:a})}function classPrivateProperty(e,t=null,r=null,s){return(0,n.default)({type:"ClassPrivateProperty",key:e,value:t,decorators:r,static:s})}function classPrivateMethod(e="method",t,r,s,i=false){return(0,n.default)({type:"ClassPrivateMethod",kind:e,key:t,params:r,body:s,static:i})}function privateName(e){return(0,n.default)({type:"PrivateName",id:e})}function staticBlock(e){return(0,n.default)({type:"StaticBlock",body:e})}function anyTypeAnnotation(){return{type:"AnyTypeAnnotation"}}function arrayTypeAnnotation(e){return(0,n.default)({type:"ArrayTypeAnnotation",elementType:e})}function booleanTypeAnnotation(){return{type:"BooleanTypeAnnotation"}}function booleanLiteralTypeAnnotation(e){return(0,n.default)({type:"BooleanLiteralTypeAnnotation",value:e})}function nullLiteralTypeAnnotation(){return{type:"NullLiteralTypeAnnotation"}}function classImplements(e,t=null){return(0,n.default)({type:"ClassImplements",id:e,typeParameters:t})}function declareClass(e,t=null,r=null,s){return(0,n.default)({type:"DeclareClass",id:e,typeParameters:t,extends:r,body:s})}function declareFunction(e){return(0,n.default)({type:"DeclareFunction",id:e})}function declareInterface(e,t=null,r=null,s){return(0,n.default)({type:"DeclareInterface",id:e,typeParameters:t,extends:r,body:s})}function declareModule(e,t,r=null){return(0,n.default)({type:"DeclareModule",id:e,body:t,kind:r})}function declareModuleExports(e){return(0,n.default)({type:"DeclareModuleExports",typeAnnotation:e})}function declareTypeAlias(e,t=null,r){return(0,n.default)({type:"DeclareTypeAlias",id:e,typeParameters:t,right:r})}function declareOpaqueType(e,t=null,r=null){return(0,n.default)({type:"DeclareOpaqueType",id:e,typeParameters:t,supertype:r})}function declareVariable(e){return(0,n.default)({type:"DeclareVariable",id:e})}function declareExportDeclaration(e=null,t=null,r=null){return(0,n.default)({type:"DeclareExportDeclaration",declaration:e,specifiers:t,source:r})}function declareExportAllDeclaration(e){return(0,n.default)({type:"DeclareExportAllDeclaration",source:e})}function declaredPredicate(e){return(0,n.default)({type:"DeclaredPredicate",value:e})}function existsTypeAnnotation(){return{type:"ExistsTypeAnnotation"}}function functionTypeAnnotation(e=null,t,r=null,s){return(0,n.default)({type:"FunctionTypeAnnotation",typeParameters:e,params:t,rest:r,returnType:s})}function functionTypeParam(e=null,t){return(0,n.default)({type:"FunctionTypeParam",name:e,typeAnnotation:t})}function genericTypeAnnotation(e,t=null){return(0,n.default)({type:"GenericTypeAnnotation",id:e,typeParameters:t})}function inferredPredicate(){return{type:"InferredPredicate"}}function interfaceExtends(e,t=null){return(0,n.default)({type:"InterfaceExtends",id:e,typeParameters:t})}function interfaceDeclaration(e,t=null,r=null,s){return(0,n.default)({type:"InterfaceDeclaration",id:e,typeParameters:t,extends:r,body:s})}function interfaceTypeAnnotation(e=null,t){return(0,n.default)({type:"InterfaceTypeAnnotation",extends:e,body:t})}function intersectionTypeAnnotation(e){return(0,n.default)({type:"IntersectionTypeAnnotation",types:e})}function mixedTypeAnnotation(){return{type:"MixedTypeAnnotation"}}function emptyTypeAnnotation(){return{type:"EmptyTypeAnnotation"}}function nullableTypeAnnotation(e){return(0,n.default)({type:"NullableTypeAnnotation",typeAnnotation:e})}function numberLiteralTypeAnnotation(e){return(0,n.default)({type:"NumberLiteralTypeAnnotation",value:e})}function numberTypeAnnotation(){return{type:"NumberTypeAnnotation"}}function objectTypeAnnotation(e,t=[],r=[],s=[],i=false){return(0,n.default)({type:"ObjectTypeAnnotation",properties:e,indexers:t,callProperties:r,internalSlots:s,exact:i})}function objectTypeInternalSlot(e,t,r,s,i){return(0,n.default)({type:"ObjectTypeInternalSlot",id:e,value:t,optional:r,static:s,method:i})}function objectTypeCallProperty(e){return(0,n.default)({type:"ObjectTypeCallProperty",value:e,static:null})}function objectTypeIndexer(e=null,t,r,s=null){return(0,n.default)({type:"ObjectTypeIndexer",id:e,key:t,value:r,variance:s,static:null})}function objectTypeProperty(e,t,r=null){return(0,n.default)({type:"ObjectTypeProperty",key:e,value:t,variance:r,kind:null,method:null,optional:null,proto:null,static:null})}function objectTypeSpreadProperty(e){return(0,n.default)({type:"ObjectTypeSpreadProperty",argument:e})}function opaqueType(e,t=null,r=null,s){return(0,n.default)({type:"OpaqueType",id:e,typeParameters:t,supertype:r,impltype:s})}function qualifiedTypeIdentifier(e,t){return(0,n.default)({type:"QualifiedTypeIdentifier",id:e,qualification:t})}function stringLiteralTypeAnnotation(e){return(0,n.default)({type:"StringLiteralTypeAnnotation",value:e})}function stringTypeAnnotation(){return{type:"StringTypeAnnotation"}}function symbolTypeAnnotation(){return{type:"SymbolTypeAnnotation"}}function thisTypeAnnotation(){return{type:"ThisTypeAnnotation"}}function tupleTypeAnnotation(e){return(0,n.default)({type:"TupleTypeAnnotation",types:e})}function typeofTypeAnnotation(e){return(0,n.default)({type:"TypeofTypeAnnotation",argument:e})}function typeAlias(e,t=null,r){return(0,n.default)({type:"TypeAlias",id:e,typeParameters:t,right:r})}function typeAnnotation(e){return(0,n.default)({type:"TypeAnnotation",typeAnnotation:e})}function typeCastExpression(e,t){return(0,n.default)({type:"TypeCastExpression",expression:e,typeAnnotation:t})}function typeParameter(e=null,t=null,r=null){return(0,n.default)({type:"TypeParameter",bound:e,default:t,variance:r,name:null})}function typeParameterDeclaration(e){return(0,n.default)({type:"TypeParameterDeclaration",params:e})}function typeParameterInstantiation(e){return(0,n.default)({type:"TypeParameterInstantiation",params:e})}function unionTypeAnnotation(e){return(0,n.default)({type:"UnionTypeAnnotation",types:e})}function variance(e){return(0,n.default)({type:"Variance",kind:e})}function voidTypeAnnotation(){return{type:"VoidTypeAnnotation"}}function enumDeclaration(e,t){return(0,n.default)({type:"EnumDeclaration",id:e,body:t})}function enumBooleanBody(e){return(0,n.default)({type:"EnumBooleanBody",members:e,explicitType:null,hasUnknownMembers:null})}function enumNumberBody(e){return(0,n.default)({type:"EnumNumberBody",members:e,explicitType:null,hasUnknownMembers:null})}function enumStringBody(e){return(0,n.default)({type:"EnumStringBody",members:e,explicitType:null,hasUnknownMembers:null})}function enumSymbolBody(e){return(0,n.default)({type:"EnumSymbolBody",members:e,hasUnknownMembers:null})}function enumBooleanMember(e){return(0,n.default)({type:"EnumBooleanMember",id:e,init:null})}function enumNumberMember(e,t){return(0,n.default)({type:"EnumNumberMember",id:e,init:t})}function enumStringMember(e,t){return(0,n.default)({type:"EnumStringMember",id:e,init:t})}function enumDefaultedMember(e){return(0,n.default)({type:"EnumDefaultedMember",id:e})}function indexedAccessType(e,t){return(0,n.default)({type:"IndexedAccessType",objectType:e,indexType:t})}function optionalIndexedAccessType(e,t){return(0,n.default)({type:"OptionalIndexedAccessType",objectType:e,indexType:t,optional:null})}function jsxAttribute(e,t=null){return(0,n.default)({type:"JSXAttribute",name:e,value:t})}function jsxClosingElement(e){return(0,n.default)({type:"JSXClosingElement",name:e})}function jsxElement(e,t=null,r,s=null){return(0,n.default)({type:"JSXElement",openingElement:e,closingElement:t,children:r,selfClosing:s})}function jsxEmptyExpression(){return{type:"JSXEmptyExpression"}}function jsxExpressionContainer(e){return(0,n.default)({type:"JSXExpressionContainer",expression:e})}function jsxSpreadChild(e){return(0,n.default)({type:"JSXSpreadChild",expression:e})}function jsxIdentifier(e){return(0,n.default)({type:"JSXIdentifier",name:e})}function jsxMemberExpression(e,t){return(0,n.default)({type:"JSXMemberExpression",object:e,property:t})}function jsxNamespacedName(e,t){return(0,n.default)({type:"JSXNamespacedName",namespace:e,name:t})}function jsxOpeningElement(e,t,r=false){return(0,n.default)({type:"JSXOpeningElement",name:e,attributes:t,selfClosing:r})}function jsxSpreadAttribute(e){return(0,n.default)({type:"JSXSpreadAttribute",argument:e})}function jsxText(e){return(0,n.default)({type:"JSXText",value:e})}function jsxFragment(e,t,r){return(0,n.default)({type:"JSXFragment",openingFragment:e,closingFragment:t,children:r})}function jsxOpeningFragment(){return{type:"JSXOpeningFragment"}}function jsxClosingFragment(){return{type:"JSXClosingFragment"}}function noop(){return{type:"Noop"}}function placeholder(e,t){return(0,n.default)({type:"Placeholder",expectedNode:e,name:t})}function v8IntrinsicIdentifier(e){return(0,n.default)({type:"V8IntrinsicIdentifier",name:e})}function argumentPlaceholder(){return{type:"ArgumentPlaceholder"}}function bindExpression(e,t){return(0,n.default)({type:"BindExpression",object:e,callee:t})}function importAttribute(e,t){return(0,n.default)({type:"ImportAttribute",key:e,value:t})}function decorator(e){return(0,n.default)({type:"Decorator",expression:e})}function doExpression(e,t=false){return(0,n.default)({type:"DoExpression",body:e,async:t})}function exportDefaultSpecifier(e){return(0,n.default)({type:"ExportDefaultSpecifier",exported:e})}function recordExpression(e){return(0,n.default)({type:"RecordExpression",properties:e})}function tupleExpression(e=[]){return(0,n.default)({type:"TupleExpression",elements:e})}function decimalLiteral(e){return(0,n.default)({type:"DecimalLiteral",value:e})}function moduleExpression(e){return(0,n.default)({type:"ModuleExpression",body:e})}function topicReference(){return{type:"TopicReference"}}function pipelineTopicExpression(e){return(0,n.default)({type:"PipelineTopicExpression",expression:e})}function pipelineBareFunction(e){return(0,n.default)({type:"PipelineBareFunction",callee:e})}function pipelinePrimaryTopicReference(){return{type:"PipelinePrimaryTopicReference"}}function tsParameterProperty(e){return(0,n.default)({type:"TSParameterProperty",parameter:e})}function tsDeclareFunction(e=null,t=null,r,s=null){return(0,n.default)({type:"TSDeclareFunction",id:e,typeParameters:t,params:r,returnType:s})}function tsDeclareMethod(e=null,t,r=null,s,i=null){return(0,n.default)({type:"TSDeclareMethod",decorators:e,key:t,typeParameters:r,params:s,returnType:i})}function tsQualifiedName(e,t){return(0,n.default)({type:"TSQualifiedName",left:e,right:t})}function tsCallSignatureDeclaration(e=null,t,r=null){return(0,n.default)({type:"TSCallSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r})}function tsConstructSignatureDeclaration(e=null,t,r=null){return(0,n.default)({type:"TSConstructSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r})}function tsPropertySignature(e,t=null,r=null){return(0,n.default)({type:"TSPropertySignature",key:e,typeAnnotation:t,initializer:r,kind:null})}function tsMethodSignature(e,t=null,r,s=null){return(0,n.default)({type:"TSMethodSignature",key:e,typeParameters:t,parameters:r,typeAnnotation:s,kind:null})}function tsIndexSignature(e,t=null){return(0,n.default)({type:"TSIndexSignature",parameters:e,typeAnnotation:t})}function tsAnyKeyword(){return{type:"TSAnyKeyword"}}function tsBooleanKeyword(){return{type:"TSBooleanKeyword"}}function tsBigIntKeyword(){return{type:"TSBigIntKeyword"}}function tsIntrinsicKeyword(){return{type:"TSIntrinsicKeyword"}}function tsNeverKeyword(){return{type:"TSNeverKeyword"}}function tsNullKeyword(){return{type:"TSNullKeyword"}}function tsNumberKeyword(){return{type:"TSNumberKeyword"}}function tsObjectKeyword(){return{type:"TSObjectKeyword"}}function tsStringKeyword(){return{type:"TSStringKeyword"}}function tsSymbolKeyword(){return{type:"TSSymbolKeyword"}}function tsUndefinedKeyword(){return{type:"TSUndefinedKeyword"}}function tsUnknownKeyword(){return{type:"TSUnknownKeyword"}}function tsVoidKeyword(){return{type:"TSVoidKeyword"}}function tsThisType(){return{type:"TSThisType"}}function tsFunctionType(e=null,t,r=null){return(0,n.default)({type:"TSFunctionType",typeParameters:e,parameters:t,typeAnnotation:r})}function tsConstructorType(e=null,t,r=null){return(0,n.default)({type:"TSConstructorType",typeParameters:e,parameters:t,typeAnnotation:r})}function tsTypeReference(e,t=null){return(0,n.default)({type:"TSTypeReference",typeName:e,typeParameters:t})}function tsTypePredicate(e,t=null,r=null){return(0,n.default)({type:"TSTypePredicate",parameterName:e,typeAnnotation:t,asserts:r})}function tsTypeQuery(e,t=null){return(0,n.default)({type:"TSTypeQuery",exprName:e,typeParameters:t})}function tsTypeLiteral(e){return(0,n.default)({type:"TSTypeLiteral",members:e})}function tsArrayType(e){return(0,n.default)({type:"TSArrayType",elementType:e})}function tsTupleType(e){return(0,n.default)({type:"TSTupleType",elementTypes:e})}function tsOptionalType(e){return(0,n.default)({type:"TSOptionalType",typeAnnotation:e})}function tsRestType(e){return(0,n.default)({type:"TSRestType",typeAnnotation:e})}function tsNamedTupleMember(e,t,r=false){return(0,n.default)({type:"TSNamedTupleMember",label:e,elementType:t,optional:r})}function tsUnionType(e){return(0,n.default)({type:"TSUnionType",types:e})}function tsIntersectionType(e){return(0,n.default)({type:"TSIntersectionType",types:e})}function tsConditionalType(e,t,r,s){return(0,n.default)({type:"TSConditionalType",checkType:e,extendsType:t,trueType:r,falseType:s})}function tsInferType(e){return(0,n.default)({type:"TSInferType",typeParameter:e})}function tsParenthesizedType(e){return(0,n.default)({type:"TSParenthesizedType",typeAnnotation:e})}function tsTypeOperator(e){return(0,n.default)({type:"TSTypeOperator",typeAnnotation:e,operator:null})}function tsIndexedAccessType(e,t){return(0,n.default)({type:"TSIndexedAccessType",objectType:e,indexType:t})}function tsMappedType(e,t=null,r=null){return(0,n.default)({type:"TSMappedType",typeParameter:e,typeAnnotation:t,nameType:r})}function tsLiteralType(e){return(0,n.default)({type:"TSLiteralType",literal:e})}function tsExpressionWithTypeArguments(e,t=null){return(0,n.default)({type:"TSExpressionWithTypeArguments",expression:e,typeParameters:t})}function tsInterfaceDeclaration(e,t=null,r=null,s){return(0,n.default)({type:"TSInterfaceDeclaration",id:e,typeParameters:t,extends:r,body:s})}function tsInterfaceBody(e){return(0,n.default)({type:"TSInterfaceBody",body:e})}function tsTypeAliasDeclaration(e,t=null,r){return(0,n.default)({type:"TSTypeAliasDeclaration",id:e,typeParameters:t,typeAnnotation:r})}function tsInstantiationExpression(e,t=null){return(0,n.default)({type:"TSInstantiationExpression",expression:e,typeParameters:t})}function tsAsExpression(e,t){return(0,n.default)({type:"TSAsExpression",expression:e,typeAnnotation:t})}function tsTypeAssertion(e,t){return(0,n.default)({type:"TSTypeAssertion",typeAnnotation:e,expression:t})}function tsEnumDeclaration(e,t){return(0,n.default)({type:"TSEnumDeclaration",id:e,members:t})}function tsEnumMember(e,t=null){return(0,n.default)({type:"TSEnumMember",id:e,initializer:t})}function tsModuleDeclaration(e,t){return(0,n.default)({type:"TSModuleDeclaration",id:e,body:t})}function tsModuleBlock(e){return(0,n.default)({type:"TSModuleBlock",body:e})}function tsImportType(e,t=null,r=null){return(0,n.default)({type:"TSImportType",argument:e,qualifier:t,typeParameters:r})}function tsImportEqualsDeclaration(e,t){return(0,n.default)({type:"TSImportEqualsDeclaration",id:e,moduleReference:t,isExport:null})}function tsExternalModuleReference(e){return(0,n.default)({type:"TSExternalModuleReference",expression:e})}function tsNonNullExpression(e){return(0,n.default)({type:"TSNonNullExpression",expression:e})}function tsExportAssignment(e){return(0,n.default)({type:"TSExportAssignment",expression:e})}function tsNamespaceExportDeclaration(e){return(0,n.default)({type:"TSNamespaceExportDeclaration",id:e})}function tsTypeAnnotation(e){return(0,n.default)({type:"TSTypeAnnotation",typeAnnotation:e})}function tsTypeParameterInstantiation(e){return(0,n.default)({type:"TSTypeParameterInstantiation",params:e})}function tsTypeParameterDeclaration(e){return(0,n.default)({type:"TSTypeParameterDeclaration",params:e})}function tsTypeParameter(e=null,t=null,r){return(0,n.default)({type:"TSTypeParameter",constraint:e,default:t,name:r})}function NumberLiteral(e){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");return numericLiteral(e)}function RegexLiteral(e,t=""){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");return regExpLiteral(e,t)}function RestProperty(e){console.trace("The node type RestProperty has been renamed to RestElement");return restElement(e)}function SpreadProperty(e){console.trace("The node type SpreadProperty has been renamed to SpreadElement");return spreadElement(e)}},8709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"AnyTypeAnnotation",{enumerable:true,get:function(){return n.anyTypeAnnotation}});Object.defineProperty(t,"ArgumentPlaceholder",{enumerable:true,get:function(){return n.argumentPlaceholder}});Object.defineProperty(t,"ArrayExpression",{enumerable:true,get:function(){return n.arrayExpression}});Object.defineProperty(t,"ArrayPattern",{enumerable:true,get:function(){return n.arrayPattern}});Object.defineProperty(t,"ArrayTypeAnnotation",{enumerable:true,get:function(){return n.arrayTypeAnnotation}});Object.defineProperty(t,"ArrowFunctionExpression",{enumerable:true,get:function(){return n.arrowFunctionExpression}});Object.defineProperty(t,"AssignmentExpression",{enumerable:true,get:function(){return n.assignmentExpression}});Object.defineProperty(t,"AssignmentPattern",{enumerable:true,get:function(){return n.assignmentPattern}});Object.defineProperty(t,"AwaitExpression",{enumerable:true,get:function(){return n.awaitExpression}});Object.defineProperty(t,"BigIntLiteral",{enumerable:true,get:function(){return n.bigIntLiteral}});Object.defineProperty(t,"BinaryExpression",{enumerable:true,get:function(){return n.binaryExpression}});Object.defineProperty(t,"BindExpression",{enumerable:true,get:function(){return n.bindExpression}});Object.defineProperty(t,"BlockStatement",{enumerable:true,get:function(){return n.blockStatement}});Object.defineProperty(t,"BooleanLiteral",{enumerable:true,get:function(){return n.booleanLiteral}});Object.defineProperty(t,"BooleanLiteralTypeAnnotation",{enumerable:true,get:function(){return n.booleanLiteralTypeAnnotation}});Object.defineProperty(t,"BooleanTypeAnnotation",{enumerable:true,get:function(){return n.booleanTypeAnnotation}});Object.defineProperty(t,"BreakStatement",{enumerable:true,get:function(){return n.breakStatement}});Object.defineProperty(t,"CallExpression",{enumerable:true,get:function(){return n.callExpression}});Object.defineProperty(t,"CatchClause",{enumerable:true,get:function(){return n.catchClause}});Object.defineProperty(t,"ClassAccessorProperty",{enumerable:true,get:function(){return n.classAccessorProperty}});Object.defineProperty(t,"ClassBody",{enumerable:true,get:function(){return n.classBody}});Object.defineProperty(t,"ClassDeclaration",{enumerable:true,get:function(){return n.classDeclaration}});Object.defineProperty(t,"ClassExpression",{enumerable:true,get:function(){return n.classExpression}});Object.defineProperty(t,"ClassImplements",{enumerable:true,get:function(){return n.classImplements}});Object.defineProperty(t,"ClassMethod",{enumerable:true,get:function(){return n.classMethod}});Object.defineProperty(t,"ClassPrivateMethod",{enumerable:true,get:function(){return n.classPrivateMethod}});Object.defineProperty(t,"ClassPrivateProperty",{enumerable:true,get:function(){return n.classPrivateProperty}});Object.defineProperty(t,"ClassProperty",{enumerable:true,get:function(){return n.classProperty}});Object.defineProperty(t,"ConditionalExpression",{enumerable:true,get:function(){return n.conditionalExpression}});Object.defineProperty(t,"ContinueStatement",{enumerable:true,get:function(){return n.continueStatement}});Object.defineProperty(t,"DebuggerStatement",{enumerable:true,get:function(){return n.debuggerStatement}});Object.defineProperty(t,"DecimalLiteral",{enumerable:true,get:function(){return n.decimalLiteral}});Object.defineProperty(t,"DeclareClass",{enumerable:true,get:function(){return n.declareClass}});Object.defineProperty(t,"DeclareExportAllDeclaration",{enumerable:true,get:function(){return n.declareExportAllDeclaration}});Object.defineProperty(t,"DeclareExportDeclaration",{enumerable:true,get:function(){return n.declareExportDeclaration}});Object.defineProperty(t,"DeclareFunction",{enumerable:true,get:function(){return n.declareFunction}});Object.defineProperty(t,"DeclareInterface",{enumerable:true,get:function(){return n.declareInterface}});Object.defineProperty(t,"DeclareModule",{enumerable:true,get:function(){return n.declareModule}});Object.defineProperty(t,"DeclareModuleExports",{enumerable:true,get:function(){return n.declareModuleExports}});Object.defineProperty(t,"DeclareOpaqueType",{enumerable:true,get:function(){return n.declareOpaqueType}});Object.defineProperty(t,"DeclareTypeAlias",{enumerable:true,get:function(){return n.declareTypeAlias}});Object.defineProperty(t,"DeclareVariable",{enumerable:true,get:function(){return n.declareVariable}});Object.defineProperty(t,"DeclaredPredicate",{enumerable:true,get:function(){return n.declaredPredicate}});Object.defineProperty(t,"Decorator",{enumerable:true,get:function(){return n.decorator}});Object.defineProperty(t,"Directive",{enumerable:true,get:function(){return n.directive}});Object.defineProperty(t,"DirectiveLiteral",{enumerable:true,get:function(){return n.directiveLiteral}});Object.defineProperty(t,"DoExpression",{enumerable:true,get:function(){return n.doExpression}});Object.defineProperty(t,"DoWhileStatement",{enumerable:true,get:function(){return n.doWhileStatement}});Object.defineProperty(t,"EmptyStatement",{enumerable:true,get:function(){return n.emptyStatement}});Object.defineProperty(t,"EmptyTypeAnnotation",{enumerable:true,get:function(){return n.emptyTypeAnnotation}});Object.defineProperty(t,"EnumBooleanBody",{enumerable:true,get:function(){return n.enumBooleanBody}});Object.defineProperty(t,"EnumBooleanMember",{enumerable:true,get:function(){return n.enumBooleanMember}});Object.defineProperty(t,"EnumDeclaration",{enumerable:true,get:function(){return n.enumDeclaration}});Object.defineProperty(t,"EnumDefaultedMember",{enumerable:true,get:function(){return n.enumDefaultedMember}});Object.defineProperty(t,"EnumNumberBody",{enumerable:true,get:function(){return n.enumNumberBody}});Object.defineProperty(t,"EnumNumberMember",{enumerable:true,get:function(){return n.enumNumberMember}});Object.defineProperty(t,"EnumStringBody",{enumerable:true,get:function(){return n.enumStringBody}});Object.defineProperty(t,"EnumStringMember",{enumerable:true,get:function(){return n.enumStringMember}});Object.defineProperty(t,"EnumSymbolBody",{enumerable:true,get:function(){return n.enumSymbolBody}});Object.defineProperty(t,"ExistsTypeAnnotation",{enumerable:true,get:function(){return n.existsTypeAnnotation}});Object.defineProperty(t,"ExportAllDeclaration",{enumerable:true,get:function(){return n.exportAllDeclaration}});Object.defineProperty(t,"ExportDefaultDeclaration",{enumerable:true,get:function(){return n.exportDefaultDeclaration}});Object.defineProperty(t,"ExportDefaultSpecifier",{enumerable:true,get:function(){return n.exportDefaultSpecifier}});Object.defineProperty(t,"ExportNamedDeclaration",{enumerable:true,get:function(){return n.exportNamedDeclaration}});Object.defineProperty(t,"ExportNamespaceSpecifier",{enumerable:true,get:function(){return n.exportNamespaceSpecifier}});Object.defineProperty(t,"ExportSpecifier",{enumerable:true,get:function(){return n.exportSpecifier}});Object.defineProperty(t,"ExpressionStatement",{enumerable:true,get:function(){return n.expressionStatement}});Object.defineProperty(t,"File",{enumerable:true,get:function(){return n.file}});Object.defineProperty(t,"ForInStatement",{enumerable:true,get:function(){return n.forInStatement}});Object.defineProperty(t,"ForOfStatement",{enumerable:true,get:function(){return n.forOfStatement}});Object.defineProperty(t,"ForStatement",{enumerable:true,get:function(){return n.forStatement}});Object.defineProperty(t,"FunctionDeclaration",{enumerable:true,get:function(){return n.functionDeclaration}});Object.defineProperty(t,"FunctionExpression",{enumerable:true,get:function(){return n.functionExpression}});Object.defineProperty(t,"FunctionTypeAnnotation",{enumerable:true,get:function(){return n.functionTypeAnnotation}});Object.defineProperty(t,"FunctionTypeParam",{enumerable:true,get:function(){return n.functionTypeParam}});Object.defineProperty(t,"GenericTypeAnnotation",{enumerable:true,get:function(){return n.genericTypeAnnotation}});Object.defineProperty(t,"Identifier",{enumerable:true,get:function(){return n.identifier}});Object.defineProperty(t,"IfStatement",{enumerable:true,get:function(){return n.ifStatement}});Object.defineProperty(t,"Import",{enumerable:true,get:function(){return n.import}});Object.defineProperty(t,"ImportAttribute",{enumerable:true,get:function(){return n.importAttribute}});Object.defineProperty(t,"ImportDeclaration",{enumerable:true,get:function(){return n.importDeclaration}});Object.defineProperty(t,"ImportDefaultSpecifier",{enumerable:true,get:function(){return n.importDefaultSpecifier}});Object.defineProperty(t,"ImportNamespaceSpecifier",{enumerable:true,get:function(){return n.importNamespaceSpecifier}});Object.defineProperty(t,"ImportSpecifier",{enumerable:true,get:function(){return n.importSpecifier}});Object.defineProperty(t,"IndexedAccessType",{enumerable:true,get:function(){return n.indexedAccessType}});Object.defineProperty(t,"InferredPredicate",{enumerable:true,get:function(){return n.inferredPredicate}});Object.defineProperty(t,"InterfaceDeclaration",{enumerable:true,get:function(){return n.interfaceDeclaration}});Object.defineProperty(t,"InterfaceExtends",{enumerable:true,get:function(){return n.interfaceExtends}});Object.defineProperty(t,"InterfaceTypeAnnotation",{enumerable:true,get:function(){return n.interfaceTypeAnnotation}});Object.defineProperty(t,"InterpreterDirective",{enumerable:true,get:function(){return n.interpreterDirective}});Object.defineProperty(t,"IntersectionTypeAnnotation",{enumerable:true,get:function(){return n.intersectionTypeAnnotation}});Object.defineProperty(t,"JSXAttribute",{enumerable:true,get:function(){return n.jsxAttribute}});Object.defineProperty(t,"JSXClosingElement",{enumerable:true,get:function(){return n.jsxClosingElement}});Object.defineProperty(t,"JSXClosingFragment",{enumerable:true,get:function(){return n.jsxClosingFragment}});Object.defineProperty(t,"JSXElement",{enumerable:true,get:function(){return n.jsxElement}});Object.defineProperty(t,"JSXEmptyExpression",{enumerable:true,get:function(){return n.jsxEmptyExpression}});Object.defineProperty(t,"JSXExpressionContainer",{enumerable:true,get:function(){return n.jsxExpressionContainer}});Object.defineProperty(t,"JSXFragment",{enumerable:true,get:function(){return n.jsxFragment}});Object.defineProperty(t,"JSXIdentifier",{enumerable:true,get:function(){return n.jsxIdentifier}});Object.defineProperty(t,"JSXMemberExpression",{enumerable:true,get:function(){return n.jsxMemberExpression}});Object.defineProperty(t,"JSXNamespacedName",{enumerable:true,get:function(){return n.jsxNamespacedName}});Object.defineProperty(t,"JSXOpeningElement",{enumerable:true,get:function(){return n.jsxOpeningElement}});Object.defineProperty(t,"JSXOpeningFragment",{enumerable:true,get:function(){return n.jsxOpeningFragment}});Object.defineProperty(t,"JSXSpreadAttribute",{enumerable:true,get:function(){return n.jsxSpreadAttribute}});Object.defineProperty(t,"JSXSpreadChild",{enumerable:true,get:function(){return n.jsxSpreadChild}});Object.defineProperty(t,"JSXText",{enumerable:true,get:function(){return n.jsxText}});Object.defineProperty(t,"LabeledStatement",{enumerable:true,get:function(){return n.labeledStatement}});Object.defineProperty(t,"LogicalExpression",{enumerable:true,get:function(){return n.logicalExpression}});Object.defineProperty(t,"MemberExpression",{enumerable:true,get:function(){return n.memberExpression}});Object.defineProperty(t,"MetaProperty",{enumerable:true,get:function(){return n.metaProperty}});Object.defineProperty(t,"MixedTypeAnnotation",{enumerable:true,get:function(){return n.mixedTypeAnnotation}});Object.defineProperty(t,"ModuleExpression",{enumerable:true,get:function(){return n.moduleExpression}});Object.defineProperty(t,"NewExpression",{enumerable:true,get:function(){return n.newExpression}});Object.defineProperty(t,"Noop",{enumerable:true,get:function(){return n.noop}});Object.defineProperty(t,"NullLiteral",{enumerable:true,get:function(){return n.nullLiteral}});Object.defineProperty(t,"NullLiteralTypeAnnotation",{enumerable:true,get:function(){return n.nullLiteralTypeAnnotation}});Object.defineProperty(t,"NullableTypeAnnotation",{enumerable:true,get:function(){return n.nullableTypeAnnotation}});Object.defineProperty(t,"NumberLiteral",{enumerable:true,get:function(){return n.numberLiteral}});Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:true,get:function(){return n.numberLiteralTypeAnnotation}});Object.defineProperty(t,"NumberTypeAnnotation",{enumerable:true,get:function(){return n.numberTypeAnnotation}});Object.defineProperty(t,"NumericLiteral",{enumerable:true,get:function(){return n.numericLiteral}});Object.defineProperty(t,"ObjectExpression",{enumerable:true,get:function(){return n.objectExpression}});Object.defineProperty(t,"ObjectMethod",{enumerable:true,get:function(){return n.objectMethod}});Object.defineProperty(t,"ObjectPattern",{enumerable:true,get:function(){return n.objectPattern}});Object.defineProperty(t,"ObjectProperty",{enumerable:true,get:function(){return n.objectProperty}});Object.defineProperty(t,"ObjectTypeAnnotation",{enumerable:true,get:function(){return n.objectTypeAnnotation}});Object.defineProperty(t,"ObjectTypeCallProperty",{enumerable:true,get:function(){return n.objectTypeCallProperty}});Object.defineProperty(t,"ObjectTypeIndexer",{enumerable:true,get:function(){return n.objectTypeIndexer}});Object.defineProperty(t,"ObjectTypeInternalSlot",{enumerable:true,get:function(){return n.objectTypeInternalSlot}});Object.defineProperty(t,"ObjectTypeProperty",{enumerable:true,get:function(){return n.objectTypeProperty}});Object.defineProperty(t,"ObjectTypeSpreadProperty",{enumerable:true,get:function(){return n.objectTypeSpreadProperty}});Object.defineProperty(t,"OpaqueType",{enumerable:true,get:function(){return n.opaqueType}});Object.defineProperty(t,"OptionalCallExpression",{enumerable:true,get:function(){return n.optionalCallExpression}});Object.defineProperty(t,"OptionalIndexedAccessType",{enumerable:true,get:function(){return n.optionalIndexedAccessType}});Object.defineProperty(t,"OptionalMemberExpression",{enumerable:true,get:function(){return n.optionalMemberExpression}});Object.defineProperty(t,"ParenthesizedExpression",{enumerable:true,get:function(){return n.parenthesizedExpression}});Object.defineProperty(t,"PipelineBareFunction",{enumerable:true,get:function(){return n.pipelineBareFunction}});Object.defineProperty(t,"PipelinePrimaryTopicReference",{enumerable:true,get:function(){return n.pipelinePrimaryTopicReference}});Object.defineProperty(t,"PipelineTopicExpression",{enumerable:true,get:function(){return n.pipelineTopicExpression}});Object.defineProperty(t,"Placeholder",{enumerable:true,get:function(){return n.placeholder}});Object.defineProperty(t,"PrivateName",{enumerable:true,get:function(){return n.privateName}});Object.defineProperty(t,"Program",{enumerable:true,get:function(){return n.program}});Object.defineProperty(t,"QualifiedTypeIdentifier",{enumerable:true,get:function(){return n.qualifiedTypeIdentifier}});Object.defineProperty(t,"RecordExpression",{enumerable:true,get:function(){return n.recordExpression}});Object.defineProperty(t,"RegExpLiteral",{enumerable:true,get:function(){return n.regExpLiteral}});Object.defineProperty(t,"RegexLiteral",{enumerable:true,get:function(){return n.regexLiteral}});Object.defineProperty(t,"RestElement",{enumerable:true,get:function(){return n.restElement}});Object.defineProperty(t,"RestProperty",{enumerable:true,get:function(){return n.restProperty}});Object.defineProperty(t,"ReturnStatement",{enumerable:true,get:function(){return n.returnStatement}});Object.defineProperty(t,"SequenceExpression",{enumerable:true,get:function(){return n.sequenceExpression}});Object.defineProperty(t,"SpreadElement",{enumerable:true,get:function(){return n.spreadElement}});Object.defineProperty(t,"SpreadProperty",{enumerable:true,get:function(){return n.spreadProperty}});Object.defineProperty(t,"StaticBlock",{enumerable:true,get:function(){return n.staticBlock}});Object.defineProperty(t,"StringLiteral",{enumerable:true,get:function(){return n.stringLiteral}});Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:true,get:function(){return n.stringLiteralTypeAnnotation}});Object.defineProperty(t,"StringTypeAnnotation",{enumerable:true,get:function(){return n.stringTypeAnnotation}});Object.defineProperty(t,"Super",{enumerable:true,get:function(){return n.super}});Object.defineProperty(t,"SwitchCase",{enumerable:true,get:function(){return n.switchCase}});Object.defineProperty(t,"SwitchStatement",{enumerable:true,get:function(){return n.switchStatement}});Object.defineProperty(t,"SymbolTypeAnnotation",{enumerable:true,get:function(){return n.symbolTypeAnnotation}});Object.defineProperty(t,"TSAnyKeyword",{enumerable:true,get:function(){return n.tsAnyKeyword}});Object.defineProperty(t,"TSArrayType",{enumerable:true,get:function(){return n.tsArrayType}});Object.defineProperty(t,"TSAsExpression",{enumerable:true,get:function(){return n.tsAsExpression}});Object.defineProperty(t,"TSBigIntKeyword",{enumerable:true,get:function(){return n.tsBigIntKeyword}});Object.defineProperty(t,"TSBooleanKeyword",{enumerable:true,get:function(){return n.tsBooleanKeyword}});Object.defineProperty(t,"TSCallSignatureDeclaration",{enumerable:true,get:function(){return n.tsCallSignatureDeclaration}});Object.defineProperty(t,"TSConditionalType",{enumerable:true,get:function(){return n.tsConditionalType}});Object.defineProperty(t,"TSConstructSignatureDeclaration",{enumerable:true,get:function(){return n.tsConstructSignatureDeclaration}});Object.defineProperty(t,"TSConstructorType",{enumerable:true,get:function(){return n.tsConstructorType}});Object.defineProperty(t,"TSDeclareFunction",{enumerable:true,get:function(){return n.tsDeclareFunction}});Object.defineProperty(t,"TSDeclareMethod",{enumerable:true,get:function(){return n.tsDeclareMethod}});Object.defineProperty(t,"TSEnumDeclaration",{enumerable:true,get:function(){return n.tsEnumDeclaration}});Object.defineProperty(t,"TSEnumMember",{enumerable:true,get:function(){return n.tsEnumMember}});Object.defineProperty(t,"TSExportAssignment",{enumerable:true,get:function(){return n.tsExportAssignment}});Object.defineProperty(t,"TSExpressionWithTypeArguments",{enumerable:true,get:function(){return n.tsExpressionWithTypeArguments}});Object.defineProperty(t,"TSExternalModuleReference",{enumerable:true,get:function(){return n.tsExternalModuleReference}});Object.defineProperty(t,"TSFunctionType",{enumerable:true,get:function(){return n.tsFunctionType}});Object.defineProperty(t,"TSImportEqualsDeclaration",{enumerable:true,get:function(){return n.tsImportEqualsDeclaration}});Object.defineProperty(t,"TSImportType",{enumerable:true,get:function(){return n.tsImportType}});Object.defineProperty(t,"TSIndexSignature",{enumerable:true,get:function(){return n.tsIndexSignature}});Object.defineProperty(t,"TSIndexedAccessType",{enumerable:true,get:function(){return n.tsIndexedAccessType}});Object.defineProperty(t,"TSInferType",{enumerable:true,get:function(){return n.tsInferType}});Object.defineProperty(t,"TSInstantiationExpression",{enumerable:true,get:function(){return n.tsInstantiationExpression}});Object.defineProperty(t,"TSInterfaceBody",{enumerable:true,get:function(){return n.tsInterfaceBody}});Object.defineProperty(t,"TSInterfaceDeclaration",{enumerable:true,get:function(){return n.tsInterfaceDeclaration}});Object.defineProperty(t,"TSIntersectionType",{enumerable:true,get:function(){return n.tsIntersectionType}});Object.defineProperty(t,"TSIntrinsicKeyword",{enumerable:true,get:function(){return n.tsIntrinsicKeyword}});Object.defineProperty(t,"TSLiteralType",{enumerable:true,get:function(){return n.tsLiteralType}});Object.defineProperty(t,"TSMappedType",{enumerable:true,get:function(){return n.tsMappedType}});Object.defineProperty(t,"TSMethodSignature",{enumerable:true,get:function(){return n.tsMethodSignature}});Object.defineProperty(t,"TSModuleBlock",{enumerable:true,get:function(){return n.tsModuleBlock}});Object.defineProperty(t,"TSModuleDeclaration",{enumerable:true,get:function(){return n.tsModuleDeclaration}});Object.defineProperty(t,"TSNamedTupleMember",{enumerable:true,get:function(){return n.tsNamedTupleMember}});Object.defineProperty(t,"TSNamespaceExportDeclaration",{enumerable:true,get:function(){return n.tsNamespaceExportDeclaration}});Object.defineProperty(t,"TSNeverKeyword",{enumerable:true,get:function(){return n.tsNeverKeyword}});Object.defineProperty(t,"TSNonNullExpression",{enumerable:true,get:function(){return n.tsNonNullExpression}});Object.defineProperty(t,"TSNullKeyword",{enumerable:true,get:function(){return n.tsNullKeyword}});Object.defineProperty(t,"TSNumberKeyword",{enumerable:true,get:function(){return n.tsNumberKeyword}});Object.defineProperty(t,"TSObjectKeyword",{enumerable:true,get:function(){return n.tsObjectKeyword}});Object.defineProperty(t,"TSOptionalType",{enumerable:true,get:function(){return n.tsOptionalType}});Object.defineProperty(t,"TSParameterProperty",{enumerable:true,get:function(){return n.tsParameterProperty}});Object.defineProperty(t,"TSParenthesizedType",{enumerable:true,get:function(){return n.tsParenthesizedType}});Object.defineProperty(t,"TSPropertySignature",{enumerable:true,get:function(){return n.tsPropertySignature}});Object.defineProperty(t,"TSQualifiedName",{enumerable:true,get:function(){return n.tsQualifiedName}});Object.defineProperty(t,"TSRestType",{enumerable:true,get:function(){return n.tsRestType}});Object.defineProperty(t,"TSStringKeyword",{enumerable:true,get:function(){return n.tsStringKeyword}});Object.defineProperty(t,"TSSymbolKeyword",{enumerable:true,get:function(){return n.tsSymbolKeyword}});Object.defineProperty(t,"TSThisType",{enumerable:true,get:function(){return n.tsThisType}});Object.defineProperty(t,"TSTupleType",{enumerable:true,get:function(){return n.tsTupleType}});Object.defineProperty(t,"TSTypeAliasDeclaration",{enumerable:true,get:function(){return n.tsTypeAliasDeclaration}});Object.defineProperty(t,"TSTypeAnnotation",{enumerable:true,get:function(){return n.tsTypeAnnotation}});Object.defineProperty(t,"TSTypeAssertion",{enumerable:true,get:function(){return n.tsTypeAssertion}});Object.defineProperty(t,"TSTypeLiteral",{enumerable:true,get:function(){return n.tsTypeLiteral}});Object.defineProperty(t,"TSTypeOperator",{enumerable:true,get:function(){return n.tsTypeOperator}});Object.defineProperty(t,"TSTypeParameter",{enumerable:true,get:function(){return n.tsTypeParameter}});Object.defineProperty(t,"TSTypeParameterDeclaration",{enumerable:true,get:function(){return n.tsTypeParameterDeclaration}});Object.defineProperty(t,"TSTypeParameterInstantiation",{enumerable:true,get:function(){return n.tsTypeParameterInstantiation}});Object.defineProperty(t,"TSTypePredicate",{enumerable:true,get:function(){return n.tsTypePredicate}});Object.defineProperty(t,"TSTypeQuery",{enumerable:true,get:function(){return n.tsTypeQuery}});Object.defineProperty(t,"TSTypeReference",{enumerable:true,get:function(){return n.tsTypeReference}});Object.defineProperty(t,"TSUndefinedKeyword",{enumerable:true,get:function(){return n.tsUndefinedKeyword}});Object.defineProperty(t,"TSUnionType",{enumerable:true,get:function(){return n.tsUnionType}});Object.defineProperty(t,"TSUnknownKeyword",{enumerable:true,get:function(){return n.tsUnknownKeyword}});Object.defineProperty(t,"TSVoidKeyword",{enumerable:true,get:function(){return n.tsVoidKeyword}});Object.defineProperty(t,"TaggedTemplateExpression",{enumerable:true,get:function(){return n.taggedTemplateExpression}});Object.defineProperty(t,"TemplateElement",{enumerable:true,get:function(){return n.templateElement}});Object.defineProperty(t,"TemplateLiteral",{enumerable:true,get:function(){return n.templateLiteral}});Object.defineProperty(t,"ThisExpression",{enumerable:true,get:function(){return n.thisExpression}});Object.defineProperty(t,"ThisTypeAnnotation",{enumerable:true,get:function(){return n.thisTypeAnnotation}});Object.defineProperty(t,"ThrowStatement",{enumerable:true,get:function(){return n.throwStatement}});Object.defineProperty(t,"TopicReference",{enumerable:true,get:function(){return n.topicReference}});Object.defineProperty(t,"TryStatement",{enumerable:true,get:function(){return n.tryStatement}});Object.defineProperty(t,"TupleExpression",{enumerable:true,get:function(){return n.tupleExpression}});Object.defineProperty(t,"TupleTypeAnnotation",{enumerable:true,get:function(){return n.tupleTypeAnnotation}});Object.defineProperty(t,"TypeAlias",{enumerable:true,get:function(){return n.typeAlias}});Object.defineProperty(t,"TypeAnnotation",{enumerable:true,get:function(){return n.typeAnnotation}});Object.defineProperty(t,"TypeCastExpression",{enumerable:true,get:function(){return n.typeCastExpression}});Object.defineProperty(t,"TypeParameter",{enumerable:true,get:function(){return n.typeParameter}});Object.defineProperty(t,"TypeParameterDeclaration",{enumerable:true,get:function(){return n.typeParameterDeclaration}});Object.defineProperty(t,"TypeParameterInstantiation",{enumerable:true,get:function(){return n.typeParameterInstantiation}});Object.defineProperty(t,"TypeofTypeAnnotation",{enumerable:true,get:function(){return n.typeofTypeAnnotation}});Object.defineProperty(t,"UnaryExpression",{enumerable:true,get:function(){return n.unaryExpression}});Object.defineProperty(t,"UnionTypeAnnotation",{enumerable:true,get:function(){return n.unionTypeAnnotation}});Object.defineProperty(t,"UpdateExpression",{enumerable:true,get:function(){return n.updateExpression}});Object.defineProperty(t,"V8IntrinsicIdentifier",{enumerable:true,get:function(){return n.v8IntrinsicIdentifier}});Object.defineProperty(t,"VariableDeclaration",{enumerable:true,get:function(){return n.variableDeclaration}});Object.defineProperty(t,"VariableDeclarator",{enumerable:true,get:function(){return n.variableDeclarator}});Object.defineProperty(t,"Variance",{enumerable:true,get:function(){return n.variance}});Object.defineProperty(t,"VoidTypeAnnotation",{enumerable:true,get:function(){return n.voidTypeAnnotation}});Object.defineProperty(t,"WhileStatement",{enumerable:true,get:function(){return n.whileStatement}});Object.defineProperty(t,"WithStatement",{enumerable:true,get:function(){return n.withStatement}});Object.defineProperty(t,"YieldExpression",{enumerable:true,get:function(){return n.yieldExpression}});var n=r(3321)},7671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=buildChildren;var n=r(9648);var s=r(5051);function buildChildren(e){const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=createTSUnionType;var n=r(3321);var s=r(6532);function createTSUnionType(e){const t=e.map((e=>e.typeAnnotation));const r=(0,s.default)(t);if(r.length===1){return r[0]}else{return(0,n.tsUnionType)(r)}}},1958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=validateNode;var n=r(5525);var s=r(6953);function validateNode(e){const t=s.BUILDER_KEYS[e.type];for(const r of t){(0,n.default)(e,r,e[r])}return e}},3639:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=clone;var n=r(9396);function clone(e){return(0,n.default)(e,false)}},2209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=cloneDeep;var n=r(9396);function cloneDeep(e){return(0,n.default)(e)}},1686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=cloneDeepWithoutLoc;var n=r(9396);function cloneDeepWithoutLoc(e){return(0,n.default)(e,true,true)}},9396:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=cloneNode;var n=r(6107);var s=r(9648);const i=Function.call.bind(Object.prototype.hasOwnProperty);function cloneIfNode(e,t,r,n){if(e&&typeof e.type==="string"){return cloneNodeInternal(e,t,r,n)}return e}function cloneIfNodeOrArray(e,t,r,n){if(Array.isArray(e)){return e.map((e=>cloneIfNode(e,t,r,n)))}return cloneIfNode(e,t,r,n)}function cloneNode(e,t=true,r=false){return cloneNodeInternal(e,t,r,new Map)}function cloneNodeInternal(e,t=true,r=false,a){if(!e)return e;const{type:o}=e;const l={type:e.type};if((0,s.isIdentifier)(e)){l.name=e.name;if(i(e,"optional")&&typeof e.optional==="boolean"){l.optional=e.optional}if(i(e,"typeAnnotation")){l.typeAnnotation=t?cloneIfNodeOrArray(e.typeAnnotation,true,r,a):e.typeAnnotation}}else if(!i(n.NODE_FIELDS,o)){throw new Error(`Unknown node type: "${o}"`)}else{for(const c of Object.keys(n.NODE_FIELDS[o])){if(i(e,c)){if(t){l[c]=(0,s.isFile)(e)&&c==="comments"?maybeCloneComments(e.comments,t,r,a):cloneIfNodeOrArray(e[c],true,r,a)}else{l[c]=e[c]}}}}if(i(e,"loc")){if(r){l.loc=null}else{l.loc=e.loc}}if(i(e,"leadingComments")){l.leadingComments=maybeCloneComments(e.leadingComments,t,r,a)}if(i(e,"innerComments")){l.innerComments=maybeCloneComments(e.innerComments,t,r,a)}if(i(e,"trailingComments")){l.trailingComments=maybeCloneComments(e.trailingComments,t,r,a)}if(i(e,"extra")){l.extra=Object.assign({},e.extra)}return l}function maybeCloneComments(e,t,r,n){if(!e||!t){return e}return e.map((e=>{const t=n.get(e);if(t)return t;const{type:s,value:i,loc:a}=e;const o={type:s,value:i,loc:a};if(r){o.loc=null}n.set(e,o);return o}))}},1127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=cloneWithoutLoc;var n=r(9396);function cloneWithoutLoc(e){return(0,n.default)(e,false,true)}},5673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=addComment;var n=r(5632);function addComment(e,t,r,s){return(0,n.default)(e,t,[{type:s?"CommentLine":"CommentBlock",value:r}])}},5632:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=addComments;function addComments(e,t,r){if(!r||!e)return e;const n=`${t}Comments`;if(e[n]){if(t==="leading"){e[n]=r.concat(e[n])}else{e[n].push(...r)}}else{e[n]=r}return e}},9162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=inheritInnerComments;var n=r(581);function inheritInnerComments(e,t){(0,n.default)("innerComments",e,t)}},8105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=inheritLeadingComments;var n=r(581);function inheritLeadingComments(e,t){(0,n.default)("leadingComments",e,t)}},387:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=inheritTrailingComments;var n=r(581);function inheritTrailingComments(e,t){(0,n.default)("trailingComments",e,t)}},2564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=inheritsComments;var n=r(387);var s=r(8105);var i=r(9162);function inheritsComments(e,t){(0,n.default)(e,t);(0,s.default)(e,t);(0,i.default)(e,t);return e}},5460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=removeComments;var n=r(9071);function removeComments(e){n.COMMENT_KEYS.forEach((t=>{e[t]=null}));return e}},4225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WHILE_TYPES=t.USERWHITESPACABLE_TYPES=t.UNARYLIKE_TYPES=t.TYPESCRIPT_TYPES=t.TSTYPE_TYPES=t.TSTYPEELEMENT_TYPES=t.TSENTITYNAME_TYPES=t.TSBASETYPE_TYPES=t.TERMINATORLESS_TYPES=t.STATEMENT_TYPES=t.STANDARDIZED_TYPES=t.SCOPABLE_TYPES=t.PUREISH_TYPES=t.PROPERTY_TYPES=t.PRIVATE_TYPES=t.PATTERN_TYPES=t.PATTERNLIKE_TYPES=t.OBJECTMEMBER_TYPES=t.MODULESPECIFIER_TYPES=t.MODULEDECLARATION_TYPES=t.MISCELLANEOUS_TYPES=t.METHOD_TYPES=t.LVAL_TYPES=t.LOOP_TYPES=t.LITERAL_TYPES=t.JSX_TYPES=t.IMMUTABLE_TYPES=t.FUNCTION_TYPES=t.FUNCTIONPARENT_TYPES=t.FOR_TYPES=t.FORXSTATEMENT_TYPES=t.FLOW_TYPES=t.FLOWTYPE_TYPES=t.FLOWPREDICATE_TYPES=t.FLOWDECLARATION_TYPES=t.FLOWBASEANNOTATION_TYPES=t.EXPRESSION_TYPES=t.EXPRESSIONWRAPPER_TYPES=t.EXPORTDECLARATION_TYPES=t.ENUMMEMBER_TYPES=t.ENUMBODY_TYPES=t.DECLARATION_TYPES=t.CONDITIONAL_TYPES=t.COMPLETIONSTATEMENT_TYPES=t.CLASS_TYPES=t.BLOCK_TYPES=t.BLOCKPARENT_TYPES=t.BINARY_TYPES=t.ACCESSOR_TYPES=void 0;var n=r(6107);const s=n.FLIPPED_ALIAS_KEYS["Standardized"];t.STANDARDIZED_TYPES=s;const i=n.FLIPPED_ALIAS_KEYS["Expression"];t.EXPRESSION_TYPES=i;const a=n.FLIPPED_ALIAS_KEYS["Binary"];t.BINARY_TYPES=a;const o=n.FLIPPED_ALIAS_KEYS["Scopable"];t.SCOPABLE_TYPES=o;const l=n.FLIPPED_ALIAS_KEYS["BlockParent"];t.BLOCKPARENT_TYPES=l;const c=n.FLIPPED_ALIAS_KEYS["Block"];t.BLOCK_TYPES=c;const u=n.FLIPPED_ALIAS_KEYS["Statement"];t.STATEMENT_TYPES=u;const p=n.FLIPPED_ALIAS_KEYS["Terminatorless"];t.TERMINATORLESS_TYPES=p;const f=n.FLIPPED_ALIAS_KEYS["CompletionStatement"];t.COMPLETIONSTATEMENT_TYPES=f;const d=n.FLIPPED_ALIAS_KEYS["Conditional"];t.CONDITIONAL_TYPES=d;const h=n.FLIPPED_ALIAS_KEYS["Loop"];t.LOOP_TYPES=h;const m=n.FLIPPED_ALIAS_KEYS["While"];t.WHILE_TYPES=m;const y=n.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];t.EXPRESSIONWRAPPER_TYPES=y;const g=n.FLIPPED_ALIAS_KEYS["For"];t.FOR_TYPES=g;const b=n.FLIPPED_ALIAS_KEYS["ForXStatement"];t.FORXSTATEMENT_TYPES=b;const T=n.FLIPPED_ALIAS_KEYS["Function"];t.FUNCTION_TYPES=T;const S=n.FLIPPED_ALIAS_KEYS["FunctionParent"];t.FUNCTIONPARENT_TYPES=S;const E=n.FLIPPED_ALIAS_KEYS["Pureish"];t.PUREISH_TYPES=E;const x=n.FLIPPED_ALIAS_KEYS["Declaration"];t.DECLARATION_TYPES=x;const P=n.FLIPPED_ALIAS_KEYS["PatternLike"];t.PATTERNLIKE_TYPES=P;const v=n.FLIPPED_ALIAS_KEYS["LVal"];t.LVAL_TYPES=v;const A=n.FLIPPED_ALIAS_KEYS["TSEntityName"];t.TSENTITYNAME_TYPES=A;const w=n.FLIPPED_ALIAS_KEYS["Literal"];t.LITERAL_TYPES=w;const I=n.FLIPPED_ALIAS_KEYS["Immutable"];t.IMMUTABLE_TYPES=I;const C=n.FLIPPED_ALIAS_KEYS["UserWhitespacable"];t.USERWHITESPACABLE_TYPES=C;const O=n.FLIPPED_ALIAS_KEYS["Method"];t.METHOD_TYPES=O;const k=n.FLIPPED_ALIAS_KEYS["ObjectMember"];t.OBJECTMEMBER_TYPES=k;const N=n.FLIPPED_ALIAS_KEYS["Property"];t.PROPERTY_TYPES=N;const _=n.FLIPPED_ALIAS_KEYS["UnaryLike"];t.UNARYLIKE_TYPES=_;const D=n.FLIPPED_ALIAS_KEYS["Pattern"];t.PATTERN_TYPES=D;const M=n.FLIPPED_ALIAS_KEYS["Class"];t.CLASS_TYPES=M;const L=n.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];t.MODULEDECLARATION_TYPES=L;const j=n.FLIPPED_ALIAS_KEYS["ExportDeclaration"];t.EXPORTDECLARATION_TYPES=j;const F=n.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];t.MODULESPECIFIER_TYPES=F;const R=n.FLIPPED_ALIAS_KEYS["Accessor"];t.ACCESSOR_TYPES=R;const B=n.FLIPPED_ALIAS_KEYS["Private"];t.PRIVATE_TYPES=B;const U=n.FLIPPED_ALIAS_KEYS["Flow"];t.FLOW_TYPES=U;const K=n.FLIPPED_ALIAS_KEYS["FlowType"];t.FLOWTYPE_TYPES=K;const $=n.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];t.FLOWBASEANNOTATION_TYPES=$;const V=n.FLIPPED_ALIAS_KEYS["FlowDeclaration"];t.FLOWDECLARATION_TYPES=V;const W=n.FLIPPED_ALIAS_KEYS["FlowPredicate"];t.FLOWPREDICATE_TYPES=W;const q=n.FLIPPED_ALIAS_KEYS["EnumBody"];t.ENUMBODY_TYPES=q;const H=n.FLIPPED_ALIAS_KEYS["EnumMember"];t.ENUMMEMBER_TYPES=H;const G=n.FLIPPED_ALIAS_KEYS["JSX"];t.JSX_TYPES=G;const X=n.FLIPPED_ALIAS_KEYS["Miscellaneous"];t.MISCELLANEOUS_TYPES=X;const J=n.FLIPPED_ALIAS_KEYS["TypeScript"];t.TYPESCRIPT_TYPES=J;const z=n.FLIPPED_ALIAS_KEYS["TSTypeElement"];t.TSTYPEELEMENT_TYPES=z;const Y=n.FLIPPED_ALIAS_KEYS["TSType"];t.TSTYPE_TYPES=Y;const Q=n.FLIPPED_ALIAS_KEYS["TSBaseType"];t.TSBASETYPE_TYPES=Q},9071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UPDATE_OPERATORS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.STATEMENT_OR_BLOCK_KEYS=t.NUMBER_UNARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.NOT_LOCAL_BINDING=t.LOGICAL_OPERATORS=t.INHERIT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.EQUALITY_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.COMMENT_KEYS=t.BOOLEAN_UNARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.BLOCK_SCOPED_SYMBOL=t.BINARY_OPERATORS=t.ASSIGNMENT_OPERATORS=void 0;const r=["consequent","body","alternate"];t.STATEMENT_OR_BLOCK_KEYS=r;const n=["body","expressions"];t.FLATTENABLE_KEYS=n;const s=["left","init"];t.FOR_INIT_KEYS=s;const i=["leadingComments","trailingComments","innerComments"];t.COMMENT_KEYS=i;const a=["||","&&","??"];t.LOGICAL_OPERATORS=a;const o=["++","--"];t.UPDATE_OPERATORS=o;const l=[">","<",">=","<="];t.BOOLEAN_NUMBER_BINARY_OPERATORS=l;const c=["==","===","!=","!=="];t.EQUALITY_BINARY_OPERATORS=c;const u=[...c,"in","instanceof"];t.COMPARISON_BINARY_OPERATORS=u;const p=[...u,...l];t.BOOLEAN_BINARY_OPERATORS=p;const f=["-","/","%","*","**","&","|",">>",">>>","<<","^"];t.NUMBER_BINARY_OPERATORS=f;const d=["+",...f,...p,"|>"];t.BINARY_OPERATORS=d;const h=["=","+=",...f.map((e=>e+"=")),...a.map((e=>e+"="))];t.ASSIGNMENT_OPERATORS=h;const m=["delete","!"];t.BOOLEAN_UNARY_OPERATORS=m;const y=["+","-","~"];t.NUMBER_UNARY_OPERATORS=y;const g=["typeof"];t.STRING_UNARY_OPERATORS=g;const b=["void","throw",...m,...y,...g];t.UNARY_OPERATORS=b;const T={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};t.INHERIT_KEYS=T;const S=Symbol.for("var used to be block scoped");t.BLOCK_SCOPED_SYMBOL=S;const E=Symbol.for("should not be considered a local binding");t.NOT_LOCAL_BINDING=E},1202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=ensureBlock;var n=r(5033);function ensureBlock(e,t="body"){return e[t]=(0,n.default)(e[t],e)}},640:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=gatherSequenceExpressions;var n=r(26);var s=r(9648);var i=r(3321);var a=r(9396);function gatherSequenceExpressions(e,t,r){const o=[];let l=true;for(const c of e){if(!(0,s.isEmptyStatement)(c)){l=false}if((0,s.isExpression)(c)){o.push(c)}else if((0,s.isExpressionStatement)(c)){o.push(c.expression)}else if((0,s.isVariableDeclaration)(c)){if(c.kind!=="var")return;for(const e of c.declarations){const t=(0,n.default)(e);for(const e of Object.keys(t)){r.push({kind:c.kind,id:(0,a.default)(t[e])})}if(e.init){o.push((0,i.assignmentExpression)("=",e.id,e.init))}}l=true}else if((0,s.isIfStatement)(c)){const e=c.consequent?gatherSequenceExpressions([c.consequent],t,r):t.buildUndefinedNode();const n=c.alternate?gatherSequenceExpressions([c.alternate],t,r):t.buildUndefinedNode();if(!e||!n)return;o.push((0,i.conditionalExpression)(c.test,e,n))}else if((0,s.isBlockStatement)(c)){const e=gatherSequenceExpressions(c.body,t,r);if(!e)return;o.push(e)}else if((0,s.isEmptyStatement)(c)){if(e.indexOf(c)===0){l=true}}else{return}}if(l){o.push(t.buildUndefinedNode())}if(o.length===1){return o[0]}else{return(0,i.sequenceExpression)(o)}}},6195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=toBindingIdentifierName;var n=r(8740);function toBindingIdentifierName(e){e=(0,n.default)(e);if(e==="eval"||e==="arguments")e="_"+e;return e}},5033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=toBlock;var n=r(9648);var s=r(3321);function toBlock(e,t){if((0,n.isBlockStatement)(e)){return e}let r=[];if((0,n.isEmptyStatement)(e)){r=[]}else{if(!(0,n.isStatement)(e)){if((0,n.isFunction)(t)){e=(0,s.returnStatement)(e)}else{e=(0,s.expressionStatement)(e)}}r=[e]}return(0,s.blockStatement)(r)}},6407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=toComputedKey;var n=r(9648);var s=r(3321);function toComputedKey(e,t=e.key||e.property){if(!e.computed&&(0,n.isIdentifier)(t))t=(0,s.stringLiteral)(t.name);return t}},1292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(9648);var s=toExpression;t["default"]=s;function toExpression(e){if((0,n.isExpressionStatement)(e)){e=e.expression}if((0,n.isExpression)(e)){return e}if((0,n.isClass)(e)){e.type="ClassExpression"}else if((0,n.isFunction)(e)){e.type="FunctionExpression"}if(!(0,n.isExpression)(e)){throw new Error(`cannot turn ${e.type} to an expression`)}return e}},8740:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=toIdentifier;var n=r(963);var s=r(8162);function toIdentifier(e){e=e+"";let t="";for(const r of e){t+=(0,s.isIdentifierChar)(r.codePointAt(0))?r:"-"}t=t.replace(/^[-0-9]+/,"");t=t.replace(/[-\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}));if(!(0,n.default)(t)){t=`_${t}`}return t||"_"}},823:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=toKeyAlias;var n=r(9648);var s=r(9396);var i=r(6099);function toKeyAlias(e,t=e.key){let r;if(e.kind==="method"){return toKeyAlias.increment()+""}else if((0,n.isIdentifier)(t)){r=t.name}else if((0,n.isStringLiteral)(t)){r=JSON.stringify(t.value)}else{r=JSON.stringify((0,i.default)((0,s.default)(t)))}if(e.computed){r=`[${r}]`}if(e.static){r=`static:${r}`}return r}toKeyAlias.uid=0;toKeyAlias.increment=function(){if(toKeyAlias.uid>=Number.MAX_SAFE_INTEGER){return toKeyAlias.uid=0}else{return toKeyAlias.uid++}}},9413:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=toSequenceExpression;var n=r(640);function toSequenceExpression(e,t){if(!(e!=null&&e.length))return;const r=[];const s=(0,n.default)(e,t,r);if(!s)return;for(const e of r){t.push(e)}return s}},7571:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(9648);var s=r(3321);var i=toStatement;t["default"]=i;function toStatement(e,t){if((0,n.isStatement)(e)){return e}let r=false;let i;if((0,n.isClass)(e)){r=true;i="ClassDeclaration"}else if((0,n.isFunction)(e)){r=true;i="FunctionDeclaration"}else if((0,n.isAssignmentExpression)(e)){return(0,s.expressionStatement)(e)}if(r&&!e.id){i=false}if(!i){if(t){return false}else{throw new Error(`cannot turn ${e.type} to a statement`)}}e.type=i;return e}},9937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(963);var s=r(3321);var i=valueToNode;t["default"]=i;const a=Function.call.bind(Object.prototype.toString);function isRegExp(e){return a(e)==="[object RegExp]"}function isPlainObject(e){if(typeof e!=="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]"){return false}const t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function valueToNode(e){if(e===undefined){return(0,s.identifier)("undefined")}if(e===true||e===false){return(0,s.booleanLiteral)(e)}if(e===null){return(0,s.nullLiteral)()}if(typeof e==="string"){return(0,s.stringLiteral)(e)}if(typeof e==="number"){let t;if(Number.isFinite(e)){t=(0,s.numericLiteral)(Math.abs(e))}else{let r;if(Number.isNaN(e)){r=(0,s.numericLiteral)(0)}else{r=(0,s.numericLiteral)(1)}t=(0,s.binaryExpression)("/",r,(0,s.numericLiteral)(0))}if(e<0||Object.is(e,-0)){t=(0,s.unaryExpression)("-",t)}return t}if(isRegExp(e)){const t=e.source;const r=e.toString().match(/\/([a-z]+|)$/)[1];return(0,s.regExpLiteral)(t,r)}if(Array.isArray(e)){return(0,s.arrayExpression)(e.map(valueToNode))}if(isPlainObject(e)){const t=[];for(const r of Object.keys(e)){let i;if((0,n.default)(r)){i=(0,s.identifier)(r)}else{i=(0,s.stringLiteral)(r)}t.push((0,s.objectProperty)(i,valueToNode(e[r])))}return(0,s.objectExpression)(t)}throw new Error("don't know how to turn this value into a node")}},9137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.patternLikeCommon=t.functionTypeAnnotationCommon=t.functionDeclarationCommon=t.functionCommon=t.classMethodOrPropertyCommon=t.classMethodOrDeclareMethodCommon=void 0;var n=r(4420);var s=r(963);var i=r(8162);var a=r(9071);var o=r(363);const l=(0,o.defineAliasedType)("Standardized");l("ArrayExpression",{fields:{elements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:!process.env.BABEL_TYPES_8_BREAKING?[]:undefined}},visitor:["elements"],aliases:["Expression"]});l("AssignmentExpression",{fields:{operator:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertValueType)("string")}const e=(0,o.assertOneOf)(...a.ASSIGNMENT_OPERATORS);const t=(0,o.assertOneOf)("=");return function(r,s,i){const a=(0,n.default)("Pattern",r.left)?t:e;a(r,s,i)}}()},left:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("LVal"):(0,o.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,o.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});l("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,o.assertOneOf)(...a.BINARY_OPERATORS)},left:{validate:function(){const e=(0,o.assertNodeType)("Expression");const t=(0,o.assertNodeType)("Expression","PrivateName");const validator=function(r,n,s){const i=r.operator==="in"?t:e;i(r,n,s)};validator.oneOfNodeTypes=["Expression","PrivateName"];return validator}()},right:{validate:(0,o.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});l("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}}});l("Directive",{visitor:["value"],fields:{value:{validate:(0,o.assertNodeType)("DirectiveLiteral")}}});l("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}}});l("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Directive"))),default:[]},body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]});l("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,o.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});l("CallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,o.assertNodeType)("Expression","V8IntrinsicIdentifier")},arguments:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))}},!process.env.BABEL_TYPES_8_BREAKING?{optional:{validate:(0,o.assertOneOf)(true,false),optional:true}}:{},{typeArguments:{validate:(0,o.assertNodeType)("TypeParameterInstantiation"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TSTypeParameterInstantiation"),optional:true}})});l("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]});l("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},consequent:{validate:(0,o.assertNodeType)("Expression")},alternate:{validate:(0,o.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});l("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,o.assertNodeType)("Identifier"),optional:true}},aliases:["Statement","Terminatorless","CompletionStatement"]});l("DebuggerStatement",{aliases:["Statement"]});l("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});l("EmptyStatement",{aliases:["Statement"]});l("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,o.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});l("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,o.assertNodeType)("Program")},comments:{validate:!process.env.BABEL_TYPES_8_BREAKING?Object.assign((()=>{}),{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}):(0,o.assertEach)((0,o.assertNodeType)("CommentBlock","CommentLine")),optional:true},tokens:{validate:(0,o.assertEach)(Object.assign((()=>{}),{type:"any"})),optional:true}}});l("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("VariableDeclaration","LVal"):(0,o.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});l("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,o.assertNodeType)("VariableDeclaration","Expression"),optional:true},test:{validate:(0,o.assertNodeType)("Expression"),optional:true},update:{validate:(0,o.assertNodeType)("Expression"),optional:true},body:{validate:(0,o.assertNodeType)("Statement")}}});const c={params:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Identifier","Pattern","RestElement")))},generator:{default:false},async:{default:false}};t.functionCommon=c;const u={returnType:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true}};t.functionTypeAnnotationCommon=u;const p=Object.assign({},c,{declare:{validate:(0,o.assertValueType)("boolean"),optional:true},id:{validate:(0,o.assertNodeType)("Identifier"),optional:true}});t.functionDeclarationCommon=p;l("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:Object.assign({},p,u,{body:{validate:(0,o.assertNodeType)("BlockStatement")},predicate:{validate:(0,o.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:true}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return()=>{};const e=(0,o.assertNodeType)("Identifier");return function(t,r,s){if(!(0,n.default)("ExportDefaultDeclaration",t)){e(s,"id",s.id)}}}()});l("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},c,u,{id:{validate:(0,o.assertNodeType)("Identifier"),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")},predicate:{validate:(0,o.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:true}})});const f={typeAnnotation:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator")))}};t.patternLikeCommon=f;l("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","PatternLike","LVal","TSEntityName"],fields:Object.assign({},f,{name:{validate:(0,o.chain)((0,o.assertValueType)("string"),Object.assign((function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,s.default)(r,false)){throw new TypeError(`"${r}" is not a valid identifier name`)}}),{type:"string"}))},optional:{validate:(0,o.assertValueType)("boolean"),optional:true}}),validate(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;const s=/\.(\w+)$/.exec(t);if(!s)return;const[,a]=s;const o={computed:false};if(a==="property"){if((0,n.default)("MemberExpression",e,o))return;if((0,n.default)("OptionalMemberExpression",e,o))return}else if(a==="key"){if((0,n.default)("Property",e,o))return;if((0,n.default)("Method",e,o))return}else if(a==="exported"){if((0,n.default)("ExportSpecifier",e))return}else if(a==="imported"){if((0,n.default)("ImportSpecifier",e,{imported:r}))return}else if(a==="meta"){if((0,n.default)("MetaProperty",e,{meta:r}))return}if(((0,i.isKeyword)(r.name)||(0,i.isReservedWord)(r.name,false))&&r.name!=="this"){throw new TypeError(`"${r.name}" is not a valid identifier`)}}});l("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},consequent:{validate:(0,o.assertNodeType)("Statement")},alternate:{optional:true,validate:(0,o.assertNodeType)("Statement")}}});l("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,o.assertNodeType)("Identifier")},body:{validate:(0,o.assertNodeType)("Statement")}}});l("StringLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});l("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,o.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]});l("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});l("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});l("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,o.assertValueType)("string")},flags:{validate:(0,o.chain)((0,o.assertValueType)("string"),Object.assign((function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;const n=/[^gimsuy]/.exec(r);if(n){throw new TypeError(`"${n[0]}" is not a valid RegExp flag`)}}),{type:"string"})),default:""}}});l("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,o.assertOneOf)(...a.LOGICAL_OPERATORS)},left:{validate:(0,o.assertNodeType)("Expression")},right:{validate:(0,o.assertNodeType)("Expression")}}});l("MemberExpression",{builder:["object","property","computed",...!process.env.BABEL_TYPES_8_BREAKING?["optional"]:[]],visitor:["object","property"],aliases:["Expression","LVal"],fields:Object.assign({object:{validate:(0,o.assertNodeType)("Expression")},property:{validate:function(){const e=(0,o.assertNodeType)("Identifier","PrivateName");const t=(0,o.assertNodeType)("Expression");const validator=function(r,n,s){const i=r.computed?t:e;i(r,n,s)};validator.oneOfNodeTypes=["Expression","Identifier","PrivateName"];return validator}()},computed:{default:false}},!process.env.BABEL_TYPES_8_BREAKING?{optional:{validate:(0,o.assertOneOf)(true,false),optional:true}}:{})});l("NewExpression",{inherits:"CallExpression"});l("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceFile:{validate:(0,o.assertValueType)("string")},sourceType:{validate:(0,o.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,o.assertNodeType)("InterpreterDirective"),default:null,optional:true},directives:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Directive"))),default:[]},body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block"]});l("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ObjectMethod","ObjectProperty","SpreadElement")))}}});l("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],fields:Object.assign({},c,u,{kind:Object.assign({validate:(0,o.assertOneOf)("method","get","set")},!process.env.BABEL_TYPES_8_BREAKING?{default:"method"}:{}),computed:{default:false},key:{validate:function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");const validator=function(r,n,s){const i=r.computed?t:e;i(r,n,s)};validator.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral"];return validator}()},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},body:{validate:(0,o.assertNodeType)("BlockStatement")}}),visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]});l("ObjectProperty",{builder:["key","value","computed","shorthand",...!process.env.BABEL_TYPES_8_BREAKING?["decorators"]:[]],fields:{computed:{default:false},key:{validate:function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName");const t=(0,o.assertNodeType)("Expression");const validator=function(r,n,s){const i=r.computed?t:e;i(r,n,s)};validator.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"];return validator}()},value:{validate:(0,o.assertNodeType)("Expression","PatternLike")},shorthand:{validate:(0,o.chain)((0,o.assertValueType)("boolean"),Object.assign((function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.computed){throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true")}}),{type:"boolean"}),(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&!(0,n.default)("Identifier",e.key)){throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}})),default:false},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:function(){const e=(0,o.assertNodeType)("Identifier","Pattern","TSAsExpression","TSNonNullExpression","TSTypeAssertion");const t=(0,o.assertNodeType)("Expression");return function(r,s,i){if(!process.env.BABEL_TYPES_8_BREAKING)return;const a=(0,n.default)("ObjectPattern",r)?e:t;a(i,"value",i.value)}}()});l("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["LVal","PatternLike"],deprecatedAlias:"RestProperty",fields:Object.assign({},f,{argument:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("LVal"):(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSTypeAssertion","TSNonNullExpression")},optional:{validate:(0,o.assertValueType)("boolean"),optional:true}}),validate(e,t){if(!process.env.BABEL_TYPES_8_BREAKING)return;const r=/(\w+)\[(\d+)\]/.exec(t);if(!r)throw new Error("Internal Babel error: malformed key.");const[,n,s]=r;if(e[n].length>s+1){throw new TypeError(`RestElement must be last element of ${n}`)}}});l("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,o.assertNodeType)("Expression"),optional:true}}});l("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression")))}},aliases:["Expression"]});l("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,o.assertNodeType)("Expression")}}});l("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,o.assertNodeType)("Expression"),optional:true},consequent:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}}});l("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,o.assertNodeType)("Expression")},cases:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("SwitchCase")))}}});l("ThisExpression",{aliases:["Expression"]});l("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});l("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:(0,o.chain)((0,o.assertNodeType)("BlockStatement"),Object.assign((function(e){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!e.handler&&!e.finalizer){throw new TypeError("TryStatement expects either a handler or finalizer, or both")}}),{oneOfNodeTypes:["BlockStatement"]}))},handler:{optional:true,validate:(0,o.assertNodeType)("CatchClause")},finalizer:{optional:true,validate:(0,o.assertNodeType)("BlockStatement")}}});l("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:true},argument:{validate:(0,o.assertNodeType)("Expression")},operator:{validate:(0,o.assertOneOf)(...a.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});l("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:false},argument:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertNodeType)("Expression"):(0,o.assertNodeType)("Identifier","MemberExpression")},operator:{validate:(0,o.assertOneOf)(...a.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});l("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,o.assertValueType)("boolean"),optional:true},kind:{validate:(0,o.assertOneOf)("var","let","const")},declarations:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("VariableDeclarator")))}},validate(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,n.default)("ForXStatement",e,{left:r}))return;if(r.declarations.length!==1){throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${e.type}`)}}});l("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertNodeType)("LVal")}const e=(0,o.assertNodeType)("Identifier","ArrayPattern","ObjectPattern");const t=(0,o.assertNodeType)("Identifier");return function(r,n,s){const i=r.init?e:t;i(r,n,s)}}()},definite:{optional:true,validate:(0,o.assertValueType)("boolean")},init:{optional:true,validate:(0,o.assertNodeType)("Expression")}}});l("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});l("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")}}});l("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},f,{left:{validate:(0,o.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,o.assertNodeType)("Expression")},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}})});l("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},f,{elements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeOrValueType)("null","PatternLike")))},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},optional:{validate:(0,o.assertValueType)("boolean"),optional:true}})});l("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},c,u,{expression:{validate:(0,o.assertValueType)("boolean")},body:{validate:(0,o.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,o.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:true}})});l("ClassBody",{visitor:["body"],fields:{body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")))}}});l("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,o.assertNodeType)("Identifier"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true},body:{validate:(0,o.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,o.assertNodeType)("Expression")},superTypeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true},implements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},mixins:{validate:(0,o.assertNodeType)("InterfaceExtends"),optional:true}}});l("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,o.assertNodeType)("Identifier")},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:true},body:{validate:(0,o.assertNodeType)("ClassBody")},superClass:{optional:true,validate:(0,o.assertNodeType)("Expression")},superTypeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true},implements:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TSExpressionWithTypeArguments","ClassImplements"))),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},mixins:{validate:(0,o.assertNodeType)("InterfaceExtends"),optional:true},declare:{validate:(0,o.assertValueType)("boolean"),optional:true},abstract:{validate:(0,o.assertValueType)("boolean"),optional:true}},validate:function(){const e=(0,o.assertNodeType)("Identifier");return function(t,r,s){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(!(0,n.default)("ExportDefaultDeclaration",t)){e(s,"id",s.id)}}}()});l("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,o.assertNodeType)("StringLiteral")},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("type","value")),assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ImportAttribute")))}}});l("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,o.assertNodeType)("FunctionDeclaration","TSDeclareFunction","ClassDeclaration","Expression")},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("value"))}});l("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{optional:true,validate:(0,o.chain)((0,o.assertNodeType)("Declaration"),Object.assign((function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.specifiers.length){throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration")}}),{oneOfNodeTypes:["Declaration"]}),(function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&e.source){throw new TypeError("Cannot export a declaration from a source")}}))},assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ImportAttribute")))},specifiers:{default:[],validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)(function(){const e=(0,o.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier");const t=(0,o.assertNodeType)("ExportSpecifier");if(!process.env.BABEL_TYPES_8_BREAKING)return e;return function(r,n,s){const i=r.source?e:t;i(r,n,s)}}()))},source:{validate:(0,o.assertNodeType)("StringLiteral"),optional:true},exportKind:(0,o.validateOptional)((0,o.assertOneOf)("type","value"))}});l("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")},exported:{validate:(0,o.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,o.assertOneOf)("type","value"),optional:true}}});l("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING){return(0,o.assertNodeType)("VariableDeclaration","LVal")}const e=(0,o.assertNodeType)("VariableDeclaration");const t=(0,o.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSTypeAssertion","TSNonNullExpression");return function(r,s,i){if((0,n.default)("VariableDeclaration",i)){e(r,s,i)}else{t(r,s,i)}}}()},right:{validate:(0,o.assertNodeType)("Expression")},body:{validate:(0,o.assertNodeType)("Statement")},await:{default:false}}});l("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{assertions:{optional:true,validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ImportAttribute")))},specifiers:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,o.assertNodeType)("StringLiteral")},importKind:{validate:(0,o.assertOneOf)("type","typeof","value"),optional:true}}});l("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")}}});l("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")}}});l("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,o.assertNodeType)("Identifier")},imported:{validate:(0,o.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,o.assertOneOf)("type","typeof","value"),optional:true}}});l("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,o.chain)((0,o.assertNodeType)("Identifier"),Object.assign((function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;let s;switch(r.name){case"function":s="sent";break;case"new":s="target";break;case"import":s="meta";break}if(!(0,n.default)("Identifier",e.property,{name:s})){throw new TypeError("Unrecognised MetaProperty")}}),{oneOfNodeTypes:["Identifier"]}))},property:{validate:(0,o.assertNodeType)("Identifier")}}});const d={abstract:{validate:(0,o.assertValueType)("boolean"),optional:true},accessibility:{validate:(0,o.assertOneOf)("public","private","protected"),optional:true},static:{default:false},override:{default:false},computed:{default:false},optional:{validate:(0,o.assertValueType)("boolean"),optional:true},key:{validate:(0,o.chain)(function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral");const t=(0,o.assertNodeType)("Expression");return function(r,n,s){const i=r.computed?t:e;i(r,n,s)}}(),(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral","Expression"))}};t.classMethodOrPropertyCommon=d;const h=Object.assign({},c,d,{params:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Identifier","Pattern","RestElement","TSParameterProperty")))},kind:{validate:(0,o.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,o.chain)((0,o.assertValueType)("string"),(0,o.assertOneOf)("public","private","protected")),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true}});t.classMethodOrDeclareMethodCommon=h;l("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:Object.assign({},h,u,{body:{validate:(0,o.assertNodeType)("BlockStatement")}})});l("ObjectPattern",{visitor:["properties","typeAnnotation","decorators"],builder:["properties"],aliases:["Pattern","PatternLike","LVal"],fields:Object.assign({},f,{properties:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("RestElement","ObjectProperty")))}})});l("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});l("Super",{aliases:["Expression"]});l("TaggedTemplateExpression",{visitor:["tag","quasi","typeParameters"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,o.assertNodeType)("Expression")},quasi:{validate:(0,o.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,o.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true}}});l("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,o.assertShape)({raw:{validate:(0,o.assertValueType)("string")},cooked:{validate:(0,o.assertValueType)("string"),optional:true}})},tail:{default:false}}});l("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("TemplateElement")))},expressions:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","TSType")),(function(e,t,r){if(e.quasis.length!==r.length+1){throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.\nExpected ${r.length+1} quasis but got ${e.quasis.length}`)}}))}}});l("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,o.chain)((0,o.assertValueType)("boolean"),Object.assign((function(e,t,r){if(!process.env.BABEL_TYPES_8_BREAKING)return;if(r&&!e.argument){throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}}),{type:"boolean"})),default:false},argument:{optional:true,validate:(0,o.assertNodeType)("Expression")}}});l("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,o.assertNodeType)("Expression")}}});l("Import",{aliases:["Expression"]});l("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,o.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});l("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,o.assertNodeType)("Identifier")}}});l("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,o.assertNodeType)("Expression")},property:{validate:function(){const e=(0,o.assertNodeType)("Identifier");const t=(0,o.assertNodeType)("Expression");const validator=function(r,n,s){const i=r.computed?t:e;i(r,n,s)};validator.oneOfNodeTypes=["Expression","Identifier"];return validator}()},computed:{default:false},optional:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertValueType)("boolean"):(0,o.chain)((0,o.assertValueType)("boolean"),(0,o.assertOptionalChainStart)())}}});l("OptionalCallExpression",{visitor:["callee","arguments","typeParameters","typeArguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:{callee:{validate:(0,o.assertNodeType)("Expression")},arguments:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Expression","SpreadElement","JSXNamespacedName","ArgumentPlaceholder")))},optional:{validate:!process.env.BABEL_TYPES_8_BREAKING?(0,o.assertValueType)("boolean"):(0,o.chain)((0,o.assertValueType)("boolean"),(0,o.assertOptionalChainStart)())},typeArguments:{validate:(0,o.assertNodeType)("TypeParameterInstantiation"),optional:true},typeParameters:{validate:(0,o.assertNodeType)("TSTypeParameterInstantiation"),optional:true}}});l("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},d,{value:{validate:(0,o.assertNodeType)("Expression"),optional:true},definite:{validate:(0,o.assertValueType)("boolean"),optional:true},typeAnnotation:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},readonly:{validate:(0,o.assertValueType)("boolean"),optional:true},declare:{validate:(0,o.assertValueType)("boolean"),optional:true},variance:{validate:(0,o.assertNodeType)("Variance"),optional:true}})});l("ClassAccessorProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],fields:Object.assign({},d,{key:{validate:(0,o.chain)(function(){const e=(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral","PrivateName");const t=(0,o.assertNodeType)("Expression");return function(r,n,s){const i=r.computed?t:e;i(r,n,s)}}(),(0,o.assertNodeType)("Identifier","StringLiteral","NumericLiteral","Expression","PrivateName"))},value:{validate:(0,o.assertNodeType)("Expression"),optional:true},definite:{validate:(0,o.assertValueType)("boolean"),optional:true},typeAnnotation:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},readonly:{validate:(0,o.assertValueType)("boolean"),optional:true},declare:{validate:(0,o.assertValueType)("boolean"),optional:true},variance:{validate:(0,o.assertNodeType)("Variance"),optional:true}})});l("ClassPrivateProperty",{visitor:["key","value","decorators","typeAnnotation"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,o.assertNodeType)("PrivateName")},value:{validate:(0,o.assertNodeType)("Expression"),optional:true},typeAnnotation:{validate:(0,o.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:true},decorators:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Decorator"))),optional:true},readonly:{validate:(0,o.assertValueType)("boolean"),optional:true},definite:{validate:(0,o.assertValueType)("boolean"),optional:true},variance:{validate:(0,o.assertNodeType)("Variance"),optional:true}}});l("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},h,u,{key:{validate:(0,o.assertNodeType)("PrivateName")},body:{validate:(0,o.assertNodeType)("BlockStatement")}})});l("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,o.assertNodeType)("Identifier")}}});l("StaticBlock",{visitor:["body"],fields:{body:{validate:(0,o.chain)((0,o.assertValueType)("array"),(0,o.assertEach)((0,o.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","FunctionParent"]})},4085:(e,t,r)=>{"use strict";var n=r(363);(0,n.default)("ArgumentPlaceholder",{});(0,n.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:!process.env.BABEL_TYPES_8_BREAKING?{object:{validate:Object.assign((()=>{}),{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign((()=>{}),{oneOfNodeTypes:["Expression"]})}}:{object:{validate:(0,n.assertNodeType)("Expression")},callee:{validate:(0,n.assertNodeType)("Expression")}}});(0,n.default)("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,n.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,n.assertNodeType)("StringLiteral")}}});(0,n.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}});(0,n.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")},async:{validate:(0,n.assertValueType)("boolean"),default:false}}});(0,n.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}});(0,n.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ObjectProperty","SpreadElement")))}}});(0,n.default)("TupleExpression",{fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,n.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,n.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,n.assertNodeType)("Program")}},aliases:["Expression"]});(0,n.default)("TopicReference",{aliases:["Expression"]});(0,n.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}},aliases:["Expression"]});(0,n.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,n.assertNodeType)("Expression")}},aliases:["Expression"]});(0,n.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]})},6829:(e,t,r)=>{"use strict";var n=r(363);const s=(0,n.defineAliasedType)("Flow");const defineInterfaceishType=(e,t="TypeParameterDeclaration")=>{s(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends","mixins","implements","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)(t),extends:(0,n.validateOptional)((0,n.arrayOfType)("InterfaceExtends")),mixins:(0,n.validateOptional)((0,n.arrayOfType)("InterfaceExtends")),implements:(0,n.validateOptional)((0,n.arrayOfType)("ClassImplements")),body:(0,n.validateType)("ObjectTypeAnnotation")}})};s("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,n.validateType)("FlowType")}});s("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterInstantiation")}});defineInterfaceishType("DeclareClass");s("DeclareFunction",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),predicate:(0,n.validateOptionalType)("DeclaredPredicate")}});defineInterfaceishType("DeclareInterface");s("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)(["Identifier","StringLiteral"]),body:(0,n.validateType)("BlockStatement"),kind:(0,n.validateOptional)((0,n.assertOneOf)("CommonJS","ES"))}});s("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,n.validateType)("TypeAnnotation")}});s("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),right:(0,n.validateType)("FlowType")}});s("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,n.validateOptionalType)("FlowType"),impltype:(0,n.validateOptionalType)("FlowType")}});s("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier")}});s("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{declaration:(0,n.validateOptionalType)("Flow"),specifiers:(0,n.validateOptional)((0,n.arrayOfType)(["ExportSpecifier","ExportNamespaceSpecifier"])),source:(0,n.validateOptionalType)("StringLiteral"),default:(0,n.validateOptional)((0,n.assertValueType)("boolean"))}});s("DeclareExportAllDeclaration",{visitor:["source"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{source:(0,n.validateType)("StringLiteral"),exportKind:(0,n.validateOptional)((0,n.assertOneOf)("type","value"))}});s("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,n.validateType)("Flow")}});s("ExistsTypeAnnotation",{aliases:["FlowType"]});s("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),params:(0,n.validate)((0,n.arrayOfType)("FunctionTypeParam")),rest:(0,n.validateOptionalType)("FunctionTypeParam"),this:(0,n.validateOptionalType)("FunctionTypeParam"),returnType:(0,n.validateType)("FlowType")}});s("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,n.validateOptionalType)("Identifier"),typeAnnotation:(0,n.validateType)("FlowType"),optional:(0,n.validateOptional)((0,n.assertValueType)("boolean"))}});s("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,n.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,n.validateOptionalType)("TypeParameterInstantiation")}});s("InferredPredicate",{aliases:["FlowPredicate"]});s("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,n.validateType)(["Identifier","QualifiedTypeIdentifier"]),typeParameters:(0,n.validateOptionalType)("TypeParameterInstantiation")}});defineInterfaceishType("InterfaceDeclaration");s("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,n.validateOptional)((0,n.arrayOfType)("InterfaceExtends")),body:(0,n.validateType)("ObjectTypeAnnotation")}});s("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,n.validate)((0,n.arrayOfType)("FlowType"))}});s("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,n.validateType)("FlowType")}});s("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,n.validate)((0,n.assertValueType)("number"))}});s("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,n.validate)((0,n.arrayOfType)(["ObjectTypeProperty","ObjectTypeSpreadProperty"])),indexers:{validate:(0,n.arrayOfType)("ObjectTypeIndexer"),optional:true,default:[]},callProperties:{validate:(0,n.arrayOfType)("ObjectTypeCallProperty"),optional:true,default:[]},internalSlots:{validate:(0,n.arrayOfType)("ObjectTypeInternalSlot"),optional:true,default:[]},exact:{validate:(0,n.assertValueType)("boolean"),default:false},inexact:(0,n.validateOptional)((0,n.assertValueType)("boolean"))}});s("ObjectTypeInternalSlot",{visitor:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,n.validateType)("Identifier"),value:(0,n.validateType)("FlowType"),optional:(0,n.validate)((0,n.assertValueType)("boolean")),static:(0,n.validate)((0,n.assertValueType)("boolean")),method:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,n.validateType)("FlowType"),static:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("ObjectTypeIndexer",{visitor:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,n.validateOptionalType)("Identifier"),key:(0,n.validateType)("FlowType"),value:(0,n.validateType)("FlowType"),static:(0,n.validate)((0,n.assertValueType)("boolean")),variance:(0,n.validateOptionalType)("Variance")}});s("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,n.validateType)(["Identifier","StringLiteral"]),value:(0,n.validateType)("FlowType"),kind:(0,n.validate)((0,n.assertOneOf)("init","get","set")),static:(0,n.validate)((0,n.assertValueType)("boolean")),proto:(0,n.validate)((0,n.assertValueType)("boolean")),optional:(0,n.validate)((0,n.assertValueType)("boolean")),variance:(0,n.validateOptionalType)("Variance"),method:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,n.validateType)("FlowType")}});s("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,n.validateOptionalType)("FlowType"),impltype:(0,n.validateType)("FlowType")}});s("QualifiedTypeIdentifier",{visitor:["id","qualification"],fields:{id:(0,n.validateType)("Identifier"),qualification:(0,n.validateType)(["Identifier","QualifiedTypeIdentifier"])}});s("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,n.validate)((0,n.assertValueType)("string"))}});s("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,n.validate)((0,n.arrayOfType)("FlowType"))}});s("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,n.validateType)("FlowType")}});s("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TypeParameterDeclaration"),right:(0,n.validateType)("FlowType")}});s("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("FlowType")}});s("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,n.validateType)("Expression"),typeAnnotation:(0,n.validateType)("TypeAnnotation")}});s("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,n.validate)((0,n.assertValueType)("string")),bound:(0,n.validateOptionalType)("TypeAnnotation"),default:(0,n.validateOptionalType)("FlowType"),variance:(0,n.validateOptionalType)("Variance")}});s("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,n.validate)((0,n.arrayOfType)("TypeParameter"))}});s("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,n.validate)((0,n.arrayOfType)("FlowType"))}});s("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,n.validate)((0,n.arrayOfType)("FlowType"))}});s("Variance",{builder:["kind"],fields:{kind:(0,n.validate)((0,n.assertOneOf)("minus","plus"))}});s("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});s("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,n.validateType)("Identifier"),body:(0,n.validateType)(["EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody"])}});s("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,n.validate)((0,n.assertValueType)("boolean")),members:(0,n.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,n.validate)((0,n.assertValueType)("boolean")),members:(0,n.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,n.validate)((0,n.assertValueType)("boolean")),members:(0,n.validateArrayOfType)(["EnumStringMember","EnumDefaultedMember"]),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,n.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,n.validate)((0,n.assertValueType)("boolean"))}});s("EnumBooleanMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,n.validateType)("Identifier"),init:(0,n.validateType)("BooleanLiteral")}});s("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,n.validateType)("Identifier"),init:(0,n.validateType)("NumericLiteral")}});s("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,n.validateType)("Identifier"),init:(0,n.validateType)("StringLiteral")}});s("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,n.validateType)("Identifier")}});s("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,n.validateType)("FlowType"),indexType:(0,n.validateType)("FlowType")}});s("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,n.validateType)("FlowType"),indexType:(0,n.validateType)("FlowType"),optional:(0,n.validate)((0,n.assertValueType)("boolean"))}})},6107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"ALIAS_KEYS",{enumerable:true,get:function(){return s.ALIAS_KEYS}});Object.defineProperty(t,"BUILDER_KEYS",{enumerable:true,get:function(){return s.BUILDER_KEYS}});Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:true,get:function(){return s.DEPRECATED_KEYS}});Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:true,get:function(){return s.FLIPPED_ALIAS_KEYS}});Object.defineProperty(t,"NODE_FIELDS",{enumerable:true,get:function(){return s.NODE_FIELDS}});Object.defineProperty(t,"NODE_PARENT_VALIDATIONS",{enumerable:true,get:function(){return s.NODE_PARENT_VALIDATIONS}});Object.defineProperty(t,"PLACEHOLDERS",{enumerable:true,get:function(){return i.PLACEHOLDERS}});Object.defineProperty(t,"PLACEHOLDERS_ALIAS",{enumerable:true,get:function(){return i.PLACEHOLDERS_ALIAS}});Object.defineProperty(t,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:true,get:function(){return i.PLACEHOLDERS_FLIPPED_ALIAS}});t.TYPES=void 0;Object.defineProperty(t,"VISITOR_KEYS",{enumerable:true,get:function(){return s.VISITOR_KEYS}});var n=r(3797);r(9137);r(6829);r(8294);r(607);r(4085);r(3776);var s=r(363);var i=r(8161);n(s.VISITOR_KEYS);n(s.ALIAS_KEYS);n(s.FLIPPED_ALIAS_KEYS);n(s.NODE_FIELDS);n(s.BUILDER_KEYS);n(s.DEPRECATED_KEYS);n(i.PLACEHOLDERS_ALIAS);n(i.PLACEHOLDERS_FLIPPED_ALIAS);const a=[].concat(Object.keys(s.VISITOR_KEYS),Object.keys(s.FLIPPED_ALIAS_KEYS),Object.keys(s.DEPRECATED_KEYS));t.TYPES=a},8294:(e,t,r)=>{"use strict";var n=r(363);const s=(0,n.defineAliasedType)("JSX");s("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:true,validate:(0,n.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});s("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});s("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:true,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}},{selfClosing:{validate:(0,n.assertValueType)("boolean"),optional:true}})});s("JSXEmptyExpression",{});s("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression","JSXEmptyExpression")}}});s("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}});s("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,n.assertValueType)("string")}}});s("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}});s("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}});s("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:false},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))},typeParameters:{validate:(0,n.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:true}}});s("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}});s("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}});s("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,n.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,n.assertNodeType)("JSXClosingFragment")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")))}}});s("JSXOpeningFragment",{aliases:["Immutable"]});s("JSXClosingFragment",{aliases:["Immutable"]})},607:(e,t,r)=>{"use strict";var n=r(363);var s=r(8161);const i=(0,n.defineAliasedType)("Miscellaneous");{i("Noop",{visitor:[]})}i("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:{name:{validate:(0,n.assertNodeType)("Identifier")},expectedNode:{validate:(0,n.assertOneOf)(...s.PLACEHOLDERS)}}});i("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,n.assertValueType)("string")}}})},8161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var n=r(363);const s=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"];t.PLACEHOLDERS=s;const i={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};t.PLACEHOLDERS_ALIAS=i;for(const e of s){const t=n.ALIAS_KEYS[e];if(t!=null&&t.length)i[e]=t}const a={};t.PLACEHOLDERS_FLIPPED_ALIAS=a;Object.keys(i).forEach((e=>{i[e].forEach((t=>{if(!Object.hasOwnProperty.call(a,t)){a[t]=[]}a[t].push(e)}))}))},3776:(e,t,r)=>{"use strict";var n=r(363);var s=r(9137);var i=r(4420);const a=(0,n.defineAliasedType)("TypeScript");const o=(0,n.assertValueType)("boolean");const l={returnType:{validate:(0,n.assertNodeType)("TSTypeAnnotation","Noop"),optional:true},typeParameters:{validate:(0,n.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:true}};a("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,n.assertOneOf)("public","private","protected"),optional:true},readonly:{validate:(0,n.assertValueType)("boolean"),optional:true},parameter:{validate:(0,n.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,n.assertValueType)("boolean"),optional:true},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator"))),optional:true}}});a("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},s.functionDeclarationCommon,l)});a("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},s.classMethodOrDeclareMethodCommon,l)});a("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,n.validateType)("TSEntityName"),right:(0,n.validateType)("Identifier")}});const c={typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),["parameters"]:(0,n.validateArrayOfType)(["Identifier","RestElement"]),["typeAnnotation"]:(0,n.validateOptionalType)("TSTypeAnnotation")};const u={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:c};a("TSCallSignatureDeclaration",u);a("TSConstructSignatureDeclaration",u);const p={key:(0,n.validateType)("Expression"),computed:(0,n.validate)(o),optional:(0,n.validateOptional)(o)};a("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation","initializer"],fields:Object.assign({},p,{readonly:(0,n.validateOptional)(o),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation"),initializer:(0,n.validateOptionalType)("Expression"),kind:{validate:(0,n.assertOneOf)("get","set")}})});a("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},c,p,{kind:{validate:(0,n.assertOneOf)("method","get","set")}})});a("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,n.validateOptional)(o),static:(0,n.validateOptional)(o),parameters:(0,n.validateArrayOfType)("Identifier"),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation")}});const f=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of f){a(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}})}a("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const d={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};a("TSFunctionType",Object.assign({},d,{fields:c}));a("TSConstructorType",Object.assign({},d,{fields:Object.assign({},c,{abstract:(0,n.validateOptional)(o)})}));a("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,n.validateType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}});a("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,n.validateType)(["Identifier","TSThisType"]),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation"),asserts:(0,n.validateOptional)(o)}});a("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,n.validateType)(["TSEntityName","TSImportType"]),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}});a("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,n.validateArrayOfType)("TSTypeElement")}});a("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,n.validateType)("TSType")}});a("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,n.validateArrayOfType)(["TSType","TSNamedTupleMember"])}});a("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}});a("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}});a("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,n.validateType)("Identifier"),optional:{validate:o,default:false},elementType:(0,n.validateType)("TSType")}});const h={aliases:["TSType"],visitor:["types"],fields:{types:(0,n.validateArrayOfType)("TSType")}};a("TSUnionType",h);a("TSIntersectionType",h);a("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,n.validateType)("TSType"),extendsType:(0,n.validateType)("TSType"),trueType:(0,n.validateType)("TSType"),falseType:(0,n.validateType)("TSType")}});a("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,n.validateType)("TSTypeParameter")}});a("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}});a("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{operator:(0,n.validate)((0,n.assertValueType)("string")),typeAnnotation:(0,n.validateType)("TSType")}});a("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,n.validateType)("TSType"),indexType:(0,n.validateType)("TSType")}});a("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","typeAnnotation","nameType"],fields:{readonly:(0,n.validateOptional)(o),typeParameter:(0,n.validateType)("TSTypeParameter"),optional:(0,n.validateOptional)(o),typeAnnotation:(0,n.validateOptionalType)("TSType"),nameType:(0,n.validateOptionalType)("TSType")}});a("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const e=(0,n.assertNodeType)("NumericLiteral","BigIntLiteral");const t=(0,n.assertOneOf)("-");const r=(0,n.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral");function validator(n,s,a){if((0,i.default)("UnaryExpression",a)){t(a,"operator",a.operator);e(a,"argument",a.argument)}else{r(n,s,a)}}validator.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","UnaryExpression"];return validator}()}}});a("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,n.validateType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}});a("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,n.validateOptional)(o),id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,n.validateOptional)((0,n.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,n.validateType)("TSInterfaceBody")}});a("TSInterfaceBody",{visitor:["body"],fields:{body:(0,n.validateArrayOfType)("TSTypeElement")}});a("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,n.validateOptional)(o),id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,n.validateType)("TSType")}});a("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,n.validateType)("Expression"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}});a("TSAsExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,n.validateType)("Expression"),typeAnnotation:(0,n.validateType)("TSType")}});a("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,n.validateType)("TSType"),expression:(0,n.validateType)("Expression")}});a("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,n.validateOptional)(o),const:(0,n.validateOptional)(o),id:(0,n.validateType)("Identifier"),members:(0,n.validateArrayOfType)("TSEnumMember"),initializer:(0,n.validateOptionalType)("Expression")}});a("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,n.validateType)(["Identifier","StringLiteral"]),initializer:(0,n.validateOptionalType)("Expression")}});a("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{declare:(0,n.validateOptional)(o),global:(0,n.validateOptional)(o),id:(0,n.validateType)(["Identifier","StringLiteral"]),body:(0,n.validateType)(["TSModuleBlock","TSModuleDeclaration"])}});a("TSModuleBlock",{aliases:["Scopable","Block","BlockParent"],visitor:["body"],fields:{body:(0,n.validateArrayOfType)("Statement")}});a("TSImportType",{aliases:["TSType"],visitor:["argument","qualifier","typeParameters"],fields:{argument:(0,n.validateType)("StringLiteral"),qualifier:(0,n.validateOptionalType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}});a("TSImportEqualsDeclaration",{aliases:["Statement"],visitor:["id","moduleReference"],fields:{isExport:(0,n.validate)(o),id:(0,n.validateType)("Identifier"),moduleReference:(0,n.validateType)(["TSEntityName","TSExternalModuleReference"]),importKind:{validate:(0,n.assertOneOf)("type","value"),optional:true}}});a("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,n.validateType)("StringLiteral")}});a("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,n.validateType)("Expression")}});a("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,n.validateType)("Expression")}});a("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,n.validateType)("Identifier")}});a("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,n.assertNodeType)("TSType")}}});a("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TSType")))}}});a("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TSTypeParameter")))}}});a("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,n.assertValueType)("string")},in:{validate:(0,n.assertValueType)("boolean"),optional:true},out:{validate:(0,n.assertValueType)("boolean"),optional:true},constraint:{validate:(0,n.assertNodeType)("TSType"),optional:true},default:{validate:(0,n.assertNodeType)("TSType"),optional:true}}})},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.VISITOR_KEYS=t.NODE_PARENT_VALIDATIONS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.ALIAS_KEYS=void 0;t.arrayOf=arrayOf;t.arrayOfType=arrayOfType;t.assertEach=assertEach;t.assertNodeOrValueType=assertNodeOrValueType;t.assertNodeType=assertNodeType;t.assertOneOf=assertOneOf;t.assertOptionalChainStart=assertOptionalChainStart;t.assertShape=assertShape;t.assertValueType=assertValueType;t.chain=chain;t["default"]=defineType;t.defineAliasedType=defineAliasedType;t.typeIs=typeIs;t.validate=validate;t.validateArrayOfType=validateArrayOfType;t.validateOptional=validateOptional;t.validateOptionalType=validateOptionalType;t.validateType=validateType;var n=r(4420);var s=r(5525);const i={};t.VISITOR_KEYS=i;const a={};t.ALIAS_KEYS=a;const o={};t.FLIPPED_ALIAS_KEYS=o;const l={};t.NODE_FIELDS=l;const c={};t.BUILDER_KEYS=c;const u={};t.DEPRECATED_KEYS=u;const p={};t.NODE_PARENT_VALIDATIONS=p;function getType(e){if(Array.isArray(e)){return"array"}else if(e===null){return"null"}else{return typeof e}}function validate(e){return{validate:e}}function typeIs(e){return typeof e==="string"?assertNodeType(e):assertNodeType(...e)}function validateType(e){return validate(typeIs(e))}function validateOptional(e){return{validate:e,optional:true}}function validateOptionalType(e){return{validate:typeIs(e),optional:true}}function arrayOf(e){return chain(assertValueType("array"),assertEach(e))}function arrayOfType(e){return arrayOf(typeIs(e))}function validateArrayOfType(e){return validate(arrayOfType(e))}function assertEach(e){function validator(t,r,n){if(!Array.isArray(n))return;for(let i=0;i=2&&"type"in e[0]&&e[0].type==="array"&&!("each"in e[1])){throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`)}return validate}const f=["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate"];const d=["default","optional","validate"];function defineAliasedType(...e){return(t,r={})=>{let n=r.aliases;if(!n){var s,i;if(r.inherits)n=(s=h[r.inherits].aliases)==null?void 0:s.slice();(i=n)!=null?i:n=[];r.aliases=n}const a=e.filter((e=>!n.includes(e)));n.unshift(...a);return defineType(t,r)}}function defineType(e,t={}){const r=t.inherits&&h[t.inherits]||{};let n=t.fields;if(!n){n={};if(r.fields){const e=Object.getOwnPropertyNames(r.fields);for(const t of e){const e=r.fields[t];const s=e.default;if(Array.isArray(s)?s.length>0:s&&typeof s==="object"){throw new Error("field defaults can only be primitives or empty arrays currently")}n[t]={default:Array.isArray(s)?[]:s,optional:e.optional,validate:e.validate}}}}const s=t.visitor||r.visitor||[];const m=t.aliases||r.aliases||[];const y=t.builder||r.builder||t.visitor||[];for(const r of Object.keys(t)){if(f.indexOf(r)===-1){throw new Error(`Unknown type option "${r}" on ${e}`)}}if(t.deprecatedAlias){u[t.deprecatedAlias]=e}for(const e of s.concat(y)){n[e]=n[e]||{}}for(const t of Object.keys(n)){const r=n[t];if(r.default!==undefined&&y.indexOf(t)===-1){r.optional=true}if(r.default===undefined){r.default=null}else if(!r.validate&&r.default!=null){r.validate=assertValueType(getType(r.default))}for(const n of Object.keys(r)){if(d.indexOf(n)===-1){throw new Error(`Unknown field key "${n}" on ${e}.${t}`)}}}i[e]=t.visitor=s;c[e]=t.builder=y;l[e]=t.fields=n;a[e]=t.aliases=m;m.forEach((t=>{o[t]=o[t]||[];o[t].push(e)}));if(t.validate){p[e]=t.validate}h[e]=t}const h={}},6953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var n={react:true,assertNode:true,createTypeAnnotationBasedOnTypeof:true,createUnionTypeAnnotation:true,createFlowUnionType:true,createTSUnionType:true,cloneNode:true,clone:true,cloneDeep:true,cloneDeepWithoutLoc:true,cloneWithoutLoc:true,addComment:true,addComments:true,inheritInnerComments:true,inheritLeadingComments:true,inheritsComments:true,inheritTrailingComments:true,removeComments:true,ensureBlock:true,toBindingIdentifierName:true,toBlock:true,toComputedKey:true,toExpression:true,toIdentifier:true,toKeyAlias:true,toSequenceExpression:true,toStatement:true,valueToNode:true,appendToMemberExpression:true,inherits:true,prependToMemberExpression:true,removeProperties:true,removePropertiesDeep:true,removeTypeDuplicates:true,getBindingIdentifiers:true,getOuterBindingIdentifiers:true,traverse:true,traverseFast:true,shallowEqual:true,is:true,isBinding:true,isBlockScoped:true,isImmutable:true,isLet:true,isNode:true,isNodesEquivalent:true,isPlaceholderType:true,isReferenced:true,isScope:true,isSpecifierDefault:true,isType:true,isValidES3Identifier:true,isValidIdentifier:true,isVar:true,matchesPattern:true,validate:true,buildMatchMemberExpression:true};Object.defineProperty(t,"addComment",{enumerable:true,get:function(){return T.default}});Object.defineProperty(t,"addComments",{enumerable:true,get:function(){return S.default}});Object.defineProperty(t,"appendToMemberExpression",{enumerable:true,get:function(){return B.default}});Object.defineProperty(t,"assertNode",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:true,get:function(){return de.default}});Object.defineProperty(t,"clone",{enumerable:true,get:function(){return m.default}});Object.defineProperty(t,"cloneDeep",{enumerable:true,get:function(){return y.default}});Object.defineProperty(t,"cloneDeepWithoutLoc",{enumerable:true,get:function(){return g.default}});Object.defineProperty(t,"cloneNode",{enumerable:true,get:function(){return h.default}});Object.defineProperty(t,"cloneWithoutLoc",{enumerable:true,get:function(){return b.default}});Object.defineProperty(t,"createFlowUnionType",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"createTSUnionType",{enumerable:true,get:function(){return p.default}});Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"ensureBlock",{enumerable:true,get:function(){return C.default}});Object.defineProperty(t,"getBindingIdentifiers",{enumerable:true,get:function(){return q.default}});Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:true,get:function(){return H.default}});Object.defineProperty(t,"inheritInnerComments",{enumerable:true,get:function(){return E.default}});Object.defineProperty(t,"inheritLeadingComments",{enumerable:true,get:function(){return x.default}});Object.defineProperty(t,"inheritTrailingComments",{enumerable:true,get:function(){return v.default}});Object.defineProperty(t,"inherits",{enumerable:true,get:function(){return U.default}});Object.defineProperty(t,"inheritsComments",{enumerable:true,get:function(){return P.default}});Object.defineProperty(t,"is",{enumerable:true,get:function(){return z.default}});Object.defineProperty(t,"isBinding",{enumerable:true,get:function(){return Y.default}});Object.defineProperty(t,"isBlockScoped",{enumerable:true,get:function(){return Q.default}});Object.defineProperty(t,"isImmutable",{enumerable:true,get:function(){return Z.default}});Object.defineProperty(t,"isLet",{enumerable:true,get:function(){return ee.default}});Object.defineProperty(t,"isNode",{enumerable:true,get:function(){return te.default}});Object.defineProperty(t,"isNodesEquivalent",{enumerable:true,get:function(){return re.default}});Object.defineProperty(t,"isPlaceholderType",{enumerable:true,get:function(){return ne.default}});Object.defineProperty(t,"isReferenced",{enumerable:true,get:function(){return se.default}});Object.defineProperty(t,"isScope",{enumerable:true,get:function(){return ie.default}});Object.defineProperty(t,"isSpecifierDefault",{enumerable:true,get:function(){return ae.default}});Object.defineProperty(t,"isType",{enumerable:true,get:function(){return oe.default}});Object.defineProperty(t,"isValidES3Identifier",{enumerable:true,get:function(){return le.default}});Object.defineProperty(t,"isValidIdentifier",{enumerable:true,get:function(){return ce.default}});Object.defineProperty(t,"isVar",{enumerable:true,get:function(){return ue.default}});Object.defineProperty(t,"matchesPattern",{enumerable:true,get:function(){return pe.default}});Object.defineProperty(t,"prependToMemberExpression",{enumerable:true,get:function(){return K.default}});t.react=void 0;Object.defineProperty(t,"removeComments",{enumerable:true,get:function(){return A.default}});Object.defineProperty(t,"removeProperties",{enumerable:true,get:function(){return $.default}});Object.defineProperty(t,"removePropertiesDeep",{enumerable:true,get:function(){return V.default}});Object.defineProperty(t,"removeTypeDuplicates",{enumerable:true,get:function(){return W.default}});Object.defineProperty(t,"shallowEqual",{enumerable:true,get:function(){return J.default}});Object.defineProperty(t,"toBindingIdentifierName",{enumerable:true,get:function(){return O.default}});Object.defineProperty(t,"toBlock",{enumerable:true,get:function(){return k.default}});Object.defineProperty(t,"toComputedKey",{enumerable:true,get:function(){return N.default}});Object.defineProperty(t,"toExpression",{enumerable:true,get:function(){return _.default}});Object.defineProperty(t,"toIdentifier",{enumerable:true,get:function(){return D.default}});Object.defineProperty(t,"toKeyAlias",{enumerable:true,get:function(){return M.default}});Object.defineProperty(t,"toSequenceExpression",{enumerable:true,get:function(){return L.default}});Object.defineProperty(t,"toStatement",{enumerable:true,get:function(){return j.default}});Object.defineProperty(t,"traverse",{enumerable:true,get:function(){return G.default}});Object.defineProperty(t,"traverseFast",{enumerable:true,get:function(){return X.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return fe.default}});Object.defineProperty(t,"valueToNode",{enumerable:true,get:function(){return F.default}});var s=r(6558);var i=r(7431);var a=r(7671);var o=r(1828);var l=r(4155);Object.keys(l).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===l[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return l[e]}})}));var c=r(9246);var u=r(8554);var p=r(1248);var f=r(3321);Object.keys(f).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===f[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return f[e]}})}));var d=r(8709);Object.keys(d).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===d[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return d[e]}})}));var h=r(9396);var m=r(3639);var y=r(2209);var g=r(1686);var b=r(1127);var T=r(5673);var S=r(5632);var E=r(9162);var x=r(8105);var P=r(2564);var v=r(387);var A=r(5460);var w=r(4225);Object.keys(w).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===w[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return w[e]}})}));var I=r(9071);Object.keys(I).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===I[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return I[e]}})}));var C=r(1202);var O=r(6195);var k=r(5033);var N=r(6407);var _=r(1292);var D=r(8740);var M=r(823);var L=r(9413);var j=r(7571);var F=r(9937);var R=r(6107);Object.keys(R).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===R[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return R[e]}})}));var B=r(774);var U=r(9302);var K=r(4042);var $=r(6442);var V=r(6099);var W=r(271);var q=r(26);var H=r(5162);var G=r(9584);Object.keys(G).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===G[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return G[e]}})}));var X=r(8062);var J=r(3774);var z=r(4420);var Y=r(1728);var Q=r(4918);var Z=r(7667);var ee=r(9568);var te=r(9598);var re=r(4251);var ne=r(1438);var se=r(1536);var ie=r(8559);var ae=r(9762);var oe=r(9338);var le=r(9014);var ce=r(963);var ue=r(5886);var pe=r(3986);var fe=r(5525);var de=r(1093);var he=r(9648);Object.keys(he).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===he[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return he[e]}})}));var me=r(4509);Object.keys(me).forEach((function(e){if(e==="default"||e==="__esModule")return;if(Object.prototype.hasOwnProperty.call(n,e))return;if(e in t&&t[e]===me[e])return;Object.defineProperty(t,e,{enumerable:true,get:function(){return me[e]}})}));const ye={isReactComponent:s.default,isCompatTag:i.default,buildChildren:a.default};t.react=ye},774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=appendToMemberExpression;var n=r(3321);function appendToMemberExpression(e,t,r=false){e.object=(0,n.memberExpression)(e.object,e.property,e.computed);e.property=t;e.computed=!!r;return e}},271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=removeTypeDuplicates;var n=r(9648);function getQualifiedName(e){return(0,n.isIdentifier)(e)?e.name:`${e.id.name}.${getQualifiedName(e.qualification)}`}function removeTypeDuplicates(e){const t={};const r={};const s=new Set;const i=[];for(let a=0;a=0){continue}if((0,n.isAnyTypeAnnotation)(o)){return[o]}if((0,n.isFlowBaseAnnotation)(o)){r[o.type]=o;continue}if((0,n.isUnionTypeAnnotation)(o)){if(!s.has(o.types)){e=e.concat(o.types);s.add(o.types)}continue}if((0,n.isGenericTypeAnnotation)(o)){const e=getQualifiedName(o.id);if(t[e]){let r=t[e];if(r.typeParameters){if(o.typeParameters){r.typeParameters.params=removeTypeDuplicates(r.typeParameters.params.concat(o.typeParameters.params))}}else{r=o.typeParameters}}else{t[e]=o}continue}i.push(o)}for(const e of Object.keys(r)){i.push(r[e])}for(const e of Object.keys(t)){i.push(t[e])}return i}},9302:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=inherits;var n=r(9071);var s=r(2564);function inherits(e,t){if(!e||!t)return e;for(const r of n.INHERIT_KEYS.optional){if(e[r]==null){e[r]=t[r]}}for(const r of Object.keys(t)){if(r[0]==="_"&&r!=="__clone")e[r]=t[r]}for(const r of n.INHERIT_KEYS.force){e[r]=t[r]}(0,s.default)(e,t);return e}},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=prependToMemberExpression;var n=r(3321);function prependToMemberExpression(e,t){e.object=(0,n.memberExpression)(t,e.object);return e}},6442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=removeProperties;var n=r(9071);const s=["tokens","start","end","loc","raw","rawValue"];const i=n.COMMENT_KEYS.concat(["comments"]).concat(s);function removeProperties(e,t={}){const r=t.preserveComments?s:i;for(const t of r){if(e[t]!=null)e[t]=undefined}for(const t of Object.keys(e)){if(t[0]==="_"&&e[t]!=null)e[t]=undefined}const n=Object.getOwnPropertySymbols(e);for(const t of n){e[t]=null}}},6099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=removePropertiesDeep;var n=r(8062);var s=r(6442);function removePropertiesDeep(e,t){(0,n.default)(e,s.default,t);return e}},6532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=removeTypeDuplicates;var n=r(9648);function removeTypeDuplicates(e){const t={};const r={};const s=new Set;const i=[];for(let t=0;t=0){continue}if((0,n.isTSAnyKeyword)(a)){return[a]}if((0,n.isTSBaseType)(a)){r[a.type]=a;continue}if((0,n.isTSUnionType)(a)){if(!s.has(a.types)){e.push(...a.types);s.add(a.types)}continue}i.push(a)}for(const e of Object.keys(r)){i.push(r[e])}for(const e of Object.keys(t)){i.push(t[e])}return i}},26:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=getBindingIdentifiers;var n=r(9648);function getBindingIdentifiers(e,t,r){let s=[].concat(e);const i=Object.create(null);while(s.length){const e=s.shift();if(!e)continue;const a=getBindingIdentifiers.keys[e.type];if((0,n.isIdentifier)(e)){if(t){const t=i[e.name]=i[e.name]||[];t.push(e)}else{i[e.name]=e}continue}if((0,n.isExportDeclaration)(e)&&!(0,n.isExportAllDeclaration)(e)){if((0,n.isDeclaration)(e.declaration)){s.push(e.declaration)}continue}if(r){if((0,n.isFunctionDeclaration)(e)){s.push(e.id);continue}if((0,n.isFunctionExpression)(e)){continue}}if(a){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(26);var s=getOuterBindingIdentifiers;t["default"]=s;function getOuterBindingIdentifiers(e,t){return(0,n.default)(e,t,true)}},9584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=traverse;var n=r(6107);function traverse(e,t,r){if(typeof t==="function"){t={enter:t}}const{enter:n,exit:s}=t;traverseSimpleImpl(e,n,s,r,[])}function traverseSimpleImpl(e,t,r,s,i){const a=n.VISITOR_KEYS[e.type];if(!a)return;if(t)t(e,i,s);for(const n of a){const a=e[n];if(Array.isArray(a)){for(let o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=traverseFast;var n=r(6107);function traverseFast(e,t,r){if(!e)return;const s=n.VISITOR_KEYS[e.type];if(!s)return;r=r||{};t(e,r);for(const n of s){const s=e[n];if(Array.isArray(s)){for(const e of s){traverseFast(e,t,r)}}else{traverseFast(s,t,r)}}}},581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=inherit;function inherit(e,t,r){if(t&&r){t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean)))}}},5051:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=cleanJSXElementLiteralChild;var n=r(3321);function cleanJSXElementLiteralChild(e,t){const r=e.value.split(/\r\n|\n|\r/);let s=0;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=shallowEqual;function shallowEqual(e,t){const r=Object.keys(t);for(const n of r){if(e[n]!==t[n]){return false}}return true}},1093:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=buildMatchMemberExpression;var n=r(3986);function buildMatchMemberExpression(e,t){const r=e.split(".");return e=>(0,n.default)(e,r,t)}},9648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isAccessor=isAccessor;t.isAnyTypeAnnotation=isAnyTypeAnnotation;t.isArgumentPlaceholder=isArgumentPlaceholder;t.isArrayExpression=isArrayExpression;t.isArrayPattern=isArrayPattern;t.isArrayTypeAnnotation=isArrayTypeAnnotation;t.isArrowFunctionExpression=isArrowFunctionExpression;t.isAssignmentExpression=isAssignmentExpression;t.isAssignmentPattern=isAssignmentPattern;t.isAwaitExpression=isAwaitExpression;t.isBigIntLiteral=isBigIntLiteral;t.isBinary=isBinary;t.isBinaryExpression=isBinaryExpression;t.isBindExpression=isBindExpression;t.isBlock=isBlock;t.isBlockParent=isBlockParent;t.isBlockStatement=isBlockStatement;t.isBooleanLiteral=isBooleanLiteral;t.isBooleanLiteralTypeAnnotation=isBooleanLiteralTypeAnnotation;t.isBooleanTypeAnnotation=isBooleanTypeAnnotation;t.isBreakStatement=isBreakStatement;t.isCallExpression=isCallExpression;t.isCatchClause=isCatchClause;t.isClass=isClass;t.isClassAccessorProperty=isClassAccessorProperty;t.isClassBody=isClassBody;t.isClassDeclaration=isClassDeclaration;t.isClassExpression=isClassExpression;t.isClassImplements=isClassImplements;t.isClassMethod=isClassMethod;t.isClassPrivateMethod=isClassPrivateMethod;t.isClassPrivateProperty=isClassPrivateProperty;t.isClassProperty=isClassProperty;t.isCompletionStatement=isCompletionStatement;t.isConditional=isConditional;t.isConditionalExpression=isConditionalExpression;t.isContinueStatement=isContinueStatement;t.isDebuggerStatement=isDebuggerStatement;t.isDecimalLiteral=isDecimalLiteral;t.isDeclaration=isDeclaration;t.isDeclareClass=isDeclareClass;t.isDeclareExportAllDeclaration=isDeclareExportAllDeclaration;t.isDeclareExportDeclaration=isDeclareExportDeclaration;t.isDeclareFunction=isDeclareFunction;t.isDeclareInterface=isDeclareInterface;t.isDeclareModule=isDeclareModule;t.isDeclareModuleExports=isDeclareModuleExports;t.isDeclareOpaqueType=isDeclareOpaqueType;t.isDeclareTypeAlias=isDeclareTypeAlias;t.isDeclareVariable=isDeclareVariable;t.isDeclaredPredicate=isDeclaredPredicate;t.isDecorator=isDecorator;t.isDirective=isDirective;t.isDirectiveLiteral=isDirectiveLiteral;t.isDoExpression=isDoExpression;t.isDoWhileStatement=isDoWhileStatement;t.isEmptyStatement=isEmptyStatement;t.isEmptyTypeAnnotation=isEmptyTypeAnnotation;t.isEnumBody=isEnumBody;t.isEnumBooleanBody=isEnumBooleanBody;t.isEnumBooleanMember=isEnumBooleanMember;t.isEnumDeclaration=isEnumDeclaration;t.isEnumDefaultedMember=isEnumDefaultedMember;t.isEnumMember=isEnumMember;t.isEnumNumberBody=isEnumNumberBody;t.isEnumNumberMember=isEnumNumberMember;t.isEnumStringBody=isEnumStringBody;t.isEnumStringMember=isEnumStringMember;t.isEnumSymbolBody=isEnumSymbolBody;t.isExistsTypeAnnotation=isExistsTypeAnnotation;t.isExportAllDeclaration=isExportAllDeclaration;t.isExportDeclaration=isExportDeclaration;t.isExportDefaultDeclaration=isExportDefaultDeclaration;t.isExportDefaultSpecifier=isExportDefaultSpecifier;t.isExportNamedDeclaration=isExportNamedDeclaration;t.isExportNamespaceSpecifier=isExportNamespaceSpecifier;t.isExportSpecifier=isExportSpecifier;t.isExpression=isExpression;t.isExpressionStatement=isExpressionStatement;t.isExpressionWrapper=isExpressionWrapper;t.isFile=isFile;t.isFlow=isFlow;t.isFlowBaseAnnotation=isFlowBaseAnnotation;t.isFlowDeclaration=isFlowDeclaration;t.isFlowPredicate=isFlowPredicate;t.isFlowType=isFlowType;t.isFor=isFor;t.isForInStatement=isForInStatement;t.isForOfStatement=isForOfStatement;t.isForStatement=isForStatement;t.isForXStatement=isForXStatement;t.isFunction=isFunction;t.isFunctionDeclaration=isFunctionDeclaration;t.isFunctionExpression=isFunctionExpression;t.isFunctionParent=isFunctionParent;t.isFunctionTypeAnnotation=isFunctionTypeAnnotation;t.isFunctionTypeParam=isFunctionTypeParam;t.isGenericTypeAnnotation=isGenericTypeAnnotation;t.isIdentifier=isIdentifier;t.isIfStatement=isIfStatement;t.isImmutable=isImmutable;t.isImport=isImport;t.isImportAttribute=isImportAttribute;t.isImportDeclaration=isImportDeclaration;t.isImportDefaultSpecifier=isImportDefaultSpecifier;t.isImportNamespaceSpecifier=isImportNamespaceSpecifier;t.isImportSpecifier=isImportSpecifier;t.isIndexedAccessType=isIndexedAccessType;t.isInferredPredicate=isInferredPredicate;t.isInterfaceDeclaration=isInterfaceDeclaration;t.isInterfaceExtends=isInterfaceExtends;t.isInterfaceTypeAnnotation=isInterfaceTypeAnnotation;t.isInterpreterDirective=isInterpreterDirective;t.isIntersectionTypeAnnotation=isIntersectionTypeAnnotation;t.isJSX=isJSX;t.isJSXAttribute=isJSXAttribute;t.isJSXClosingElement=isJSXClosingElement;t.isJSXClosingFragment=isJSXClosingFragment;t.isJSXElement=isJSXElement;t.isJSXEmptyExpression=isJSXEmptyExpression;t.isJSXExpressionContainer=isJSXExpressionContainer;t.isJSXFragment=isJSXFragment;t.isJSXIdentifier=isJSXIdentifier;t.isJSXMemberExpression=isJSXMemberExpression;t.isJSXNamespacedName=isJSXNamespacedName;t.isJSXOpeningElement=isJSXOpeningElement;t.isJSXOpeningFragment=isJSXOpeningFragment;t.isJSXSpreadAttribute=isJSXSpreadAttribute;t.isJSXSpreadChild=isJSXSpreadChild;t.isJSXText=isJSXText;t.isLVal=isLVal;t.isLabeledStatement=isLabeledStatement;t.isLiteral=isLiteral;t.isLogicalExpression=isLogicalExpression;t.isLoop=isLoop;t.isMemberExpression=isMemberExpression;t.isMetaProperty=isMetaProperty;t.isMethod=isMethod;t.isMiscellaneous=isMiscellaneous;t.isMixedTypeAnnotation=isMixedTypeAnnotation;t.isModuleDeclaration=isModuleDeclaration;t.isModuleExpression=isModuleExpression;t.isModuleSpecifier=isModuleSpecifier;t.isNewExpression=isNewExpression;t.isNoop=isNoop;t.isNullLiteral=isNullLiteral;t.isNullLiteralTypeAnnotation=isNullLiteralTypeAnnotation;t.isNullableTypeAnnotation=isNullableTypeAnnotation;t.isNumberLiteral=isNumberLiteral;t.isNumberLiteralTypeAnnotation=isNumberLiteralTypeAnnotation;t.isNumberTypeAnnotation=isNumberTypeAnnotation;t.isNumericLiteral=isNumericLiteral;t.isObjectExpression=isObjectExpression;t.isObjectMember=isObjectMember;t.isObjectMethod=isObjectMethod;t.isObjectPattern=isObjectPattern;t.isObjectProperty=isObjectProperty;t.isObjectTypeAnnotation=isObjectTypeAnnotation;t.isObjectTypeCallProperty=isObjectTypeCallProperty;t.isObjectTypeIndexer=isObjectTypeIndexer;t.isObjectTypeInternalSlot=isObjectTypeInternalSlot;t.isObjectTypeProperty=isObjectTypeProperty;t.isObjectTypeSpreadProperty=isObjectTypeSpreadProperty;t.isOpaqueType=isOpaqueType;t.isOptionalCallExpression=isOptionalCallExpression;t.isOptionalIndexedAccessType=isOptionalIndexedAccessType;t.isOptionalMemberExpression=isOptionalMemberExpression;t.isParenthesizedExpression=isParenthesizedExpression;t.isPattern=isPattern;t.isPatternLike=isPatternLike;t.isPipelineBareFunction=isPipelineBareFunction;t.isPipelinePrimaryTopicReference=isPipelinePrimaryTopicReference;t.isPipelineTopicExpression=isPipelineTopicExpression;t.isPlaceholder=isPlaceholder;t.isPrivate=isPrivate;t.isPrivateName=isPrivateName;t.isProgram=isProgram;t.isProperty=isProperty;t.isPureish=isPureish;t.isQualifiedTypeIdentifier=isQualifiedTypeIdentifier;t.isRecordExpression=isRecordExpression;t.isRegExpLiteral=isRegExpLiteral;t.isRegexLiteral=isRegexLiteral;t.isRestElement=isRestElement;t.isRestProperty=isRestProperty;t.isReturnStatement=isReturnStatement;t.isScopable=isScopable;t.isSequenceExpression=isSequenceExpression;t.isSpreadElement=isSpreadElement;t.isSpreadProperty=isSpreadProperty;t.isStandardized=isStandardized;t.isStatement=isStatement;t.isStaticBlock=isStaticBlock;t.isStringLiteral=isStringLiteral;t.isStringLiteralTypeAnnotation=isStringLiteralTypeAnnotation;t.isStringTypeAnnotation=isStringTypeAnnotation;t.isSuper=isSuper;t.isSwitchCase=isSwitchCase;t.isSwitchStatement=isSwitchStatement;t.isSymbolTypeAnnotation=isSymbolTypeAnnotation;t.isTSAnyKeyword=isTSAnyKeyword;t.isTSArrayType=isTSArrayType;t.isTSAsExpression=isTSAsExpression;t.isTSBaseType=isTSBaseType;t.isTSBigIntKeyword=isTSBigIntKeyword;t.isTSBooleanKeyword=isTSBooleanKeyword;t.isTSCallSignatureDeclaration=isTSCallSignatureDeclaration;t.isTSConditionalType=isTSConditionalType;t.isTSConstructSignatureDeclaration=isTSConstructSignatureDeclaration;t.isTSConstructorType=isTSConstructorType;t.isTSDeclareFunction=isTSDeclareFunction;t.isTSDeclareMethod=isTSDeclareMethod;t.isTSEntityName=isTSEntityName;t.isTSEnumDeclaration=isTSEnumDeclaration;t.isTSEnumMember=isTSEnumMember;t.isTSExportAssignment=isTSExportAssignment;t.isTSExpressionWithTypeArguments=isTSExpressionWithTypeArguments;t.isTSExternalModuleReference=isTSExternalModuleReference;t.isTSFunctionType=isTSFunctionType;t.isTSImportEqualsDeclaration=isTSImportEqualsDeclaration;t.isTSImportType=isTSImportType;t.isTSIndexSignature=isTSIndexSignature;t.isTSIndexedAccessType=isTSIndexedAccessType;t.isTSInferType=isTSInferType;t.isTSInstantiationExpression=isTSInstantiationExpression;t.isTSInterfaceBody=isTSInterfaceBody;t.isTSInterfaceDeclaration=isTSInterfaceDeclaration;t.isTSIntersectionType=isTSIntersectionType;t.isTSIntrinsicKeyword=isTSIntrinsicKeyword;t.isTSLiteralType=isTSLiteralType;t.isTSMappedType=isTSMappedType;t.isTSMethodSignature=isTSMethodSignature;t.isTSModuleBlock=isTSModuleBlock;t.isTSModuleDeclaration=isTSModuleDeclaration;t.isTSNamedTupleMember=isTSNamedTupleMember;t.isTSNamespaceExportDeclaration=isTSNamespaceExportDeclaration;t.isTSNeverKeyword=isTSNeverKeyword;t.isTSNonNullExpression=isTSNonNullExpression;t.isTSNullKeyword=isTSNullKeyword;t.isTSNumberKeyword=isTSNumberKeyword;t.isTSObjectKeyword=isTSObjectKeyword;t.isTSOptionalType=isTSOptionalType;t.isTSParameterProperty=isTSParameterProperty;t.isTSParenthesizedType=isTSParenthesizedType;t.isTSPropertySignature=isTSPropertySignature;t.isTSQualifiedName=isTSQualifiedName;t.isTSRestType=isTSRestType;t.isTSStringKeyword=isTSStringKeyword;t.isTSSymbolKeyword=isTSSymbolKeyword;t.isTSThisType=isTSThisType;t.isTSTupleType=isTSTupleType;t.isTSType=isTSType;t.isTSTypeAliasDeclaration=isTSTypeAliasDeclaration;t.isTSTypeAnnotation=isTSTypeAnnotation;t.isTSTypeAssertion=isTSTypeAssertion;t.isTSTypeElement=isTSTypeElement;t.isTSTypeLiteral=isTSTypeLiteral;t.isTSTypeOperator=isTSTypeOperator;t.isTSTypeParameter=isTSTypeParameter;t.isTSTypeParameterDeclaration=isTSTypeParameterDeclaration;t.isTSTypeParameterInstantiation=isTSTypeParameterInstantiation;t.isTSTypePredicate=isTSTypePredicate;t.isTSTypeQuery=isTSTypeQuery;t.isTSTypeReference=isTSTypeReference;t.isTSUndefinedKeyword=isTSUndefinedKeyword;t.isTSUnionType=isTSUnionType;t.isTSUnknownKeyword=isTSUnknownKeyword;t.isTSVoidKeyword=isTSVoidKeyword;t.isTaggedTemplateExpression=isTaggedTemplateExpression;t.isTemplateElement=isTemplateElement;t.isTemplateLiteral=isTemplateLiteral;t.isTerminatorless=isTerminatorless;t.isThisExpression=isThisExpression;t.isThisTypeAnnotation=isThisTypeAnnotation;t.isThrowStatement=isThrowStatement;t.isTopicReference=isTopicReference;t.isTryStatement=isTryStatement;t.isTupleExpression=isTupleExpression;t.isTupleTypeAnnotation=isTupleTypeAnnotation;t.isTypeAlias=isTypeAlias;t.isTypeAnnotation=isTypeAnnotation;t.isTypeCastExpression=isTypeCastExpression;t.isTypeParameter=isTypeParameter;t.isTypeParameterDeclaration=isTypeParameterDeclaration;t.isTypeParameterInstantiation=isTypeParameterInstantiation;t.isTypeScript=isTypeScript;t.isTypeofTypeAnnotation=isTypeofTypeAnnotation;t.isUnaryExpression=isUnaryExpression;t.isUnaryLike=isUnaryLike;t.isUnionTypeAnnotation=isUnionTypeAnnotation;t.isUpdateExpression=isUpdateExpression;t.isUserWhitespacable=isUserWhitespacable;t.isV8IntrinsicIdentifier=isV8IntrinsicIdentifier;t.isVariableDeclaration=isVariableDeclaration;t.isVariableDeclarator=isVariableDeclarator;t.isVariance=isVariance;t.isVoidTypeAnnotation=isVoidTypeAnnotation;t.isWhile=isWhile;t.isWhileStatement=isWhileStatement;t.isWithStatement=isWithStatement;t.isYieldExpression=isYieldExpression;var n=r(3774);function isArrayExpression(e,t){if(!e)return false;const r=e.type;if(r==="ArrayExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isAssignmentExpression(e,t){if(!e)return false;const r=e.type;if(r==="AssignmentExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBinaryExpression(e,t){if(!e)return false;const r=e.type;if(r==="BinaryExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isInterpreterDirective(e,t){if(!e)return false;const r=e.type;if(r==="InterpreterDirective"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDirective(e,t){if(!e)return false;const r=e.type;if(r==="Directive"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDirectiveLiteral(e,t){if(!e)return false;const r=e.type;if(r==="DirectiveLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBlockStatement(e,t){if(!e)return false;const r=e.type;if(r==="BlockStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBreakStatement(e,t){if(!e)return false;const r=e.type;if(r==="BreakStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isCallExpression(e,t){if(!e)return false;const r=e.type;if(r==="CallExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isCatchClause(e,t){if(!e)return false;const r=e.type;if(r==="CatchClause"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isConditionalExpression(e,t){if(!e)return false;const r=e.type;if(r==="ConditionalExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isContinueStatement(e,t){if(!e)return false;const r=e.type;if(r==="ContinueStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDebuggerStatement(e,t){if(!e)return false;const r=e.type;if(r==="DebuggerStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDoWhileStatement(e,t){if(!e)return false;const r=e.type;if(r==="DoWhileStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEmptyStatement(e,t){if(!e)return false;const r=e.type;if(r==="EmptyStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExpressionStatement(e,t){if(!e)return false;const r=e.type;if(r==="ExpressionStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFile(e,t){if(!e)return false;const r=e.type;if(r==="File"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isForInStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForInStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isForStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFunctionDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="FunctionDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFunctionExpression(e,t){if(!e)return false;const r=e.type;if(r==="FunctionExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="Identifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isIfStatement(e,t){if(!e)return false;const r=e.type;if(r==="IfStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isLabeledStatement(e,t){if(!e)return false;const r=e.type;if(r==="LabeledStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isStringLiteral(e,t){if(!e)return false;const r=e.type;if(r==="StringLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNumericLiteral(e,t){if(!e)return false;const r=e.type;if(r==="NumericLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNullLiteral(e,t){if(!e)return false;const r=e.type;if(r==="NullLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBooleanLiteral(e,t){if(!e)return false;const r=e.type;if(r==="BooleanLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isRegExpLiteral(e,t){if(!e)return false;const r=e.type;if(r==="RegExpLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isLogicalExpression(e,t){if(!e)return false;const r=e.type;if(r==="LogicalExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="MemberExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNewExpression(e,t){if(!e)return false;const r=e.type;if(r==="NewExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isProgram(e,t){if(!e)return false;const r=e.type;if(r==="Program"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectExpression(e,t){if(!e)return false;const r=e.type;if(r==="ObjectExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectMethod(e,t){if(!e)return false;const r=e.type;if(r==="ObjectMethod"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isRestElement(e,t){if(!e)return false;const r=e.type;if(r==="RestElement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isReturnStatement(e,t){if(!e)return false;const r=e.type;if(r==="ReturnStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSequenceExpression(e,t){if(!e)return false;const r=e.type;if(r==="SequenceExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isParenthesizedExpression(e,t){if(!e)return false;const r=e.type;if(r==="ParenthesizedExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSwitchCase(e,t){if(!e)return false;const r=e.type;if(r==="SwitchCase"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSwitchStatement(e,t){if(!e)return false;const r=e.type;if(r==="SwitchStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isThisExpression(e,t){if(!e)return false;const r=e.type;if(r==="ThisExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isThrowStatement(e,t){if(!e)return false;const r=e.type;if(r==="ThrowStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTryStatement(e,t){if(!e)return false;const r=e.type;if(r==="TryStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isUnaryExpression(e,t){if(!e)return false;const r=e.type;if(r==="UnaryExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isUpdateExpression(e,t){if(!e)return false;const r=e.type;if(r==="UpdateExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isVariableDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="VariableDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isVariableDeclarator(e,t){if(!e)return false;const r=e.type;if(r==="VariableDeclarator"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isWhileStatement(e,t){if(!e)return false;const r=e.type;if(r==="WhileStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isWithStatement(e,t){if(!e)return false;const r=e.type;if(r==="WithStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isAssignmentPattern(e,t){if(!e)return false;const r=e.type;if(r==="AssignmentPattern"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isArrayPattern(e,t){if(!e)return false;const r=e.type;if(r==="ArrayPattern"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isArrowFunctionExpression(e,t){if(!e)return false;const r=e.type;if(r==="ArrowFunctionExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassBody(e,t){if(!e)return false;const r=e.type;if(r==="ClassBody"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassExpression(e,t){if(!e)return false;const r=e.type;if(r==="ClassExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ClassDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportAllDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportAllDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportDefaultDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportDefaultDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportNamedDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ExportNamedDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportSpecifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isForOfStatement(e,t){if(!e)return false;const r=e.type;if(r==="ForOfStatement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="ImportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImportDefaultSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportDefaultSpecifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImportNamespaceSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportNamespaceSpecifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImportSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ImportSpecifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isMetaProperty(e,t){if(!e)return false;const r=e.type;if(r==="MetaProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassMethod(e,t){if(!e)return false;const r=e.type;if(r==="ClassMethod"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectPattern(e,t){if(!e)return false;const r=e.type;if(r==="ObjectPattern"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSpreadElement(e,t){if(!e)return false;const r=e.type;if(r==="SpreadElement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSuper(e,t){if(!e)return false;const r=e.type;if(r==="Super"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTaggedTemplateExpression(e,t){if(!e)return false;const r=e.type;if(r==="TaggedTemplateExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTemplateElement(e,t){if(!e)return false;const r=e.type;if(r==="TemplateElement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTemplateLiteral(e,t){if(!e)return false;const r=e.type;if(r==="TemplateLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isYieldExpression(e,t){if(!e)return false;const r=e.type;if(r==="YieldExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isAwaitExpression(e,t){if(!e)return false;const r=e.type;if(r==="AwaitExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImport(e,t){if(!e)return false;const r=e.type;if(r==="Import"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBigIntLiteral(e,t){if(!e)return false;const r=e.type;if(r==="BigIntLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportNamespaceSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportNamespaceSpecifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isOptionalMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="OptionalMemberExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isOptionalCallExpression(e,t){if(!e)return false;const r=e.type;if(r==="OptionalCallExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassAccessorProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassAccessorProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassPrivateProperty(e,t){if(!e)return false;const r=e.type;if(r==="ClassPrivateProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassPrivateMethod(e,t){if(!e)return false;const r=e.type;if(r==="ClassPrivateMethod"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPrivateName(e,t){if(!e)return false;const r=e.type;if(r==="PrivateName"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isStaticBlock(e,t){if(!e)return false;const r=e.type;if(r==="StaticBlock"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isAnyTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="AnyTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isArrayTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ArrayTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBooleanTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="BooleanTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBooleanLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="BooleanLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNullLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NullLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClassImplements(e,t){if(!e)return false;const r=e.type;if(r==="ClassImplements"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareClass(e,t){if(!e)return false;const r=e.type;if(r==="DeclareClass"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareFunction(e,t){if(!e)return false;const r=e.type;if(r==="DeclareFunction"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareInterface(e,t){if(!e)return false;const r=e.type;if(r==="DeclareInterface"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareModule(e,t){if(!e)return false;const r=e.type;if(r==="DeclareModule"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareModuleExports(e,t){if(!e)return false;const r=e.type;if(r==="DeclareModuleExports"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareTypeAlias(e,t){if(!e)return false;const r=e.type;if(r==="DeclareTypeAlias"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareOpaqueType(e,t){if(!e)return false;const r=e.type;if(r==="DeclareOpaqueType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareVariable(e,t){if(!e)return false;const r=e.type;if(r==="DeclareVariable"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareExportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="DeclareExportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclareExportAllDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="DeclareExportAllDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclaredPredicate(e,t){if(!e)return false;const r=e.type;if(r==="DeclaredPredicate"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExistsTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ExistsTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFunctionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="FunctionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFunctionTypeParam(e,t){if(!e)return false;const r=e.type;if(r==="FunctionTypeParam"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isGenericTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="GenericTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isInferredPredicate(e,t){if(!e)return false;const r=e.type;if(r==="InferredPredicate"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isInterfaceExtends(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceExtends"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isInterfaceDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isInterfaceTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="InterfaceTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isIntersectionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="IntersectionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isMixedTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="MixedTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEmptyTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="EmptyTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNullableTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NullableTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNumberLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NumberLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNumberTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="NumberTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectTypeInternalSlot(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeInternalSlot"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectTypeCallProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeCallProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectTypeIndexer(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeIndexer"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectTypeProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectTypeSpreadProperty(e,t){if(!e)return false;const r=e.type;if(r==="ObjectTypeSpreadProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isOpaqueType(e,t){if(!e)return false;const r=e.type;if(r==="OpaqueType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isQualifiedTypeIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="QualifiedTypeIdentifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isStringLiteralTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="StringLiteralTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isStringTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="StringTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSymbolTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="SymbolTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isThisTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="ThisTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTupleTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TupleTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeofTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TypeofTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeAlias(e,t){if(!e)return false;const r=e.type;if(r==="TypeAlias"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeCastExpression(e,t){if(!e)return false;const r=e.type;if(r==="TypeCastExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeParameter(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameter"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeParameterDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameterDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeParameterInstantiation(e,t){if(!e)return false;const r=e.type;if(r==="TypeParameterInstantiation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isUnionTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="UnionTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isVariance(e,t){if(!e)return false;const r=e.type;if(r==="Variance"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isVoidTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="VoidTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="EnumDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumBooleanBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumBooleanBody"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumNumberBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumNumberBody"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumStringBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumStringBody"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumSymbolBody(e,t){if(!e)return false;const r=e.type;if(r==="EnumSymbolBody"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumBooleanMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumBooleanMember"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumNumberMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumNumberMember"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumStringMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumStringMember"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumDefaultedMember(e,t){if(!e)return false;const r=e.type;if(r==="EnumDefaultedMember"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isIndexedAccessType(e,t){if(!e)return false;const r=e.type;if(r==="IndexedAccessType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isOptionalIndexedAccessType(e,t){if(!e)return false;const r=e.type;if(r==="OptionalIndexedAccessType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXAttribute(e,t){if(!e)return false;const r=e.type;if(r==="JSXAttribute"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXClosingElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXClosingElement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXElement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXEmptyExpression(e,t){if(!e)return false;const r=e.type;if(r==="JSXEmptyExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXExpressionContainer(e,t){if(!e)return false;const r=e.type;if(r==="JSXExpressionContainer"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXSpreadChild(e,t){if(!e)return false;const r=e.type;if(r==="JSXSpreadChild"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="JSXIdentifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXMemberExpression(e,t){if(!e)return false;const r=e.type;if(r==="JSXMemberExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXNamespacedName(e,t){if(!e)return false;const r=e.type;if(r==="JSXNamespacedName"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXOpeningElement(e,t){if(!e)return false;const r=e.type;if(r==="JSXOpeningElement"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXSpreadAttribute(e,t){if(!e)return false;const r=e.type;if(r==="JSXSpreadAttribute"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXText(e,t){if(!e)return false;const r=e.type;if(r==="JSXText"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXFragment"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXOpeningFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXOpeningFragment"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSXClosingFragment(e,t){if(!e)return false;const r=e.type;if(r==="JSXClosingFragment"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNoop(e,t){if(!e)return false;const r=e.type;if(r==="Noop"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPlaceholder(e,t){if(!e)return false;const r=e.type;if(r==="Placeholder"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isV8IntrinsicIdentifier(e,t){if(!e)return false;const r=e.type;if(r==="V8IntrinsicIdentifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isArgumentPlaceholder(e,t){if(!e)return false;const r=e.type;if(r==="ArgumentPlaceholder"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBindExpression(e,t){if(!e)return false;const r=e.type;if(r==="BindExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImportAttribute(e,t){if(!e)return false;const r=e.type;if(r==="ImportAttribute"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDecorator(e,t){if(!e)return false;const r=e.type;if(r==="Decorator"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDoExpression(e,t){if(!e)return false;const r=e.type;if(r==="DoExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportDefaultSpecifier(e,t){if(!e)return false;const r=e.type;if(r==="ExportDefaultSpecifier"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isRecordExpression(e,t){if(!e)return false;const r=e.type;if(r==="RecordExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTupleExpression(e,t){if(!e)return false;const r=e.type;if(r==="TupleExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDecimalLiteral(e,t){if(!e)return false;const r=e.type;if(r==="DecimalLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isModuleExpression(e,t){if(!e)return false;const r=e.type;if(r==="ModuleExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTopicReference(e,t){if(!e)return false;const r=e.type;if(r==="TopicReference"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPipelineTopicExpression(e,t){if(!e)return false;const r=e.type;if(r==="PipelineTopicExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPipelineBareFunction(e,t){if(!e)return false;const r=e.type;if(r==="PipelineBareFunction"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPipelinePrimaryTopicReference(e,t){if(!e)return false;const r=e.type;if(r==="PipelinePrimaryTopicReference"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSParameterProperty(e,t){if(!e)return false;const r=e.type;if(r==="TSParameterProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSDeclareFunction(e,t){if(!e)return false;const r=e.type;if(r==="TSDeclareFunction"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSDeclareMethod(e,t){if(!e)return false;const r=e.type;if(r==="TSDeclareMethod"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSQualifiedName(e,t){if(!e)return false;const r=e.type;if(r==="TSQualifiedName"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSCallSignatureDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSCallSignatureDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSConstructSignatureDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSConstructSignatureDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSPropertySignature(e,t){if(!e)return false;const r=e.type;if(r==="TSPropertySignature"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSMethodSignature(e,t){if(!e)return false;const r=e.type;if(r==="TSMethodSignature"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSIndexSignature(e,t){if(!e)return false;const r=e.type;if(r==="TSIndexSignature"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSAnyKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSAnyKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSBooleanKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSBooleanKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSBigIntKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSBigIntKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSIntrinsicKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSIntrinsicKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSNeverKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNeverKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSNullKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNullKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSNumberKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSNumberKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSObjectKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSObjectKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSStringKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSStringKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSSymbolKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSSymbolKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSUndefinedKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSUndefinedKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSUnknownKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSUnknownKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSVoidKeyword(e,t){if(!e)return false;const r=e.type;if(r==="TSVoidKeyword"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSThisType(e,t){if(!e)return false;const r=e.type;if(r==="TSThisType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSFunctionType(e,t){if(!e)return false;const r=e.type;if(r==="TSFunctionType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSConstructorType(e,t){if(!e)return false;const r=e.type;if(r==="TSConstructorType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeReference(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeReference"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypePredicate(e,t){if(!e)return false;const r=e.type;if(r==="TSTypePredicate"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeQuery(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeQuery"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeLiteral(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSArrayType(e,t){if(!e)return false;const r=e.type;if(r==="TSArrayType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTupleType(e,t){if(!e)return false;const r=e.type;if(r==="TSTupleType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSOptionalType(e,t){if(!e)return false;const r=e.type;if(r==="TSOptionalType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSRestType(e,t){if(!e)return false;const r=e.type;if(r==="TSRestType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSNamedTupleMember(e,t){if(!e)return false;const r=e.type;if(r==="TSNamedTupleMember"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSUnionType(e,t){if(!e)return false;const r=e.type;if(r==="TSUnionType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSIntersectionType(e,t){if(!e)return false;const r=e.type;if(r==="TSIntersectionType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSConditionalType(e,t){if(!e)return false;const r=e.type;if(r==="TSConditionalType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSInferType(e,t){if(!e)return false;const r=e.type;if(r==="TSInferType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSParenthesizedType(e,t){if(!e)return false;const r=e.type;if(r==="TSParenthesizedType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeOperator(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeOperator"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSIndexedAccessType(e,t){if(!e)return false;const r=e.type;if(r==="TSIndexedAccessType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSMappedType(e,t){if(!e)return false;const r=e.type;if(r==="TSMappedType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSLiteralType(e,t){if(!e)return false;const r=e.type;if(r==="TSLiteralType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSExpressionWithTypeArguments(e,t){if(!e)return false;const r=e.type;if(r==="TSExpressionWithTypeArguments"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSInterfaceDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSInterfaceDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSInterfaceBody(e,t){if(!e)return false;const r=e.type;if(r==="TSInterfaceBody"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeAliasDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAliasDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSInstantiationExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSInstantiationExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSAsExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSAsExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeAssertion(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAssertion"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSEnumDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSEnumDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSEnumMember(e,t){if(!e)return false;const r=e.type;if(r==="TSEnumMember"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSModuleDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSModuleDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSModuleBlock(e,t){if(!e)return false;const r=e.type;if(r==="TSModuleBlock"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSImportType(e,t){if(!e)return false;const r=e.type;if(r==="TSImportType"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSImportEqualsDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSImportEqualsDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSExternalModuleReference(e,t){if(!e)return false;const r=e.type;if(r==="TSExternalModuleReference"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSNonNullExpression(e,t){if(!e)return false;const r=e.type;if(r==="TSNonNullExpression"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSExportAssignment(e,t){if(!e)return false;const r=e.type;if(r==="TSExportAssignment"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSNamespaceExportDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSNamespaceExportDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeAnnotation(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeAnnotation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeParameterInstantiation(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameterInstantiation"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeParameterDeclaration(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameterDeclaration"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeParameter(e,t){if(!e)return false;const r=e.type;if(r==="TSTypeParameter"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isStandardized(e,t){if(!e)return false;const r=e.type;if("ArrayExpression"===r||"AssignmentExpression"===r||"BinaryExpression"===r||"InterpreterDirective"===r||"Directive"===r||"DirectiveLiteral"===r||"BlockStatement"===r||"BreakStatement"===r||"CallExpression"===r||"CatchClause"===r||"ConditionalExpression"===r||"ContinueStatement"===r||"DebuggerStatement"===r||"DoWhileStatement"===r||"EmptyStatement"===r||"ExpressionStatement"===r||"File"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Identifier"===r||"IfStatement"===r||"LabeledStatement"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"LogicalExpression"===r||"MemberExpression"===r||"NewExpression"===r||"Program"===r||"ObjectExpression"===r||"ObjectMethod"===r||"ObjectProperty"===r||"RestElement"===r||"ReturnStatement"===r||"SequenceExpression"===r||"ParenthesizedExpression"===r||"SwitchCase"===r||"SwitchStatement"===r||"ThisExpression"===r||"ThrowStatement"===r||"TryStatement"===r||"UnaryExpression"===r||"UpdateExpression"===r||"VariableDeclaration"===r||"VariableDeclarator"===r||"WhileStatement"===r||"WithStatement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ArrowFunctionExpression"===r||"ClassBody"===r||"ClassExpression"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ExportSpecifier"===r||"ForOfStatement"===r||"ImportDeclaration"===r||"ImportDefaultSpecifier"===r||"ImportNamespaceSpecifier"===r||"ImportSpecifier"===r||"MetaProperty"===r||"ClassMethod"===r||"ObjectPattern"===r||"SpreadElement"===r||"Super"===r||"TaggedTemplateExpression"===r||"TemplateElement"===r||"TemplateLiteral"===r||"YieldExpression"===r||"AwaitExpression"===r||"Import"===r||"BigIntLiteral"===r||"ExportNamespaceSpecifier"===r||"OptionalMemberExpression"===r||"OptionalCallExpression"===r||"ClassProperty"===r||"ClassAccessorProperty"===r||"ClassPrivateProperty"===r||"ClassPrivateMethod"===r||"PrivateName"===r||"StaticBlock"===r||r==="Placeholder"&&("Identifier"===e.expectedNode||"StringLiteral"===e.expectedNode||"BlockStatement"===e.expectedNode||"ClassBody"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExpression(e,t){if(!e)return false;const r=e.type;if("ArrayExpression"===r||"AssignmentExpression"===r||"BinaryExpression"===r||"CallExpression"===r||"ConditionalExpression"===r||"FunctionExpression"===r||"Identifier"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"LogicalExpression"===r||"MemberExpression"===r||"NewExpression"===r||"ObjectExpression"===r||"SequenceExpression"===r||"ParenthesizedExpression"===r||"ThisExpression"===r||"UnaryExpression"===r||"UpdateExpression"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"MetaProperty"===r||"Super"===r||"TaggedTemplateExpression"===r||"TemplateLiteral"===r||"YieldExpression"===r||"AwaitExpression"===r||"Import"===r||"BigIntLiteral"===r||"OptionalMemberExpression"===r||"OptionalCallExpression"===r||"TypeCastExpression"===r||"JSXElement"===r||"JSXFragment"===r||"BindExpression"===r||"DoExpression"===r||"RecordExpression"===r||"TupleExpression"===r||"DecimalLiteral"===r||"ModuleExpression"===r||"TopicReference"===r||"PipelineTopicExpression"===r||"PipelineBareFunction"===r||"PipelinePrimaryTopicReference"===r||"TSInstantiationExpression"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSNonNullExpression"===r||r==="Placeholder"&&("Expression"===e.expectedNode||"Identifier"===e.expectedNode||"StringLiteral"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBinary(e,t){if(!e)return false;const r=e.type;if("BinaryExpression"===r||"LogicalExpression"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isScopable(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ClassExpression"===r||"ClassDeclaration"===r||"ForOfStatement"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBlockParent(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"CatchClause"===r||"DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"FunctionExpression"===r||"Program"===r||"ObjectMethod"===r||"SwitchStatement"===r||"WhileStatement"===r||"ArrowFunctionExpression"===r||"ForOfStatement"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isBlock(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"Program"===r||"TSModuleBlock"===r||r==="Placeholder"&&"BlockStatement"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isStatement(e,t){if(!e)return false;const r=e.type;if("BlockStatement"===r||"BreakStatement"===r||"ContinueStatement"===r||"DebuggerStatement"===r||"DoWhileStatement"===r||"EmptyStatement"===r||"ExpressionStatement"===r||"ForInStatement"===r||"ForStatement"===r||"FunctionDeclaration"===r||"IfStatement"===r||"LabeledStatement"===r||"ReturnStatement"===r||"SwitchStatement"===r||"ThrowStatement"===r||"TryStatement"===r||"VariableDeclaration"===r||"WhileStatement"===r||"WithStatement"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ForOfStatement"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"EnumDeclaration"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||"TSImportEqualsDeclaration"===r||"TSExportAssignment"===r||"TSNamespaceExportDeclaration"===r||r==="Placeholder"&&("Statement"===e.expectedNode||"Declaration"===e.expectedNode||"BlockStatement"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTerminatorless(e,t){if(!e)return false;const r=e.type;if("BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r||"YieldExpression"===r||"AwaitExpression"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isCompletionStatement(e,t){if(!e)return false;const r=e.type;if("BreakStatement"===r||"ContinueStatement"===r||"ReturnStatement"===r||"ThrowStatement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isConditional(e,t){if(!e)return false;const r=e.type;if("ConditionalExpression"===r||"IfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isLoop(e,t){if(!e)return false;const r=e.type;if("DoWhileStatement"===r||"ForInStatement"===r||"ForStatement"===r||"WhileStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isWhile(e,t){if(!e)return false;const r=e.type;if("DoWhileStatement"===r||"WhileStatement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExpressionWrapper(e,t){if(!e)return false;const r=e.type;if("ExpressionStatement"===r||"ParenthesizedExpression"===r||"TypeCastExpression"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFor(e,t){if(!e)return false;const r=e.type;if("ForInStatement"===r||"ForStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isForXStatement(e,t){if(!e)return false;const r=e.type;if("ForInStatement"===r||"ForOfStatement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFunction(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFunctionParent(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"ObjectMethod"===r||"ArrowFunctionExpression"===r||"ClassMethod"===r||"ClassPrivateMethod"===r||"StaticBlock"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPureish(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"FunctionExpression"===r||"StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"ArrowFunctionExpression"===r||"BigIntLiteral"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isDeclaration(e,t){if(!e)return false;const r=e.type;if("FunctionDeclaration"===r||"VariableDeclaration"===r||"ClassDeclaration"===r||"ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r||"EnumDeclaration"===r||"TSDeclareFunction"===r||"TSInterfaceDeclaration"===r||"TSTypeAliasDeclaration"===r||"TSEnumDeclaration"===r||"TSModuleDeclaration"===r||r==="Placeholder"&&"Declaration"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPatternLike(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSNonNullExpression"===r||r==="Placeholder"&&("Pattern"===e.expectedNode||"Identifier"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isLVal(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"MemberExpression"===r||"RestElement"===r||"AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||"TSParameterProperty"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSNonNullExpression"===r||r==="Placeholder"&&("Pattern"===e.expectedNode||"Identifier"===e.expectedNode)){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSEntityName(e,t){if(!e)return false;const r=e.type;if("Identifier"===r||"TSQualifiedName"===r||r==="Placeholder"&&"Identifier"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isLiteral(e,t){if(!e)return false;const r=e.type;if("StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"RegExpLiteral"===r||"TemplateLiteral"===r||"BigIntLiteral"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isImmutable(e,t){if(!e)return false;const r=e.type;if("StringLiteral"===r||"NumericLiteral"===r||"NullLiteral"===r||"BooleanLiteral"===r||"BigIntLiteral"===r||"JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXOpeningElement"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r||"DecimalLiteral"===r||r==="Placeholder"&&"StringLiteral"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isUserWhitespacable(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ObjectProperty"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isMethod(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ClassMethod"===r||"ClassPrivateMethod"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isObjectMember(e,t){if(!e)return false;const r=e.type;if("ObjectMethod"===r||"ObjectProperty"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isProperty(e,t){if(!e)return false;const r=e.type;if("ObjectProperty"===r||"ClassProperty"===r||"ClassAccessorProperty"===r||"ClassPrivateProperty"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isUnaryLike(e,t){if(!e)return false;const r=e.type;if("UnaryExpression"===r||"SpreadElement"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPattern(e,t){if(!e)return false;const r=e.type;if("AssignmentPattern"===r||"ArrayPattern"===r||"ObjectPattern"===r||r==="Placeholder"&&"Pattern"===e.expectedNode){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isClass(e,t){if(!e)return false;const r=e.type;if("ClassExpression"===r||"ClassDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isModuleDeclaration(e,t){if(!e)return false;const r=e.type;if("ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r||"ImportDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isExportDeclaration(e,t){if(!e)return false;const r=e.type;if("ExportAllDeclaration"===r||"ExportDefaultDeclaration"===r||"ExportNamedDeclaration"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isModuleSpecifier(e,t){if(!e)return false;const r=e.type;if("ExportSpecifier"===r||"ImportDefaultSpecifier"===r||"ImportNamespaceSpecifier"===r||"ImportSpecifier"===r||"ExportNamespaceSpecifier"===r||"ExportDefaultSpecifier"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isAccessor(e,t){if(!e)return false;const r=e.type;if("ClassAccessorProperty"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isPrivate(e,t){if(!e)return false;const r=e.type;if("ClassPrivateProperty"===r||"ClassPrivateMethod"===r||"PrivateName"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFlow(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ClassImplements"===r||"DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"DeclaredPredicate"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"FunctionTypeParam"===r||"GenericTypeAnnotation"===r||"InferredPredicate"===r||"InterfaceExtends"===r||"InterfaceDeclaration"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"ObjectTypeInternalSlot"===r||"ObjectTypeCallProperty"===r||"ObjectTypeIndexer"===r||"ObjectTypeProperty"===r||"ObjectTypeSpreadProperty"===r||"OpaqueType"===r||"QualifiedTypeIdentifier"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"TypeAlias"===r||"TypeAnnotation"===r||"TypeCastExpression"===r||"TypeParameter"===r||"TypeParameterDeclaration"===r||"TypeParameterInstantiation"===r||"UnionTypeAnnotation"===r||"Variance"===r||"VoidTypeAnnotation"===r||"EnumDeclaration"===r||"EnumBooleanBody"===r||"EnumNumberBody"===r||"EnumStringBody"===r||"EnumSymbolBody"===r||"EnumBooleanMember"===r||"EnumNumberMember"===r||"EnumStringMember"===r||"EnumDefaultedMember"===r||"IndexedAccessType"===r||"OptionalIndexedAccessType"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFlowType(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"ArrayTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"BooleanLiteralTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"ExistsTypeAnnotation"===r||"FunctionTypeAnnotation"===r||"GenericTypeAnnotation"===r||"InterfaceTypeAnnotation"===r||"IntersectionTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NullableTypeAnnotation"===r||"NumberLiteralTypeAnnotation"===r||"NumberTypeAnnotation"===r||"ObjectTypeAnnotation"===r||"StringLiteralTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"TupleTypeAnnotation"===r||"TypeofTypeAnnotation"===r||"UnionTypeAnnotation"===r||"VoidTypeAnnotation"===r||"IndexedAccessType"===r||"OptionalIndexedAccessType"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFlowBaseAnnotation(e,t){if(!e)return false;const r=e.type;if("AnyTypeAnnotation"===r||"BooleanTypeAnnotation"===r||"NullLiteralTypeAnnotation"===r||"MixedTypeAnnotation"===r||"EmptyTypeAnnotation"===r||"NumberTypeAnnotation"===r||"StringTypeAnnotation"===r||"SymbolTypeAnnotation"===r||"ThisTypeAnnotation"===r||"VoidTypeAnnotation"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFlowDeclaration(e,t){if(!e)return false;const r=e.type;if("DeclareClass"===r||"DeclareFunction"===r||"DeclareInterface"===r||"DeclareModule"===r||"DeclareModuleExports"===r||"DeclareTypeAlias"===r||"DeclareOpaqueType"===r||"DeclareVariable"===r||"DeclareExportDeclaration"===r||"DeclareExportAllDeclaration"===r||"InterfaceDeclaration"===r||"OpaqueType"===r||"TypeAlias"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isFlowPredicate(e,t){if(!e)return false;const r=e.type;if("DeclaredPredicate"===r||"InferredPredicate"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumBody(e,t){if(!e)return false;const r=e.type;if("EnumBooleanBody"===r||"EnumNumberBody"===r||"EnumStringBody"===r||"EnumSymbolBody"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isEnumMember(e,t){if(!e)return false;const r=e.type;if("EnumBooleanMember"===r||"EnumNumberMember"===r||"EnumStringMember"===r||"EnumDefaultedMember"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isJSX(e,t){if(!e)return false;const r=e.type;if("JSXAttribute"===r||"JSXClosingElement"===r||"JSXElement"===r||"JSXEmptyExpression"===r||"JSXExpressionContainer"===r||"JSXSpreadChild"===r||"JSXIdentifier"===r||"JSXMemberExpression"===r||"JSXNamespacedName"===r||"JSXOpeningElement"===r||"JSXSpreadAttribute"===r||"JSXText"===r||"JSXFragment"===r||"JSXOpeningFragment"===r||"JSXClosingFragment"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isMiscellaneous(e,t){if(!e)return false;const r=e.type;if("Noop"===r||"Placeholder"===r||"V8IntrinsicIdentifier"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTypeScript(e,t){if(!e)return false;const r=e.type;if("TSParameterProperty"===r||"TSDeclareFunction"===r||"TSDeclareMethod"===r||"TSQualifiedName"===r||"TSCallSignatureDeclaration"===r||"TSConstructSignatureDeclaration"===r||"TSPropertySignature"===r||"TSMethodSignature"===r||"TSIndexSignature"===r||"TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSFunctionType"===r||"TSConstructorType"===r||"TSTypeReference"===r||"TSTypePredicate"===r||"TSTypeQuery"===r||"TSTypeLiteral"===r||"TSArrayType"===r||"TSTupleType"===r||"TSOptionalType"===r||"TSRestType"===r||"TSNamedTupleMember"===r||"TSUnionType"===r||"TSIntersectionType"===r||"TSConditionalType"===r||"TSInferType"===r||"TSParenthesizedType"===r||"TSTypeOperator"===r||"TSIndexedAccessType"===r||"TSMappedType"===r||"TSLiteralType"===r||"TSExpressionWithTypeArguments"===r||"TSInterfaceDeclaration"===r||"TSInterfaceBody"===r||"TSTypeAliasDeclaration"===r||"TSInstantiationExpression"===r||"TSAsExpression"===r||"TSTypeAssertion"===r||"TSEnumDeclaration"===r||"TSEnumMember"===r||"TSModuleDeclaration"===r||"TSModuleBlock"===r||"TSImportType"===r||"TSImportEqualsDeclaration"===r||"TSExternalModuleReference"===r||"TSNonNullExpression"===r||"TSExportAssignment"===r||"TSNamespaceExportDeclaration"===r||"TSTypeAnnotation"===r||"TSTypeParameterInstantiation"===r||"TSTypeParameterDeclaration"===r||"TSTypeParameter"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSTypeElement(e,t){if(!e)return false;const r=e.type;if("TSCallSignatureDeclaration"===r||"TSConstructSignatureDeclaration"===r||"TSPropertySignature"===r||"TSMethodSignature"===r||"TSIndexSignature"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSType(e,t){if(!e)return false;const r=e.type;if("TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSFunctionType"===r||"TSConstructorType"===r||"TSTypeReference"===r||"TSTypePredicate"===r||"TSTypeQuery"===r||"TSTypeLiteral"===r||"TSArrayType"===r||"TSTupleType"===r||"TSOptionalType"===r||"TSRestType"===r||"TSUnionType"===r||"TSIntersectionType"===r||"TSConditionalType"===r||"TSInferType"===r||"TSParenthesizedType"===r||"TSTypeOperator"===r||"TSIndexedAccessType"===r||"TSMappedType"===r||"TSLiteralType"===r||"TSExpressionWithTypeArguments"===r||"TSImportType"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isTSBaseType(e,t){if(!e)return false;const r=e.type;if("TSAnyKeyword"===r||"TSBooleanKeyword"===r||"TSBigIntKeyword"===r||"TSIntrinsicKeyword"===r||"TSNeverKeyword"===r||"TSNullKeyword"===r||"TSNumberKeyword"===r||"TSObjectKeyword"===r||"TSStringKeyword"===r||"TSSymbolKeyword"===r||"TSUndefinedKeyword"===r||"TSUnknownKeyword"===r||"TSVoidKeyword"===r||"TSThisType"===r||"TSLiteralType"===r){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isNumberLiteral(e,t){console.trace("The node type NumberLiteral has been renamed to NumericLiteral");if(!e)return false;const r=e.type;if(r==="NumberLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isRegexLiteral(e,t){console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");if(!e)return false;const r=e.type;if(r==="RegexLiteral"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isRestProperty(e,t){console.trace("The node type RestProperty has been renamed to RestElement");if(!e)return false;const r=e.type;if(r==="RestProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}function isSpreadProperty(e,t){console.trace("The node type SpreadProperty has been renamed to SpreadElement");if(!e)return false;const r=e.type;if(r==="SpreadProperty"){if(typeof t==="undefined"){return true}else{return(0,n.default)(e,t)}}return false}},4420:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=is;var n=r(3774);var s=r(9338);var i=r(1438);var a=r(6107);function is(e,t,r){if(!t)return false;const o=(0,s.default)(t.type,e);if(!o){if(!r&&t.type==="Placeholder"&&e in a.FLIPPED_ALIAS_KEYS){return(0,i.default)(t.expectedNode,e)}return false}if(typeof r==="undefined"){return true}else{return(0,n.default)(t,r)}}},1728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isBinding;var n=r(26);function isBinding(e,t,r){if(r&&e.type==="Identifier"&&t.type==="ObjectProperty"&&r.type==="ObjectExpression"){return false}const s=n.default.keys[t.type];if(s){for(let r=0;r=0)return true}else{if(i===e)return true}}}return false}},4918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isBlockScoped;var n=r(9648);var s=r(9568);function isBlockScoped(e){return(0,n.isFunctionDeclaration)(e)||(0,n.isClassDeclaration)(e)||(0,s.default)(e)}},7667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isImmutable;var n=r(9338);var s=r(9648);function isImmutable(e){if((0,n.default)(e.type,"Immutable"))return true;if((0,s.isIdentifier)(e)){if(e.name==="undefined"){return true}else{return false}}return false}},9568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isLet;var n=r(9648);var s=r(9071);function isLet(e){return(0,n.isVariableDeclaration)(e)&&(e.kind!=="var"||e[s.BLOCK_SCOPED_SYMBOL])}},9598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isNode;var n=r(6107);function isNode(e){return!!(e&&n.VISITOR_KEYS[e.type])}},4251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isNodesEquivalent;var n=r(6107);function isNodesEquivalent(e,t){if(typeof e!=="object"||typeof t!=="object"||e==null||t==null){return e===t}if(e.type!==t.type){return false}const r=Object.keys(n.NODE_FIELDS[e.type]||e.type);const s=n.VISITOR_KEYS[e.type];for(const n of r){if(typeof e[n]!==typeof t[n]){return false}if(e[n]==null&&t[n]==null){continue}else if(e[n]==null||t[n]==null){return false}if(Array.isArray(e[n])){if(!Array.isArray(t[n])){return false}if(e[n].length!==t[n].length){return false}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isPlaceholderType;var n=r(6107);function isPlaceholderType(e,t){if(e===t)return true;const r=n.PLACEHOLDERS_ALIAS[e];if(r){for(const e of r){if(t===e)return true}}return false}},1536:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isReferenced;function isReferenced(e,t,r){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":if(t.property===e){return!!t.computed}return t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return false;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":if(t.key===e){return!!t.computed}return false;case"ObjectProperty":if(t.key===e){return!!t.computed}return!r||r.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":if(t.key===e){return!!t.computed}return true;case"ClassPrivateProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"LabeledStatement":return false;case"CatchClause":return false;case"RestElement":return false;case"BreakStatement":case"ContinueStatement":return false;case"FunctionDeclaration":case"FunctionExpression":return false;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return false;case"ExportSpecifier":if(r!=null&&r.source){return false}return t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ImportAttribute":return false;case"JSXAttribute":return false;case"ObjectPattern":case"ArrayPattern":return false;case"MetaProperty":return false;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":if(t.key===e){return!!t.computed}return true}return true}},8559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isScope;var n=r(9648);function isScope(e,t){if((0,n.isBlockStatement)(e)&&((0,n.isFunction)(t)||(0,n.isCatchClause)(t))){return false}if((0,n.isPattern)(e)&&((0,n.isFunction)(t)||(0,n.isCatchClause)(t))){return true}return(0,n.isScopable)(e)}},9762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isSpecifierDefault;var n=r(9648);function isSpecifierDefault(e){return(0,n.isImportDefaultSpecifier)(e)||(0,n.isIdentifier)(e.imported||e.exported,{name:"default"})}},9338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isType;var n=r(6107);function isType(e,t){if(e===t)return true;if(n.ALIAS_KEYS[t])return false;const r=n.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return true;for(const t of r){if(e===t)return true}}return false}},9014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isValidES3Identifier;var n=r(963);const s=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function isValidES3Identifier(e){return(0,n.default)(e)&&!s.has(e)}},963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isValidIdentifier;var n=r(8162);function isValidIdentifier(e,t=true){if(typeof e!=="string")return false;if(t){if((0,n.isKeyword)(e)||(0,n.isStrictReservedWord)(e,true)){return false}}return(0,n.isIdentifierName)(e)}},5886:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isVar;var n=r(9648);var s=r(9071);function isVar(e){return(0,n.isVariableDeclaration)(e,{kind:"var"})&&!e[s.BLOCK_SCOPED_SYMBOL]}},3986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=matchesPattern;var n=r(9648);function matchesPattern(e,t,r){if(!(0,n.isMemberExpression)(e))return false;const s=Array.isArray(t)?t:t.split(".");const i=[];let a;for(a=e;(0,n.isMemberExpression)(a);a=a.object){i.push(a.property)}i.push(a);if(i.lengths.length)return false;for(let e=0,t=i.length-1;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isCompatTag;function isCompatTag(e){return!!e&&/^[a-z]/.test(e)}},6558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=r(1093);const s=(0,n.default)("React.Component");var i=s;t["default"]=i},5525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=validate;t.validateChild=validateChild;t.validateField=validateField;var n=r(6107);function validate(e,t,r){if(!e)return;const s=n.NODE_FIELDS[e.type];if(!s)return;const i=s[t];validateField(e,t,r,i);validateChild(e,t,r)}function validateField(e,t,r,n){if(!(n!=null&&n.validate))return;if(n.optional&&r==null)return;n.validate(e,t,r)}function validateChild(e,t,r){if(r==null)return;const s=n.NODE_PARENT_VALIDATIONS[r.type];if(!s)return;s(e,t,r)}},5328:function(e,t,r){(function(e,n){true?n(t,r(7168),r(1773),r(4614)):0})(this,(function(e,t,r,n){"use strict";const s=0;const i=1;const a=2;const o=3;const l=4;const c=-1;e.addSegment=void 0;e.addMapping=void 0;e.maybeAddSegment=void 0;e.maybeAddMapping=void 0;e.setSourceContent=void 0;e.toDecodedMap=void 0;e.toEncodedMap=void 0;e.fromMap=void 0;e.allMappings=void 0;let u;class GenMapping{constructor({file:e,sourceRoot:r}={}){this._names=new t.SetArray;this._sources=new t.SetArray;this._sourcesContent=[];this._mappings=[];this.file=e;this.sourceRoot=r}}(()=>{e.addSegment=(e,t,r,n,s,i,a,o)=>u(false,e,t,r,n,s,i,a,o);e.maybeAddSegment=(e,t,r,n,s,i,a,o)=>u(true,e,t,r,n,s,i,a,o);e.addMapping=(e,t)=>addMappingInternal(false,e,t);e.maybeAddMapping=(e,t)=>addMappingInternal(true,e,t);e.setSourceContent=(e,r,n)=>{const{_sources:s,_sourcesContent:i}=e;i[t.put(s,r)]=n};e.toDecodedMap=e=>{const{file:t,sourceRoot:r,_mappings:n,_sources:s,_sourcesContent:i,_names:a}=e;removeEmptyFinalLines(n);return{version:3,file:t||undefined,names:a.array,sourceRoot:r||undefined,sources:s.array,sourcesContent:i,mappings:n}};e.toEncodedMap=t=>{const n=e.toDecodedMap(t);return Object.assign(Object.assign({},n),{mappings:r.encode(n.mappings)})};e.allMappings=e=>{const t=[];const{_mappings:r,_sources:n,_names:c}=e;for(let e=0;e{const t=new n.TraceMap(e);const r=new GenMapping({file:t.file,sourceRoot:t.sourceRoot});putAll(r._names,t.names);putAll(r._sources,t.sources);r._sourcesContent=t.sourcesContent||t.sources.map((()=>null));r._mappings=n.decodedMappings(t);return r};u=(e,r,n,s,i,a,o,l,u)=>{const{_mappings:p,_sources:f,_sourcesContent:d,_names:h}=r;const m=getLine(p,n);const y=getColumnIndex(m,s);if(!i){if(e&&skipSourceless(m,y))return;return insert(m,y,[s])}const g=t.put(f,i);const b=l?t.put(h,l):c;if(g===d.length)d[g]=u!==null&&u!==void 0?u:null;if(e&&skipSource(m,y,g,a,o,b)){return}return insert(m,y,l?[s,g,a,o,b]:[s,g,a,o])}})();function getLine(e,t){for(let r=e.length;r<=t;r++){e[r]=[]}return e[t]}function getColumnIndex(e,t){let r=e.length;for(let n=r-1;n>=0;r=n--){const r=e[n];if(t>=r[s])break}return r}function insert(e,t,r){for(let r=e.length;r>t;r--){e[r]=e[r-1]}e[t]=r}function removeEmptyFinalLines(e){const{length:t}=e;let r=t;for(let t=r-1;t>=0;r=t,t--){if(e[t].length>0)break}if(rs)s=i}normalizePath(r,s);const i=r.query+r.hash;switch(s){case n.Hash:case n.Query:return i;case n.RelativePath:{const n=r.path.slice(1);if(!n)return i||".";if(isRelative(t||e)&&!isRelative(n)){return"./"+n+i}return n+i}case n.AbsolutePath:return r.path+i;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+i}}return resolve}))},7168:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";e.get=void 0;e.put=void 0;e.pop=void 0;class SetArray{constructor(){this._indexes={__proto__:null};this.array=[]}}(()=>{e.get=(e,t)=>e._indexes[t];e.put=(t,r)=>{const n=e.get(t,r);if(n!==undefined)return n;const{array:s,_indexes:i}=t;return i[r]=s.push(r)-1};e.pop=e=>{const{array:t,_indexes:r}=e;if(t.length===0)return;const n=t.pop();r[n]=undefined}})();e.SetArray=SetArray;Object.defineProperty(e,"__esModule",{value:true})}))},1773:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";const t=",".charCodeAt(0);const r=";".charCodeAt(0);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const s=new Uint8Array(64);const i=new Uint8Array(128);for(let e=0;e>>=1;if(l){s=-2147483648|-s}r[n]+=s;return t}function hasMoreSegments(e,n){if(n>=e.length)return false;const s=e.charCodeAt(n);if(s===t||s===r)return false;return true}function sort(e){e.sort(sortComparator)}function sortComparator(e,t){return e[0]-t[0]}function encode(e){const n=new Int32Array(5);let s=new Uint8Array(1024);let i=0;for(let a=0;a0){s=reserve(s,i,1);s[i++]=r}if(o.length===0)continue;n[0]=0;for(let e=0;e0)s[i++]=t;i=encodeInteger(s,i,n,r,0);if(r.length===1)continue;i=encodeInteger(s,i,n,r,1);i=encodeInteger(s,i,n,r,2);i=encodeInteger(s,i,n,r,3);if(r.length===4)continue;i=encodeInteger(s,i,n,r,4)}}return a.decode(s.subarray(0,i))}function reserve(e,t,r){if(e.length>t+r)return e;const n=new Uint8Array(e.length*2);n.set(e);return n}function encodeInteger(e,t,r,n,i){const a=n[i];let o=a-r[i];r[i]=a;o=o<0?-o<<1|1:o<<1;do{let r=o&31;o>>>=5;if(o>0)r|=32;e[t++]=s[r]}while(o>0);return t}e.decode=decode;e.encode=encode;Object.defineProperty(e,"__esModule",{value:true})}))},1575:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";const t=",".charCodeAt(0);const r=";".charCodeAt(0);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const s=new Uint8Array(64);const i=new Uint8Array(128);for(let e=0;e>>=1;if(l){s=-2147483648|-s}r[n]+=s;return t}function hasMoreVlq(e,r,n){if(r>=n)return false;return e.charCodeAt(r)!==t}function sort(e){e.sort(sortComparator)}function sortComparator(e,t){return e[0]-t[0]}function encode(e){const n=new Int32Array(5);const s=1024*16;const i=s-36;const o=new Uint8Array(s);const l=o.subarray(0,i);let c=0;let u="";for(let p=0;p0){if(c===s){u+=a.decode(o);c=0}o[c++]=r}if(f.length===0)continue;n[0]=0;for(let e=0;ei){u+=a.decode(l);o.copyWithin(0,i,c);c-=i}if(e>0)o[c++]=t;c=encodeInteger(o,c,n,r,0);if(r.length===1)continue;c=encodeInteger(o,c,n,r,1);c=encodeInteger(o,c,n,r,2);c=encodeInteger(o,c,n,r,3);if(r.length===4)continue;c=encodeInteger(o,c,n,r,4)}}return u+a.decode(o.subarray(0,c))}function encodeInteger(e,t,r,n,i){const a=n[i];let o=a-r[i];r[i]=a;o=o<0?-o<<1|1:o<<1;do{let r=o&31;o>>>=5;if(o>0)r|=32;e[t++]=s[r]}while(o>0);return t}e.decode=decode;e.encode=encode;Object.defineProperty(e,"__esModule",{value:true})}))},4614:function(e,t,r){(function(e,n){true?n(t,r(1575),r(6982)):0})(this,(function(e,t,r){"use strict";function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var n=_interopDefaultLegacy(r);function resolve(e,t){if(t&&!t.endsWith("/"))t+="/";return n["default"](e,t)}function stripFilename(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}const s=0;const i=1;const a=2;const o=3;const l=4;const c=1;const u=2;function maybeSort(e,t){const r=nextUnsortedSegmentLine(e,0);if(r===e.length)return e;if(!t)e=e.slice();for(let n=r;n>1);const a=e[i][s]-t;if(a===0){p=true;return i}if(a<0){r=i+1}else{n=i-1}}p=false;return r-1}function upperBound(e,t,r){for(let n=r+1;n=0;r=n--){if(e[n][s]!==t)break}return r}function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function memoizedBinarySearch(e,t,r,n){const{lastKey:i,lastNeedle:a,lastIndex:o}=r;let l=0;let c=e.length-1;if(n===i){if(t===a){p=o!==-1&&e[o][s]===t;return o}if(t>=a){l=o===-1?0:o}else{c=o}}r.lastKey=n;r.lastNeedle=t;return r.lastIndex=binarySearch(e,t,l,c)}function buildBySources(e,t){const r=t.map(buildNullArray);for(let n=0;nt;r--){e[r]=e[r-1]}e[t]=r}function buildNullArray(){return{__proto__:null}}const AnyMap=function(t,r){const n=typeof t==="string"?JSON.parse(t):t;if(!("sections"in n))return new TraceMap(n,r);const s=[];const i=[];const a=[];const o=[];recurse(n,r,s,i,a,o,0,0,Infinity,Infinity);const l={version:3,file:n.file,names:o,sources:i,sourcesContent:a,mappings:s};return e.presortedDecodedMap(l)};function recurse(e,t,r,n,s,i,a,o,l,c){const{sections:u}=e;for(let e=0;eh)return;const r=getLine(n,t);const c=e===0?d:0;const u=T[e];for(let e=0;e=m)return;if(n.length===1){r.push([p]);continue}const f=g+n[i];const d=n[a];const y=n[o];r.push(n.length===4?[p,f,d,y]:[p,f,d,y,b+n[l]])}}}function append(e,t){for(let r=0;rresolve(e||"",u)));const{mappings:p}=n;if(typeof p==="string"){this._encoded=p;this._decoded=undefined}else{this._encoded=undefined;this._decoded=maybeSort(p,r)}this._decodedMemo=memoizedState();this._bySources=undefined;this._bySourceMemos=undefined}}(()=>{e.encodedMappings=e=>{var r;return(r=e._encoded)!==null&&r!==void 0?r:e._encoded=t.encode(e._decoded)};e.decodedMappings=e=>e._decoded||(e._decoded=t.decode(e._encoded));e.traceSegment=(t,r,n)=>{const s=e.decodedMappings(t);if(r>=s.length)return null;const i=s[r];const a=traceSegmentInternal(i,t._decodedMemo,r,n,m);return a===-1?null:i[a]};e.originalPositionFor=(t,{line:r,column:n,bias:s})=>{r--;if(r<0)throw new Error(f);if(n<0)throw new Error(d);const c=e.decodedMappings(t);if(r>=c.length)return OMapping(null,null,null,null);const u=c[r];const p=traceSegmentInternal(u,t._decodedMemo,r,n,s||m);if(p===-1)return OMapping(null,null,null,null);const h=u[p];if(h.length===1)return OMapping(null,null,null,null);const{names:y,resolvedSources:g}=t;return OMapping(g[h[i]],h[a]+1,h[o],h.length===5?y[h[l]]:null)};e.allGeneratedPositionsFor=(e,{source:t,line:r,column:n,bias:s})=>generatedPosition(e,t,r,n,s||h,true);e.generatedPositionFor=(e,{source:t,line:r,column:n,bias:s})=>generatedPosition(e,t,r,n,s||m,false);e.eachMapping=(t,r)=>{const n=e.decodedMappings(t);const{names:s,resolvedSources:i}=t;for(let e=0;e{const{sources:r,resolvedSources:n,sourcesContent:s}=e;if(s==null)return null;let i=r.indexOf(t);if(i===-1)i=n.indexOf(t);return i===-1?null:s[i]};e.presortedDecodedMap=(e,t)=>{const r=new TraceMap(clone(e,[]),t);r._decoded=e.mappings;return r};e.decodedMap=t=>clone(t,e.decodedMappings(t));e.encodedMap=t=>clone(t,e.encodedMappings(t));function generatedPosition(t,r,n,s,i,a){n--;if(n<0)throw new Error(f);if(s<0)throw new Error(d);const{sources:o,resolvedSources:l}=t;let p=o.indexOf(r);if(p===-1)p=l.indexOf(r);if(p===-1)return a?[]:GMapping(null,null);const h=t._bySources||(t._bySources=buildBySources(e.decodedMappings(t),t._bySourceMemos=o.map(memoizedState)));const m=h[p][n];if(m==null)return a?[]:GMapping(null,null);const y=t._bySourceMemos[p];if(a)return sliceGeneratedPositions(m,y,n,s,i);const g=traceSegmentInternal(m,y,n,s,i);if(g===-1)return GMapping(null,null);const b=m[g];return GMapping(b[c]+1,b[u])}})();function clone(e,t){return{version:e.version,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t}}function OMapping(e,t,r,n){return{source:e,line:t,column:r,name:n}}function GMapping(e,t){return{line:e,column:t}}function traceSegmentInternal(e,t,r,n,s){let i=memoizedBinarySearch(e,n,t,r);if(p){i=(s===h?upperBound:lowerBound)(e,n,i)}else if(s===h)i++;if(i===-1||i===e.length)return-1;return i}function sliceGeneratedPositions(e,t,r,n,i){let a=traceSegmentInternal(e,t,r,n,m);if(!p&&i===h)a++;if(a===-1||a===e.length)return[];const o=p?n:e[a][s];if(!p)a=lowerBound(e,o,a);const l=upperBound(e,o,a);const f=[];for(;a<=l;a++){const t=e[a];f.push(GMapping(t[c]+1,t[u]))}return f}e.AnyMap=AnyMap;e.GREATEST_LOWER_BOUND=m;e.LEAST_UPPER_BOUND=h;e.TraceMap=TraceMap;Object.defineProperty(e,"__esModule",{value:true})}))},645:(e,t,r)=>{"use strict";var n=r(7147);var s=r(1017);var i=r(291);Object.defineProperty(t,"commentRegex",{get:function getCommentRegex(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}});Object.defineProperty(t,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}});function decodeBase64(e){return i.Buffer.from(e,"base64").toString()}function stripComment(e){return e.split(",").pop()}function readFromFileMap(e,r){var i=t.mapFileCommentRegex.exec(e);var a=i[1]||i[2];var o=s.resolve(r,a);try{return n.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}function Converter(e,t){t=t||{};if(t.isFileComment)e=readFromFileMap(e,t.commentFileDir);if(t.hasComment)e=stripComment(e);if(t.isEncoded)e=decodeBase64(e);if(t.isJSON||t.isEncoded)e=JSON.parse(e);this.sourcemap=e}Converter.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)};Converter.prototype.toBase64=function(){var e=this.toJSON();return i.Buffer.from(e,"utf8").toString("base64")};Converter.prototype.toComment=function(e){var t=this.toBase64();var r="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)};Converter.prototype.setProperty=function(e,t){this.sourcemap[e]=t;return this};Converter.prototype.getProperty=function(e){return this.sourcemap[e]};t.fromObject=function(e){return new Converter(e)};t.fromJSON=function(e){return new Converter(e,{isJSON:true})};t.fromBase64=function(e){return new Converter(e,{isEncoded:true})};t.fromComment=function(e){e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(e,{isEncoded:true,hasComment:true})};t.fromMapFileComment=function(e,t){return new Converter(e,{commentFileDir:t,isFileComment:true,isJSON:true})};t.fromSource=function(e){var r=e.match(t.commentRegex);return r?t.fromComment(r.pop()):null};t.fromMapFileSource=function(e,r){var n=e.match(t.mapFileCommentRegex);return n?t.fromMapFileComment(n.pop(),r):null};t.removeComments=function(e){return e.replace(t.commentRegex,"")};t.removeMapFileComments=function(e){return e.replace(t.mapFileCommentRegex,"")};t.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}},6433:e=>{"use strict";const t=Symbol.for("gensync:v1:start");const r=Symbol.for("gensync:v1:suspend");const n="GENSYNC_EXPECTED_START";const s="GENSYNC_EXPECTED_SUSPEND";const i="GENSYNC_OPTIONS_ERROR";const a="GENSYNC_RACE_NONEMPTY";const o="GENSYNC_ERRBACK_NO_CALLBACK";e.exports=Object.assign((function gensync(e){let t=e;if(typeof e!=="function"){t=newGenerator(e)}else{t=wrapGenerator(e)}return Object.assign(t,makeFunctionAPI(t))}),{all:buildOperation({name:"all",arity:1,sync:function(e){const t=Array.from(e[0]);return t.map((e=>evaluateSync(e)))},async:function(e,t,r){const n=Array.from(e[0]);if(n.length===0){Promise.resolve().then((()=>t([])));return}let s=0;const i=n.map((()=>undefined));n.forEach(((e,n)=>{evaluateAsync(e,(e=>{i[n]=e;s+=1;if(s===i.length)t(i)}),r)}))}}),race:buildOperation({name:"race",arity:1,sync:function(e){const t=Array.from(e[0]);if(t.length===0){throw makeError("Must race at least 1 item",a)}return evaluateSync(t[0])},async:function(e,t,r){const n=Array.from(e[0]);if(n.length===0){throw makeError("Must race at least 1 item",a)}for(const e of n){evaluateAsync(e,t,r)}}})});function makeFunctionAPI(e){const t={sync:function(...t){return evaluateSync(e.apply(this,t))},async:function(...t){return new Promise(((r,n)=>{evaluateAsync(e.apply(this,t),r,n)}))},errback:function(...t){const r=t.pop();if(typeof r!=="function"){throw makeError("Asynchronous function called without callback",o)}let n;try{n=e.apply(this,t)}catch(e){r(e);return}evaluateAsync(n,(e=>r(undefined,e)),(e=>r(e)))}};return t}function assertTypeof(e,t,r,n){if(typeof r===e||n&&typeof r==="undefined"){return}let s;if(n){s=`Expected opts.${t} to be either a ${e}, or undefined.`}else{s=`Expected opts.${t} to be a ${e}.`}throw makeError(s,i)}function makeError(e,t){return Object.assign(new Error(e),{code:t})}function newGenerator({name:e,arity:t,sync:r,async:n,errback:s}){assertTypeof("string","name",e,true);assertTypeof("number","arity",t,true);assertTypeof("function","sync",r);assertTypeof("function","async",n,true);assertTypeof("function","errback",s,true);if(n&&s){throw makeError("Expected one of either opts.async or opts.errback, but got _both_.",i)}if(typeof e!=="string"){let t;if(s&&s.name&&s.name!=="errback"){t=s.name}if(n&&n.name&&n.name!=="async"){t=n.name.replace(/Async$/,"")}if(r&&r.name&&r.name!=="sync"){t=r.name.replace(/Sync$/,"")}if(typeof t==="string"){e=t}}if(typeof t!=="number"){t=r.length}return buildOperation({name:e,arity:t,sync:function(e){return r.apply(this,e)},async:function(e,t,i){if(n){n.apply(this,e).then(t,i)}else if(s){s.call(this,...e,((e,r)=>{if(e==null)t(r);else i(e)}))}else{t(r.apply(this,e))}}})}function wrapGenerator(e){return setFunctionMetadata(e.name,e.length,(function(...t){return e.apply(this,t)}))}function buildOperation({name:e,arity:n,sync:s,async:i}){return setFunctionMetadata(e,n,(function*(...e){const n=yield t;if(!n){const t=s.call(this,e);return t}let a;try{i.call(this,e,(e=>{if(a)return;a={value:e};n()}),(e=>{if(a)return;a={err:e};n()}))}catch(e){a={err:e};n()}yield r;if(a.hasOwnProperty("err")){throw a.err}return a.value}))}function evaluateSync(e){let t;while(!({value:t}=e.next()).done){assertStart(t,e)}return t}function evaluateAsync(e,t,r){(function step(){try{let r;while(!({value:r}=e.next()).done){assertStart(r,e);let t=true;let n=false;const s=e.next((()=>{if(t){n=true}else{step()}}));t=false;assertSuspend(s,e);if(!n){return}}return t(r)}catch(e){return r(e)}})()}function assertStart(e,r){if(e===t)return;throwError(r,makeError(`Got unexpected yielded value in gensync generator: ${JSON.stringify(e)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,n))}function assertSuspend({value:e,done:t},n){if(!t&&e===r)return;throwError(n,makeError(t?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(e)}. If you get this, it is probably a gensync bug.`,s))}function throwError(e,t){if(e.throw)e.throw(t);throw t}function isIterable(e){return!!e&&(typeof e==="object"||typeof e==="function")&&!e[Symbol.iterator]}function setFunctionMetadata(e,t,r){if(typeof e==="string"){const t=Object.getOwnPropertyDescriptor(r,"name");if(!t||t.configurable){Object.defineProperty(r,"name",Object.assign(t||{},{configurable:true,value:e}))}}if(typeof t==="number"){const e=Object.getOwnPropertyDescriptor(r,"length");if(!e||e.configurable){Object.defineProperty(r,"length",Object.assign(e||{},{configurable:true,value:t}))}}return r}},6929:(e,t,r)=>{"use strict";e.exports=r(3676)},8874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;t.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:undefined};if(e[1])t.type="string",t.closed=!!(e[3]||e[4]);else if(e[5])t.type="comment";else if(e[6])t.type="comment",t.closed=!!e[7];else if(e[8])t.type="regex";else if(e[9])t.type="number";else if(e[10])t.type="name";else if(e[11])t.type="punctuator";else if(e[12])t.type="whitespace";return t}},4011:e=>{"use strict";const t={};const r=t.hasOwnProperty;const forOwn=(e,t)=>{for(const n in e){if(r.call(e,n)){t(n,e[n])}}};const extend=(e,t)=>{if(!t){return e}forOwn(t,((t,r)=>{e[t]=r}));return e};const forEach=(e,t)=>{const r=e.length;let n=-1;while(++nn.call(e)=="[object Object]";const isString=e=>typeof e=="string"||n.call(e)=="[object String]";const isNumber=e=>typeof e=="number"||n.call(e)=="[object Number]";const isFunction=e=>typeof e=="function";const isMap=e=>n.call(e)=="[object Map]";const isSet=e=>n.call(e)=="[object Set]";const a={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};const o=/["'\\\b\f\n\r\t]/;const l=/[0-9]/;const c=/[ !#-&\(-\[\]-_a-~]/;const jsesc=(e,t)=>{const increaseIndentation=()=>{h=d;++t.indentLevel;d=t.indent.repeat(t.indentLevel)};const r={escapeEverything:false,minimal:false,isScriptContext:false,quotes:"single",wrap:false,es6:false,json:false,compact:true,lowercaseHex:false,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:false,__inline2__:false};const n=t&&t.json;if(n){r.quotes="double";r.wrap=true}t=extend(r,t);if(t.quotes!="single"&&t.quotes!="double"&&t.quotes!="backtick"){t.quotes="single"}const u=t.quotes=="double"?'"':t.quotes=="backtick"?"`":"'";const p=t.compact;const f=t.lowercaseHex;let d=t.indent.repeat(t.indentLevel);let h="";const m=t.__inline1__;const y=t.__inline2__;const g=p?"":"\n";let b;let T=true;const S=t.numbers=="binary";const E=t.numbers=="octal";const x=t.numbers=="decimal";const P=t.numbers=="hexadecimal";if(n&&e&&isFunction(e.toJSON)){e=e.toJSON()}if(!isString(e)){if(isMap(e)){if(e.size==0){return"new Map()"}if(!p){t.__inline1__=true;t.__inline2__=false}return"new Map("+jsesc(Array.from(e),t)+")"}if(isSet(e)){if(e.size==0){return"new Set()"}return"new Set("+jsesc(Array.from(e),t)+")"}if(i(e)){if(e.length==0){return"Buffer.from([])"}return"Buffer.from("+jsesc(Array.from(e),t)+")"}if(s(e)){b=[];t.wrap=true;if(m){t.__inline1__=false;t.__inline2__=true}if(!y){increaseIndentation()}forEach(e,(e=>{T=false;if(y){t.__inline2__=false}b.push((p||y?"":d)+jsesc(e,t))}));if(T){return"[]"}if(y){return"["+b.join(", ")+"]"}return"["+g+b.join(","+g)+g+(p?"":h)+"]"}else if(isNumber(e)){if(n){return JSON.stringify(e)}if(x){return String(e)}if(P){let t=e.toString(16);if(!f){t=t.toUpperCase()}return"0x"+t}if(S){return"0b"+e.toString(2)}if(E){return"0o"+e.toString(8)}}else if(!isObject(e)){if(n){return JSON.stringify(e)||"null"}return String(e)}else{b=[];t.wrap=true;increaseIndentation();forOwn(e,((e,r)=>{T=false;b.push((p?"":d)+jsesc(e,t)+":"+(p?"":" ")+jsesc(r,t))}));if(T){return"{}"}return"{"+g+b.join(","+g)+g+(p?"":h)+"}"}}const v=e;let A=-1;const w=v.length;b="";while(++A=55296&&e<=56319&&w>A+1){const t=v.charCodeAt(A+1);if(t>=56320&&t<=57343){const r=(e-55296)*1024+t-56320+65536;let n=r.toString(16);if(!f){n=n.toUpperCase()}b+="\\u{"+n+"}";++A;continue}}}if(!t.escapeEverything){if(c.test(e)){b+=e;continue}if(e=='"'){b+=u==e?'\\"':e;continue}if(e=="`"){b+=u==e?"\\`":e;continue}if(e=="'"){b+=u==e?"\\'":e;continue}}if(e=="\0"&&!n&&!l.test(v.charAt(A+1))){b+="\\0";continue}if(o.test(e)){b+=a[e];continue}const r=e.charCodeAt(0);if(t.minimal&&r!=8232&&r!=8233){b+=e;continue}let s=r.toString(16);if(!f){s=s.toUpperCase()}const i=s.length>2||n;const p="\\"+(i?"u":"x")+("0000"+s).slice(i?-4:-2);b+=p;continue}if(t.wrap){b=u+b+u}if(u=="`"){b=b.replace(/\$\{/g,"\\${")}if(t.isScriptContext){return b.replace(/<\/(script|style)/gi,"<\\/$1").replace(/