@mongodb-js/compass-web 0.36.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/106.e50960c29b57a8b92ec5.mjs +2 -0
  2. package/dist/{20.f2c2353886886939e128.mjs.LICENSE.txt → 106.e50960c29b57a8b92ec5.mjs.LICENSE.txt} +6 -0
  3. package/dist/128.2ec06394c7c1718c925f.mjs +1 -0
  4. package/dist/14.ee5055b184ec8814d6f7.mjs +2 -0
  5. package/dist/{938.e127bbcdd0ce0eab8722.mjs.LICENSE.txt → 14.ee5055b184ec8814d6f7.mjs.LICENSE.txt} +5 -17
  6. package/dist/260.52fdf61d69ac2a2921dc.mjs +2 -0
  7. package/dist/260.52fdf61d69ac2a2921dc.mjs.LICENSE.txt +13 -0
  8. package/dist/302.34205d8fa79ef45d79b5.mjs +1 -0
  9. package/dist/318.ca5407b8a126de079455.mjs +2 -0
  10. package/dist/318.ca5407b8a126de079455.mjs.LICENSE.txt +34 -0
  11. package/dist/560.e85e11aa098b341006f3.mjs +23 -0
  12. package/dist/568.5af0b00ce345e98d8b78.mjs +1 -0
  13. package/dist/714.fde8d188a97cdddc2703.mjs +344 -0
  14. package/dist/717.e27dd37bf389fe1e1fe3.mjs +1 -0
  15. package/dist/810.c52538ab1ee7a0892ac8.mjs +2 -0
  16. package/dist/{832.a6fb147f7fd965a7f30c.mjs.LICENSE.txt → 810.c52538ab1ee7a0892ac8.mjs.LICENSE.txt} +0 -7
  17. package/dist/assets-manifest.json +13 -11
  18. package/dist/compass-web.d.ts +8 -291
  19. package/dist/compass-web.mjs +20 -48
  20. package/dist/index-0b9a48a6.e104f028edf21b1c2537.mjs +29 -0
  21. package/dist/index-bde52cb3.96252163ac8fa874fc4c.mjs +1 -0
  22. package/package.json +40 -40
  23. package/dist/149.abccc0e903c0f5ea7354.mjs +0 -372
  24. package/dist/20.f2c2353886886939e128.mjs +0 -2
  25. package/dist/207.d69541eff41412663f35.mjs +0 -2
  26. package/dist/207.d69541eff41412663f35.mjs.LICENSE.txt +0 -8
  27. package/dist/563.mjs +0 -1
  28. package/dist/566.513352a4be9e2a46530b.mjs +0 -23
  29. package/dist/68.f1ca0ed16b5fa27e2cf1.mjs +0 -1
  30. package/dist/69.mjs +0 -1
  31. package/dist/724.8aae14d079e334751961.mjs +0 -8
  32. package/dist/724.8aae14d079e334751961.mjs.LICENSE.txt +0 -5
  33. package/dist/737.mjs +0 -1
  34. package/dist/745.mjs +0 -1
  35. package/dist/832.a6fb147f7fd965a7f30c.mjs +0 -2
  36. package/dist/938.e127bbcdd0ce0eab8722.mjs +0 -2
  37. package/dist/965.3c1bdf715c3551cfe1ba.mjs +0 -1
  38. package/dist/995.c3bb8ac49cdffa0211da.mjs +0 -2
  39. package/dist/995.c3bb8ac49cdffa0211da.mjs.LICENSE.txt +0 -11
  40. package/dist/index-bde52cb3.a964d5743a224d2efb82.mjs +0 -1
  41. /package/dist/{566.513352a4be9e2a46530b.mjs.LICENSE.txt → 560.e85e11aa098b341006f3.mjs.LICENSE.txt} +0 -0
  42. /package/dist/{149.abccc0e903c0f5ea7354.mjs.LICENSE.txt → 714.fde8d188a97cdddc2703.mjs.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 832.a6fb147f7fd965a7f30c.mjs.LICENSE.txt */
2
- export const __webpack_esm_id__=832;export const __webpack_esm_ids__=[832];export const __webpack_esm_modules__={249:function(e,t,r){var n;!function(e,t,r){var n,i=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,u=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},c=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of a(t))p.call(e,i)||i===r||s(e,i,{get:()=>t[i],enumerable:!(n=o(t,i))||n.enumerable});return e},h=(e,t,r)=>(r=null!=e?i(l(e)):{},c(!t&&e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)),d=u({"umd:@jridgewell/sourcemap-codec"(e,r){r.exports=t}}),f=u({"umd:@jridgewell/trace-mapping"(e,t){t.exports=r}}),m={};((e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})})(m,{GenMapping:()=>I,addMapping:()=>_,addSegment:()=>C,allMappings:()=>R,fromMap:()=>B,maybeAddMapping:()=>k,maybeAddSegment:()=>N,setIgnore:()=>M,setSourceContent:()=>O,toDecodedMap:()=>L,toEncodedMap:()=>D}),e.exports=(n=m,c(s({},"__esModule",{value:!0}),n));var y=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function g(e,t){return e._indexes[t]}function T(e,t){const r=g(e,t);if(void 0!==r)return r;const{array:n,_indexes:i}=e,s=n.push(t);return i[t]=s-1}var v=h(d()),b=h(f()),S=0,x=1,E=2,w=3,A=4,P=-1,I=class{constructor({file:e,sourceRoot:t}={}){this._names=new y,this._sources=new y,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new y}};function C(e,t,r,n,i,s,o,a){return j(!1,e,t,r,n,i,s,o,a)}function _(e,t){return q(!1,e,t)}var N=(e,t,r,n,i,s,o,a)=>j(!0,e,t,r,n,i,s,o,a),k=(e,t)=>q(!0,e,t);function O(e,t,r){const{_sources:n,_sourcesContent:i}=e;i[T(n,t)]=r}function M(e,t,r=!0){const{_sources:n,_sourcesContent:i,_ignoreList:s}=e,o=T(n,t);o===i.length&&(i[o]=null),r?T(s,o):function(e,t){const r=g(e,t);if(void 0===r)return;const{array:n,_indexes:i}=e;for(let e=r+1;e<n.length;e++){const t=n[e];n[e-1]=t,i[t]--}i[t]=void 0,n.pop()}(s,o)}function L(e){const{_mappings:t,_sources:r,_sourcesContent:n,_names:i,_ignoreList:s}=e;return function(e){const{length:t}=e;let r=t;for(let t=r-1;t>=0&&!(e[t].length>0);r=t,t--);r<t&&(e.length=r)}(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:r.array,sourcesContent:n,mappings:t,ignoreList:s.array}}function D(e){const t=L(e);return Object.assign({},t,{mappings:(0,v.encode)(t.mappings)})}function B(e){const t=new b.TraceMap(e),r=new I({file:t.file,sourceRoot:t.sourceRoot});return U(r._names,t.names),U(r._sources,t.sources),r._sourcesContent=t.sourcesContent||t.sources.map((()=>null)),r._mappings=(0,b.decodedMappings)(t),t.ignoreList&&U(r._ignoreList,t.ignoreList),r}function R(e){const t=[],{_mappings:r,_sources:n,_names:i}=e;for(let e=0;e<r.length;e++){const s=r[e];for(let r=0;r<s.length;r++){const o=s[r],a={line:e+1,column:o[S]};let l,p,u;1!==o.length&&(l=n.array[o[x]],p={line:o[E]+1,column:o[w]},5===o.length&&(u=i.array[o[A]])),t.push({generated:a,source:l,original:p,name:u})}}return t}function j(e,t,r,n,i,s,o,a,l){const{_mappings:p,_sources:u,_sourcesContent:c,_names:h}=t,d=function(e,t){for(let r=e.length;r<=t;r++)e[r]=[];return e[t]}(p,r),f=function(e,t){let r=e.length;for(let n=r-1;n>=0&&!(t>=e[n][S]);r=n--);return r}(d,n);if(!i){if(e&&function(e,t){return 0===t||1===e[t-1].length}(d,f))return;return F(d,f,[n])}const m=T(u,i),y=a?T(h,a):P;if(m===c.length&&(c[m]=null!=l?l:null),!e||!function(e,t,r,n,i,s){if(0===t)return!1;const o=e[t-1];return 1!==o.length&&r===o[x]&&n===o[E]&&i===o[w]&&s===(5===o.length?o[A]:P)}(d,f,m,s,o,y))return F(d,f,a?[n,m,s,o,y]:[n,m,s,o])}function F(e,t,r){for(let r=e.length;r>t;r--)e[r]=e[r-1];e[t]=r}function U(e,t){for(let r=0;r<t.length;r++)T(e,t[r])}function q(e,t,r){const{generated:n,source:i,original:s,name:o,content:a}=r;return i?j(e,t,n.line-1,n.column,i,s.line-1,s.column,o,a):j(e,t,n.line-1,n.column,null,null,null,null,null)}}(e=r.nmd(e),r(31997),r(5981)),e.exports="default"in(n=e).exports?n.exports.default:n.exports},372:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=r(27348);if("function"!=typeof s.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return s.randomBytes(e)}}catch(e){}},470:(e,t,r)=>{var n=r(81367).DecisionState,i=r(7842).Ij,s=r(66346).Hash;function o(e,t){if(null===e){var r={state:null,alt:null,context:null,semanticContext:null};return t&&(r.reachesIntoOuterContext=0),r}var n={};return n.state=e.state||null,n.alt=void 0===e.alt?null:e.alt,n.context=e.context||null,n.semanticContext=e.semanticContext||null,t&&(n.reachesIntoOuterContext=e.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=e.precedenceFilterSuppressed||!1),n}function a(e,t){return this.checkContext(e,t),e=o(e),t=o(t,!0),this.state=null!==e.state?e.state:t.state,this.alt=null!==e.alt?e.alt:t.alt,this.context=null!==e.context?e.context:t.context,this.semanticContext=null!==e.semanticContext?e.semanticContext:null!==t.semanticContext?t.semanticContext:i.NONE,this.reachesIntoOuterContext=t.reachesIntoOuterContext,this.precedenceFilterSuppressed=t.precedenceFilterSuppressed,this}function l(e,t){a.call(this,e,t);var r=e.lexerActionExecutor||null;return this.lexerActionExecutor=r||(null!==t?t.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=null!==t&&this.checkNonGreedyDecision(t,this.state),this}a.prototype.checkContext=function(e,t){null!==e.context&&void 0!==e.context||null!==t&&null!==t.context&&void 0!==t.context||(this.context=null)},a.prototype.hashCode=function(){var e=new s;return this.updateHashCode(e),e.finish()},a.prototype.updateHashCode=function(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)},a.prototype.equals=function(e){return this===e||e instanceof a&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&(null===this.context?null===e.context:this.context.equals(e.context))&&this.semanticContext.equals(e.semanticContext)&&this.precedenceFilterSuppressed===e.precedenceFilterSuppressed},a.prototype.hashCodeForConfigSet=function(){var e=new s;return e.update(this.state.stateNumber,this.alt,this.semanticContext),e.finish()},a.prototype.equalsForConfigSet=function(e){return this===e||e instanceof a&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&this.semanticContext.equals(e.semanticContext)},a.prototype.toString=function(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==i.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"},l.prototype=Object.create(a.prototype),l.prototype.constructor=l,l.prototype.updateHashCode=function(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)},l.prototype.equals=function(e){return this===e||e instanceof l&&this.passedThroughNonGreedyDecision==e.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(e.lexerActionExecutor):!e.lexerActionExecutor)&&a.prototype.equals.call(this,e)},l.prototype.hashCodeForConfigSet=l.prototype.hashCode,l.prototype.equalsForConfigSet=l.prototype.equals,l.prototype.checkNonGreedyDecision=function(e,t){return e.passedThroughNonGreedyDecision||t instanceof n&&t.nonGreedy},t.G=a,t.I=l},479:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e||!t)return e;for(const r of n.INHERIT_KEYS.optional)null==e[r]&&(e[r]=t[r]);for(const r of Object.keys(t))r.startsWith("_")&&"__clone"!==r&&(e[r]=t[r]);for(const r of n.INHERIT_KEYS.force)e[r]=t[r];return(0,i.default)(e,t),e};var n=r(62811),i=r(60616)},496:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSXIdentifier=t.JSXFragment=t.JSXExpressionContainer=t.JSXEmptyExpression=t.JSXElement=t.JSXClosingFragment=t.JSXClosingElement=t.JSXAttribute=t.IntersectionTypeAnnotation=t.InterpreterDirective=t.InterfaceTypeAnnotation=t.InterfaceExtends=t.InterfaceDeclaration=t.InferredPredicate=t.IndexedAccessType=t.ImportSpecifier=t.ImportNamespaceSpecifier=t.ImportExpression=t.ImportDefaultSpecifier=t.ImportDeclaration=t.ImportAttribute=t.Import=t.IfStatement=t.Identifier=t.GenericTypeAnnotation=t.FunctionTypeParam=t.FunctionTypeAnnotation=t.FunctionExpression=t.FunctionDeclaration=t.ForStatement=t.ForOfStatement=t.ForInStatement=t.File=t.ExpressionStatement=t.ExportSpecifier=t.ExportNamespaceSpecifier=t.ExportNamedDeclaration=t.ExportDefaultSpecifier=t.ExportDefaultDeclaration=t.ExportAllDeclaration=t.ExistsTypeAnnotation=t.EnumSymbolBody=t.EnumStringMember=t.EnumStringBody=t.EnumNumberMember=t.EnumNumberBody=t.EnumDefaultedMember=t.EnumDeclaration=t.EnumBooleanMember=t.EnumBooleanBody=t.EmptyTypeAnnotation=t.EmptyStatement=t.DoWhileStatement=t.DoExpression=t.DirectiveLiteral=t.Directive=t.Decorator=t.DeclaredPredicate=t.DeclareVariable=t.DeclareTypeAlias=t.DeclareOpaqueType=t.DeclareModuleExports=t.DeclareModule=t.DeclareInterface=t.DeclareFunction=t.DeclareExportDeclaration=t.DeclareExportAllDeclaration=t.DeclareClass=t.DecimalLiteral=t.DebuggerStatement=t.ContinueStatement=t.ConditionalExpression=t.ClassProperty=t.ClassPrivateProperty=t.ClassPrivateMethod=t.ClassMethod=t.ClassImplements=t.ClassExpression=t.ClassDeclaration=t.ClassBody=t.ClassAccessorProperty=t.CatchClause=t.CallExpression=t.BreakStatement=t.BooleanTypeAnnotation=t.BooleanLiteralTypeAnnotation=t.BooleanLiteral=t.BlockStatement=t.BindExpression=t.BinaryExpression=t.BigIntLiteral=t.AwaitExpression=t.AssignmentPattern=t.AssignmentExpression=t.ArrowFunctionExpression=t.ArrayTypeAnnotation=t.ArrayPattern=t.ArrayExpression=t.ArgumentPlaceholder=t.AnyTypeAnnotation=void 0,t.TSNumberKeyword=t.TSNullKeyword=t.TSNonNullExpression=t.TSNeverKeyword=t.TSNamespaceExportDeclaration=t.TSNamedTupleMember=t.TSModuleDeclaration=t.TSModuleBlock=t.TSMethodSignature=t.TSMappedType=t.TSLiteralType=t.TSIntrinsicKeyword=t.TSIntersectionType=t.TSInterfaceDeclaration=t.TSInterfaceBody=t.TSInstantiationExpression=t.TSInferType=t.TSIndexedAccessType=t.TSIndexSignature=t.TSImportType=t.TSImportEqualsDeclaration=t.TSFunctionType=t.TSExternalModuleReference=t.TSExpressionWithTypeArguments=t.TSExportAssignment=t.TSEnumMember=t.TSEnumDeclaration=t.TSEnumBody=t.TSDeclareMethod=t.TSDeclareFunction=t.TSConstructorType=t.TSConstructSignatureDeclaration=t.TSConditionalType=t.TSCallSignatureDeclaration=t.TSBooleanKeyword=t.TSBigIntKeyword=t.TSAsExpression=t.TSArrayType=t.TSAnyKeyword=t.SymbolTypeAnnotation=t.SwitchStatement=t.SwitchCase=t.Super=t.StringTypeAnnotation=t.StringLiteralTypeAnnotation=t.StringLiteral=t.StaticBlock=t.SpreadProperty=t.SpreadElement=t.SequenceExpression=t.ReturnStatement=t.RestProperty=t.RestElement=t.RegexLiteral=t.RegExpLiteral=t.RecordExpression=t.QualifiedTypeIdentifier=t.Program=t.PrivateName=t.Placeholder=t.PipelineTopicExpression=t.PipelinePrimaryTopicReference=t.PipelineBareFunction=t.ParenthesizedExpression=t.OptionalMemberExpression=t.OptionalIndexedAccessType=t.OptionalCallExpression=t.OpaqueType=t.ObjectTypeSpreadProperty=t.ObjectTypeProperty=t.ObjectTypeInternalSlot=t.ObjectTypeIndexer=t.ObjectTypeCallProperty=t.ObjectTypeAnnotation=t.ObjectProperty=t.ObjectPattern=t.ObjectMethod=t.ObjectExpression=t.NumericLiteral=t.NumberTypeAnnotation=t.NumberLiteralTypeAnnotation=t.NumberLiteral=t.NullableTypeAnnotation=t.NullLiteralTypeAnnotation=t.NullLiteral=t.Noop=t.NewExpression=t.ModuleExpression=t.MixedTypeAnnotation=t.MetaProperty=t.MemberExpression=t.LogicalExpression=t.LabeledStatement=t.JSXText=t.JSXSpreadChild=t.JSXSpreadAttribute=t.JSXOpeningFragment=t.JSXOpeningElement=t.JSXNamespacedName=t.JSXMemberExpression=void 0,t.YieldExpression=t.WithStatement=t.WhileStatement=t.VoidTypeAnnotation=t.VoidPattern=t.Variance=t.VariableDeclarator=t.VariableDeclaration=t.V8IntrinsicIdentifier=t.UpdateExpression=t.UnionTypeAnnotation=t.UnaryExpression=t.TypeofTypeAnnotation=t.TypeParameterInstantiation=t.TypeParameterDeclaration=t.TypeParameter=t.TypeCastExpression=t.TypeAnnotation=t.TypeAlias=t.TupleTypeAnnotation=t.TupleExpression=t.TryStatement=t.TopicReference=t.ThrowStatement=t.ThisTypeAnnotation=t.ThisExpression=t.TemplateLiteral=t.TemplateElement=t.TaggedTemplateExpression=t.TSVoidKeyword=t.TSUnknownKeyword=t.TSUnionType=t.TSUndefinedKeyword=t.TSTypeReference=t.TSTypeQuery=t.TSTypePredicate=t.TSTypeParameterInstantiation=t.TSTypeParameterDeclaration=t.TSTypeParameter=t.TSTypeOperator=t.TSTypeLiteral=t.TSTypeAssertion=t.TSTypeAnnotation=t.TSTypeAliasDeclaration=t.TSTupleType=t.TSThisType=t.TSTemplateLiteralType=t.TSSymbolKeyword=t.TSStringKeyword=t.TSSatisfiesExpression=t.TSRestType=t.TSQualifiedName=t.TSPropertySignature=t.TSParenthesizedType=t.TSParameterProperty=t.TSOptionalType=t.TSObjectKeyword=void 0;var n=r(52625);function i(e){return n[e]}r(74641),t.ArrayExpression=i("arrayExpression"),t.AssignmentExpression=i("assignmentExpression"),t.BinaryExpression=i("binaryExpression"),t.InterpreterDirective=i("interpreterDirective"),t.Directive=i("directive"),t.DirectiveLiteral=i("directiveLiteral"),t.BlockStatement=i("blockStatement"),t.BreakStatement=i("breakStatement"),t.CallExpression=i("callExpression"),t.CatchClause=i("catchClause"),t.ConditionalExpression=i("conditionalExpression"),t.ContinueStatement=i("continueStatement"),t.DebuggerStatement=i("debuggerStatement"),t.DoWhileStatement=i("doWhileStatement"),t.EmptyStatement=i("emptyStatement"),t.ExpressionStatement=i("expressionStatement"),t.File=i("file"),t.ForInStatement=i("forInStatement"),t.ForStatement=i("forStatement"),t.FunctionDeclaration=i("functionDeclaration"),t.FunctionExpression=i("functionExpression"),t.Identifier=i("identifier"),t.IfStatement=i("ifStatement"),t.LabeledStatement=i("labeledStatement"),t.StringLiteral=i("stringLiteral"),t.NumericLiteral=i("numericLiteral"),t.NullLiteral=i("nullLiteral"),t.BooleanLiteral=i("booleanLiteral"),t.RegExpLiteral=i("regExpLiteral"),t.LogicalExpression=i("logicalExpression"),t.MemberExpression=i("memberExpression"),t.NewExpression=i("newExpression"),t.Program=i("program"),t.ObjectExpression=i("objectExpression"),t.ObjectMethod=i("objectMethod"),t.ObjectProperty=i("objectProperty"),t.RestElement=i("restElement"),t.ReturnStatement=i("returnStatement"),t.SequenceExpression=i("sequenceExpression"),t.ParenthesizedExpression=i("parenthesizedExpression"),t.SwitchCase=i("switchCase"),t.SwitchStatement=i("switchStatement"),t.ThisExpression=i("thisExpression"),t.ThrowStatement=i("throwStatement"),t.TryStatement=i("tryStatement"),t.UnaryExpression=i("unaryExpression"),t.UpdateExpression=i("updateExpression"),t.VariableDeclaration=i("variableDeclaration"),t.VariableDeclarator=i("variableDeclarator"),t.WhileStatement=i("whileStatement"),t.WithStatement=i("withStatement"),t.AssignmentPattern=i("assignmentPattern"),t.ArrayPattern=i("arrayPattern"),t.ArrowFunctionExpression=i("arrowFunctionExpression"),t.ClassBody=i("classBody"),t.ClassExpression=i("classExpression"),t.ClassDeclaration=i("classDeclaration"),t.ExportAllDeclaration=i("exportAllDeclaration"),t.ExportDefaultDeclaration=i("exportDefaultDeclaration"),t.ExportNamedDeclaration=i("exportNamedDeclaration"),t.ExportSpecifier=i("exportSpecifier"),t.ForOfStatement=i("forOfStatement"),t.ImportDeclaration=i("importDeclaration"),t.ImportDefaultSpecifier=i("importDefaultSpecifier"),t.ImportNamespaceSpecifier=i("importNamespaceSpecifier"),t.ImportSpecifier=i("importSpecifier"),t.ImportExpression=i("importExpression"),t.MetaProperty=i("metaProperty"),t.ClassMethod=i("classMethod"),t.ObjectPattern=i("objectPattern"),t.SpreadElement=i("spreadElement"),t.Super=i("super"),t.TaggedTemplateExpression=i("taggedTemplateExpression"),t.TemplateElement=i("templateElement"),t.TemplateLiteral=i("templateLiteral"),t.YieldExpression=i("yieldExpression"),t.AwaitExpression=i("awaitExpression"),t.Import=i("import"),t.BigIntLiteral=i("bigIntLiteral"),t.ExportNamespaceSpecifier=i("exportNamespaceSpecifier"),t.OptionalMemberExpression=i("optionalMemberExpression"),t.OptionalCallExpression=i("optionalCallExpression"),t.ClassProperty=i("classProperty"),t.ClassAccessorProperty=i("classAccessorProperty"),t.ClassPrivateProperty=i("classPrivateProperty"),t.ClassPrivateMethod=i("classPrivateMethod"),t.PrivateName=i("privateName"),t.StaticBlock=i("staticBlock"),t.ImportAttribute=i("importAttribute"),t.AnyTypeAnnotation=i("anyTypeAnnotation"),t.ArrayTypeAnnotation=i("arrayTypeAnnotation"),t.BooleanTypeAnnotation=i("booleanTypeAnnotation"),t.BooleanLiteralTypeAnnotation=i("booleanLiteralTypeAnnotation"),t.NullLiteralTypeAnnotation=i("nullLiteralTypeAnnotation"),t.ClassImplements=i("classImplements"),t.DeclareClass=i("declareClass"),t.DeclareFunction=i("declareFunction"),t.DeclareInterface=i("declareInterface"),t.DeclareModule=i("declareModule"),t.DeclareModuleExports=i("declareModuleExports"),t.DeclareTypeAlias=i("declareTypeAlias"),t.DeclareOpaqueType=i("declareOpaqueType"),t.DeclareVariable=i("declareVariable"),t.DeclareExportDeclaration=i("declareExportDeclaration"),t.DeclareExportAllDeclaration=i("declareExportAllDeclaration"),t.DeclaredPredicate=i("declaredPredicate"),t.ExistsTypeAnnotation=i("existsTypeAnnotation"),t.FunctionTypeAnnotation=i("functionTypeAnnotation"),t.FunctionTypeParam=i("functionTypeParam"),t.GenericTypeAnnotation=i("genericTypeAnnotation"),t.InferredPredicate=i("inferredPredicate"),t.InterfaceExtends=i("interfaceExtends"),t.InterfaceDeclaration=i("interfaceDeclaration"),t.InterfaceTypeAnnotation=i("interfaceTypeAnnotation"),t.IntersectionTypeAnnotation=i("intersectionTypeAnnotation"),t.MixedTypeAnnotation=i("mixedTypeAnnotation"),t.EmptyTypeAnnotation=i("emptyTypeAnnotation"),t.NullableTypeAnnotation=i("nullableTypeAnnotation"),t.NumberLiteralTypeAnnotation=i("numberLiteralTypeAnnotation"),t.NumberTypeAnnotation=i("numberTypeAnnotation"),t.ObjectTypeAnnotation=i("objectTypeAnnotation"),t.ObjectTypeInternalSlot=i("objectTypeInternalSlot"),t.ObjectTypeCallProperty=i("objectTypeCallProperty"),t.ObjectTypeIndexer=i("objectTypeIndexer"),t.ObjectTypeProperty=i("objectTypeProperty"),t.ObjectTypeSpreadProperty=i("objectTypeSpreadProperty"),t.OpaqueType=i("opaqueType"),t.QualifiedTypeIdentifier=i("qualifiedTypeIdentifier"),t.StringLiteralTypeAnnotation=i("stringLiteralTypeAnnotation"),t.StringTypeAnnotation=i("stringTypeAnnotation"),t.SymbolTypeAnnotation=i("symbolTypeAnnotation"),t.ThisTypeAnnotation=i("thisTypeAnnotation"),t.TupleTypeAnnotation=i("tupleTypeAnnotation"),t.TypeofTypeAnnotation=i("typeofTypeAnnotation"),t.TypeAlias=i("typeAlias"),t.TypeAnnotation=i("typeAnnotation"),t.TypeCastExpression=i("typeCastExpression"),t.TypeParameter=i("typeParameter"),t.TypeParameterDeclaration=i("typeParameterDeclaration"),t.TypeParameterInstantiation=i("typeParameterInstantiation"),t.UnionTypeAnnotation=i("unionTypeAnnotation"),t.Variance=i("variance"),t.VoidTypeAnnotation=i("voidTypeAnnotation"),t.EnumDeclaration=i("enumDeclaration"),t.EnumBooleanBody=i("enumBooleanBody"),t.EnumNumberBody=i("enumNumberBody"),t.EnumStringBody=i("enumStringBody"),t.EnumSymbolBody=i("enumSymbolBody"),t.EnumBooleanMember=i("enumBooleanMember"),t.EnumNumberMember=i("enumNumberMember"),t.EnumStringMember=i("enumStringMember"),t.EnumDefaultedMember=i("enumDefaultedMember"),t.IndexedAccessType=i("indexedAccessType"),t.OptionalIndexedAccessType=i("optionalIndexedAccessType"),t.JSXAttribute=i("jsxAttribute"),t.JSXClosingElement=i("jsxClosingElement"),t.JSXElement=i("jsxElement"),t.JSXEmptyExpression=i("jsxEmptyExpression"),t.JSXExpressionContainer=i("jsxExpressionContainer"),t.JSXSpreadChild=i("jsxSpreadChild"),t.JSXIdentifier=i("jsxIdentifier"),t.JSXMemberExpression=i("jsxMemberExpression"),t.JSXNamespacedName=i("jsxNamespacedName"),t.JSXOpeningElement=i("jsxOpeningElement"),t.JSXSpreadAttribute=i("jsxSpreadAttribute"),t.JSXText=i("jsxText"),t.JSXFragment=i("jsxFragment"),t.JSXOpeningFragment=i("jsxOpeningFragment"),t.JSXClosingFragment=i("jsxClosingFragment"),t.Noop=i("noop"),t.Placeholder=i("placeholder"),t.V8IntrinsicIdentifier=i("v8IntrinsicIdentifier"),t.ArgumentPlaceholder=i("argumentPlaceholder"),t.BindExpression=i("bindExpression"),t.Decorator=i("decorator"),t.DoExpression=i("doExpression"),t.ExportDefaultSpecifier=i("exportDefaultSpecifier"),t.RecordExpression=i("recordExpression"),t.TupleExpression=i("tupleExpression"),t.DecimalLiteral=i("decimalLiteral"),t.ModuleExpression=i("moduleExpression"),t.TopicReference=i("topicReference"),t.PipelineTopicExpression=i("pipelineTopicExpression"),t.PipelineBareFunction=i("pipelineBareFunction"),t.PipelinePrimaryTopicReference=i("pipelinePrimaryTopicReference"),t.VoidPattern=i("voidPattern"),t.TSParameterProperty=i("tsParameterProperty"),t.TSDeclareFunction=i("tsDeclareFunction"),t.TSDeclareMethod=i("tsDeclareMethod"),t.TSQualifiedName=i("tsQualifiedName"),t.TSCallSignatureDeclaration=i("tsCallSignatureDeclaration"),t.TSConstructSignatureDeclaration=i("tsConstructSignatureDeclaration"),t.TSPropertySignature=i("tsPropertySignature"),t.TSMethodSignature=i("tsMethodSignature"),t.TSIndexSignature=i("tsIndexSignature"),t.TSAnyKeyword=i("tsAnyKeyword"),t.TSBooleanKeyword=i("tsBooleanKeyword"),t.TSBigIntKeyword=i("tsBigIntKeyword"),t.TSIntrinsicKeyword=i("tsIntrinsicKeyword"),t.TSNeverKeyword=i("tsNeverKeyword"),t.TSNullKeyword=i("tsNullKeyword"),t.TSNumberKeyword=i("tsNumberKeyword"),t.TSObjectKeyword=i("tsObjectKeyword"),t.TSStringKeyword=i("tsStringKeyword"),t.TSSymbolKeyword=i("tsSymbolKeyword"),t.TSUndefinedKeyword=i("tsUndefinedKeyword"),t.TSUnknownKeyword=i("tsUnknownKeyword"),t.TSVoidKeyword=i("tsVoidKeyword"),t.TSThisType=i("tsThisType"),t.TSFunctionType=i("tsFunctionType"),t.TSConstructorType=i("tsConstructorType"),t.TSTypeReference=i("tsTypeReference"),t.TSTypePredicate=i("tsTypePredicate"),t.TSTypeQuery=i("tsTypeQuery"),t.TSTypeLiteral=i("tsTypeLiteral"),t.TSArrayType=i("tsArrayType"),t.TSTupleType=i("tsTupleType"),t.TSOptionalType=i("tsOptionalType"),t.TSRestType=i("tsRestType"),t.TSNamedTupleMember=i("tsNamedTupleMember"),t.TSUnionType=i("tsUnionType"),t.TSIntersectionType=i("tsIntersectionType"),t.TSConditionalType=i("tsConditionalType"),t.TSInferType=i("tsInferType"),t.TSParenthesizedType=i("tsParenthesizedType"),t.TSTypeOperator=i("tsTypeOperator"),t.TSIndexedAccessType=i("tsIndexedAccessType"),t.TSMappedType=i("tsMappedType"),t.TSTemplateLiteralType=i("tsTemplateLiteralType"),t.TSLiteralType=i("tsLiteralType"),t.TSExpressionWithTypeArguments=i("tsExpressionWithTypeArguments"),t.TSInterfaceDeclaration=i("tsInterfaceDeclaration"),t.TSInterfaceBody=i("tsInterfaceBody"),t.TSTypeAliasDeclaration=i("tsTypeAliasDeclaration"),t.TSInstantiationExpression=i("tsInstantiationExpression"),t.TSAsExpression=i("tsAsExpression"),t.TSSatisfiesExpression=i("tsSatisfiesExpression"),t.TSTypeAssertion=i("tsTypeAssertion"),t.TSEnumBody=i("tsEnumBody"),t.TSEnumDeclaration=i("tsEnumDeclaration"),t.TSEnumMember=i("tsEnumMember"),t.TSModuleDeclaration=i("tsModuleDeclaration"),t.TSModuleBlock=i("tsModuleBlock"),t.TSImportType=i("tsImportType"),t.TSImportEqualsDeclaration=i("tsImportEqualsDeclaration"),t.TSExternalModuleReference=i("tsExternalModuleReference"),t.TSNonNullExpression=i("tsNonNullExpression"),t.TSExportAssignment=i("tsExportAssignment"),t.TSNamespaceExportDeclaration=i("tsNamespaceExportDeclaration"),t.TSTypeAnnotation=i("tsTypeAnnotation"),t.TSTypeParameterInstantiation=i("tsTypeParameterInstantiation"),t.TSTypeParameterDeclaration=i("tsTypeParameterDeclaration"),t.TSTypeParameter=i("tsTypeParameter"),t.NumberLiteral=n.numberLiteral,t.RegexLiteral=n.regexLiteral,t.RestProperty=n.restProperty,t.SpreadProperty=n.spreadProperty},517:(e,t,r)=>{var n=r(79696).Buffer;function i(e,t,r){for(var n,i,o=-1,a=0;++o<8;)n=t&1<<7-o?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=s(e._prev,r?n:i);return a}function s(e,t){var r=e.length,i=-1,s=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)s[i]=e[i]<<1|e[i+1]>>7;return s}t.encrypt=function(e,t,r){for(var s=t.length,o=n.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],r);return o}},713:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(null==e||!e.length)return;const r=[],i=(0,n.default)(e,r);if(i){for(const e of r)t.push(e);return i}};var n=r(54390)},910:(e,t,r)=>{var n=r(53896),i=r(79696).Buffer,s=r(3663);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),s=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var l=o(e),p=s+16*a;e._cache.writeUInt32BE(l[0],p+0),e._cache.writeUInt32BE(l[1],p+4),e._cache.writeUInt32BE(l[2],p+8),e._cache.writeUInt32BE(l[3],p+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,u)}},1123:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r=[];for(let e=0;e<32;e++)r.push(" ".repeat(2*e));t.default=class{constructor(e,t){this._map=null,this._buf="",this._str="",this._appendCount=0,this._last=0,this._canMarkIdName=!0,this._indentChar="",this._queuedChar=0,this._position={line:1,column:0},this._sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0},this._map=e,this._indentChar=t}get(){const{_map:e,_last:t}=this;32!==this._queuedChar&&this._flush();const r=10===t?(this._buf+this._str).trimRight():this._buf+this._str;if(null===e)return{code:r,decodedMap:void 0,map:null,rawMappings:void 0};const n={code:r,decodedMap:e.getDecoded(),get __mergedMap(){return this.map},get map(){const t=e.get();return n.map=t,t},set map(e){Object.defineProperty(n,"map",{value:e,writable:!0})},get rawMappings(){const t=e.getRawMappings();return n.rawMappings=t,t},set rawMappings(e){Object.defineProperty(n,"rawMappings",{value:e,writable:!0})}};return n}append(e,t){this._flush(),this._append(e,t)}appendChar(e){this._flush(),this._appendChar(e,1,!0)}queue(e){this._flush(),this._queuedChar=e}_flush(){const e=this._queuedChar;0!==e&&(this._appendChar(e,1,!0),this._queuedChar=0)}_appendChar(e,t,n){if(this._last=e,-1===e){const e=t>=64?this._indentChar.repeat(t):r[t/2];this._str+=e}else this._str+=t>1?String.fromCharCode(e).repeat(t):String.fromCharCode(e);const i=32===e,s=this._position;if(10!==e){if(this._map){const e=this._sourcePosition;n&&e?(this._map.mark(s,e.line,e.column,i?void 0:e.identifierName,i?void 0:e.identifierNamePos,e.filename),!i&&this._canMarkIdName&&(e.identifierName=void 0,e.identifierNamePos=void 0)):this._map.mark(s)}s.column+=t}else s.line++,s.column=0}_append(e,t){const r=e.length,n=this._position,i=this._sourcePosition;this._last=-1,++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=e,this._appendCount=0):this._str+=e;const s=null!==this._map;if(!t&&!s)return void(n.column+=r);const{column:o,identifierName:a,identifierNamePos:l,filename:p}=i;let u=i.line;null==a&&null==l||!this._canMarkIdName||(i.identifierName=void 0,i.identifierNamePos=void 0);let c=e.indexOf("\n"),h=0;for(s&&0!==c&&this._map.mark(n,u,o,a,l,p);-1!==c;)n.line++,n.column=0,h=c+1,h<r&&void 0!==u&&(u++,s&&this._map.mark(n,u,0,void 0,void 0,p)),c=e.indexOf("\n",h);n.column+=r-h}removeLastSemicolon(){59===this._queuedChar&&(this._queuedChar=0)}getLastChar(e){if(!e)return this._last;const t=this._queuedChar;return 0!==t?t:this._last}getNewlineCount(){return 0===this._queuedChar&&10===this._last?1:0}hasContent(){return 0!==this._last}exactSource(e,t){if(!this._map)return void t();this.source("start",e);const r=e.identifierName,n=this._sourcePosition;null!=r&&(this._canMarkIdName=!1,n.identifierName=r),t(),null!=r&&(this._canMarkIdName=!0,n.identifierName=void 0,n.identifierNamePos=void 0),this.source("end",e)}source(e,t){this._map&&this._normalizePosition(e,t,0)}sourceWithOffset(e,t,r){this._map&&this._normalizePosition(e,t,r)}_normalizePosition(e,t,r){this._flush();const n=t[e],i=this._sourcePosition;n&&(i.line=n.line,i.column=Math.max(n.column+r,0),i.filename=t.filename)}getCurrentColumn(){return this._position.column+(this._queuedChar?1:0)}getCurrentLine(){return this._position.line}}},1582:(e,t,r)=>{var n=r(79696).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var s=t.length,o=n.allocUnsafe(s),a=-1;++a<s;)o[a]=i(e,t[a],r);return o}},1859:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}r.d(t,{A:()=>i})},1972:(e,t,r)=>{var n=r(30462).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=p,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},3663:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},3903:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=Object.keys(t);for(const n of r)if(e[n]!==t[n])return!1;return!0}},3971:(e,t,r)=>{var n=r(65994).process,i=r(10626);e.exports=v;var s,o=r(49667);v.ReadableState=T,r(8763).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=r(5372),p=r(58777).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=Object.create(r(26571));c.inherits=r(25003);var h=r(98437),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var f,m=r(92339),y=r(89779);c.inherits(v,l);var g=["error","close","destroy","pause","resume"];function T(e,t){e=e||{};var n=t instanceof(s=s||r(49837));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(1972).I),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function v(e){if(s=s||r(49837),!(this instanceof v))return new v(e);this._readableState=new T(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function b(e,t,r,n,i){var s,o=e._readableState;return null===t?(o.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,w(e)}}(e,o)):(i||(s=function(e,t){var r,n;return n=t,p.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===p.prototype||(t=function(e){return p.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?S(e,o,t,!1):P(e,o)):S(e,o,t,!1))):n||(o.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&w(e)),P(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=p.from(e,t),t=""),r=!0),b(this,e,t,!1,r)},v.prototype.unshift=function(e){return b(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return f||(f=r(1972).I),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var x=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function w(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){d("emit readable"),e.emit("readable"),N(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function C(e){d("readable nexttick read 0"),e.read(0)}function _(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function k(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0==(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=p.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0==(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}v.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):w(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&O(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?k(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,d("pipe count=%d opts=%j",s.pipesCount,t);var l=t&&!1===t.end||e===n.stdout||e===n.stderr?T:p;function p(){d("onend"),e.end()}s.endEmitted?i.nextTick(l):r.once("end",l),e.on("unpipe",(function t(n,i){d("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",y),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",t),r.removeListener("end",p),r.removeListener("end",T),r.removeListener("data",f),c=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",u);var c=!1,h=!1;function f(t){d("ondata"),h=!1,!1!==e.write(t)||h||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==L(s.pipes,e))&&!c&&(d("false write response, pause",s.awaitDrain),s.awaitDrain++,h=!0),r.pause())}function m(t){d("onerror",t),T(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",g),T()}function g(){d("onfinish"),e.removeListener("close",y),T()}function T(){d("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",y),e.once("finish",g),e.emit("pipe",r),s.flowing||(d("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=L(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(e,t){var r=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&w(this):i.nextTick(C,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(_,e,t))}(this,e)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=k},4045:(e,t,r)=>{var n=r(67966);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},4349:(e,t,r)=>{var n=r(47375).InputStream,i="undefined"==typeof window&&"undefined"==typeof importScripts?r(36374):null;function s(e,t){var r=i.readFileSync(e,"utf8");return n.call(this,r,t),this.fileName=e,this}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.FileStream=s},4715:(e,t,r)=>{var n=r(25003),i=r(67787).Buffer,s=r(44775),o=s.base,a=s.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new p,this.tree._init(e.body)}function p(e){o.Node.call(this,"der",e)}function u(e){return e<10?"0"+e:e}e.exports=l,l.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(p,o.Node),p.prototype._encodeComposite=function(e,t,r,n){var s,o=function(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128)return(s=new i(2))[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n]);for(var l=1,p=n.length;p>=256;p>>=8)l++;(s=new i(2+l))[0]=o,s[1]=128|l,p=1+l;for(var u=n.length;u>0;p--,u>>=8)s[p]=255&u;return this._createEncoderBuffer([s,n])},p.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},p.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e))for(e=e.slice(),n=0;n<e.length;n++)e[n]|=0;if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var s=0;for(n=0;n<e.length;n++){var o=e[n];for(s++;o>=128;o>>=7)s++}var a=new i(s),l=a.length-1;for(n=e.length-1;n>=0;n--)for(o=e[n],a[l--]=127&o;(o>>=7)>0;)a[l--]=128|127&o;return this._createEncoderBuffer(a)},p.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},p.prototype._encodeNull=function(){return this._createEncoderBuffer("")},p.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var s=new i(n);return e.copy(s),0===e.length&&(s[0]=0),this._createEncoderBuffer(s)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var o=e;o>=256;o>>=8)n++;for(o=(s=new Array(n)).length-1;o>=0;o--)s[o]=255&e,e>>=8;return 128&s[0]&&s.unshift(0),this._createEncoderBuffer(new i(s))},p.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},p.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},p.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var s=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),s.length!==i.defaultBuffer.length)return!1;for(n=0;n<s.length;n++)if(s[n]!==i.defaultBuffer[n])return!1;return!0}},4716:e=>{e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},4768:(e,t)=>{function r(e,t,r){return this.dfa=e,this.literalNames=t||[],this.symbolicNames=r||[],this}function n(e){return r.call(this,e,null),this}r.prototype.toString=function(){if(null===this.dfa.s0)return null;for(var e="",t=this.dfa.sortedStates(),r=0;r<t.length;r++){var n=t[r];if(null!==n.edges)for(var i=n.edges.length,s=0;s<i;s++){var o=n.edges[s]||null;null!==o&&2147483647!==o.stateNumber&&(e=(e=(e=(e=(e=(e=e.concat(this.getStateString(n))).concat("-")).concat(this.getEdgeLabel(s))).concat("->")).concat(this.getStateString(o))).concat("\n"))}}return 0===e.length?null:e},r.prototype.getEdgeLabel=function(e){return 0===e?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[e-1]||this.symbolicNames[e-1]:String.fromCharCode(e-1)},r.prototype.getStateString=function(e){var t=(e.isAcceptState?":":"")+"s"+e.stateNumber+(e.requiresFullContext?"^":"");return e.isAcceptState?null!==e.predicates?t+"=>"+e.predicates.toString():t+"=>"+e.prediction.toString():t},n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.prototype.getEdgeLabel=function(e){return"'"+String.fromCharCode(e)+"'"},t.DFASerializer=r,t.LexerDFASerializer=n},5339:(e,t,r)=>{var n=r(62053),i=r(79696).Buffer,s=r(84913);function o(e,t,r,o){s.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=e}r(25003)(o,s),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},5372:(e,t,r)=>{e.exports=r(8763).EventEmitter},5555:(e,t,r)=>{var n=r(25003),i=r(44775),s=i.base,o=i.bignum,a=i.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new p,this.tree._init(e.body)}function p(e){s.Node.call(this,"der",e)}function u(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=a.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var s=r;for(r=0;!(128&~s);){if(s=e.readUInt8(t),e.isError(s))return s;r<<=7,r|=127&s}}return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function c(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var s=0;s<i;s++){n<<=8;var o=e.readUInt8(r);if(e.isError(o))return o;n|=o}return n}e.exports=l,l.prototype.decode=function(e,t){return e instanceof s.DecoderBuffer||(e=new s.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(p,s.Node),p.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=u(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},p.prototype._decodeTag=function(e,t,r){var n=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=c(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var s=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(i=e.offset-s.offset,e.restore(s),e.skip(i,'Failed to match body of: "'+t+'"'))},p.prototype._skipUntilEnd=function(e,t){for(;;){var r=u(e,t);if(e.isError(r))return r;var n,i=c(e,r.primitive,t);if(e.isError(i))return i;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},p.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var s=this._peekTag(e,"end");if(e.isError(s))return s;var o=r.decode(e,"der",n);if(e.isError(o)&&s)break;i.push(o)}return i},p.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",s=0;s<n.length/2;s++)i+=String.fromCharCode(n.readUInt16BE(2*s));return i}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var a=e.raw().toString("ascii");return this._isPrintstr(a)?a:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},p.prototype._decodeObjid=function(e,t,r){for(var n,i=[],s=0;!e.isEmpty();){var o=e.readUInt8();s<<=7,s|=127&o,128&o||(i.push(s),s=0)}128&o&&i.push(s);var a=i[0]/40|0,l=i[0]%40;if(n=r?i:[a,l].concat(i.slice(1)),t){var p=t[n.join(" ")];void 0===p&&(p=t[n.join(".")]),void 0!==p&&(n=p)}return n},p.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),s=0|r.slice(6,8),o=0|r.slice(8,10),a=0|r.slice(10,12),l=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),s=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),l=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,s,o,a,l,0)},p.prototype._decodeNull=function(e){return null},p.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},p.prototype._decodeInt=function(e,t){var r=e.raw(),n=new o(r);return t&&(n=t[n.toString(10)]||n),n},p.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},5608:(e,t,r)=>{var n=r(79696).Buffer,i=r(32442),s=r(32427),o=r(79548).ec,a=r(70243),l=r(28113),p=r(36646);function u(e,t,r,s){if((e=n.from(e.toArray())).length<t.byteLength()){var o=n.alloc(t.byteLength()-e.length);e=n.concat([o,e])}var a=r.length,l=function(e,t){e=(e=c(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),p=n.alloc(a);p.fill(1);var u=n.alloc(a);return u=i(s,u).update(p).update(n.from([0])).update(e).update(l).digest(),p=i(s,u).update(p).digest(),{k:u=i(s,u).update(p).update(n.from([1])).update(e).update(l).digest(),v:p=i(s,u).update(p).digest()}}function c(e,t){var r=new a(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function h(e,t,r){var s,o;do{for(s=n.alloc(0);8*s.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),s=n.concat([s,t.v]);o=c(s,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function d(e,t,r,n){return e.toRed(a.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,f){var m=l(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=p[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new o(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,s=t.params.priv_key,o=t.params.p,l=t.params.q,p=t.params.g,f=new a(0),m=c(e,l).mod(l),y=!1,g=u(s,l,e,r);!1===y;)f=d(p,i=h(l,g,r),o,l),0===(y=i.invm(l).imul(m.add(s.mul(f))).mod(l)).cmpn(0)&&(y=!1,f=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(f,y)}(e,m,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=n.concat([f,e]);for(var y=m.modulus.byteLength(),g=[0,1];e.length+g.length+1<y;)g.push(255);g.push(0);for(var T=-1;++T<e.length;)g.push(e[T]);return s(g,m)},e.exports.getKey=u,e.exports.makeKey=h},6022:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(16397);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,n.A)(e,t)}},6057:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)("trailingComments",e,t)};var n=r(26284)},6370:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AssignmentExpression=function(e,t,r,n){return!(!d(n)||"ObjectPattern"!==e.left.type)||T(e,t,r)},t.BinaryExpression=function(e,t,r,n){return!!f(e,t,r,0)||(n&i.TokenContext.forInOrInitHeadAccumulate)>0&&"in"===e.operator},t.ClassExpression=function(e,t,r,n){return(n&(i.TokenContext.expressionStatement|i.TokenContext.exportDefault))>0},t.ArrowFunctionExpression=t.ConditionalExpression=T,t.DoExpression=function(e,t,r,n){return(n&i.TokenContext.expressionStatement)>0&&!e.async},t.FunctionExpression=function(e,t,r,n){return(n&(i.TokenContext.expressionStatement|i.TokenContext.exportDefault))>0},t.FunctionTypeAnnotation=function(e,t,r,n){return 239===r||90===r||4===r||(n&i.TokenContext.arrowFlowReturnType)>0},t.Identifier=function(e,t,r,n,a){var l;if(a&&a(e)!==e.name)return!1;if(6===r&&null!=(l=e.extra)&&l.parenthesized&&t.left===e){const e=t.right.type;if(("FunctionExpression"===e||"ClassExpression"===e)&&null==t.right.id)return!0}return(n&i.TokenContext.forOfHead||(108===r||132===r)&&n&(i.TokenContext.expressionStatement|i.TokenContext.forInitHead|i.TokenContext.forInHead))&&"let"===e.name?!!((s(t,{object:e,computed:!0})||o(t,{object:e,computed:!0,optional:!1}))&&n&(i.TokenContext.expressionStatement|i.TokenContext.forInitHead|i.TokenContext.forInHead))||(n&i.TokenContext.forOfHead)>0:68===r&&t.left===e&&"async"===e.name&&!t.await},t.LogicalExpression=function(e,t,r){return f(e,t,r,1)},t.NullableTypeAnnotation=function(e,t,r){return 4===r},t.ObjectExpression=function(e,t,r,n){return d(n)},t.OptionalIndexedAccessType=function(e,t,r){return 84===r&&t.objectType===e},t.OptionalCallExpression=t.OptionalMemberExpression=function(e,t,r){switch(r){case 17:return t.callee===e;case 108:return t.object===e}return!1},t.SequenceExpression=function(e,t,r){return!(144===r||133===r||108===r&&t.property===e||132===r&&t.property===e||224===r)&&(21===r||(68===r?t.right===e:60===r||!l(t)))},t.TSSatisfiesExpression=t.TSAsExpression=function(e,t,r){return(6===r||7===r)&&t.left===e||(10===r&&("|"===t.operator||"&"===t.operator)&&e===t.left||f(e,t,r,2))},t.TSConditionalType=function(e,t,r){switch(r){case 155:case 195:case 211:case 212:return!0;case 175:return t.objectType===e;case 181:case 219:return t.types[0]===e;case 161:return t.checkType===e||t.extendsType===e}return!1},t.TSConstructorType=t.TSFunctionType=function(e,t,r){return!!m(e,t,r)||219===r||161===r&&(t.checkType===e||t.extendsType===e)},t.TSInferType=function(e,t,r){return!!y(e,t,r)||!(181!==r&&219!==r||!e.typeParameter.constraint||t.types[0]!==e)},t.TSInstantiationExpression=function(e,t,r){switch(r){case 17:case 130:case 112:case 177:return null!=t.typeParameters}return!1},t.TSIntersectionType=function(e,t,r){return 211===r||y(e,t,r)},t.SpreadElement=t.UnaryExpression=t.TSTypeAssertion=g,t.TSTypeOperator=y,t.TSUnionType=m,t.IntersectionTypeAnnotation=t.UnionTypeAnnotation=function(e,t,r){switch(r){case 4:case 115:case 90:case 239:return!0}return!1},t.UpdateExpression=function(e,t,r){return h(e,t,r)||c(e,t,r)},t.AwaitExpression=t.YieldExpression=function(e,t,r){return 10===r||107===r||238===r||145===r||h(e,t,r)||8===r&&a(e)||28===r&&e===t.test||c(e,t,r)||u(r)};var n=r(45741),i=r(36306);const{isMemberExpression:s,isOptionalMemberExpression:o,isYieldExpression:a,isStatement:l}=n,p=new Map([["||",0],["??",1],["&&",2],["|",3],["^",4],["&",5],["==",6],["===",6],["!=",6],["!==",6],["<",7],[">",7],["<=",7],[">=",7],["in",7],["instanceof",7],[">>",8],["<<",8],[">>>",8],["+",9],["-",9],["*",10],["/",10],["%",10],["**",11]]);function u(e){return 156===e||201===e||209===e}const c=(e,t,r)=>(21===r||22===r)&&t.superClass===e,h=(e,t,r)=>{switch(r){case 108:case 132:return t.object===e;case 17:case 130:case 112:return t.callee===e;case 222:return t.tag===e;case 191:return!0}return!1};function d(e){return(e&(i.TokenContext.expressionStatement|i.TokenContext.arrowBody))>0}function f(e,t,r,n){if(c(e,t,r))return!0;if(h(e,t,r)||238===r||145===r||8===r)return!0;let i;switch(r){case 10:case 107:i=p.get(t.operator);break;case 156:case 201:i=7}if(void 0!==i){const s=2===n?7:p.get(e.operator);if(i>s)return!0;if(i===s&&10===r&&(11===s?t.left===e:t.right===e))return!0;if(1===n&&107===r&&(1===s&&1!==i||1===i&&1!==s))return!0}return!1}function m(e,t,r){switch(r){case 181:case 211:case 155:case 195:return!0;case 175:return t.objectType===e}return!1}function y(e,t,r){switch(r){case 155:case 195:return!0;case 175:if(t.objectType===e)return!0}return!1}function g(e,t,r){return h(e,t,r)||10===r&&"**"===t.operator&&t.left===e||c(e,t,r)}function T(e,t,r){switch(r){case 238:case 145:case 10:case 107:case 8:return!0;case 28:if(t.test===e)return!0}return!!u(r)||g(e,t,r)}},6525:(e,t,r)=>{var n=r(79696).Buffer,i=r(49453),s=r(80816),o=r(25003),a=r(5608),l=r(96268),p=r(4716);function u(e){s.Writable.call(this);var t=p[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function c(e){s.Writable.call(this);var t=p[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new u(e)}function d(e){return new c(e)}Object.keys(p).forEach((function(e){p[e].id=n.from(p[e].id,"hex"),p[e.toLowerCase()]=p[e]})),o(u,s.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},u.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(c,s.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},c.prototype.verify=function(e,t,r){var i="string"==typeof t?n.from(t,r):t;this.end();var s=this._hash.digest();return l(i,s,e,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},6564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){"function"==typeof t&&(t={enter:t});const{enter:n,exit:s}=t;i(e,n,s,r,[])};var n=r(35108);function i(e,t,r,s,o){const a=n.VISITOR_KEYS[e.type];if(a){t&&t(e,o,s);for(const n of a){const a=e[n];if(Array.isArray(a))for(let l=0;l<a.length;l++){const p=a[l];p&&(o.push({node:e,key:n,index:l}),i(p,t,r,s,o),o.pop())}else a&&(o.push({node:e,key:n}),i(a,t,r,s,o),o.pop())}r&&r(e,o,s)}}},7543:(e,t,r)=>{var n=r(66346),i=n.Set,s=n.BitSet,o=n.DoubleDict,a=r(51028).ATN,l=r(81367).ATNState,p=r(470).G,u=r(87264).Q,c=r(72994).Token,h=r(41207).X,d=r(41207).PredPrediction,f=r(16068).e,m=r(63387).PredictionMode,y=r(40846).m,g=(r(29499).ParserRuleContext,r(7842).Ij),T=(r(81367).StarLoopEntryState,r(81367).RuleStopState),v=r(10559).PredictionContext,b=r(70040).Interval,S=r(10014),x=S.Transition,E=S.SetTransition,w=S.NotSetTransition,A=S.RuleTransition,P=S.ActionTransition,I=r(86587).NoViableAltException,C=r(10559).SingletonPredictionContext,_=r(10559).predictionContextFromRuleContext;function N(e,t,r,n){return f.call(this,t,n),this.parser=e,this.decisionToDFA=r,this.predictionMode=m.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this}N.prototype=Object.create(f.prototype),N.prototype.constructor=N,N.prototype.debug=!1,N.prototype.debug_closure=!1,N.prototype.debug_add=!1,N.prototype.debug_list_atn_decisions=!1,N.prototype.dfa_debug=!1,N.prototype.retry_debug=!1,N.prototype.reset=function(){},N.prototype.adaptivePredict=function(e,t,r){(this.debug||this.debug_list_atn_decisions)&&console.log("adaptivePredict decision "+t+" exec LA(1)=="+this.getLookaheadName(e)+" line "+e.LT(1).line+":"+e.LT(1).column),this._input=e,this._startIndex=e.index,this._outerContext=r;var n=this.decisionToDFA[t];this._dfa=n;var i=e.mark(),s=e.index;try{var o;if(null===(o=n.precedenceDfa?n.getPrecedenceStartState(this.parser.getPrecedence()):n.s0)){null===r&&(r=y.EMPTY),(this.debug||this.debug_list_atn_decisions)&&console.log("predictATN decision "+n.decision+" exec LA(1)=="+this.getLookaheadName(e)+", outerContext="+r.toString(this.parser.ruleNames));var a=this.computeStartState(n.atnStartState,y.EMPTY,!1);n.precedenceDfa?(n.s0.configs=a,a=this.applyPrecedenceFilter(a),o=this.addDFAState(n,new h(null,a)),n.setPrecedenceStartState(this.parser.getPrecedence(),o)):(o=this.addDFAState(n,new h(null,a)),n.s0=o)}var l=this.execATN(n,o,e,s,r);return this.debug&&console.log("DFA after predictATN: "+n.toString(this.parser.literalNames)),l}finally{this._dfa=null,this.mergeCache=null,e.seek(s),e.release(i)}},N.prototype.execATN=function(e,t,r,n,i){var s;(this.debug||this.debug_list_atn_decisions)&&console.log("execATN decision "+e.decision+" exec LA(1)=="+this.getLookaheadName(r)+" line "+r.LT(1).line+":"+r.LT(1).column);var o=t;this.debug&&console.log("s0 = "+t);for(var l=r.LA(1);;){var p=this.getExistingTargetState(o,l);if(null===p&&(p=this.computeTargetState(e,o,l)),p===f.ERROR){var u=this.noViableAlt(r,i,o.configs,n);if(r.seek(n),(s=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(o.configs,i))!==a.INVALID_ALT_NUMBER)return s;throw u}if(p.requiresFullContext&&this.predictionMode!==m.SLL){var h=null;if(null!==p.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");var d=r.index;if(d!==n&&r.seek(n),1===(h=this.evalSemanticContext(p.predicates,i,!0)).length)return this.debug&&console.log("Full LL avoided"),h.minValue();d!==n&&r.seek(d)}this.dfa_debug&&console.log("ctx sensitive state "+i+" in "+p);var y=this.computeStartState(e.atnStartState,i,!0);return this.reportAttemptingFullContext(e,h,p.configs,n,r.index),this.execATNWithFullContext(e,p,y,r,n,i)}if(p.isAcceptState){if(null===p.predicates)return p.prediction;var g=r.index;r.seek(n);var T=this.evalSemanticContext(p.predicates,i,!0);if(0===T.length)throw this.noViableAlt(r,i,p.configs,n);return 1===T.length||this.reportAmbiguity(e,p,n,g,!1,T,p.configs),T.minValue()}o=p,l!==c.EOF&&(r.consume(),l=r.LA(1))}},N.prototype.getExistingTargetState=function(e,t){var r=e.edges;return null===r?null:r[t+1]||null},N.prototype.computeTargetState=function(e,t,r){var i=this.computeReachSet(t.configs,r,!1);if(null===i)return this.addDFAEdge(e,t,r,f.ERROR),f.ERROR;var s=new h(null,i),o=this.getUniqueAlt(i);if(this.debug){var l=m.getConflictingAltSubsets(i);console.log("SLL altSubSets="+n.arrayToString(l)+", previous="+t.configs+", configs="+i+", predict="+o+", allSubsetsConflict="+m.allSubsetsConflict(l)+", conflictingAlts="+this.getConflictingAlts(i))}return o!==a.INVALID_ALT_NUMBER?(s.isAcceptState=!0,s.configs.uniqueAlt=o,s.prediction=o):m.hasSLLConflictTerminatingPrediction(this.predictionMode,i)&&(s.configs.conflictingAlts=this.getConflictingAlts(i),s.requiresFullContext=!0,s.isAcceptState=!0,s.prediction=s.configs.conflictingAlts.minValue()),s.isAcceptState&&s.configs.hasSemanticContext&&(this.predicateDFAState(s,this.atn.getDecisionState(e.decision)),null!==s.predicates&&(s.prediction=a.INVALID_ALT_NUMBER)),this.addDFAEdge(e,t,r,s)},N.prototype.predicateDFAState=function(e,t){var r=t.transitions.length,n=this.getConflictingAltsOrUniqueAlt(e.configs),i=this.getPredsForAmbigAlts(n,e.configs,r);null!==i?(e.predicates=this.getPredicatePredictions(n,i),e.prediction=a.INVALID_ALT_NUMBER):e.prediction=n.minValue()},N.prototype.execATNWithFullContext=function(e,t,r,n,i,s){(this.debug||this.debug_list_atn_decisions)&&console.log("execATNWithFullContext "+r);var o=!1,l=null,p=r;n.seek(i);for(var u=n.LA(1),h=-1;;){if(null===(l=this.computeReachSet(p,u,!0))){var d=this.noViableAlt(n,s,p,i);n.seek(i);var f=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(p,s);if(f!==a.INVALID_ALT_NUMBER)return f;throw d}var y=m.getConflictingAltSubsets(l);if(this.debug&&console.log("LL altSubSets="+y+", predict="+m.getUniqueAlt(y)+", resolvesToJustOneViableAlt="+m.resolvesToJustOneViableAlt(y)),l.uniqueAlt=this.getUniqueAlt(l),l.uniqueAlt!==a.INVALID_ALT_NUMBER){h=l.uniqueAlt;break}if(this.predictionMode!==m.LL_EXACT_AMBIG_DETECTION){if((h=m.resolvesToJustOneViableAlt(y))!==a.INVALID_ALT_NUMBER)break}else if(m.allSubsetsConflict(y)&&m.allSubsetsEqual(y)){o=!0,h=m.getSingleViableAlt(y);break}p=l,u!==c.EOF&&(n.consume(),u=n.LA(1))}return l.uniqueAlt!==a.INVALID_ALT_NUMBER?(this.reportContextSensitivity(e,h,l,i,n.index),h):(this.reportAmbiguity(e,t,i,n.index,o,null,l),h)},N.prototype.computeReachSet=function(e,t,r){this.debug&&console.log("in computeReachSet, starting closure: "+e),null===this.mergeCache&&(this.mergeCache=new o);for(var n=new u(r),s=null,l=0;l<e.items.length;l++){var h=e.items[l];if(this.debug_add&&console.log("testing "+this.getTokenName(t)+" at "+h),h.state instanceof T)(r||t===c.EOF)&&(null===s&&(s=[]),s.push(h),this.debug_add&&console.log("added "+h+" to skippedStopStates"));else for(var d=0;d<h.state.transitions.length;d++){var f=h.state.transitions[d],y=this.getReachableTarget(f,t);if(null!==y){var g=new p({state:y},h);n.add(g,this.mergeCache),this.debug_add&&console.log("added "+g+" to intermediate")}}}var v=null;if(null===s&&t!==c.EOF&&(1===n.items.length||this.getUniqueAlt(n)!==a.INVALID_ALT_NUMBER)&&(v=n),null===v){v=new u(r);for(var b=new i,S=t===c.EOF,x=0;x<n.items.length;x++)this.closure(n.items[x],v,b,!1,r,S)}if(t===c.EOF&&(v=this.removeAllConfigsNotInRuleStopState(v,v===n)),!(null===s||r&&m.hasConfigInRuleStopState(v)))for(var E=0;E<s.length;E++)v.add(s[E],this.mergeCache);return 0===v.items.length?null:v},N.prototype.removeAllConfigsNotInRuleStopState=function(e,t){if(m.allConfigsInRuleStopStates(e))return e;for(var r=new u(e.fullCtx),n=0;n<e.items.length;n++){var i=e.items[n];if(i.state instanceof T)r.add(i,this.mergeCache);else if(t&&i.state.epsilonOnlyTransitions&&this.atn.nextTokens(i.state).contains(c.EPSILON)){var s=this.atn.ruleToStopState[i.state.ruleIndex];r.add(new p({state:s},i),this.mergeCache)}}return r},N.prototype.computeStartState=function(e,t,r){for(var n=_(this.atn,t),s=new u(r),o=0;o<e.transitions.length;o++){var a=e.transitions[o].target,l=new p({state:a,alt:o+1,context:n},null),c=new i;this.closure(l,s,c,!0,r,!1)}return s},N.prototype.applyPrecedenceFilter=function(e){for(var t,r=[],n=new u(e.fullCtx),i=0;i<e.items.length;i++)if(1===(t=e.items[i]).alt){var s=t.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==s&&(r[t.state.stateNumber]=t.context,s!==t.semanticContext?n.add(new p({semanticContext:s},t),this.mergeCache):n.add(t,this.mergeCache))}for(i=0;i<e.items.length;i++)if(1!==(t=e.items[i]).alt){if(!t.precedenceFilterSuppressed){var o=r[t.state.stateNumber]||null;if(null!==o&&o.equals(t.context))continue}n.add(t,this.mergeCache)}return n},N.prototype.getReachableTarget=function(e,t){return e.matches(t,0,this.atn.maxTokenType)?e.target:null},N.prototype.getPredsForAmbigAlts=function(e,t,r){for(var i=[],s=0;s<t.items.length;s++){var o=t.items[s];e.contains(o.alt)&&(i[o.alt]=g.orContext(i[o.alt]||null,o.semanticContext))}var a=0;for(s=1;s<r+1;s++){var l=i[s]||null;null===l?i[s]=g.NONE:l!==g.NONE&&(a+=1)}return 0===a&&(i=null),this.debug&&console.log("getPredsForAmbigAlts result "+n.arrayToString(i)),i},N.prototype.getPredicatePredictions=function(e,t){for(var r=[],n=!1,i=1;i<t.length;i++){var s=t[i];null!==e&&e.contains(i)&&r.push(new d(s,i)),s!==g.NONE&&(n=!0)}return n?r:null},N.prototype.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule=function(e,t){var r=this.splitAccordingToSemanticValidity(e,t),n=r[0],i=r[1],s=this.getAltThatFinishedDecisionEntryRule(n);return s!==a.INVALID_ALT_NUMBER||i.items.length>0&&(s=this.getAltThatFinishedDecisionEntryRule(i))!==a.INVALID_ALT_NUMBER?s:a.INVALID_ALT_NUMBER},N.prototype.getAltThatFinishedDecisionEntryRule=function(e){for(var t=[],r=0;r<e.items.length;r++){var n=e.items[r];(n.reachesIntoOuterContext>0||n.state instanceof T&&n.context.hasEmptyPath())&&t.indexOf(n.alt)<0&&t.push(n.alt)}return 0===t.length?a.INVALID_ALT_NUMBER:Math.min.apply(null,t)},N.prototype.splitAccordingToSemanticValidity=function(e,t){for(var r=new u(e.fullCtx),n=new u(e.fullCtx),i=0;i<e.items.length;i++){var s=e.items[i];s.semanticContext!==g.NONE?s.semanticContext.evaluate(this.parser,t)?r.add(s):n.add(s):r.add(s)}return[r,n]},N.prototype.evalSemanticContext=function(e,t,r){for(var n=new s,i=0;i<e.length;i++){var o=e[i];if(o.pred!==g.NONE){var a=o.pred.evaluate(this.parser,t);if((this.debug||this.dfa_debug)&&console.log("eval pred "+o+"="+a),a&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+o.alt),n.add(o.alt),!r))break}else if(n.add(o.alt),!r)break}return n},N.prototype.closure=function(e,t,r,n,i,s){this.closureCheckingStopState(e,t,r,n,i,0,s)},N.prototype.closureCheckingStopState=function(e,t,r,n,i,s,o){if((this.debug||this.debug_closure)&&(console.log("closure("+e.toString(this.parser,!0)+")"),e.reachesIntoOuterContext>50))throw"problem";if(e.state instanceof T){if(!e.context.isEmpty()){for(var a=0;a<e.context.length;a++)if(e.context.getReturnState(a)!==v.EMPTY_RETURN_STATE){var l=this.atn.states[e.context.getReturnState(a)],u=e.context.getParent(a),c={state:l,alt:e.alt,context:u,semanticContext:e.semanticContext},h=new p(c,null);h.reachesIntoOuterContext=e.reachesIntoOuterContext,this.closureCheckingStopState(h,t,r,n,i,s-1,o)}else{if(i){t.add(new p({state:e.state,context:v.EMPTY},e),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex)),this.closure_(e,t,r,n,i,s,o)}return}if(i)return void t.add(e,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex))}this.closure_(e,t,r,n,i,s,o)},N.prototype.closure_=function(e,t,r,n,i,s,o){var a=e.state;a.epsilonOnlyTransitions||t.add(e,this.mergeCache);for(var l=0;l<a.transitions.length;l++)if(0!=l||!this.canDropLoopEntryEdgeInLeftRecursiveRule(e)){var p=a.transitions[l],u=n&&!(p instanceof P),c=this.getEpsilonTarget(e,p,u,0===s,i,o);if(null!==c){var h=s;if(e.state instanceof T){if(null!==this._dfa&&this._dfa.precedenceDfa&&p.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(c.precedenceFilterSuppressed=!0),c.reachesIntoOuterContext+=1,r.add(c)!==c)continue;t.dipsIntoOuterContext=!0,h-=1,this.debug&&console.log("dips into outer ctx: "+c)}else{if(!p.isEpsilon&&r.add(c)!==c)continue;p instanceof A&&h>=0&&(h+=1)}this.closureCheckingStopState(c,t,r,u,i,h,o)}}},N.prototype.canDropLoopEntryEdgeInLeftRecursiveRule=function(e){var t=e.state;if(t.stateType!=l.STAR_LOOP_ENTRY)return!1;if(t.stateType!=l.STAR_LOOP_ENTRY||!t.isPrecedenceDecision||e.context.isEmpty()||e.context.hasEmptyPath())return!1;for(var r=e.context.length,n=0;n<r;n++)if((o=this.atn.states[e.context.getReturnState(n)]).ruleIndex!=t.ruleIndex)return!1;var i=t.transitions[0].target.endState.stateNumber,s=this.atn.states[i];for(n=0;n<r;n++){var o,a=e.context.getReturnState(n);if(1!=(o=this.atn.states[a]).transitions.length||!o.transitions[0].isEpsilon)return!1;var p=o.transitions[0].target;if(!(o.stateType==l.BLOCK_END&&p==t||o==s||p==s||p.stateType==l.BLOCK_END&&1==p.transitions.length&&p.transitions[0].isEpsilon&&p.transitions[0].target==t))return!1}return!0},N.prototype.getRuleName=function(e){return null!==this.parser&&e>=0?this.parser.ruleNames[e]:"<rule "+e+">"},N.prototype.getEpsilonTarget=function(e,t,r,n,i,s){switch(t.serializationType){case x.RULE:return this.ruleTransition(e,t);case x.PRECEDENCE:return this.precedenceTransition(e,t,r,n,i);case x.PREDICATE:return this.predTransition(e,t,r,n,i);case x.ACTION:return this.actionTransition(e,t);case x.EPSILON:return new p({state:t.target},e);case x.ATOM:case x.RANGE:case x.SET:return s&&t.matches(c.EOF,0,1)?new p({state:t.target},e):null;default:return null}},N.prototype.actionTransition=function(e,t){if(this.debug){var r=-1==t.actionIndex?65535:t.actionIndex;console.log("ACTION edge "+t.ruleIndex+":"+r)}return new p({state:t.target},e)},N.prototype.precedenceTransition=function(e,t,r,i,s){this.debug&&(console.log("PRED (collectPredicates="+r+") "+t.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+n.arrayToString(this.parser.getRuleInvocationStack())));var o=null;if(r&&i)if(s){var a=this._input.index;this._input.seek(this._startIndex);var l=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(a),l&&(o=new p({state:t.target},e))}else{var u=g.andContext(e.semanticContext,t.getPredicate());o=new p({state:t.target,semanticContext:u},e)}else o=new p({state:t.target},e);return this.debug&&console.log("config from pred transition="+o),o},N.prototype.predTransition=function(e,t,r,i,s){this.debug&&(console.log("PRED (collectPredicates="+r+") "+t.ruleIndex+":"+t.predIndex+", ctx dependent="+t.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+n.arrayToString(this.parser.getRuleInvocationStack())));var o=null;if(r&&(t.isCtxDependent&&i||!t.isCtxDependent))if(s){var a=this._input.index;this._input.seek(this._startIndex);var l=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(a),l&&(o=new p({state:t.target},e))}else{var u=g.andContext(e.semanticContext,t.getPredicate());o=new p({state:t.target,semanticContext:u},e)}else o=new p({state:t.target},e);return this.debug&&console.log("config from pred transition="+o),o},N.prototype.ruleTransition=function(e,t){this.debug&&console.log("CALL rule "+this.getRuleName(t.target.ruleIndex)+", ctx="+e.context);var r=t.followState,n=C.create(e.context,r.stateNumber);return new p({state:t.target,context:n},e)},N.prototype.getConflictingAlts=function(e){var t=m.getConflictingAltSubsets(e);return m.getAlts(t)},N.prototype.getConflictingAltsOrUniqueAlt=function(e){var t=null;return e.uniqueAlt!==a.INVALID_ALT_NUMBER?(t=new s).add(e.uniqueAlt):t=e.conflictingAlts,t},N.prototype.getTokenName=function(e){if(e===c.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(e>=this.parser.literalNames.length&&e>=this.parser.symbolicNames.length))return(this.parser.literalNames[e]||this.parser.symbolicNames[e])+"<"+e+">";console.log(e+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+e},N.prototype.getLookaheadName=function(e){return this.getTokenName(e.LA(1))},N.prototype.dumpDeadEndConfigs=function(e){console.log("dead end configs: ");for(var t=e.getDeadEndConfigs(),r=0;r<t.length;r++){var n=t[r],i="no edges";if(n.state.transitions.length>0){var s=n.state.transitions[0];s instanceof AtomTransition?i="Atom "+this.getTokenName(s.label):s instanceof E&&(i=(s instanceof w?"~":"")+"Set "+s.set)}console.error(n.toString(this.parser,!0)+":"+i)}},N.prototype.noViableAlt=function(e,t,r,n){return new I(this.parser,e,e.get(n),e.LT(1),r,t)},N.prototype.getUniqueAlt=function(e){for(var t=a.INVALID_ALT_NUMBER,r=0;r<e.items.length;r++){var n=e.items[r];if(t===a.INVALID_ALT_NUMBER)t=n.alt;else if(n.alt!==t)return a.INVALID_ALT_NUMBER}return t},N.prototype.addDFAEdge=function(e,t,r,n){if(this.debug&&console.log("EDGE "+t+" -> "+n+" upon "+this.getTokenName(r)),null===n)return null;if(n=this.addDFAState(e,n),null===t||r<-1||r>this.atn.maxTokenType)return n;if(null===t.edges&&(t.edges=[]),t.edges[r+1]=n,this.debug){var i=null===this.parser?null:this.parser.literalNames,s=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+e.toString(i,s))}return n},N.prototype.addDFAState=function(e,t){if(t==f.ERROR)return t;var r=e.states.get(t);return null!==r?r:(t.stateNumber=e.states.length,t.configs.readOnly||(t.configs.optimizeConfigs(this),t.configs.setReadonly(!0)),e.states.add(t),this.debug&&console.log("adding new DFA state: "+t),t)},N.prototype.reportAttemptingFullContext=function(e,t,r,n,i){if(this.debug||this.retry_debug){var s=new b(n,i+1);console.log("reportAttemptingFullContext decision="+e.decision+":"+r+", input="+this.parser.getTokenStream().getText(s))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,e,n,i,t,r)},N.prototype.reportContextSensitivity=function(e,t,r,n,i){if(this.debug||this.retry_debug){var s=new b(n,i+1);console.log("reportContextSensitivity decision="+e.decision+":"+r+", input="+this.parser.getTokenStream().getText(s))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,e,n,i,t,r)},N.prototype.reportAmbiguity=function(e,t,r,n,i,s,o){if(this.debug||this.retry_debug){var a=new b(r,n+1);console.log("reportAmbiguity "+s+":"+o+", input="+this.parser.getTokenStream().getText(a))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,e,r,n,i,s,o)},t.ParserATNSimulator=N},7842:(e,t,r)=>{var n=r(66346).Set,i=r(66346).Hash;function s(){return this}function o(e,t,r){return s.call(this),this.ruleIndex=void 0===e?-1:e,this.predIndex=void 0===t?-1:t,this.isCtxDependent=void 0!==r&&r,this}function a(e){s.call(this),this.precedence=void 0===e?0:e}function l(e,t){s.call(this);var r=new n;e instanceof l?e.opnds.map((function(e){r.add(e)})):r.add(e),t instanceof l?t.opnds.map((function(e){r.add(e)})):r.add(t);var i=a.filterPrecedencePredicates(r);if(i.length>0){var o=null;i.map((function(e){(null===o||e.precedence<o.precedence)&&(o=e)})),r.add(o)}return this.opnds=r.values(),this}function p(e,t){s.call(this);var r=new n;e instanceof p?e.opnds.map((function(e){r.add(e)})):r.add(e),t instanceof p?t.opnds.map((function(e){r.add(e)})):r.add(t);var i=a.filterPrecedencePredicates(r);if(i.length>0){var o=i.sort((function(e,t){return e.compareTo(t)})),l=o[o.length-1];r.add(l)}return this.opnds=r.values(),this}s.prototype.hashCode=function(){var e=new i;return this.updateHashCode(e),e.finish()},s.prototype.evaluate=function(e,t){},s.prototype.evalPrecedence=function(e,t){return this},s.andContext=function(e,t){if(null===e||e===s.NONE)return t;if(null===t||t===s.NONE)return e;var r=new l(e,t);return 1===r.opnds.length?r.opnds[0]:r},s.orContext=function(e,t){if(null===e)return t;if(null===t)return e;if(e===s.NONE||t===s.NONE)return s.NONE;var r=new p(e,t);return 1===r.opnds.length?r.opnds[0]:r},o.prototype=Object.create(s.prototype),o.prototype.constructor=o,s.NONE=new o,o.prototype.evaluate=function(e,t){var r=this.isCtxDependent?t:null;return e.sempred(r,this.ruleIndex,this.predIndex)},o.prototype.updateHashCode=function(e){e.update(this.ruleIndex,this.predIndex,this.isCtxDependent)},o.prototype.equals=function(e){return this===e||e instanceof o&&this.ruleIndex===e.ruleIndex&&this.predIndex===e.predIndex&&this.isCtxDependent===e.isCtxDependent},o.prototype.toString=function(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"},a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.evaluate=function(e,t){return e.precpred(t,this.precedence)},a.prototype.evalPrecedence=function(e,t){return e.precpred(t,this.precedence)?s.NONE:null},a.prototype.compareTo=function(e){return this.precedence-e.precedence},a.prototype.updateHashCode=function(e){e.update(31)},a.prototype.equals=function(e){return this===e||e instanceof a&&this.precedence===e.precedence},a.prototype.toString=function(){return"{"+this.precedence+">=prec}?"},a.filterPrecedencePredicates=function(e){var t=[];return e.values().map((function(e){e instanceof a&&t.push(e)})),t},l.prototype=Object.create(s.prototype),l.prototype.constructor=l,l.prototype.equals=function(e){return this===e||e instanceof l&&this.opnds===e.opnds},l.prototype.updateHashCode=function(e){e.update(this.opnds,"AND")},l.prototype.evaluate=function(e,t){for(var r=0;r<this.opnds.length;r++)if(!this.opnds[r].evaluate(e,t))return!1;return!0},l.prototype.evalPrecedence=function(e,t){for(var r=!1,n=[],i=0;i<this.opnds.length;i++){var o=this.opnds[i],a=o.evalPrecedence(e,t);if(r|=a!==o,null===a)return null;a!==s.NONE&&n.push(a)}if(!r)return this;if(0===n.length)return s.NONE;var l=null;return n.map((function(e){l=null===l?e:s.andContext(l,e)})),l},l.prototype.toString=function(){var e="";return this.opnds.map((function(t){e+="&& "+t.toString()})),e.length>3?e.slice(3):e},p.prototype=Object.create(s.prototype),p.prototype.constructor=p,p.prototype.constructor=function(e){return this===e||e instanceof p&&this.opnds===e.opnds},p.prototype.updateHashCode=function(e){e.update(this.opnds,"OR")},p.prototype.evaluate=function(e,t){for(var r=0;r<this.opnds.length;r++)if(this.opnds[r].evaluate(e,t))return!0;return!1},p.prototype.evalPrecedence=function(e,t){for(var r=!1,n=[],i=0;i<this.opnds.length;i++){var o=this.opnds[i],a=o.evalPrecedence(e,t);if(r|=a!==o,a===s.NONE)return s.NONE;null!==a&&n.push(a)}if(!r)return this;if(0===n.length)return null;return n.map((function(e){return e})),null},p.prototype.toString=function(){var e="";return this.opnds.map((function(t){e+="|| "+t.toString()})),e.length>3?e.slice(3):e},t.Ij=s,t.Yi=a,t.mT=o},8794:(e,t,r)=>{var n=r(8925),i=r(73261);const s=(0,i.defineAliasedType)("Flow"),o=e=>{const t="DeclareClass"===e;s(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...t?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),extends:(0,i.validateOptional)((0,i.arrayOfType)("InterfaceExtends"))},t?{mixins:(0,i.validateOptional)((0,i.arrayOfType)("InterfaceExtends")),implements:(0,i.validateOptional)((0,i.arrayOfType)("ClassImplements"))}:{},{body:(0,i.validateType)("ObjectTypeAnnotation")})})};s("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,i.validateType)("FlowType")}}),s("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterInstantiation")}}),o("DeclareClass"),s("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),predicate:(0,i.validateOptionalType)("DeclaredPredicate")}}),o("DeclareInterface"),s("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier","StringLiteral"),body:(0,i.validateType)("BlockStatement"),kind:(0,i.validateOptional)((0,i.assertOneOf)("CommonJS","ES"))}}),s("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,i.validateType)("TypeAnnotation")}}),s("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),right:(0,i.validateType)("FlowType")}}),s("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,i.validateOptionalType)("FlowType"),impltype:(0,i.validateOptionalType)("FlowType")}}),s("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier")}}),s("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,i.validateOptionalType)("Flow"),specifiers:(0,i.validateOptional)((0,i.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,i.validateOptionalType)("StringLiteral"),default:(0,i.validateOptional)((0,i.assertValueType)("boolean"))},n.importAttributes)}),s("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,i.validateType)("StringLiteral"),exportKind:(0,i.validateOptional)((0,i.assertOneOf)("type","value"))},n.importAttributes)}),s("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,i.validateType)("Flow")}}),s("ExistsTypeAnnotation",{aliases:["FlowType"]}),s("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),params:(0,i.validateArrayOfType)("FunctionTypeParam"),rest:(0,i.validateOptionalType)("FunctionTypeParam"),this:(0,i.validateOptionalType)("FunctionTypeParam"),returnType:(0,i.validateType)("FlowType")}}),s("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,i.validateOptionalType)("Identifier"),typeAnnotation:(0,i.validateType)("FlowType"),optional:(0,i.validateOptional)((0,i.assertValueType)("boolean"))}}),s("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,i.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterInstantiation")}}),s("InferredPredicate",{aliases:["FlowPredicate"]}),s("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,i.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterInstantiation")}}),o("InterfaceDeclaration"),s("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,i.validateOptional)((0,i.arrayOfType)("InterfaceExtends")),body:(0,i.validateType)("ObjectTypeAnnotation")}}),s("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,i.validateType)("FlowType")}}),s("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,i.validate)((0,i.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,i.validate)((0,i.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,i.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,i.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,i.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,i.assertValueType)("boolean"),default:!1},inexact:(0,i.validateOptional)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,i.validateType)("Identifier"),value:(0,i.validateType)("FlowType"),optional:(0,i.validate)((0,i.assertValueType)("boolean")),static:(0,i.validate)((0,i.assertValueType)("boolean")),method:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,i.validateType)("FlowType"),static:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,i.validateOptionalType)("Identifier"),key:(0,i.validateType)("FlowType"),value:(0,i.validateType)("FlowType"),static:(0,i.validate)((0,i.assertValueType)("boolean")),variance:(0,i.validateOptionalType)("Variance")}}),s("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,i.validateType)("Identifier","StringLiteral"),value:(0,i.validateType)("FlowType"),kind:(0,i.validate)((0,i.assertOneOf)("init","get","set")),static:(0,i.validate)((0,i.assertValueType)("boolean")),proto:(0,i.validate)((0,i.assertValueType)("boolean")),optional:(0,i.validate)((0,i.assertValueType)("boolean")),variance:(0,i.validateOptionalType)("Variance"),method:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,i.validateType)("FlowType")}}),s("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,i.validateOptionalType)("FlowType"),impltype:(0,i.validateType)("FlowType")}}),s("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,i.validateType)("Identifier"),qualification:(0,i.validateType)("Identifier","QualifiedTypeIdentifier")}}),s("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,i.validate)((0,i.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,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,i.validateType)("FlowType")}}),s("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),right:(0,i.validateType)("FlowType")}}),s("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,i.validateType)("FlowType")}}),s("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,i.validateType)("Expression"),typeAnnotation:(0,i.validateType)("TypeAnnotation")}}),s("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,i.validate)((0,i.assertValueType)("string")),bound:(0,i.validateOptionalType)("TypeAnnotation"),default:(0,i.validateOptionalType)("FlowType"),variance:(0,i.validateOptionalType)("Variance")}}),s("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,i.validate)((0,i.arrayOfType)("TypeParameter"))}}),s("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("Variance",{builder:["kind"],fields:{kind:(0,i.validate)((0,i.assertOneOf)("minus","plus"))}}),s("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,i.validateType)("Identifier"),body:(0,i.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}}),s("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,i.validate)((0,i.assertValueType)("boolean")),members:(0,i.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,i.validate)((0,i.assertValueType)("boolean")),members:(0,i.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,i.validate)((0,i.assertValueType)("boolean")),members:(0,i.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,i.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,i.validateType)("Identifier"),init:(0,i.validateType)("BooleanLiteral")}}),s("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,i.validateType)("Identifier"),init:(0,i.validateType)("NumericLiteral")}}),s("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,i.validateType)("Identifier"),init:(0,i.validateType)("StringLiteral")}}),s("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,i.validateType)("Identifier")}}),s("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,i.validateType)("FlowType"),indexType:(0,i.validateType)("FlowType")}}),s("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,i.validateType)("FlowType"),indexType:(0,i.validateType)("FlowType"),optional:(0,i.validate)((0,i.assertValueType)("boolean"))}})},8925:(e,t,r)=>{var n=r(65994).process;Object.defineProperty(t,"__esModule",{value:!0}),t.patternLikeCommon=t.importAttributes=t.functionTypeAnnotationCommon=t.functionDeclarationCommon=t.functionCommon=t.classMethodOrPropertyUnionShapeCommon=t.classMethodOrPropertyCommon=t.classMethodOrDeclareMethodCommon=void 0;var i=r(23781),s=r(26228),o=r(98109),a=r(14286),l=r(62811),p=r(73261);const u=(e=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,p.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:e?(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});t.classMethodOrPropertyUnionShapeCommon=u;const c=(0,p.defineAliasedType)("Standardized");c("ArrayExpression",{fields:{elements:{validate:(0,p.arrayOf)((0,p.assertNodeOrValueType)("null","Expression","SpreadElement")),default:n.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]}),c("AssignmentExpression",{fields:{operator:{validate:n.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){const e=(0,p.assertOneOf)(...l.ASSIGNMENT_OPERATORS),t=(0,p.assertOneOf)("=");return function(r,n,s){((0,i.default)("Pattern",r.left)?t:e)(r,n,s)}}(),{oneOf:l.ASSIGNMENT_OPERATORS}):(0,p.assertValueType)("string")},left:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,p.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,p.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),c("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,p.assertOneOf)(...l.BINARY_OPERATORS)},left:{validate:function(){const e=(0,p.assertNodeType)("Expression"),t=(0,p.assertNodeType)("Expression","PrivateName");return Object.assign((function(r,n,i){("in"===r.operator?t:e)(r,n,i)}),{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,p.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),c("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,p.assertValueType)("string")}}}),c("Directive",{visitor:["value"],fields:{value:{validate:(0,p.assertNodeType)("DirectiveLiteral")}}}),c("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,p.assertValueType)("string")}}}),c("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,p.arrayOfType)("Directive"),default:[]},body:(0,p.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),c("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,p.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),c("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,p.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,p.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,p.assertNodeType)("TypeParameterInstantiation"),optional:!0}},n.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,p.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,p.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),c("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,p.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,p.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]}),c("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,p.assertNodeType)("Expression")},consequent:{validate:(0,p.assertNodeType)("Expression")},alternate:{validate:(0,p.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),c("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,p.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),c("DebuggerStatement",{aliases:["Statement"]}),c("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,p.assertNodeType)("Expression")},body:{validate:(0,p.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),c("EmptyStatement",{aliases:["Statement"]}),c("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,p.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),c("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,p.assertNodeType)("Program")},comments:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.assertEach)((0,p.assertNodeType)("CommentBlock","CommentLine")):Object.assign((()=>{}),{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,p.assertEach)(Object.assign((()=>{}),{type:"any"})),optional:!0}}}),c("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,p.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,p.assertNodeType)("Expression")},body:{validate:(0,p.assertNodeType)("Statement")}}}),c("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,p.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,p.assertNodeType)("Expression"),optional:!0},update:{validate:(0,p.assertNodeType)("Expression"),optional:!0},body:{validate:(0,p.assertNodeType)("Statement")}}});const h=()=>({params:(0,p.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});t.functionCommon=h;const d=()=>({returnType:{validate:(0,p.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,p.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});t.functionTypeAnnotationCommon=d;const f=()=>Object.assign({},h(),{declare:{validate:(0,p.assertValueType)("boolean"),optional:!0},id:{validate:(0,p.assertNodeType)("Identifier"),optional:!0}});t.functionDeclarationCommon=f,c("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},f(),d(),{body:{validate:(0,p.assertNodeType)("BlockStatement")},predicate:{validate:(0,p.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:n.env.BABEL_TYPES_8_BREAKING?function(){const e=(0,p.assertNodeType)("Identifier");return function(t,r,n){(0,i.default)("ExportDefaultDeclaration",t)||e(n,"id",n.id)}}():void 0}),c("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},h(),d(),{id:{validate:(0,p.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,p.assertNodeType)("BlockStatement")},predicate:{validate:(0,p.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});const m=()=>({typeAnnotation:{validate:(0,p.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,p.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0}});t.patternLikeCommon=m,c("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},m(),{name:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertValueType)("string"),Object.assign((function(e,t,r){if(!(0,s.default)(r,!1))throw new TypeError(`"${r}" is not a valid identifier name`)}),{type:"string"})):(0,p.assertValueType)("string")}}),validate:n.env.BABEL_TYPES_8_BREAKING?function(e,t,r){const n=/\.(\w+)$/.exec(t.toString());if(!n)return;const[,s]=n,a={computed:!1};if("property"===s){if((0,i.default)("MemberExpression",e,a))return;if((0,i.default)("OptionalMemberExpression",e,a))return}else if("key"===s){if((0,i.default)("Property",e,a))return;if((0,i.default)("Method",e,a))return}else if("exported"===s){if((0,i.default)("ExportSpecifier",e))return}else if("imported"===s){if((0,i.default)("ImportSpecifier",e,{imported:r}))return}else if("meta"===s&&(0,i.default)("MetaProperty",e,{meta:r}))return;if(((0,o.isKeyword)(r.name)||(0,o.isReservedWord)(r.name,!1))&&"this"!==r.name)throw new TypeError(`"${r.name}" is not a valid identifier`)}:void 0}),c("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,p.assertNodeType)("Expression")},consequent:{validate:(0,p.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,p.assertNodeType)("Statement")}}}),c("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,p.assertNodeType)("Identifier")},body:{validate:(0,p.assertNodeType)("Statement")}}}),c("StringLiteral",{builder:["value"],fields:{value:{validate:(0,p.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),c("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,p.chain)((0,p.assertValueType)("number"),Object.assign((function(e,t,r){(1/r<0||!Number.isFinite(r))&&new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${r}) instead.`)}),{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),c("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),c("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,p.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),c("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,p.assertValueType)("string")},flags:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertValueType)("string"),Object.assign((function(e,t,r){const n=/[^dgimsuvy]/.exec(r);if(n)throw new TypeError(`"${n[0]}" is not a valid RegExp flag`)}),{type:"string"})):(0,p.assertValueType)("string"),default:""}}}),c("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,p.assertOneOf)(...l.LOGICAL_OPERATORS)},left:{validate:(0,p.assertNodeType)("Expression")},right:{validate:(0,p.assertNodeType)("Expression")}}}),c("MemberExpression",{builder:["object","property","computed",...n.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,p.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,p.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,p.assertNodeType)("Expression","Super")},property:{validate:function(){const e=(0,p.assertNodeType)("Identifier","PrivateName"),t=(0,p.assertNodeType)("Expression"),r=function(r,n,i){(r.computed?t:e)(r,n,i)};return r.oneOfNodeTypes=["Expression","Identifier","PrivateName"],r}()},computed:{default:!1}},n.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,p.assertValueType)("boolean"),optional:!0}})}),c("NewExpression",{inherits:"CallExpression"}),c("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,p.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,p.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,p.arrayOfType)("Directive"),default:[]},body:(0,p.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]}),c("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,p.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}}),c("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},u(),{fields:Object.assign({},h(),d(),{kind:Object.assign({validate:(0,p.assertOneOf)("method","get","set")},n.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){const e=(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=(0,p.assertNodeType)("Expression"),r=function(r,n,i){(r.computed?t:e)(r,n,i)};return r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],r}()},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,p.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]})),c("ObjectProperty",{builder:["key","value","computed","shorthand",...n.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,p.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){const e=(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),t=(0,p.assertNodeType)("Expression");return Object.assign((function(r,n,i){(r.computed?t:e)(r,n,i)}),{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,p.assertNodeType)("Expression","PatternLike")},shorthand:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertValueType)("boolean"),Object.assign((function(e,t,r){if(r){if(e.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,i.default)("Identifier",e.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}}),{type:"boolean"})):(0,p.assertValueType)("boolean"),default:!1},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:n.env.BABEL_TYPES_8_BREAKING?function(){const e=(0,p.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),t=(0,p.assertNodeType)("Expression");return function(r,n,s){((0,i.default)("ObjectPattern",r)?e:t)(s,"value",s.value)}}():void 0}),c("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},m(),{argument:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,p.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:n.env.BABEL_TYPES_8_BREAKING?function(e,t){const r=/(\w+)\[(\d+)\]/.exec(t.toString());if(!r)throw new Error("Internal Babel error: malformed key.");const[,n,i]=r;if(e[n].length>+i+1)throw new TypeError(`RestElement must be last element of ${n}`)}:void 0}),c("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,p.assertNodeType)("Expression"),optional:!0}}}),c("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,p.validateArrayOfType)("Expression")},aliases:["Expression"]}),c("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,p.assertNodeType)("Expression")}}}),c("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,p.assertNodeType)("Expression"),optional:!0},consequent:(0,p.validateArrayOfType)("Statement")}}),c("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,p.assertNodeType)("Expression")},cases:(0,p.validateArrayOfType)("SwitchCase")}}),c("ThisExpression",{aliases:["Expression"]}),c("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,p.assertNodeType)("Expression")}}}),c("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertNodeType)("BlockStatement"),Object.assign((function(e){if(!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")}),{oneOfNodeTypes:["BlockStatement"]})):(0,p.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,p.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,p.assertNodeType)("BlockStatement")}}}),c("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,p.assertNodeType)("Expression")},operator:{validate:(0,p.assertOneOf)(...l.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),c("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.assertNodeType)("Identifier","MemberExpression"):(0,p.assertNodeType)("Expression")},operator:{validate:(0,p.assertOneOf)(...l.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),c("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,p.assertValueType)("boolean"),optional:!0},kind:{validate:(0,p.assertOneOf)("var","let","const","using","await using")},declarations:(0,p.validateArrayOfType)("VariableDeclarator")},validate:n.env.BABEL_TYPES_8_BREAKING?(()=>{const e=(0,p.assertNodeType)("Identifier","Placeholder"),t=(0,p.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),r=(0,p.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(n,s,o){const{kind:a,declarations:l}=o,p=(0,i.default)("ForXStatement",n,{left:o});if(p&&1!==l.length)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${n.type}`);for(const n of l)"const"===a||"let"===a||"var"===a?p||n.init?t(n,"id",n.id):e(n,"id",n.id):r(n,"id",n.id)}})():void 0}),c("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,p.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,p.assertValueType)("boolean")},init:{optional:!0,validate:(0,p.assertNodeType)("Expression")}}}),c("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,p.assertNodeType)("Expression")},body:{validate:(0,p.assertNodeType)("Statement")}}}),c("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,p.assertNodeType)("Expression")},body:{validate:(0,p.assertNodeType)("Statement")}}}),c("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},m(),{left:{validate:(0,p.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,p.assertNodeType)("Expression")},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0}})}),c("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},m(),{elements:{validate:(0,p.chain)((0,p.assertValueType)("array"),(0,p.assertEach)((0,p.assertNodeOrValueType)("null","PatternLike")))}})}),c("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},h(),d(),{expression:{validate:(0,p.assertValueType)("boolean")},body:{validate:(0,p.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,p.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})}),c("ClassBody",{visitor:["body"],fields:{body:(0,p.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),c("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,p.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,p.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,p.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,p.assertNodeType)("Expression")},superTypeParameters:{validate:(0,p.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,p.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,p.assertNodeType)("InterfaceExtends"),optional:!0}}}),c("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,p.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,p.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,p.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,p.assertNodeType)("Expression")},superTypeParameters:{validate:(0,p.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,p.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,p.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,p.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,p.assertValueType)("boolean"),optional:!0}},validate:n.env.BABEL_TYPES_8_BREAKING?function(){const e=(0,p.assertNodeType)("Identifier");return function(t,r,n){(0,i.default)("ExportDefaultDeclaration",t)||e(n,"id",n.id)}}():void 0});const y=t.importAttributes={attributes:{optional:!0,validate:(0,p.arrayOfType)("ImportAttribute")}};y.assertions={deprecated:!0,optional:!0,validate:(0,p.arrayOfType)("ImportAttribute")},c("ExportAllDeclaration",{builder:["source","attributes"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,p.assertNodeType)("StringLiteral")},exportKind:(0,p.validateOptional)((0,p.assertOneOf)("type","value"))},y)}),c("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,p.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,p.validateOptional)((0,p.assertOneOf)("value"))}}),c("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertNodeType)("Declaration"),Object.assign((function(e,t,r){if(r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(r&&e.source)throw new TypeError("Cannot export a declaration from a source")}),{oneOfNodeTypes:["Declaration"]})):(0,p.assertNodeType)("Declaration")}},y,{specifiers:{default:[],validate:(0,p.arrayOf)(function(){const e=(0,p.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=(0,p.assertNodeType)("ExportSpecifier");return n.env.BABEL_TYPES_8_BREAKING?Object.assign((function(r,n,i){(r.source?e:t)(r,n,i)}),{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):e}())},source:{validate:(0,p.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,p.validateOptional)((0,p.assertOneOf)("type","value"))})}),c("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,p.assertNodeType)("Identifier")},exported:{validate:(0,p.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,p.assertOneOf)("type","value"),optional:!0}}}),c("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!n.env.BABEL_TYPES_8_BREAKING)return(0,p.assertNodeType)("VariableDeclaration","LVal");const e=(0,p.assertNodeType)("VariableDeclaration"),t=(0,p.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign((function(r,n,s){(0,i.default)("VariableDeclaration",s)?e(r,n,s):t(r,n,s)}),{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,p.assertNodeType)("Expression")},body:{validate:(0,p.assertNodeType)("Statement")},await:{default:!1}}}),c("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},y,{module:{optional:!0,validate:(0,p.assertValueType)("boolean")},phase:{default:null,validate:(0,p.assertOneOf)("source","defer")},specifiers:(0,p.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,p.assertNodeType)("StringLiteral")},importKind:{validate:(0,p.assertOneOf)("type","typeof","value"),optional:!0}})}),c("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,p.assertNodeType)("Identifier")}}}),c("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,p.assertNodeType)("Identifier")}}}),c("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,p.assertNodeType)("Identifier")},imported:{validate:(0,p.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,p.assertOneOf)("type","typeof","value"),optional:!0}}}),c("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,p.assertOneOf)("source","defer")},source:{validate:(0,p.assertNodeType)("Expression")},options:{validate:(0,p.assertNodeType)("Expression"),optional:!0}}}),c("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertNodeType)("Identifier"),Object.assign((function(e,t,r){let n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta"}if(!(0,i.default)("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")}),{oneOfNodeTypes:["Identifier"]})):(0,p.assertNodeType)("Identifier")},property:{validate:(0,p.assertNodeType)("Identifier")}}});const g=()=>({abstract:{validate:(0,p.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,p.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,p.assertValueType)("boolean"),optional:!0},key:{validate:(0,p.chain)(function(){const e=(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=(0,p.assertNodeType)("Expression");return function(r,n,i){(r.computed?t:e)(r,n,i)}}(),(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});t.classMethodOrPropertyCommon=g;const T=()=>Object.assign({},h(),g(),{params:(0,p.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,p.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,p.chain)((0,p.assertValueType)("string"),(0,p.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0}});t.classMethodOrDeclareMethodCommon=T,c("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},u(),{fields:Object.assign({},T(),d(),{body:{validate:(0,p.assertNodeType)("BlockStatement")}})})),c("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},m(),{properties:(0,p.validateArrayOfType)("RestElement","ObjectProperty")})}),c("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,p.assertNodeType)("Expression")}}}),c("Super",{aliases:["Expression"]}),c("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,p.assertNodeType)("Expression")},quasi:{validate:(0,p.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,p.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),c("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,p.chain)((0,p.assertShape)({raw:{validate:(0,p.assertValueType)("string")},cooked:{validate:(0,p.assertValueType)("string"),optional:!0}}),(function(e){const t=e.value.raw;let r=!1;const n=()=>{throw new Error("Internal @babel/types error.")},{str:i,firstInvalidLoc:s}=(0,a.readStringContents)("template",t,0,0,0,{unterminated(){r=!0},strictNumericEscape:n,invalidEscapeSequence:n,numericSeparatorInEscapeSequence:n,unexpectedNumericSeparator:n,invalidDigit:n,invalidCodePoint:n});if(!r)throw new Error("Invalid raw");e.value.cooked=s?null:i}))},tail:{default:!1}}}),c("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,p.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,p.chain)((0,p.assertValueType)("array"),(0,p.assertEach)((0,p.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}`)}))}}}),c("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertValueType)("boolean"),Object.assign((function(e,t,r){if(r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}),{type:"boolean"})):(0,p.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,p.assertNodeType)("Expression")}}}),c("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,p.assertNodeType)("Expression")}}}),c("Import",{aliases:["Expression"]}),c("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,p.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),c("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,p.assertNodeType)("Identifier")}}}),c("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,p.assertNodeType)("Expression")},property:{validate:function(){const e=(0,p.assertNodeType)("Identifier"),t=(0,p.assertNodeType)("Expression");return Object.assign((function(r,n,i){(r.computed?t:e)(r,n,i)}),{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertValueType)("boolean"),(0,p.assertOptionalChainStart)()):(0,p.assertValueType)("boolean")}}}),c("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,p.assertNodeType)("Expression")},arguments:(0,p.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:n.env.BABEL_TYPES_8_BREAKING?(0,p.chain)((0,p.assertValueType)("boolean"),(0,p.assertOptionalChainStart)()):(0,p.assertValueType)("boolean")},typeArguments:{validate:(0,p.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,p.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),c("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},u(),{fields:Object.assign({},g(),{value:{validate:(0,p.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,p.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,p.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,p.assertValueType)("boolean"),optional:!0},declare:{validate:(0,p.assertValueType)("boolean"),optional:!0},variance:{validate:(0,p.assertNodeType)("Variance"),optional:!0}})})),c("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},u(!0),{fields:Object.assign({},g(),{key:{validate:(0,p.chain)(function(){const e=(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=(0,p.assertNodeType)("Expression");return function(r,n,i){(r.computed?t:e)(r,n,i)}}(),(0,p.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,p.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,p.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,p.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,p.assertValueType)("boolean"),optional:!0},declare:{validate:(0,p.assertValueType)("boolean"),optional:!0},variance:{validate:(0,p.assertNodeType)("Variance"),optional:!0}})})),c("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,p.assertNodeType)("PrivateName")},value:{validate:(0,p.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,p.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,p.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,p.assertValueType)("boolean"),default:!1},readonly:{validate:(0,p.assertValueType)("boolean"),optional:!0},optional:{validate:(0,p.assertValueType)("boolean"),optional:!0},definite:{validate:(0,p.assertValueType)("boolean"),optional:!0},variance:{validate:(0,p.assertNodeType)("Variance"),optional:!0}}}),c("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},T(),d(),{kind:{validate:(0,p.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,p.assertNodeType)("PrivateName")},body:{validate:(0,p.assertNodeType)("BlockStatement")}})}),c("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,p.assertNodeType)("Identifier")}}}),c("StaticBlock",{visitor:["body"],fields:{body:(0,p.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),c("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,p.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,p.assertNodeType)("StringLiteral")}}})},10014:(e,t,r)=>{var n=r(72994).Token,i=(r(70040).Interval,r(70040).m),s=r(7842).mT,o=r(7842).Yi;function a(e){if(null==e)throw"target cannot be null.";return this.target=e,this.isEpsilon=!1,this.label=null,this}function l(e,t){return a.call(this,e),this.label_=t,this.label=this.makeLabel(),this.serializationType=a.ATOM,this}function p(e,t,r,n){return a.call(this,e),this.ruleIndex=t,this.precedence=r,this.followState=n,this.serializationType=a.RULE,this.isEpsilon=!0,this}function u(e,t){return a.call(this,e),this.serializationType=a.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=t,this}function c(e,t,r){return a.call(this,e),this.serializationType=a.RANGE,this.start=t,this.stop=r,this.label=this.makeLabel(),this}function h(e){return a.call(this,e),this}function d(e,t,r,n){return h.call(this,e),this.serializationType=a.PREDICATE,this.ruleIndex=t,this.predIndex=r,this.isCtxDependent=n,this.isEpsilon=!0,this}function f(e,t,r,n){return a.call(this,e),this.serializationType=a.ACTION,this.ruleIndex=t,this.actionIndex=void 0===r?-1:r,this.isCtxDependent=void 0!==n&&n,this.isEpsilon=!0,this}function m(e,t){return a.call(this,e),this.serializationType=a.SET,null!=t?this.label=t:(this.label=new i,this.label.addOne(n.INVALID_TYPE)),this}function y(e,t){return m.call(this,e,t),this.serializationType=a.NOT_SET,this}function g(e){return a.call(this,e),this.serializationType=a.WILDCARD,this}function T(e,t){return h.call(this,e),this.serializationType=a.PRECEDENCE,this.precedence=t,this.isEpsilon=!0,this}a.EPSILON=1,a.RANGE=2,a.RULE=3,a.PREDICATE=4,a.ATOM=5,a.ACTION=6,a.SET=7,a.NOT_SET=8,a.WILDCARD=9,a.PRECEDENCE=10,a.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],a.serializationTypes={EpsilonTransition:a.EPSILON,RangeTransition:a.RANGE,RuleTransition:a.RULE,PredicateTransition:a.PREDICATE,AtomTransition:a.ATOM,ActionTransition:a.ACTION,SetTransition:a.SET,NotSetTransition:a.NOT_SET,WildcardTransition:a.WILDCARD,PrecedencePredicateTransition:a.PRECEDENCE},l.prototype=Object.create(a.prototype),l.prototype.constructor=l,l.prototype.makeLabel=function(){var e=new i;return e.addOne(this.label_),e},l.prototype.matches=function(e,t,r){return this.label_===e},l.prototype.toString=function(){return this.label_},p.prototype=Object.create(a.prototype),p.prototype.constructor=p,p.prototype.matches=function(e,t,r){return!1},u.prototype=Object.create(a.prototype),u.prototype.constructor=u,u.prototype.matches=function(e,t,r){return!1},u.prototype.toString=function(){return"epsilon"},c.prototype=Object.create(a.prototype),c.prototype.constructor=c,c.prototype.makeLabel=function(){var e=new i;return e.addRange(this.start,this.stop),e},c.prototype.matches=function(e,t,r){return e>=this.start&&e<=this.stop},c.prototype.toString=function(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"},h.prototype=Object.create(a.prototype),h.prototype.constructor=h,d.prototype=Object.create(h.prototype),d.prototype.constructor=d,d.prototype.matches=function(e,t,r){return!1},d.prototype.getPredicate=function(){return new s(this.ruleIndex,this.predIndex,this.isCtxDependent)},d.prototype.toString=function(){return"pred_"+this.ruleIndex+":"+this.predIndex},f.prototype=Object.create(a.prototype),f.prototype.constructor=f,f.prototype.matches=function(e,t,r){return!1},f.prototype.toString=function(){return"action_"+this.ruleIndex+":"+this.actionIndex},m.prototype=Object.create(a.prototype),m.prototype.constructor=m,m.prototype.matches=function(e,t,r){return this.label.contains(e)},m.prototype.toString=function(){return this.label.toString()},y.prototype=Object.create(m.prototype),y.prototype.constructor=y,y.prototype.matches=function(e,t,r){return e>=t&&e<=r&&!m.prototype.matches.call(this,e,t,r)},y.prototype.toString=function(){return"~"+m.prototype.toString.call(this)},g.prototype=Object.create(a.prototype),g.prototype.constructor=g,g.prototype.matches=function(e,t,r){return e>=t&&e<=r},g.prototype.toString=function(){return"."},T.prototype=Object.create(h.prototype),T.prototype.constructor=T,T.prototype.matches=function(e,t,r){return!1},T.prototype.getPredicate=function(){return new o(this.precedence)},T.prototype.toString=function(){return this.precedence+" >= _p"},t.Transition=a,t.AtomTransition=l,t.SetTransition=m,t.NotSetTransition=y,t.RuleTransition=p,t.ActionTransition=f,t.EpsilonTransition=u,t.RangeTransition=c,t.WildcardTransition=g,t.PredicateTransition=d,t.PrecedencePredicateTransition=T,t.AbstractPredicateTransition=h},10441:(e,t,r)=>{var n={ECB:r(65863),CBC:r(71535),CFB:r(68044),CFB8:r(1582),CFB1:r(517),OFB:r(15496),CTR:r(910),GCM:r(910)},i=r(50006);for(var s in i)i[s].module=n[i[s].mode];e.exports=i},10559:(e,t,r)=>{var n=r(40846).m,i=r(66346).Hash;function s(e){this.cachedHashCode=e}function o(){return this.cache={},this}function a(e,t){var r=0;if(null!==e){var n=new i;n.update(e,t),r=n.finish()}s.call(this,r),this.parentCtx=e,this.returnState=t}function l(){return a.call(this,null,s.EMPTY_RETURN_STATE),this}function p(e,t){var r=new i;r.update(e,t);var n=r.finish();return s.call(this,n),this.parents=e,this.returnStates=t,this}s.EMPTY=null,s.EMPTY_RETURN_STATE=2147483647,s.globalNodeCount=1,s.id=s.globalNodeCount,s.prototype.isEmpty=function(){return this===s.EMPTY},s.prototype.hasEmptyPath=function(){return this.getReturnState(this.length-1)===s.EMPTY_RETURN_STATE},s.prototype.hashCode=function(){return this.cachedHashCode},s.prototype.updateHashCode=function(e){e.update(this.cachedHashCode)},o.prototype.add=function(e){if(e===s.EMPTY)return s.EMPTY;var t=this.cache[e]||null;return null!==t?t:(this.cache[e]=e,e)},o.prototype.get=function(e){return this.cache[e]||null},Object.defineProperty(o.prototype,"length",{get:function(){return this.cache.length}}),a.prototype=Object.create(s.prototype),a.prototype.contructor=a,a.create=function(e,t){return t===s.EMPTY_RETURN_STATE&&null===e?s.EMPTY:new a(e,t)},Object.defineProperty(a.prototype,"length",{get:function(){return 1}}),a.prototype.getParent=function(e){return this.parentCtx},a.prototype.getReturnState=function(e){return this.returnState},a.prototype.equals=function(e){return this===e||e instanceof a&&this.hashCode()===e.hashCode()&&this.returnState===e.returnState&&(null==this.parentCtx?null==e.parentCtx:this.parentCtx.equals(e.parentCtx))},a.prototype.toString=function(){var e=null===this.parentCtx?"":this.parentCtx.toString();return 0===e.length?this.returnState===s.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+e},l.prototype=Object.create(a.prototype),l.prototype.constructor=l,l.prototype.isEmpty=function(){return!0},l.prototype.getParent=function(e){return null},l.prototype.getReturnState=function(e){return this.returnState},l.prototype.equals=function(e){return this===e},l.prototype.toString=function(){return"$"},s.EMPTY=new l,p.prototype=Object.create(s.prototype),p.prototype.constructor=p,p.prototype.isEmpty=function(){return this.returnStates[0]===s.EMPTY_RETURN_STATE},Object.defineProperty(p.prototype,"length",{get:function(){return this.returnStates.length}}),p.prototype.getParent=function(e){return this.parents[e]},p.prototype.getReturnState=function(e){return this.returnStates[e]},p.prototype.equals=function(e){return this===e||e instanceof p&&this.hashCode()===e.hashCode()&&this.returnStates===e.returnStates&&this.parents===e.parents},p.prototype.toString=function(){if(this.isEmpty())return"[]";for(var e="[",t=0;t<this.returnStates.length;t++)t>0&&(e+=", "),this.returnStates[t]!==s.EMPTY_RETURN_STATE?(e+=this.returnStates[t],null!==this.parents[t]?e=e+" "+this.parents[t]:e+="null"):e+="$";return e+"]"},t.merge=function e(t,r,n,i){if(t===r)return t;if(t instanceof a&&r instanceof a)return function(t,r,n,i){if(null!==i){var o=i.get(t,r);if(null!==o)return o;if(null!==(o=i.get(r,t)))return o}var l=function(e,t,r){if(r){if(e===s.EMPTY)return s.EMPTY;if(t===s.EMPTY)return s.EMPTY}else{if(e===s.EMPTY&&t===s.EMPTY)return s.EMPTY;if(e===s.EMPTY){var n=[t.returnState,s.EMPTY_RETURN_STATE];return new p([t.parentCtx,null],n)}if(t===s.EMPTY)return n=[e.returnState,s.EMPTY_RETURN_STATE],new p([e.parentCtx,null],n)}return null}(t,r,n);if(null!==l)return null!==i&&i.set(t,r,l),l;if(t.returnState===r.returnState){var u=e(t.parentCtx,r.parentCtx,n,i);if(u===t.parentCtx)return t;if(u===r.parentCtx)return r;var c=a.create(u,t.returnState);return null!==i&&i.set(t,r,c),c}var h=null;if((t===r||null!==t.parentCtx&&t.parentCtx===r.parentCtx)&&(h=t.parentCtx),null!==h){var d=[t.returnState,r.returnState];t.returnState>r.returnState&&(d[0]=r.returnState,d[1]=t.returnState);var f=new p(m=[h,h],d);return null!==i&&i.set(t,r,f),f}d=[t.returnState,r.returnState];var m=[t.parentCtx,r.parentCtx];t.returnState>r.returnState&&(d[0]=r.returnState,d[1]=t.returnState,m=[r.parentCtx,t.parentCtx]);var y=new p(m,d);return null!==i&&i.set(t,r,y),y}(t,r,n,i);if(n){if(t instanceof l)return t;if(r instanceof l)return r}return t instanceof a&&(t=new p([t.getParent()],[t.returnState])),r instanceof a&&(r=new p([r.getParent()],[r.returnState])),function(t,r,n,i){if(null!==i){var o=i.get(t,r);if(null!==o)return o;if(null!==(o=i.get(r,t)))return o}for(var l=0,u=0,c=0,h=[],d=[];l<t.returnStates.length&&u<r.returnStates.length;){var f=t.parents[l],m=r.parents[u];if(t.returnStates[l]===r.returnStates[u]){var y=t.returnStates[l];if(y===s.EMPTY_RETURN_STATE&&null===f&&null===m||null!==f&&null!==m&&f===m)d[c]=f,h[c]=y;else{var g=e(f,m,n,i);d[c]=g,h[c]=y}l+=1,u+=1}else t.returnStates[l]<r.returnStates[u]?(d[c]=f,h[c]=t.returnStates[l],l+=1):(d[c]=m,h[c]=r.returnStates[u],u+=1);c+=1}if(l<t.returnStates.length)for(var T=l;T<t.returnStates.length;T++)d[c]=t.parents[T],h[c]=t.returnStates[T],c+=1;else for(T=u;T<r.returnStates.length;T++)d[c]=r.parents[T],h[c]=r.returnStates[T],c+=1;if(c<d.length){if(1===c){var v=a.create(d[0],h[0]);return null!==i&&i.set(t,r,v),v}d=d.slice(0,c),h=h.slice(0,c)}var b=new p(d,h);return b===t?(null!==i&&i.set(t,r,t),t):b===r?(null!==i&&i.set(t,r,r),r):(function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];n in t||(t[n]=n)}for(var i=0;i<e.length;i++)e[i]=t[e[i]]}(d),null!==i&&i.set(t,r,b),b)}(t,r,n,i)},t.PredictionContext=s,t.PredictionContextCache=o,t.SingletonPredictionContext=a,t.predictionContextFromRuleContext=function e(t,r){if(null==r&&(r=n.EMPTY),null===r.parentCtx||r===n.EMPTY)return s.EMPTY;var i=e(t,r.parentCtx),o=t.states[r.invokingState].transitions[0];return a.create(i,o.followState.stateNumber)},t.getCachedPredictionContext=function e(t,r,n){if(t.isEmpty())return t;var i=n[t]||null;if(null!==i)return i;if(null!==(i=r.get(t)))return n[t]=i,i;for(var o=!1,l=[],u=0;u<l.length;u++){var c=e(t.getParent(u),r,n);if(o||c!==t.getParent(u)){if(!o){l=[];for(var h=0;h<t.length;h++)l[h]=t.getParent(h);o=!0}l[u]=c}}if(!o)return r.add(t),n[t]=t,t;var d;return d=0===l.length?s.EMPTY:1===l.length?a.create(l[0],t.getReturnState(0)):new p(l,t.returnStates),r.add(d),n[d]=d,n[t]=d,d}},10848:(e,t,r)=>{var n=r(76966);e.exports=function(e){var t,r=this,i=[].slice.call(arguments);t=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return r.apply(this,arguments)},n(t,r);var s=function(){this.constructor=t};return s.prototype=r.prototype,t.prototype=new s,e&&(i.unshift(t.prototype),n.apply(null,i)),t.__super__=r.prototype,t}},11265:(e,t,r)=>{var n=r(62053),i=r(79696).Buffer,s=r(84913),o=r(25003),a=r(89135),l=r(53896),p=r(3663);function u(e,t,r,o){s.call(this);var l=i.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new a(u),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new a(r),s=t.length,o=s%16;n.update(t),o&&(o=16-o,n.update(i.alloc(o,0))),n.update(i.alloc(8,0));var l=8*s,u=i.alloc(8);u.writeUIntBE(l,0,8),n.update(u),e._finID=n.state;var c=i.from(e._finID);return p(c),c}(this,r,u),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(u,s),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=u},12520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,!1,!0)};var n=r(16938)},14058:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnyTypeAnnotation=function(){this.word("any")},t.ArrayTypeAnnotation=function(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)},t.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},t.BooleanTypeAnnotation=function(){this.word("boolean")},t.DeclareClass=function(e,t){a(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),d.call(this,e)},t.DeclareExportAllDeclaration=function(e){this.word("declare"),this.space(),i.ExportAllDeclaration.call(this,e)},t.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),h.call(this,e)},t.DeclareFunction=function(e,t){a(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation.typeAnnotation),e.predicate&&(this.space(),this.print(e.predicate)),this.semicolon()},t.DeclareInterface=function(e){this.word("declare"),this.space(),m.call(this,e)},t.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id),this.space(),this.print(e.body)},t.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(e.typeAnnotation)},t.DeclareOpaqueType=function(e,t){a(t)||(this.word("declare"),this.space()),T.call(this,e)},t.DeclareTypeAlias=function(e){this.word("declare"),this.space(),g.call(this,e)},t.DeclareVariable=function(e,t){a(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()},t.DeclaredPredicate=function(e){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(e.value),this.tokenChar(41)},t.EmptyTypeAnnotation=function(){this.word("empty")},t.EnumBooleanBody=function(e){const{explicitType:t}=e;p(this,"boolean",t),u(this,e)},t.EnumBooleanMember=function(e){c(this,e)},t.EnumDeclaration=function(e){const{id:t,body:r}=e;this.word("enum"),this.space(),this.print(t),this.print(r)},t.EnumDefaultedMember=function(e){const{id:t}=e;this.print(t),this.tokenChar(44)},t.EnumNumberBody=function(e){const{explicitType:t}=e;p(this,"number",t),u(this,e)},t.EnumNumberMember=function(e){c(this,e)},t.EnumStringBody=function(e){const{explicitType:t}=e;p(this,"string",t),u(this,e)},t.EnumStringMember=function(e){c(this,e)},t.EnumSymbolBody=function(e){p(this,"symbol",!0),u(this,e)},t.ExistsTypeAnnotation=function(){this.tokenChar(42)},t.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters),this.tokenChar(40),e.this&&(this.word("this"),this.tokenChar(58),this.space(),this.print(e.this.typeAnnotation),(e.params.length||e.rest)&&(this.tokenChar(44),this.space())),this.printList(e.params),e.rest&&(e.params.length&&(this.tokenChar(44),this.space()),this.token("..."),this.print(e.rest)),this.tokenChar(41);const r=null==t?void 0:t.type;null!=r&&("ObjectTypeCallProperty"===r||"ObjectTypeInternalSlot"===r||"DeclareFunction"===r||"ObjectTypeProperty"===r&&t.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(e.returnType)},t.FunctionTypeParam=function(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)},t.IndexedAccessType=function(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},t.InferredPredicate=function(){this.tokenChar(37),this.word("checks")},t.InterfaceDeclaration=m,t.GenericTypeAnnotation=t.ClassImplements=t.InterfaceExtends=function(e){this.print(e.id),this.print(e.typeParameters,!0)},t.InterfaceTypeAnnotation=function(e){var t;this.word("interface"),null!=(t=e.extends)&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)},t.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,void 0,void 0,y)},t.MixedTypeAnnotation=function(){this.word("mixed")},t.NullLiteralTypeAnnotation=function(){this.word("null")},t.NullableTypeAnnotation=function(e){this.tokenChar(63),this.print(e.typeAnnotation)},Object.defineProperty(t,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.NumericLiteral}}),t.NumberTypeAnnotation=function(){this.word("number")},t.ObjectTypeAnnotation=function(e){e.exact?this.token("{|"):this.tokenChar(123);const t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.newline(),this.space(),this.printJoin(t,!0,!0,(()=>{(1!==t.length||e.inexact)&&(this.tokenChar(44),this.space())}),!0),this.space()),e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent()),e.exact?this.token("|}"):this.tokenChar(125)},t.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space()),this.print(e.value)},t.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space()),f.call(this,e),this.tokenChar(91),e.id&&(this.print(e.id),this.tokenChar(58),this.space()),this.print(e.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(e.value)},t.ObjectTypeInternalSlot=function(e){e.static&&(this.word("static"),this.space()),this.tokenChar(91),this.tokenChar(91),this.print(e.id),this.tokenChar(93),this.tokenChar(93),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)},t.ObjectTypeProperty=function(e){e.proto&&(this.word("proto"),this.space()),e.static&&(this.word("static"),this.space()),"get"!==e.kind&&"set"!==e.kind||(this.word(e.kind),this.space()),f.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)},t.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument)},t.OpaqueType=T,t.OptionalIndexedAccessType=function(e){this.print(e.objectType),e.optional&&this.token("?."),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},t.QualifiedTypeIdentifier=function(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)},Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.StringLiteral}}),t.StringTypeAnnotation=function(){this.word("string")},t.SymbolTypeAnnotation=function(){this.word("symbol")},t.ThisTypeAnnotation=function(){this.word("this")},t.TupleTypeAnnotation=function(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)},t.TypeAlias=g,t.TypeAnnotation=function(e,t){this.tokenChar(58),this.space(),"ArrowFunctionExpression"===t.type?this.tokenContext|=s.TokenContext.arrowFlowReturnType:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)},t.TypeCastExpression=function(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)},t.TypeParameter=function(e){f.call(this,e),this.word(e.name),e.bound&&this.print(e.bound),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))},t.TypeParameterDeclaration=t.TypeParameterInstantiation=function(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)},t.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument)},t.UnionTypeAnnotation=function(e){this.printJoin(e.types,void 0,void 0,v)},t.Variance=function(e){"plus"===e.kind?this.tokenChar(43):this.tokenChar(45)},t.VoidTypeAnnotation=function(){this.word("void")},t._interfaceish=d,t._variance=f;var n=r(45741),i=r(25857),s=r(36306),o=r(56049);const{isDeclareExportDeclaration:a,isStatement:l}=n;function p(e,t,r){r&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function u(e,t){const{members:r}=t;e.token("{"),e.indent(),e.newline();for(const t of r)e.print(t),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function c(e,t){e.print(t.id),e.space(),e.token("="),e.space(),e.print(t.init),e.token(",")}function h(e){if(e.declaration){const t=e.declaration;this.print(t),l(t)||this.semicolon()}else this.tokenChar(123),e.specifiers.length&&(this.space(),this.printList(e.specifiers),this.space()),this.tokenChar(125),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source)),this.semicolon()}function d(e){var t,r,n;this.print(e.id),this.print(e.typeParameters),null!=(t=e.extends)&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),"DeclareClass"===e.type&&(null!=(r=e.mixins)&&r.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins)),null!=(n=e.implements)&&n.length&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements))),this.space(),this.print(e.body)}function f(e){var t;const r=null==(t=e.variance)?void 0:t.kind;null!=r&&("plus"===r?this.tokenChar(43):"minus"===r&&this.tokenChar(45))}function m(e){this.word("interface"),this.space(),d.call(this,e)}function y(e){this.space(),this.token("&",!1,e),this.space()}function g(e){this.word("type"),this.space(),this.print(e.id),this.print(e.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(e.right),this.semicolon()}function T(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id),this.print(e.typeParameters),e.supertype&&(this.tokenChar(58),this.space(),this.print(e.supertype)),e.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(e.impltype)),this.semicolon()}function v(e){this.space(),this.token("|",!1,e),this.space()}},14286:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.readCodePoint=p,t.readInt=l,t.readStringContents=function(e,t,r,n,i,a){const l=r,p=n,u=i;let c="",h=null,d=r;const{length:f}=t;for(;;){if(r>=f){a.unterminated(l,p,u),c+=t.slice(d,r);break}const m=t.charCodeAt(r);if(s(e,m,t,r)){c+=t.slice(d,r);break}if(92===m){c+=t.slice(d,r);const s=o(t,r,n,i,"template"===e,a);null!==s.ch||h?c+=s.ch:h={pos:r,lineStart:n,curLine:i},({pos:r,lineStart:n,curLine:i}=s),d=r}else 8232===m||8233===m?(++i,n=++r):10===m||13===m?"template"===e?(c+=t.slice(d,r)+"\n",++r,13===m&&10===t.charCodeAt(r)&&++r,++i,d=n=r):a.unterminated(l,p,u):++r}return{pos:r,str:c,firstInvalidLoc:h,lineStart:n,curLine:i,containsInvalid:!!h}};var r=function(e){return e>=48&&e<=57};const n={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},i={bin:e=>48===e||49===e,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};function s(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function o(e,t,r,n,i,s){const o=!i;t++;const l=e=>({pos:t,ch:e,lineStart:r,curLine:n}),u=e.charCodeAt(t++);switch(u){case 110:return l("\n");case 114:return l("\r");case 120:{let i;return({code:i,pos:t}=a(e,t,r,n,2,!1,o,s)),l(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:t}=p(e,t,r,n,o,s)),l(null===i?null:String.fromCodePoint(i))}case 116:return l("\t");case 98:return l("\b");case 118:return l("\v");case 102:return l("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return l("");case 56:case 57:if(i)return l(null);s.strictNumericEscape(t-1,r,n);default:if(u>=48&&u<=55){const o=t-1;let a=/^[0-7]+/.exec(e.slice(o,t+2))[0],p=parseInt(a,8);p>255&&(a=a.slice(0,-1),p=parseInt(a,8)),t+=a.length-1;const u=e.charCodeAt(t);if("0"!==a||56===u||57===u){if(i)return l(null);s.strictNumericEscape(o,r,n)}return l(String.fromCharCode(p))}return l(String.fromCharCode(u))}}function a(e,t,r,n,i,s,o,a){const p=t;let u;return({n:u,pos:t}=l(e,t,r,n,16,i,s,!1,a,!o)),null===u&&(o?a.invalidEscapeSequence(p,r,n):t=p-1),{code:u,pos:t}}function l(e,t,s,o,a,l,p,u,c,h){const d=t,f=16===a?n.hex:n.decBinOct,m=16===a?i.hex:10===a?i.dec:8===a?i.oct:i.bin;let y=!1,g=0;for(let n=0,i=null==l?1/0:l;n<i;++n){const n=e.charCodeAt(t);let i;if(95!==n||"bail"===u){if(i=n>=97?n-97+10:n>=65?n-65+10:r(n)?n-48:1/0,i>=a){if(i<=9&&h)return{n:null,pos:t};if(i<=9&&c.invalidDigit(t,s,o,a))i=0;else{if(!p)break;i=0,y=!0}}++t,g=g*a+i}else{const r=e.charCodeAt(t-1),n=e.charCodeAt(t+1);if(u){if(Number.isNaN(n)||!m(n)||f.has(r)||f.has(n)){if(h)return{n:null,pos:t};c.unexpectedNumericSeparator(t,s,o)}}else{if(h)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,s,o)}++t}}return t===d||null!=l&&t-d!==l||y?{n:null,pos:t}:{n:g,pos:t}}function p(e,t,r,n,i,s){let o;if(123===e.charCodeAt(t)){if(++t,({code:o,pos:t}=a(e,t,r,n,e.indexOf("}",t)-t,!0,i,s)),++t,null!==o&&o>1114111){if(!i)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else({code:o,pos:t}=a(e,t,r,n,4,!1,i,s));return{code:o,pos:t}}},14788:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(1859);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,n.A)(i.key),i)}}function s(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},15031:(e,t,r)=>{r.d(t,{Sd:()=>Tr,gM:()=>pr,ut:()=>cr,vl:()=>gr});var n,i=r(38848),s=r(12240),o=r(25453),a=r(11050),l=r(51398),p=r(19917),u=r(87023),c=r(9606).URL,h=r(65994).process,d=Object.defineProperty,f="AI_InvalidArgumentError",m=`vercel.ai.error.${f}`,y=Symbol.for(m),g=class extends s.bD{constructor({parameter:e,value:t,message:r}){super({name:f,message:`Invalid argument for parameter ${e}: ${r}`}),this[n]=!0,this.parameter=e,this.value=t}static isInstance(e){return s.bD.hasMarker(e,m)}};n=y;var T=Symbol.for("vercel.ai.error.AI_InvalidStreamPartError");s.bD;var v,b="AI_InvalidToolApprovalError",S=`vercel.ai.error.${b}`,x=Symbol.for(S),E=class extends s.bD{constructor({approvalId:e}){super({name:b,message:`Tool approval response references unknown approvalId: "${e}". No matching tool-approval-request found in message history.`}),this[v]=!0,this.approvalId=e}static isInstance(e){return s.bD.hasMarker(e,S)}};v=x;var w,A="AI_InvalidToolInputError",P=`vercel.ai.error.${A}`,I=Symbol.for(P),C=class extends s.bD{constructor({toolInput:e,toolName:t,cause:r,message:n=`Invalid input for tool ${t}: ${(0,s.u1)(r)}`}){super({name:A,message:n,cause:r}),this[w]=!0,this.toolInput=e,this.toolName=t}static isInstance(e){return s.bD.hasMarker(e,P)}};w=I;var _,N="AI_ToolCallNotFoundForApprovalError",k=`vercel.ai.error.${N}`,O=Symbol.for(k),M=class extends s.bD{constructor({toolCallId:e,approvalId:t}){super({name:N,message:`Tool call "${e}" not found for approval request "${t}".`}),this[_]=!0,this.toolCallId=e,this.approvalId=t}static isInstance(e){return s.bD.hasMarker(e,k)}};_=O;var L,D="AI_MissingToolResultsError",B=`vercel.ai.error.${D}`,R=Symbol.for(B),j=class extends s.bD{constructor({toolCallIds:e}){super({name:D,message:`Tool result${e.length>1?"s are":" is"} missing for tool call${e.length>1?"s":""} ${e.join(", ")}.`}),this[L]=!0,this.toolCallIds=e}static isInstance(e){return s.bD.hasMarker(e,B)}};L=R;var F=Symbol.for("vercel.ai.error.AI_NoImageGeneratedError");s.bD;var U,q="AI_NoObjectGeneratedError",V=`vercel.ai.error.${q}`,Y=Symbol.for(V),K=class extends s.bD{constructor({message:e="No object generated.",cause:t,text:r,response:n,usage:i,finishReason:s}){super({name:q,message:e,cause:t}),this[U]=!0,this.text=r,this.response=n,this.usage=i,this.finishReason=s}static isInstance(e){return s.bD.hasMarker(e,V)}};U=Y;var $,z="AI_NoOutputGeneratedError",J=`vercel.ai.error.${z}`,H=Symbol.for(J),X=class extends s.bD{constructor({message:e="No output generated.",cause:t}={}){super({name:z,message:e,cause:t}),this[$]=!0}static isInstance(e){return s.bD.hasMarker(e,J)}};$=H;var W=Symbol.for("vercel.ai.error.AI_NoSpeechGeneratedError");s.bD;var G=Symbol.for("vercel.ai.error.AI_NoTranscriptGeneratedError");s.bD;var Z=Symbol.for("vercel.ai.error.AI_NoVideoGeneratedError");s.bD;var Q,ee="AI_NoSuchToolError",te=`vercel.ai.error.${ee}`,re=Symbol.for(te),ne=class extends s.bD{constructor({toolName:e,availableTools:t,message:r=`Model tried to call unavailable tool '${e}'. ${void 0===t?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:ee,message:r}),this[Q]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return s.bD.hasMarker(e,te)}};Q=re;var ie,se="AI_ToolCallRepairError",oe=`vercel.ai.error.${se}`,ae=Symbol.for(oe),le=class extends s.bD{constructor({cause:e,originalError:t,message:r=`Error repairing tool call: ${(0,s.u1)(e)}`}){super({name:se,message:r,cause:e}),this[ie]=!0,this.originalError=t}static isInstance(e){return s.bD.hasMarker(e,oe)}};ie=ae;var pe,ue=class extends s.bD{constructor(e){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`}),this.version=e.version,this.provider=e.provider,this.modelId=e.modelId}},ce="AI_UIMessageStreamError",he=`vercel.ai.error.${ce}`,de=Symbol.for(he),fe=class extends s.bD{constructor({chunkType:e,chunkId:t,message:r}){super({name:ce,message:r}),this[pe]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return s.bD.hasMarker(e,he)}};pe=de;var me=Symbol.for("vercel.ai.error.AI_InvalidDataContentError");s.bD;var ye,ge="AI_InvalidMessageRoleError",Te=`vercel.ai.error.${ge}`,ve=Symbol.for(Te),be=class extends s.bD{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:ge,message:t}),this[ye]=!0,this.role=e}static isInstance(e){return s.bD.hasMarker(e,Te)}};ye=ve;var Se,xe="AI_MessageConversionError",Ee=`vercel.ai.error.${xe}`,we=Symbol.for(Ee),Ae=class extends s.bD{constructor({originalMessage:e,message:t}){super({name:xe,message:t}),this[Se]=!0,this.originalMessage=e}static isInstance(e){return s.bD.hasMarker(e,Ee)}};Se=we;var Pe,Ie="AI_RetryError",Ce=`vercel.ai.error.${Ie}`,_e=Symbol.for(Ce),Ne=class extends s.bD{constructor({message:e,reason:t,errors:r}){super({name:Ie,message:e}),this[Pe]=!0,this.reason=t,this.errors=r,this.lastError=r[r.length-1]}static isInstance(e){return s.bD.hasMarker(e,Ce)}};function ke({warning:e,provider:t,model:r}){const n=`AI SDK Warning (${t} / ${r}):`;switch(e.type){case"unsupported":{let t=`${n} The feature "${e.feature}" is not supported.`;return e.details&&(t+=` ${e.details}`),t}case"compatibility":{let t=`${n} The feature "${e.feature}" is used in a compatibility mode.`;return e.details&&(t+=` ${e.details}`),t}case"other":return`${n} ${e.message}`;default:return`${n} ${JSON.stringify(e,null,2)}`}}Pe=_e;var Oe=!1,Me=e=>{if(0===e.warnings.length)return;const t=globalThis.AI_SDK_LOG_WARNINGS;if(!1!==t)if("function"!=typeof t){Oe||(Oe=!0,console.info("AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false."));for(const t of e.warnings)console.warn(ke({warning:t,provider:e.provider,model:e.model}))}else t(e)};function Le(e){return"v3"===e.specificationVersion?e:(function({provider:e,modelId:t}){Me({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:e,model:t})}({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get(e,t){switch(t){case"specificationVersion":return"v3";case"doGenerate":return async(...t)=>{const r=await e.doGenerate(...t);return{...r,finishReason:De(r.finishReason),usage:Be(r.usage)}};case"doStream":return async(...t)=>{const r=await e.doStream(...t);return{...r,stream:(n=r.stream,n.pipeThrough(new TransformStream({transform(e,t){"finish"===e.type?t.enqueue({...e,finishReason:De(e.finishReason),usage:Be(e.usage)}):t.enqueue(e)}})))};var n};default:return e[t]}}}))}function De(e){return{unified:"unknown"===e?"other":e,raw:void 0}}function Be(e){return{inputTokens:{total:e.inputTokens,noCache:void 0,cacheRead:e.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:e.outputTokens,text:void 0,reasoning:e.reasoningTokens}}}function Re(e){if("string"!=typeof e){if("v3"!==e.specificationVersion&&"v2"!==e.specificationVersion){const t=e;throw new ue({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return Le(e)}return(null!=(t=globalThis.AI_SDK_DEFAULT_PROVIDER)?t:o.JS).languageModel(e);var t}function je(e){if(null!=e)return"number"==typeof e?e:e.totalMs}var Fe=[{mediaType:"image/gif",bytesPrefix:[71,73,70]},{mediaType:"image/png",bytesPrefix:[137,80,78,71]},{mediaType:"image/jpeg",bytesPrefix:[255,216]},{mediaType:"image/webp",bytesPrefix:[82,73,70,70,null,null,null,null,87,69,66,80]},{mediaType:"image/bmp",bytesPrefix:[66,77]},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0]},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42]},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102]},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99]}],Ue=e=>{const t="string"==typeof e?(0,i.Z9)(e):e,r=(127&t[6])<<21|(127&t[7])<<14|(127&t[8])<<7|127&t[9];return t.slice(r+10)};var qe="6.0.86",Ve=async({url:e,maxBytes:t,abortSignal:r})=>{var n;const s=e.toString();try{const e=await fetch(s,{headers:(0,i.WZ)({},`ai-sdk/${qe}`,(0,i.G1)()),signal:r});if(!e.ok)throw new i.nV({url:s,statusCode:e.status,statusText:e.statusText});return{data:await(0,i.cS)({response:e,url:s,maxBytes:null!=t?t:i.W}),mediaType:null!=(n=e.headers.get("content-type"))?n:void 0}}catch(e){if(i.nV.isInstance(e))throw e;throw new i.nV({url:s,cause:e})}},Ye=(e=Ve)=>t=>Promise.all(t.map((async t=>t.isUrlSupportedByModel?null:e(t))));var Ke=a.KC([a.Yj(),a.Nl(Uint8Array),a.Nl(ArrayBuffer),a.Ie((e=>{var t,r;return null!=(r=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&r}),{message:"Must be a Buffer"})]);function $e(e){if(e instanceof Uint8Array)return{data:e,mediaType:void 0};if(e instanceof ArrayBuffer)return{data:new Uint8Array(e),mediaType:void 0};if("string"==typeof e)try{e=new c(e)}catch(e){}if(e instanceof c&&"data:"===e.protocol){const{mediaType:t,base64Content:r}=function(e){try{const[t,r]=e.split(",");return{mediaType:t.split(";")[0].split(":")[1],base64Content:r}}catch(e){return{mediaType:void 0,base64Content:void 0}}}(e.toString());if(null==t||null==r)throw new s.bD({name:"InvalidDataContentError",message:`Invalid data URL format in content ${e.toString()}`});return{data:r,mediaType:t}}return{data:e,mediaType:void 0}}function ze(e){return void 0===e?[]:Array.isArray(e)?e:[e]}async function Je({prompt:e,supportedUrls:t,download:r=Ye()}){const n=await async function(e,t,r){const n=e.filter((e=>"user"===e.role)).map((e=>e.content)).filter((e=>Array.isArray(e))).flat().filter((e=>"image"===e.type||"file"===e.type)).map((e=>{var t;const r=null!=(t=e.mediaType)?t:"image"===e.type?"image/*":void 0;let n="image"===e.type?e.image:e.data;if("string"==typeof n)try{n=new c(n)}catch(e){}return{mediaType:r,data:n}})).filter((e=>e.data instanceof c)).map((e=>({url:e.data,isUrlSupportedByModel:null!=e.mediaType&&(0,i.qs)({url:e.data.toString(),mediaType:e.mediaType,supportedUrls:r})}))),s=await t(n);return Object.fromEntries(s.map(((e,t)=>null==e?null:[n[t].url.toString(),{data:e.data,mediaType:e.mediaType}])).filter((e=>null!=e)))}(e.messages,r,t),s=new Map;for(const t of e.messages)if("assistant"===t.role&&Array.isArray(t.content))for(const e of t.content)"tool-approval-request"===e.type&&"approvalId"in e&&"toolCallId"in e&&s.set(e.approvalId,e.toolCallId);const o=new Set;for(const t of e.messages)if("tool"===t.role)for(const e of t.content)if("tool-approval-response"===e.type){const t=s.get(e.approvalId);t&&o.add(t)}const a=[...null!=e.system?"string"==typeof e.system?[{role:"system",content:e.system}]:ze(e.system).map((e=>({role:"system",content:e.content,providerOptions:e.providerOptions}))):[],...e.messages.map((e=>function({message:e,downloadedAssets:t}){const r=e.role;switch(r){case"system":return{role:"system",content:e.content,providerOptions:e.providerOptions};case"user":return"string"==typeof e.content?{role:"user",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"user",content:e.content.map((e=>function(e,t){var r;if("text"===e.type)return{type:"text",text:e.text,providerOptions:e.providerOptions};let n;const s=e.type;switch(s){case"image":n=e.image;break;case"file":n=e.data;break;default:throw new Error(`Unsupported part type: ${s}`)}const{data:o,mediaType:a}=$e(n);let l=null!=a?a:e.mediaType,p=o;if(p instanceof c){const e=t[p.toString()];e&&(p=e.data,null!=l||(l=e.mediaType))}switch(s){case"image":return(p instanceof Uint8Array||"string"==typeof p)&&(l=null!=(r=function({data:e,signatures:t}){const r=function(e){return"string"==typeof e&&e.startsWith("SUQz")||"string"!=typeof e&&e.length>10&&73===e[0]&&68===e[1]&&51===e[2]?Ue(e):e}(e),n="string"==typeof r?(0,i.Z9)(r.substring(0,Math.min(r.length,24))):r;for(const e of t)if(n.length>=e.bytesPrefix.length&&e.bytesPrefix.every(((e,t)=>null===e||n[t]===e)))return e.mediaType}({data:p,signatures:Fe}))?r:l),{type:"file",mediaType:null!=l?l:"image/*",filename:void 0,data:p,providerOptions:e.providerOptions};case"file":if(null==l)throw new Error("Media type is missing for file part");return{type:"file",mediaType:l,filename:e.filename,data:p,providerOptions:e.providerOptions}}}(e,t))).filter((e=>"text"!==e.type||""!==e.text)),providerOptions:e.providerOptions};case"assistant":return"string"==typeof e.content?{role:"assistant",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"assistant",content:e.content.filter((e=>"text"!==e.type||""!==e.text||null!=e.providerOptions)).filter((e=>"tool-approval-request"!==e.type)).map((e=>{const t=e.providerOptions;switch(e.type){case"file":{const{data:r,mediaType:n}=$e(e.data);return{type:"file",data:r,filename:e.filename,mediaType:null!=n?n:e.mediaType,providerOptions:t}}case"reasoning":return{type:"reasoning",text:e.text,providerOptions:t};case"text":return{type:"text",text:e.text,providerOptions:t};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:t};case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:He(e.output),providerOptions:t}}})),providerOptions:e.providerOptions};case"tool":return{role:"tool",content:e.content.filter((e=>"tool-approval-response"!==e.type||e.providerExecuted)).map((e=>{switch(e.type){case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:He(e.output),providerOptions:e.providerOptions};case"tool-approval-response":return{type:"tool-approval-response",approvalId:e.approvalId,approved:e.approved,reason:e.reason}}})),providerOptions:e.providerOptions};default:throw new be({role:r})}}({message:e,downloadedAssets:n})))],l=[];for(const e of a){if("tool"!==e.role){l.push(e);continue}const t=l.at(-1);"tool"===(null==t?void 0:t.role)?t.content.push(...e.content):l.push(e)}const p=new Set;for(const e of l)switch(e.role){case"assistant":for(const t of e.content)"tool-call"!==t.type||t.providerExecuted||p.add(t.toolCallId);break;case"tool":for(const t of e.content)"tool-result"===t.type&&p.delete(t.toolCallId);break;case"user":case"system":for(const e of o)p.delete(e);if(p.size>0)throw new j({toolCallIds:Array.from(p)})}for(const e of o)p.delete(e);if(p.size>0)throw new j({toolCallIds:Array.from(p)});return l.filter((e=>"tool"!==e.role||e.content.length>0))}function He(e){return"content"!==e.type?e:{type:"content",value:e.value.map((e=>"media"!==e.type?e:e.mediaType.startsWith("image/")?{type:"image-data",data:e.data,mediaType:e.mediaType}:{type:"file-data",data:e.data,mediaType:e.mediaType}))}}async function Xe({toolCallId:e,input:t,output:r,tool:n,errorMode:i}){return"text"===i?{type:"error-text",value:(0,s.u1)(r)}:"json"===i?{type:"error-json",value:We(r)}:(null==n?void 0:n.toModelOutput)?await n.toModelOutput({toolCallId:e,input:t,output:r}):"string"==typeof r?{type:"text",value:r}:{type:"json",value:We(r)}}function We(e){return void 0===e?null:e}var Ge=a.RZ((()=>a.KC([a.ch(),a.Yj(),a.ai(),a.zM(),a.g1(a.Yj(),Ge.optional()),a.YO(Ge)]))),Ze=a.g1(a.Yj(),a.g1(a.Yj(),Ge.optional())),Qe=a.Ik({type:a.eu("text"),text:a.Yj(),providerOptions:Ze.optional()}),et=a.Ik({type:a.eu("image"),image:a.KC([Ke,a.Nl(c)]),mediaType:a.Yj().optional(),providerOptions:Ze.optional()}),tt=a.Ik({type:a.eu("file"),data:a.KC([Ke,a.Nl(c)]),filename:a.Yj().optional(),mediaType:a.Yj(),providerOptions:Ze.optional()}),rt=a.Ik({type:a.eu("reasoning"),text:a.Yj(),providerOptions:Ze.optional()}),nt=a.Ik({type:a.eu("tool-call"),toolCallId:a.Yj(),toolName:a.Yj(),input:a.L5(),providerOptions:Ze.optional(),providerExecuted:a.zM().optional()}),it=a.gM("type",[a.Ik({type:a.eu("text"),value:a.Yj(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("json"),value:Ge,providerOptions:Ze.optional()}),a.Ik({type:a.eu("execution-denied"),reason:a.Yj().optional(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("error-text"),value:a.Yj(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("error-json"),value:Ge,providerOptions:Ze.optional()}),a.Ik({type:a.eu("content"),value:a.YO(a.KC([a.Ik({type:a.eu("text"),text:a.Yj(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("media"),data:a.Yj(),mediaType:a.Yj()}),a.Ik({type:a.eu("file-data"),data:a.Yj(),mediaType:a.Yj(),filename:a.Yj().optional(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("file-url"),url:a.Yj(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("file-id"),fileId:a.KC([a.Yj(),a.g1(a.Yj(),a.Yj())]),providerOptions:Ze.optional()}),a.Ik({type:a.eu("image-data"),data:a.Yj(),mediaType:a.Yj(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("image-url"),url:a.Yj(),providerOptions:Ze.optional()}),a.Ik({type:a.eu("image-file-id"),fileId:a.KC([a.Yj(),a.g1(a.Yj(),a.Yj())]),providerOptions:Ze.optional()}),a.Ik({type:a.eu("custom"),providerOptions:Ze.optional()})]))})]),st=a.Ik({type:a.eu("tool-result"),toolCallId:a.Yj(),toolName:a.Yj(),output:it,providerOptions:Ze.optional()}),ot=a.Ik({type:a.eu("tool-approval-request"),approvalId:a.Yj(),toolCallId:a.Yj()}),at=a.Ik({type:a.eu("tool-approval-response"),approvalId:a.Yj(),approved:a.zM(),reason:a.Yj().optional()}),lt=a.Ik({role:a.eu("system"),content:a.Yj(),providerOptions:Ze.optional()}),pt=a.Ik({role:a.eu("user"),content:a.KC([a.Yj(),a.YO(a.KC([Qe,et,tt]))]),providerOptions:Ze.optional()}),ut=a.Ik({role:a.eu("assistant"),content:a.KC([a.Yj(),a.YO(a.KC([Qe,tt,rt,nt,st,ot]))]),providerOptions:Ze.optional()}),ct=a.Ik({role:a.eu("tool"),content:a.YO(a.KC([st,at])),providerOptions:Ze.optional()}),ht=a.KC([lt,pt,ut,ct]);function dt(e){if(!o.jN.isInstance(e))return e;const t="https://ai-sdk.dev/unauthenticated-ai-gateway";return"production"===(null==h?void 0:"production")?new s.bD({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${t}`}):Object.assign(new Error(`Unauthenticated request to AI Gateway.\n\nTo authenticate, set the AI_GATEWAY_API_KEY environment variable with your API key.\n\nAlternatively, you can use a provider module instead of the AI Gateway.\n\nLearn more: ${t}\n\n`),{name:"GatewayAuthenticationError"})}function ft({operationId:e,telemetry:t}){return{"operation.name":`${e}${null!=(null==t?void 0:t.functionId)?` ${t.functionId}`:""}`,"resource.name":null==t?void 0:t.functionId,"ai.operationId":e,"ai.telemetry.functionId":null==t?void 0:t.functionId}}var mt={startSpan:()=>yt,startActiveSpan:(e,t,r,n)=>"function"==typeof t?t(yt):"function"==typeof r?r(yt):"function"==typeof n?n(yt):void 0},yt={spanContext:()=>gt,setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording:()=>!1,recordException(){return this}},gt={traceId:"",spanId:"",traceFlags:0};async function Tt({name:e,tracer:t,attributes:r,fn:n,endWhenDone:i=!0}){return t.startActiveSpan(e,{attributes:await r},(async e=>{const t=u._.active();try{const r=await u._.with(t,(()=>n(e)));return i&&e.end(),r}catch(t){try{vt(e,t)}finally{e.end()}throw t}}))}function vt(e,t){t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:p.s.ERROR,message:t.message})):e.setStatus({code:p.s.ERROR})}async function bt({telemetry:e,attributes:t}){if(!0!==(null==e?void 0:e.isEnabled))return{};const r={};for(const[n,i]of Object.entries(t))if(null!=i)if("object"==typeof i&&"input"in i&&"function"==typeof i.input){if(!1===(null==e?void 0:e.recordInputs))continue;const t=await i.input();null!=t&&(r[n]=t)}else if("object"==typeof i&&"output"in i&&"function"==typeof i.output){if(!1===(null==e?void 0:e.recordOutputs))continue;const t=await i.output();null!=t&&(r[n]=t)}else r[n]=i;return r}function St(e){return{inputTokens:e.inputTokens.total,inputTokenDetails:{noCacheTokens:e.inputTokens.noCache,cacheReadTokens:e.inputTokens.cacheRead,cacheWriteTokens:e.inputTokens.cacheWrite},outputTokens:e.outputTokens.total,outputTokenDetails:{textTokens:e.outputTokens.text,reasoningTokens:e.outputTokens.reasoning},totalTokens:xt(e.inputTokens.total,e.outputTokens.total),raw:e.raw,reasoningTokens:e.outputTokens.reasoning,cachedInputTokens:e.inputTokens.cacheRead}}function xt(e,t){return null==e&&null==t?void 0:(null!=e?e:0)+(null!=t?t:0)}function Et(e,t){if(void 0===e&&void 0===t)return;if(void 0===e)return t;if(void 0===t)return e;const r={...e};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n];if(void 0===i)continue;const s=n in e?e[n]:void 0,o=!(null===i||"object"!=typeof i||Array.isArray(i)||i instanceof Date||i instanceof RegExp),a=!(null==s||"object"!=typeof s||Array.isArray(s)||s instanceof Date||s instanceof RegExp);r[n]=o&&a?Et(s,i):i}return r}var wt=({maxRetries:e=2,initialDelayInMs:t=2e3,backoffFactor:r=2,abortSignal:n}={})=>async i=>At(i,{maxRetries:e,delayInMs:t,backoffFactor:r,abortSignal:n});async function At(e,{maxRetries:t,delayInMs:r,backoffFactor:n,abortSignal:o},a=[]){try{return await e()}catch(l){if((0,i.zf)(l))throw l;if(0===t)throw l;const p=(0,i.u1)(l),u=[...a,l],c=u.length;if(c>t)throw new Ne({message:`Failed after ${c} attempts. Last error: ${p}`,reason:"maxRetriesExceeded",errors:u});if(l instanceof Error&&s.hL.isInstance(l)&&!0===l.isRetryable&&c<=t)return await(0,i.cb)(function({error:e,exponentialBackoffDelay:t}){const r=e.responseHeaders;if(!r)return t;let n;const i=r["retry-after-ms"];if(i){const e=parseFloat(i);Number.isNaN(e)||(n=e)}const s=r["retry-after"];if(s&&void 0===n){const e=parseFloat(s);n=Number.isNaN(e)?Date.parse(s)-Date.now():1e3*e}return null!=n&&!Number.isNaN(n)&&0<=n&&(n<6e4||n<t)?n:t}({error:l,exponentialBackoffDelay:r}),{abortSignal:o}),At(e,{maxRetries:t,delayInMs:n*r,backoffFactor:n,abortSignal:o},u);if(1===c)throw l;throw new Ne({message:`Failed after ${c} attempts with non-retryable error: '${p}'`,reason:"errorNotRetryable",errors:u})}}async function Pt({toolCall:e,tools:t,tracer:r,telemetry:n,messages:s,abortSignal:o,experimental_context:a,onPreliminaryToolResult:l}){const{toolName:p,toolCallId:u,input:c}=e,h=null==t?void 0:t[p];if(null!=(null==h?void 0:h.execute))return Tt({name:"ai.toolCall",attributes:bt({telemetry:n,attributes:{...ft({operationId:"ai.toolCall",telemetry:n}),"ai.toolCall.name":p,"ai.toolCall.id":u,"ai.toolCall.args":{output:()=>JSON.stringify(c)}}}),tracer:r,fn:async t=>{let r;try{const t=(0,i.o8)({execute:h.execute.bind(h),input:c,options:{toolCallId:u,messages:s,abortSignal:o,experimental_context:a}});for await(const n of t)"preliminary"===n.type?null==l||l({...e,type:"tool-result",output:n.output,preliminary:!0}):r=n.output}catch(r){return vt(t,r),{type:"tool-error",toolCallId:u,toolName:p,input:c,error:r,dynamic:"dynamic"===h.type,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}}try{t.setAttributes(await bt({telemetry:n,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(r)}}}))}catch(e){}return{type:"tool-result",toolCallId:u,toolName:p,input:c,output:r,dynamic:"dynamic"===h.type,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}}})}var It=class{constructor({data:e,mediaType:t}){const r=e instanceof Uint8Array;this.base64Data=r?void 0:e,this.uint8ArrayData=r?e:void 0,this.mediaType=t}get base64(){return null==this.base64Data&&(this.base64Data=(0,i.n_)(this.uint8ArrayData)),this.base64Data}get uint8Array(){return null==this.uint8ArrayData&&(this.uint8ArrayData=(0,i.Z9)(this.base64Data)),this.uint8ArrayData}},Ct=class extends It{constructor(e){super(e),this.type="file"}};function _t(e){const t=["ROOT"];let r=-1,n=null;function i(e,i,s){switch(e){case'"':r=i,t.pop(),t.push(s),t.push("INSIDE_STRING");break;case"f":case"t":case"n":r=i,n=i,t.pop(),t.push(s),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(s),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=i,t.pop(),t.push(s),t.push("INSIDE_NUMBER");break;case"{":r=i,t.pop(),t.push(s),t.push("INSIDE_OBJECT_START");break;case"[":r=i,t.pop(),t.push(s),t.push("INSIDE_ARRAY_START")}}function s(e,n){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":r=n,t.pop()}}function o(e,n){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=n,t.pop()}}for(let a=0;a<e.length;a++){const l=e[a];switch(t[t.length-1]){case"ROOT":i(l,a,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":r=a,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===l&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":i(l,a,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":s(l,a);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),r=a;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:r=a}break;case"INSIDE_ARRAY_START":"]"===l?(r=a,t.pop()):(r=a,i(l,a,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=a,t.pop();break;default:r=a}break;case"INSIDE_ARRAY_AFTER_COMMA":i(l,a,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),r=a;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=a;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&o(l,a),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&s(l,a);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&s(l,a);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&o(l,a);break;default:t.pop()}break;case"INSIDE_LITERAL":{const i=e.substring(n,a+1);"false".startsWith(i)||"true".startsWith(i)||"null".startsWith(i)?r=a:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?s(l,a):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&o(l,a));break}}}let a=e.slice(0,r+1);for(let r=t.length-1;r>=0;r--)switch(t[r]){case"INSIDE_STRING":a+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":a+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":a+="]";break;case"INSIDE_LITERAL":{const t=e.substring(n,e.length);"true".startsWith(t)?a+="true".slice(t.length):"false".startsWith(t)?a+="false".slice(t.length):"null".startsWith(t)&&(a+="null".slice(t.length))}}return a}async function Nt(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=await(0,i.N8)({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await(0,i.N8)({text:_t(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}((e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})})({},{array:()=>Mt,choice:()=>Lt,json:()=>Dt,object:()=>Ot,text:()=>kt});var kt=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),parseCompleteOutput:async({text:e})=>e,parsePartialOutput:async({text:e})=>({partial:e}),createElementStreamTransform(){}}),Ot=({schema:e,name:t,description:r})=>{const n=(0,i.mD)(e);return{name:"object",responseFormat:(0,i.hd)(n.jsonSchema).then((e=>({type:"json",schema:e,...null!=t&&{name:t},...null!=r&&{description:r}}))),async parseCompleteOutput({text:e},t){const r=await(0,i.N8)({text:e});if(!r.success)throw new K({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});const s=await(0,i.ZZ)({value:r.value,schema:n});if(!s.success)throw new K({message:"No object generated: response did not match schema.",cause:s.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return s.value},async parsePartialOutput({text:e}){const t=await Nt(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value}}},createElementStreamTransform(){}}},Mt=({element:e,name:t,description:r})=>{const n=(0,i.mD)(e);return{name:"array",responseFormat:(0,i.hd)(n.jsonSchema).then((e=>{const{$schema:n,...i}=e;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:i}},required:["elements"],additionalProperties:!1},...null!=t&&{name:t},...null!=r&&{description:r}}})),async parseCompleteOutput({text:e},t){const r=await(0,i.N8)({text:e});if(!r.success)throw new K({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});const o=r.value;if(null==o||"object"!=typeof o||!("elements"in o)||!Array.isArray(o.elements))throw new K({message:"No object generated: response did not match schema.",cause:new s.iM({value:o,cause:"response must be an object with an elements array"}),text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});for(const r of o.elements){const s=await(0,i.ZZ)({value:r,schema:n});if(!s.success)throw new K({message:"No object generated: response did not match schema.",cause:s.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason})}return o.elements},async parsePartialOutput({text:e}){const t=await Nt(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const e=t.value;if(null==e||"object"!=typeof e||!("elements"in e)||!Array.isArray(e.elements))return;const r="repaired-parse"===t.state&&e.elements.length>0?e.elements.slice(0,-1):e.elements,s=[];for(const e of r){const t=await(0,i.ZZ)({value:e,schema:n});t.success&&s.push(t.value)}return{partial:s}}}},createElementStreamTransform(){let e=0;return new TransformStream({transform({partialOutput:t},r){if(null!=t)for(;e<t.length;e++)r.enqueue(t[e])}})}}},Lt=({options:e,name:t,description:r})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...null!=t&&{name:t},...null!=r&&{description:r}}),async parseCompleteOutput({text:t},r){const n=await(0,i.N8)({text:t});if(!n.success)throw new K({message:"No object generated: could not parse the response.",cause:n.error,text:t,response:r.response,usage:r.usage,finishReason:r.finishReason});const o=n.value;if(null==o||"object"!=typeof o||!("result"in o)||"string"!=typeof o.result||!e.includes(o.result))throw new K({message:"No object generated: response did not match schema.",cause:new s.iM({value:o,cause:"response must be an object that contains a choice value."}),text:t,response:r.response,usage:r.usage,finishReason:r.finishReason});return o.result},async parsePartialOutput({text:t}){const r=await Nt(t);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const t=r.value;if(null==t||"object"!=typeof t||!("result"in t)||"string"!=typeof t.result)return;const n=e.filter((e=>e.startsWith(t.result)));return"successful-parse"===r.state?n.includes(t.result)?{partial:t.result}:void 0:1===n.length?{partial:n[0]}:void 0}}},createElementStreamTransform(){}}),Dt=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...null!=e&&{name:e},...null!=t&&{description:t}}),async parseCompleteOutput({text:e},t){const r=await(0,i.N8)({text:e});if(!r.success)throw new K({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return r.value},async parsePartialOutput({text:e}){const t=await Nt(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return void 0===t.value?void 0:{partial:t.value}}},createElementStreamTransform(){}});async function Bt(e){const t=""===e.input.trim()?{success:!0,value:{}}:await(0,i.N8)({text:e.input});if(!1===t.success)throw new C({toolName:e.toolName,toolInput:e.input,cause:t.error});return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:t.value,providerExecuted:!0,dynamic:!0,providerMetadata:e.providerMetadata}}async function Rt({toolCall:e,tools:t}){const r=e.toolName,n=t[r];if(null==n){if(e.providerExecuted&&e.dynamic)return await Bt(e);throw new ne({toolName:e.toolName,availableTools:Object.keys(t)})}const s=(0,i.mD)(n.inputSchema),o=""===e.input.trim()?await(0,i.ZZ)({value:{},schema:s}):await(0,i.N8)({text:e.input,schema:s});if(!1===o.success)throw new C({toolName:r,toolInput:e.input,cause:o.error});return"dynamic"===n.type?{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:o.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,dynamic:!0,title:n.title}:{type:"tool-call",toolCallId:e.toolCallId,toolName:r,input:o.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:n.title}}var jt=class{constructor({content:e,finishReason:t,rawFinishReason:r,usage:n,warnings:i,request:s,response:o,providerMetadata:a}){this.content=e,this.finishReason=t,this.rawFinishReason=r,this.usage=n,this.warnings=i,this.request=s,this.response=o,this.providerMetadata=a}get text(){return this.content.filter((e=>"text"===e.type)).map((e=>e.text)).join("")}get reasoning(){return this.content.filter((e=>"reasoning"===e.type))}get reasoningText(){return 0===this.reasoning.length?void 0:this.reasoning.map((e=>e.text)).join("")}get files(){return this.content.filter((e=>"file"===e.type)).map((e=>e.file))}get sources(){return this.content.filter((e=>"source"===e.type))}get toolCalls(){return this.content.filter((e=>"tool-call"===e.type))}get staticToolCalls(){return this.toolCalls.filter((e=>!0!==e.dynamic))}get dynamicToolCalls(){return this.toolCalls.filter((e=>!0===e.dynamic))}get toolResults(){return this.content.filter((e=>"tool-result"===e.type))}get staticToolResults(){return this.toolResults.filter((e=>!0!==e.dynamic))}get dynamicToolResults(){return this.toolResults.filter((e=>!0===e.dynamic))}};function Ft(e){return({steps:t})=>t.length===e}async function Ut({content:e,tools:t}){const r=[],n=[];for(const r of e)if("source"!==r.type&&("tool-result"!==r.type&&"tool-error"!==r.type||r.providerExecuted)&&("text"!==r.type||0!==r.text.length))switch(r.type){case"text":n.push({type:"text",text:r.text,providerOptions:r.providerMetadata});break;case"reasoning":n.push({type:"reasoning",text:r.text,providerOptions:r.providerMetadata});break;case"file":n.push({type:"file",data:r.file.base64,mediaType:r.file.mediaType,providerOptions:r.providerMetadata});break;case"tool-call":n.push({type:"tool-call",toolCallId:r.toolCallId,toolName:r.toolName,input:r.input,providerExecuted:r.providerExecuted,providerOptions:r.providerMetadata});break;case"tool-result":{const e=await Xe({toolCallId:r.toolCallId,input:r.input,tool:null==t?void 0:t[r.toolName],output:r.output,errorMode:"none"});n.push({type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:e,providerOptions:r.providerMetadata});break}case"tool-error":{const e=await Xe({toolCallId:r.toolCallId,input:r.input,tool:null==t?void 0:t[r.toolName],output:r.error,errorMode:"json"});n.push({type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:e,providerOptions:r.providerMetadata});break}case"tool-approval-request":n.push({type:"tool-approval-request",approvalId:r.approvalId,toolCallId:r.toolCall.toolCallId})}n.length>0&&r.push({role:"assistant",content:n});const i=[];for(const r of e){if("tool-result"!==r.type&&"tool-error"!==r.type||r.providerExecuted)continue;const e=await Xe({toolCallId:r.toolCallId,input:r.input,tool:null==t?void 0:t[r.toolName],output:"tool-result"===r.type?r.output:r.error,errorMode:"tool-error"===r.type?"text":"none"});i.push({type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:e,...null!=r.providerMetadata?{providerOptions:r.providerMetadata}:{}})}return i.length>0&&r.push({role:"tool",content:i}),r}function qt(...e){const t=e.filter((e=>null!=e));if(0===t.length)return;if(1===t.length)return t[0];const r=new AbortController;for(const e of t){if(e.aborted)return r.abort(e.reason),r.signal;e.addEventListener("abort",(()=>{r.abort(e.reason)}),{once:!0})}return r.signal}function Vt(e,t){const r=new Headers(null!=e?e:{});for(const[e,n]of Object.entries(t))r.has(e)||r.set(e,n);return r}function Yt({response:e,status:t,statusText:r,headers:n,stream:i}){const s=null!=t?t:200;void 0!==r?e.writeHead(s,r,n):e.writeHead(s,n);const o=i.getReader();(async()=>{try{for(;;){const{done:t,value:r}=await o.read();if(t)break;e.write(r)||await new Promise((t=>{e.once("drain",t)}))}}catch(e){throw e}finally{e.end()}})()}(0,i.hK)({prefix:"aitxt",size:24});var Kt=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}\n\n`)},flush(e){e.enqueue("data: [DONE]\n\n")}})}},$t={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};var zt=(0,i.ID)((()=>(0,i.jN)(a.KC([a.re({type:a.eu("text-start"),id:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.eu("text-delta"),id:a.Yj(),delta:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.eu("text-end"),id:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.eu("error"),errorText:a.Yj()}),a.re({type:a.eu("tool-input-start"),toolCallId:a.Yj(),toolName:a.Yj(),providerExecuted:a.zM().optional(),providerMetadata:Ze.optional(),dynamic:a.zM().optional(),title:a.Yj().optional()}),a.re({type:a.eu("tool-input-delta"),toolCallId:a.Yj(),inputTextDelta:a.Yj()}),a.re({type:a.eu("tool-input-available"),toolCallId:a.Yj(),toolName:a.Yj(),input:a.L5(),providerExecuted:a.zM().optional(),providerMetadata:Ze.optional(),dynamic:a.zM().optional(),title:a.Yj().optional()}),a.re({type:a.eu("tool-input-error"),toolCallId:a.Yj(),toolName:a.Yj(),input:a.L5(),providerExecuted:a.zM().optional(),providerMetadata:Ze.optional(),dynamic:a.zM().optional(),errorText:a.Yj(),title:a.Yj().optional()}),a.re({type:a.eu("tool-approval-request"),approvalId:a.Yj(),toolCallId:a.Yj()}),a.re({type:a.eu("tool-output-available"),toolCallId:a.Yj(),output:a.L5(),providerExecuted:a.zM().optional(),dynamic:a.zM().optional(),preliminary:a.zM().optional()}),a.re({type:a.eu("tool-output-error"),toolCallId:a.Yj(),errorText:a.Yj(),providerExecuted:a.zM().optional(),dynamic:a.zM().optional()}),a.re({type:a.eu("tool-output-denied"),toolCallId:a.Yj()}),a.re({type:a.eu("reasoning-start"),id:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.eu("reasoning-delta"),id:a.Yj(),delta:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.eu("reasoning-end"),id:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.eu("source-url"),sourceId:a.Yj(),url:a.Yj(),title:a.Yj().optional(),providerMetadata:Ze.optional()}),a.re({type:a.eu("source-document"),sourceId:a.Yj(),mediaType:a.Yj(),title:a.Yj(),filename:a.Yj().optional(),providerMetadata:Ze.optional()}),a.re({type:a.eu("file"),url:a.Yj(),mediaType:a.Yj(),providerMetadata:Ze.optional()}),a.re({type:a.Ie((e=>"string"==typeof e&&e.startsWith("data-")),{message:'Type must start with "data-"'}),id:a.Yj().optional(),data:a.L5(),transient:a.zM().optional()}),a.re({type:a.eu("start-step")}),a.re({type:a.eu("finish-step")}),a.re({type:a.eu("start"),messageId:a.Yj().optional(),messageMetadata:a.L5().optional()}),a.re({type:a.eu("finish"),finishReason:a.k5(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:a.L5().optional()}),a.re({type:a.eu("abort"),reason:a.Yj().optional()}),a.re({type:a.eu("message-metadata"),messageMetadata:a.L5()})]))));function Jt(e){return e.type.startsWith("data-")}function Ht(e){return"text"===e.type}function Xt(e){return"file"===e.type}function Wt(e){return"reasoning"===e.type}function Gt(e){return e.type.startsWith("tool-")}function Zt(e){return"dynamic-tool"===e.type}function Qt(e){return Gt(e)||Zt(e)}function er(e){return e.type.split("-").slice(1).join("-")}function tr(e){return Zt(e)?e.toolName:er(e)}function rr({lastMessage:e,messageId:t}){return{message:"assistant"===(null==e?void 0:e.role)?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function nr({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:n,onError:s,onToolCall:o,onData:a}){return e.pipeThrough(new TransformStream({async transform(e,l){await n((async({state:n,write:p})=>{var u,c,h,d;function f(e){const t=n.message.parts.filter(Qt).find((t=>t.toolCallId===e));if(null==t)throw new fe({chunkType:"tool-invocation",chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function m(e){var t;const r=n.message.parts.find((t=>Gt(t)&&t.toolCallId===e.toolCallId)),i=e,s=r;null!=r?(r.state=e.state,s.input=i.input,s.output=i.output,s.errorText=i.errorText,s.rawInput=i.rawInput,s.preliminary=i.preliminary,void 0!==e.title&&(s.title=e.title),s.providerExecuted=null!=(t=i.providerExecuted)?t:r.providerExecuted,null!=i.providerMetadata&&(r.callProviderMetadata=i.providerMetadata)):n.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,input:i.input,output:i.output,rawInput:i.rawInput,errorText:i.errorText,providerExecuted:i.providerExecuted,preliminary:i.preliminary,...null!=i.providerMetadata?{callProviderMetadata:i.providerMetadata}:{}})}function y(e){var t,r;const i=n.message.parts.find((t=>"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId)),s=e,o=i;null!=i?(i.state=e.state,o.toolName=e.toolName,o.input=s.input,o.output=s.output,o.errorText=s.errorText,o.rawInput=null!=(t=s.rawInput)?t:o.rawInput,o.preliminary=s.preliminary,void 0!==e.title&&(o.title=e.title),o.providerExecuted=null!=(r=s.providerExecuted)?r:i.providerExecuted,null!=s.providerMetadata&&(i.callProviderMetadata=s.providerMetadata)):n.message.parts.push({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:s.input,output:s.output,errorText:s.errorText,preliminary:s.preliminary,providerExecuted:s.providerExecuted,title:e.title,...null!=s.providerMetadata?{callProviderMetadata:s.providerMetadata}:{}})}async function g(e){if(null!=e){const r=null!=n.message.metadata?Et(n.message.metadata,e):e;null!=t&&await(0,i.k5)({value:r,schema:t,context:{field:"message.metadata",entityId:n.message.id}}),n.message.metadata=r}}switch(e.type){case"text-start":{const t={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"};n.activeTextParts[e.id]=t,n.message.parts.push(t),p();break}case"text-delta":{const t=n.activeTextParts[e.id];if(null==t)throw new fe({chunkType:"text-delta",chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=null!=(u=e.providerMetadata)?u:t.providerMetadata,p();break}case"text-end":{const t=n.activeTextParts[e.id];if(null==t)throw new fe({chunkType:"text-end",chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state="done",t.providerMetadata=null!=(c=e.providerMetadata)?c:t.providerMetadata,delete n.activeTextParts[e.id],p();break}case"reasoning-start":{const t={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"};n.activeReasoningParts[e.id]=t,n.message.parts.push(t),p();break}case"reasoning-delta":{const t=n.activeReasoningParts[e.id];if(null==t)throw new fe({chunkType:"reasoning-delta",chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=null!=(h=e.providerMetadata)?h:t.providerMetadata,p();break}case"reasoning-end":{const t=n.activeReasoningParts[e.id];if(null==t)throw new fe({chunkType:"reasoning-end",chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=null!=(d=e.providerMetadata)?d:t.providerMetadata,t.state="done",delete n.activeReasoningParts[e.id],p();break}case"file":n.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),p();break;case"source-url":n.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),p();break;case"source-document":n.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),p();break;case"tool-input-start":{const t=n.message.parts.filter(Gt);n.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title},e.dynamic?y({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted,title:e.title,providerMetadata:e.providerMetadata}):m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted,title:e.title,providerMetadata:e.providerMetadata}),p();break}case"tool-input-delta":{const t=n.partialToolCalls[e.toolCallId];if(null==t)throw new fe({chunkType:"tool-input-delta",chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;const{value:r}=await Nt(t.text);t.dynamic?y({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:r,title:t.title}):m({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:r,title:t.title}),p();break}case"tool-input-available":e.dynamic?y({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title}):m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title}),p(),o&&!e.providerExecuted&&await o({toolCall:e});break;case"tool-input-error":e.dynamic?y({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):m({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),p();break;case"tool-approval-request":{const t=f(e.toolCallId);t.state="approval-requested",t.approval={id:e.approvalId},p();break}case"tool-output-denied":f(e.toolCallId).state="output-denied",p();break;case"tool-output-available":{const t=f(e.toolCallId);"dynamic-tool"===t.type?y({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-available",input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,title:t.title}):m({toolCallId:e.toolCallId,toolName:er(t),state:"output-available",input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,title:t.title}),p();break}case"tool-output-error":{const t=f(e.toolCallId);"dynamic-tool"===t.type?y({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-error",input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,title:t.title}):m({toolCallId:e.toolCallId,toolName:er(t),state:"output-error",input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,title:t.title}),p();break}case"start-step":n.message.parts.push({type:"step-start"});break;case"finish-step":n.activeTextParts={},n.activeReasoningParts={};break;case"start":null!=e.messageId&&(n.message.id=e.messageId),await g(e.messageMetadata),null==e.messageId&&null==e.messageMetadata||p();break;case"finish":null!=e.finishReason&&(n.finishReason=e.finishReason),await g(e.messageMetadata),null!=e.messageMetadata&&p();break;case"message-metadata":await g(e.messageMetadata),null!=e.messageMetadata&&p();break;case"error":null==s||s(new Error(e.errorText));break;default:if(function(e){return e.type.startsWith("data-")}(e)){if(null!=(null==r?void 0:r[e.type])){const t=n.message.parts.findIndex((t=>"id"in t&&"data"in t&&t.id===e.id&&t.type===e.type)),s=t>=0?t:n.message.parts.length;await(0,i.k5)({value:e.data,schema:r[e.type],context:{field:`message.parts[${s}].data`,entityName:e.type,entityId:e.id}})}const t=e;if(t.transient){null==a||a(t);break}const s=null!=t.id?n.message.parts.find((e=>t.type===e.type&&t.id===e.id)):void 0;null!=s?s.data=t.data:n.message.parts.push(t),null==a||a(t),p()}}l.enqueue(e)}))}}))}function ir(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const e=this.getReader();let t=!1;async function r(r){var n;if(!t){t=!0;try{r&&await(null==(n=e.cancel)?void 0:n.call(e))}finally{try{e.releaseLock()}catch(e){}}}}return{async next(){if(t)return{done:!0,value:void 0};const{done:n,value:i}=await e.read();return n?(await r(!0),{done:!0,value:void 0}):{done:!1,value:i}},return:async()=>(await r(!0),{done:!0,value:void 0}),async throw(e){throw await r(!0),e}}},t}async function sr({stream:e,onError:t}){const r=e.getReader();try{for(;;){const{done:e}=await r.read();if(e)break}}catch(e){null==t||t(e)}finally{r.releaseLock()}}function or(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}}function ar(){var e,t;return null!=(t=null==(e=null==globalThis?void 0:globalThis.performance)?void 0:e.now())?t:Date.now()}var lr=(0,i.hK)({prefix:"aitxt",size:24});function pr({model:e,tools:t,toolChoice:r,system:n,prompt:i,messages:s,maxRetries:o,abortSignal:a,timeout:l,headers:p,stopWhen:u=Ft(1),experimental_output:c,output:h=c,experimental_telemetry:d,prepareStep:f,providerOptions:m,experimental_activeTools:y,activeTools:g=y,experimental_repairToolCall:T,experimental_transform:v,experimental_download:b,includeRawChunks:S=!1,onChunk:x,onError:E=({error:e})=>{console.error(e)},onFinish:w,onAbort:A,onStepFinish:P,experimental_context:I,experimental_include:C,_internal:{now:_=ar,generateId:N=lr}={},...k}){const O=je(l),M=function(e){if(null!=e&&"number"!=typeof e)return e.stepMs}(l),L=function(e){if(null!=e&&"number"!=typeof e)return e.chunkMs}(l),D=null!=M?new AbortController:void 0,B=null!=L?new AbortController:void 0;return new ur({model:Re(e),telemetry:d,headers:p,settings:k,maxRetries:o,abortSignal:qt(a,null!=O?AbortSignal.timeout(O):void 0,null==D?void 0:D.signal,null==B?void 0:B.signal),stepTimeoutMs:M,stepAbortController:D,chunkTimeoutMs:L,chunkAbortController:B,system:n,prompt:i,messages:s,tools:t,toolChoice:r,transforms:ze(v),activeTools:g,repairToolCall:T,stopConditions:ze(u),output:h,providerOptions:m,prepareStep:f,includeRawChunks:S,onChunk:x,onError:E,onFinish:w,onAbort:A,onStepFinish:P,now:_,generateId:N,experimental_context:I,download:b,include:C})}var ur=class{constructor({model:e,telemetry:t,headers:r,settings:n,maxRetries:o,abortSignal:p,stepTimeoutMs:u,stepAbortController:c,chunkTimeoutMs:h,chunkAbortController:d,system:f,prompt:m,messages:y,tools:T,toolChoice:v,transforms:b,activeTools:S,repairToolCall:x,stopConditions:w,output:A,providerOptions:P,prepareStep:I,includeRawChunks:_,now:N,generateId:k,onChunk:O,onError:L,onFinish:D,onAbort:B,onStepFinish:R,experimental_context:j,download:F,include:U}){let q;this._totalUsage=new i.e1,this._finishReason=new i.e1,this._rawFinishReason=new i.e1,this._steps=new i.e1,this.outputSpecification=A,this.includeRawChunks=_,this.tools=T;let V=[];const Y=[];let K,$,z,J={},H=[];const W=[],G=new Map;let Z,Q={},ee={};const te=new TransformStream({async transform(t,r){var n,i,s,o;r.enqueue(t);const{part:a}=t;if("text-delta"!==a.type&&"reasoning-delta"!==a.type&&"source"!==a.type&&"tool-call"!==a.type&&"tool-result"!==a.type&&"tool-input-start"!==a.type&&"tool-input-delta"!==a.type&&"raw"!==a.type||await(null==O?void 0:O({chunk:a})),"error"===a.type&&await L({error:dt(a.error)}),"text-start"===a.type&&(Q[a.id]={type:"text",text:"",providerMetadata:a.providerMetadata},V.push(Q[a.id])),"text-delta"===a.type){const e=Q[a.id];if(null==e)return void r.enqueue({part:{type:"error",error:`text part ${a.id} not found`},partialOutput:void 0});e.text+=a.text,e.providerMetadata=null!=(n=a.providerMetadata)?n:e.providerMetadata}if("text-end"===a.type){const e=Q[a.id];if(null==e)return void r.enqueue({part:{type:"error",error:`text part ${a.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(i=a.providerMetadata)?i:e.providerMetadata,delete Q[a.id]}if("reasoning-start"===a.type&&(ee[a.id]={type:"reasoning",text:"",providerMetadata:a.providerMetadata},V.push(ee[a.id])),"reasoning-delta"===a.type){const e=ee[a.id];if(null==e)return void r.enqueue({part:{type:"error",error:`reasoning part ${a.id} not found`},partialOutput:void 0});e.text+=a.text,e.providerMetadata=null!=(s=a.providerMetadata)?s:e.providerMetadata}if("reasoning-end"===a.type){const e=ee[a.id];if(null==e)return void r.enqueue({part:{type:"error",error:`reasoning part ${a.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(o=a.providerMetadata)?o:e.providerMetadata,delete ee[a.id]}if("file"===a.type&&V.push({type:"file",file:a.file}),"source"===a.type&&V.push(a),"tool-call"===a.type&&V.push(a),"tool-result"!==a.type||a.preliminary||V.push(a),"tool-approval-request"===a.type&&V.push(a),"tool-error"===a.type&&V.push(a),"start-step"===a.type&&(V=[],ee={},Q={},J=a.request,H=a.warnings),"finish-step"===a.type){const t=await Ut({content:V,tools:T}),r=new jt({content:V,finishReason:a.finishReason,rawFinishReason:a.rawFinishReason,usage:a.usage,warnings:H,request:J,response:{...a.response,messages:[...Y,...t]},providerMetadata:a.providerMetadata});await(null==R?void 0:R(r)),Me({warnings:H,provider:e.provider,model:e.modelId}),W.push(r),Y.push(...t),q.resolve()}"finish"===a.type&&(z=a.totalUsage,K=a.finishReason,$=a.rawFinishReason)},async flush(e){try{if(0===W.length){const e=(null==p?void 0:p.aborted)?p.reason:new X({message:"No output generated. Check the stream for errors."});return he._finishReason.reject(e),he._rawFinishReason.reject(e),he._totalUsage.reject(e),void he._steps.reject(e)}const e=null!=K?K:"other",r=null!=z?z:{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0};he._finishReason.resolve(e),he._rawFinishReason.resolve($),he._totalUsage.resolve(r),he._steps.resolve(W);const n=W[W.length-1];await(null==D?void 0:D({finishReason:n.finishReason,rawFinishReason:n.rawFinishReason,totalUsage:r,usage:n.usage,content:n.content,text:n.text,reasoningText:n.reasoningText,reasoning:n.reasoning,files:n.files,sources:n.sources,toolCalls:n.toolCalls,staticToolCalls:n.staticToolCalls,dynamicToolCalls:n.dynamicToolCalls,toolResults:n.toolResults,staticToolResults:n.staticToolResults,dynamicToolResults:n.dynamicToolResults,request:n.request,response:n.response,warnings:n.warnings,providerMetadata:n.providerMetadata,steps:W,experimental_context:j})),Z.setAttributes(await bt({telemetry:t,attributes:{"ai.response.finishReason":e,"ai.response.text":{output:()=>n.text},"ai.response.reasoning":{output:()=>n.reasoningText},"ai.response.toolCalls":{output:()=>{var e;return(null==(e=n.toolCalls)?void 0:e.length)?JSON.stringify(n.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(n.providerMetadata),"ai.usage.inputTokens":r.inputTokens,"ai.usage.outputTokens":r.outputTokens,"ai.usage.totalTokens":r.totalTokens,"ai.usage.reasoningTokens":r.reasoningTokens,"ai.usage.cachedInputTokens":r.cachedInputTokens}}))}catch(t){e.error(t)}finally{Z.end()}}}),re=function(){let e=[],t=null,r=!1,n=or();const i=()=>{r=!0,n.resolve(),e.forEach((e=>e.cancel())),e=[],null==t||t.close()},s=async()=>{if(r&&0===e.length)null==t||t.close();else{if(0===e.length)return n=or(),await n.promise,s();try{const{value:n,done:i}=await e[0].read();i?(e.shift(),0===e.length&&r?null==t||t.close():await s()):null==t||t.enqueue(n)}catch(r){null==t||t.error(r),e.shift(),i()}}};return{stream:new ReadableStream({start(e){t=e},pull:s,async cancel(){for(const t of e)await t.cancel();e=[],r=!0}}),addStream:t=>{if(r)throw new Error("Cannot add inner stream: outer stream is closed");e.push(t.getReader()),n.resolve()},close:()=>{r=!0,n.resolve(),0===e.length&&(null==t||t.close())},terminate:i}}();this.addStream=re.addStream,this.closeStream=re.close;const ie=re.stream.getReader();let se=new ReadableStream({async start(e){e.enqueue({type:"start"})},async pull(e){function t(){null==B||B({steps:W}),e.enqueue({type:"abort",...void 0!==(null==p?void 0:p.reason)?{reason:(0,s.u1)(p.reason)}:{}}),e.close()}try{const{done:r,value:n}=await ie.read();if(r)return void e.close();if(null==p?void 0:p.aborted)return void t();e.enqueue(n)}catch(r){(0,i.zf)(r)&&(null==p?void 0:p.aborted)?t():e.error(r)}},cancel:e=>re.stream.cancel(e)});for(const e of b)se=se.pipeThrough(e({tools:T,stopStream(){re.terminate()}}));this.baseStream=se.pipeThrough(function(e){let t,r,n="",i="",s="";function o({controller:e,partialOutput:n}){e.enqueue({part:{type:"text-delta",id:t,text:i,providerMetadata:r},partialOutput:n}),i=""}return new TransformStream({async transform(a,l){var p;if("finish-step"===a.type&&i.length>0&&o({controller:l}),"text-delta"!==a.type&&"text-start"!==a.type&&"text-end"!==a.type)return void l.enqueue({part:a,partialOutput:void 0});if(null==t)t=a.id;else if(a.id!==t)return void l.enqueue({part:a,partialOutput:void 0});if("text-start"===a.type)return void l.enqueue({part:a,partialOutput:void 0});if("text-end"===a.type)return i.length>0&&o({controller:l}),void l.enqueue({part:a,partialOutput:void 0});n+=a.text,i+=a.text,r=null!=(p=a.providerMetadata)?p:r;const u=await e.parsePartialOutput({text:n});if(void 0!==u){const e=JSON.stringify(u.partial);e!==s&&(o({controller:l,partialOutput:u.partial}),s=e)}}})}(null!=A?A:kt())).pipeThrough(te);const{maxRetries:oe,retry:ae}=function({maxRetries:e,abortSignal:t}){if(null!=e){if(!Number.isInteger(e))throw new g({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new g({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}const r=null!=e?e:2;return{maxRetries:r,retry:wt({maxRetries:r,abortSignal:t})}}({maxRetries:o,abortSignal:p}),pe=function({isEnabled:e=!1,tracer:t}={}){return e?t||l.u.getTracer("ai"):mt}(t),ue=function({maxOutputTokens:e,temperature:t,topP:r,topK:n,presencePenalty:i,frequencyPenalty:s,seed:o,stopSequences:a}){if(null!=e){if(!Number.isInteger(e))throw new g({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be an integer"});if(e<1)throw new g({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be >= 1"})}if(null!=t&&"number"!=typeof t)throw new g({parameter:"temperature",value:t,message:"temperature must be a number"});if(null!=r&&"number"!=typeof r)throw new g({parameter:"topP",value:r,message:"topP must be a number"});if(null!=n&&"number"!=typeof n)throw new g({parameter:"topK",value:n,message:"topK must be a number"});if(null!=i&&"number"!=typeof i)throw new g({parameter:"presencePenalty",value:i,message:"presencePenalty must be a number"});if(null!=s&&"number"!=typeof s)throw new g({parameter:"frequencyPenalty",value:s,message:"frequencyPenalty must be a number"});if(null!=o&&!Number.isInteger(o))throw new g({parameter:"seed",value:o,message:"seed must be an integer"});return{maxOutputTokens:e,temperature:t,topP:r,topK:n,presencePenalty:i,frequencyPenalty:s,stopSequences:a,seed:o}}(n),ce=function({model:e,settings:t,telemetry:r,headers:n}){var i;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce(((e,[t,r])=>{if("timeout"===t){const n=je(r);null!=n&&(e[`ai.settings.${t}`]=n)}else e[`ai.settings.${t}`]=r;return e}),{}),...Object.entries(null!=(i=null==r?void 0:r.metadata)?i:{}).reduce(((e,[t,r])=>(e[`ai.telemetry.metadata.${t}`]=r,e)),{}),...Object.entries(null!=n?n:{}).reduce(((e,[t,r])=>(void 0!==r&&(e[`ai.request.headers.${t}`]=r),e)),{})}}({model:e,telemetry:t,headers:r,settings:{...ue,maxRetries:oe}}),he=this;Tt({name:"ai.streamText",attributes:bt({telemetry:t,attributes:{...ft({operationId:"ai.streamText",telemetry:t}),...ce,"ai.prompt":{input:()=>JSON.stringify({system:f,prompt:m,messages:y})}}}),tracer:pe,endWhenDone:!1,fn:async n=>{Z=n;const o=await async function(e){if(null==e.prompt&&null==e.messages)throw new s.M3({prompt:e,message:"prompt or messages must be defined"});if(null!=e.prompt&&null!=e.messages)throw new s.M3({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(null!=e.system&&"string"!=typeof e.system&&!ze(e.system).every((e=>"object"==typeof e&&null!==e&&"role"in e&&"system"===e.role)))throw new s.M3({prompt:e,message:"system must be a string, SystemModelMessage, or array of SystemModelMessage"});let t;if(null!=e.prompt&&"string"==typeof e.prompt)t=[{role:"user",content:e.prompt}];else if(null!=e.prompt&&Array.isArray(e.prompt))t=e.prompt;else{if(null==e.messages)throw new s.M3({prompt:e,message:"prompt or messages must be defined"});t=e.messages}if(0===t.length)throw new s.M3({prompt:e,message:"messages must not be empty"});const r=await(0,i.ZZ)({value:t,schema:a.YO(ht)});if(!r.success)throw new s.M3({prompt:e,message:"The messages do not match the ModelMessage[] schema.",cause:r.error});return{messages:t,system:e.system}}({system:f,prompt:m,messages:y}),l=o.messages,g=[],{approvedToolApprovals:b,deniedToolApprovals:_}=function({messages:e}){const t=e.at(-1);if("tool"!=(null==t?void 0:t.role))return{approvedToolApprovals:[],deniedToolApprovals:[]};const r={};for(const t of e)if("assistant"===t.role&&"string"!=typeof t.content){const e=t.content;for(const t of e)"tool-call"===t.type&&(r[t.toolCallId]=t)}const n={};for(const t of e)if("assistant"===t.role&&"string"!=typeof t.content){const e=t.content;for(const t of e)"tool-approval-request"===t.type&&(n[t.approvalId]=t)}const i={};for(const e of t.content)"tool-result"===e.type&&(i[e.toolCallId]=e);const s=[],o=[],a=t.content.filter((e=>"tool-approval-response"===e.type));for(const e of a){const t=n[e.approvalId];if(null==t)throw new E({approvalId:e.approvalId});if(null!=i[t.toolCallId])continue;const a=r[t.toolCallId];if(null==a)throw new M({toolCallId:t.toolCallId,approvalId:t.approvalId});const l={approvalRequest:t,approvalResponse:e,toolCall:a};e.approved?s.push(l):o.push(l)}return{approvedToolApprovals:s,deniedToolApprovals:o}}({messages:l});if(_.length>0||b.length>0){const e=[...b,..._].filter((e=>e.toolCall.providerExecuted)),r=b.filter((e=>!e.toolCall.providerExecuted)),n=_.filter((e=>!e.toolCall.providerExecuted)),i=_.filter((e=>e.toolCall.providerExecuted));let s;const o=new ReadableStream({start(e){s=e}});he.addStream(o);try{for(const e of[...n,...i])null==s||s.enqueue({type:"tool-output-denied",toolCallId:e.toolCall.toolCallId,toolName:e.toolCall.toolName});const o=[];if(await Promise.all(r.map((async e=>{const r=await Pt({toolCall:e.toolCall,tools:T,tracer:pe,telemetry:t,messages:l,abortSignal:p,experimental_context:j,onPreliminaryToolResult:e=>{null==s||s.enqueue(e)}});null!=r&&(null==s||s.enqueue(r),o.push(r))}))),e.length>0&&g.push({role:"tool",content:e.map((e=>({type:"tool-approval-response",approvalId:e.approvalResponse.approvalId,approved:e.approvalResponse.approved,reason:e.approvalResponse.reason,providerExecuted:!0})))}),o.length>0||n.length>0){const e=[];for(const t of o)e.push({type:"tool-result",toolCallId:t.toolCallId,toolName:t.toolName,output:await Xe({toolCallId:t.toolCallId,input:t.input,tool:null==T?void 0:T[t.toolName],output:"tool-result"===t.type?t.output:t.error,errorMode:"tool-error"===t.type?"json":"none"})});for(const t of n)e.push({type:"tool-result",toolCallId:t.toolCall.toolCallId,toolName:t.toolCall.toolName,output:{type:"execution-denied",reason:t.approvalResponse.reason}});g.push({role:"tool",content:e})}}finally{null==s||s.close()}}Y.push(...g),await async function n({currentStep:s,responseMessages:a,usage:m}){var y,g,b,E,_,O,L;const D=he.includeRawChunks,B=null!=u?setTimeout((()=>c.abort()),u):void 0;let R;function Y(){null!=R&&(clearTimeout(R),R=void 0)}function K(){null!=B&&clearTimeout(B)}try{q=new i.e1;const u=[...l,...a],c=await(null==I?void 0:I({model:e,steps:W,stepNumber:W.length,messages:u,experimental_context:j})),B=Re(null!=(y=null==c?void 0:c.model)?y:e),$=await Je({prompt:{system:null!=(g=null==c?void 0:c.system)?g:o.system,messages:null!=(b=null==c?void 0:c.messages)?b:u},supportedUrls:await B.supportedUrls,download:F}),{toolChoice:z,tools:J}=await async function({tools:e,toolChoice:t,activeTools:r}){if(!(null!=(n=e)&&Object.keys(n).length>0))return{tools:void 0,toolChoice:void 0};var n;const s=null!=r?Object.entries(e).filter((([e])=>r.includes(e))):Object.entries(e),o=[];for(const[e,t]of s){const r=t.type;switch(r){case void 0:case"dynamic":case"function":o.push({type:"function",name:e,description:t.description,inputSchema:await(0,i.mD)(t.inputSchema).jsonSchema,...null!=t.inputExamples?{inputExamples:t.inputExamples}:{},providerOptions:t.providerOptions,...null!=t.strict?{strict:t.strict}:{}});break;case"provider":o.push({type:"provider",name:e,id:t.id,args:t.args});break;default:throw new Error(`Unsupported tool type: ${r}`)}}return{tools:o,toolChoice:null==t?{type:"auto"}:"string"==typeof t?{type:t}:{type:"tool",toolName:t.toolName}}}({tools:T,toolChoice:null!=(E=null==c?void 0:c.toolChoice)?E:v,activeTools:null!=(_=null==c?void 0:c.activeTools)?_:S});j=null!=(O=null==c?void 0:c.experimental_context)?O:j;const H=Et(P,null==c?void 0:c.providerOptions),{result:{stream:X,response:Z,request:Q},doStreamSpan:ee,startTimestampMs:te}=await ae((()=>Tt({name:"ai.streamText.doStream",attributes:bt({telemetry:t,attributes:{...ft({operationId:"ai.streamText.doStream",telemetry:t}),...ce,"ai.model.provider":B.provider,"ai.model.id":B.modelId,"ai.prompt.messages":{input:()=>function(e){return JSON.stringify(e.map((e=>({...e,content:"string"==typeof e.content?e.content:e.content.map((e=>{return"file"===e.type?{...e,data:e.data instanceof Uint8Array?(t=e.data,"string"==typeof t?t:t instanceof ArrayBuffer?(0,i.n_)(new Uint8Array(t)):(0,i.n_)(t)):e.data}:e;var t}))}))))}($)},"ai.prompt.tools":{input:()=>null==J?void 0:J.map((e=>JSON.stringify(e)))},"ai.prompt.toolChoice":{input:()=>null!=z?JSON.stringify(z):void 0},"gen_ai.system":B.provider,"gen_ai.request.model":B.modelId,"gen_ai.request.frequency_penalty":ue.frequencyPenalty,"gen_ai.request.max_tokens":ue.maxOutputTokens,"gen_ai.request.presence_penalty":ue.presencePenalty,"gen_ai.request.stop_sequences":ue.stopSequences,"gen_ai.request.temperature":ue.temperature,"gen_ai.request.top_k":ue.topK,"gen_ai.request.top_p":ue.topP}}),tracer:pe,endWhenDone:!1,fn:async e=>({startTimestampMs:N(),doStreamSpan:e,result:await B.doStream({...ue,tools:J,toolChoice:z,responseFormat:await(null==A?void 0:A.responseFormat),prompt:$,providerOptions:H,abortSignal:p,headers:r,includeRawChunks:D})})}))),re=function({tools:e,generatorStream:t,tracer:r,telemetry:n,system:s,messages:o,abortSignal:a,repairToolCall:l,experimental_context:p,generateId:u}){let c=null;const h=new ReadableStream({start(e){c=e}}),d=new Set,f=new Map,m=new Map;let y,g=!1;function T(){g&&0===d.size&&(null!=y&&c.enqueue(y),c.close())}const v=new TransformStream({async transform(t,h){const g=t.type;switch(g){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":h.enqueue(t);break;case"file":h.enqueue({type:"file",file:new Ct({data:t.data,mediaType:t.mediaType})});break;case"finish":y={type:"finish",finishReason:t.finishReason.unified,rawFinishReason:t.finishReason.raw,usage:St(t.usage),providerMetadata:t.providerMetadata};break;case"tool-approval-request":{const e=m.get(t.toolCallId);if(null==e){c.enqueue({type:"error",error:new M({toolCallId:t.toolCallId,approvalId:t.approvalId})});break}h.enqueue({type:"tool-approval-request",approvalId:t.approvalId,toolCall:e});break}case"tool-call":try{const y=await async function({toolCall:e,tools:t,repairToolCall:r,system:n,messages:s}){var o;try{if(null==t){if(e.providerExecuted&&e.dynamic)return await Bt(e);throw new ne({toolName:e.toolName})}try{return await Rt({toolCall:e,tools:t})}catch(o){if(null==r||!ne.isInstance(o)&&!C.isInstance(o))throw o;let a=null;try{a=await r({toolCall:e,tools:t,inputSchema:async({toolName:e})=>{const{inputSchema:r}=t[e];return await(0,i.mD)(r).jsonSchema},system:n,messages:s,error:o})}catch(e){throw new le({cause:e,originalError:o})}if(null==a)throw o;return await Rt({toolCall:a,tools:t})}}catch(r){const n=await(0,i.N8)({text:e.input}),s=n.success?n.value:e.input;return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:s,dynamic:!0,invalid:!0,error:r,title:null==(o=null==t?void 0:t[e.toolName])?void 0:o.title,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}}}({toolCall:t,tools:e,repairToolCall:l,system:s,messages:o});if(m.set(y.toolCallId,y),h.enqueue(y),y.invalid){c.enqueue({type:"tool-error",toolCallId:y.toolCallId,toolName:y.toolName,input:y.input,error:(0,i.u1)(y.error),dynamic:!0,title:y.title});break}const g=null==e?void 0:e[y.toolName];if(null==g)break;if(null!=g.onInputAvailable&&await g.onInputAvailable({input:y.input,toolCallId:y.toolCallId,messages:o,abortSignal:a,experimental_context:p}),await async function({tool:e,toolCall:t,messages:r,experimental_context:n}){return null!=e.needsApproval&&("boolean"==typeof e.needsApproval?e.needsApproval:await e.needsApproval(t.input,{toolCallId:t.toolCallId,messages:r,experimental_context:n}))}({tool:g,toolCall:y,messages:o,experimental_context:p})){c.enqueue({type:"tool-approval-request",approvalId:u(),toolCall:y});break}if(f.set(y.toolCallId,y.input),null!=g.execute&&!0!==y.providerExecuted){const t=u();d.add(t),Pt({toolCall:y,tools:e,tracer:r,telemetry:n,messages:o,abortSignal:a,experimental_context:p,onPreliminaryToolResult:e=>{c.enqueue(e)}}).then((e=>{c.enqueue(e)})).catch((e=>{c.enqueue({type:"error",error:e})})).finally((()=>{d.delete(t),T()}))}}catch(e){c.enqueue({type:"error",error:e})}break;case"tool-result":{const e=t.toolName;t.isError?c.enqueue({type:"tool-error",toolCallId:t.toolCallId,toolName:e,input:f.get(t.toolCallId),providerExecuted:!0,error:t.result,dynamic:t.dynamic}):h.enqueue({type:"tool-result",toolCallId:t.toolCallId,toolName:e,input:f.get(t.toolCallId),output:t.result,providerExecuted:!0,dynamic:t.dynamic});break}default:throw new Error(`Unhandled chunk type: ${g}`)}},flush(){g=!0,T()}});return new ReadableStream({start:async e=>Promise.all([t.pipeThrough(v).pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){}})),h.pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){e.close()}}))])})}({tools:T,generatorStream:X,tracer:pe,telemetry:t,system:f,messages:u,repairToolCall:x,abortSignal:p,experimental_context:j,generateId:k}),ie=null==(L=null==U?void 0:U.requestBody)||L?null!=Q?Q:{}:{...Q,body:void 0},se=[],oe=[];let de;const fe={};let me,ye,ge="other",Te={inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0},ve=!0,be={id:k(),timestamp:new Date,modelId:e.modelId},Se="";he.addStream(re.pipeThrough(new TransformStream({async transform(e,t){var r,n,i,s,o;if(null!=h&&(null!=R&&clearTimeout(R),R=setTimeout((()=>d.abort()),h)),"stream-start"===e.type)return void(de=e.warnings);if(ve){const e=N()-te;ve=!1,ee.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":e}),ee.setAttributes({"ai.response.msToFirstChunk":e}),t.enqueue({type:"start-step",request:ie,warnings:null!=de?de:[]})}const a=e.type;switch(a){case"tool-approval-request":case"text-start":case"text-end":case"reasoning-start":case"reasoning-end":case"file":case"source":t.enqueue(e);break;case"text-delta":e.delta.length>0&&(t.enqueue({type:"text-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata}),Se+=e.delta);break;case"reasoning-delta":t.enqueue({type:"reasoning-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata});break;case"tool-call":t.enqueue(e),se.push(e);break;case"tool-result":t.enqueue(e),e.preliminary||oe.push(e);break;case"tool-error":t.enqueue(e),oe.push(e);break;case"response-metadata":be={id:null!=(r=e.id)?r:be.id,timestamp:null!=(n=e.timestamp)?n:be.timestamp,modelId:null!=(i=e.modelId)?i:be.modelId};break;case"finish":{Te=e.usage,ge=e.finishReason,me=e.rawFinishReason,ye=e.providerMetadata;const t=N()-te;ee.addEvent("ai.stream.finish"),ee.setAttributes({"ai.response.msToFinish":t,"ai.response.avgOutputTokensPerSecond":1e3*(null!=(s=Te.outputTokens)?s:0)/t});break}case"tool-input-start":{fe[e.id]=e.toolName;const r=null==T?void 0:T[e.toolName];null!=(null==r?void 0:r.onInputStart)&&await r.onInputStart({toolCallId:e.id,messages:u,abortSignal:p,experimental_context:j}),t.enqueue({...e,dynamic:null!=(o=e.dynamic)?o:"dynamic"===(null==r?void 0:r.type),title:null==r?void 0:r.title});break}case"tool-input-end":delete fe[e.id],t.enqueue(e);break;case"tool-input-delta":{const r=fe[e.id],n=null==T?void 0:T[r];null!=(null==n?void 0:n.onInputDelta)&&await n.onInputDelta({inputTextDelta:e.delta,toolCallId:e.id,messages:u,abortSignal:p,experimental_context:j}),t.enqueue(e);break}case"error":t.enqueue(e),ge="error";break;case"raw":D&&t.enqueue(e);break;default:throw new Error(`Unknown chunk type: ${a}`)}},async flush(e){const r=se.length>0?JSON.stringify(se):void 0;try{ee.setAttributes(await bt({telemetry:t,attributes:{"ai.response.finishReason":ge,"ai.response.text":{output:()=>Se},"ai.response.reasoning":{output:()=>{const e=V.filter((e=>"reasoning"===e.type));return e.length>0?e.map((e=>e.text)).join("\n"):void 0}},"ai.response.toolCalls":{output:()=>r},"ai.response.id":be.id,"ai.response.model":be.modelId,"ai.response.timestamp":be.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(ye),"ai.usage.inputTokens":Te.inputTokens,"ai.usage.outputTokens":Te.outputTokens,"ai.usage.totalTokens":Te.totalTokens,"ai.usage.reasoningTokens":Te.reasoningTokens,"ai.usage.cachedInputTokens":Te.cachedInputTokens,"gen_ai.response.finish_reasons":[ge],"gen_ai.response.id":be.id,"gen_ai.response.model":be.modelId,"gen_ai.usage.input_tokens":Te.inputTokens,"gen_ai.usage.output_tokens":Te.outputTokens}}))}catch(e){}finally{ee.end()}e.enqueue({type:"finish-step",finishReason:ge,rawFinishReason:me,usage:Te,providerMetadata:ye,response:{...be,headers:null==Z?void 0:Z.headers}});const i=function(e,t){var r,n,i,s,o,a,l,p,u,c;return{inputTokens:xt(e.inputTokens,t.inputTokens),inputTokenDetails:{noCacheTokens:xt(null==(r=e.inputTokenDetails)?void 0:r.noCacheTokens,null==(n=t.inputTokenDetails)?void 0:n.noCacheTokens),cacheReadTokens:xt(null==(i=e.inputTokenDetails)?void 0:i.cacheReadTokens,null==(s=t.inputTokenDetails)?void 0:s.cacheReadTokens),cacheWriteTokens:xt(null==(o=e.inputTokenDetails)?void 0:o.cacheWriteTokens,null==(a=t.inputTokenDetails)?void 0:a.cacheWriteTokens)},outputTokens:xt(e.outputTokens,t.outputTokens),outputTokenDetails:{textTokens:xt(null==(l=e.outputTokenDetails)?void 0:l.textTokens,null==(p=t.outputTokenDetails)?void 0:p.textTokens),reasoningTokens:xt(null==(u=e.outputTokenDetails)?void 0:u.reasoningTokens,null==(c=t.outputTokenDetails)?void 0:c.reasoningTokens)},totalTokens:xt(e.totalTokens,t.totalTokens),reasoningTokens:xt(e.reasoningTokens,t.reasoningTokens),cachedInputTokens:xt(e.cachedInputTokens,t.cachedInputTokens)}}(m,Te);await q.promise;const o=se.filter((e=>!0!==e.providerExecuted)),l=oe.filter((e=>!0!==e.providerExecuted));for(const e of se){if(!0!==e.providerExecuted)continue;const t=null==T?void 0:T[e.toolName];"provider"===(null==t?void 0:t.type)&&t.supportsDeferredResults&&(oe.some((t=>("tool-result"===t.type||"tool-error"===t.type)&&t.toolCallId===e.toolCallId))||G.set(e.toolCallId,{toolName:e.toolName}))}for(const e of oe)"tool-result"!==e.type&&"tool-error"!==e.type||G.delete(e.toolCallId);if(K(),Y(),(o.length>0&&l.length===o.length||G.size>0)&&!await async function({stopConditions:e,steps:t}){return(await Promise.all(e.map((e=>e({steps:t}))))).some((e=>e))}({stopConditions:w,steps:W})){a.push(...await Ut({content:W[W.length-1].content,tools:T}));try{await n({currentStep:s+1,responseMessages:a,usage:i})}catch(t){e.enqueue({type:"error",error:t}),he.closeStream()}}else e.enqueue({type:"finish",finishReason:ge,rawFinishReason:me,totalUsage:i}),he.closeStream()}})))}finally{K(),Y()}}({currentStep:0,responseMessages:g,usage:{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0}})}}).catch((e=>{he.addStream(new ReadableStream({start(t){t.enqueue({type:"error",error:e}),t.close()}})),he.closeStream()}))}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then((e=>e[e.length-1]))}get content(){return this.finalStep.then((e=>e.content))}get warnings(){return this.finalStep.then((e=>e.warnings))}get providerMetadata(){return this.finalStep.then((e=>e.providerMetadata))}get text(){return this.finalStep.then((e=>e.text))}get reasoningText(){return this.finalStep.then((e=>e.reasoningText))}get reasoning(){return this.finalStep.then((e=>e.reasoning))}get sources(){return this.finalStep.then((e=>e.sources))}get files(){return this.finalStep.then((e=>e.files))}get toolCalls(){return this.finalStep.then((e=>e.toolCalls))}get staticToolCalls(){return this.finalStep.then((e=>e.staticToolCalls))}get dynamicToolCalls(){return this.finalStep.then((e=>e.dynamicToolCalls))}get toolResults(){return this.finalStep.then((e=>e.toolResults))}get staticToolResults(){return this.finalStep.then((e=>e.staticToolResults))}get dynamicToolResults(){return this.finalStep.then((e=>e.dynamicToolResults))}get usage(){return this.finalStep.then((e=>e.usage))}get request(){return this.finalStep.then((e=>e.request))}get response(){return this.finalStep.then((e=>e.response))}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}get rawFinishReason(){return this.consumeStream(),this._rawFinishReason.promise}teeStream(){const[e,t]=this.baseStream.tee();return this.baseStream=t,e}get textStream(){return ir(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){"text-delta"===e.type&&t.enqueue(e.text)}})))}get fullStream(){return ir(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){t.enqueue(e)}})))}async consumeStream(e){var t;try{await sr({stream:this.fullStream,onError:null==e?void 0:e.onError})}catch(r){null==(t=null==e?void 0:e.onError)||t.call(e,r)}}get experimental_partialOutputStream(){return this.partialOutputStream}get partialOutputStream(){return ir(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:e},t){null!=e&&t.enqueue(e)}})))}get elementStream(){var e,t,r;const n=null==(e=this.outputSpecification)?void 0:e.createElementStreamTransform();if(null==n)throw new s.b8({functionality:`element streams in ${null!=(r=null==(t=this.outputSpecification)?void 0:t.name)?r:"text"} mode`});return ir(this.teeStream().pipeThrough(n))}get output(){return this.finalStep.then((e=>{var t;return(null!=(t=this.outputSpecification)?t:kt()).parseCompleteOutput({text:e.text},{response:e.response,usage:e.usage,finishReason:e.finishReason})}))}toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:n,sendReasoning:i=!0,sendSources:o=!1,sendStart:a=!0,sendFinish:l=!0,onError:p=s.u1}={}){const u=null!=t?function({originalMessages:e,responseMessageId:t}){if(null==e)return;const r=e[e.length-1];return"assistant"===(null==r?void 0:r.role)?r.id:"function"==typeof t?t():t}({originalMessages:e,responseMessageId:t}):void 0,c=e=>{var t;const r=null==(t=this.tools)?void 0:t[e.toolName];return null==r?e.dynamic:"dynamic"===(null==r?void 0:r.type)||void 0};return ir(function({messageId:e,originalMessages:t=[],onStepFinish:r,onFinish:n,onError:i,stream:s}){let o=null==t?void 0:t[t.length-1];"assistant"!==(null==o?void 0:o.role)?o=void 0:e=o.id;let a=!1;const l=s.pipeThrough(new TransformStream({transform(t,r){if("start"===t.type){const r=t;null==r.messageId&&null!=e&&(r.messageId=e)}"abort"===t.type&&(a=!0),r.enqueue(t)}}));if(null==n&&null==r)return l;const p=rr({lastMessage:o?structuredClone(o):void 0,messageId:null!=e?e:""});let u=!1;const c=async()=>{if(u||!n)return;u=!0;const e=p.message.id===(null==o?void 0:o.id);await n({isAborted:a,isContinuation:e,responseMessage:p.message,messages:[...e?t.slice(0,-1):t,p.message],finishReason:p.finishReason})};return nr({stream:l,runUpdateMessageJob:async e=>{await e({state:p,write:()=>{}})},onError:i}).pipeThrough(new TransformStream({async transform(e,n){"finish-step"===e.type&&await(async()=>{if(!r)return;const e=p.message.id===(null==o?void 0:o.id);try{await r({isContinuation:e,responseMessage:structuredClone(p.message),messages:[...e?t.slice(0,-1):t,structuredClone(p.message)]})}catch(e){i(e)}})(),n.enqueue(e)},async cancel(){await c()},async flush(){await c()}}))}({stream:this.fullStream.pipeThrough(new TransformStream({transform:async(e,t)=>{const r=null==n?void 0:n({part:e}),s=e.type;switch(s){case"text-start":t.enqueue({type:"text-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-delta":t.enqueue({type:"text-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-end":t.enqueue({type:"text-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-start":t.enqueue({type:"reasoning-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-delta":i&&t.enqueue({type:"reasoning-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-end":t.enqueue({type:"reasoning-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"file":t.enqueue({type:"file",mediaType:e.file.mediaType,url:`data:${e.file.mediaType};base64,${e.file.base64}`});break;case"source":o&&"url"===e.sourceType&&t.enqueue({type:"source-url",sourceId:e.id,url:e.url,title:e.title,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}),o&&"document"===e.sourceType&&t.enqueue({type:"source-document",sourceId:e.id,mediaType:e.mediaType,title:e.title,filename:e.filename,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"tool-input-start":{const r=c(e);t.enqueue({type:"tool-input-start",toolCallId:e.id,toolName:e.toolName,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=r?{dynamic:r}:{},...null!=e.title?{title:e.title}:{}});break}case"tool-input-delta":t.enqueue({type:"tool-input-delta",toolCallId:e.id,inputTextDelta:e.delta});break;case"tool-call":{const r=c(e);e.invalid?t.enqueue({type:"tool-input-error",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=r?{dynamic:r}:{},errorText:p(e.error),...null!=e.title?{title:e.title}:{}}):t.enqueue({type:"tool-input-available",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=r?{dynamic:r}:{},...null!=e.title?{title:e.title}:{}});break}case"tool-approval-request":t.enqueue({type:"tool-approval-request",approvalId:e.approvalId,toolCallId:e.toolCall.toolCallId});break;case"tool-result":{const r=c(e);t.enqueue({type:"tool-output-available",toolCallId:e.toolCallId,output:e.output,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.preliminary?{preliminary:e.preliminary}:{},...null!=r?{dynamic:r}:{}});break}case"tool-error":{const r=c(e);t.enqueue({type:"tool-output-error",toolCallId:e.toolCallId,errorText:p(e.error),...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=r?{dynamic:r}:{}});break}case"tool-output-denied":t.enqueue({type:"tool-output-denied",toolCallId:e.toolCallId});break;case"error":t.enqueue({type:"error",errorText:p(e.error)});break;case"start-step":t.enqueue({type:"start-step"});break;case"finish-step":t.enqueue({type:"finish-step"});break;case"start":a&&t.enqueue({type:"start",...null!=r?{messageMetadata:r}:{},...null!=u?{messageId:u}:{}});break;case"finish":l&&t.enqueue({type:"finish",finishReason:e.finishReason,...null!=r?{messageMetadata:r}:{}});break;case"abort":t.enqueue(e);break;case"tool-input-end":case"raw":break;default:throw new Error(`Unknown chunk type: ${s}`)}null!=r&&"start"!==s&&"finish"!==s&&t.enqueue({type:"message-metadata",messageMetadata:r})}})),messageId:null!=u?u:null==t?void 0:t(),originalMessages:e,onFinish:r,onError:p}))}pipeUIMessageStreamToResponse(e,{originalMessages:t,generateMessageId:r,onFinish:n,messageMetadata:i,sendReasoning:s,sendSources:o,sendFinish:a,sendStart:l,onError:p,...u}={}){!function({response:e,status:t,statusText:r,headers:n,stream:i,consumeSseStream:s}){let o=i.pipeThrough(new Kt);if(s){const[e,t]=o.tee();o=e,s({stream:t})}Yt({response:e,status:t,statusText:r,headers:Object.fromEntries(Vt(n,$t).entries()),stream:o.pipeThrough(new TextEncoderStream)})}({response:e,stream:this.toUIMessageStream({originalMessages:t,generateMessageId:r,onFinish:n,messageMetadata:i,sendReasoning:s,sendSources:o,sendFinish:a,sendStart:l,onError:p}),...u})}pipeTextStreamToResponse(e,t){!function({response:e,status:t,statusText:r,headers:n,textStream:i}){Yt({response:e,status:t,statusText:r,headers:Object.fromEntries(Vt(n,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:i.pipeThrough(new TextEncoderStream)})}({response:e,textStream:this.textStream,...t})}toUIMessageStreamResponse({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:n,sendReasoning:i,sendSources:s,sendFinish:o,sendStart:a,onError:l,...p}={}){return function({status:e,statusText:t,headers:r,stream:n,consumeSseStream:i}){let s=n.pipeThrough(new Kt);if(i){const[e,t]=s.tee();s=e,i({stream:t})}return new Response(s.pipeThrough(new TextEncoderStream),{status:e,statusText:t,headers:Vt(r,$t)})}({stream:this.toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:r,messageMetadata:n,sendReasoning:i,sendSources:s,sendFinish:o,sendStart:a,onError:l}),...p})}toTextStreamResponse(e){return function({status:e,statusText:t,headers:r,textStream:n}){return new Response(n.pipeThrough(new TextEncoderStream),{status:null!=e?e:200,statusText:t,headers:Vt(r,{"content-type":"text/plain; charset=utf-8"})})}({textStream:this.textStream,...e})}};async function cr(e,t){const r=[];(null==t?void 0:t.ignoreIncompleteToolCalls)&&(e=e.map((e=>({...e,parts:e.parts.filter((e=>!Qt(e)||"input-streaming"!==e.state&&"input-available"!==e.state))}))));for(const n of e)switch(n.role){case"system":{const s=n.parts.filter((e=>"text"===e.type)),o=s.reduce(((e,t)=>null!=t.providerMetadata?{...e,...t.providerMetadata}:e),{});r.push({role:"system",content:s.map((e=>e.text)).join(""),...Object.keys(o).length>0?{providerOptions:o}:{}});break}case"user":r.push({role:"user",content:n.parts.map((e=>{var r;return Ht(e)?{type:"text",text:e.text,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}}:Xt(e)?{type:"file",mediaType:e.mediaType,filename:e.filename,data:e.url,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}}:Jt(e)?null==(r=null==t?void 0:t.convertDataPart)?void 0:r.call(t,e):void 0})).filter(i.R)});break;case"assistant":if(null!=n.parts){let a=[];async function l(){var e,n,i,s,o,l;if(0===a.length)return;const p=[];for(const r of a)if(Ht(r))p.push({type:"text",text:r.text,...null!=r.providerMetadata?{providerOptions:r.providerMetadata}:{}});else if(Xt(r))p.push({type:"file",mediaType:r.mediaType,filename:r.filename,data:r.url});else if(Wt(r))p.push({type:"reasoning",text:r.text,providerOptions:r.providerMetadata});else if(Qt(r)){const i=tr(r);"input-streaming"!==r.state&&(p.push({type:"tool-call",toolCallId:r.toolCallId,toolName:i,input:"output-error"===r.state?null!=(e=r.input)?e:"rawInput"in r?r.rawInput:void 0:r.input,providerExecuted:r.providerExecuted,...null!=r.callProviderMetadata?{providerOptions:r.callProviderMetadata}:{}}),null!=r.approval&&p.push({type:"tool-approval-request",approvalId:r.approval.id,toolCallId:r.toolCallId}),!0!==r.providerExecuted||"approval-responded"===r.state||"output-available"!==r.state&&"output-error"!==r.state||p.push({type:"tool-result",toolCallId:r.toolCallId,toolName:i,output:await Xe({toolCallId:r.toolCallId,input:r.input,output:"output-error"===r.state?r.errorText:r.output,tool:null==(n=null==t?void 0:t.tools)?void 0:n[i],errorMode:"output-error"===r.state?"json":"none"}),...null!=r.callProviderMetadata?{providerOptions:r.callProviderMetadata}:{}}))}else{if(!Jt(r))throw new Error(`Unsupported part: ${r}`);{const e=null==(i=null==t?void 0:t.convertDataPart)?void 0:i.call(t,r);null!=e&&p.push(e)}}r.push({role:"assistant",content:p});const u=a.filter((e=>{var t;return Qt(e)&&(!0!==e.providerExecuted||null!=(null==(t=e.approval)?void 0:t.approved))}));if(u.length>0){const e=[];for(const r of u)if(null!=(null==(s=r.approval)?void 0:s.approved)&&e.push({type:"tool-approval-response",approvalId:r.approval.id,approved:r.approval.approved,reason:r.approval.reason,providerExecuted:r.providerExecuted}),!0!==r.providerExecuted)switch(r.state){case"output-denied":e.push({type:"tool-result",toolCallId:r.toolCallId,toolName:tr(r),output:{type:"error-text",value:null!=(o=r.approval.reason)?o:"Tool execution denied."},...null!=r.callProviderMetadata?{providerOptions:r.callProviderMetadata}:{}});break;case"output-error":case"output-available":{const n=tr(r);e.push({type:"tool-result",toolCallId:r.toolCallId,toolName:n,output:await Xe({toolCallId:r.toolCallId,input:r.input,output:"output-error"===r.state?r.errorText:r.output,tool:null==(l=null==t?void 0:t.tools)?void 0:l[n],errorMode:"output-error"===r.state?"text":"none"}),...null!=r.callProviderMetadata?{providerOptions:r.callProviderMetadata}:{}});break}}e.length>0&&r.push({role:"tool",content:e})}a=[]}for(const p of n.parts)Ht(p)||Wt(p)||Xt(p)||Qt(p)||Jt(p)?a.push(p):"step-start"===p.type&&await l();await l();break}break;default:{const u=n.role;throw new Ae({originalMessage:n,message:`Unsupported role: ${u}`})}}return r}function hr(e){return({url:t,abortSignal:r})=>Ve({url:t,maxBytes:null==e?void 0:e.maxBytes,abortSignal:r})}(0,i.ID)((()=>(0,i.jN)(a.YO(a.Ik({id:a.Yj(),role:a.k5(["system","user","assistant"]),metadata:a.L5().optional(),parts:a.YO(a.KC([a.Ik({type:a.eu("text"),text:a.Yj(),state:a.k5(["streaming","done"]).optional(),providerMetadata:Ze.optional()}),a.Ik({type:a.eu("reasoning"),text:a.Yj(),state:a.k5(["streaming","done"]).optional(),providerMetadata:Ze.optional()}),a.Ik({type:a.eu("source-url"),sourceId:a.Yj(),url:a.Yj(),title:a.Yj().optional(),providerMetadata:Ze.optional()}),a.Ik({type:a.eu("source-document"),sourceId:a.Yj(),mediaType:a.Yj(),title:a.Yj(),filename:a.Yj().optional(),providerMetadata:Ze.optional()}),a.Ik({type:a.eu("file"),mediaType:a.Yj(),filename:a.Yj().optional(),url:a.Yj(),providerMetadata:Ze.optional()}),a.Ik({type:a.eu("step-start")}),a.Ik({type:a.Yj().startsWith("data-"),id:a.Yj().optional(),data:a.L5()}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("input-streaming"),input:a.L5().optional(),providerExecuted:a.zM().optional(),callProviderMetadata:Ze.optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),approval:a.Zm().optional()}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("input-available"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Zm().optional()}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("approval-requested"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.Zm().optional(),reason:a.Zm().optional()})}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("approval-responded"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.zM(),reason:a.Yj().optional()})}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("output-available"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.L5(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),preliminary:a.zM().optional(),approval:a.Ik({id:a.Yj(),approved:a.eu(!0),reason:a.Yj().optional()}).optional()}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("output-error"),input:a.L5(),rawInput:a.L5().optional(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Yj(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.eu(!0),reason:a.Yj().optional()}).optional()}),a.Ik({type:a.eu("dynamic-tool"),toolName:a.Yj(),toolCallId:a.Yj(),state:a.eu("output-denied"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.eu(!1),reason:a.Yj().optional()})}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("input-streaming"),providerExecuted:a.zM().optional(),callProviderMetadata:Ze.optional(),input:a.L5().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),approval:a.Zm().optional()}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("input-available"),providerExecuted:a.zM().optional(),input:a.L5(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Zm().optional()}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("approval-requested"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.Zm().optional(),reason:a.Zm().optional()})}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("approval-responded"),input:a.L5(),providerExecuted:a.zM().optional(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.zM(),reason:a.Yj().optional()})}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("output-available"),providerExecuted:a.zM().optional(),input:a.L5(),output:a.L5(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),preliminary:a.zM().optional(),approval:a.Ik({id:a.Yj(),approved:a.eu(!0),reason:a.Yj().optional()}).optional()}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("output-error"),providerExecuted:a.zM().optional(),input:a.L5(),rawInput:a.L5().optional(),output:a.Zm().optional(),errorText:a.Yj(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.eu(!0),reason:a.Yj().optional()}).optional()}),a.Ik({type:a.Yj().startsWith("tool-"),toolCallId:a.Yj(),state:a.eu("output-denied"),providerExecuted:a.zM().optional(),input:a.L5(),output:a.Zm().optional(),errorText:a.Zm().optional(),callProviderMetadata:Ze.optional(),approval:a.Ik({id:a.Yj(),approved:a.eu(!1),reason:a.Yj().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")))),(0,i.hK)({prefix:"aiobj",size:24});var dr=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise(((t,r)=>{this.queue.push((async()=>{try{await e(),t()}catch(e){r(e)}})),this.processQueue()}))}};(0,i.hK)({prefix:"aiobj",size:24}),hr();var fr=Symbol.for("vercel.ai.error.AI_NoSuchProviderError");s.eM,hr();var mr=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:n,fetch:i,prepareSendMessagesRequest:s,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=r,this.body=n,this.fetch=i,this.prepareSendMessagesRequest=s,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){var r,n,s,o,a;const l=await(0,i.hd)(this.body),p=await(0,i.hd)(this.headers),u=await(0,i.hd)(this.credentials),c={...(0,i.qx)(p),...(0,i.qx)(t.headers)},h=await(null==(r=this.prepareSendMessagesRequest)?void 0:r.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...l,...t.body},headers:c,credentials:u,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),d=null!=(n=null==h?void 0:h.api)?n:this.api,f=void 0!==(null==h?void 0:h.headers)?(0,i.qx)(h.headers):c,m=void 0!==(null==h?void 0:h.body)?h.body:{...l,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},y=null!=(s=null==h?void 0:h.credentials)?s:u,g=null!=(o=this.fetch)?o:globalThis.fetch,T=await g(d,{method:"POST",headers:(0,i.WZ)({"Content-Type":"application/json",...f},`ai-sdk/${qe}`,(0,i.G1)()),body:JSON.stringify(m),credentials:y,signal:e});if(!T.ok)throw new Error(null!=(a=await T.text())?a:"Failed to fetch the chat response.");if(!T.body)throw new Error("The response body is empty.");return this.processResponseStream(T.body)}async reconnectToStream(e){var t,r,n,s,o;const a=await(0,i.hd)(this.body),l=await(0,i.hd)(this.headers),p=await(0,i.hd)(this.credentials),u={...(0,i.qx)(l),...(0,i.qx)(e.headers)},c=await(null==(t=this.prepareReconnectToStreamRequest)?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...a,...e.body},headers:u,credentials:p,requestMetadata:e.metadata})),h=null!=(r=null==c?void 0:c.api)?r:`${this.api}/${e.chatId}/stream`,d=void 0!==(null==c?void 0:c.headers)?(0,i.qx)(c.headers):u,f=null!=(n=null==c?void 0:c.credentials)?n:p,m=null!=(s=this.fetch)?s:globalThis.fetch,y=await m(h,{method:"GET",headers:(0,i.WZ)(d,`ai-sdk/${qe}`,(0,i.G1)()),credentials:f});if(204===y.status)return null;if(!y.ok)throw new Error(null!=(o=await y.text())?o:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}},yr=class extends mr{constructor(e={}){super(e)}processResponseStream(e){return(0,i._Z)({stream:e,schema:zt}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},gr=class{constructor({generateId:e=i.$C,id:t=e(),transport:r=new yr,messageMetadataSchema:n,dataPartSchemas:s,state:o,onError:a,onToolCall:l,onFinish:p,onData:u,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new dr,this.sendMessage=async(e,t)=>{var r,n,i,s;if(null==e)return void await this.makeRequest({trigger:"submit-message",messageId:null==(r=this.lastMessage)?void 0:r.id,...t});let o;if("text"in e||"files"in e){const t=Array.isArray(e.files)?e.files:await async function(e){if(null==e)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map((async e=>{const{name:t,type:r}=e;return{type:"file",mediaType:r,filename:t,url:await new Promise(((t,r)=>{const n=new FileReader;n.onload=e=>{var r;t(null==(r=e.target)?void 0:r.result)},n.onerror=e=>r(e),n.readAsDataURL(e)}))}})))}(e.files);o={parts:[...t,..."text"in e&&null!=e.text?[{type:"text",text:e.text}]:[]]}}else o=e;if(null!=e.messageId){const t=this.state.messages.findIndex((t=>t.id===e.messageId));if(-1===t)throw new Error(`message with id ${e.messageId} not found`);if("user"!==this.state.messages[t].role)throw new Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...o,id:e.messageId,role:null!=(n=o.role)?n:"user",metadata:e.metadata})}else this.state.pushMessage({...o,id:null!=(i=o.id)?i:this.generateId(),role:null!=(s=o.role)?s:"user",metadata:e.metadata});await this.makeRequest({trigger:"submit-message",messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{const r=null==e?this.state.messages.length-1:this.state.messages.findIndex((t=>t.id===e));if(-1===r)throw new Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,"assistant"===this.messages[r].role?r:r+1),await this.makeRequest({trigger:"regenerate-message",messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:"resume-stream",...e})},this.clearError=()=>{"error"===this.status&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:r})=>this.jobExecutor.run((async()=>{const n=this.state.messages,i=n[n.length-1],s=n=>Qt(n)&&"approval-requested"===n.state&&n.approval.id===e?{...n,state:"approval-responded",approval:{id:e,approved:t,reason:r}}:n;this.state.replaceMessage(n.length-1,{...i,parts:i.parts.map(s)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(s)),"streaming"!==this.status&&"submitted"!==this.status&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then((e=>{var t;e&&this.makeRequest({trigger:"submit-message",messageId:null==(t=this.lastMessage)?void 0:t.id})}))})),this.addToolOutput=async({state:e="output-available",tool:t,toolCallId:r,output:n,errorText:i})=>this.jobExecutor.run((async()=>{const t=this.state.messages,s=t[t.length-1],o=t=>Qt(t)&&t.toolCallId===r?{...t,state:e,output:n,errorText:i}:t;this.state.replaceMessage(t.length-1,{...s,parts:s.parts.map(o)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),"streaming"!==this.status&&"submitted"!==this.status&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then((e=>{var t;e&&this.makeRequest({trigger:"submit-message",messageId:null==(t=this.lastMessage)?void 0:t.id})}))})),this.addToolResult=this.addToolOutput,this.stop=async()=>{var e;"streaming"!==this.status&&"submitted"!==this.status||(null==(e=this.activeResponse)?void 0:e.abortController)&&this.activeResponse.abortController.abort()},this.id=t,this.transport=r,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=s,this.state=o,this.onError=a,this.onToolCall=l,this.onFinish=p,this.onData=u,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&"object"==typeof e&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:r,body:n,messageId:i}){var s,o,a;this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let p=!1,u=!1,c=!1;try{const s={state:rr({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};let o;if(s.abortController.signal.addEventListener("abort",(()=>{p=!0})),this.activeResponse=s,"resume-stream"===e){const e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:r,body:n});if(null==e)return void this.setStatus({status:"ready"});o=e}else o=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:s.abortController.signal,metadata:t,headers:r,body:n,trigger:e,messageId:i});const a=e=>this.jobExecutor.run((()=>e({state:s.state,write:()=>{var e;this.setStatus({status:"streaming"}),s.state.message.id===(null==(e=this.lastMessage)?void 0:e.id)?this.state.replaceMessage(this.state.messages.length-1,s.state.message):this.state.pushMessage(s.state.message)}})));await sr({stream:nr({stream:o,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:a,onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:"ready"})}catch(e){if(p||"AbortError"===e.name)return p=!0,this.setStatus({status:"ready"}),null;c=!0,e instanceof TypeError&&(e.message.toLowerCase().includes("fetch")||e.message.toLowerCase().includes("network"))&&(u=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:"error",error:e})}finally{try{null==(o=this.onFinish)||o.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:p,isDisconnect:u,isError:c,finishReason:null==(s=this.activeResponse)?void 0:s.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}!c&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:null==(a=this.lastMessage)?void 0:a.id,metadata:t,headers:r,body:n})}};function Tr({messages:e}){const t=e[e.length-1];if(!t)return!1;if("assistant"!==t.role)return!1;const r=t.parts.reduce(((e,t,r)=>"step-start"===t.type?r:e),-1),n=t.parts.slice(r+1).filter(Qt).filter((e=>!e.providerExecuted));return n.filter((e=>"approval-responded"===e.state)).length>0&&n.every((e=>"output-available"===e.state||"output-error"===e.state||"approval-responded"===e.state))}},15496:(e,t,r)=>{var n=r(67787).Buffer,i=r(53896);function s(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,s(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,r)}},15626:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,i){return(0,n.default)(e,t,[{type:i?"CommentLine":"CommentBlock",value:r}])};var n=r(64697)},16068:(e,t,r)=>{var n=r(41207).X,i=r(87264).Q,s=r(10559).getCachedPredictionContext;function o(e,t){return this.atn=e,this.sharedContextCache=t,this}o.ERROR=new n(2147483647,new i),o.prototype.getCachedContext=function(e){return null===this.sharedContextCache?e:s(e,this.sharedContextCache,{})},t.e=o},16397:(e,t,r)=>{function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}r.d(t,{A:()=>n})},16569:(e,t,r)=>{t.DFA=r(81204).DFA,t.DFASerializer=r(4768).DFASerializer,t.LexerDFASerializer=r(4768).LexerDFASerializer,t.PredPrediction=r(41207).PredPrediction},16738:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,!1)};var n=r(16938)},16938:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!0,r=!1){return l(e,t,r,new Map)};var n=r(35108),i=r(63555);const{hasOwn:s}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function o(e,t,r,n){return e&&"string"==typeof e.type?l(e,t,r,n):e}function a(e,t,r,n){return Array.isArray(e)?e.map((e=>o(e,t,r,n))):o(e,t,r,n)}function l(e,t=!0,r=!1,o){if(!e)return e;const{type:l}=e,u={type:e.type};if((0,i.isIdentifier)(e))u.name=e.name,s(e,"optional")&&"boolean"==typeof e.optional&&(u.optional=e.optional),s(e,"typeAnnotation")&&(u.typeAnnotation=t?a(e.typeAnnotation,!0,r,o):e.typeAnnotation),s(e,"decorators")&&(u.decorators=t?a(e.decorators,!0,r,o):e.decorators);else{if(!s(n.NODE_FIELDS,l))throw new Error(`Unknown node type: "${l}"`);for(const c of Object.keys(n.NODE_FIELDS[l]))s(e,c)&&(u[c]=t?(0,i.isFile)(e)&&"comments"===c?p(e.comments,t,r,o):a(e[c],!0,r,o):e[c])}return s(e,"loc")&&(u.loc=r?null:e.loc),s(e,"leadingComments")&&(u.leadingComments=p(e.leadingComments,t,r,o)),s(e,"innerComments")&&(u.innerComments=p(e.innerComments,t,r,o)),s(e,"trailingComments")&&(u.trailingComments=p(e.trailingComments,t,r,o)),s(e,"extra")&&(u.extra=Object.assign({},e.extra)),u}function p(e,t,r,n){return e&&t?e.map((e=>{const t=n.get(e);if(t)return t;const{type:i,value:s,loc:o}=e,a={type:i,value:s,loc:o};return r&&(a.loc=null),n.set(e,a),a})):e}},17615:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!(0,n.default)(e)){var t;const r=null!=(t=null==e?void 0:e.type)?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${r}"`)}};var n=r(25129)},17690:(e,t,r)=>{var n=r(50659),i=r(91136),s=r(76966),o=r(54200),a=r(78554),l=r(64398),p=function(e,t){var r=t.error;t.error=function(n){r&&r(e,n,t),e.trigger("error",e,n,t)}},u=n.extend({save:function(e,t,r){var n,i;if(null==e||"object"==typeof e?(n=e,r=t):(n={})[e]=t,r=s({validate:!0},r),n&&!r.wait){if(!this.set(n,r))return!1}else if(!this._validate(n,r))return!1;void 0===r.parse&&(r.parse=!0);var a=this,l=r.success;r.success=function(e){var t=a.parse(e,r);if(r.wait&&(t=s(n||{},t)),o(t)&&!a.set(t,r))return!1;l&&l(a,e,r),a.trigger("sync",a,e,r)},p(this,r),"patch"==(i=this.isNew()?"create":r.patch?"patch":"update")&&(r.attrs=n),r.wait&&"patch"!==i&&(r.attrs=s(a.serialize(),n));var u=this.sync(i,this,r);return r.xhr=u,u},fetch:function(e){void 0===(e=e?a(e):{}).parse&&(e.parse=!0);var t=this,r=e.success;e.success=function(n){if(!t.set(t.parse(n,e),e))return!1;r&&r(t,n,e),t.trigger("sync",t,n,e)},p(this,e);var n=this.sync("read",this,e);return e.xhr=n,n},destroy:function(e){e=e?a(e):{};var t=this,r=e.success,n=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(i){(e.wait||t.isNew())&&n(),r&&r(t,i,e),t.isNew()||t.trigger("sync",t,i,e)},this.isNew())return e.success(),!1;p(this,e);var i=this.sync("delete",this,e);return e.xhr=i,e.wait||n(),i},sync:function(){return i.apply(this,arguments)},url:function(){var e=l(this,"urlRoot")||l(this.collection,"url")||function(){throw new Error('A "url" property or function must be specified')}();return this.isNew()?e:e+("/"===e.charAt(e.length-1)?"":"/")+encodeURIComponent(this.getId())}});e.exports=u},17916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(63555);t.default=function(e){if((0,n.isExpressionStatement)(e)&&(e=e.expression),(0,n.isExpression)(e))return e;if((0,n.isClass)(e)?(e.type="ClassExpression",e.abstract=!1):(0,n.isFunction)(e)&&(e.type="FunctionExpression"),!(0,n.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e}},18133:(e,t)=>{function r(e,t){const r=e.quasis;let n="`";for(let i=0;i<r.length-1;i++)if(n+=r[i].value.raw,this.token(n+"${",!0),this.print(t[i]),n="}",this.tokenMap){const t=this.tokenMap.findMatching(e,"}",i);t&&this._catchUpTo(t.loc.start)}n+=r[r.length-1].value.raw,this.token(n+"`",!0)}Object.defineProperty(t,"__esModule",{value:!0}),t.TaggedTemplateExpression=function(e){this.print(e.tag),this.print(e.typeParameters),this.print(e.quasi)},t.TemplateElement=function(){throw new Error("TemplateElement printing is handled in TemplateLiteral")},t.TemplateLiteral=function(e){r.call(this,e,e.expressions)},t._printTemplate=r},18214:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_ALIASES=void 0,t.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"}},18393:(e,t,r)=>{var n=r(72994).Token,i=r(32141).f,s=r(74763).p,o=r(86587).RecognitionException,a=r(86587).LexerNoViableAltException;function l(e){return i.call(this),this._input=e,this._factory=s.DEFAULT,this._tokenFactorySourcePair=[this,e],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=n.DEFAULT_CHANNEL,this._type=n.INVALID_TYPE,this._modeStack=[],this._mode=l.DEFAULT_MODE,this._text=null,this}l.prototype=Object.create(i.prototype),l.prototype.constructor=l,l.DEFAULT_MODE=0,l.MORE=-2,l.SKIP=-3,l.DEFAULT_TOKEN_CHANNEL=n.DEFAULT_CHANNEL,l.HIDDEN=n.HIDDEN_CHANNEL,l.MIN_CHAR_VALUE=0,l.MAX_CHAR_VALUE=1114111,l.prototype.reset=function(){null!==this._input&&this._input.seek(0),this._token=null,this._type=n.INVALID_TYPE,this._channel=n.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=l.DEFAULT_MODE,this._modeStack=[],this._interp.reset()},l.prototype.nextToken=function(){if(null===this._input)throw"nextToken requires a non-null input stream.";var e=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=n.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;for(var t=!1;;){this._type=n.INVALID_TYPE;var r=l.SKIP;try{r=this._interp.match(this._input,this._mode)}catch(e){if(!(e instanceof o))throw console.log(e.stack),e;this.notifyListeners(e),this.recover(e)}if(this._input.LA(1)===n.EOF&&(this._hitEOF=!0),this._type===n.INVALID_TYPE&&(this._type=r),this._type===l.SKIP){t=!0;break}if(this._type!==l.MORE)break}if(!t)return null===this._token&&this.emit(),this._token}}finally{this._input.release(e)}},l.prototype.skip=function(){this._type=l.SKIP},l.prototype.more=function(){this._type=l.MORE},l.prototype.mode=function(e){this._mode=e},l.prototype.pushMode=function(e){this._interp.debug&&console.log("pushMode "+e),this._modeStack.push(this._mode),this.mode(e)},l.prototype.popMode=function(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode},Object.defineProperty(l.prototype,"inputStream",{get:function(){return this._input},set:function(e){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=e,this._tokenFactorySourcePair=[this,this._input]}}),Object.defineProperty(l.prototype,"sourceName",{get:function(){return this._input.sourceName}}),l.prototype.emitToken=function(e){this._token=e},l.prototype.emit=function(){var e=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(e),e},l.prototype.emitEOF=function(){var e=this.column,t=this.line,r=this._factory.create(this._tokenFactorySourcePair,n.EOF,null,n.DEFAULT_CHANNEL,this._input.index,this._input.index-1,t,e);return this.emitToken(r),r},Object.defineProperty(l.prototype,"type",{get:function(){return this.type},set:function(e){this._type=e}}),Object.defineProperty(l.prototype,"line",{get:function(){return this._interp.line},set:function(e){this._interp.line=e}}),Object.defineProperty(l.prototype,"column",{get:function(){return this._interp.column},set:function(e){this._interp.column=e}}),l.prototype.getCharIndex=function(){return this._input.index},Object.defineProperty(l.prototype,"text",{get:function(){return null!==this._text?this._text:this._interp.getText(this._input)},set:function(e){this._text=e}}),l.prototype.getAllTokens=function(){for(var e=[],t=this.nextToken();t.type!==n.EOF;)e.push(t),t=this.nextToken();return e},l.prototype.notifyListeners=function(e){var t=this._tokenStartCharIndex,r=this._input.index,n=this._input.getText(t,r),i="token recognition error at: '"+this.getErrorDisplay(n)+"'";this.getErrorListenerDispatch().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,i,e)},l.prototype.getErrorDisplay=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t.join("")},l.prototype.getErrorDisplayForChar=function(e){return e.charCodeAt(0)===n.EOF?"<EOF>":"\n"===e?"\\n":"\t"===e?"\\t":"\r"===e?"\\r":e},l.prototype.getCharErrorDisplay=function(e){return"'"+this.getErrorDisplayForChar(e)+"'"},l.prototype.recover=function(e){this._input.LA(1)!==n.EOF&&(e instanceof a?this._interp.consume(this._input):this._input.consume())},t.Lexer=l},18480:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreakStatement=function(e){this.word("break"),p(this,e.label)},t.CatchClause=function(e){this.word("catch"),this.space(),e.param&&(this.tokenChar(40),this.print(e.param),this.print(e.param.typeAnnotation),this.tokenChar(41),this.space()),this.print(e.body)},t.ContinueStatement=function(e){this.word("continue"),p(this,e.label)},t.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},t.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body),this.space(),this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.semicolon()},t.ForInStatement=function(e){this.word("for"),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=i.TokenContext.forInHead|i.TokenContext.forInOrInitHeadAccumulate,this.print(e.left),this.tokenContext=i.TokenContext.normal,this.space(),this.word("in"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)},t.ForOfStatement=function(e){this.word("for"),this.space(),e.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=i.TokenContext.forOfHead,this.print(e.left),this.space(),this.word("of"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e.body)},t.ForStatement=function(e){this.word("for"),this.space(),this.tokenChar(40),this.tokenContext|=i.TokenContext.forInitHead|i.TokenContext.forInOrInitHeadAccumulate,this.print(e.init),this.tokenContext=i.TokenContext.normal,this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.tokenChar(59,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e.body)},t.IfStatement=function(e){this.word("if"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();const t=e.alternate&&o(l(e.consequent));t&&(this.tokenChar(123),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent),t&&(this.dedent(),this.newline(),this.tokenChar(125)),e.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate))},t.LabeledStatement=function(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)},t.ReturnStatement=function(e){this.word("return"),p(this,e.argument)},t.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test),this.tokenChar(58)):(this.word("default"),this.tokenChar(58)),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,!0))},t.SwitchStatement=function(e){this.word("switch"),this.space(),this.tokenChar(40),this.print(e.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(e.cases,!0),this.rightBrace(e)},t.ThrowStatement=function(e){this.word("throw"),p(this,e.argument)},t.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block),this.space(),e.handlers?this.print(e.handlers[0]):this.print(e.handler),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer))},t.VariableDeclaration=function(e,t){e.declare&&(this.word("declare"),this.space());const{kind:r}=e;switch(r){case"await using":this.word("await"),this.space();case"using":this.word("using",!0);break;default:this.word(r)}this.space();let n=!1;if(!s(t))for(const t of e.declarations)if(t.init){n=!0;break}if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,n?u:void 0),null!=t)switch(t.type){case"ForStatement":if(t.init===e)return;break;case"ForInStatement":case"ForOfStatement":if(t.left===e)return}this.semicolon()},t.VariableDeclarator=function(e){this.print(e.id),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))},t.WhileStatement=function(e){this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e.body)},t.WithStatement=function(e){this.word("with"),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e.body)};var n=r(45741),i=r(36306);const{isFor:s,isIfStatement:o,isStatement:a}=n;function l(e){const{body:t}=e;return!1===a(t)?e:l(t)}function p(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function u(e){this.tokenChar(44,e),this.newline()}},18744:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ClassAccessorProperty=function(e){var t;this.printJoin(e.decorators);const r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r),s._tsPrintClassMemberModifiers.call(this,e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(o._variance.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},t.ClassBody=function(e){if(this.tokenChar(123),0===e.body.length)this.tokenChar(125);else{const t=function(e,t){if(!e.tokenMap||null==t.start||null==t.end)return null;const r=e.tokenMap.getIndexes(t);if(!r)return null;let n=1,i=0,s=0;const o=()=>{for(;s<t.body.length&&null==t.body[s].start;)s++};return o(),a=>{s<=a&&(s=a+1,o());const l=s===t.body.length?t.end:t.body[s].start;let p;for(;n<r.length&&e.tokenMap.matchesOriginal(p=e._tokens[r[n]],";")&&p.start<l;)e.tokenChar(59,i++),n++}}(this,e);null==t||t(-1);const r=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0,!0),this._noLineTerminatorAfterNode=r,this.endsWith(10)||this.newline(),this.rightBrace(e)}},t.ClassExpression=t.ClassDeclaration=function(e,t){(l(t)||p(t))&&i._shouldPrintDecoratorsBeforeExport.call(this,t)||this.printJoin(e.decorators),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id)),this.print(e.typeParameters),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass),this.print(e.superTypeParameters)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)},t.ClassMethod=function(e){u.call(this,e),this.space(),this.print(e.body)},t.ClassPrivateMethod=function(e){u.call(this,e),this.space(),this.print(e.body)},t.ClassPrivateProperty=function(e){this.printJoin(e.decorators),s._tsPrintClassMemberModifiers.call(this,e),this.print(e.key),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},t.ClassProperty=function(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){var t;const r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r)}s._tsPrintClassMemberModifiers.call(this,e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(o._variance.call(this,e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()},t.StaticBlock=function(e){this.word("static"),this.space(),this.tokenChar(123),0===e.body.length?this.tokenChar(125):(this.newline(),this.printSequence(e.body,!0),this.rightBrace(e))},t._classMethodHead=u;var n=r(45741),i=r(73019),s=r(86809),o=r(14058),a=r(38118);const{isExportDefaultDeclaration:l,isExportNamedDeclaration:p}=n;function u(e){if(this.printJoin(e.decorators),!this.format.preserveFormat){var t;const r=null==(t=e.key.loc)||null==(t=t.end)?void 0:t.line;r&&this.catchUp(r)}s._tsPrintClassMemberModifiers.call(this,e),a._methodHead.call(this,e)}},18949:(e,t,r)=>{var n=r(72994).Token,i=r(77171).f;function s(e,t){return i.call(this,e),this.channel=void 0===t?n.DEFAULT_CHANNEL:t,this}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype.adjustSeekIndex=function(e){return this.nextTokenOnChannel(e,this.channel)},s.prototype.LB=function(e){if(0===e||this.index-e<0)return null;for(var t=this.index,r=1;r<=e;)t=this.previousTokenOnChannel(t-1,this.channel),r+=1;return t<0?null:this.tokens[t]},s.prototype.LT=function(e){if(this.lazyInit(),0===e)return null;if(e<0)return this.LB(-e);for(var t=this.index,r=1;r<e;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),r+=1;return this.tokens[t]},s.prototype.getNumberOfOnChannelTokens=function(){var e=0;this.fill();for(var t=0;t<this.tokens.length;t++){var r=this.tokens[t];if(r.channel===this.channel&&(e+=1),r.type===n.EOF)break}return e},t.CommonTokenStream=s},19845:(e,t)=>{function r(){this.space()}Object.defineProperty(t,"__esModule",{value:!0}),t.JSXAttribute=function(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))},t.JSXClosingElement=function(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)},t.JSXClosingFragment=function(){this.token("</"),this.tokenChar(62)},t.JSXElement=function(e){const t=e.openingElement;if(this.print(t),!t.selfClosing){this.indent();for(const t of e.children)this.print(t);this.dedent(),this.print(e.closingElement)}},t.JSXEmptyExpression=function(){this.printInnerComments()},t.JSXExpressionContainer=function(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)},t.JSXFragment=function(e){this.print(e.openingFragment),this.indent();for(const t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)},t.JSXIdentifier=function(e){this.word(e.name)},t.JSXMemberExpression=function(e){this.print(e.object),this.tokenChar(46),this.print(e.property)},t.JSXNamespacedName=function(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)},t.JSXOpeningElement=function(e){this.tokenChar(60),this.print(e.name),e.typeArguments&&this.print(e.typeArguments),this.print(e.typeParameters),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,void 0,void 0,r)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)},t.JSXOpeningFragment=function(){this.tokenChar(60),this.tokenChar(62)},t.JSXSpreadAttribute=function(e){this.tokenChar(123),this.token("..."),this.print(e.argument),this.rightBrace(e)},t.JSXSpreadChild=function(e){this.tokenChar(123),this.token("..."),this.print(e.expression),this.rightBrace(e)},t.JSXText=function(e){const t=this.getPossibleRaw(e);void 0!==t?this.token(t,!0):this.token(e.value,!0)}},21058:(e,t,r)=>{var n=r(47375).InputStream,i="undefined"==typeof window&&"undefined"==typeof importScripts?r(36374):null,s={fromString:function(e){return new n(e,!0)},fromBlob:function(e,t,r,i){var s=FileReader();s.onload=function(e){var t=new n(e.target.result,!0);r(t)},s.onerror=i,s.readAsText(e,t)},fromBuffer:function(e,t){return new n(e.toString(t),!0)},fromPath:function(e,t,r){i.readFile(e,t,(function(e,t){var i=null;null!==t&&(i=new n(t,!0)),r(e,i)}))},fromPathSync:function(e,t){var r=i.readFileSync(e,t);return new n(r,!0)}};t.CharStreams=s},23153:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!(0,n.default)(e.type,"Immutable")||!!(0,i.isIdentifier)(e)&&"undefined"===e.name};var n=r(40453),i=r(63555)},23234:(e,t,r)=>{var n=r(66346).Set,i=r(66346).BitSet,s=r(72994).Token,o=r(470).G,a=(r(70040).Interval,r(70040).m),l=r(81367).RuleStopState,p=r(10014).RuleTransition,u=r(10014).NotSetTransition,c=r(10014).WildcardTransition,h=r(10014).AbstractPredicateTransition,d=r(10559),f=d.predictionContextFromRuleContext,m=d.PredictionContext,y=d.SingletonPredictionContext;function g(e){this.atn=e}g.HIT_PRED=s.INVALID_TYPE,g.prototype.getDecisionLookahead=function(e){if(null===e)return null;for(var t=e.transitions.length,r=[],s=0;s<t;s++){r[s]=new a;var o=new n;this._LOOK(e.transition(s).target,null,m.EMPTY,r[s],o,new i,!1,!1),(0===r[s].length||r[s].contains(g.HIT_PRED))&&(r[s]=null)}return r},g.prototype.LOOK=function(e,t,r){var s=new a,o=null!==(r=r||null)?f(e.atn,r):null;return this._LOOK(e,t,o,s,new n,new i,!0,!0),s},g.prototype._LOOK=function(e,t,r,n,i,a,d,f){var T=new o({state:e,alt:0,context:r},null);if(!i.contains(T)){if(i.add(T),e===t){if(null===r)return void n.addOne(s.EPSILON);if(r.isEmpty()&&f)return void n.addOne(s.EOF)}if(e instanceof l){if(null===r)return void n.addOne(s.EPSILON);if(r.isEmpty()&&f)return void n.addOne(s.EOF);if(r!==m.EMPTY){for(var v=0;v<r.length;v++){var b=this.atn.states[r.getReturnState(v)],S=a.contains(b.ruleIndex);try{a.remove(b.ruleIndex),this._LOOK(b,t,r.getParent(v),n,i,a,d,f)}finally{S&&a.add(b.ruleIndex)}}return}}for(var x=0;x<e.transitions.length;x++){var E=e.transitions[x];if(E.constructor===p){if(a.contains(E.target.ruleIndex))continue;var w=y.create(r,E.followState.stateNumber);try{a.add(E.target.ruleIndex),this._LOOK(E.target,t,w,n,i,a,d,f)}finally{a.remove(E.target.ruleIndex)}}else if(E instanceof h)d?this._LOOK(E.target,t,r,n,i,a,d,f):n.addOne(g.HIT_PRED);else if(E.isEpsilon)this._LOOK(E.target,t,r,n,i,a,d,f);else if(E.constructor===c)n.addRange(s.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{var A=E.label;null!==A&&(E instanceof u&&(A=A.complement(s.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),n.addSet(A))}}}},t.a=g},23438:(e,t,r)=>{var n=r(66346),i=r(72994).Token,s=(r(48898).RuleNode,r(48898).ErrorNode),o=r(48898).TerminalNode,a=r(29499).ParserRuleContext,l=r(40846).m,p=r(51028).INVALID_ALT_NUMBER;function u(){}u.toStringTree=function(e,t,r){t=t||null,null!==(r=r||null)&&(t=r.ruleNames);var i=u.getNodeText(e,t);i=n.escapeWhitespace(i,!1);var s=e.getChildCount();if(0===s)return i;var o="("+i+" ";s>0&&(i=u.toStringTree(e.getChild(0),t),o=o.concat(i));for(var a=1;a<s;a++)i=u.toStringTree(e.getChild(a),t),o=o.concat(" "+i);return o.concat(")")},u.getNodeText=function(e,t,r){if(t=t||null,null!==(r=r||null)&&(t=r.ruleNames),null!==t){if(e instanceof l){var n=e.getAltNumber();return n!=p?t[e.ruleIndex]+":"+n:t[e.ruleIndex]}if(e instanceof s)return e.toString();if(e instanceof o&&null!==e.symbol)return e.symbol.text}var a=e.getPayload();return a instanceof i?a.text:e.getPayload().toString()},u.getChildren=function(e){for(var t=[],r=0;r<e.getChildCount();r++)t.push(e.getChild(r));return t},u.getAncestors=function(e){var t=[];for(e=e.getParent();null!==e;)t=[e].concat(t),e=e.getParent();return t},u.findAllTokenNodes=function(e,t){return u.findAllNodes(e,t,!0)},u.findAllRuleNodes=function(e,t){return u.findAllNodes(e,t,!1)},u.findAllNodes=function(e,t,r){var n=[];return u._findAllNodes(e,t,r,n),n},u._findAllNodes=function(e,t,r,n){r&&e instanceof o?e.symbol.type===t&&n.push(e):!r&&e instanceof a&&e.ruleIndex===t&&n.push(e);for(var i=0;i<e.getChildCount();i++)u._findAllNodes(e.getChild(i),t,r,n)},u.descendants=function(e){for(var t=[e],r=0;r<e.getChildCount();r++)t=t.concat(u.descendants(e.getChild(r)));return t},t.Trees=u},23781:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return!!t&&((0,i.default)(t.type,e)?void 0===r||(0,n.default)(t,r):!r&&"Placeholder"===t.type&&e in o.FLIPPED_ALIAS_KEYS&&(0,s.default)(t.expectedNode,e))};var n=r(3903),i=r(40453),s=r(59892),o=r(35108)},24429:(e,t,r)=>{var n=r(72994).Token,i=r(86587),s=i.NoViableAltException,o=i.InputMismatchException,a=i.FailedPredicateException,l=i.ParseCancellationException,p=r(81367).ATNState,u=r(70040).Interval,c=r(70040).m;function h(){}function d(){return h.call(this),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this}function f(){return d.call(this),this}h.prototype.reset=function(e){},h.prototype.recoverInline=function(e){},h.prototype.recover=function(e,t){},h.prototype.sync=function(e){},h.prototype.inErrorRecoveryMode=function(e){},h.prototype.reportError=function(e){},d.prototype=Object.create(h.prototype),d.prototype.constructor=d,d.prototype.reset=function(e){this.endErrorCondition(e)},d.prototype.beginErrorCondition=function(e){this.errorRecoveryMode=!0},d.prototype.inErrorRecoveryMode=function(e){return this.errorRecoveryMode},d.prototype.endErrorCondition=function(e){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1},d.prototype.reportMatch=function(e){this.endErrorCondition(e)},d.prototype.reportError=function(e,t){this.inErrorRecoveryMode(e)||(this.beginErrorCondition(e),t instanceof s?this.reportNoViableAlternative(e,t):t instanceof o?this.reportInputMismatch(e,t):t instanceof a?this.reportFailedPredicate(e,t):(console.log("unknown recognition error type: "+t.constructor.name),console.log(t.stack),e.notifyErrorListeners(t.getOffendingToken(),t.getMessage(),t)))},d.prototype.recover=function(e,t){this.lastErrorIndex===e.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(e.state)>=0&&e.consume(),this.lastErrorIndex=e._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(e.state);var r=this.getErrorRecoverySet(e);this.consumeUntil(e,r)},d.prototype.sync=function(e){if(!this.inErrorRecoveryMode(e)){var t=e._interp.atn.states[e.state],r=e.getTokenStream().LA(1),i=e.atn.nextTokens(t);if(!i.contains(n.EPSILON)&&!i.contains(r))switch(t.stateType){case p.BLOCK_START:case p.STAR_BLOCK_START:case p.PLUS_BLOCK_START:case p.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(e))return;throw new o(e);case p.PLUS_LOOP_BACK:case p.STAR_LOOP_BACK:this.reportUnwantedToken(e);var s=new c;s.addSet(e.getExpectedTokens());var a=s.addSet(this.getErrorRecoverySet(e));this.consumeUntil(e,a)}}},d.prototype.reportNoViableAlternative=function(e,t){var r,i=e.getTokenStream();r=null!==i?t.startToken.type===n.EOF?"<EOF>":i.getText(new u(t.startToken.tokenIndex,t.offendingToken.tokenIndex)):"<unknown input>";var s="no viable alternative at input "+this.escapeWSAndQuote(r);e.notifyErrorListeners(s,t.offendingToken,t)},d.prototype.reportInputMismatch=function(e,t){var r="mismatched input "+this.getTokenErrorDisplay(t.offendingToken)+" expecting "+t.getExpectedTokens().toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(r,t.offendingToken,t)},d.prototype.reportFailedPredicate=function(e,t){var r="rule "+e.ruleNames[e._ctx.ruleIndex]+" "+t.message;e.notifyErrorListeners(r,t.offendingToken,t)},d.prototype.reportUnwantedToken=function(e){if(!this.inErrorRecoveryMode(e)){this.beginErrorCondition(e);var t=e.getCurrentToken(),r="extraneous input "+this.getTokenErrorDisplay(t)+" expecting "+this.getExpectedTokens(e).toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(r,t,null)}},d.prototype.reportMissingToken=function(e){if(!this.inErrorRecoveryMode(e)){this.beginErrorCondition(e);var t=e.getCurrentToken(),r="missing "+this.getExpectedTokens(e).toString(e.literalNames,e.symbolicNames)+" at "+this.getTokenErrorDisplay(t);e.notifyErrorListeners(r,t,null)}},d.prototype.recoverInline=function(e){var t=this.singleTokenDeletion(e);if(null!==t)return e.consume(),t;if(this.singleTokenInsertion(e))return this.getMissingSymbol(e);throw new o(e)},d.prototype.singleTokenInsertion=function(e){var t=e.getTokenStream().LA(1),r=e._interp.atn,n=r.states[e.state].transitions[0].target;return!!r.nextTokens(n,e._ctx).contains(t)&&(this.reportMissingToken(e),!0)},d.prototype.singleTokenDeletion=function(e){var t=e.getTokenStream().LA(2);if(this.getExpectedTokens(e).contains(t)){this.reportUnwantedToken(e),e.consume();var r=e.getCurrentToken();return this.reportMatch(e),r}return null},d.prototype.getMissingSymbol=function(e){var t,r=e.getCurrentToken(),i=this.getExpectedTokens(e).first();t=i===n.EOF?"<missing EOF>":"<missing "+e.literalNames[i]+">";var s=r,o=e.getTokenStream().LT(-1);return s.type===n.EOF&&null!==o&&(s=o),e.getTokenFactory().create(s.source,i,t,n.DEFAULT_CHANNEL,-1,-1,s.line,s.column)},d.prototype.getExpectedTokens=function(e){return e.getExpectedTokens()},d.prototype.getTokenErrorDisplay=function(e){if(null===e)return"<no token>";var t=e.text;return null===t&&(t=e.type===n.EOF?"<EOF>":"<"+e.type+">"),this.escapeWSAndQuote(t)},d.prototype.escapeWSAndQuote=function(e){return"'"+(e=(e=(e=e.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"},d.prototype.getErrorRecoverySet=function(e){for(var t=e._interp.atn,r=e._ctx,i=new c;null!==r&&r.invokingState>=0;){var s=t.states[r.invokingState].transitions[0],o=t.nextTokens(s.followState);i.addSet(o),r=r.parentCtx}return i.removeOne(n.EPSILON),i},d.prototype.consumeUntil=function(e,t){for(var r=e.getTokenStream().LA(1);r!==n.EOF&&!t.contains(r);)e.consume(),r=e.getTokenStream().LA(1)},f.prototype=Object.create(d.prototype),f.prototype.constructor=f,f.prototype.recover=function(e,t){for(var r=e._ctx;null!==r;)r.exception=t,r=r.parentCtx;throw new l(t)},f.prototype.recoverInline=function(e){this.recover(e,new o(e))},f.prototype.sync=function(e){},t.BailErrorStrategy=f,t.$=d},25129:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!(!e||!n.VISITOR_KEYS[e.type])};var n=r(35108)},25765:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)("innerComments",e,t)};var n=r(26284)},25857:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExportAllDeclaration=function(e){var t,r;this.word("export"),this.space(),"type"===e.exportKind&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,!0),this.space(),d.call(this,e,!1)):this.print(e.source),this.semicolon()},t.ExportDefaultDeclaration=function(e){f(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=i.TokenContext.exportDefault;const t=e.declaration;this.print(t),c(t)||this.semicolon()},t.ExportDefaultSpecifier=function(e){this.print(e.exported)},t.ExportNamedDeclaration=function(e){if(f(this,e),this.word("export"),this.space(),e.declaration){const t=e.declaration;this.print(t),c(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());const n=e.specifiers.slice(0);let i=!1;for(;;){const e=n[0];if(!a(e)&&!l(e))break;i=!0,this.print(n.shift()),n.length&&(this.tokenChar(44),this.space())}let s=!1;var t,r;(n.length||!n.length&&!i)&&(s=!0,this.tokenChar(123),n.length&&(this.space(),this.printList(n,this.shouldPrintTrailingComma("}")),this.space()),this.tokenChar(125)),e.source&&(this.space(),this.word("from"),this.space(),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,!0),this.space(),d.call(this,e,s)):this.print(e.source)),this.semicolon()}},t.ExportNamespaceSpecifier=function(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported)},t.ExportSpecifier=function(e){"type"===e.exportKind&&(this.word("type"),this.space()),this.print(e.local),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported))},t.ImportAttribute=function(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)},t.ImportDeclaration=function(e){var t,r;this.word("import"),this.space();const n="type"===e.importKind||"typeof"===e.importKind;n?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());const i=e.specifiers.slice(0),s=!!i.length;for(;s;){const e=i[0];if(!p(e)&&!u(e))break;this.print(i.shift()),i.length&&(this.tokenChar(44),this.space())}let o=!1;i.length?(o=!0,this.tokenChar(123),this.space(),this.printList(i,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):n&&!s&&(o=!0,this.tokenChar(123),this.tokenChar(125)),(s||n)&&(this.space(),this.word("from"),this.space()),null!=(t=e.attributes)&&t.length||null!=(r=e.assertions)&&r.length?(this.print(e.source,!0),this.space(),d.call(this,e,o)):this.print(e.source),this.semicolon()},t.ImportDefaultSpecifier=function(e){this.print(e.local)},t.ImportExpression=function(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40);const t=this.shouldPrintTrailingComma(")");this.print(e.source),null!=e.options&&(this.tokenChar(44),this.space(),this.print(e.options)),t&&this.tokenChar(44),this.rightParens(e)},t.ImportNamespaceSpecifier=function(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local)},t.ImportSpecifier=function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local))},t._printAttributes=d;var n=r(45741),i=r(36306),s=r(73019);const{isClassDeclaration:o,isExportDefaultSpecifier:a,isExportNamespaceSpecifier:l,isImportDefaultSpecifier:p,isImportNamespaceSpecifier:u,isStatement:c}=n;let h=!1;function d(e,t){var r;const{attributes:n}=e;var{assertions:i}=e;const{importAttributesKeyword:s}=this.format;n&&!s&&e.extra&&(e.extra.deprecatedAssertSyntax||e.extra.deprecatedWithLegacySyntax)&&!h&&(h=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));const o="assert"===s||!s&&i;if(this.word(o?"assert":"with"),this.space(),!o&&("with-legacy"===s||!s&&null!=(r=e.extra)&&r.deprecatedWithLegacySyntax))return void this.printList(n||i);const a=t?1:0;this.token("{",void 0,a),this.space(),this.printList(n||i,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,a)}function f(e,t){o(t.declaration)&&s._shouldPrintDecoratorsBeforeExport.call(e,t)&&e.printJoin(t.declaration.decorators)}},26228:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!0){return"string"==typeof e&&((!t||!(0,n.isKeyword)(e)&&!(0,n.isStrictReservedWord)(e,!0))&&(0,n.isIdentifierName)(e))};var n=r(98109)},26284:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){t&&r&&(t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean))))}},26597:(e,t,r)=>{t.ATN=r(51028).ATN,t.ATNDeserializer=r(36575).ATNDeserializer,t.LexerATNSimulator=r(60634).LexerATNSimulator,t.ParserATNSimulator=r(7543).ParserATNSimulator,t.PredictionMode=r(63387).PredictionMode},27022:(e,t,r)=>{var n=r(25003),i=r(4715);function s(e){i.call(this,e),this.enc="pem"}n(s,i),e.exports=s,s.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],s=0;s<r.length;s+=64)n.push(r.slice(s,s+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},28020:(e,t,r)=>{var n=r(96073),i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}},28525:(e,t,r)=>{var n=r(84913),i=r(8187),s=r(25003),o=r(79696).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){n.call(this);var t,r=e.mode.toLowerCase(),i=a[r];t=e.decrypt?"decrypt":"encrypt";var s=e.key;o.isBuffer(s)||(s=o.from(s)),"des-ede"!==r&&"des-ede-cbc"!==r||(s=o.concat([s,s.slice(0,8)]));var l=e.iv;o.isBuffer(l)||(l=o.from(l)),this._des=i.create({key:s,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,s(l,n),l.prototype._update=function(e){return o.from(this._des.update(e))},l.prototype._final=function(){return o.from(this._des.final())}},29075:(e,t,r)=>{e.exports=o;var n=r(49837),i=Object.create(r(26571));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){l(e,t,r)})):l(this,null,null)}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(25003),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},29221:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e+="";let t="";for(const r of e)t+=(0,i.isIdentifierChar)(r.codePointAt(0))?r:"-";return t=t.replace(/^[-0-9]+/,""),t=t.replace(/[-\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""})),(0,n.default)(t)||(t=`_${t}`),t||"_"};var n=r(26228),i=r(98109)},29499:(e,t,r)=>{var n=r(40846).m,i=r(48898),s=i.INVALID_INTERVAL,o=i.TerminalNode,a=i.TerminalNodeImpl,l=i.ErrorNodeImpl,p=r(70040).Interval;function u(e,t){e=e||null,t=t||null,n.call(this,e,t),this.ruleIndex=-1,this.children=null,this.start=null,this.stop=null,this.exception=null}function c(e,t,r){return u.call(e,t),this.ruleIndex=r,this}u.prototype=Object.create(n.prototype),u.prototype.constructor=u,u.prototype.copyFrom=function(e){this.parentCtx=e.parentCtx,this.invokingState=e.invokingState,this.children=null,this.start=e.start,this.stop=e.stop,e.children&&(this.children=[],e.children.map((function(e){e instanceof l&&(this.children.push(e),e.parentCtx=this)}),this))},u.prototype.enterRule=function(e){},u.prototype.exitRule=function(e){},u.prototype.addChild=function(e){return null===this.children&&(this.children=[]),this.children.push(e),e},u.prototype.removeLastChild=function(){null!==this.children&&this.children.pop()},u.prototype.addTokenNode=function(e){var t=new a(e);return this.addChild(t),t.parentCtx=this,t},u.prototype.addErrorNode=function(e){var t=new l(e);return this.addChild(t),t.parentCtx=this,t},u.prototype.getChild=function(e,t){if(t=t||null,null===this.children||e<0||e>=this.children.length)return null;if(null===t)return this.children[e];for(var r=0;r<this.children.length;r++){var n=this.children[r];if(n instanceof t){if(0===e)return n;e-=1}}return null},u.prototype.getToken=function(e,t){if(null===this.children||t<0||t>=this.children.length)return null;for(var r=0;r<this.children.length;r++){var n=this.children[r];if(n instanceof o&&n.symbol.type===e){if(0===t)return n;t-=1}}return null},u.prototype.getTokens=function(e){if(null===this.children)return[];for(var t=[],r=0;r<this.children.length;r++){var n=this.children[r];n instanceof o&&n.symbol.type===e&&t.push(n)}return t},u.prototype.getTypedRuleContext=function(e,t){return this.getChild(t,e)},u.prototype.getTypedRuleContexts=function(e){if(null===this.children)return[];for(var t=[],r=0;r<this.children.length;r++){var n=this.children[r];n instanceof e&&t.push(n)}return t},u.prototype.getChildCount=function(){return null===this.children?0:this.children.length},u.prototype.getSourceInterval=function(){return null===this.start||null===this.stop?s:new p(this.start.tokenIndex,this.stop.tokenIndex)},n.EMPTY=new u,c.prototype=Object.create(u.prototype),c.prototype.constructor=c,t.ParserRuleContext=u},30088:(e,t,r)=>{var n=r(95421);function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function s(e){return r.g.Buffer&&"function"==typeof r.g.Buffer.isBuffer?r.g.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=r(98437),a=Object.prototype.hasOwnProperty,l=Array.prototype.slice,p="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function c(e){return!s(e)&&"function"==typeof r.g.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var h=e.exports=T,d=/\s*function\s+([^\(\s]*)\s*/;function f(e){if(o.isFunction(e)){if(p)return e.name;var t=e.toString().match(d);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(p||!o.isFunction(e))return o.inspect(e);var t=f(e);return"[Function"+(t?": "+t:"")+"]"}function g(e,t,r,n,i){throw new h.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function T(e,t){e||g(e,!0,t,"==",h.ok)}function v(e,t,r,n){if(e===t)return!0;if(s(e)&&s(t))return 0===i(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(c(e)&&c(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(s(e)!==s(t))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==a&&a===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=b(e),s=b(t);if(i&&!s||!i&&s)return!1;if(i)return v(e=l.call(e),t=l.call(t),r);var a,p,u=E(e),c=E(t);if(u.length!==c.length)return!1;for(u.sort(),c.sort(),p=u.length-1;p>=0;p--)if(u[p]!==c[p])return!1;for(p=u.length-1;p>=0;p--)if(!v(e[a=u[p]],t[a],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function S(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&g(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&i&&!r;if((!e&&o.isError(i)&&s&&S(i,r)||a)&&g(i,r,"Got unwanted exception"+n),e&&i&&r&&!S(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(y(e.actual),128)+" "+e.operator+" "+m(y(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=f(t),s=n.indexOf("\n"+i);if(s>=0){var o=n.indexOf("\n",s+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=g,h.ok=T,h.equal=function(e,t,r){e!=t&&g(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){v(e,t,!1)||g(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){v(e,t,!0)||g(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){v(e,t,!1)&&g(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){x(!0,e,t,r)},h.doesNotThrow=function(e,t,r){x(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=n((function e(t,r){t||g(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var E=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}},30462:(e,t,r)=>{var n=r(67787),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},31500:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(1859);function i(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},32141:(e,t,r)=>{var n=r(72994).Token,i=r(93343).q,s=r(93343).X;function o(){return this._listeners=[i.INSTANCE],this._interp=null,this._stateNumber=-1,this}o.tokenTypeMapCache={},o.ruleIndexMapCache={},o.prototype.checkVersion=function(e){"4.7.2"!==e&&console.log("ANTLR runtime and generated code versions disagree: 4.7.2!="+e)},o.prototype.addErrorListener=function(e){this._listeners.push(e)},o.prototype.removeErrorListeners=function(){this._listeners=[]},o.prototype.getTokenTypeMap=function(){var e=this.getTokenNames();if(null===e)throw"The current recognizer does not provide a list of token names.";var t=this.tokenTypeMapCache[e];return void 0===t&&((t=e.reduce((function(e,t,r){e[t]=r}))).EOF=n.EOF,this.tokenTypeMapCache[e]=t),t},o.prototype.getRuleIndexMap=function(){var e=this.ruleNames;if(null===e)throw"The current recognizer does not provide a list of rule names.";var t=this.ruleIndexMapCache[e];return void 0===t&&(t=e.reduce((function(e,t,r){e[t]=r})),this.ruleIndexMapCache[e]=t),t},o.prototype.getTokenType=function(e){var t=this.getTokenTypeMap()[e];return void 0!==t?t:n.INVALID_TYPE},o.prototype.getErrorHeader=function(e){return"line "+e.getOffendingToken().line+":"+e.getOffendingToken().column},o.prototype.getTokenErrorDisplay=function(e){if(null===e)return"<no token>";var t=e.text;return null===t&&(t=e.type===n.EOF?"<EOF>":"<"+e.type+">"),"'"+(t=t.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"))+"'"},o.prototype.getErrorListenerDispatch=function(){return new s(this._listeners)},o.prototype.sempred=function(e,t,r){return!0},o.prototype.precpred=function(e,t){return!0},Object.defineProperty(o.prototype,"state",{get:function(){return this._stateNumber},set:function(e){this._stateNumber=e}}),t.f=o},32427:(e,t,r)=>{var n=r(67787).Buffer,i=r(70243),s=r(51048);function o(e){var t,r=e.modulus.byteLength();do{t=new i(s(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var r=function(e){var t=o(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),s=t.modulus.byteLength(),a=new i(e).mul(r.blinder).umod(t.modulus),l=a.toRed(i.mont(t.prime1)),p=a.toRed(i.mont(t.prime2)),u=t.coefficient,c=t.prime1,h=t.prime2,d=l.redPow(t.exponent1).fromRed(),f=p.redPow(t.exponent2).fromRed(),m=d.isub(f).imul(u).umod(c).imul(h);return f.iadd(m).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",s)}a.getr=o,e.exports=a},32868:(e,t,r)=>{var n=t;n.der=r(5555),n.pem=r(93862)},33335:(e,t)=>{function r(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}class n{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 i{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 s(e,t){const{line:r,column:i,index:s}=e;return new n(r,i+t,s+t)}const o="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var a={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:o},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:o}};const l={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},p=e=>"UpdateExpression"===e.type?l.UpdateExpression[`${e.prefix}`]:l[e.type];var u={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({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:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${p(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${p(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${p(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},c={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`};const h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var d=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({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:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'});const f=["message"];function m(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function y({toMessage:e,code:t,reasonCode:r,syntaxPlugin:i}){const s="MissingPlugin"===r||"MissingOneOfPlugins"===r,o={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return o[r]&&(r=o[r]),function o(a,l){const p=new SyntaxError;return p.code=t,p.reasonCode=r,p.loc=a,p.pos=a.index,p.syntaxPlugin=i,s&&(p.missingPlugin=l.missingPlugin),m(p,"clone",(function(e={}){var t;const{line:r,column:i,index:s}=null!=(t=e.loc)?t:a;return o(new n(r,i,s),Object.assign({},l,e.details))})),m(p,"details",l),Object.defineProperty(p,"message",{configurable:!0,get(){const t=`${e(l)} (${a.line}:${a.column})`;return this.message=t,t},set(e){Object.defineProperty(this,"message",{value:e,writable:!0})}}),p}}function g(e,t){if(Array.isArray(e))return t=>g(t,e[0]);const n={};for(const i of Object.keys(e)){const s=e[i],o="string"==typeof s?{message:()=>s}:"function"==typeof s?{message:s}:s,{message:a}=o,l=r(o,f),p="string"==typeof a?()=>a:a;n[i]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:p},t?{syntaxPlugin:t}:{},l))}return n}const T=Object.assign({},g(a),g(u),g({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),g(c),g`pipelineOperator`(d)),{defineProperty:v}=Object,b=(e,t)=>{e&&v(e,t,{enumerable:!1,value:e[t]})};function S(e){return b(e.loc.start,"index"),b(e.loc.end,"index"),e}class x{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}}const E={brace:new x("{"),j_oTag:new x("<tag"),j_cTag:new x("</tag"),j_expr:new x("<tag>...</tag>",!0)};E.template=new x("`",!0);const w=!0,A=!0,P=!0,I=!0,C=!0;class _{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const N=new Map;function k(e,t={}){t.keyword=e;const r=U(e,t);return N.set(e,r),r}function O(e,t){return U(e,{beforeExpr:w,binop:t})}let M=-1;const L=[],D=[],B=[],R=[],j=[],F=[];function U(e,t={}){var r,n,i,s;return++M,D.push(e),B.push(null!=(r=t.binop)?r:-1),R.push(null!=(n=t.beforeExpr)&&n),j.push(null!=(i=t.startsExpr)&&i),F.push(null!=(s=t.prefix)&&s),L.push(new _(e,t)),M}function q(e,t={}){var r,n,i,s;return++M,N.set(e,M),D.push(e),B.push(null!=(r=t.binop)?r:-1),R.push(null!=(n=t.beforeExpr)&&n),j.push(null!=(i=t.startsExpr)&&i),F.push(null!=(s=t.prefix)&&s),L.push(new _("name",t)),M}const V={bracketL:U("[",{beforeExpr:w,startsExpr:A}),bracketHashL:U("#[",{beforeExpr:w,startsExpr:A}),bracketBarL:U("[|",{beforeExpr:w,startsExpr:A}),bracketR:U("]"),bracketBarR:U("|]"),braceL:U("{",{beforeExpr:w,startsExpr:A}),braceBarL:U("{|",{beforeExpr:w,startsExpr:A}),braceHashL:U("#{",{beforeExpr:w,startsExpr:A}),braceR:U("}"),braceBarR:U("|}"),parenL:U("(",{beforeExpr:w,startsExpr:A}),parenR:U(")"),comma:U(",",{beforeExpr:w}),semi:U(";",{beforeExpr:w}),colon:U(":",{beforeExpr:w}),doubleColon:U("::",{beforeExpr:w}),dot:U("."),question:U("?",{beforeExpr:w}),questionDot:U("?."),arrow:U("=>",{beforeExpr:w}),template:U("template"),ellipsis:U("...",{beforeExpr:w}),backQuote:U("`",{startsExpr:A}),dollarBraceL:U("${",{beforeExpr:w,startsExpr:A}),templateTail:U("...`",{startsExpr:A}),templateNonTail:U("...${",{beforeExpr:w,startsExpr:A}),at:U("@"),hash:U("#",{startsExpr:A}),interpreterDirective:U("#!..."),eq:U("=",{beforeExpr:w,isAssign:I}),assign:U("_=",{beforeExpr:w,isAssign:I}),slashAssign:U("_=",{beforeExpr:w,isAssign:I}),xorAssign:U("_=",{beforeExpr:w,isAssign:I}),moduloAssign:U("_=",{beforeExpr:w,isAssign:I}),incDec:U("++/--",{prefix:C,postfix:!0,startsExpr:A}),bang:U("!",{beforeExpr:w,prefix:C,startsExpr:A}),tilde:U("~",{beforeExpr:w,prefix:C,startsExpr:A}),doubleCaret:U("^^",{startsExpr:A}),doubleAt:U("@@",{startsExpr:A}),pipeline:O("|>",0),nullishCoalescing:O("??",1),logicalOR:O("||",1),logicalAND:O("&&",2),bitwiseOR:O("|",3),bitwiseXOR:O("^",4),bitwiseAND:O("&",5),equality:O("==/!=/===/!==",6),lt:O("</>/<=/>=",7),gt:O("</>/<=/>=",7),relational:O("</>/<=/>=",7),bitShift:O("<</>>/>>>",8),bitShiftL:O("<</>>/>>>",8),bitShiftR:O("<</>>/>>>",8),plusMin:U("+/-",{beforeExpr:w,binop:9,prefix:C,startsExpr:A}),modulo:U("%",{binop:10,startsExpr:A}),star:U("*",{binop:10}),slash:O("/",10),exponent:U("**",{beforeExpr:w,binop:11,rightAssociative:!0}),_in:k("in",{beforeExpr:w,binop:7}),_instanceof:k("instanceof",{beforeExpr:w,binop:7}),_break:k("break"),_case:k("case",{beforeExpr:w}),_catch:k("catch"),_continue:k("continue"),_debugger:k("debugger"),_default:k("default",{beforeExpr:w}),_else:k("else",{beforeExpr:w}),_finally:k("finally"),_function:k("function",{startsExpr:A}),_if:k("if"),_return:k("return",{beforeExpr:w}),_switch:k("switch"),_throw:k("throw",{beforeExpr:w,prefix:C,startsExpr:A}),_try:k("try"),_var:k("var"),_const:k("const"),_with:k("with"),_new:k("new",{beforeExpr:w,startsExpr:A}),_this:k("this",{startsExpr:A}),_super:k("super",{startsExpr:A}),_class:k("class",{startsExpr:A}),_extends:k("extends",{beforeExpr:w}),_export:k("export"),_import:k("import",{startsExpr:A}),_null:k("null",{startsExpr:A}),_true:k("true",{startsExpr:A}),_false:k("false",{startsExpr:A}),_typeof:k("typeof",{beforeExpr:w,prefix:C,startsExpr:A}),_void:k("void",{beforeExpr:w,prefix:C,startsExpr:A}),_delete:k("delete",{beforeExpr:w,prefix:C,startsExpr:A}),_do:k("do",{isLoop:P,beforeExpr:w}),_for:k("for",{isLoop:P}),_while:k("while",{isLoop:P}),_as:q("as",{startsExpr:A}),_assert:q("assert",{startsExpr:A}),_async:q("async",{startsExpr:A}),_await:q("await",{startsExpr:A}),_defer:q("defer",{startsExpr:A}),_from:q("from",{startsExpr:A}),_get:q("get",{startsExpr:A}),_let:q("let",{startsExpr:A}),_meta:q("meta",{startsExpr:A}),_of:q("of",{startsExpr:A}),_sent:q("sent",{startsExpr:A}),_set:q("set",{startsExpr:A}),_source:q("source",{startsExpr:A}),_static:q("static",{startsExpr:A}),_using:q("using",{startsExpr:A}),_yield:q("yield",{startsExpr:A}),_asserts:q("asserts",{startsExpr:A}),_checks:q("checks",{startsExpr:A}),_exports:q("exports",{startsExpr:A}),_global:q("global",{startsExpr:A}),_implements:q("implements",{startsExpr:A}),_intrinsic:q("intrinsic",{startsExpr:A}),_infer:q("infer",{startsExpr:A}),_is:q("is",{startsExpr:A}),_mixins:q("mixins",{startsExpr:A}),_proto:q("proto",{startsExpr:A}),_require:q("require",{startsExpr:A}),_satisfies:q("satisfies",{startsExpr:A}),_keyof:q("keyof",{startsExpr:A}),_readonly:q("readonly",{startsExpr:A}),_unique:q("unique",{startsExpr:A}),_abstract:q("abstract",{startsExpr:A}),_declare:q("declare",{startsExpr:A}),_enum:q("enum",{startsExpr:A}),_module:q("module",{startsExpr:A}),_namespace:q("namespace",{startsExpr:A}),_interface:q("interface",{startsExpr:A}),_type:q("type",{startsExpr:A}),_opaque:q("opaque",{startsExpr:A}),name:U("name",{startsExpr:A}),placeholder:U("%%",{startsExpr:A}),string:U("string",{startsExpr:A}),num:U("num",{startsExpr:A}),bigint:U("bigint",{startsExpr:A}),decimal:U("decimal",{startsExpr:A}),regexp:U("regexp",{startsExpr:A}),privateName:U("#name",{startsExpr:A}),eof:U("eof"),jsxName:U("jsxName"),jsxText:U("jsxText",{beforeExpr:w}),jsxTagStart:U("jsxTagStart",{startsExpr:A}),jsxTagEnd:U("jsxTagEnd")};function Y(e){return e>=93&&e<=133}function K(e){return e>=58&&e<=133}function $(e){return e>=58&&e<=137}function z(e){return j[e]}function J(e){return e>=129&&e<=131}function H(e){return e>=58&&e<=92}function X(e){return D[e]}function W(e){return B[e]}function G(e){return e>=24&&e<=25}function Z(e){return L[e]}L[8].updateContext=e=>{e.pop()},L[5].updateContext=L[7].updateContext=L[23].updateContext=e=>{e.push(E.brace)},L[22].updateContext=e=>{e[e.length-1]===E.template?e.pop():e.push(E.template)},L[143].updateContext=e=>{e.push(E.j_expr,E.j_oTag)};let Q="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ee="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const te=new RegExp("["+Q+"]"),re=new RegExp("["+Q+ee+"]");Q=ee=null;const ne=[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,4,51,13,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,7,25,39,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,39,27,10,22,251,41,7,1,17,5,57,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],ie=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,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,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,199,7,137,9,54,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,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function se(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function oe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&te.test(String.fromCharCode(e)):se(e,ne)))}function ae(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&re.test(String.fromCharCode(e)):se(e,ne)||se(e,ie))))}const le=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"]),pe=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),ue=new Set(["eval","arguments"]);function ce(e,t){return t&&"await"===e||"enum"===e}function he(e,t){return ce(e,t)||pe.has(e)}function de(e){return ue.has(e)}function fe(e,t){return he(e,t)||de(e)}const me=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"]);class ye{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}}class ge{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get allowNewTarget(){return(512&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&!(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(1731&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new ye(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t){this.checkRedeclarationInScope(n,e,t,r);let i=n.names.get(e)||0;16&t?i|=4:(n.firstLexicalName||(n.firstLexicalName=e),i|=2),n.names.set(e,i),8&t&&this.maybeExportDefined(n,e)}else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(n=this.scopeStack[i],this.checkRedeclarationInScope(n,e,t,r),n.names.set(e,1|(n.names.get(e)||0)),this.maybeExportDefined(n,e),!(1667&n.flags));--i);this.parser.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(T.VarRedeclaration,n,{identifierName:t})}isRedeclaredInScope(e,t,r){if(!(1&r))return!1;if(8&r)return e.names.has(t);const n=e.names.get(t)||0;return 16&r?(2&n)>0||!this.treatFunctionsAsVarInScope(e)&&(1&n)>0:(2&n)>0&&!(8&e.flags&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(4&n)>0}checkLocalExport(e){const{name:t}=e;this.scopeStack[0].names.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(1667&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(1731&t&&!(4&t))return t}}}class Te extends ye{constructor(...e){super(...e),this.declareFunctions=new Set}}class ve extends ge{createScope(e){return new Te(e)}declareName(e,t,r){const n=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){if(super.isRedeclaredInScope(e,t,r))return!0;if(2048&r&&!e.declareFunctions.has(t)){const r=e.names.get(t);return(4&r)>0||(2&r)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}const be=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Se=g`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({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:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({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:({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:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function xe(e){return"type"===e.importKind||"typeof"===e.importKind}const Ee={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},we=/\*?\s*@((?:no)?flow)\b/,Ae={__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:"♦"},Pe=new RegExp(/\r\n|[\r\n\u2028\u2029]/.source,"g");function Ie(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Ce(e,t,r){for(let n=t;n<r;n++)if(Ie(e.charCodeAt(n)))return!0;return!1}const _e=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ne=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function ke(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}const Oe=g`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Me(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function Le(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return Le(e.object)+"."+Le(e.property);throw new Error("Node had unexpected type: "+e.type)}class De extends ye{constructor(...e){super(...e),this.tsNames=new Map}}class Be extends ge{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new De(e)}enter(e){1024===e&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return 1024===e&&this.importsStack.pop(),e}hasImport(e,t){const r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1)for(let t=0;t<r-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,r){if(4096&t)return this.hasImport(e,!0)&&this.parser.raise(T.VarRedeclaration,r,{identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);const n=this.currentScope();let i=n.tsNames.get(e)||0;if(1024&t)return this.maybeExportDefined(n,e),void n.tsNames.set(e,16|i);super.declareName(e,t,r),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),i|=1),256&t&&(i|=2),512&t&&(i|=4),128&t&&(i|=8),i&&n.tsNames.set(e,i)}isRedeclaredInScope(e,t,r){const n=e.tsNames.get(t);return(2&n)>0?!(256&r)||!!(512&r)!=(4&n)>0:128&r&&(8&n)>0?!!(2&e.names.get(t))&&!!(1&r):!!(2&r&&(1&n)>0)||super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){const{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){const r=this.scopeStack[e].tsNames.get(t);if((1&r)>0||(16&r)>0)return}super.checkLocalExport(e)}}}class Re{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function je(e,t){return(e?2:0)|(t?1:0)}class Fe{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{const[t,r]=e;if(!this.hasPlugin(t))return!1;const n=this.plugins.get(t);for(const e of Object.keys(r))if((null==n?void 0:n[e])!==r[e])return!1;return!0}}getPluginOption(e,t){var r;return null==(r=this.plugins.get(e))?void 0:r[t]}}function Ue(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function qe(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Ve(e,t,r){let n=null,i=t.length;for(;null===n&&i>0;)n=t[--i];null===n||n.start>r.start?qe(e,r.comments):Ue(n,r.comments)}class Ye extends Fe{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:t}=this.state,r=t.length;if(0===r)return;let n=r-1;const i=t[n];i.start===e.end&&(i.leadingNode=e,n--);const{start:s}=e;for(;n>=0;n--){const r=t[n],i=r.end;if(!(i>s)){i===s&&(r.trailingNode=e);break}r.containingNode=e,this.finalizeComment(r),t.splice(n,1)}}finalizeComment(e){var t;const{comments:r}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Ue(e.leadingNode,r),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,r);else{const n=e.containingNode,i=e.start;if(44===this.input.charCodeAt(this.offsetToSourcePos(i)-1))switch(n.type){case"ObjectExpression":case"ObjectPattern":Ve(n,n.properties,e);break;case"CallExpression":case"OptionalCallExpression":Ve(n,n.arguments,e);break;case"ImportExpression":Ve(n,[n.source,null!=(t=n.options)?t:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ve(n,n.params,e);break;case"ArrayExpression":case"ArrayPattern":Ve(n,n.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ve(n,n.specifiers,e);break;case"TSEnumDeclaration":case"TSEnumBody":Ve(n,n.members,e);break;default:if("RecordExpression"===n.type){Ve(n,n.properties,e);break}if("TupleExpression"===n.type){Ve(n,n.elements,e);break}qe(n,r)}else qe(n,r)}}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,{length:r}=t;if(0===r)return;const n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}takeSurroundingComments(e,t,r){const{commentStack:n}=this.state,i=n.length;if(0===i)return;let s=i-1;for(;s>=0;s--){const i=n[s],o=i.end;if(i.start===r)i.leadingNode=e;else if(o===t)i.trailingNode=e;else if(o<t)break}}}class Ke{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[E.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(1&this.flags)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:r,startLine:i,startColumn:s}){this.strict=!1!==e&&(!0===e||"module"===t),this.startIndex=r,this.curLine=i,this.lineStart=-s,this.startLoc=this.endLoc=new n(i,s,r)}get maybeInArrowParameters(){return(2&this.flags)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(256&this.flags)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(512&this.flags)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(1024&this.flags)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(2048&this.flags)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(4096&this.flags)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new n(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const e=new Ke;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}}var $e=function(e){return e>=48&&e<=57};const ze={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Je={bin:e=>48===e||49===e,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};function He(e,t,r,n,i,s){const o=r,a=n,l=i;let p="",u=null,c=r;const{length:h}=t;for(;;){if(r>=h){s.unterminated(o,a,l),p+=t.slice(c,r);break}const d=t.charCodeAt(r);if(Xe(e,d,t,r)){p+=t.slice(c,r);break}if(92===d){p+=t.slice(c,r);const o=We(t,r,n,i,"template"===e,s);null!==o.ch||u?p+=o.ch:u={pos:r,lineStart:n,curLine:i},({pos:r,lineStart:n,curLine:i}=o),c=r}else 8232===d||8233===d?(++i,n=++r):10===d||13===d?"template"===e?(p+=t.slice(c,r)+"\n",++r,13===d&&10===t.charCodeAt(r)&&++r,++i,c=n=r):s.unterminated(o,a,l):++r}return{pos:r,str:p,firstInvalidLoc:u,lineStart:n,curLine:i,containsInvalid:!!u}}function Xe(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function We(e,t,r,n,i,s){const o=!i;t++;const a=e=>({pos:t,ch:e,lineStart:r,curLine:n}),l=e.charCodeAt(t++);switch(l){case 110:return a("\n");case 114:return a("\r");case 120:{let i;return({code:i,pos:t}=Ge(e,t,r,n,2,!1,o,s)),a(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:t}=Qe(e,t,r,n,o,s)),a(null===i?null:String.fromCodePoint(i))}case 116:return a("\t");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return a("");case 56:case 57:if(i)return a(null);s.strictNumericEscape(t-1,r,n);default:if(l>=48&&l<=55){const o=t-1;let l=/^[0-7]+/.exec(e.slice(o,t+2))[0],p=parseInt(l,8);p>255&&(l=l.slice(0,-1),p=parseInt(l,8)),t+=l.length-1;const u=e.charCodeAt(t);if("0"!==l||56===u||57===u){if(i)return a(null);s.strictNumericEscape(o,r,n)}return a(String.fromCharCode(p))}return a(String.fromCharCode(l))}}function Ge(e,t,r,n,i,s,o,a){const l=t;let p;return({n:p,pos:t}=Ze(e,t,r,n,16,i,s,!1,a,!o)),null===p&&(o?a.invalidEscapeSequence(l,r,n):t=l-1),{code:p,pos:t}}function Ze(e,t,r,n,i,s,o,a,l,p){const u=t,c=16===i?ze.hex:ze.decBinOct,h=16===i?Je.hex:10===i?Je.dec:8===i?Je.oct:Je.bin;let d=!1,f=0;for(let u=0,m=null==s?1/0:s;u<m;++u){const s=e.charCodeAt(t);let u;if(95!==s||"bail"===a){if(u=s>=97?s-97+10:s>=65?s-65+10:$e(s)?s-48:1/0,u>=i){if(u<=9&&p)return{n:null,pos:t};if(u<=9&&l.invalidDigit(t,r,n,i))u=0;else{if(!o)break;u=0,d=!0}}++t,f=f*i+u}else{const i=e.charCodeAt(t-1),s=e.charCodeAt(t+1);if(a){if(Number.isNaN(s)||!h(s)||c.has(i)||c.has(s)){if(p)return{n:null,pos:t};l.unexpectedNumericSeparator(t,r,n)}}else{if(p)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===u||null!=s&&t-u!==s||d?{n:null,pos:t}:{n:f,pos:t}}function Qe(e,t,r,n,i,s){let o;if(123===e.charCodeAt(t)){if(++t,({code:o,pos:t}=Ge(e,t,r,n,e.indexOf("}",t)-t,!0,i,s)),++t,null!==o&&o>1114111){if(!i)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else({code:o,pos:t}=Ge(e,t,r,n,4,!1,i,s));return{code:o,pos:t}}function et(e,t,r){return new n(r,e-t,e)}const tt=new Set([103,109,115,105,121,117,100,118]);class rt{constructor(e){const t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new i(e.startLoc,e.endLoc)}}class nt extends Ye{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,r,n)=>!!(2048&this.optionFlags)&&(this.raise(T.InvalidDigit,et(e,t,r),{radix:n}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(T.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(T.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(T.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(T.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,r)=>{this.recordStrictModeErrors(T.StrictNumericEscape,et(e,t,r))},unterminated:(e,t,r)=>{throw this.raise(T.UnterminatedString,et(e-1,t,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(T.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(T.UnterminatedTemplate,et(e,t,r))}}),this.state=new Ke,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),256&this.optionFlags&&this.pushToken(new rt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}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=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return _e.lastIndex=e,_e.test(this.input)?_e.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Ne.lastIndex=e,Ne.test(this.input)?Ne.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,t))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(140):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());const r=this.state.pos,n=this.input.indexOf(e,r+2);if(-1===n)throw this.raise(T.UnterminatedComment,this.state.curPosition());for(this.state.pos=n+e.length,Pe.lastIndex=r+2;Pe.test(this.input)&&Pe.lastIndex<=n;)++this.state.curLine,this.state.lineStart=Pe.lastIndex;if(this.isLookahead)return;const s={type:"CommentBlock",value:this.input.slice(r+2,n),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(n+e.length),loc:new i(t,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(s),s}skipLineComment(e){const t=this.state.pos;let r;this.isLookahead||(r=this.state.curPosition());let n=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ie(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const s=this.state.pos,o={type:"CommentLine",value:this.input.slice(t+e,s),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(s),loc:new i(r,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(o),o}skipSpace(){const e=this.state.pos,t=4096&this.optionFlags?[]:null;e:for(;this.state.pos<this.length;){const r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{const e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),null==t||t.push(e));break}case 47:{const e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),null==t||t.push(e));break}default:break e}break;default:if(ke(r))++this.state.pos;else if(45===r&&!this.inModule&&8192&this.optionFlags){const r=this.state.pos;if(45!==this.input.charCodeAt(r+1)||62!==this.input.charCodeAt(r+2)||!(0===e||this.state.lineStart>e))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),null==t||t.push(e))}}else{if(60!==r||this.inModule||!(8192&this.optionFlags))break e;{const e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{const e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),null==t||t.push(e))}}}}}if((null==t?void 0:t.length)>0){const r=this.state.pos,n={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(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,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(T.UnexpectedDigitAfterHash,this.state.curPosition());if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?T.RecordExpressionHashIncorrectStartSyntaxType:T.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else oe(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!Ie(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=42===e?55:54,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=57),61!==n||this.state.inType||(r++,t=37===e?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(T.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(T.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){const t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(T.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(T.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(oe(e))return void this.readWord(e)}throw this.raise(T.InvalidOrUnexpectedToken,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,t=this.state.start+1;let r,n,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(T.UnterminatedRegExp,s(e,1));const t=this.input.charCodeAt(i);if(Ie(t))throw this.raise(T.UnterminatedRegExp,s(e,1));if(r)r=!1;else{if(91===t)n=!0;else if(93===t&&n)n=!1;else if(47===t&&!n)break;r=92===t}}const o=this.input.slice(t,i);++i;let a="";const l=()=>s(e,i+2-t);for(;i<this.length;){const e=this.codePointAtPos(i),t=String.fromCharCode(e);if(tt.has(e))118===e?a.includes("u")&&this.raise(T.IncompatibleRegExpUVFlags,l()):117===e&&a.includes("v")&&this.raise(T.IncompatibleRegExpUVFlags,l()),a.includes(t)&&this.raise(T.DuplicateRegExpFlags,l());else{if(!ae(e)&&92!==e)break;this.raise(T.MalformedRegExpFlags,l())}++i,a+=t}this.state.pos=i,this.finishToken(138,{pattern:o,flags:a})}readInt(e,t,r=!1,n=!0){const{n:i,pos:s}=Ze(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,n,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){const t=this.state.pos,r=this.state.curPosition();let n=!1;this.state.pos+=2;const i=this.readInt(e);null==i&&this.raise(T.InvalidDigit,s(r,2),{radix:e});const o=this.input.charCodeAt(this.state.pos);if(110===o)++this.state.pos,n=!0;else if(109===o)throw this.raise(T.InvalidDecimal,r);if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(T.NumberIdentifier,this.state.curPosition());if(n){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,e)}else this.finishToken(135,i)}readNumber(e){const t=this.state.pos,r=this.state.curPosition();let n=!1,i=!1,o=!1,a=!1;e||null!==this.readInt(10)||this.raise(T.InvalidNumber,this.state.curPosition());const l=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(l){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(T.StrictOctalLiteral,r),!this.state.strict){const t=e.indexOf("_");t>0&&this.raise(T.ZeroDigitNumericSeparator,s(r,t))}a=l&&!/[89]/.test(e)}let p=this.input.charCodeAt(this.state.pos);if(46!==p||a||(++this.state.pos,this.readInt(10),n=!0,p=this.input.charCodeAt(this.state.pos)),69!==p&&101!==p||a||(p=this.input.charCodeAt(++this.state.pos),43!==p&&45!==p||++this.state.pos,null===this.readInt(10)&&this.raise(T.InvalidOrMissingExponent,r),n=!0,o=!0,p=this.input.charCodeAt(this.state.pos)),110===p&&((n||l)&&this.raise(T.InvalidBigIntLiteral,r),++this.state.pos,i=!0),109===p){this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(T.InvalidDecimal,r),++this.state.pos;var u=!0}if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(T.NumberIdentifier,this.state.curPosition());const c=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(i)return void this.finishToken(136,c);if(u)return void this.finishToken(137,c);const h=a?parseInt(c,8):parseFloat(c);this.finishToken(135,h)}readCodePoint(e){const{code:t,pos:r}=Qe(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){const{str:t,pos:r,curLine:n,lineStart:i}=He(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=i,this.state.curLine=n,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:i,curLine:s,lineStart:o}=He("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=s,r&&(this.state.firstInvalidTemplateEscapePos=new n(r.curLine,r.pos-r.lineStart,this.sourceToOffsetPos(r.pos))),96===this.input.codePointAt(i)?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,t){const r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,t):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="";const r=this.state.pos;let n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(ae(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);const e=this.state.curPosition(),i=this.state.pos===r?oe:ae;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(T.MissingUnicodeEscape,this.state.curPosition()),n=this.state.pos-1;continue}++this.state.pos;const s=this.readCodePoint(!0);null!==s&&(i(s)||this.raise(T.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(s)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){const t=this.readWord1(e),r=N.get(t);void 0!==r?this.finishToken(r,X(r)):this.finishToken(132,t)}checkKeywordEscapes(){const{type:e}=this.state;H(e)&&this.state.containsEsc&&this.raise(T.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:X(e)})}raise(e,t,r={}){const i=e(t instanceof n?t:t.loc.start,r);if(!(2048&this.optionFlags))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(e,t,r={}){const i=t instanceof n?t:t.loc.start,s=i.index,o=this.state.errors;for(let t=o.length-1;t>=0;t--){const n=o[t];if(n.loc.index===s)return o[t]=e(i,r);if(n.loc.index<s)break}return this.raise(e,t,r)}updateContext(e){}unexpected(e,t){throw this.raise(T.UnexpectedToken,null!=e?e:this.state.startLoc,{expected:t?X(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(T.MissingPlugin,null!=t?t:this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(T.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,et(t,r,n))}}}class it{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class st{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 it)}exit(){const e=this.stack.pop(),t=this.current();for(const[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(T.InvalidPrivateFieldResolution,n,{identifierName:r})}declarePrivateName(e,t,r){const{privateNames:n,loneAccessors:i,undefinedPrivateNames:s}=this.current();let o=n.has(e);if(3&t){const r=o&&i.get(e);r?(o=(3&r)==(3&t)||(4&r)!=(4&t),o||i.delete(e)):o||i.set(e,t)}o&&this.parser.raise(T.PrivateNameRedeclaration,r,{identifierName:e}),n.add(e),s.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(T.InvalidPrivateFieldResolution,t,{identifierName:e})}}class ot{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class at extends ot{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){const r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class lt{constructor(e){this.parser=void 0,this.stack=[new ot],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const r=t.loc.start,{stack:n}=this;let i=n.length-1,s=n[i];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(e,r),s=n[--i]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,t){const{stack:r}=this,n=r[r.length-1],i=t.loc.start;if(n.isCertainlyParameterDeclaration())this.parser.raise(e,i);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,i)}}recordAsyncArrowParametersError(e){const{stack:t}=this;let r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)2===n.type&&n.recordDeclarationError(T.AwaitBindingIdentifier,e),n=t[--r]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,r])=>{this.parser.raise(t,r);let n=e.length-2,i=e[n];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(r.index),i=e[--n]}))}}function pt(){return new ot}class ut extends nt{addExtra(e,t,r,n=!0){if(!e)return;let{extra:i}=e;null==i&&(i={},e.extra=i),n?i[t]=r:Object.defineProperty(i,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){const r=this.input.charCodeAt(e+t.length);return!(ae(r)||55296==(64512&r))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Ce(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Ce(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(T.MissingSemicolon,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)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:i,optionalParametersLoc:s,voidPatternLoc:o}=e;if(!t)return!!(r||n||s||i||o);null!=r&&this.raise(T.InvalidCoverInitializedName,r),null!=n&&this.raise(T.DuplicateProto,n),null!=i&&this.raise(T.UnexpectedPrivateField,i),null!=s&&this.unexpected(s),null!=o&&this.raise(T.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return $(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const n=this.inModule;this.inModule=e;const i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);const o=this.prodParam;this.prodParam=new Re;const a=this.classScope;this.classScope=new st(this);const l=this.expressionScope;return this.expressionScope=new lt(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=i,this.prodParam=o,this.classScope=a,this.expressionScope=l}}enterInitialScopes(){let e=0;(this.inModule||1&this.optionFlags)&&(e|=2),32&this.optionFlags&&(e|=1);const t=!this.inModule&&"commonjs"===this.options.sourceType;(t||2&this.optionFlags)&&(e|=4),this.prodParam.enter(e);let r=t?514:1;4&this.optionFlags&&(r|=512),this.scope.enter(r)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}}class ct{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}}class ht{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new i(r),128&(null==e?void 0:e.optionFlags)&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}}const dt=ht.prototype;dt.__clone=function(){const e=new ht(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){const n=t[r];"leadingComments"!==n&&"trailingComments"!==n&&"innerComments"!==n&&(e[n]=this[n])}return e};class ft extends ut{startNode(){const e=this.state.startLoc;return new ht(this,e.index,e)}startNodeAt(e){return new ht(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,128&this.optionFlags&&(e.range[1]=r.index),4096&this.optionFlags&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,128&this.optionFlags&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,128&this.optionFlags&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){const{type:t,start:r,end:n,loc:i,range:s,name:o}=e,a=Object.create(dt);return a.type=t,a.start=r,a.end=n,a.loc=i,a.range=s,a.name=o,e.extra&&(a.extra=e.extra),a}cloneStringLiteral(e){const{type:t,start:r,end:n,loc:i,range:s,extra:o}=e,a=Object.create(dt);return a.type=t,a.start=r,a.end=n,a.loc=i,a.range=s,a.extra=o,a.value=e.value,a}}const mt=e=>"ParenthesizedExpression"===e.type?mt(e.expression):e;class yt extends ft{toAssignable(e,t=!1){var r,n;let i;switch(("ParenthesizedExpression"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(i=mt(e),t?"Identifier"===i.type?this.expressionScope.recordArrowParameterBindingError(T.InvalidParenthesizedAssignment,e):"CallExpression"===i.type||"MemberExpression"===i.type||this.isOptionalMemberExpression(i)||this.raise(T.InvalidParenthesizedAssignment,e):this.raise(T.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let r=0,n=e.properties.length,i=n-1;r<n;r++){var s;const n=e.properties[r],o=r===i;this.toAssignableObjectExpressionProp(n,o,t),o&&"RestElement"===n.type&&null!=(s=e.extra)&&s.trailingCommaLoc&&this.raise(T.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(T.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,"VoidPattern"===e.left.type&&this.raise(T.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t)}}toAssignableObjectExpressionProp(e,t,r){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?T.PatternHasAccessor:T.PatternHasMethod,e.key);else if("SpreadElement"===e.type){this.castNodeTo(e,"RestElement");const n=e.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,r),t||this.raise(T.RestTrailingComma,e)}else this.toAssignable(e,r)}toAssignableList(e,t,r){const n=e.length-1;for(let i=0;i<=n;i++){const s=e[i];s&&(this.toAssignableListItem(e,i,r),"RestElement"===s.type&&(i<n?this.raise(T.RestTrailingComma,s):t&&this.raise(T.RestTrailingComma,t)))}}toAssignableListItem(e,t,r){const n=e[t];if("SpreadElement"===n.type){this.castNodeTo(n,"RestElement");const e=n.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,r)}else this.toAssignable(n,r)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every(((e,r)=>"ObjectMethod"!==e.type&&(r===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){const t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){const e=this.startNode();this.next();const t=this.parseBindingAtom();return"VoidPattern"===t.type&&this.raise(T.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,r){const n=1&r,i=[];let s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),n&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){let n=this.parseRestBinding();if((this.hasPlugin("flow")||2&r)&&(n=this.parseFunctionParamType(n)),i.push(n),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];if(2&r)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(T.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());i.push(this.parseBindingElement(r,e))}}return i}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(T.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:t}=this.state;if(21===e)return this.parseBindingRestProperty(this.startNode());const r=this.startNode();return 139===e?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),r.key=this.parsePrivateName()):this.parsePropertyName(r),r.method=!1,this.parseObjPropValue(r,t,!1,!1,!0,!1)}parseBindingElement(e,t){const r=this.parseMaybeDefault();return(this.hasPlugin("flow")||2&e)&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(r.loc.start,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(null!=e||(e=this.state.startLoc),t=null!=t?t:this.parseBindingAtom(),!this.eat(29))return t;const r=this.startNodeAt(e);return"VoidPattern"===t.type&&this.raise(T.VoidPatternInitializer,t),r.left=t,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(e,t,r,n){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&8192&this.optionFlags)return!0}return!1}isOptionalMemberExpression(e){return"OptionalMemberExpression"===e.type}checkLVal(e,t,r=64,n=!1,i=!1,s=!1,o=!1){var a;const l=e.type;if(this.isObjectMethod(e))return;const p=this.isOptionalMemberExpression(e);if(p||"MemberExpression"===l)return p&&(this.expectPlugin("optionalChainingAssign",e.loc.start),"AssignmentExpression"!==t.type&&this.raise(T.InvalidLhsOptionalChaining,e,{ancestor:t})),void(64!==r&&this.raise(T.InvalidPropertyBindingPattern,e));if("Identifier"===l){this.checkIdentifier(e,r,i);const{name:t}=e;return void(n&&(n.has(t)?this.raise(T.ParamDupe,e):n.add(t)))}"VoidPattern"===l&&"CatchClause"===t.type&&this.raise(T.VoidPatternCatchClauseParam,e);const u=mt(e);o||(o="CallExpression"===u.type&&("Import"===u.callee.type||"Super"===u.callee.type));const c=this.isValidLVal(l,o,!(s||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,r);if(!0===c)return;if(!1===c){const n=64===r?T.InvalidLhs:T.InvalidLhsBinding;return void this.raise(n,e,{ancestor:t})}let h,d;"string"==typeof c?(h=c,d="ParenthesizedExpression"===l):[h,d]=c;const f="ArrayPattern"===l||"ObjectPattern"===l?{type:l}:t,m=e[h];if(Array.isArray(m))for(const e of m)e&&this.checkLVal(e,f,r,n,i,d,!0);else m&&this.checkLVal(m,f,r,n,i,d,o)}checkIdentifier(e,t,r=!1){this.state.strict&&(r?fe(e.name,this.inModule):de(e.name))&&(64===t?this.raise(T.StrictEvalArguments,e,{referenceName:e.name}):this.raise(T.StrictEvalArgumentsBinding,e,{bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(T.LetInLexicalBinding,e),64&t||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(T.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?T.RestTrailingComma:T.ElementAfterRest,this.state.startLoc),!0)}}const gt=/in(?:stanceof)?|as|satisfies/y;function Tt(e){if(!e)throw new Error("Assert fail")}const vt=g`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function bt(e){return"private"===e||"public"===e||"protected"===e}function St(e){return"in"===e||"out"===e}function xt(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:r}=e;return(!t||"StringLiteral"===r.type||!("TemplateLiteral"!==r.type||r.expressions.length>0))&&At(e.object)}function Et(e,t){var r;const{type:n}=e;if(null!=(r=e.extra)&&r.parenthesized)return!1;if(t){if("Literal"===n){const{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===n||"BooleanLiteral"===n)return!0;return!(!wt(e,t)&&!function(e,t){if("UnaryExpression"===e.type){const{operator:r,argument:n}=e;if("-"===r&&wt(n,t))return!0}return!1}(e,t))||"TemplateLiteral"===n&&0===e.expressions.length||!!xt(e)}function wt(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function At(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&At(e.object)}const Pt=g`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),It=["minimal","fsharp","hack","smart"],Ct=["^^","@@","^","%","#"],_t={estree:e=>class extends e{parse(){const e=S(super.parse());return 256&this.optionFlags&&(e.tokens=e.tokens.map(S)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch(e){}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,t){const r=this.startNodeAtNode(e);return r.expression=e,this.finishNodeAt(r,"ChainExpression",t)}directiveToStmt(e){const t=e.value;delete e.value,this.castNodeTo(t,"Literal"),t.raw=t.extra.raw,t.value=t.extra.expressionValue;const r=this.castNodeTo(e,"ExpressionStatement");return r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){const{start:t,end:r,loc:n,range:i,raw:s,value:o}=e,a=Object.create(e.constructor.prototype);return a.type="Literal",a.start=t,a.end=r,a.loc=n,a.range=i,a.raw=s,a.value=o,a}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,r,n,i){super.parseBlockBody(e,t,r,n,i);const s=e.directives.map((e=>this.directiveToStmt(e)));e.body=s.concat(e.body),delete e.directives}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){const r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,r,n,i,s,o=!1){let a=this.startNode();a.kind=e.kind,a=super.parseMethod(a,t,r,n,i,s,o),delete a.kind;const{typeParameters:l}=e;l&&(delete e.typeParameters,a.typeParameters=l,this.resetStartLocationFromNode(a,l));const p=this.castNodeTo(a,"FunctionExpression");return e.value=p,"ClassPrivateMethod"===s&&(e.computed=!1),"ObjectMethod"===s?("method"===e.kind&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return"Literal"===e.type?"constructor"===e.value:super.nameIsConstructor(e)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(t,"PropertyDefinition"),t):t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(t,"PropertyDefinition"),t.computed=!1,t):t}parseClassAccessorProperty(e){const t=super.parseClassAccessorProperty(e);return this.getPluginOption("estree","classFeatures")?(t.abstract&&this.hasPlugin("typescript")?(delete t.abstract,this.castNodeTo(t,"TSAbstractAccessorProperty")):this.castNodeTo(t,"AccessorProperty"),t):t}parseObjectProperty(e,t,r,n){const i=super.parseObjectProperty(e,t,r,n);return i&&(i.kind="init",this.castNodeTo(i,"Property")),i}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,t,r,n){return"Property"===e?"value":super.isValidLVal(e,t,r,n)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){"Property"!==e.type||"get"!==e.kind&&"set"!==e.kind?"Property"===e.type&&e.method?this.raise(T.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,r):this.raise(T.PatternHasAccessor,e.key)}finishCallExpression(e,t){const r=super.finishCallExpression(e,t);var n,i;return"Import"===r.callee.type?(this.castNodeTo(r,"ImportExpression"),r.source=r.arguments[0],r.options=null!=(n=r.arguments[1])?n:null,r.attributes=null!=(i=r.arguments[1])?i:null,delete r.arguments,delete r.callee):"OptionalCallExpression"===r.type?this.castNodeTo(r,"CallExpression"):r.optional=!1,r}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){const r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":1===n.specifiers.length&&"ExportNamespaceSpecifier"===n.specifiers[0].type&&(this.castNodeTo(n,"ExportAllDeclaration"),n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var i;const{declaration:e}=n;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(i=e.decorators)?void 0:i.length)>0&&e.start===n.start&&this.resetStartLocation(n,r)}}return n}stopParseSubscript(e,t){const r=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(r,e.loc.end):r}parseMember(e,t,r,n,i){const s=super.parseMember(e,t,r,n,i);return"OptionalMemberExpression"===s.type?this.castNodeTo(s,"MemberExpression"):s.optional=!1,s}isOptionalMemberExpression(e){return"ChainExpression"===e.type?"MemberExpression"===e.expression.type:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return"Property"===e.type&&(e.method||"get"===e.kind||"set"===e.kind)}castNodeTo(e,t){const r=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(r),r}cloneIdentifier(e){const t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return"Literal"===e.type?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,r){return S(super.finishNodeAt(e,t,r))}finishNode(e,t){const r=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(r),r}resetStartLocation(e,t){super.resetStartLocation(e,t),S(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),S(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Oe.UnterminatedJsxContent,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?void(60===r&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(r)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(142,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:Ie(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(T.UnterminatedString,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):Ie(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(134,t)}jsxReadEntity(){const e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);const t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=59===this.codePointAtPos(this.state.pos));)++this.state.pos;if(r){const t=this.input.slice(e,this.state.pos),r=Ae[t];if(++this.state.pos,r)return r}}return this.state.pos=e,"&"}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(ae(e)||45===e);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(141)?e.name=this.state.value:H(this.state.type)?e.name=X(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){const e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;const r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){const e=this.state.startLoc;let t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){const r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(E.brace),this.next(),e=this.jsxParseExpressionContainer(e,E.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(Oe.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Oe.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(E.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{const t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){const e=this.startNode();return this.match(5)?(this.setContext(E.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(E.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){const t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){const t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){const t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e);let i=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 142:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const e=this.startNode();this.setContext(E.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(e)):r.push(this.jsxParseExpressionContainer(e,E.j_expr));break}default:this.unexpected()}Me(n)&&!Me(i)&&null!==i?this.raise(Oe.MissingClosingTagFragment,i):!Me(n)&&Me(i)?this.raise(Oe.MissingClosingTagElement,i,{openingTagName:Le(n.name)}):Me(n)||Me(i)||Le(i.name)!==Le(n.name)&&this.raise(Oe.MissingClosingTagElement,i,{openingTagName:Le(n.name)})}if(Me(n)?(t.openingFragment=n,t.closingFragment=i):(t.openingElement=n,t.closingElement=i),t.children=r,this.match(47))throw this.raise(Oe.UnwrappedAdjacentJSXElements,this.state.startLoc);return Me(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){const e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){const{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){const t=this.curContext();if(t!==E.j_expr){if(t===E.j_oTag||t===E.j_cTag){if(oe(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(144);if((34===e||39===e)&&t===E.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(143);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){const{context:t,type:r}=this.state;if(56===r&&143===e)t.splice(-2,2,E.j_cTag),this.state.canStartJSXElement=!1;else if(143===r)t.push(E.j_oTag);else if(144===r){const r=t[t.length-1];r===E.j_oTag&&56===e||r===E.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===E.j_expr):(this.setContext(E.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=R[r]}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return ve}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(e,t){134!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=we.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||14);const r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(Se.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);const i=this.flowParseFunctionTypeParams();return r.params=i.params,r.rest=i.rest,r.this=i._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,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(Se.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){const e=this.startNode();this.match(83)?(this.next(),this.isContextual(130)||this.match(87)||this.raise(Se.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),r.push(super.parseImport(e))):(this.expectContextual(125,Se.UnsupportedStatementInDeclareModule),r.push(this.flowParseDeclare(e,!0)))}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,i=!1;return r.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(Se.DuplicateDeclareModuleExports,e),"ES"===n&&this.raise(Se.AmbiguousDeclareModuleKind,e),n="CommonJS",i=!0):("CommonJS"===n&&this.raise(Se.AmbiguousDeclareModuleKind,e),n="ES")})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){const e=this.state.value;throw this.raise(Se.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:Ee[e]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return"ExportNamedDeclaration"===(e=this.parseExport(e,null)).type?(e.default=!1,delete e.exportKind,this.castNodeTo(e,"DeclareExportDeclaration")):this.castNodeTo(e,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const t=this.flowParseTypeAlias(e);return this.castNodeTo(t,"DeclareTypeAlias"),t}flowParseDeclareOpaqueType(e){this.next();const t=this.flowParseOpaqueType(e,!0);return this.castNodeTo(t,"DeclareOpaqueType"),t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(113))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(Se.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,r){be.has(e)&&this.raise(r?Se.AssignReservedType:Se.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return r.name=i.name,r.variance=n,r.bound=i.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(Se.MissingTypeParamDefault,t),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let r=!1;do{const e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()===E.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}flowParseTypeParameterInstantiationInExpression(){if(47===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext((()=>{this.expect(47);const t=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=t})),this.state.inType=t,this.state.inType||this.curContext()!==E.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(47!==this.reScan_lt())return null;const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:i}){const s=this.state.inType;this.state.inType=!0;const o=this.startNode();let a,l;o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let p=!1;for(t&&this.match(6)?(this.expect(6),a=9,l=!0):(this.expect(5),a=8,l=!1),o.exact=l;!this.match(a);){let t=!1,s=null,a=null;const u=this.startNode();if(n&&this.isContextual(118)){const t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),s=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}const c=this.flowParseVariance();if(this.eat(0))null!=s&&this.unexpected(s),this.eat(0)?(c&&this.unexpected(c.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):o.indexers.push(this.flowParseObjectTypeIndexer(u,t,c));else if(this.match(10)||this.match(47))null!=s&&this.unexpected(s),c&&this.unexpected(c.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e="init";(this.isContextual(99)||this.isContextual(104))&&$(this.lookahead().type)&&(e=this.state.value,this.next());const n=this.flowParseObjectTypeProperty(u,t,s,c,e,r,null!=i?i:!l);null===n?(p=!0,a=this.state.lastTokStartLoc):o.properties.push(n)}this.flowObjectTypeSemicolon(),!a||this.match(8)||this.match(9)||this.raise(Se.UnexpectedExplicitInexactInObject,a)}this.expect(a),r&&(o.inexact=p);const u=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=s,u}flowParseObjectTypeProperty(e,t,r,n,i,s,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(s?o||this.raise(Se.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Se.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(Se.InexactVariance,n),null):(s||this.raise(Se.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=r&&this.unexpected(r),n&&this.raise(Se.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=i;let o=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(e),!s&&"constructor"===e.key.name&&e.value.this&&this.raise(Se.ThisParamBannedInConstructor,e.value.this)):("init"!==i&&this.unexpected(),e.method=!1,this.eat(17)&&(o=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=o,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?Se.GetterMayNotHaveThisParam:Se.SetterMayNotHaveThisParam,e.value.this),r!==t&&this.raise("get"===e.kind?T.BadGetterArity:T.BadSetterArity,e),"set"===e.kind&&e.value.rest&&this.raise(T.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let r=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const t=this.startNodeAt(e);t.qualification=r,t.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(t,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t){const r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null;const i=this.startNode(),s=this.lookahead(),o=78===this.state.type;return 14===s.type||17===s.type?(o&&!e&&this.raise(Se.ThisParamMustBeFirst,i),t=this.parseIdentifier(o),this.eat(17)&&(r=!0,o&&this.raise(Se.ThisParamMayNotBeOptional,i)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),i.name=t,i.optional=r,i.typeAnnotation=n,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){const e=this.state.startLoc,t=this.startNode();let r,n,i=!1;const s=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=s,n;case 47:{const e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),r=this.flowParseFunctionTypeParams(),e.params=r.params,e.rest=r.rest,e.this=r._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),this.finishNode(e,"FunctionTypeAnnotation")}case 10:{const e=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Y(this.state.type)||this.match(78)){const e=this.lookahead().type;i=17!==e&&14!==e}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=s,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),n;this.eat(12)}return r=n?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):this.flowParseFunctionTypeParams(),e.params=r.params,e.rest=r.rest,e.this=r._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(Se.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(H(this.state.type)){const e=X(this.state.type);return this.next(),super.createIdentifier(t,e)}if(Y(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){const e=this.state.startLoc;let t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const n=this.startNodeAt(e),i=this.eat(18);r=r||i,this.expect(0),!i&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=i,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){const e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(45);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){const e=this.startNode();this.eat(43);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(132===this.state.type&&"_"===this.state.value){const e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){const t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){if(K(this.lookahead().type)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const t=super.parseStatementLike(e);return void 0!==this.flowPragma||this.isValidDirective(t)||(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||Y(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(Y(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){const{type:e}=this.state;return 126===e||J(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return 126===e||J(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(17);const n=this.state.clone(),i=this.state.noArrowAt,s=this.startNodeAt(t);let{consequent:o,failed:a}=this.tryParseConditionalConsequent(),[l,p]=this.getArrowLikeExpressions(o);if(a||p.length>0){const e=[...i];if(p.length>0){this.state=n,this.state.noArrowAt=e;for(let t=0;t<p.length;t++)e.push(p[t].start);({consequent:o,failed:a}=this.tryParseConditionalConsequent()),[l,p]=this.getArrowLikeExpressions(o)}a&&l.length>1&&this.raise(Se.AmbiguousConditionalArrow,n.startLoc),a&&1===l.length&&(this.state=n,e.push(l[0].start),this.state.noArrowAt=e,({consequent:o,failed:a}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(14),s.test=e,s.consequent=o,s.alternate=this.forwardNoArrowParamsConversionAt(s,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(s,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const r=[e],n=[];for(;0!==r.length;){const e=r.pop();"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):"ConditionalExpression"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){const r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i])?r:n).push(e[i]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){const r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const e=this.startNodeAt(t);return e.expression=r,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,"TypeCastExpression")}return r}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(131)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(129)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.isContextual(126)){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(130)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&"type"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){const{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(Se.DeclareClassElement,n):t.value&&this.raise(Se.DeclareClassFieldInitializer,t.value))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(T.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,r){return 64===e&&64===t&&oe(r)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){const r=e[t];"TypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;const i=e[n];!i||"TypeCastExpression"!==i.type||null!=(r=i.extra)&&r.parenthesized||!(e.length>1)&&t||this.raise(Se.TypeCastInPattern,i.typeAnnotation)}return e}parseArrayLike(e,t,r){const n=super.parseArrayLike(e,t,r);return null==r||this.state.maybeInArrowParameters||this.toReferencedList(n.elements),n}isValidLVal(e,t,r,n){return"TypeCastExpression"===e||super.isValidLVal(e,t,r,n)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),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,i,s){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,i,s),t.params&&i){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(Se.ThisParamBannedInConstructor,t)}else if("MethodDefinition"===t.type&&i&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(Se.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():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];this.isThisParam(r)&&"get"===e.kind?this.raise(Se.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(Se.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,i,s,o){let a;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!s&&(a=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const l=super.parseObjPropValue(e,t,r,n,i,s,o);return a&&((l.value||l).typeParameters=a),l}parseFunctionParamType(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(Se.PatternIsOptional,e),this.isThisParam(e)&&this.raise(Se.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(Se.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(Se.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){const r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(Se.TypeBeforeInitializer,r.typeAnnotation),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(Se.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,r){t.local=xe(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;const t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind="type"===r?r:"value"}else"type"===r&&this.match(55)&&this.unexpected(),e.importKind="type"===r||"typeof"===r?r:"value"}parseImportSpecifier(e,t,r,n,i){const s=e.imported;let o=null;"Identifier"===s.type&&("type"===s.name?o="type":"typeof"===s.name&&(o="typeof"));let a=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===o||K(this.state.type)?(e.imported=s,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=o,e.local=this.cloneIdentifier(t))}else{if(null!==o&&K(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(t)throw this.raise(T.ImportBindingIsString,e,{importName:s.value});e.imported=s,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(a=!0,e.local=this.cloneIdentifier(e.imported))}const l=xe(e);return r&&l&&this.raise(Se.ImportTypeShorthandOnlyInPureImport,e),(r||l)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),!a||r||l||this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){const r=e.kind;"get"!==r&&"set"!==r&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,i=null;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),i),!n.error)return n.node;const{context:r}=this.state,s=r[r.length-1];s!==E.j_oTag&&s!==E.j_expr||r.pop()}if(null!=(r=n)&&r.error||this.match(47)){var s,o;let r;i=i||this.state.clone();const a=this.tryParse((n=>{var i;r=this.flowParseTypeParameterDeclaration();const s=this.forwardNoArrowParamsConversionAt(r,(()=>{const n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));null!=(i=s.extra)&&i.parenthesized&&n();const o=this.maybeUnwrapTypeCastExpression(s);return"ArrowFunctionExpression"!==o.type&&n(),o.typeParameters=r,this.resetStartLocationFromNode(o,r),s}),i);let l=null;if(a.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(a.node).type){if(!a.error&&!a.aborted)return a.node.async&&this.raise(Se.UnexpectedTypeParameterBeforeAsyncArrowFunction,r),a.node;l=a.node}if(null!=(s=n)&&s.node)return this.state=n.failState,n.node;if(l)return this.state=a.failState,l;if(null!=(o=n)&&o.thrown)throw n.error;if(a.thrown)throw a.error;throw this.raise(Se.UnexpectedTokenAfterTypeParameter,r)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!r||!this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(Se.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,r){if("Identifier"===e.type&&"async"===e.name&&this.state.noArrowAt.includes(t.index)){this.next();const r=this.startNodeAt(t);r.callee=e,r.arguments=super.parseCallExpressionArguments(),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){const n=this.state.clone(),i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),n);if(!i.error&&!i.aborted)return i.node;const s=this.tryParse((()=>super.parseSubscripts(e,t,r)),n);if(s.node&&!s.error)return s.node;if(i.node)return this.state=i.failState,i.node;if(s.node)return this.state=s.failState,s.node;throw i.error||s.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();const i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}if(!r&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const r=this.startNodeAt(t);r.callee=e;const i=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),r.arguments=super.parseCallExpressionArguments(),n.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,n.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){const t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){const r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(Se.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(Se.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(T.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(Se.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?Se.EnumInvalidMemberInitializerSymbolType:Se.EnumInvalidMemberInitializerPrimaryType:Se.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(Se.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(Se.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){const e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 134:{const r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{const r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){const{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}const s=this.startNode(),{id:o,init:a}=this.flowEnumMemberRaw(),l=o.name;if(""===l)continue;/^[a-z]/.test(l)&&this.raise(Se.EnumInvalidMemberName,o,{memberName:l,suggestion:l[0].toUpperCase()+l.slice(1),enumName:e}),r.has(l)&&this.raise(Se.EnumDuplicateMemberName,o,{memberName:l,enumName:e}),r.add(l);const p={enumName:e,explicitType:t,memberName:l};switch(s.id=o,a.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(a.loc,p,"boolean"),s.init=a.value,n.booleanMembers.push(this.finishNode(s,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(a.loc,p,"number"),s.init=a.value,n.numberMembers.push(this.finishNode(s,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(a.loc,p,"string"),s.init=a.value,n.stringMembers.push(this.finishNode(s,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(a.loc,p);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(a.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(a.loc,p);break;default:n.defaultedMembers.push(this.finishNode(s,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:r});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!Y(this.state.type))throw this.raise(Se.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(Se.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){const r=t.name,n=t.loc.start,i=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:s,hasUnknownMembers:o}=this.flowEnumMembers({enumName:r,explicitType:i});switch(e.hasUnknownMembers=o,i){case"boolean":return e.explicitType=!0,e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=s.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const i=s.booleanMembers.length,o=s.numberMembers.length,a=s.stringMembers.length,l=s.defaultedMembers.length;if(i||o||a||l){if(i||o){if(!o&&!a&&i>=l){for(const e of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!i&&!a&&o>=l){for(const e of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(Se.EnumInconsistentMemberValues,n,{enumName:r}),t()}return e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody")}return t()}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:vt.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:vt.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:vt.InvalidModifierOnTypeParameter})}getScopeHandler(){return Be}tsIsIdentifier(){return Y(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),!this.hasPrecedingLineBreak()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,r){if(!Y(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;const n=this.state.value;if(e.includes(n)){if(r&&this.match(106))return;if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=vt.InvalidModifierOnTypeMember},i){const s=(e,t,r,n)=>{t===r&&i[n]&&this.raise(vt.InvalidModifiersOrder,e,{orderedModifiers:[r,n]})},o=(e,t,r,n)=>{(i[r]&&t===n||i[n]&&t===r)&&this.raise(vt.IncompatibleModifiers,e,{modifiers:[r,n]})};for(;;){const{startLoc:a}=this.state,l=this.tsParseModifier(e.concat(null!=t?t:[]),r,i.static);if(!l)break;bt(l)?i.accessibility?this.raise(vt.DuplicateAccessibilityModifier,a,{modifier:l}):(s(a,l,l,"override"),s(a,l,l,"static"),s(a,l,l,"readonly"),i.accessibility=l):St(l)?(i[l]&&this.raise(vt.DuplicateModifier,a,{modifier:l}),i[l]=!0,s(a,l,"in","out")):(hasOwnProperty.call(i,l)?this.raise(vt.DuplicateModifier,a,{modifier:l}):(s(a,l,"static","readonly"),s(a,l,"static","override"),s(a,l,"override","readonly"),s(a,l,"abstract","override"),o(a,l,"declare","override"),o(a,l,"static","abstract")),i[l]=!0),null!=t&&t.includes(l)&&this.raise(n,a,{modifier:l})}}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)}}tsParseList(e,t){const r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){const i=[];let s=-1;for(;!this.tsIsListTerminator(e);){s=-1;const n=t();if(null==n)return;if(i.push(n),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(12))}s=this.state.lastTokStartLoc.index}return n&&(n.value=s),i}tsParseBracketedList(e,t,r,n,i){n||(r?this.expect(0):this.expect(47));const s=this.tsParseDelimitedList(e,t,i);return r?this.expect(3):this.expect(48),s}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(vt.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseImportTypeOptions(){const e=this.startNode();this.expect(5);const t=this.startNode();return this.isContextual(76)?(t.method=!1,t.key=this.parseIdentifier(!0),t.computed=!1,t.shorthand=!1):this.unexpected(null,76),this.expect(14),t.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(t)],this.eat(12),this.expect(8),this.finishNode(e,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const e=this.startNode(),t=[];for(this.expect(5);!this.match(8);){const e=this.state.type;Y(e)||134===e?t.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=t,this.next(),this.finishNode(e,"ObjectExpression")}tsParseEntityName(e){let t;if(1&e&&this.match(78))if(2&e)t=this.parseIdentifier(!0);else{const e=this.startNode();this.next(),t=this.finishNode(e,"ThisExpression")}else t=this.parseIdentifier(!!(1&e));for(;this.eat(16);){const r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(!!(1&e)),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),0===t.params.length&&this.raise(vt.EmptyTypeParameters,t),-1!==r.value&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){const r=19===e;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const t of e){const{type:e}=t;"AssignmentPattern"!==e&&"TSParameterProperty"!==e||this.raise(vt.UnsupportedSignatureParameterKind,t,{type:e})}return e}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!Y(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){t&&this.raise(vt.ReadonlyForMethodSignature,e);const r=e;r.kind&&this.match(47)&&this.raise(vt.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();const n="parameters",i="typeAnnotation";if("get"===r.kind)r[n].length>0&&(this.raise(T.BadGetterArity,this.state.curPosition()),this.isThisParam(r[n][0])&&this.raise(vt.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===r.kind){if(1!==r[n].length)this.raise(T.BadSetterArity,this.state.curPosition());else{const e=r[n][0];this.isThisParam(e)&&this.raise(vt.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===e.type&&e.optional&&this.raise(vt.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===e.type&&this.raise(vt.SetAccessorCannotHaveRestParameter,this.state.curPosition())}r[i]&&this.raise(vt.SetAccessorCannotHaveReturnType,r[i])}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}{const r=e;t&&(r.readonly=!0);const n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"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();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);return this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,super.parsePropertyName(e),this.match(10)||this.match(47)||this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}tsParseMappedType(){const e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,"TSTypeParameter"),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach((e=>{const{type:r}=e;!t||"TSRestType"===r||"TSOptionalType"===r||"TSNamedTupleMember"===r&&e.optional||this.raise(vt.OptionalTypeBeforeRequired,e),t||(t="TSNamedTupleMember"===r&&e.optional||"TSOptionalType"===r)})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const e=this.state.startLoc,t=this.eat(21),{startLoc:r}=this.state;let n,i,s,o;const a=K(this.state.type)?this.lookaheadCharCode():null;if(58===a)n=!0,s=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(63===a){s=!0;const e=this.state.value,t=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(n=!0,i=this.createIdentifier(this.startNodeAt(r),e),this.expect(17),this.expect(14),o=this.tsParseType()):(n=!1,o=t,this.expect(17))}else o=this.tsParseType(),s=this.eat(17),n=this.eat(14);if(n){let e;i?(e=this.startNodeAt(r),e.optional=s,e.label=i,e.elementType=o,this.eat(17)&&(e.optional=!0,this.raise(vt.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(r),e.optional=s,this.raise(vt.InvalidTupleMemberLabel,o),e.label=o,e.elementType=this.tsParseType()),o=this.finishNode(e,"TSNamedTupleMember")}else if(s){const e=this.startNodeAt(r);e.typeAnnotation=o,o=this.finishNode(e,"TSOptionalType")}if(t){const t=this.startNodeAt(e);t.typeAnnotation=o,o=this.finishNode(t,"TSRestType")}return o}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const r=this.startNode();return"TSConstructorType"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,r))),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){const e=this.startNode(),t=this.lookahead();return 135!==t.type&&136!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),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(Y(e)||88===e||84===e){const t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:e}=this.state;let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const r=this.startNodeAt(e);r.elementType=t,this.expect(3),t=this.finishNode(r,"TSArrayType")}else{const r=this.startNodeAt(e);r.objectType=t,r.indexType=this.tsParseType(),this.expect(3),t=this.finishNode(r,"TSIndexedAccessType")}return t}tsParseTypeOperator(){const e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(vt.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),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(){var e;return(e=this.state.type)>=121&&e<=123&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){const n=this.startNode(),i=this.eat(r),s=[];do{s.push(t())}while(this.eat(r));return 1!==s.length||i?(n.types=s,this.finishNode(n,e)):s[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Y(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch(e){return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch(e){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const s=this.tsParseTypeAnnotation(!1);return r.parameterName=i,r.typeAnnotation=s,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(109!==this.state.type)return!1;const e=this.state.containsEsc;return this.next(),!(!Y(this.state.type)&&!this.match(78)||(e&&this.raise(T.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),0))}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Tt(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const t=this.startNodeAtNode(e);return 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())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(vt.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{const e=this.startNode();return e.expression=this.tsParseEntityName(3),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return r.length||this.raise(vt.EmptyHeritageClauseType,t,{token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),Y(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(vt.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()===E.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){const e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(vt.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),r=e();if(void 0!==r&&!1!==r)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;const t=this.state.type;return this.tsInAmbientContext((()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 100:if(this.state.containsEsc)return;case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,this.state.value,!0));case 107:if(this.isUsing())return this.raise(vt.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(vt.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 129:{const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(Y(t))return this.tsParseDeclaration(e,this.state.type,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,t,r,n){switch(t){case 124:if(this.tsCheckLineTerminator(r)&&(this.match(80)||Y(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case 127:if(this.tsCheckLineTerminator(r)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(Y(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case 128:if(this.tsCheckLineTerminator(r)&&Y(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case 130:if(this.tsCheckLineTerminator(r)&&Y(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch((()=>{const t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,r?super.parseArrowExpression(r,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInTopLevelContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(vt.EmptyTypeArguments,e):this.state.inType||this.curContext()!==E.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(e=this.state.type)>=124&&e<=130;var e}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(e,t){const r=t.length?t[0].loc.start:this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);const i=n.accessibility,s=n.override,o=n.readonly;4&e||!(i||o||s)||this.raise(vt.UnexpectedParameterModifier,r);const a=this.parseMaybeDefault();2&e&&this.parseFunctionParamType(a);const l=this.parseMaybeDefault(a.loc.start,a);if(i||o||s){const e=this.startNodeAt(r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),o&&(e.readonly=o),s&&(e.override=s),"Identifier"!==l.type&&"AssignmentPattern"!==l.type&&this.raise(vt.UnsupportedParameterPropertyKind,e),e.parameter=l,this.finishNode(e,"TSParameterProperty")}return t.length&&(a.decorators=t),l}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(vt.PatternIsOptional,t)}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const n="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):"TSDeclareFunction"===n&&this.state.isAmbientContext&&(this.raise(vt.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(vt.UnexpectedTypeAnnotation,e.typeAnnotation)}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r){const n=super.parseArrayLike(e,t,r);return"ArrayExpression"===n.type&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const r=this.startNodeAt(t);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let i=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(r)return n.stop=!0,e;n.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let s;const o=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return n.stop=!0,e}const o=this.tsParseTypeArgumentsInExpression();if(!o)return;if(i&&!this.match(10))return void(s=this.state.curPosition());if(G(this.state.type)){const r=super.parseTaggedTemplateExpression(e,t,n);return r.typeParameters=o,r}if(!r&&this.eat(10)){const r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeParameters=o,n.optionalChainMember&&(r.optional=i),this.finishCallExpression(r,n.optionalChainMember)}const a=this.state.type;if(48===a||52===a||10!==a&&93!==a&&120!==a&&z(a)&&!this.hasPrecedingLineBreak())return;const l=this.startNodeAt(t);return l.expression=e,l.typeParameters=o,this.finishNode(l,"TSInstantiationExpression")}));if(s&&this.unexpected(s,10),o)return"TSInstantiationExpression"===o.type&&((this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(vt.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(16)||this.match(18)||(o.expression=super.stopParseSubscript(e,n))),o}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);const{callee:r}=e;"TSInstantiationExpression"!==r.type||null!=(t=r.extra)&&t.parenthesized||(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(W(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){const i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(n&&this.raise(T.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(i,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(vt.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind="type"===r?"type":"value":e.importKind="type"===r||"typeof"===r?r:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(Y(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const r=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(vt.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){const t=e;this.next();let r=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?r=this.parseMaybeImportPhase(t,!1):t.importKind="value",this.tsParseImportEqualsDeclaration(t,r,!0)}if(this.eat(29)){const t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){const t=e;return this.expectContextual(128),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){const{isAmbientContext:n}=this.state,i=super.parseVarStatement(e,t,r||n);if(!n)return i;if(!e.declare&&("using"===t||"await using"===t))return this.raiseOverwrite(vt.UsingDeclarationInAmbientContext,e,t),i;for(const{id:e,init:r}of i.declarations)r&&("var"===t||"let"===t||e.typeAnnotation?this.raise(vt.InitializerNotAllowedInAmbientContext,r):Et(r,this.hasPlugin("estree"))||this.raise(vt.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,r));return i}parseStatementContent(e,t){if(!this.state.containsEsc)switch(this.state.type){case 75:if(this.isLookaheadContextual("enum")){const e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}break;case 124:case 125:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){const e=this.state.type,r=this.startNode();this.next();const n=125===e?this.tsTryParseDeclare(r):this.tsParseAbstractDeclaration(r,t);return n?(125===e&&(n.declare=!0),n):(r.expression=this.createIdentifier(this.startNodeAt(r.loc.start),125===e?"declare":"abstract"),this.semicolon(!1),this.finishNode(r,"ExpressionStatement"))}break;case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:if(123===this.lookaheadCharCode()){const e=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(e)}break;case 129:{const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e;break}case 127:if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){const e=this.startNode();return this.next(),this.tsParseDeclaration(e,127,!1,t)}break;case 128:if(this.nextTokenIsIdentifierOnSameLine()){const e=this.startNode();return this.next(),this.tsParseDeclaration(e,128,!1,t)}break;case 130:if(this.nextTokenIsIdentifierOnSameLine()){const e=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(e)}}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>bt(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&123===this.lookaheadCharCode()}parseClassMember(e,t,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:vt.InvalidModifierOnTypeParameterPositions},t);const i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(vt.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,r,n){const i=this.tsTryParseIndexSignature(t);if(i)return e.body.push(i),t.abstract&&this.raise(vt.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(vt.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(vt.IndexSignatureHasDeclare,t),void(t.override&&this.raise(vt.IndexSignatureHasOverride,t));!this.state.inAbstractClass&&t.abstract&&this.raise(vt.NonAbstractClassHasAbstractMethod,t),t.override&&(r.hadSuperClass||this.raise(vt.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(vt.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(vt.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}return super.parseConditional(e,t,r)}parseParenItem(e,t){const r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));const t=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(vt.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const n=Y(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&"TSImportEqualsDeclaration"!==n.type&&(this.resetStartLocation(n,t),n.declare=!0),n):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(113))return;super.parseClassId(e,t,r,e.declare?1024:8331);const i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(29)&&this.raise(vt.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:t}=e;this.raise(vt.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(vt.PrivateElementHasAbstract,e),e.accessibility&&this.raise(vt.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(vt.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,i,s){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&i&&this.raise(vt.ConstructorHasTypeParameters,o);const{declare:a=!1,kind:l}=t;!a||"get"!==l&&"set"!==l||this.raise(vt.DeclareAccessor,t,{kind:l}),o&&(t.typeParameters=o),super.pushClassMethod(e,t,r,n,i,s)}pushClassPrivateMethod(e,t,r,n){const i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&null==e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass)if("TSInstantiationExpression"===e.superClass.type){const t=e.superClass,r=t.expression;this.takeSurroundingComments(r,r.start,r.end);const n=t.typeParameters;this.takeSurroundingComments(n,n.start,n.end),e.superClass=r,e.superTypeParameters=n}else(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,i,s,o){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);return a&&(e.typeParameters=a),super.parseObjPropValue(e,t,r,n,i,s,o)}parseFunctionParams(e,t){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,i,s,o;let a,l,p,u;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(a=this.state.clone(),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),a),!l.error)return l.node;const{context:r}=this.state,n=r[r.length-1];n!==E.j_oTag&&n!==E.j_expr||r.pop()}if(!(null!=(r=l)&&r.error||this.match(47)))return super.parseMaybeAssign(e,t);a&&a!==this.state||(a=this.state.clone());const c=this.tryParse((r=>{var n,i;u=this.tsParseTypeParameters(this.tsParseConstModifier);const s=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==s.type||null!=(n=s.extra)&&n.parenthesized)&&r(),0!==(null==(i=u)?void 0:i.params.length)&&this.resetStartLocationFromNode(s,u),s.typeParameters=u,s}),a);if(!c.error&&!c.aborted)return u&&this.reportReservedArrowTypeParam(u),c.node;if(!l&&(Tt(!this.hasPlugin("jsx")),p=this.tryParse((()=>super.parseMaybeAssign(e,t)),a),!p.error))return p.node;if(null!=(n=l)&&n.node)return this.state=l.failState,l.node;if(c.node)return this.state=c.failState,u&&this.reportReservedArrowTypeParam(u),c.node;if(null!=(i=p)&&i.node)return this.state=p.failState,p.node;throw(null==(s=l)?void 0:s.error)||c.error||(null==(o=p)?void 0:o.error)}reportReservedArrowTypeParam(e){var t;1!==e.params.length||e.params[0].constraint||null!=(t=e.extra)&&t.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(vt.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(vt.UnexpectedTypeCastInParameter,e):this.raise(vt.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":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"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r,n){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==n||!r)&&["expression",!0];default:return super.isValidLVal(e,t,r,n)}}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){const r=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const n=super.parseMaybeDecoratorArguments(e,t);return n.typeParameters=r,n}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){const r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(vt.TypeAnnotationAfterAssign,r.typeAnnotation),r}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableListItem(e,t,r){const n=e[t];"TSTypeCastExpression"===n.type&&(e[t]=this.typeCastToParameter(n)),super.toAssignableListItem(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):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()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:t,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=r}}parseClass(e,t,r){const n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(e.abstract=!0,this.raise(vt.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,80)}parseMethod(e,t,r,n,i,s,o){const a=super.parseMethod(e,t,r,n,i,s,o);if((a.abstract||"TSAbstractMethodDefinition"===a.type)&&(this.hasPlugin("estree")?a.value:a).body){const{key:e}=a;this.raise(vt.AbstractMethodHasImplementation,a,{methodName:"Identifier"!==e.type||a.computed?`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`:e.name})}return a}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,i){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,r){const n=t?"imported":"local",i=t?"local":"exported";let s,o=e[n],a=!1,l=!0;const p=o.loc.start;if(this.isContextual(93)){const e=this.parseIdentifier();if(this.isContextual(93)){const r=this.parseIdentifier();K(this.state.type)?(a=!0,o=e,s=t?this.parseIdentifier():this.parseModuleExportName(),l=!1):(s=r,l=!1)}else K(this.state.type)?(l=!1,s=t?this.parseIdentifier():this.parseModuleExportName()):(a=!0,o=e)}else K(this.state.type)&&(a=!0,t?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());a&&r&&this.raise(t?vt.TypeModifierIsUsedInTypeImports:vt.TypeModifierIsUsedInTypeExports,p),e[n]=o,e[i]=s,e[t?"importKind":"exportKind"]=a?"type":"value",l&&this.eatContextual(93)&&(e[i]=t?this.parseIdentifier():this.parseModuleExportName()),e[i]||(e[i]=this.cloneIdentifier(e[n])),t&&this.checkIdentifier(e[i],a?4098:4096)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case"ExpressionStatement":return void(null!=e.directive||(e.directive=void 0));case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return null!=e.decorators||(e.decorators=[]),null!=e.optional||(e.optional=!1),void(null!=e.typeAnnotation||(e.typeAnnotation=void 0));case"TSParameterProperty":return null!=e.accessibility||(e.accessibility=void 0),null!=e.decorators||(e.decorators=[]),null!=e.override||(e.override=!1),null!=e.readonly||(e.readonly=!1),void(null!=e.static||(e.static=!1));case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return null!=e.declare||(e.declare=!1),null!=e.returnType||(e.returnType=void 0),void(null!=e.typeParameters||(e.typeParameters=void 0));case"Property":return void(null!=e.optional||(e.optional=!1));case"TSMethodSignature":case"TSPropertySignature":null!=e.optional||(e.optional=!1);case"TSIndexSignature":return null!=e.accessibility||(e.accessibility=void 0),null!=e.readonly||(e.readonly=!1),void(null!=e.static||(e.static=!1));case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":null!=e.declare||(e.declare=!1),null!=e.definite||(e.definite=!1),null!=e.readonly||(e.readonly=!1),null!=e.typeAnnotation||(e.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":return null!=e.accessibility||(e.accessibility=void 0),null!=e.decorators||(e.decorators=[]),null!=e.override||(e.override=!1),void(null!=e.optional||(e.optional=!1));case"ClassExpression":null!=e.id||(e.id=null);case"ClassDeclaration":return null!=e.abstract||(e.abstract=!1),null!=e.declare||(e.declare=!1),null!=e.decorators||(e.decorators=[]),null!=e.implements||(e.implements=[]),null!=e.superTypeArguments||(e.superTypeArguments=void 0),void(null!=e.typeParameters||(e.typeParameters=void 0));case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(null!=e.declare||(e.declare=!1));case"VariableDeclarator":return void(null!=e.definite||(e.definite=!1));case"TSEnumDeclaration":return null!=e.const||(e.const=!1),void(null!=e.declare||(e.declare=!1));case"TSEnumMember":return void(null!=e.computed||(e.computed=!1));case"TSImportType":return null!=e.qualifier||(e.qualifier=null),void(null!=e.options||(e.options=null));case"TSInterfaceDeclaration":return null!=e.declare||(e.declare=!1),void(null!=e.extends||(e.extends=[]));case"TSMappedType":return null!=e.optional||(e.optional=!1),void(null!=e.readonly||(e.readonly=void 0));case"TSModuleDeclaration":return null!=e.declare||(e.declare=!1),void(null!=e.global||(e.global="global"===e.kind));case"TSTypeParameter":return null!=e.const||(e.const=!1),null!=e.in||(e.in=!1),void(null!=e.out||(e.out=!1))}}chStartsBindingIdentifierAndNotRelationalOperator(e,t){if(oe(e)){if(gt.lastIndex=t,gt.test(this.input)){const e=this.codePointAtPos(gt.lastIndex);if(!ae(e)&&92!==e)return!1}return!0}return 92===e}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(t,e)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)||34===t||39===t}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,t=this.startNode();if(this.next(),Y(this.state.type)){const e=this.parseIdentifierName(),r=this.createIdentifier(t,e);if(this.castNodeTo(r,"V8IntrinsicIdentifier"),this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(133)){const t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=e;return r.expectedNode&&r.type||(r=this.finishNode(r,"Placeholder")),r.expectedNode=t,r}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){void 0!==e&&super.checkReservedWord(e,t,r,n)}cloneIdentifier(e){const t=super.cloneIdentifier(e);return"Placeholder"===t.type&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return"Placeholder"===e.type?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r,n){return"Placeholder"===e||super.isValidLVal(e,t,r,n)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){if(super.chStartsBindingIdentifier(e,t))return!0;const r=this.nextTokenStart();return 37===this.input.charCodeAt(r)&&37===this.input.charCodeAt(r+1)}verifyBreakContinue(e,t){var r;"Placeholder"!==(null==(r=e.label)?void 0:r.type)&&super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var r;if("Placeholder"!==t.type||null!=(r=t.extra)&&r.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){const r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}this.semicolon();const n=e;return n.name=t.name,this.finishPlaceholder(n,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){const n=t?"ClassDeclaration":"ClassExpression";this.next();const i=this.state.strict,s=this.parsePlaceholder("Identifier");if(s){if(!(this.match(81)||this.match(133)||this.match(5))){if(r||!t)return e.id=null,e.body=this.finishPlaceholder(s,"ClassBody"),this.finishNode(e,n);throw this.raise(Pt.ClassNameIsRequired,this.state.startLoc)}e.id=s}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,i),this.finishNode(e,n)}parseExport(e,t){const r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);const n=e;if(!this.isContextual(98)&&!this.match(12))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const i=this.startNode();return i.exported=r,n.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(n,t)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(X(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return!(null==(r=e.specifiers)||!r.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){const{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Pt.UnexpectedSpace,this.state.lastTokEndLoc)}}},Nt=Object.keys(_t);class kt extends yt{checkProto(e,t,r,n){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return r;const i=e.key;return"__proto__"===("Identifier"===i.type?i.name:i.value)?t?(this.raise(T.RecordNoProto,i),!0):(r&&(n?null===n.doubleProtoLoc&&(n.doubleProtoLoc=i.loc.start):this.raise(T.DuplicateProto,i)),!0):r}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(T.ParseExpressionEmptyInput,this.state.startLoc);const e=this.parseExpression();if(!this.match(140))throw this.raise(T.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,256&this.optionFlags&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){const n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){const r=this.state.startLoc,n=this.isContextual(108);if(n&&this.prodParam.hasYield){this.next();let e=this.parseYield(r);return t&&(e=t.call(this,e,r)),e}let i;e?i=!1:(e=new ct,i=!0);const{type:s}=this.state;(10===s||Y(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(e);if(t&&(o=t.call(this,o,r)),(a=this.state.type)>=29&&a<=33){const t=this.startNodeAt(r),n=this.state.value;if(t.operator=n,this.match(29)){this.toAssignable(o,!0),t.left=o;const n=r.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=n&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=n&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=n&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),null!=e.voidPatternLoc&&e.voidPatternLoc.index>=n&&(e.voidPatternLoc=null)}else t.left=o;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(t,"AssignmentExpression"),void 0,void 0,void 0,void 0,"||="===n||"&&="===n||"??="===n),t}var a;if(i&&this.checkExpressionErrors(e,!0),n){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?z(e):z(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(T.YieldNotInGeneratorFunction,r),this.parseYield(r)}return o}parseMaybeConditional(e){const t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){const r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){const t=this.getPrivateNameSV(e);(r>=W(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(T.PrivateInExpectedIn,e,{identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}const n=this.state.type;if((i=n)>=39&&i<=59&&(this.prodParam.hasIn||!this.match(58))){let i=W(n);if(i>r){if(39===n){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}const s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;const o=41===n||42===n,a=40===n;if(a&&(i=W(42)),this.next(),39===n&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(T.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);s.right=this.parseExprOpRightExpr(n,i);const l=this.finishNode(s,o||a?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(a&&(41===p||42===p)||o&&40===p)throw this.raise(T.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,t,r)}}var i;return e}parseExprOpRightExpr(e,t){const r=this.state.startLoc;if(39===e){switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}if("smart"===this.getPluginOption("pipelineOperator","proposal"))return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(T.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)}))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){const r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,57===e?t-1:t)}parseHackPipeBody(){var e;const{startLoc:t}=this.state,r=this.parseMaybeAssign();return!h.has(r.type)||null!=(e=r.extra)&&e.parenthesized||this.raise(T.PipeUnparenthesizedBody,t,{type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(T.PipeTopicUnused,t),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(T.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){const r=this.state.startLoc,n=this.isContextual(96);if(n&&this.recordAwaitIfAllowed()){this.next();const e=this.parseAwait(r);return t||this.checkExponentialAfterUnary(e),e}const i=this.match(34),s=this.startNode();if(o=this.state.type,F[o]){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const r=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){const e=s.argument;"Identifier"===e.type?this.raise(T.StrictDelete,s):this.hasPropertyAsPrivateName(e)&&this.raise(T.DeletePrivateField,s)}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}var o;const a=this.parseUpdate(s,i,e);if(n){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?z(e):z(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(T.AwaitNotInAsyncContext,r),this.parseAwait(r)}return a}parseUpdate(e,t,r){if(t){const t=e;return this.checkLVal(t.argument,this.finishNode(t,"UpdateExpression")),e}const n=this.state.startLoc;let i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return i;for(;34===this.state.type&&!this.canInsertSemicolon();){const e=this.startNodeAt(n);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(e,"UpdateExpression"))}return i}parseExprSubscripts(e){const t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){const n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return e}parseSubscript(e,t,r,n){const{type:i}=this.state;if(!r&&15===i)return this.parseBind(e,t,r,n);if(G(i))return this.parseTaggedTemplateExpression(e,t,n);let s=!1;if(18===i){if(r&&(this.raise(T.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(e,n);n.optionalChainMember=s=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,s);{const r=this.eat(0);return r||s||this.eat(16)?this.parseMember(e,t,n,r,s):this.stopParseSubscript(e,n)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,r,n,i){const s=this.startNodeAt(t);return s.object=e,s.computed=n,n?(s.property=this.parseExpression(),this.expect(3)):this.match(139)?("Super"===e.type&&this.raise(T.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),r.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,r,n){const i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){const i=this.state.maybeInArrowParameters;let s=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(t);o.callee=e;const{maybeAsyncArrow:a,optionalChainMember:l}=r;a&&(this.expressionScope.enter(new at(2)),s=new ct),l&&(o.optional=n),o.arguments=n?this.parseCallExpressionArguments():this.parseCallExpressionArguments("Super"!==e.type,o,s);let p=this.finishCallExpression(o,l);return a&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),p)):(a&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=i,p}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){const n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(T.OptionalChainingNoTemplate,t),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if("Import"===e.callee.type)if(0===e.arguments.length||e.arguments.length>2)this.raise(T.ImportCallArity,e);else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(T.ImportCallSpreadArgument,t);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r){const n=[];let i=!0;const s=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}n.push(this.parseExprListItem(11,!1,r,e))}return this.state.inFSharpPipelineDirectBody=s,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingCommaLoc),t.innerComments&&qe(e,t.innerComments),t.callee.trailingComments&&qe(e,t.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null;const{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?512&this.optionFlags?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(T.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;const e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(T.UnsupportedBind,e)}case 139:return this.raise(T.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),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);throw this.unexpected()}case 47:{const e=this.input.codePointAt(this.nextTokenStart());if(oe(e)||62===e)throw this.expectOnePlugin(["jsx","flow","typescript"]);throw this.unexpected()}default:if(137===n)return this.parseDecimalLiteral(this.state.value);if(2===n||1===n)return this.parseArrayLike(2===this.state.type?4:3,!0);if(6===n||7===n)return this.parseObjectLike(6===this.state.type?9:8,!1,!0);if(Y(n)){if(this.isContextual(127)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){const{type:t}=this.state;if(68===t)return this.resetPreviousNodeTrailingComments(r),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(r));if(Y(t))return e&&61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r)):r;if(90===t)return this.resetPreviousNodeTrailingComments(r),this.parseDo(this.startNodeAtNode(r),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){const r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=s(this.state.endLoc,-1),this.parseTopicReference(r);throw this.unexpected()}parseTopicReference(e){const t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n))return"hack"===r?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(T.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(T.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(T.PipeTopicUnconfiguredToken,t,{token:X(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:X(r)}]);case"smart":return 27===r;default:throw this.raise(T.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(je(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(T.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();const r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?16&this.optionFlags||this.raise(T.SuperNotAllowed,e):this.scope.allowSuper||16&this.optionFlags||this.raise(T.UnexpectedSuper,e),this.match(10)||this.match(0)||this.match(16)||this.raise(T.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(s(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;const n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(T.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){const t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}{const t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(T.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.value=e,this.next(),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.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.startLoc;let r;this.next(),this.expressionScope.enter(new at(1));const n=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const s=this.state.startLoc,o=[],a=new ct;let l,p,u=!0;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,null===a.optionalParametersLoc?null:a.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){const e=this.state.startLoc;if(l=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,a,this.parseParenItem))}const c=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=i;let h=this.startNodeAt(t);return e&&this.shouldParseArrow(o)&&(h=this.parseArrow(h))?(this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(h,o,!1),h):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),l&&this.unexpected(l),this.checkExpressionErrors(a,!0),this.toReferencedListDeep(o,!0),o.length>1?(r=this.startNodeAt(s),r.expressions=o,this.finishNode(r,"SequenceExpression"),this.resetEndLocation(r,c)):r=o[0],this.wrapParenthesis(t,r))}wrapParenthesis(e,t){if(!(1024&this.optionFlags))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;const r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const r=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(T.UnexpectedNewTarget,r),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){const t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const t=this.match(83),r=this.parseNoCallExpr();e.callee=r,!t||"Import"!==r.type&&"ImportExpression"!==r.type||this.raise(T.ImportCallNotNewExpression,r)}parseTemplateElement(e){const{start:t,startLoc:r,end:n,value:i}=this.state,o=t+1,a=this.startNodeAt(s(r,1));null===i&&(e||this.raise(T.InvalidEscapeSequenceTemplate,s(this.state.firstInvalidTemplateEscapePos,1)));const l=this.match(24),p=l?-1:-2,u=n+p;a.value={raw:this.input.slice(o,u).replace(/\r\n?/g,"\n"),cooked:null===i?null:i.slice(1,p)},a.tail=l,this.next();const c=this.finishNode(a,"TemplateElement");return this.resetEndLocation(c,s(this.state.lastTokEndLoc,p)),c}parseTemplate(e){const t=this.startNode();let r=this.parseTemplateElement(e);const n=[r],i=[];for(;!r.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),n.push(r=this.parseTemplateElement(e));return t.expressions=i,t.quasis=n,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=!1,o=!0;const a=this.startNode();for(a.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(a);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(n),s=this.checkProto(i,r,s,n)),r&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(T.InvalidRecordProperty,i),i.shorthand&&this.addExtra(i,"shorthand",!0),a.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let l="ObjectExpression";return t?l="ObjectPattern":r&&(l="RecordExpression"),this.finishNode(a,l)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(T.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());const r=this.startNode();let n,i=!1,s=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(r.decorators=t,t=[]),r.method=!1,e&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(r);const a=this.state.containsEsc;if(this.parsePropertyName(r,e),!o&&!a&&this.maybeAsyncOrAccessorProp(r)){const{key:e}=r,t=e.name;"async"!==t||this.hasPrecedingLineBreak()||(i=!0,this.resetPreviousNodeTrailingComments(e),o=this.eat(55),this.parsePropertyName(r)),"get"!==t&&"set"!==t||(s=!0,this.resetPreviousNodeTrailingComments(e),r.kind=t,this.match(55)&&(o=!0,this.raise(T.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(r))}return this.parseObjPropValue(r,n,o,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==r&&this.raise("get"===e.kind?T.BadGetterArity:T.BadSetterArity,e),"set"===e.kind&&"RestElement"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(T.BadSetterRestParameter,e)}parseObjectMethod(e,t,r,n,i){if(i){const r=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(r),r}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,n),this.finishObjectProperty(e);if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){const r=this.state.startLoc;null!=n?null===n.shorthandAssignLoc&&(n.shorthandAssignLoc=r):this.raise(T.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,r,n,i,s,o){const a=this.parseObjectMethod(e,r,n,i,s)||this.parseObjectProperty(e,t,i,o);return a||this.unexpected(),a}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:r,value:n}=this.state;let i;if(K(r))i=this.parseIdentifier(!0);else switch(r){case 135:i=this.parseNumericLiteral(n);break;case 134:i=this.parseStringLiteral(n);break;case 136:i=this.parseBigIntLiteral(n);break;case 139:{const e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(T.UnexpectedPrivateField,e),i=this.parsePrivateName();break}default:if(137===r){i=this.parseDecimalLiteral(n);break}this.unexpected()}e.key=i,139!==r&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,i,s,o=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(530|(o?576:0)|(i?32:0)),this.prodParam.enter(je(r,e.generator)),this.parseFunctionParams(e,n);const a=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),a}parseArrayLike(e,t,r){t&&this.expectPlugin("recordAndTuple");const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!t,r,i),this.state.inFSharpPipelineDirectBody=n,this.finishNode(i,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(518);let i=je(r,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,r);const s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){const n=t&&!this.match(5);if(this.expressionScope.enter(pt()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const n=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(i=>{const s=!this.isSimpleParamList(e.params);i&&s&&this.raise(T.IllegalLanguageModeDirective,"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end);const o=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||s),t,o),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,o)})),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,n=!0){const i=!t&&new Set,s={type:"FormalParameters"};for(const t of e.params)this.checkLVal(t,s,5,i,n)}parseExprList(e,t,r,n){const i=[];let s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}i.push(this.parseExprListItem(e,t,r))}return i}parseExprListItem(e,t,r,n){let i;if(this.match(12))t||this.raise(T.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){const e=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(T.UnexpectedArgumentPlaceholder,this.state.startLoc);const e=this.startNode();this.next(),i=this.finishNode(e,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowInOrVoidPattern(e,r,this.parseParenItem);return i}parseIdentifier(e){const t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}createIdentifierAt(e,t,r){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,"Identifier",r)}parseIdentifierName(e){let t;const{startLoc:r,type:n}=this.state;K(n)?t=this.state.value:this.unexpected();const i=n<=92;return e?i&&this.replaceToken(132):this.checkReservedWord(t,r,i,!1),this.next(),t}checkReservedWord(e,t,r,n){if(!(e.length>10)&&function(e){return me.has(e)}(e))if(r&&function(e){return le.has(e)}(e))this.raise(T.UnexpectedKeyword,t,{keyword:e});else if((this.state.strict?n?fe:he:ce)(e,this.inModule))this.raise(T.UnexpectedReservedWord,t,{reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(T.YieldBindingIdentifier,t)}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(T.AwaitBindingIdentifier,t);if(this.scope.inStaticBlock)return void this.raise(T.AwaitBindingIdentifierInStaticBlock,t);this.expressionScope.recordAsyncArrowParametersError(t)}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(T.ArgumentsInClass,t)}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){const t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(T.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(T.ObsoleteAwaitStar,t),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return 53===e||10===e||0===e||G(e)||102===e&&!this.state.containsEsc||138===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(e){const t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(T.YieldInParameter,t);let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return t.delegate=r,t.argument=n,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12))if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do{this.parseMaybeAssignAllowIn()}while(this.eat(12)&&!this.match(11));this.raise(T.ImportCallArity,e)}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(T.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){const r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}{const r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(T.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(T.PipelineTopicUnused,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"}]))return e();{const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const t=this.startNodeAt(this.state.endLoc);this.next();const r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");const t=this.startNode();return null!=e&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,r){if(null!=t&&this.match(88)){const r=this.lookaheadCharCode();if(44===r||r===(3===e?93:8===e?125:41)||61===r)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,r)}parsePropertyNamePrefixOperator(e){}}const Ot={kind:1},Mt={kind:2},Lt=/[\uD800-\uDFFF]/u,Dt=/in(?:stanceof)?/y;class Bt extends kt{parseTopLevel(e,t){return e.program=this.parseProgram(t,140,"module"===this.options.sourceType?"module":"script"),e.comments=this.comments,256&this.optionFlags&&(e.tokens=function(e,t,r){for(let n=0;n<e.length;n++){const i=e[n],{type:o}=i;if("number"==typeof o){if(139===o){const{loc:t,start:r,value:o,end:a}=i,l=r+1,p=s(t.start,1);e.splice(n,1,new rt({type:Z(27),value:"#",start:r,end:l,startLoc:t.start,endLoc:p}),new rt({type:Z(132),value:o,start:l,end:a,startLoc:p,endLoc:t.end})),n++;continue}if(G(o)){const{loc:a,start:l,value:p,end:u}=i,c=l+1,h=s(a.start,1);let d,f,m,y,g;d=96===t.charCodeAt(l-r)?new rt({type:Z(22),value:"`",start:l,end:c,startLoc:a.start,endLoc:h}):new rt({type:Z(8),value:"}",start:l,end:c,startLoc:a.start,endLoc:h}),24===o?(m=u-1,y=s(a.end,-1),f=null===p?null:p.slice(1,-1),g=new rt({type:Z(22),value:"`",start:m,end:u,startLoc:y,endLoc:a.end})):(m=u-2,y=s(a.end,-2),f=null===p?null:p.slice(1,-2),g=new rt({type:Z(23),value:"${",start:m,end:u,startLoc:y,endLoc:a.end})),e.splice(n,1,d,new rt({type:Z(20),value:f,start:c,end:m,startLoc:h,endLoc:y}),g),n+=2;continue}i.type=Z(o)}}return e}(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,t,r){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(64&this.optionFlags)&&this.scope.undefinedExports.size>0)for(const[e,t]of Array.from(this.scope.undefinedExports))this.raise(T.ModuleExportUndefined,t,{localName:e});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let n;return n=140===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",s(this.state.startLoc,-1)),n}stmtToDirective(e){const t=this.castNodeTo(e,"Directive"),r=this.castNodeTo(e.expression,"DirectiveLiteral"),n=r.value,i=this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end)),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),this.addExtra(r,"expressionValue",n),t.value=r,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(100)&&this.hasFollowingBindingAtom()}isUsing(){return!!this.isContextual(107)&&this.nextTokenIsIdentifierOnSameLine()}isForUsing(){if(!this.isContextual(107))return!1;const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){const t=this.lookaheadCharCodeSince(e+2);if(61!==t&&58!==t&&59!==t)return!1}return!(!this.chStartsBindingIdentifier(t,e)&&!this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);const t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(oe(e)){if(Dt.lastIndex=t,Dt.test(this.input)){const e=this.codePointAtPos(Dt.lastIndex);if(!ae(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){const e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 123===t||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){const r=this.state.type,n=this.startNode(),i=!!(2&e),s=!!(4&e),o=1&e;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(46===this.lookaheadCharCode())break;return s||this.raise(this.state.strict?T.StrictFunction:this.options.annexB?T.SloppyFunctionAnnexB:T.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(n,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);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 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(T.AwaitUsingNotInAsyncContext,n):this.raise(T.UnexpectedLexicalDeclaration,n):this.raise(T.UnexpectedUsingDeclaration,n),this.next(),this.parseVarStatement(n,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(T.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(T.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(n,"using");case 100:{if(this.state.containsEsc)break;const e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t){if(!i&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(t,e)&&123!==t)break}}case 75:i||this.raise(T.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const e=this.state.value;return this.parseVarStatement(n,e)}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(40===e||46===e)break}case 82:{let e;return 8&this.optionFlags||o||this.raise(T.UnexpectedImportExport,this.state.startLoc),this.next(),e=83===r?this.parseImport(n):this.parseExport(n,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(T.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(n,!0,!i&&s)}const a=this.state.value,l=this.parseExpression();return Y(r)&&"Identifier"===l.type&&this.eat(14)?this.parseLabeledStatement(n,a,l,e):this.parseExpressionStatement(n,l,t)}assertModuleNodeAllowed(e){8&this.optionFlags||this.inModule||this.raise(T.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,r){var n;return e&&(null!=(n=t.decorators)&&n.length?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(T.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(T.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(T.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const t=this.state.startLoc;let r;if(this.match(10)){const t=this.state.startLoc;this.next(),r=this.parseExpression(),this.expect(11),r=this.wrapParenthesis(t,r);const n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(r,t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==r&&this.raise(T.DecoratorArgumentsOutsideParentheses,n)}else{for(r=this.parseIdentifier(!1);this.eat(16);){const e=this.startNodeAt(t);e.object=r,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,r=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(r,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){const r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){const n=this.state.labels[r];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(t||1===n.kind))break;if(e.label&&t)break}}if(r===this.state.labels.length){const r=t?"BreakStatement":"ContinueStatement";this.raise(T.IllegalBreakContinue,e,{type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Ot),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Ot);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);const r=this.isContextual(100);{const n=this.isAwaitUsing(),i=n||this.isForUsing(),s=r&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||s){const r=this.startNode();let s;n?(s="await using",this.recordAwaitIfAllowed()||this.raise(T.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):s=this.state.value,this.next(),this.parseVar(r,!0,s);const o=this.finishNode(r,"VariableDeclaration"),a=this.match(58);return a&&i&&this.raise(T.ForInUsing,o),(a||this.isContextual(102))&&1===o.declarations.length?this.parseForIn(e,o,t):(null!==t&&this.unexpected(t),this.parseFor(e,o))}}const n=this.isContextual(95),i=new ct,s=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(r&&this.raise(T.ForOfLet,s),null===t&&n&&"Identifier"===s.type&&this.raise(T.ForOfAsync,s)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);const r=o?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{type:r}),this.parseForIn(e,s,t)}return this.checkExpressionErrors(i,!0),null!==t&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(T.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let r;this.expect(5),this.state.labels.push(Mt),this.scope.enter(256);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);r&&this.finishNode(r,"SwitchCase"),t.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(e&&this.raise(T.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,r.test=null),this.expect(14)}else r?r.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(T.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){const t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,e.handler||e.finalizer||this.raise(T.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Ot),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(T.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(const e of this.state.labels)e.name===t&&this.raise(T.LabelRedeclaration,r,{labelName:t});const i=(s=this.state.type)>=90&&s<=92?1:this.match(71)?2:null;var s;for(let t=this.state.labels.length-1;t>=0;t--){const r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.sourceToOffsetPos(this.state.start),r.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=8&n?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){const n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,i){const s=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?o:void 0,r,n,i)}parseBlockOrModuleBlockBody(e,t,r,n,i){const s=this.state.strict;let o=!1,a=!1;for(;!this.match(n);){const n=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!a){if(this.isValidDirective(n)){const e=this.stmtToDirective(n);t.push(e),o||"use strict"!==e.value.value||(o=!0,this.setStrict(!0));continue}a=!0,this.state.strictErrors.clear()}e.push(n)}null==i||i.call(this,o),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){const n=this.match(58);return this.next(),n?null!==r&&this.unexpected(r):e.await=null!==r,"VariableDeclaration"!==t.type||null==t.declarations[0].init||n&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(T.ForInOfLoopInitializer,t,{type:n?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(T.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){const i=e.declarations=[];for(e.kind=r;;){const e=this.startNode();if(this.parseVarId(e,r),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==e.init||n||("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(102))?"const"!==r&&"using"!==r&&"await using"!==r||this.match(58)||this.isContextual(102)||this.raise(T.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:r}):this.raise(T.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),i.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){const r=this.parseBindingAtom();"using"===t||"await using"===t?"ArrayPattern"!==r.type&&"ObjectPattern"!==r.type||this.raise(T.UsingDeclarationHasBindingPattern,r.loc.start):"VoidPattern"===r.type&&this.raise(T.UnexpectedVoidPattern,r.loc.start),this.checkLVal(r,{type:"VariableDeclarator"},"var"===t?5:8201),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){const r=2&t,n=!!(1&t),i=n&&!(4&t),s=!!(8&t);this.initFunction(e,s),this.match(55)&&(r&&this.raise(T.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(i));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(je(s,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||Y(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new ot(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,r){this.next();const n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return"Identifier"===e.type&&"constructor"===e.name||"StringLiteral"===e.type&&"constructor"===e.value}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();const r={hadConstructor:!1,hadSuperClass:e};let n=[];const i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(T.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){n.push(this.parseDecorator());continue}const e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(i,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(T.DecoratorConstructor,e)}})),this.state.strict=t,this.next(),n.length)throw this.raise(T.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){const r=this.parseIdentifier(!0);if(this.isClassMethod()){const n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){const n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){const n=this.isContextual(106);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){const i=t,s=t,o=t,a=t,l=t,p=i,u=i;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){p.kind="method";const t=this.match(139);return this.parseClassElementName(p),this.parsePostMemberNameModifiers(p),t?void this.pushClassPrivateMethod(e,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(T.ConstructorIsGenerator,i.key),void this.pushClassMethod(e,i,!0,!1,!1,!1))}const c=!this.state.containsEsc&&Y(this.state.type),h=this.parseClassElementName(t),d=c?h.name:null,f=this.isPrivateName(h),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",f)return void this.pushClassPrivateMethod(e,s,!1,!1);const n=this.isNonstaticConstructor(i);let o=!1;n&&(i.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(T.DuplicateConstructor,h),n&&this.hasPlugin("typescript")&&t.override&&this.raise(T.OverrideOnConstructor,h),r.hadConstructor=!0,o=r.hadSuperClass),this.pushClassMethod(e,i,!1,!1,n,o)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,a):this.pushClassProperty(e,o);else if("async"!==d||this.isLineTerminator())if("get"!==d&&"set"!==d||this.match(55)&&this.isLineTerminator())if("accessor"!==d||this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(e,a):this.pushClassProperty(e,o):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);const t=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(e,l,t)}else{this.resetPreviousNodeTrailingComments(h),p.kind=d;const t=this.match(139);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(T.ConstructorIsAccessor,i.key),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else{this.resetPreviousNodeTrailingComments(h);const t=this.eat(55);u.optional&&this.unexpected(m),p.kind="method";const r=this.match(139);this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),r?this.pushClassPrivateMethod(e,s,t,!0):(this.isNonstaticConstructor(i)&&this.raise(T.ConstructorIsAsync,i.key),this.pushClassMethod(e,i,t,!0,!1,!1))}}parseClassElementName(e){const{type:t,value:r}=this.state;if(132!==t&&134!==t||!e.static||"prototype"!==r||this.raise(T.StaticPrototype,this.state.startLoc),139===t){"constructor"===r&&this.raise(T.ConstructorClassPrivateField,this.state.startLoc);const t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var r;this.scope.enter(720);const n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,"StaticBlock")),null!=(r=t.decorators)&&r.length&&this.raise(T.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(T.ConstructorClassField,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),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){r||t.computed||!this.nameIsConstructor(t.key)||this.raise(T.ConstructorClassField,t.key);const n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,i,s){e.body.push(this.parseMethod(t,r,n,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){const i=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);const s="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(pt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(Y(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else{if(!r&&t)throw this.raise(T.MissingClassName,this.state.startLoc);e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){const r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),i=!n||this.eat(12),s=i&&this.eatExportStar(e),o=s&&this.maybeParseExportNamespaceSpecifier(e),a=i&&(!o||this.eat(12)),l=n||s;if(s&&!o){if(n&&this.unexpected(),t)throw this.raise(T.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}const p=this.maybeParseExportNamedSpecifiers(e);let u;if(n&&i&&!s&&!p&&this.unexpected(null,5),o&&a&&this.unexpected(null,98),l||p){if(u=!1,t)throw this.raise(T.UnsupportedDecoratorExport,e);this.parseExportFrom(e,l)}else u=this.maybeParseExportDeclaration(e);if(l||p||u){var c;const r=e;if(this.checkExport(r,!0,!1,!!r.source),"ClassDeclaration"===(null==(c=r.declaration)?void 0:c.type))this.maybeTakeDecorators(t,r.declaration,r);else if(t)throw this.raise(T.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(r,"ExportNamedDeclaration")}if(this.eat(65)){const r=e,n=this.parseExportDefaultExpression();if(r.declaration=n,"ClassDeclaration"===n.type)this.maybeTakeDecorators(t,n,r);else if(t)throw this.raise(T.UnsupportedDecoratorExport,e);return this.checkExport(r,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(r,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);const r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t;null!=(t=e).specifiers||(t.specifiers=[]);const r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){const t=e;t.specifiers||(t.specifiers=[]);const r="type"===t.exportKind;return t.specifiers.push(...this.parseExportSpecifiers(r)),t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(T.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(T.UnsupportedDefaultExport,this.state.startLoc);const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(Y(e)){if(95===e&&!this.state.containsEsc||100===e)return!1;if((130===e||129===e)&&!this.state.containsEsc){const e=this.nextTokenStart(),t=this.input.charCodeAt(e);if(123===t||this.chStartsBindingIdentifier(t,e)&&!this.input.startsWith("from",e))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||Y(this.state.type)&&r)return!0;if(this.match(65)&&r){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(T.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()||this.isAwaitUsing()?(this.raise(T.UsingDeclarationExport,this.state.startLoc),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){var i;if(t)if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var s;const t=e.declaration;"Identifier"!==t.type||"from"!==t.name||t.end-t.start!=4||null!=(s=t.extra)&&s.parenthesized||this.raise(T.ExportDefaultFromAsIdentifier,t)}}else if(null!=(i=e.specifiers)&&i.length)for(const t of e.specifiers){const{exported:e}=t,r="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){const{local:e}=t;"Identifier"!==e.type?this.raise(T.ExportBindingIsString,t,{localName:e.value,exportName:r}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration){const t=e.declaration;if("FunctionDeclaration"===t.type||"ClassDeclaration"===t.type){const{id:r}=t;if(!r)throw new Error("Assertion failure");this.checkDuplicateExports(e,r.name)}else if("VariableDeclaration"===t.type)for(const e of t.declarations)this.checkDeclaration(e.id)}}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(T.DuplicateDefaultExport,e):this.raise(T.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;const n=this.isContextual(130),i=this.match(134),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const e=this.parseStringLiteral(this.state.value),t=Lt.exec(e.value);return t&&this.raise(T.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){const{specifiers:t}=e,r=1===t.length?t[0].type:null;if("source"===e.phase)"ImportDefaultSpecifier"!==r&&this.raise(T.SourcePhaseImportRequiresDefault,t[0].loc.start);else if("defer"===e.phase)"ImportNamespaceSpecifier"!==r&&this.raise(T.DeferImportRequiresNamespace,t[0].loc.start);else if(e.module){var n;"ImportDefaultSpecifier"!==r&&this.raise(T.ImportReflectionNotBinding,t[0].loc.start),(null==(n=e.assertions)?void 0:n.length)>0&&this.raise(T.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){const{specifiers:t}=e;if(null!=t){const e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(T.ImportJSONBindingNotDefault,e.loc.start)}}}isPotentialImportPhase(e){return!e&&(this.isContextual(105)||this.isContextual(97)||this.isContextual(127))}applyImportPhase(e,t,r,n){t||("module"===r?(this.expectPlugin("importReflection",n),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),"source"===r?(this.expectPlugin("sourcePhaseImports",n),e.phase="source"):"defer"===r?(this.expectPlugin("deferredImportEvaluation",n),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;const r=this.startNode(),n=this.parseIdentifierName(!0),{type:i}=this.state;return(K(i)?98!==i||102===this.lookaheadCharCode():12!==i)?(this.applyImportPhase(e,t,n,r.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(r,n))}isPrecedingIdImportPhase(e){const{type:t}=this.state;return Y(t)?98!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=8201){return this.checkLVal(e.local,{type:t},r),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);const e=[],t=new Set;do{if(this.match(8))break;const r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(T.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:n}),t.add(n),this.match(134)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(T.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){const e=[],t=new Set;do{const r=this.startNode();if(r.key=this.parseIdentifier(!0),"type"!==r.key.name&&this.raise(T.ModuleAttributeDifferentFromType,r.key),t.has(r.key.name)&&this.raise(T.ModuleAttributesWithDuplicateKeys,r.key,{key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(134))throw this.raise(T.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?(t=this.parseModuleAttributes(),this.addExtra(e,"deprecatedWithLegacySyntax",!0)):t=this.parseImportAttributes(),r=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.hasPlugin("importAssertions")||this.raise(T.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){const r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}return!!K(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){const t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(T.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const r=this.startNode(),n=this.match(134),i=this.isContextual(130);r.imported=this.parseModuleExportName();const s=this.parseImportSpecifier(r,n,"type"===e.importKind||"typeof"===e.importKind,i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,r,n,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{const{imported:r}=e;if(t)throw this.raise(T.ImportBindingIsString,e,{importName:r.value});this.checkReservedWord(r.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(r))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}class Rt extends Bt{constructor(e,t,r){const n=function(e){const t={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==e)return t;if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const r of Object.keys(t))null!=e[r]&&(t[r]=e[r]);if(1===t.startLine)null==e.startIndex&&t.startColumn>0?t.startIndex=t.startColumn:null==e.startColumn&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((null==e.startColumn||null==e.startIndex)&&null!=e.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if("commonjs"===t.sourceType){if(null!=e.allowAwaitOutsideFunction)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(null!=e.allowReturnOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(null!=e.allowNewTargetOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}(e);super(n,t),this.options=n,this.initializeScopes(),this.plugins=r,this.filename=n.sourceFilename,this.startIndex=n.startIndex;let i=0;n.allowAwaitOutsideFunction&&(i|=1),n.allowReturnOutsideFunction&&(i|=2),n.allowImportExportEverywhere&&(i|=8),n.allowSuperOutsideMethod&&(i|=16),n.allowUndeclaredExports&&(i|=64),n.allowNewTargetOutsideFunction&&(i|=4),n.allowYieldOutsideFunction&&(i|=32),n.ranges&&(i|=128),n.tokens&&(i|=256),n.createImportExpressions&&(i|=512),n.createParenthesizedExpressions&&(i|=1024),n.errorRecovery&&(i|=2048),n.attachComment&&(i|=4096),n.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return ge}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;const r=this.parseTopLevel(e,t);return r.errors=this.state.errors,r.comments.length=this.state.commentsLen,r}}!function(e){const t={};for(const r of Object.keys(e))t[r]=Z(e[r])}(V);const jt=new Map;t.YK=function(e,t){const r=function(e,t){let r=Rt;const n=new Map;if(null!=e&&e.plugins){for(const t of e.plugins){let e,r;"string"==typeof t?e=t:[e,r]=t,n.has(e)||n.set(e,r||{})}!function(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=e.get("decorators").decoratorsBeforeExport;if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const r=e.get("decorators").allowCallParenthesized;if(null!=r&&"boolean"!=typeof r)throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;const n=e.get("pipelineOperator").proposal;if(!It.includes(n)){const e=It.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if("hack"===n){var r;if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=e.get("pipelineOperator").topicToken;if(!Ct.includes(t)){const e=Ct.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&&"hash"===(null==(r=e.get("recordAndTuple"))?void 0:r.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}else if("smart"===n&&"hash"===(null==(t=e.get("recordAndTuple"))?void 0:t.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("deprecatedImportAssert")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if("may-2020"!==e.get("moduleAttributes").version)throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAssertions")&&e.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(e.has("deprecatedImportAssert")||e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax&&e.set("deprecatedImportAssert",{}),e.has("recordAndTuple")){const t=e.get("recordAndTuple").syntaxType;if(null!=t){const e=["hash","bar"];if(!e.includes(t))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+e.map((e=>`'${e}'`)).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(e.has("optionalChainingAssign")&&"2023-07"!==e.get("optionalChainingAssign").version)throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(e.has("discardBinding")&&"void"!==e.get("discardBinding").syntaxType)throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}(n),r=function(e){const t=[];for(const r of Nt)e.has(r)&&t.push(r);const r=t.join("|");let n=jt.get(r);if(!n){n=Rt;for(const e of t)n=_t[e](n);jt.set(r,n)}return n}(n)}return new r(e,t,n)}(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}},34228:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(18133);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var i=r(73019);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=r(18480);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var o=r(18744);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=r(38118);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var l=r(25857);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var p=r(56049);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var u=r(14058);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(68667);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var h=r(19845);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var d=r(86809);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}))},35108:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ALIAS_KEYS",{enumerable:!0,get:function(){return n.ALIAS_KEYS}}),Object.defineProperty(t,"BUILDER_KEYS",{enumerable:!0,get:function(){return n.BUILDER_KEYS}}),Object.defineProperty(t,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return s.DEPRECATED_ALIASES}}),Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return n.DEPRECATED_KEYS}}),Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return n.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(t,"NODE_FIELDS",{enumerable:!0,get:function(){return n.NODE_FIELDS}}),Object.defineProperty(t,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return n.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(t,"NODE_UNION_SHAPES__PRIVATE",{enumerable:!0,get:function(){return n.NODE_UNION_SHAPES__PRIVATE}}),Object.defineProperty(t,"PLACEHOLDERS",{enumerable:!0,get:function(){return i.PLACEHOLDERS}}),Object.defineProperty(t,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return i.PLACEHOLDERS_ALIAS}}),Object.defineProperty(t,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return i.PLACEHOLDERS_FLIPPED_ALIAS}}),t.TYPES=void 0,Object.defineProperty(t,"VISITOR_KEYS",{enumerable:!0,get:function(){return n.VISITOR_KEYS}}),r(8925),r(8794),r(57045),r(57350),r(97232),r(48457);var n=r(73261),i=r(85604),s=r(18214);Object.keys(s.DEPRECATED_ALIASES).forEach((e=>{n.FLIPPED_ALIAS_KEYS[e]=n.FLIPPED_ALIAS_KEYS[s.DEPRECATED_ALIASES[e]]}));for(const{types:e,set:t}of n.allExpandedTypes)for(const r of e){const e=n.FLIPPED_ALIAS_KEYS[r];e?e.forEach(t.add,t):t.add(r)}t.TYPES=[].concat(Object.keys(n.VISITOR_KEYS),Object.keys(n.FLIPPED_ALIAS_KEYS),Object.keys(n.DEPRECATED_KEYS))},35174:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("id"in e&&e.id)return{name:e.id.name,originalNode:e.id};let r,s="";if((0,n.isObjectProperty)(t,{value:e})?r=i(t):(0,n.isObjectMethod)(e)||(0,n.isClassMethod)(e)?(r=i(e),"get"===e.kind?s="get ":"set"===e.kind&&(s="set ")):(0,n.isVariableDeclarator)(t,{init:e})?r=t.id:(0,n.isAssignmentExpression)(t,{operator:"=",right:e})&&(r=t.left),!r)return null;const o=(0,n.isLiteral)(r)?function(e){return(0,n.isNullLiteral)(e)?"null":(0,n.isRegExpLiteral)(e)?`/${e.pattern}/${e.flags}`:(0,n.isTemplateLiteral)(e)?e.quasis.map((e=>e.value.raw)).join(""):void 0!==e.value?String(e.value):null}(r):(0,n.isIdentifier)(r)?r.name:(0,n.isPrivateName)(r)?r.id.name:null;return null==o?null:{name:s+o,originalNode:r}};var n=r(63555);function i(e){if(!e.computed||(0,n.isLiteral)(e.key))return e.key}},35228:(e,t,r)=>{var n=r(44775),i=r(25003);function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){var t;try{t=r(49888).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},s.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},s.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},35693:(e,t,r)=>{function n(e){if(e)throw e}r.d(t,{V:()=>n})},36173:(e,t,r)=>{var n=r(6617),i=/\s+/;t.triggerEvents=function(e,t){var r,n=-1,i=e.length,s=t[0],o=t[1],a=t[2];switch(t.length){case 0:for(;++n<i;)(r=e[n]).callback.call(r.ctx);return;case 1:for(;++n<i;)(r=e[n]).callback.call(r.ctx,s);return;case 2:for(;++n<i;)(r=e[n]).callback.call(r.ctx,s,o);return;case 3:for(;++n<i;)(r=e[n]).callback.call(r.ctx,s,o,a);return;default:for(;++n<i;)(r=e[n]).callback.apply(r.ctx,t);return}},t.eventsApi=function(e,t,r,n){if(!r)return!0;if("object"==typeof r){for(var s in r)e[t].apply(e,[s,r[s]].concat(n));return!1}if(i.test(r)){for(var o=r.split(i),a=0,l=o.length;a<l;a++)e[t].apply(e,[o[a]].concat(n));return!1}return!0},t.createListenMethod=function(e){return function(t,r,i){if(!t)throw new Error("Trying to listenTo event: '"+r+"' but the target object is undefined");if((this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=n("l"))]=t,i||"object"!=typeof r||(i=this),"function"!=typeof t[e])throw new Error("Trying to listenTo event: '"+r+"' on object: "+t.toString()+" but it does not have an 'on' method so is unbindable");return t[e](r,i,this),this}}},36306:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenContext=void 0,t.isLastChild=function(e,t){const r=o[e.type];for(let n=r.length-1;n>=0;n--){const i=e[r[n]];if(i===t)return!0;if(Array.isArray(i)){let e=i.length-1;for(;e>=0&&null===i[e];)e--;return e>=0&&i[e]===t}if(i)return!1}return!1},t.parentNeedsParens=function(e,t,r){switch(r){case 112:if(t.callee===e&&a(e))return!0;break;case 42:return!(l(e)||"CallExpression"===e.type&&l(e.callee)||"ParenthesizedExpression"===e.type)}return!1};var n=r(6370),i=r(45741),s=r(85404);const{VISITOR_KEYS:o}=i;t.TokenContext={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};for(const e of Object.keys(n)){const t=n[e];s.generatorInfosMap.has(e)&&(s.generatorInfosMap.get(e)[2]=t)}function a(e){switch(e.type){case"CallExpression":return!0;case"MemberExpression":return a(e.object)}return!1}function l(e){switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&"Identifier"===e.property.type&&l(e.object);default:return!1}}},36464:(e,t,r)=>{var n=r(72994).Token,i=r(48898).ParseTreeListener,s=r(32141).f,o=r(24429).$,a=r(36575).ATNDeserializer,l=r(44529).$,p=r(48898).TerminalNode,u=r(48898).ErrorNode;function c(e){return i.call(this),this.parser=e,this}function h(e){return s.call(this),this._input=null,this._errHandler=new o,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(e),this}c.prototype=Object.create(i.prototype),c.prototype.constructor=c,c.prototype.enterEveryRule=function(e){console.log("enter "+this.parser.ruleNames[e.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)},c.prototype.visitTerminal=function(e){console.log("consume "+e.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])},c.prototype.exitEveryRule=function(e){console.log("exit "+this.parser.ruleNames[e.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)},h.prototype=Object.create(s.prototype),h.prototype.contructor=h,h.bypassAltsAtnCache={},h.prototype.reset=function(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()},h.prototype.match=function(e){var t=this.getCurrentToken();return t.type===e?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t},h.prototype.matchWildcard=function(){var e=this.getCurrentToken();return e.type>0?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this._buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e},h.prototype.getParseListeners=function(){return this._parseListeners||[]},h.prototype.addParseListener=function(e){if(null===e)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(e)},h.prototype.removeParseListener=function(e){if(null!==this._parseListeners){var t=this._parseListeners.indexOf(e);t>=0&&this._parseListeners.splice(t,1),0===this._parseListeners.length&&(this._parseListeners=null)}},h.prototype.removeParseListeners=function(){this._parseListeners=null},h.prototype.triggerEnterRuleEvent=function(){if(null!==this._parseListeners){var e=this._ctx;this._parseListeners.map((function(t){t.enterEveryRule(e),e.enterRule(t)}))}},h.prototype.triggerExitRuleEvent=function(){if(null!==this._parseListeners){var e=this._ctx;this._parseListeners.slice(0).reverse().map((function(t){e.exitRule(t),t.exitEveryRule(e)}))}},h.prototype.getTokenFactory=function(){return this._input.tokenSource._factory},h.prototype.setTokenFactory=function(e){this._input.tokenSource._factory=e},h.prototype.getATNWithBypassAlts=function(){var e=this.getSerializedATN();if(null===e)throw"The current parser does not support an ATN with bypass alternatives.";var t=this.bypassAltsAtnCache[e];if(null===t){var r=new l;r.generateRuleBypassTransitions=!0,t=new a(r).deserialize(e),this.bypassAltsAtnCache[e]=t}return t};var d=r(18393).Lexer;h.prototype.compileParseTreePattern=function(e,t,r){if(null===(r=r||null)&&null!==this.getTokenStream()){var n=this.getTokenStream().tokenSource;n instanceof d&&(r=n)}if(null===r)throw"Parser can't discover a lexer to use";return new ParseTreePatternMatcher(r,this).compile(e,t)},h.prototype.getInputStream=function(){return this.getTokenStream()},h.prototype.setInputStream=function(e){this.setTokenStream(e)},h.prototype.getTokenStream=function(){return this._input},h.prototype.setTokenStream=function(e){this._input=null,this.reset(),this._input=e},h.prototype.getCurrentToken=function(){return this._input.LT(1)},h.prototype.notifyErrorListeners=function(e,t,r){r=r||null,null===(t=t||null)&&(t=this.getCurrentToken()),this._syntaxErrors+=1;var n=t.line,i=t.column;this.getErrorListenerDispatch().syntaxError(this,t,n,i,e,r)},h.prototype.consume=function(){var e=this.getCurrentToken();e.type!==n.EOF&&this.getInputStream().consume();var t,r=null!==this._parseListeners&&this._parseListeners.length>0;return(this.buildParseTrees||r)&&((t=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(e):this._ctx.addTokenNode(e)).invokingState=this.state,r&&this._parseListeners.map((function(e){t instanceof u||void 0!==t.isErrorNode&&t.isErrorNode()?e.visitErrorNode(t):t instanceof p&&e.visitTerminal(t)}))),e},h.prototype.addContextToParseTree=function(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)},h.prototype.enterRule=function(e,t,r){this.state=t,this._ctx=e,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),null!==this._parseListeners&&this.triggerEnterRuleEvent()},h.prototype.exitRule=function(){this._ctx.stop=this._input.LT(-1),null!==this._parseListeners&&this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx},h.prototype.enterOuterAlt=function(e,t){e.setAltNumber(t),this.buildParseTrees&&this._ctx!==e&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(e)),this._ctx=e},h.prototype.getPrecedence=function(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]},h.prototype.enterRecursionRule=function(e,t,r,n){this.state=t,this._precedenceStack.push(n),this._ctx=e,this._ctx.start=this._input.LT(1),null!==this._parseListeners&&this.triggerEnterRuleEvent()},h.prototype.pushNewRecursionContext=function(e,t,r){var n=this._ctx;n.parentCtx=e,n.invokingState=t,n.stop=this._input.LT(-1),this._ctx=e,this._ctx.start=n.start,this.buildParseTrees&&this._ctx.addChild(n),null!==this._parseListeners&&this.triggerEnterRuleEvent()},h.prototype.unrollRecursionContexts=function(e){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);var t=this._ctx;if(null!==this._parseListeners)for(;this._ctx!==e;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=e;t.parentCtx=e,this.buildParseTrees&&null!==e&&e.addChild(t)},h.prototype.getInvokingContext=function(e){for(var t=this._ctx;null!==t;){if(t.ruleIndex===e)return t;t=t.parentCtx}return null},h.prototype.precpred=function(e,t){return t>=this._precedenceStack[this._precedenceStack.length-1]},h.prototype.inContext=function(e){return!1},h.prototype.isExpectedToken=function(e){var t=this._interp.atn,r=this._ctx,i=t.states[this.state],s=t.nextTokens(i);if(s.contains(e))return!0;if(!s.contains(n.EPSILON))return!1;for(;null!==r&&r.invokingState>=0&&s.contains(n.EPSILON);){var o=t.states[r.invokingState].transitions[0];if((s=t.nextTokens(o.followState)).contains(e))return!0;r=r.parentCtx}return!(!s.contains(n.EPSILON)||e!==n.EOF)},h.prototype.getExpectedTokens=function(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)},h.prototype.getExpectedTokensWithinCurrentRule=function(){var e=this._interp.atn,t=e.states[this.state];return e.nextTokens(t)},h.prototype.getRuleIndex=function(e){var t=this.getRuleIndexMap()[e];return null!==t?t:-1},h.prototype.getRuleInvocationStack=function(e){null===(e=e||null)&&(e=this._ctx);for(var t=[];null!==e;){var r=e.ruleIndex;r<0?t.push("n/a"):t.push(this.ruleNames[r]),e=e.parentCtx}return t},h.prototype.getDFAStrings=function(){return this._interp.decisionToDFA.toString()},h.prototype.dumpDFA=function(){for(var e=!1,t=0;t<this._interp.decisionToDFA.length;t++){var r=this._interp.decisionToDFA[t];r.states.length>0&&(e&&console.log(),this.printer.println("Decision "+r.decision+":"),this.printer.print(r.toString(this.literalNames,this.symbolicNames)),e=!0)}},h.prototype.getSourceName=function(){return this._input.sourceName},h.prototype.setTrace=function(e){e?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new c(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)},t.Parser=h},36560:(e,t,r)=>{function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{A:()=>o});var i=r(16397);function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(s())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&(0,i.A)(o,r.prototype),o}(e,arguments,n(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(r,e)},o(e)}},36575:(e,t,r)=>{var n=r(72994).Token,i=r(51028).ATN,s=r(51596).E,o=r(81367),a=o.ATNState,l=o.BasicState,p=o.DecisionState,u=o.BlockStartState,c=o.BlockEndState,h=o.LoopEndState,d=o.RuleStartState,f=o.RuleStopState,m=o.TokensStartState,y=o.PlusLoopbackState,g=o.StarLoopbackState,T=o.StarLoopEntryState,v=o.PlusBlockStartState,b=o.StarBlockStartState,S=o.BasicBlockStartState,x=r(10014),E=x.Transition,w=x.AtomTransition,A=x.SetTransition,P=x.NotSetTransition,I=x.RuleTransition,C=x.RangeTransition,_=x.ActionTransition,N=x.EpsilonTransition,k=x.WildcardTransition,O=x.PredicateTransition,M=x.PrecedencePredicateTransition,L=r(70040).m,D=(r(70040).Interval,r(44529).$),B=r(56645),R=B.LexerActionType,j=B.LexerSkipAction,F=B.LexerChannelAction,U=B.LexerCustomAction,q=B.LexerMoreAction,V=B.LexerTypeAction,Y=B.LexerPushModeAction,K=B.LexerPopModeAction,$=B.LexerModeAction,z="59627784-3BE5-417A-B9EB-8131A7286089",J=["AADB8D7E-AEEF-4415-AD2B-8204D6CF042E",z],H=z;function X(e,t){var r=[];return r[e-1]=t,r.map((function(e){return t}))}function W(e){return null==e&&(e=D.defaultOptions),this.deserializationOptions=e,this.stateFactories=null,this.actionFactories=null,this}W.prototype.isFeatureSupported=function(e,t){var r=J.indexOf(e);return!(r<0)&&J.indexOf(t)>=r},W.prototype.deserialize=function(e){this.reset(e),this.checkVersion(),this.checkUUID();var t=this.readATN();this.readStates(t),this.readRules(t),this.readModes(t);var r=[];return this.readSets(t,r,this.readInt.bind(this)),this.isFeatureSupported(z,this.uuid)&&this.readSets(t,r,this.readInt32.bind(this)),this.readEdges(t,r),this.readDecisions(t),this.readLexerActions(t),this.markPrecedenceDecisions(t),this.verifyATN(t),this.deserializationOptions.generateRuleBypassTransitions&&t.grammarType===s.PARSER&&(this.generateRuleBypassTransitions(t),this.verifyATN(t)),t},W.prototype.reset=function(e){var t=e.split("").map((function(e){var t=e.charCodeAt(0);return t>1?t-2:t+65533}));t[0]=e.charCodeAt(0),this.data=t,this.pos=0},W.prototype.checkVersion=function(){var e=this.readInt();if(3!==e)throw"Could not deserialize ATN with version "+e+" (expected 3)."},W.prototype.checkUUID=function(){var e=this.readUUID();if(J.indexOf(e)<0)throw H;this.uuid=e},W.prototype.readATN=function(){var e=this.readInt(),t=this.readInt();return new i(e,t)},W.prototype.readStates=function(e){for(var t,r,n,i=[],s=[],o=this.readInt(),l=0;l<o;l++){var p=this.readInt();if(p!==a.INVALID_TYPE){var c=this.readInt();65535===c&&(c=-1);var h=this.stateFactory(p,c);if(p===a.LOOP_END){var d=this.readInt();i.push([h,d])}else if(h instanceof u){var f=this.readInt();s.push([h,f])}e.addState(h)}else e.addState(null)}for(t=0;t<i.length;t++)(r=i[t])[0].loopBackState=e.states[r[1]];for(t=0;t<s.length;t++)(r=s[t])[0].endState=e.states[r[1]];var m=this.readInt();for(t=0;t<m;t++)n=this.readInt(),e.states[n].nonGreedy=!0;var y=this.readInt();for(t=0;t<y;t++)n=this.readInt(),e.states[n].isPrecedenceRule=!0},W.prototype.readRules=function(e){var t,r=this.readInt();for(e.grammarType===s.LEXER&&(e.ruleToTokenType=X(r,0)),e.ruleToStartState=X(r,0),t=0;t<r;t++){var i=this.readInt(),o=e.states[i];if(e.ruleToStartState[t]=o,e.grammarType===s.LEXER){var a=this.readInt();65535===a&&(a=n.EOF),e.ruleToTokenType[t]=a}}for(e.ruleToStopState=X(r,0),t=0;t<e.states.length;t++){var l=e.states[t];l instanceof f&&(e.ruleToStopState[l.ruleIndex]=l,e.ruleToStartState[l.ruleIndex].stopState=l)}},W.prototype.readModes=function(e){for(var t=this.readInt(),r=0;r<t;r++){var n=this.readInt();e.modeToStartState.push(e.states[n])}},W.prototype.readSets=function(e,t,r){for(var n=this.readInt(),i=0;i<n;i++){var s=new L;t.push(s);var o=this.readInt();0!==this.readInt()&&s.addOne(-1);for(var a=0;a<o;a++){var l=r(),p=r();s.addRange(l,p)}}},W.prototype.readEdges=function(e,t){var r,n,i,s,o,a=this.readInt();for(r=0;r<a;r++){var l=this.readInt(),p=this.readInt(),c=this.readInt(),h=this.readInt(),d=this.readInt(),f=this.readInt();s=this.edgeFactory(e,c,l,p,h,d,f,t),e.states[l].addTransition(s)}for(r=0;r<e.states.length;r++)for(i=e.states[r],n=0;n<i.transitions.length;n++){var m=i.transitions[n];if(m instanceof I){var b=-1;e.ruleToStartState[m.target.ruleIndex].isPrecedenceRule&&0===m.precedence&&(b=m.target.ruleIndex),s=new N(m.followState,b),e.ruleToStopState[m.target.ruleIndex].addTransition(s)}}for(r=0;r<e.states.length;r++){if((i=e.states[r])instanceof u){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof y)for(n=0;n<i.transitions.length;n++)(o=i.transitions[n].target)instanceof v&&(o.loopBackState=i);else if(i instanceof g)for(n=0;n<i.transitions.length;n++)(o=i.transitions[n].target)instanceof T&&(o.loopBackState=i)}},W.prototype.readDecisions=function(e){for(var t=this.readInt(),r=0;r<t;r++){var n=this.readInt(),i=e.states[n];e.decisionToState.push(i),i.decision=r}},W.prototype.readLexerActions=function(e){if(e.grammarType===s.LEXER){var t=this.readInt();e.lexerActions=X(t,null);for(var r=0;r<t;r++){var n=this.readInt(),i=this.readInt();65535===i&&(i=-1);var o=this.readInt();65535===o&&(o=-1);var a=this.lexerActionFactory(n,i,o);e.lexerActions[r]=a}}},W.prototype.generateRuleBypassTransitions=function(e){var t,r=e.ruleToStartState.length;for(t=0;t<r;t++)e.ruleToTokenType[t]=e.maxTokenType+t+1;for(t=0;t<r;t++)this.generateRuleBypassTransition(e,t)},W.prototype.generateRuleBypassTransition=function(e,t){var r,n,i=new S;i.ruleIndex=t,e.addState(i);var s=new c;s.ruleIndex=t,e.addState(s),i.endState=s,e.defineDecisionState(i),s.startState=i;var o=null,a=null;if(e.ruleToStartState[t].isPrecedenceRule){for(a=null,r=0;r<e.states.length;r++)if(n=e.states[r],this.stateIsEndStateFor(n,t)){a=n,o=n.loopBackState.transitions[0];break}if(null===o)throw"Couldn't identify final state of the precedence rule prefix section."}else a=e.ruleToStopState[t];for(r=0;r<e.states.length;r++){n=e.states[r];for(var p=0;p<n.transitions.length;p++){var u=n.transitions[p];u!==o&&u.target===a&&(u.target=s)}}for(var h=e.ruleToStartState[t],d=h.transitions.length;d>0;)i.addTransition(h.transitions[d-1]),h.transitions=h.transitions.slice(-1);e.ruleToStartState[t].addTransition(new N(i)),s.addTransition(new N(a));var f=new l;e.addState(f),f.addTransition(new w(s,e.ruleToTokenType[t])),i.addTransition(new N(f))},W.prototype.stateIsEndStateFor=function(e,t){if(e.ruleIndex!==t)return null;if(!(e instanceof T))return null;var r=e.transitions[e.transitions.length-1].target;return r instanceof h&&r.epsilonOnlyTransitions&&r.transitions[0].target instanceof f?e:null},W.prototype.markPrecedenceDecisions=function(e){for(var t=0;t<e.states.length;t++){var r=e.states[t];if(r instanceof T&&e.ruleToStartState[r.ruleIndex].isPrecedenceRule){var n=r.transitions[r.transitions.length-1].target;n instanceof h&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof f&&(r.isPrecedenceDecision=!0)}}},W.prototype.verifyATN=function(e){if(this.deserializationOptions.verifyATN)for(var t=0;t<e.states.length;t++){var r=e.states[t];if(null!==r)if(this.checkCondition(r.epsilonOnlyTransitions||r.transitions.length<=1),r instanceof v)this.checkCondition(null!==r.loopBackState);else if(r instanceof T)if(this.checkCondition(null!==r.loopBackState),this.checkCondition(2===r.transitions.length),r.transitions[0].target instanceof b)this.checkCondition(r.transitions[1].target instanceof h),this.checkCondition(!r.nonGreedy);else{if(!(r.transitions[0].target instanceof h))throw"IllegalState";this.checkCondition(r.transitions[1].target instanceof b),this.checkCondition(r.nonGreedy)}else r instanceof g?(this.checkCondition(1===r.transitions.length),this.checkCondition(r.transitions[0].target instanceof T)):r instanceof h?this.checkCondition(null!==r.loopBackState):r instanceof d?this.checkCondition(null!==r.stopState):r instanceof u?this.checkCondition(null!==r.endState):r instanceof c?this.checkCondition(null!==r.startState):r instanceof p?this.checkCondition(r.transitions.length<=1||r.decision>=0):this.checkCondition(r.transitions.length<=1||r instanceof f)}},W.prototype.checkCondition=function(e,t){if(!e)throw null==t&&(t="IllegalState"),t},W.prototype.readInt=function(){return this.data[this.pos++]},W.prototype.readInt32=function(){return this.readInt()|this.readInt()<<16},W.prototype.readLong=function(){return 4294967295&this.readInt32()|this.readInt32()<<32};var G=function(){for(var e=[],t=0;t<256;t++)e[t]=(t+256).toString(16).substr(1).toUpperCase();return e}();W.prototype.readUUID=function(){for(var e=[],t=7;t>=0;t--){var r=this.readInt();e[2*t+1]=255&r,e[2*t]=r>>8&255}return G[e[0]]+G[e[1]]+G[e[2]]+G[e[3]]+"-"+G[e[4]]+G[e[5]]+"-"+G[e[6]]+G[e[7]]+"-"+G[e[8]]+G[e[9]]+"-"+G[e[10]]+G[e[11]]+G[e[12]]+G[e[13]]+G[e[14]]+G[e[15]]},W.prototype.edgeFactory=function(e,t,r,i,s,o,a,l){var p=e.states[i];switch(t){case E.EPSILON:return new N(p);case E.RANGE:return new C(p,0!==a?n.EOF:s,o);case E.RULE:return new I(e.states[s],o,a,p);case E.PREDICATE:return new O(p,s,o,0!==a);case E.PRECEDENCE:return new M(p,s);case E.ATOM:return new w(p,0!==a?n.EOF:s);case E.ACTION:return new _(p,s,o,0!==a);case E.SET:return new A(p,l[s]);case E.NOT_SET:return new P(p,l[s]);case E.WILDCARD:return new k(p);default:throw"The specified transition type: "+t+" is not valid."}},W.prototype.stateFactory=function(e,t){if(null===this.stateFactories){var r=[];r[a.INVALID_TYPE]=null,r[a.BASIC]=function(){return new l},r[a.RULE_START]=function(){return new d},r[a.BLOCK_START]=function(){return new S},r[a.PLUS_BLOCK_START]=function(){return new v},r[a.STAR_BLOCK_START]=function(){return new b},r[a.TOKEN_START]=function(){return new m},r[a.RULE_STOP]=function(){return new f},r[a.BLOCK_END]=function(){return new c},r[a.STAR_LOOP_BACK]=function(){return new g},r[a.STAR_LOOP_ENTRY]=function(){return new T},r[a.PLUS_LOOP_BACK]=function(){return new y},r[a.LOOP_END]=function(){return new h},this.stateFactories=r}if(e>this.stateFactories.length||null===this.stateFactories[e])throw"The specified state type "+e+" is not valid.";var n=this.stateFactories[e]();if(null!==n)return n.ruleIndex=t,n},W.prototype.lexerActionFactory=function(e,t,r){if(null===this.actionFactories){var n=[];n[R.CHANNEL]=function(e,t){return new F(e)},n[R.CUSTOM]=function(e,t){return new U(e,t)},n[R.MODE]=function(e,t){return new $(e)},n[R.MORE]=function(e,t){return q.INSTANCE},n[R.POP_MODE]=function(e,t){return K.INSTANCE},n[R.PUSH_MODE]=function(e,t){return new Y(e)},n[R.SKIP]=function(e,t){return j.INSTANCE},n[R.TYPE]=function(e,t){return new V(e)},this.actionFactories=n}if(e>this.actionFactories.length||null===this.actionFactories[e])throw"The specified lexer action type "+e+" is not valid.";return this.actionFactories[e](t,r)},t.ATNDeserializer=W},36646:e=>{e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},37254:(e,t,r)=>{var n=r(55128).Reporter,i=r(55128).EncoderBuffer,s=r(55128).DecoderBuffer,o=r(14012),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function p(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=p;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];p.prototype.clone=function(){var e=this._baseState,t={};u.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},p.prototype._wrap=function(){var e=this._baseState;l.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},p.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},p.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(o(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){p.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){p.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(r),this}})),p.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},p.prototype.optional=function(){return this._baseState.optional=!0,this},p.prototype.def=function(e){var t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},p.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},p.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},p.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},p.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},p.prototype.any=function(){return this._baseState.any=!0,this},p.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},p.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},p.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){var l=null;if(null!==r.explicit?l=r.explicit:null!==r.implicit?l=r.implicit:null!==r.tag&&(l=r.tag),null!==l||r.any){if(o=this._peekTag(e,l,r.any),e.isError(o))return o}else{var p=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(p)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var u=this._decodeTag(e,r.explicit);if(e.isError(u))return u;e=u}var c=e.offset;if(null===r.use&&null===r.choice){r.any&&(p=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(p):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),c,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new s(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},p.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},p.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),o(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},p.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(s){var o=e.save(),a=r.choice[s];try{var l=a._decode(e,t);if(e.isError(l))return!1;n={type:s,value:l},i=!0}catch(t){return e.restore(o),!1}return!0}),this),i?n:e.error("Choice not matched")},p.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},p.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},p.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var s=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var o=null,a=!1;if(i.any)s=this._createEncoderBuffer(e);else if(i.choice)s=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,r)._encode(e,t),a=!0;else if(i.children)o=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var l=this.clone();l._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),l))}else null!==i.use?s=this._getUse(i.use,r)._encode(e,t):(o=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){var p=null!==i.implicit?i.implicit:i.tag,u=null===i.implicit?"universal":"context";null===p?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(s=this._encodeComposite(p,a,u,o))}return null!==i.explicit&&(s=this._encodeComposite(i.explicit,!1,"context",s)),s},p.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},p.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},p.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},p.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},37524:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e,i.default,t),e};var n=r(49114),i=r(65830)},38052:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return n.COMMENT_KEYS.forEach((t=>{e[t]=null})),e};var n=r(62811)},38118:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowFunctionExpression=function(e,t){e.async&&(this.word("async",!0),this.space()),c.call(this,e)?o.call(this,e,!0,void 0,this._buf._map?t:void 0):this.print(e.params[0],!0),p.call(this,e,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=i.TokenContext.arrowBody,this.print(e.body)},t.FunctionDeclaration=t.FunctionExpression=function(e,t){u.call(this,e,t,!0),this.space(),this.print(e.body)},t._functionHead=u,t._methodHead=function(e){const t=e.kind,r=e.key;"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async",!0),this.space()),"method"!==t&&"init"!==t||e.generator&&this.tokenChar(42),e.computed?(this.tokenChar(91),this.print(r),this.tokenChar(93)):this.print(r),e.optional&&this.tokenChar(63),this._buf._map?o.call(this,e,!1,e.computed&&"StringLiteral"!==e.key.type?void 0:e.key):o.call(this,e,!1)},t._param=l,t._parameters=a,t._params=o,t._predicate=p,t._shouldPrintArrowParamsParens=c;var n=r(45741),i=r(36306);const{isIdentifier:s}=n;function o(e,t,r,n){if(this.print(e.typeParameters),void 0!==r||void 0!==n){const e=h.call(this,r,n);e&&this.sourceIdentifierName(e.name,e.pos)}this.tokenChar(40),a.call(this,e.params,41),this.print(e.returnType,t),this._noLineTerminator=t}function a(e,t){const r=this.enterDelimited(),n=this.shouldPrintTrailingComma(t),i=e.length;for(let t=0;t<i;t++)l.call(this,e[t]),(n||t<i-1)&&(this.tokenChar(44,t),this.space());this.tokenChar(t),this._noLineTerminatorAfterNode=r}function l(e){this.printJoin(e.decorators,void 0,void 0,void 0,void 0,!0),this.print(e,void 0,!0),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation,void 0,!0)}function p(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function u(e,t,r){e.async&&(this.word("async"),this.format.preserveFormat||(this._innerCommentsState=0),this.space()),this.word("function"),e.generator&&(this.format.preserveFormat||(this._innerCommentsState=0),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._buf._map?o.call(this,e,!1,e.id,t):o.call(this,e,!1),r&&p.call(this,e)}function c(e){var t,r;if(1!==e.params.length)return!0;if(e.typeParameters||e.returnType||e.predicate)return!0;const n=e.params[0];if(!s(n)||n.typeAnnotation||n.optional||null!=(t=n.leadingComments)&&t.length||null!=(r=n.trailingComments)&&r.length)return!0;if(this.tokenMap){if(null==e.loc)return!0;if(null!==this.tokenMap.findMatching(e,"("))return!0;const t=this.tokenMap.findMatching(e,"=>");return null==(null==t?void 0:t.loc)||t.loc.start.line!==e.loc.start.line}return!!this.format.retainLines}function h(e,t){let r,n=e;if(!n&&t){const e=t.type;"VariableDeclarator"===e?n=t.id:"AssignmentExpression"===e||"AssignmentPattern"===e?n=t.left:"ObjectProperty"===e||"ClassProperty"===e?t.computed&&"StringLiteral"!==t.key.type||(n=t.key):"ClassPrivateProperty"!==e&&"ClassAccessorProperty"!==e||(n=t.key)}if(n){var i,s;if("Identifier"===n.type)r={pos:null==(i=n.loc)?void 0:i.start,name:(null==(s=n.loc)?void 0:s.identifierName)||n.name};else if("PrivateName"===n.type){var o;r={pos:null==(o=n.loc)?void 0:o.start,name:"#"+n.id.name}}else if("StringLiteral"===n.type){var a;r={pos:null==(a=n.loc)?void 0:a.start,name:n.value}}return r}}},39418:e=>{e.exports=function(e,t){var r=e.length,n=e.indexOf(t)+1;return n>r-1&&(n=0),e[n]}},39517:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(63555),i=r(82208);t.default=function(e,t){if((0,n.isStatement)(e))return e;let r,s=!1;if((0,n.isClass)(e))s=!0,r="ClassDeclaration";else if((0,n.isFunction)(e))s=!0,r="FunctionDeclaration";else if((0,n.isAssignmentExpression)(e))return(0,i.expressionStatement)(e);if(s&&!e.id&&(r=!1),!r){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=r,e}},40453:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;if(null==e)return!1;if(n.ALIAS_KEYS[t])return!1;const r=n.FLIPPED_ALIAS_KEYS[t];return!(null==r||!r.includes(e))};var n=r(35108)},40846:(e,t,r)=>{var n=r(48898).RuleNode,i=r(48898).INVALID_INTERVAL,s=r(51028).INVALID_ALT_NUMBER;function o(e,t){return n.call(this),this.parentCtx=e||null,this.invokingState=t||-1,this}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.depth=function(){for(var e=0,t=this;null!==t;)t=t.parentCtx,e+=1;return e},o.prototype.isEmpty=function(){return-1===this.invokingState},o.prototype.getSourceInterval=function(){return i},o.prototype.getRuleContext=function(){return this},o.prototype.getPayload=function(){return this},o.prototype.getText=function(){return 0===this.getChildCount()?"":this.children.map((function(e){return e.getText()})).join("")},o.prototype.getAltNumber=function(){return s},o.prototype.setAltNumber=function(e){},o.prototype.getChild=function(e){return null},o.prototype.getChildCount=function(){return 0},o.prototype.accept=function(e){return e.visitChildren(this)},t.m=o;var a=r(23438).Trees;o.prototype.toStringTree=function(e,t){return a.toStringTree(this,e,t)},o.prototype.toString=function(e,t){e=e||null,t=t||null;for(var r=this,n="[";null!==r&&r!==t;){if(null===e)r.isEmpty()||(n+=r.invokingState);else{var i=r.ruleIndex;n+=i>=0&&i<e.length?e[i]:""+i}null===r.parentCtx||null===e&&r.parentCtx.isEmpty()||(n+=" "),r=r.parentCtx}return n+"]"}},41175:(e,t,r)=>{var n=r(65994).process,i=r(10626);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=g;var o,a=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i.nextTick;g.WritableState=y;var l=Object.create(r(26571));l.inherits=r(25003);var p,u={deprecate:r(96208)},c=r(5372),h=r(58777).Buffer,d=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(89779);function m(){}function y(e,t){o=o||r(49837),e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var l=e.highWaterMark,p=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=l||0===l?l:n&&(p||0===p)?p:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(i.nextTick(s,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,s);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||b(e,r),n?a(v,e,r,o,s):v(e,r,o,s)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(e){if(o=o||r(49837),!(p.call(g,this)||this instanceof o))return new g(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function T(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function b(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,l=!0;r;)i[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;i.allBuffers=l,T(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var p=r.chunk,u=r.encoding,c=r.callback;if(T(e,t,!1,t.objectMode?1:p.length,p,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=S(t);return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(x,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}l.inherits(g,c),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&e&&e._writableState instanceof y}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var p=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},p?p.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,a,n,i,s);return l}(this,s,a,e,t,r)),o},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||b(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}},41207:(e,t,r)=>{var n=r(87264).Q,i=r(66346),s=i.Hash,o=i.Set;function a(e,t){return this.alt=t,this.pred=e,this}function l(e,t){return null===e&&(e=-1),null===t&&(t=new n),this.stateNumber=e,this.configs=t,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}a.prototype.toString=function(){return"("+this.pred+", "+this.alt+")"},l.prototype.getAltSet=function(){var e=new o;if(null!==this.configs)for(var t=0;t<this.configs.length;t++){var r=this.configs[t];e.add(r.alt)}return 0===e.length?null:e},l.prototype.equals=function(e){return this===e||e instanceof l&&this.configs.equals(e.configs)},l.prototype.toString=function(){var e=this.stateNumber+":"+this.configs;return this.isAcceptState&&(e+="=>",null!==this.predicates?e+=this.predicates:e+=this.prediction),e},l.prototype.hashCode=function(){var e=new s;return e.update(this.configs),this.isAcceptState&&(null!==this.predicates?e.update(this.predicates):e.update(this.prediction)),e.finish()},t.X=l,t.PredPrediction=a},41641:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];for(let r=0;r<e.children.length;r++){let s=e.children[r];(0,n.isJSXText)(s)?(0,i.default)(s,t):((0,n.isJSXExpressionContainer)(s)&&(s=s.expression),(0,n.isJSXEmptyExpression)(s)||t.push(s))}return t};var n=r(63555),i=r(95694)},42018:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,i.isSuper)(e.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return e.object=(0,n.memberExpression)(t,e.object),e};var n=r(82208),i=r(45741)},44304:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.isImportDefaultSpecifier)(e)||(0,n.isIdentifier)(e.imported||e.exported,{name:"default"})};var n=r(63555)},44504:(e,t,r)=>{var n=r(66840),i=r(10848),s=r(36802),o=r(30896),a=r(76966),l=[].slice;function p(e,t){if(t||(t={}),t.model&&(this.model=t.model),t.comparator&&(this.comparator=t.comparator),t.parent&&(this.parent=t.parent),!this.mainIndex){var r=this.model&&this.model.prototype&&this.model.prototype.idAttribute;this.mainIndex=r||"id"}this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,a({silent:!0},t))}a(p.prototype,n,{initialize:function(){},isModel:function(e){return this.model&&e instanceof this.model},add:function(e,t){return this.set(e,a({merge:!1,add:!0,remove:!1},t))},parse:function(e,t){return e},serialize:function(){return this.map((function(e){if(e.serialize)return e.serialize();var t={};return a(t,e),delete t.collection,t}))},toJSON:function(){return this.serialize()},set:function(e,t){(t=a({add:!0,remove:!0,merge:!0},t)).parse&&(e=this.parse(e,t));var r,n,i,o,l,p,u,c=!s(e);e=c?e?[e]:[]:e.slice();var h=t.at,d=this.comparator&&null==h&&!1!==t.sort,f="string"==typeof this.comparator?this.comparator:null,m=[],y=[],g={},T=t.add,v=t.merge,b=t.remove,S=!(d||!T||!b)&&[],x=this.model&&this.model.prototype||Object.prototype;for(p=0,u=e.length;p<u;p++){if(i=e[p]||{},this.isModel(i)?r=n=i:x.generateId?r=x.generateId(i):void 0===(r=i[this.mainIndex])&&this._isDerivedIndex(x)&&(r=x._derived[this.mainIndex].fn.call(i)),o=this.get(r))b&&(g[o.cid||o[this.mainIndex]]=!0),v&&(i=i===n?n.attributes:i,t.parse&&(i=o.parse(i,t)),o.set?(o.set(i,t),d&&!l&&o.hasChanged(f)&&(l=!0)):a(o,i)),e[p]=o;else if(T){if(!(n=e[p]=this._prepareModel(i,t)))continue;m.push(n),this._addReference(n,t)}(n=o||n)&&(S&&(n.isNew&&n.isNew()||!n[this.mainIndex]||!g[n.cid||n[this.mainIndex]])&&S.push(n),g[n[this.mainIndex]]=!0)}if(b){for(p=0,u=this.length;p<u;p++)g[(n=this.models[p]).cid||n[this.mainIndex]]||y.push(n);for(y.length&&this.remove(y,t),p=0,u=m.length;p<u;p++)this._index(m[p])}if(m.length||S&&S.length)if(d&&(l=!0),null!=h)for(p=0,u=m.length;p<u;p++)this.models.splice(h+p,0,m[p]);else{var E=S||m;for(p=0,u=E.length;p<u;p++)this.models.push(E[p])}if(l&&this.sort({silent:!0}),!t.silent){for(p=0,u=m.length;p<u;p++)(n=m[p]).trigger?n.trigger("add",n,this,t):this.trigger("add",n,this,t);(l||S&&S.length)&&this.trigger("sort",this,t)}return c?e[0]:e},get:function(e,t){if(null!=e){var r=this.mainIndex,n=this._indexes[t||r];return n&&(n[e]||void 0!==e[r]&&n[e[r]])||this._indexes.cid[e]||this._indexes.cid[e.cid]}},at:function(e){return this.models[e]},remove:function(e,t){var r,n,i,o,a=!s(e);for(t||(t={}),r=0,n=(e=a?[e]:l.call(e)).length;r<n;r++)(i=e[r]=this.get(e[r]))&&(this._deIndex(i),o=this.models.indexOf(i),this.models.splice(o,1),t.silent||(t.index=o,i.trigger?i.trigger("remove",i,this,t):this.trigger("remove",i,this,t)),this._removeReference(i,t));return a?e[0]:e},reset:function(e,t){t||(t={});for(var r=0,n=this.models.length;r<n;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,a({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},sort:function(e){var t=this;if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),"string"==typeof this.comparator?this.models.sort((function(e,r){return e.get?(e=e.get(t.comparator),r=r.get(t.comparator)):(e=e[t.comparator],r=r[t.comparator]),e>r||void 0===e?1:e<r||void 0===r?-1:0})):1===this.comparator.length?this.models.sort((function(e,r){return(e=t.comparator(e))>(r=t.comparator(r))||void 0===e?1:e<r||void 0===r?-1:0})):this.models.sort(o(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},_reset:function(){var e=l.call(this.indexes||[]),t=0;e.push(this.mainIndex),e.push("cid");var r=e.length;for(this.models=[],this._indexes={};t<r;t++)this._indexes[e[t]]={}},_prepareModel:function(e,t){if(!this.model)return e;if(this.isModel(e))return e.collection||(e.collection=this),e;(t=t?a({},t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_deIndex:function(e,t,r){var n;if(void 0===t)for(var i in this._indexes)n=e.hasOwnProperty(i)?e[i]:e.get&&e.get(i),delete this._indexes[i][n];else{if(void 0===this._indexes[t])throw new Error("Given attribute is not an index");delete this._indexes[t][r]}},_index:function(e,t){var r;if(void 0===t)for(var n in this._indexes)null!=(r=e.hasOwnProperty(n)?e[n]:e.get&&e.get(n))&&(this._indexes[n][r]=e);else{if(void 0===this._indexes[t])throw new Error("Given attribute is not an index");(r=e[t]||e.get&&e.get(t))&&(this._indexes[t][r]=e)}},_isDerivedIndex:function(e){return!(!e||"object"!=typeof e._derived)&&Object.keys(e._derived).indexOf(this.mainIndex)>=0},_addReference:function(e,t){this._index(e),e.collection||(e.collection=this),e.on&&e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,this._deIndex(e),e.off&&e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,r,n){var i=e.split(":")[0],s=e.split(":")[1];("add"!==i&&"remove"!==i||r===this)&&("destroy"===i&&this.remove(t,n),t&&"change"===i&&s&&this._indexes[s]&&(this._deIndex(t,s,t.previousAttributes()[s]),this._index(t,s)),this.trigger.apply(this,arguments))}}),Object.defineProperties(p.prototype,{length:{get:function(){return this.models.length}},isCollection:{get:function(){return!0}}}),["indexOf","lastIndexOf","every","some","forEach","map","filter","reduce","reduceRight"].forEach((function(e){p.prototype[e]=function(){return this.models[e].apply(this.models,arguments)}})),p.prototype.each=p.prototype.forEach,p.extend=i,e.exports=p},44529:(e,t)=>{function r(e){return void 0===e&&(e=null),this.readOnly=!1,this.verifyATN=null===e||e.verifyATN,this.generateRuleBypassTransitions=null!==e&&e.generateRuleBypassTransitions,this}r.defaultOptions=new r,r.defaultOptions.readOnly=!0,t.$=r},44775:(e,t,r)=>{var n=t;n.bignum=r(60581),n.define=r(35228).define,n.base=r(55128),n.constants=r(67966),n.decoders=r(32868),n.encoders=r(81324)},45080:(e,t,r)=>{var n=r(10441),i=r(11265),s=r(79696).Buffer,o=r(5339),a=r(84913),l=r(62053),p=r(23457);function u(e,t,r){a.call(this),this._cache=new h,this._cipher=new l.AES(t),this._prev=s.from(r),this._mode=e,this._autopadding=!0}r(25003)(u,a),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return s.concat(n)};var c=s.alloc(16,16);function h(){this.cache=s.allocUnsafe(0)}function d(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=s.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new o(a.module,t,r):"auth"===a.type?new i(a.module,t,r):new u(a.module,t,r)}u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=s.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return s.concat([this.cache,t])},t.createCipheriv=d,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=p(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},45741:(e,t,r)=>{var n=r(65994).process;Object.defineProperty(t,"__esModule",{value:!0});var i={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(t,"__internal__deprecationWarning",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(t,"addComment",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"addComments",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"appendToMemberExpression",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"assertNode",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"cloneDeep",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"cloneNode",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"cloneWithoutLoc",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"createFlowUnionType",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"createTSUnionType",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"ensureBlock",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,"getFunctionName",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(t,"inheritInnerComments",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"inheritLeadingComments",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"inheritTrailingComments",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(t,"inheritsComments",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"is",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(t,"isPlaceholderType",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(t,"isType",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(t,"isValidES3Identifier",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(t,"matchesPattern",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(t,"prependToMemberExpression",{enumerable:!0,get:function(){return q.default}}),t.react=void 0,Object.defineProperty(t,"removeComments",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"removeProperties",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(t,"removePropertiesDeep",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(t,"traverseFast",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return R.default}});var s=r(84579),o=r(79959),a=r(41641),l=r(17615),p=r(48051);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var u=r(93971),c=r(64008),h=r(89912),d=r(62062);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=r(82208);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var m=r(16938),y=r(16738),g=r(81339),T=r(63646),v=r(12520),b=r(15626),S=r(64697),x=r(25765),E=r(62563),w=r(60616),A=r(6057),P=r(38052),I=r(82129);Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var C=r(62811);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var _=r(89859),N=r(81625),k=r(78529),O=r(70470),M=r(17916),L=r(29221),D=r(65987),B=r(39517),R=r(59563),j=r(35108);Object.keys(j).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===j[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return j[e]}}))}));var F=r(55186),U=r(479),q=r(42018),V=r(65830),Y=r(37524),K=r(97884),$=r(55110),z=r(68830),J=r(61957),H=r(35174),X=r(6564);Object.keys(X).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===X[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return X[e]}}))}));var W=r(49114),G=r(3903),Z=r(23781),Q=r(77255),ee=r(73416),te=r(23153),re=r(62816),ne=r(25129),ie=r(47188),se=r(59892),oe=r(55354),ae=r(61625),le=r(44304),pe=r(40453),ue=r(56773),ce=r(26228),he=r(60124),de=r(68740),fe=r(59751),me=r(83872),ye=r(63555);Object.keys(ye).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===ye[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return ye[e]}}))}));var ge=r(74641),Te=r(713);t.react={isReactComponent:s.default,isCompatTag:o.default,buildChildren:a.default},t.toSequenceExpression=Te.default,n.env.BABEL_TYPES_8_BREAKING&&console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!")},47188:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){if("object"!=typeof t||"object"!=typeof r||null==t||null==r)return t===r;if(t.type!==r.type)return!1;const i=Object.keys(n.NODE_FIELDS[t.type]||t.type),s=n.VISITOR_KEYS[t.type];for(const n of i){const i=t[n],o=r[n];if(typeof i!=typeof o)return!1;if(null!=i||null!=o){if(null==i||null==o)return!1;if(Array.isArray(i)){if(!Array.isArray(o))return!1;if(i.length!==o.length)return!1;for(let t=0;t<i.length;t++)if(!e(i[t],o[t]))return!1}else if("object"!=typeof i||null!=s&&s.includes(n)){if(!e(i,o))return!1}else for(const e of Object.keys(i))if(i[e]!==o[e])return!1}}return!0};var n=r(35108)},47375:(e,t,r)=>{var n=r(72994).Token;function i(e,t){return this.name="<empty>",this.strdata=e,this.decodeToUnicodeCodePoints=t||!1,function(e){if(e._index=0,e.data=[],e.decodeToUnicodeCodePoints)for(var t=0;t<e.strdata.length;){var r=e.strdata.codePointAt(t);e.data.push(r),t+=r<=65535?1:2}else for(t=0;t<e.strdata.length;t++){var n=e.strdata.charCodeAt(t);e.data.push(n)}e._size=e.data.length}(this),this}r(51184),r(59198),Object.defineProperty(i.prototype,"index",{get:function(){return this._index}}),Object.defineProperty(i.prototype,"size",{get:function(){return this._size}}),i.prototype.reset=function(){this._index=0},i.prototype.consume=function(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1},i.prototype.LA=function(e){if(0===e)return 0;e<0&&(e+=1);var t=this._index+e-1;return t<0||t>=this._size?n.EOF:this.data[t]},i.prototype.LT=function(e){return this.LA(e)},i.prototype.mark=function(){return-1},i.prototype.release=function(e){},i.prototype.seek=function(e){e<=this._index?this._index=e:this._index=Math.min(e,this._size)},i.prototype.getText=function(e,t){if(t>=this._size&&(t=this._size-1),e>=this._size)return"";if(this.decodeToUnicodeCodePoints){for(var r="",n=e;n<=t;n++)r+=String.fromCodePoint(this.data[n]);return r}return this.strdata.slice(e,t+1)},i.prototype.toString=function(){return this.strdata},t.InputStream=i},48051:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertAccessor=function(e,t){s("Accessor",e,t)},t.assertAnyTypeAnnotation=function(e,t){s("AnyTypeAnnotation",e,t)},t.assertArgumentPlaceholder=function(e,t){s("ArgumentPlaceholder",e,t)},t.assertArrayExpression=function(e,t){s("ArrayExpression",e,t)},t.assertArrayPattern=function(e,t){s("ArrayPattern",e,t)},t.assertArrayTypeAnnotation=function(e,t){s("ArrayTypeAnnotation",e,t)},t.assertArrowFunctionExpression=function(e,t){s("ArrowFunctionExpression",e,t)},t.assertAssignmentExpression=function(e,t){s("AssignmentExpression",e,t)},t.assertAssignmentPattern=function(e,t){s("AssignmentPattern",e,t)},t.assertAwaitExpression=function(e,t){s("AwaitExpression",e,t)},t.assertBigIntLiteral=function(e,t){s("BigIntLiteral",e,t)},t.assertBinary=function(e,t){s("Binary",e,t)},t.assertBinaryExpression=function(e,t){s("BinaryExpression",e,t)},t.assertBindExpression=function(e,t){s("BindExpression",e,t)},t.assertBlock=function(e,t){s("Block",e,t)},t.assertBlockParent=function(e,t){s("BlockParent",e,t)},t.assertBlockStatement=function(e,t){s("BlockStatement",e,t)},t.assertBooleanLiteral=function(e,t){s("BooleanLiteral",e,t)},t.assertBooleanLiteralTypeAnnotation=function(e,t){s("BooleanLiteralTypeAnnotation",e,t)},t.assertBooleanTypeAnnotation=function(e,t){s("BooleanTypeAnnotation",e,t)},t.assertBreakStatement=function(e,t){s("BreakStatement",e,t)},t.assertCallExpression=function(e,t){s("CallExpression",e,t)},t.assertCatchClause=function(e,t){s("CatchClause",e,t)},t.assertClass=function(e,t){s("Class",e,t)},t.assertClassAccessorProperty=function(e,t){s("ClassAccessorProperty",e,t)},t.assertClassBody=function(e,t){s("ClassBody",e,t)},t.assertClassDeclaration=function(e,t){s("ClassDeclaration",e,t)},t.assertClassExpression=function(e,t){s("ClassExpression",e,t)},t.assertClassImplements=function(e,t){s("ClassImplements",e,t)},t.assertClassMethod=function(e,t){s("ClassMethod",e,t)},t.assertClassPrivateMethod=function(e,t){s("ClassPrivateMethod",e,t)},t.assertClassPrivateProperty=function(e,t){s("ClassPrivateProperty",e,t)},t.assertClassProperty=function(e,t){s("ClassProperty",e,t)},t.assertCompletionStatement=function(e,t){s("CompletionStatement",e,t)},t.assertConditional=function(e,t){s("Conditional",e,t)},t.assertConditionalExpression=function(e,t){s("ConditionalExpression",e,t)},t.assertContinueStatement=function(e,t){s("ContinueStatement",e,t)},t.assertDebuggerStatement=function(e,t){s("DebuggerStatement",e,t)},t.assertDecimalLiteral=function(e,t){s("DecimalLiteral",e,t)},t.assertDeclaration=function(e,t){s("Declaration",e,t)},t.assertDeclareClass=function(e,t){s("DeclareClass",e,t)},t.assertDeclareExportAllDeclaration=function(e,t){s("DeclareExportAllDeclaration",e,t)},t.assertDeclareExportDeclaration=function(e,t){s("DeclareExportDeclaration",e,t)},t.assertDeclareFunction=function(e,t){s("DeclareFunction",e,t)},t.assertDeclareInterface=function(e,t){s("DeclareInterface",e,t)},t.assertDeclareModule=function(e,t){s("DeclareModule",e,t)},t.assertDeclareModuleExports=function(e,t){s("DeclareModuleExports",e,t)},t.assertDeclareOpaqueType=function(e,t){s("DeclareOpaqueType",e,t)},t.assertDeclareTypeAlias=function(e,t){s("DeclareTypeAlias",e,t)},t.assertDeclareVariable=function(e,t){s("DeclareVariable",e,t)},t.assertDeclaredPredicate=function(e,t){s("DeclaredPredicate",e,t)},t.assertDecorator=function(e,t){s("Decorator",e,t)},t.assertDirective=function(e,t){s("Directive",e,t)},t.assertDirectiveLiteral=function(e,t){s("DirectiveLiteral",e,t)},t.assertDoExpression=function(e,t){s("DoExpression",e,t)},t.assertDoWhileStatement=function(e,t){s("DoWhileStatement",e,t)},t.assertEmptyStatement=function(e,t){s("EmptyStatement",e,t)},t.assertEmptyTypeAnnotation=function(e,t){s("EmptyTypeAnnotation",e,t)},t.assertEnumBody=function(e,t){s("EnumBody",e,t)},t.assertEnumBooleanBody=function(e,t){s("EnumBooleanBody",e,t)},t.assertEnumBooleanMember=function(e,t){s("EnumBooleanMember",e,t)},t.assertEnumDeclaration=function(e,t){s("EnumDeclaration",e,t)},t.assertEnumDefaultedMember=function(e,t){s("EnumDefaultedMember",e,t)},t.assertEnumMember=function(e,t){s("EnumMember",e,t)},t.assertEnumNumberBody=function(e,t){s("EnumNumberBody",e,t)},t.assertEnumNumberMember=function(e,t){s("EnumNumberMember",e,t)},t.assertEnumStringBody=function(e,t){s("EnumStringBody",e,t)},t.assertEnumStringMember=function(e,t){s("EnumStringMember",e,t)},t.assertEnumSymbolBody=function(e,t){s("EnumSymbolBody",e,t)},t.assertExistsTypeAnnotation=function(e,t){s("ExistsTypeAnnotation",e,t)},t.assertExportAllDeclaration=function(e,t){s("ExportAllDeclaration",e,t)},t.assertExportDeclaration=function(e,t){s("ExportDeclaration",e,t)},t.assertExportDefaultDeclaration=function(e,t){s("ExportDefaultDeclaration",e,t)},t.assertExportDefaultSpecifier=function(e,t){s("ExportDefaultSpecifier",e,t)},t.assertExportNamedDeclaration=function(e,t){s("ExportNamedDeclaration",e,t)},t.assertExportNamespaceSpecifier=function(e,t){s("ExportNamespaceSpecifier",e,t)},t.assertExportSpecifier=function(e,t){s("ExportSpecifier",e,t)},t.assertExpression=function(e,t){s("Expression",e,t)},t.assertExpressionStatement=function(e,t){s("ExpressionStatement",e,t)},t.assertExpressionWrapper=function(e,t){s("ExpressionWrapper",e,t)},t.assertFile=function(e,t){s("File",e,t)},t.assertFlow=function(e,t){s("Flow",e,t)},t.assertFlowBaseAnnotation=function(e,t){s("FlowBaseAnnotation",e,t)},t.assertFlowDeclaration=function(e,t){s("FlowDeclaration",e,t)},t.assertFlowPredicate=function(e,t){s("FlowPredicate",e,t)},t.assertFlowType=function(e,t){s("FlowType",e,t)},t.assertFor=function(e,t){s("For",e,t)},t.assertForInStatement=function(e,t){s("ForInStatement",e,t)},t.assertForOfStatement=function(e,t){s("ForOfStatement",e,t)},t.assertForStatement=function(e,t){s("ForStatement",e,t)},t.assertForXStatement=function(e,t){s("ForXStatement",e,t)},t.assertFunction=function(e,t){s("Function",e,t)},t.assertFunctionDeclaration=function(e,t){s("FunctionDeclaration",e,t)},t.assertFunctionExpression=function(e,t){s("FunctionExpression",e,t)},t.assertFunctionParameter=function(e,t){s("FunctionParameter",e,t)},t.assertFunctionParent=function(e,t){s("FunctionParent",e,t)},t.assertFunctionTypeAnnotation=function(e,t){s("FunctionTypeAnnotation",e,t)},t.assertFunctionTypeParam=function(e,t){s("FunctionTypeParam",e,t)},t.assertGenericTypeAnnotation=function(e,t){s("GenericTypeAnnotation",e,t)},t.assertIdentifier=function(e,t){s("Identifier",e,t)},t.assertIfStatement=function(e,t){s("IfStatement",e,t)},t.assertImmutable=function(e,t){s("Immutable",e,t)},t.assertImport=function(e,t){s("Import",e,t)},t.assertImportAttribute=function(e,t){s("ImportAttribute",e,t)},t.assertImportDeclaration=function(e,t){s("ImportDeclaration",e,t)},t.assertImportDefaultSpecifier=function(e,t){s("ImportDefaultSpecifier",e,t)},t.assertImportExpression=function(e,t){s("ImportExpression",e,t)},t.assertImportNamespaceSpecifier=function(e,t){s("ImportNamespaceSpecifier",e,t)},t.assertImportOrExportDeclaration=function(e,t){s("ImportOrExportDeclaration",e,t)},t.assertImportSpecifier=function(e,t){s("ImportSpecifier",e,t)},t.assertIndexedAccessType=function(e,t){s("IndexedAccessType",e,t)},t.assertInferredPredicate=function(e,t){s("InferredPredicate",e,t)},t.assertInterfaceDeclaration=function(e,t){s("InterfaceDeclaration",e,t)},t.assertInterfaceExtends=function(e,t){s("InterfaceExtends",e,t)},t.assertInterfaceTypeAnnotation=function(e,t){s("InterfaceTypeAnnotation",e,t)},t.assertInterpreterDirective=function(e,t){s("InterpreterDirective",e,t)},t.assertIntersectionTypeAnnotation=function(e,t){s("IntersectionTypeAnnotation",e,t)},t.assertJSX=function(e,t){s("JSX",e,t)},t.assertJSXAttribute=function(e,t){s("JSXAttribute",e,t)},t.assertJSXClosingElement=function(e,t){s("JSXClosingElement",e,t)},t.assertJSXClosingFragment=function(e,t){s("JSXClosingFragment",e,t)},t.assertJSXElement=function(e,t){s("JSXElement",e,t)},t.assertJSXEmptyExpression=function(e,t){s("JSXEmptyExpression",e,t)},t.assertJSXExpressionContainer=function(e,t){s("JSXExpressionContainer",e,t)},t.assertJSXFragment=function(e,t){s("JSXFragment",e,t)},t.assertJSXIdentifier=function(e,t){s("JSXIdentifier",e,t)},t.assertJSXMemberExpression=function(e,t){s("JSXMemberExpression",e,t)},t.assertJSXNamespacedName=function(e,t){s("JSXNamespacedName",e,t)},t.assertJSXOpeningElement=function(e,t){s("JSXOpeningElement",e,t)},t.assertJSXOpeningFragment=function(e,t){s("JSXOpeningFragment",e,t)},t.assertJSXSpreadAttribute=function(e,t){s("JSXSpreadAttribute",e,t)},t.assertJSXSpreadChild=function(e,t){s("JSXSpreadChild",e,t)},t.assertJSXText=function(e,t){s("JSXText",e,t)},t.assertLVal=function(e,t){s("LVal",e,t)},t.assertLabeledStatement=function(e,t){s("LabeledStatement",e,t)},t.assertLiteral=function(e,t){s("Literal",e,t)},t.assertLogicalExpression=function(e,t){s("LogicalExpression",e,t)},t.assertLoop=function(e,t){s("Loop",e,t)},t.assertMemberExpression=function(e,t){s("MemberExpression",e,t)},t.assertMetaProperty=function(e,t){s("MetaProperty",e,t)},t.assertMethod=function(e,t){s("Method",e,t)},t.assertMiscellaneous=function(e,t){s("Miscellaneous",e,t)},t.assertMixedTypeAnnotation=function(e,t){s("MixedTypeAnnotation",e,t)},t.assertModuleDeclaration=function(e,t){(0,i.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),s("ModuleDeclaration",e,t)},t.assertModuleExpression=function(e,t){s("ModuleExpression",e,t)},t.assertModuleSpecifier=function(e,t){s("ModuleSpecifier",e,t)},t.assertNewExpression=function(e,t){s("NewExpression",e,t)},t.assertNoop=function(e,t){s("Noop",e,t)},t.assertNullLiteral=function(e,t){s("NullLiteral",e,t)},t.assertNullLiteralTypeAnnotation=function(e,t){s("NullLiteralTypeAnnotation",e,t)},t.assertNullableTypeAnnotation=function(e,t){s("NullableTypeAnnotation",e,t)},t.assertNumberLiteral=function(e,t){(0,i.default)("assertNumberLiteral","assertNumericLiteral"),s("NumberLiteral",e,t)},t.assertNumberLiteralTypeAnnotation=function(e,t){s("NumberLiteralTypeAnnotation",e,t)},t.assertNumberTypeAnnotation=function(e,t){s("NumberTypeAnnotation",e,t)},t.assertNumericLiteral=function(e,t){s("NumericLiteral",e,t)},t.assertObjectExpression=function(e,t){s("ObjectExpression",e,t)},t.assertObjectMember=function(e,t){s("ObjectMember",e,t)},t.assertObjectMethod=function(e,t){s("ObjectMethod",e,t)},t.assertObjectPattern=function(e,t){s("ObjectPattern",e,t)},t.assertObjectProperty=function(e,t){s("ObjectProperty",e,t)},t.assertObjectTypeAnnotation=function(e,t){s("ObjectTypeAnnotation",e,t)},t.assertObjectTypeCallProperty=function(e,t){s("ObjectTypeCallProperty",e,t)},t.assertObjectTypeIndexer=function(e,t){s("ObjectTypeIndexer",e,t)},t.assertObjectTypeInternalSlot=function(e,t){s("ObjectTypeInternalSlot",e,t)},t.assertObjectTypeProperty=function(e,t){s("ObjectTypeProperty",e,t)},t.assertObjectTypeSpreadProperty=function(e,t){s("ObjectTypeSpreadProperty",e,t)},t.assertOpaqueType=function(e,t){s("OpaqueType",e,t)},t.assertOptionalCallExpression=function(e,t){s("OptionalCallExpression",e,t)},t.assertOptionalIndexedAccessType=function(e,t){s("OptionalIndexedAccessType",e,t)},t.assertOptionalMemberExpression=function(e,t){s("OptionalMemberExpression",e,t)},t.assertParenthesizedExpression=function(e,t){s("ParenthesizedExpression",e,t)},t.assertPattern=function(e,t){s("Pattern",e,t)},t.assertPatternLike=function(e,t){s("PatternLike",e,t)},t.assertPipelineBareFunction=function(e,t){s("PipelineBareFunction",e,t)},t.assertPipelinePrimaryTopicReference=function(e,t){s("PipelinePrimaryTopicReference",e,t)},t.assertPipelineTopicExpression=function(e,t){s("PipelineTopicExpression",e,t)},t.assertPlaceholder=function(e,t){s("Placeholder",e,t)},t.assertPrivate=function(e,t){s("Private",e,t)},t.assertPrivateName=function(e,t){s("PrivateName",e,t)},t.assertProgram=function(e,t){s("Program",e,t)},t.assertProperty=function(e,t){s("Property",e,t)},t.assertPureish=function(e,t){s("Pureish",e,t)},t.assertQualifiedTypeIdentifier=function(e,t){s("QualifiedTypeIdentifier",e,t)},t.assertRecordExpression=function(e,t){s("RecordExpression",e,t)},t.assertRegExpLiteral=function(e,t){s("RegExpLiteral",e,t)},t.assertRegexLiteral=function(e,t){(0,i.default)("assertRegexLiteral","assertRegExpLiteral"),s("RegexLiteral",e,t)},t.assertRestElement=function(e,t){s("RestElement",e,t)},t.assertRestProperty=function(e,t){(0,i.default)("assertRestProperty","assertRestElement"),s("RestProperty",e,t)},t.assertReturnStatement=function(e,t){s("ReturnStatement",e,t)},t.assertScopable=function(e,t){s("Scopable",e,t)},t.assertSequenceExpression=function(e,t){s("SequenceExpression",e,t)},t.assertSpreadElement=function(e,t){s("SpreadElement",e,t)},t.assertSpreadProperty=function(e,t){(0,i.default)("assertSpreadProperty","assertSpreadElement"),s("SpreadProperty",e,t)},t.assertStandardized=function(e,t){s("Standardized",e,t)},t.assertStatement=function(e,t){s("Statement",e,t)},t.assertStaticBlock=function(e,t){s("StaticBlock",e,t)},t.assertStringLiteral=function(e,t){s("StringLiteral",e,t)},t.assertStringLiteralTypeAnnotation=function(e,t){s("StringLiteralTypeAnnotation",e,t)},t.assertStringTypeAnnotation=function(e,t){s("StringTypeAnnotation",e,t)},t.assertSuper=function(e,t){s("Super",e,t)},t.assertSwitchCase=function(e,t){s("SwitchCase",e,t)},t.assertSwitchStatement=function(e,t){s("SwitchStatement",e,t)},t.assertSymbolTypeAnnotation=function(e,t){s("SymbolTypeAnnotation",e,t)},t.assertTSAnyKeyword=function(e,t){s("TSAnyKeyword",e,t)},t.assertTSArrayType=function(e,t){s("TSArrayType",e,t)},t.assertTSAsExpression=function(e,t){s("TSAsExpression",e,t)},t.assertTSBaseType=function(e,t){s("TSBaseType",e,t)},t.assertTSBigIntKeyword=function(e,t){s("TSBigIntKeyword",e,t)},t.assertTSBooleanKeyword=function(e,t){s("TSBooleanKeyword",e,t)},t.assertTSCallSignatureDeclaration=function(e,t){s("TSCallSignatureDeclaration",e,t)},t.assertTSConditionalType=function(e,t){s("TSConditionalType",e,t)},t.assertTSConstructSignatureDeclaration=function(e,t){s("TSConstructSignatureDeclaration",e,t)},t.assertTSConstructorType=function(e,t){s("TSConstructorType",e,t)},t.assertTSDeclareFunction=function(e,t){s("TSDeclareFunction",e,t)},t.assertTSDeclareMethod=function(e,t){s("TSDeclareMethod",e,t)},t.assertTSEntityName=function(e,t){s("TSEntityName",e,t)},t.assertTSEnumBody=function(e,t){s("TSEnumBody",e,t)},t.assertTSEnumDeclaration=function(e,t){s("TSEnumDeclaration",e,t)},t.assertTSEnumMember=function(e,t){s("TSEnumMember",e,t)},t.assertTSExportAssignment=function(e,t){s("TSExportAssignment",e,t)},t.assertTSExpressionWithTypeArguments=function(e,t){s("TSExpressionWithTypeArguments",e,t)},t.assertTSExternalModuleReference=function(e,t){s("TSExternalModuleReference",e,t)},t.assertTSFunctionType=function(e,t){s("TSFunctionType",e,t)},t.assertTSImportEqualsDeclaration=function(e,t){s("TSImportEqualsDeclaration",e,t)},t.assertTSImportType=function(e,t){s("TSImportType",e,t)},t.assertTSIndexSignature=function(e,t){s("TSIndexSignature",e,t)},t.assertTSIndexedAccessType=function(e,t){s("TSIndexedAccessType",e,t)},t.assertTSInferType=function(e,t){s("TSInferType",e,t)},t.assertTSInstantiationExpression=function(e,t){s("TSInstantiationExpression",e,t)},t.assertTSInterfaceBody=function(e,t){s("TSInterfaceBody",e,t)},t.assertTSInterfaceDeclaration=function(e,t){s("TSInterfaceDeclaration",e,t)},t.assertTSIntersectionType=function(e,t){s("TSIntersectionType",e,t)},t.assertTSIntrinsicKeyword=function(e,t){s("TSIntrinsicKeyword",e,t)},t.assertTSLiteralType=function(e,t){s("TSLiteralType",e,t)},t.assertTSMappedType=function(e,t){s("TSMappedType",e,t)},t.assertTSMethodSignature=function(e,t){s("TSMethodSignature",e,t)},t.assertTSModuleBlock=function(e,t){s("TSModuleBlock",e,t)},t.assertTSModuleDeclaration=function(e,t){s("TSModuleDeclaration",e,t)},t.assertTSNamedTupleMember=function(e,t){s("TSNamedTupleMember",e,t)},t.assertTSNamespaceExportDeclaration=function(e,t){s("TSNamespaceExportDeclaration",e,t)},t.assertTSNeverKeyword=function(e,t){s("TSNeverKeyword",e,t)},t.assertTSNonNullExpression=function(e,t){s("TSNonNullExpression",e,t)},t.assertTSNullKeyword=function(e,t){s("TSNullKeyword",e,t)},t.assertTSNumberKeyword=function(e,t){s("TSNumberKeyword",e,t)},t.assertTSObjectKeyword=function(e,t){s("TSObjectKeyword",e,t)},t.assertTSOptionalType=function(e,t){s("TSOptionalType",e,t)},t.assertTSParameterProperty=function(e,t){s("TSParameterProperty",e,t)},t.assertTSParenthesizedType=function(e,t){s("TSParenthesizedType",e,t)},t.assertTSPropertySignature=function(e,t){s("TSPropertySignature",e,t)},t.assertTSQualifiedName=function(e,t){s("TSQualifiedName",e,t)},t.assertTSRestType=function(e,t){s("TSRestType",e,t)},t.assertTSSatisfiesExpression=function(e,t){s("TSSatisfiesExpression",e,t)},t.assertTSStringKeyword=function(e,t){s("TSStringKeyword",e,t)},t.assertTSSymbolKeyword=function(e,t){s("TSSymbolKeyword",e,t)},t.assertTSTemplateLiteralType=function(e,t){s("TSTemplateLiteralType",e,t)},t.assertTSThisType=function(e,t){s("TSThisType",e,t)},t.assertTSTupleType=function(e,t){s("TSTupleType",e,t)},t.assertTSType=function(e,t){s("TSType",e,t)},t.assertTSTypeAliasDeclaration=function(e,t){s("TSTypeAliasDeclaration",e,t)},t.assertTSTypeAnnotation=function(e,t){s("TSTypeAnnotation",e,t)},t.assertTSTypeAssertion=function(e,t){s("TSTypeAssertion",e,t)},t.assertTSTypeElement=function(e,t){s("TSTypeElement",e,t)},t.assertTSTypeLiteral=function(e,t){s("TSTypeLiteral",e,t)},t.assertTSTypeOperator=function(e,t){s("TSTypeOperator",e,t)},t.assertTSTypeParameter=function(e,t){s("TSTypeParameter",e,t)},t.assertTSTypeParameterDeclaration=function(e,t){s("TSTypeParameterDeclaration",e,t)},t.assertTSTypeParameterInstantiation=function(e,t){s("TSTypeParameterInstantiation",e,t)},t.assertTSTypePredicate=function(e,t){s("TSTypePredicate",e,t)},t.assertTSTypeQuery=function(e,t){s("TSTypeQuery",e,t)},t.assertTSTypeReference=function(e,t){s("TSTypeReference",e,t)},t.assertTSUndefinedKeyword=function(e,t){s("TSUndefinedKeyword",e,t)},t.assertTSUnionType=function(e,t){s("TSUnionType",e,t)},t.assertTSUnknownKeyword=function(e,t){s("TSUnknownKeyword",e,t)},t.assertTSVoidKeyword=function(e,t){s("TSVoidKeyword",e,t)},t.assertTaggedTemplateExpression=function(e,t){s("TaggedTemplateExpression",e,t)},t.assertTemplateElement=function(e,t){s("TemplateElement",e,t)},t.assertTemplateLiteral=function(e,t){s("TemplateLiteral",e,t)},t.assertTerminatorless=function(e,t){s("Terminatorless",e,t)},t.assertThisExpression=function(e,t){s("ThisExpression",e,t)},t.assertThisTypeAnnotation=function(e,t){s("ThisTypeAnnotation",e,t)},t.assertThrowStatement=function(e,t){s("ThrowStatement",e,t)},t.assertTopicReference=function(e,t){s("TopicReference",e,t)},t.assertTryStatement=function(e,t){s("TryStatement",e,t)},t.assertTupleExpression=function(e,t){s("TupleExpression",e,t)},t.assertTupleTypeAnnotation=function(e,t){s("TupleTypeAnnotation",e,t)},t.assertTypeAlias=function(e,t){s("TypeAlias",e,t)},t.assertTypeAnnotation=function(e,t){s("TypeAnnotation",e,t)},t.assertTypeCastExpression=function(e,t){s("TypeCastExpression",e,t)},t.assertTypeParameter=function(e,t){s("TypeParameter",e,t)},t.assertTypeParameterDeclaration=function(e,t){s("TypeParameterDeclaration",e,t)},t.assertTypeParameterInstantiation=function(e,t){s("TypeParameterInstantiation",e,t)},t.assertTypeScript=function(e,t){s("TypeScript",e,t)},t.assertTypeofTypeAnnotation=function(e,t){s("TypeofTypeAnnotation",e,t)},t.assertUnaryExpression=function(e,t){s("UnaryExpression",e,t)},t.assertUnaryLike=function(e,t){s("UnaryLike",e,t)},t.assertUnionTypeAnnotation=function(e,t){s("UnionTypeAnnotation",e,t)},t.assertUpdateExpression=function(e,t){s("UpdateExpression",e,t)},t.assertUserWhitespacable=function(e,t){s("UserWhitespacable",e,t)},t.assertV8IntrinsicIdentifier=function(e,t){s("V8IntrinsicIdentifier",e,t)},t.assertVariableDeclaration=function(e,t){s("VariableDeclaration",e,t)},t.assertVariableDeclarator=function(e,t){s("VariableDeclarator",e,t)},t.assertVariance=function(e,t){s("Variance",e,t)},t.assertVoidPattern=function(e,t){s("VoidPattern",e,t)},t.assertVoidTypeAnnotation=function(e,t){s("VoidTypeAnnotation",e,t)},t.assertWhile=function(e,t){s("While",e,t)},t.assertWhileStatement=function(e,t){s("WhileStatement",e,t)},t.assertWithStatement=function(e,t){s("WithStatement",e,t)},t.assertYieldExpression=function(e,t){s("YieldExpression",e,t)};var n=r(23781),i=r(74641);function s(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}".`)}},48122:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(31500);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},48457:(e,t,r)=>{var n=r(73261),i=r(8925),s=r(23781);const o=(0,n.defineAliasedType)("TypeScript"),a=(0,n.assertValueType)("boolean"),l=()=>({returnType:{validate:(0,n.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,n.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});o("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,n.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,n.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,n.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,n.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,n.arrayOfType)("Decorator"),optional:!0}}}),o("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,i.functionDeclarationCommon)(),l())}),o("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,i.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,i.classMethodOrDeclareMethodCommon)(),l())})),o("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,n.validateType)("TSEntityName"),right:(0,n.validateType)("Identifier")}});const p=()=>({typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,n.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation")}),u={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:p()};o("TSCallSignatureDeclaration",u),o("TSConstructSignatureDeclaration",u);const c=()=>({key:(0,n.validateType)("Expression"),computed:{default:!1},optional:(0,n.validateOptional)(a)});o("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},c(),{readonly:(0,n.validateOptional)(a),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,n.assertOneOf)("get","set")}})}),o("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},p(),c(),{kind:{validate:(0,n.assertOneOf)("method","get","set")}})}),o("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,n.validateOptional)(a),static:(0,n.validateOptional)(a),parameters:(0,n.validateArrayOfType)("Identifier"),typeAnnotation:(0,n.validateOptionalType)("TSTypeAnnotation")}});const h=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const e of h)o(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});o("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const d={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};o("TSFunctionType",Object.assign({},d,{fields:p()})),o("TSConstructorType",Object.assign({},d,{fields:Object.assign({},p(),{abstract:(0,n.validateOptional)(a)})})),o("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,n.validateType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}}),o("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)(a)}}),o("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,n.validateType)("TSEntityName","TSImportType"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,n.validateArrayOfType)("TSTypeElement")}}),o("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,n.validateType)("TSType")}}),o("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,n.validateArrayOfType)("TSType","TSNamedTupleMember")}}),o("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}}),o("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}}),o("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,n.validateType)("Identifier"),optional:{validate:a,default:!1},elementType:(0,n.validateType)("TSType")}});const f={aliases:["TSType"],visitor:["types"],fields:{types:(0,n.validateArrayOfType)("TSType")}};o("TSUnionType",f),o("TSIntersectionType",f),o("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")}}),o("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,n.validateType)("TSTypeParameter")}}),o("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,n.validateType)("TSType")}}),o("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,n.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,n.validateType)("TSType")}}),o("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,n.validateType)("TSType"),indexType:(0,n.validateType)("TSType")}}),o("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,n.validateType)("TSTypeParameter")},{readonly:(0,n.validateOptional)((0,n.assertOneOf)(!0,!1,"+","-")),optional:(0,n.validateOptional)((0,n.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,n.validateOptionalType)("TSType"),nameType:(0,n.validateOptionalType)("TSType")})}),o("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,n.validateArrayOfType)("TemplateElement"),types:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("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 types.\nExpected ${r.length+1} quasis but got ${e.quasis.length}`)}))}}}),o("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const e=(0,n.assertNodeType)("NumericLiteral","BigIntLiteral"),t=(0,n.assertOneOf)("-"),r=(0,n.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral"),i=function(n,i,o){(0,s.default)("UnaryExpression",o)?(t(o,"operator",o.operator),e(o,"argument",o.argument)):r(n,i,o)};return i.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],i}()}}}),o("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,n.validateType)("TSEntityName"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,n.validateOptional)(a),id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,n.validateOptional)((0,n.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,n.validateType)("TSInterfaceBody")}}),o("TSInterfaceBody",{visitor:["body"],fields:{body:(0,n.validateArrayOfType)("TSTypeElement")}}),o("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,n.validateOptional)(a),id:(0,n.validateType)("Identifier"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,n.validateType)("TSType")}}),o("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,n.validateType)("Expression"),typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")}});const m={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,n.validateType)("Expression"),typeAnnotation:(0,n.validateType)("TSType")}};o("TSAsExpression",m),o("TSSatisfiesExpression",m),o("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,n.validateType)("TSType"),expression:(0,n.validateType)("Expression")}}),o("TSEnumBody",{visitor:["members"],fields:{members:(0,n.validateArrayOfType)("TSEnumMember")}}),o("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,n.validateOptional)(a),const:(0,n.validateOptional)(a),id:(0,n.validateType)("Identifier"),members:(0,n.validateArrayOfType)("TSEnumMember"),initializer:(0,n.validateOptionalType)("Expression"),body:(0,n.validateOptionalType)("TSEnumBody")}}),o("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,n.validateType)("Identifier","StringLiteral"),initializer:(0,n.validateOptionalType)("Expression")}}),o("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,n.assertOneOf)("global","module","namespace")},declare:(0,n.validateOptional)(a)},{global:(0,n.validateOptional)(a)},{id:(0,n.validateType)("Identifier","StringLiteral"),body:(0,n.validateType)("TSModuleBlock","TSModuleDeclaration")})}),o("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,n.validateArrayOfType)("Statement")}}),o("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:Object.assign({},{argument:(0,n.validateType)("StringLiteral")},{qualifier:(0,n.validateOptionalType)("TSEntityName")},{typeParameters:(0,n.validateOptionalType)("TSTypeParameterInstantiation")},{options:{validate:(0,n.assertNodeType)("ObjectExpression"),optional:!0}})}),o("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,n.validate)(a)},{id:(0,n.validateType)("Identifier"),moduleReference:(0,n.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,n.assertOneOf)("type","value"),optional:!0}})}),o("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,n.validateType)("StringLiteral")}}),o("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,n.validateType)("Expression")}}),o("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,n.validateType)("Expression")}}),o("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,n.validateType)("Identifier")}}),o("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,n.assertNodeType)("TSType")}}}),o("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,n.validateArrayOfType)("TSType")}}),o("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,n.validateArrayOfType)("TSTypeParameter")}}),o("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,n.assertValueType)("string")},in:{validate:(0,n.assertValueType)("boolean"),optional:!0},out:{validate:(0,n.assertValueType)("boolean"),optional:!0},const:{validate:(0,n.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,n.assertNodeType)("TSType"),optional:!0},default:{validate:(0,n.assertNodeType)("TSType"),optional:!0}}})},48898:(e,t,r)=>{var n=r(72994).Token,i=r(70040).Interval,s=new i(-1,-2);function o(){return this}function a(){return o.call(this),this}function l(){return a.call(this),this}function p(){return l.call(this),this}function u(){return l.call(this),this}function c(){return u.call(this),this}function h(){return this}function d(){return this}function f(e){return u.call(this),this.parentCtx=null,this.symbol=e,this}function m(e){return f.call(this,e),this}function y(){return this}r(66346),a.prototype=Object.create(o.prototype),a.prototype.constructor=a,l.prototype=Object.create(a.prototype),l.prototype.constructor=l,p.prototype=Object.create(l.prototype),p.prototype.constructor=p,u.prototype=Object.create(l.prototype),u.prototype.constructor=u,c.prototype=Object.create(u.prototype),c.prototype.constructor=c,h.prototype.visit=function(e){return Array.isArray(e)?e.map((function(e){return e.accept(this)}),this):e.accept(this)},h.prototype.visitChildren=function(e){return e.children?this.visit(e.children):null},h.prototype.visitTerminal=function(e){},h.prototype.visitErrorNode=function(e){},d.prototype.visitTerminal=function(e){},d.prototype.visitErrorNode=function(e){},d.prototype.enterEveryRule=function(e){},d.prototype.exitEveryRule=function(e){},f.prototype=Object.create(u.prototype),f.prototype.constructor=f,f.prototype.getChild=function(e){return null},f.prototype.getSymbol=function(){return this.symbol},f.prototype.getParent=function(){return this.parentCtx},f.prototype.getPayload=function(){return this.symbol},f.prototype.getSourceInterval=function(){if(null===this.symbol)return s;var e=this.symbol.tokenIndex;return new i(e,e)},f.prototype.getChildCount=function(){return 0},f.prototype.accept=function(e){return e.visitTerminal(this)},f.prototype.getText=function(){return this.symbol.text},f.prototype.toString=function(){return this.symbol.type===n.EOF?"<EOF>":this.symbol.text},m.prototype=Object.create(f.prototype),m.prototype.constructor=m,m.prototype.isErrorNode=function(){return!0},m.prototype.accept=function(e){return e.visitErrorNode(this)},y.prototype.walk=function(e,t){if(t instanceof c||void 0!==t.isErrorNode&&t.isErrorNode())e.visitErrorNode(t);else if(t instanceof u)e.visitTerminal(t);else{this.enterRule(e,t);for(var r=0;r<t.getChildCount();r++){var n=t.getChild(r);this.walk(e,n)}this.exitRule(e,t)}},y.prototype.enterRule=function(e,t){var r=t.getRuleContext();e.enterEveryRule(r),r.enterRule(e)},y.prototype.exitRule=function(e,t){var r=t.getRuleContext();r.exitRule(e),e.exitEveryRule(r)},y.DEFAULT=new y,t.RuleNode=p,t.ErrorNode=c,t.TerminalNode=u,t.ErrorNodeImpl=m,t.TerminalNodeImpl=f,t.ParseTreeListener=d,t.ParseTreeVisitor=h,t.ParseTreeWalker=y,t.INVALID_INTERVAL=s},48966:(e,t,r)=>{t.RecognitionException=r(86587).RecognitionException,t.NoViableAltException=r(86587).NoViableAltException,t.LexerNoViableAltException=r(86587).LexerNoViableAltException,t.InputMismatchException=r(86587).InputMismatchException,t.FailedPredicateException=r(86587).FailedPredicateException,t.DiagnosticErrorListener=r(58369).DiagnosticErrorListener,t.BailErrorStrategy=r(24429).BailErrorStrategy,t.ErrorListener=r(93343).ErrorListener},49114:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(35108);const i=Symbol(),s=Symbol();function o(e,t,r){if(!e)return!1;const a=n.VISITOR_KEYS[e.type];if(!a)return!1;const l=t(e,r=r||{});if(void 0!==l)switch(l){case i:return!1;case s:return!0}for(const n of a){const i=e[n];if(i)if(Array.isArray(i)){for(const e of i)if(o(e,t,r))return!0}else if(o(i,t,r))return!0}return!1}o.skip=i,o.stop=s},49837:(e,t,r)=>{var n=r(10626),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var s=Object.create(r(26571));s.inherits=r(25003);var o=r(3971),a=r(41175);s.inherits(c,o);for(var l=i(a.prototype),p=0;p<l.length;p++){var u=l[p];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},49871:(e,t,r)=>{t.atn=r(26597),t.codepointat=r(51184),t.dfa=r(16569),t.fromcodepoint=r(59198),t.tree=r(69036),t.error=r(48966),t.Token=r(72994).Token,t.CharStreams=r(21058).CharStreams,t.CommonToken=r(72994).CommonToken,t.InputStream=r(47375).InputStream,t.FileStream=r(4349).FileStream,t.CommonTokenStream=r(18949).CommonTokenStream,t.Lexer=r(18393).Lexer,t.Parser=r(36464).Parser;var n=r(10559);t.PredictionContextCache=n.PredictionContextCache,t.ParserRuleContext=r(29499).ParserRuleContext,t.Interval=r(70040).Interval,t.Utils=r(66346)},50006:e=>{e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},50659:(e,t,r)=>{var n=r(6617),i=r(76966),s=function(e){return i({},e)},o=r(80922),a=r(69140),l=r(60598),p=r(79682),u=r(46406),c=r(54200),h=r(72639),d=r(46971),f=r(70251),m=r(38275),y=r(64398),g=r(77504),T=r(93567),v=r(35040),b=r(39418),S=/^change:/,x=function(){};function E(e,t){t||(t={}),this.cid||(this.cid=n("state")),this._events={},this._values={},this._eventBubblingHandlerCache={},this._definition=Object.create(this._definition),t.parse&&(e=this.parse(e,t)),this.parent=t.parent,this.collection=t.collection,this._keyTree=new v,this._initCollections(),this._initChildren(),this._cache={},this._previousAttributes={},e&&this.set(e,i({silent:!0,initial:!0},t)),this._changed={},this._derived&&this._initDerived(),!1!==t.init&&this.initialize.apply(this,arguments)}function w(e,t,r,n){var i,s,o=e._definition[t]={};if(u(r))(i=e._ensureValidType(r))&&(o.type=i);else{if(Array.isArray(r)&&(r={type:(s=r)[0],required:s[1],default:s[2]}),(i=e._ensureValidType(r.type))&&(o.type=i),r.required&&(o.required=!0),r.default&&"object"==typeof r.default)throw new TypeError("The default value for "+t+" cannot be an object/array, must be a value or a function which returns a value/object/array");o.default=r.default,o.allowNull=!!r.allowNull&&r.allowNull,r.setOnce&&(o.setOnce=!0),o.required&&void 0===o.default&&!o.setOnce&&(o.default=e._getDefaultForType(i)),o.test=r.test,o.values=r.values}return n&&(o.session=!0),i||(i=u(r)?r:r.type,console.warn("Invalid data type of `"+i+"` for `"+t+"` property. Use one of the default types or define your own")),Object.defineProperty(e,t,{set:function(e){this.set(t,e)},get:function(){if(!this._values)throw Error('You may be trying to `extend` a state object with "'+t+'" which has been defined in `props` on the object being extended');var e=this._values[t],r=this._dataTypes[o.type];if(void 0!==e)return r&&r.get&&(e=r.get(e)),e;var n=y(o,"default");return this._values[t]=n,void 0!==n&&this._getOnChangeForType(o.type)(n,e,t),n}}),o}function A(e,t,r){(e._derived[t]={fn:d(r)?r:r.fn,cache:!1!==r.cache,depList:r.deps||[]}).depList.forEach((function(r){e._deps[r]=g(e._deps[r]||[],[t])})),Object.defineProperty(e,t,{get:function(){return this._getDerivedProperty(t)},set:function(){throw new TypeError("`"+t+"` is a derived property, it can't be set directly.")}})}i(E.prototype,T,{extraProperties:"ignore",idAttribute:"id",namespaceAttribute:"namespace",typeAttribute:"modelType",initialize:function(){return this},getId:function(){return this[this.idAttribute]},getNamespace:function(){return this[this.namespaceAttribute]},getType:function(){return this[this.typeAttribute]},isNew:function(){return null==this.getId()},escape:function(e){return a(this.get(e))},isValid:function(e){return this._validate({},i(e||{},{validate:!0}))},parse:function(e,t){return e},serialize:function(e){var t=i({props:!0},e),r=this.getAttributes(t,!0),n=function(e,t){r[t]=this[t].serialize()}.bind(this);return l(this._children,n),l(this._collections,n),r},set:function(e,t,r){var n,i,s,o,a,l,u,h,d,f,m,g,T,v,b,S,x,E=this,w=this.extraProperties;if(c(e)||null===e?(d=e,r=t):(d={})[e]=t,r=r||{},!this._validate(d,r))return!1;g=r.unset,m=r.silent,v=r.initial,n=this._changing,this._changing=!0,i=[],v?this._previousAttributes={}:n||(this._previousAttributes=this.attributes,this._changed={});for(var A=0,P=Object.keys(d),I=P.length;A<I;A++){if(s=typeof(o=d[h=P[A]]),T=this._values[h],!(a=this._definition[h])){if(this._children[h]||this._collections[h]){c(o)||(o={}),this[h].set(o,r);continue}if("ignore"===w)continue;if("reject"===w)throw new TypeError('No "'+h+'" property defined on '+(this.type||"this")+' model and extraProperties not set to "ignore" or "allow"');if("allow"===w)a=this._createPropertyDefinition(h,"any");else if(w)throw new TypeError('Invalid value for extraProperties: "'+w+'"')}if(S=this._getCompareForType(a.type),x=this._getOnChangeForType(a.type),(f=this._dataTypes[a.type])&&f.set&&(o=(l=f.set(o)).val,s=l.type),a.test&&(u=a.test.call(this,o,s)))throw new TypeError("Property '"+h+"' failed validation with error: "+u);if(void 0===o&&a.required)throw new TypeError("Required property '"+h+"' must be of type "+a.type+". Tried to set "+o);if(null===o&&a.required&&!a.allowNull)throw new TypeError("Property '"+h+"' must be of type "+a.type+" (cannot be null). Tried to set "+o);if(a.type&&"any"!==a.type&&a.type!==s&&null!=o)throw new TypeError("Property '"+h+"' must be of type "+a.type+". Tried to set "+o);if(a.values&&!p(a.values,o)){var C=y(a,"default");if(g&&void 0!==C)o=C;else if(!g||g&&void 0!==o)throw new TypeError("Property '"+h+"' must be one of values: "+a.values.join(", ")+". Tried to set "+o)}if(b=v||!S(T,o,h),a.setOnce&&void 0!==T&&b)throw new TypeError("Property '"+h+"' can only be set once.");b?(x(o,T,h),v||(this._changed[h]=o,this._previousAttributes[h]=T,g&&delete this._values[h],m||i.push({prev:T,val:o,key:h})),g||(this._values[h]=o)):delete this._changed[h]}if(i.length&&(this._pending=!0),i.forEach((function(e){E.trigger("change:"+e.key,E,e.val,r)})),n)return this;for(;this._pending;)this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},get:function(e){return this[e]},toggle:function(e){var t=this._definition[e];if("boolean"===t.type)this[e]=!this[e];else{if(!t||!t.values)throw new TypeError("Can only toggle properties that are type `boolean` or have `values` array.");this[e]=b(t.values,this[e])}return this},previousAttributes:function(){return s(this._previousAttributes)},hasChanged:function(e){return null==e?!!Object.keys(this._changed).length:m(this._derived,e)?this._derived[e].depList.some((function(e){return this.hasChanged(e)}),this):m(this._changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&s(this._changed);var t,r,n=!1,i=this._changing?this._previousAttributes:this.attributes;for(var o in e)(r=this._definition[o])&&(this._getCompareForType(r.type)(i[o],t=e[o])||((n||(n={}))[o]=t));return n},toJSON:function(){return this.serialize()},unset:function(e,t){var r=this;(e=Array.isArray(e)?e:[e]).forEach((function(e){var n,s=r._definition[e];if(s)return s.required?(n=y(s,"default"),r.set(e,n,t)):r.set(e,n,i({},t,{unset:!0}))}))},clear:function(e){var t=this;return Object.keys(this.attributes).forEach((function(r){t.unset(r,e)})),this},previous:function(e){return null!=e&&Object.keys(this._previousAttributes).length?this._previousAttributes[e]:null},_getDefaultForType:function(e){var t=this._dataTypes[e];return t&&t.default},_getCompareForType:function(e){var t=this._dataTypes[e];return t&&t.compare?t.compare.bind(this):f},_getOnChangeForType:function(e){var t=this._dataTypes[e];return t&&t.onChange?t.onChange.bind(this):x},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=i({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,i(t||{},{validationError:r})),!1)},_createPropertyDefinition:function(e,t,r){return w(this,e,t,r)},_ensureValidType:function(e){return p(["string","number","boolean","array","object","date","state","any"].concat(Object.keys(this._dataTypes)),e)?e:void 0},getAttributes:function(e,t){e=i({session:!1,props:!1,derived:!1},e||{});var r,n,s={};for(var o in this._definition)n=this._definition[o],(e.session&&n.session||e.props&&!n.session)&&(r=t?this._values[o]:this[o],t&&r&&d(r.serialize)&&(r=r.serialize()),void 0===r&&(r=y(n,"default")),void 0!==r&&(s[o]=r));if(e.derived)for(var a in this._derived)s[a]=this[a];return s},_initDerived:function(){var e=this;l(this._derived,(function(t,r){var n=e._derived[r];n.deps=n.depList;var i=function(){var t=n.fn.call(e);e._cache[r]===t&&n.cache||(n.cache&&(e._previousAttributes[r]=e._cache[r]),e._cache[r]=t,e.trigger("change:"+r,e,e._cache[r]))};n.deps.forEach((function(t){e._keyTree.add(t,i)}))})),this.on("all",(function(t){S.test(t)&&e._keyTree.get(t.split(":")[1]).forEach((function(e){e()}))}),this)},_getDerivedProperty:function(e,t){return this._derived[e].cache?(!t&&this._cache.hasOwnProperty(e)||(this._cache[e]=this._derived[e].fn.apply(this)),this._cache[e]):this._derived[e].fn.apply(this)},_initCollections:function(){var e;if(this._collections)for(e in this._collections)this._safeSet(e,new this._collections[e](null,{parent:this}))},_initChildren:function(){var e;if(this._children)for(e in this._children)this._safeSet(e,new this._children[e]({},{parent:this})),this.listenTo(this[e],"all",this._getCachedEventBubblingHandler(e))},_getCachedEventBubblingHandler:function(e){return this._eventBubblingHandlerCache[e]||(this._eventBubblingHandlerCache[e]=function(t,r,n){S.test(t)?this.trigger("change:"+e+"."+t.split(":")[1],r,n):"change"===t&&this.trigger("change",this)}.bind(this)),this._eventBubblingHandlerCache[e]},_verifyRequired:function(){var e=this.attributes;for(var t in this._definition)if(this._definition[t].required&&void 0===e[t])return!1;return!0},_safeSet:function(e,t){if(e in this)throw new Error("Encountered namespace collision while setting instance property `"+e+"`");return this[e]=t,this}}),Object.defineProperties(E.prototype,{attributes:{get:function(){return this.getAttributes({props:!0,session:!0})}},all:{get:function(){return this.getAttributes({session:!0,props:!0,derived:!0})}},isState:{get:function(){return!0},set:function(){}}});var P={string:{default:function(){return""}},date:{set:function(e){var t;if(null==e)t="object";else if(h(e))t="date",e=e.valueOf();else{var r=null,n=new Date(e).valueOf();isNaN(n)&&(n=new Date(parseInt(e,10)).valueOf(),isNaN(n)&&(r=!0)),e=n,t="date",r&&(t=typeof e)}return{val:e,type:t}},get:function(e){return null==e?e:new Date(e)},default:function(){return new Date}},array:{set:function(e){return{val:e,type:Array.isArray(e)?"array":typeof e}},default:function(){return[]}},object:{set:function(e){var t=typeof e;return"object"!==t&&void 0===e&&(e=null,t="object"),{val:e,type:t}},default:function(){return{}}},state:{set:function(e){return e instanceof E||e&&e.isState?{val:e,type:"state"}:{val:e,type:typeof e}},compare:function(e,t){return e===t},onChange:function(e,t,r){t&&this.stopListening(t,"all",this._getCachedEventBubblingHandler(r)),null!=e&&this.listenTo(e,"all",this._getCachedEventBubblingHandler(r))}}};E.extend=function(e){var t,r=this;t=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return r.apply(this,arguments)},i(t,r);var n=function(){this.constructor=t};if(n.prototype=r.prototype,t.prototype=new n,t.prototype._derived=i({},r.prototype._derived),t.prototype._deps=i({},r.prototype._deps),t.prototype._definition=i({},r.prototype._definition),t.prototype._collections=i({},r.prototype._collections),t.prototype._children=i({},r.prototype._children),t.prototype._dataTypes=i({},r.prototype._dataTypes||P),e)for(var s=["dataTypes","props","session","derived","collections","children"],a=0;a<arguments.length;a++){var p=arguments[a];p.dataTypes&&l(p.dataTypes,(function(e,r){t.prototype._dataTypes[r]=e})),p.props&&l(p.props,(function(e,r){w(t.prototype,r,e)})),p.session&&l(p.session,(function(e,r){w(t.prototype,r,e,!0)})),p.derived&&l(p.derived,(function(e,r){A(t.prototype,r,e)})),p.collections&&l(p.collections,(function(e,r){t.prototype._collections[r]=e})),p.children&&l(p.children,(function(e,r){t.prototype._children[r]=e})),i(t.prototype,o(p,s))}return t.__super__=r.prototype,t},e.exports=E},51028:(e,t,r)=>{var n=r(23234).a,i=r(70040).m;function s(e,t){return this.grammarType=e,this.maxTokenType=t,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[],this}s.prototype.nextTokensInContext=function(e,t){return new n(this).LOOK(e,null,t)},s.prototype.nextTokensNoContext=function(e){return null!==e.nextTokenWithinRule||(e.nextTokenWithinRule=this.nextTokensInContext(e,null),e.nextTokenWithinRule.readOnly=!0),e.nextTokenWithinRule},s.prototype.nextTokens=function(e,t){return void 0===t?this.nextTokensNoContext(e):this.nextTokensInContext(e,t)},s.prototype.addState=function(e){null!==e&&(e.atn=this,e.stateNumber=this.states.length),this.states.push(e)},s.prototype.removeState=function(e){this.states[e.stateNumber]=null},s.prototype.defineDecisionState=function(e){return this.decisionToState.push(e),e.decision=this.decisionToState.length-1,e.decision},s.prototype.getDecisionState=function(e){return 0===this.decisionToState.length?null:this.decisionToState[e]};var o=r(72994).Token;s.prototype.getExpectedTokens=function(e,t){if(e<0||e>=this.states.length)throw"Invalid state number.";var r=this.states[e],n=this.nextTokens(r);if(!n.contains(o.EPSILON))return n;var s=new i;for(s.addSet(n),s.removeOne(o.EPSILON);null!==t&&t.invokingState>=0&&n.contains(o.EPSILON);){var a=this.states[t.invokingState].transitions[0];n=this.nextTokens(a.followState),s.addSet(n),s.removeOne(o.EPSILON),t=t.parentCtx}return n.contains(o.EPSILON)&&s.addOne(o.EOF),s},s.INVALID_ALT_NUMBER=0,t.ATN=s},51184:()=>{var e,t;String.prototype.codePointAt||(t=function(e){if(null==this)throw TypeError();var t=String(this),r=t.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||n>=r)){var i,s=t.charCodeAt(n);return s>=55296&&s<=56319&&r>n+1&&(i=t.charCodeAt(n+1))>=56320&&i<=57343?1024*(s-55296)+i-56320+65536:s}},(e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}())?e(String.prototype,"codePointAt",{value:t,configurable:!0,writable:!0}):String.prototype.codePointAt=t)},51596:(e,t)=>{function r(){}r.LEXER=0,r.PARSER=1,t.E=r},52625:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.anyTypeAnnotation=function(){return{type:"AnyTypeAnnotation"}},t.argumentPlaceholder=function(){return{type:"ArgumentPlaceholder"}},t.arrayExpression=function(e=[]){const t={type:"ArrayExpression",elements:e},r=a.ArrayExpression;return o(r.elements,t,"elements",e,1),t},t.arrayPattern=function(e){const t={type:"ArrayPattern",elements:e},r=a.ArrayPattern;return o(r.elements,t,"elements",e,1),t},t.arrayTypeAnnotation=function(e){const t={type:"ArrayTypeAnnotation",elementType:e},r=a.ArrayTypeAnnotation;return o(r.elementType,t,"elementType",e,1),t},t.arrowFunctionExpression=function(e,t,r=!1){const n={type:"ArrowFunctionExpression",params:e,body:t,async:r,expression:null},i=a.ArrowFunctionExpression;return o(i.params,n,"params",e,1),o(i.body,n,"body",t,1),o(i.async,n,"async",r),n},t.assignmentExpression=function(e,t,r){const n={type:"AssignmentExpression",operator:e,left:t,right:r},i=a.AssignmentExpression;return o(i.operator,n,"operator",e),o(i.left,n,"left",t,1),o(i.right,n,"right",r,1),n},t.assignmentPattern=function(e,t){const r={type:"AssignmentPattern",left:e,right:t},n=a.AssignmentPattern;return o(n.left,r,"left",e,1),o(n.right,r,"right",t,1),r},t.awaitExpression=function(e){const t={type:"AwaitExpression",argument:e},r=a.AwaitExpression;return o(r.argument,t,"argument",e,1),t},t.bigIntLiteral=function(e){"bigint"==typeof e&&(e=e.toString());const t={type:"BigIntLiteral",value:e},r=a.BigIntLiteral;return o(r.value,t,"value",e),t},t.binaryExpression=function(e,t,r){const n={type:"BinaryExpression",operator:e,left:t,right:r},i=a.BinaryExpression;return o(i.operator,n,"operator",e),o(i.left,n,"left",t,1),o(i.right,n,"right",r,1),n},t.bindExpression=function(e,t){const r={type:"BindExpression",object:e,callee:t},n=a.BindExpression;return o(n.object,r,"object",e,1),o(n.callee,r,"callee",t,1),r},t.blockStatement=function(e,t=[]){const r={type:"BlockStatement",body:e,directives:t},n=a.BlockStatement;return o(n.body,r,"body",e,1),o(n.directives,r,"directives",t,1),r},t.booleanLiteral=function(e){const t={type:"BooleanLiteral",value:e},r=a.BooleanLiteral;return o(r.value,t,"value",e),t},t.booleanLiteralTypeAnnotation=function(e){const t={type:"BooleanLiteralTypeAnnotation",value:e},r=a.BooleanLiteralTypeAnnotation;return o(r.value,t,"value",e),t},t.booleanTypeAnnotation=function(){return{type:"BooleanTypeAnnotation"}},t.breakStatement=function(e=null){const t={type:"BreakStatement",label:e},r=a.BreakStatement;return o(r.label,t,"label",e,1),t},t.callExpression=function(e,t){const r={type:"CallExpression",callee:e,arguments:t},n=a.CallExpression;return o(n.callee,r,"callee",e,1),o(n.arguments,r,"arguments",t,1),r},t.catchClause=function(e=null,t){const r={type:"CatchClause",param:e,body:t},n=a.CatchClause;return o(n.param,r,"param",e,1),o(n.body,r,"body",t,1),r},t.classAccessorProperty=function(e,t=null,r=null,n=null,i=!1,s=!1){const l={type:"ClassAccessorProperty",key:e,value:t,typeAnnotation:r,decorators:n,computed:i,static:s},p=a.ClassAccessorProperty;return o(p.key,l,"key",e,1),o(p.value,l,"value",t,1),o(p.typeAnnotation,l,"typeAnnotation",r,1),o(p.decorators,l,"decorators",n,1),o(p.computed,l,"computed",i),o(p.static,l,"static",s),l},t.classBody=function(e){const t={type:"ClassBody",body:e},r=a.ClassBody;return o(r.body,t,"body",e,1),t},t.classDeclaration=function(e=null,t=null,r,n=null){const i={type:"ClassDeclaration",id:e,superClass:t,body:r,decorators:n},s=a.ClassDeclaration;return o(s.id,i,"id",e,1),o(s.superClass,i,"superClass",t,1),o(s.body,i,"body",r,1),o(s.decorators,i,"decorators",n,1),i},t.classExpression=function(e=null,t=null,r,n=null){const i={type:"ClassExpression",id:e,superClass:t,body:r,decorators:n},s=a.ClassExpression;return o(s.id,i,"id",e,1),o(s.superClass,i,"superClass",t,1),o(s.body,i,"body",r,1),o(s.decorators,i,"decorators",n,1),i},t.classImplements=function(e,t=null){const r={type:"ClassImplements",id:e,typeParameters:t},n=a.ClassImplements;return o(n.id,r,"id",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.classMethod=function(e="method",t,r,n,i=!1,s=!1,l=!1,p=!1){const u={type:"ClassMethod",kind:e,key:t,params:r,body:n,computed:i,static:s,generator:l,async:p},c=a.ClassMethod;return o(c.kind,u,"kind",e),o(c.key,u,"key",t,1),o(c.params,u,"params",r,1),o(c.body,u,"body",n,1),o(c.computed,u,"computed",i),o(c.static,u,"static",s),o(c.generator,u,"generator",l),o(c.async,u,"async",p),u},t.classPrivateMethod=function(e="method",t,r,n,i=!1){const s={type:"ClassPrivateMethod",kind:e,key:t,params:r,body:n,static:i},l=a.ClassPrivateMethod;return o(l.kind,s,"kind",e),o(l.key,s,"key",t,1),o(l.params,s,"params",r,1),o(l.body,s,"body",n,1),o(l.static,s,"static",i),s},t.classPrivateProperty=function(e,t=null,r=null,n=!1){const i={type:"ClassPrivateProperty",key:e,value:t,decorators:r,static:n},s=a.ClassPrivateProperty;return o(s.key,i,"key",e,1),o(s.value,i,"value",t,1),o(s.decorators,i,"decorators",r,1),o(s.static,i,"static",n),i},t.classProperty=function(e,t=null,r=null,n=null,i=!1,s=!1){const l={type:"ClassProperty",key:e,value:t,typeAnnotation:r,decorators:n,computed:i,static:s},p=a.ClassProperty;return o(p.key,l,"key",e,1),o(p.value,l,"value",t,1),o(p.typeAnnotation,l,"typeAnnotation",r,1),o(p.decorators,l,"decorators",n,1),o(p.computed,l,"computed",i),o(p.static,l,"static",s),l},t.conditionalExpression=function(e,t,r){const n={type:"ConditionalExpression",test:e,consequent:t,alternate:r},i=a.ConditionalExpression;return o(i.test,n,"test",e,1),o(i.consequent,n,"consequent",t,1),o(i.alternate,n,"alternate",r,1),n},t.continueStatement=function(e=null){const t={type:"ContinueStatement",label:e},r=a.ContinueStatement;return o(r.label,t,"label",e,1),t},t.debuggerStatement=function(){return{type:"DebuggerStatement"}},t.decimalLiteral=function(e){const t={type:"DecimalLiteral",value:e},r=a.DecimalLiteral;return o(r.value,t,"value",e),t},t.declareClass=function(e,t=null,r=null,n){const i={type:"DeclareClass",id:e,typeParameters:t,extends:r,body:n},s=a.DeclareClass;return o(s.id,i,"id",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.extends,i,"extends",r,1),o(s.body,i,"body",n,1),i},t.declareExportAllDeclaration=function(e,t=null){const r={type:"DeclareExportAllDeclaration",source:e,attributes:t},n=a.DeclareExportAllDeclaration;return o(n.source,r,"source",e,1),o(n.attributes,r,"attributes",t,1),r},t.declareExportDeclaration=function(e=null,t=null,r=null,n=null){const i={type:"DeclareExportDeclaration",declaration:e,specifiers:t,source:r,attributes:n},s=a.DeclareExportDeclaration;return o(s.declaration,i,"declaration",e,1),o(s.specifiers,i,"specifiers",t,1),o(s.source,i,"source",r,1),o(s.attributes,i,"attributes",n,1),i},t.declareFunction=function(e){const t={type:"DeclareFunction",id:e},r=a.DeclareFunction;return o(r.id,t,"id",e,1),t},t.declareInterface=function(e,t=null,r=null,n){const i={type:"DeclareInterface",id:e,typeParameters:t,extends:r,body:n},s=a.DeclareInterface;return o(s.id,i,"id",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.extends,i,"extends",r,1),o(s.body,i,"body",n,1),i},t.declareModule=function(e,t,r=null){const n={type:"DeclareModule",id:e,body:t,kind:r},i=a.DeclareModule;return o(i.id,n,"id",e,1),o(i.body,n,"body",t,1),o(i.kind,n,"kind",r),n},t.declareModuleExports=function(e){const t={type:"DeclareModuleExports",typeAnnotation:e},r=a.DeclareModuleExports;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.declareOpaqueType=function(e,t=null,r=null){const n={type:"DeclareOpaqueType",id:e,typeParameters:t,supertype:r},i=a.DeclareOpaqueType;return o(i.id,n,"id",e,1),o(i.typeParameters,n,"typeParameters",t,1),o(i.supertype,n,"supertype",r,1),n},t.declareTypeAlias=function(e,t=null,r){const n={type:"DeclareTypeAlias",id:e,typeParameters:t,right:r},i=a.DeclareTypeAlias;return o(i.id,n,"id",e,1),o(i.typeParameters,n,"typeParameters",t,1),o(i.right,n,"right",r,1),n},t.declareVariable=function(e){const t={type:"DeclareVariable",id:e},r=a.DeclareVariable;return o(r.id,t,"id",e,1),t},t.declaredPredicate=function(e){const t={type:"DeclaredPredicate",value:e},r=a.DeclaredPredicate;return o(r.value,t,"value",e,1),t},t.decorator=function(e){const t={type:"Decorator",expression:e},r=a.Decorator;return o(r.expression,t,"expression",e,1),t},t.directive=function(e){const t={type:"Directive",value:e},r=a.Directive;return o(r.value,t,"value",e,1),t},t.directiveLiteral=function(e){const t={type:"DirectiveLiteral",value:e},r=a.DirectiveLiteral;return o(r.value,t,"value",e),t},t.doExpression=function(e,t=!1){const r={type:"DoExpression",body:e,async:t},n=a.DoExpression;return o(n.body,r,"body",e,1),o(n.async,r,"async",t),r},t.doWhileStatement=function(e,t){const r={type:"DoWhileStatement",test:e,body:t},n=a.DoWhileStatement;return o(n.test,r,"test",e,1),o(n.body,r,"body",t,1),r},t.emptyStatement=function(){return{type:"EmptyStatement"}},t.emptyTypeAnnotation=function(){return{type:"EmptyTypeAnnotation"}},t.enumBooleanBody=function(e){const t={type:"EnumBooleanBody",members:e,explicitType:null,hasUnknownMembers:null},r=a.EnumBooleanBody;return o(r.members,t,"members",e,1),t},t.enumBooleanMember=function(e){const t={type:"EnumBooleanMember",id:e,init:null},r=a.EnumBooleanMember;return o(r.id,t,"id",e,1),t},t.enumDeclaration=function(e,t){const r={type:"EnumDeclaration",id:e,body:t},n=a.EnumDeclaration;return o(n.id,r,"id",e,1),o(n.body,r,"body",t,1),r},t.enumDefaultedMember=function(e){const t={type:"EnumDefaultedMember",id:e},r=a.EnumDefaultedMember;return o(r.id,t,"id",e,1),t},t.enumNumberBody=function(e){const t={type:"EnumNumberBody",members:e,explicitType:null,hasUnknownMembers:null},r=a.EnumNumberBody;return o(r.members,t,"members",e,1),t},t.enumNumberMember=function(e,t){const r={type:"EnumNumberMember",id:e,init:t},n=a.EnumNumberMember;return o(n.id,r,"id",e,1),o(n.init,r,"init",t,1),r},t.enumStringBody=function(e){const t={type:"EnumStringBody",members:e,explicitType:null,hasUnknownMembers:null},r=a.EnumStringBody;return o(r.members,t,"members",e,1),t},t.enumStringMember=function(e,t){const r={type:"EnumStringMember",id:e,init:t},n=a.EnumStringMember;return o(n.id,r,"id",e,1),o(n.init,r,"init",t,1),r},t.enumSymbolBody=function(e){const t={type:"EnumSymbolBody",members:e,hasUnknownMembers:null},r=a.EnumSymbolBody;return o(r.members,t,"members",e,1),t},t.existsTypeAnnotation=function(){return{type:"ExistsTypeAnnotation"}},t.exportAllDeclaration=function(e,t=null){const r={type:"ExportAllDeclaration",source:e,attributes:t},n=a.ExportAllDeclaration;return o(n.source,r,"source",e,1),o(n.attributes,r,"attributes",t,1),r},t.exportDefaultDeclaration=function(e){const t={type:"ExportDefaultDeclaration",declaration:e},r=a.ExportDefaultDeclaration;return o(r.declaration,t,"declaration",e,1),t},t.exportDefaultSpecifier=function(e){const t={type:"ExportDefaultSpecifier",exported:e},r=a.ExportDefaultSpecifier;return o(r.exported,t,"exported",e,1),t},t.exportNamedDeclaration=function(e=null,t=[],r=null,n=null){const i={type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:r,attributes:n},s=a.ExportNamedDeclaration;return o(s.declaration,i,"declaration",e,1),o(s.specifiers,i,"specifiers",t,1),o(s.source,i,"source",r,1),o(s.attributes,i,"attributes",n,1),i},t.exportNamespaceSpecifier=function(e){const t={type:"ExportNamespaceSpecifier",exported:e},r=a.ExportNamespaceSpecifier;return o(r.exported,t,"exported",e,1),t},t.exportSpecifier=function(e,t){const r={type:"ExportSpecifier",local:e,exported:t},n=a.ExportSpecifier;return o(n.local,r,"local",e,1),o(n.exported,r,"exported",t,1),r},t.expressionStatement=function(e){const t={type:"ExpressionStatement",expression:e},r=a.ExpressionStatement;return o(r.expression,t,"expression",e,1),t},t.file=function(e,t=null,r=null){const n={type:"File",program:e,comments:t,tokens:r},i=a.File;return o(i.program,n,"program",e,1),o(i.comments,n,"comments",t,1),o(i.tokens,n,"tokens",r),n},t.forInStatement=function(e,t,r){const n={type:"ForInStatement",left:e,right:t,body:r},i=a.ForInStatement;return o(i.left,n,"left",e,1),o(i.right,n,"right",t,1),o(i.body,n,"body",r,1),n},t.forOfStatement=function(e,t,r,n=!1){const i={type:"ForOfStatement",left:e,right:t,body:r,await:n},s=a.ForOfStatement;return o(s.left,i,"left",e,1),o(s.right,i,"right",t,1),o(s.body,i,"body",r,1),o(s.await,i,"await",n),i},t.forStatement=function(e=null,t=null,r=null,n){const i={type:"ForStatement",init:e,test:t,update:r,body:n},s=a.ForStatement;return o(s.init,i,"init",e,1),o(s.test,i,"test",t,1),o(s.update,i,"update",r,1),o(s.body,i,"body",n,1),i},t.functionDeclaration=function(e=null,t,r,n=!1,i=!1){const s={type:"FunctionDeclaration",id:e,params:t,body:r,generator:n,async:i},l=a.FunctionDeclaration;return o(l.id,s,"id",e,1),o(l.params,s,"params",t,1),o(l.body,s,"body",r,1),o(l.generator,s,"generator",n),o(l.async,s,"async",i),s},t.functionExpression=function(e=null,t,r,n=!1,i=!1){const s={type:"FunctionExpression",id:e,params:t,body:r,generator:n,async:i},l=a.FunctionExpression;return o(l.id,s,"id",e,1),o(l.params,s,"params",t,1),o(l.body,s,"body",r,1),o(l.generator,s,"generator",n),o(l.async,s,"async",i),s},t.functionTypeAnnotation=function(e=null,t,r=null,n){const i={type:"FunctionTypeAnnotation",typeParameters:e,params:t,rest:r,returnType:n},s=a.FunctionTypeAnnotation;return o(s.typeParameters,i,"typeParameters",e,1),o(s.params,i,"params",t,1),o(s.rest,i,"rest",r,1),o(s.returnType,i,"returnType",n,1),i},t.functionTypeParam=function(e=null,t){const r={type:"FunctionTypeParam",name:e,typeAnnotation:t},n=a.FunctionTypeParam;return o(n.name,r,"name",e,1),o(n.typeAnnotation,r,"typeAnnotation",t,1),r},t.genericTypeAnnotation=function(e,t=null){const r={type:"GenericTypeAnnotation",id:e,typeParameters:t},n=a.GenericTypeAnnotation;return o(n.id,r,"id",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.identifier=function(e){const t={type:"Identifier",name:e},r=a.Identifier;return o(r.name,t,"name",e),t},t.ifStatement=function(e,t,r=null){const n={type:"IfStatement",test:e,consequent:t,alternate:r},i=a.IfStatement;return o(i.test,n,"test",e,1),o(i.consequent,n,"consequent",t,1),o(i.alternate,n,"alternate",r,1),n},t.import=function(){return{type:"Import"}},t.importAttribute=function(e,t){const r={type:"ImportAttribute",key:e,value:t},n=a.ImportAttribute;return o(n.key,r,"key",e,1),o(n.value,r,"value",t,1),r},t.importDeclaration=function(e,t,r=null){const n={type:"ImportDeclaration",specifiers:e,source:t,attributes:r},i=a.ImportDeclaration;return o(i.specifiers,n,"specifiers",e,1),o(i.source,n,"source",t,1),o(i.attributes,n,"attributes",r,1),n},t.importDefaultSpecifier=function(e){const t={type:"ImportDefaultSpecifier",local:e},r=a.ImportDefaultSpecifier;return o(r.local,t,"local",e,1),t},t.importExpression=function(e,t=null){const r={type:"ImportExpression",source:e,options:t},n=a.ImportExpression;return o(n.source,r,"source",e,1),o(n.options,r,"options",t,1),r},t.importNamespaceSpecifier=function(e){const t={type:"ImportNamespaceSpecifier",local:e},r=a.ImportNamespaceSpecifier;return o(r.local,t,"local",e,1),t},t.importSpecifier=function(e,t){const r={type:"ImportSpecifier",local:e,imported:t},n=a.ImportSpecifier;return o(n.local,r,"local",e,1),o(n.imported,r,"imported",t,1),r},t.indexedAccessType=function(e,t){const r={type:"IndexedAccessType",objectType:e,indexType:t},n=a.IndexedAccessType;return o(n.objectType,r,"objectType",e,1),o(n.indexType,r,"indexType",t,1),r},t.inferredPredicate=function(){return{type:"InferredPredicate"}},t.interfaceDeclaration=function(e,t=null,r=null,n){const i={type:"InterfaceDeclaration",id:e,typeParameters:t,extends:r,body:n},s=a.InterfaceDeclaration;return o(s.id,i,"id",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.extends,i,"extends",r,1),o(s.body,i,"body",n,1),i},t.interfaceExtends=function(e,t=null){const r={type:"InterfaceExtends",id:e,typeParameters:t},n=a.InterfaceExtends;return o(n.id,r,"id",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.interfaceTypeAnnotation=function(e=null,t){const r={type:"InterfaceTypeAnnotation",extends:e,body:t},n=a.InterfaceTypeAnnotation;return o(n.extends,r,"extends",e,1),o(n.body,r,"body",t,1),r},t.interpreterDirective=function(e){const t={type:"InterpreterDirective",value:e},r=a.InterpreterDirective;return o(r.value,t,"value",e),t},t.intersectionTypeAnnotation=function(e){const t={type:"IntersectionTypeAnnotation",types:e},r=a.IntersectionTypeAnnotation;return o(r.types,t,"types",e,1),t},t.jSXAttribute=t.jsxAttribute=function(e,t=null){const r={type:"JSXAttribute",name:e,value:t},n=a.JSXAttribute;return o(n.name,r,"name",e,1),o(n.value,r,"value",t,1),r},t.jSXClosingElement=t.jsxClosingElement=function(e){const t={type:"JSXClosingElement",name:e},r=a.JSXClosingElement;return o(r.name,t,"name",e,1),t},t.jSXClosingFragment=t.jsxClosingFragment=function(){return{type:"JSXClosingFragment"}},t.jSXElement=t.jsxElement=function(e,t=null,r,n=null){const i={type:"JSXElement",openingElement:e,closingElement:t,children:r,selfClosing:n},s=a.JSXElement;return o(s.openingElement,i,"openingElement",e,1),o(s.closingElement,i,"closingElement",t,1),o(s.children,i,"children",r,1),o(s.selfClosing,i,"selfClosing",n),i},t.jSXEmptyExpression=t.jsxEmptyExpression=function(){return{type:"JSXEmptyExpression"}},t.jSXExpressionContainer=t.jsxExpressionContainer=function(e){const t={type:"JSXExpressionContainer",expression:e},r=a.JSXExpressionContainer;return o(r.expression,t,"expression",e,1),t},t.jSXFragment=t.jsxFragment=function(e,t,r){const n={type:"JSXFragment",openingFragment:e,closingFragment:t,children:r},i=a.JSXFragment;return o(i.openingFragment,n,"openingFragment",e,1),o(i.closingFragment,n,"closingFragment",t,1),o(i.children,n,"children",r,1),n},t.jSXIdentifier=t.jsxIdentifier=function(e){const t={type:"JSXIdentifier",name:e},r=a.JSXIdentifier;return o(r.name,t,"name",e),t},t.jSXMemberExpression=t.jsxMemberExpression=function(e,t){const r={type:"JSXMemberExpression",object:e,property:t},n=a.JSXMemberExpression;return o(n.object,r,"object",e,1),o(n.property,r,"property",t,1),r},t.jSXNamespacedName=t.jsxNamespacedName=function(e,t){const r={type:"JSXNamespacedName",namespace:e,name:t},n=a.JSXNamespacedName;return o(n.namespace,r,"namespace",e,1),o(n.name,r,"name",t,1),r},t.jSXOpeningElement=t.jsxOpeningElement=function(e,t,r=!1){const n={type:"JSXOpeningElement",name:e,attributes:t,selfClosing:r},i=a.JSXOpeningElement;return o(i.name,n,"name",e,1),o(i.attributes,n,"attributes",t,1),o(i.selfClosing,n,"selfClosing",r),n},t.jSXOpeningFragment=t.jsxOpeningFragment=function(){return{type:"JSXOpeningFragment"}},t.jSXSpreadAttribute=t.jsxSpreadAttribute=function(e){const t={type:"JSXSpreadAttribute",argument:e},r=a.JSXSpreadAttribute;return o(r.argument,t,"argument",e,1),t},t.jSXSpreadChild=t.jsxSpreadChild=function(e){const t={type:"JSXSpreadChild",expression:e},r=a.JSXSpreadChild;return o(r.expression,t,"expression",e,1),t},t.jSXText=t.jsxText=function(e){const t={type:"JSXText",value:e},r=a.JSXText;return o(r.value,t,"value",e),t},t.labeledStatement=function(e,t){const r={type:"LabeledStatement",label:e,body:t},n=a.LabeledStatement;return o(n.label,r,"label",e,1),o(n.body,r,"body",t,1),r},t.logicalExpression=function(e,t,r){const n={type:"LogicalExpression",operator:e,left:t,right:r},i=a.LogicalExpression;return o(i.operator,n,"operator",e),o(i.left,n,"left",t,1),o(i.right,n,"right",r,1),n},t.memberExpression=function(e,t,r=!1,n=null){const i={type:"MemberExpression",object:e,property:t,computed:r,optional:n},s=a.MemberExpression;return o(s.object,i,"object",e,1),o(s.property,i,"property",t,1),o(s.computed,i,"computed",r),o(s.optional,i,"optional",n),i},t.metaProperty=function(e,t){const r={type:"MetaProperty",meta:e,property:t},n=a.MetaProperty;return o(n.meta,r,"meta",e,1),o(n.property,r,"property",t,1),r},t.mixedTypeAnnotation=function(){return{type:"MixedTypeAnnotation"}},t.moduleExpression=function(e){const t={type:"ModuleExpression",body:e},r=a.ModuleExpression;return o(r.body,t,"body",e,1),t},t.newExpression=function(e,t){const r={type:"NewExpression",callee:e,arguments:t},n=a.NewExpression;return o(n.callee,r,"callee",e,1),o(n.arguments,r,"arguments",t,1),r},t.noop=function(){return{type:"Noop"}},t.nullLiteral=function(){return{type:"NullLiteral"}},t.nullLiteralTypeAnnotation=function(){return{type:"NullLiteralTypeAnnotation"}},t.nullableTypeAnnotation=function(e){const t={type:"NullableTypeAnnotation",typeAnnotation:e},r=a.NullableTypeAnnotation;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.numberLiteral=function(e){return(0,i.default)("NumberLiteral","NumericLiteral","The node type "),l(e)},t.numberLiteralTypeAnnotation=function(e){const t={type:"NumberLiteralTypeAnnotation",value:e},r=a.NumberLiteralTypeAnnotation;return o(r.value,t,"value",e),t},t.numberTypeAnnotation=function(){return{type:"NumberTypeAnnotation"}},t.numericLiteral=l,t.objectExpression=function(e){const t={type:"ObjectExpression",properties:e},r=a.ObjectExpression;return o(r.properties,t,"properties",e,1),t},t.objectMethod=function(e="method",t,r,n,i=!1,s=!1,l=!1){const p={type:"ObjectMethod",kind:e,key:t,params:r,body:n,computed:i,generator:s,async:l},u=a.ObjectMethod;return o(u.kind,p,"kind",e),o(u.key,p,"key",t,1),o(u.params,p,"params",r,1),o(u.body,p,"body",n,1),o(u.computed,p,"computed",i),o(u.generator,p,"generator",s),o(u.async,p,"async",l),p},t.objectPattern=function(e){const t={type:"ObjectPattern",properties:e},r=a.ObjectPattern;return o(r.properties,t,"properties",e,1),t},t.objectProperty=function(e,t,r=!1,n=!1,i=null){const s={type:"ObjectProperty",key:e,value:t,computed:r,shorthand:n,decorators:i},l=a.ObjectProperty;return o(l.key,s,"key",e,1),o(l.value,s,"value",t,1),o(l.computed,s,"computed",r),o(l.shorthand,s,"shorthand",n),o(l.decorators,s,"decorators",i,1),s},t.objectTypeAnnotation=function(e,t=[],r=[],n=[],i=!1){const s={type:"ObjectTypeAnnotation",properties:e,indexers:t,callProperties:r,internalSlots:n,exact:i},l=a.ObjectTypeAnnotation;return o(l.properties,s,"properties",e,1),o(l.indexers,s,"indexers",t,1),o(l.callProperties,s,"callProperties",r,1),o(l.internalSlots,s,"internalSlots",n,1),o(l.exact,s,"exact",i),s},t.objectTypeCallProperty=function(e){const t={type:"ObjectTypeCallProperty",value:e,static:null},r=a.ObjectTypeCallProperty;return o(r.value,t,"value",e,1),t},t.objectTypeIndexer=function(e=null,t,r,n=null){const i={type:"ObjectTypeIndexer",id:e,key:t,value:r,variance:n,static:null},s=a.ObjectTypeIndexer;return o(s.id,i,"id",e,1),o(s.key,i,"key",t,1),o(s.value,i,"value",r,1),o(s.variance,i,"variance",n,1),i},t.objectTypeInternalSlot=function(e,t,r,n,i){const s={type:"ObjectTypeInternalSlot",id:e,value:t,optional:r,static:n,method:i},l=a.ObjectTypeInternalSlot;return o(l.id,s,"id",e,1),o(l.value,s,"value",t,1),o(l.optional,s,"optional",r),o(l.static,s,"static",n),o(l.method,s,"method",i),s},t.objectTypeProperty=function(e,t,r=null){const n={type:"ObjectTypeProperty",key:e,value:t,variance:r,kind:null,method:null,optional:null,proto:null,static:null},i=a.ObjectTypeProperty;return o(i.key,n,"key",e,1),o(i.value,n,"value",t,1),o(i.variance,n,"variance",r,1),n},t.objectTypeSpreadProperty=function(e){const t={type:"ObjectTypeSpreadProperty",argument:e},r=a.ObjectTypeSpreadProperty;return o(r.argument,t,"argument",e,1),t},t.opaqueType=function(e,t=null,r=null,n){const i={type:"OpaqueType",id:e,typeParameters:t,supertype:r,impltype:n},s=a.OpaqueType;return o(s.id,i,"id",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.supertype,i,"supertype",r,1),o(s.impltype,i,"impltype",n,1),i},t.optionalCallExpression=function(e,t,r){const n={type:"OptionalCallExpression",callee:e,arguments:t,optional:r},i=a.OptionalCallExpression;return o(i.callee,n,"callee",e,1),o(i.arguments,n,"arguments",t,1),o(i.optional,n,"optional",r),n},t.optionalIndexedAccessType=function(e,t){const r={type:"OptionalIndexedAccessType",objectType:e,indexType:t,optional:null},n=a.OptionalIndexedAccessType;return o(n.objectType,r,"objectType",e,1),o(n.indexType,r,"indexType",t,1),r},t.optionalMemberExpression=function(e,t,r=!1,n){const i={type:"OptionalMemberExpression",object:e,property:t,computed:r,optional:n},s=a.OptionalMemberExpression;return o(s.object,i,"object",e,1),o(s.property,i,"property",t,1),o(s.computed,i,"computed",r),o(s.optional,i,"optional",n),i},t.parenthesizedExpression=function(e){const t={type:"ParenthesizedExpression",expression:e},r=a.ParenthesizedExpression;return o(r.expression,t,"expression",e,1),t},t.pipelineBareFunction=function(e){const t={type:"PipelineBareFunction",callee:e},r=a.PipelineBareFunction;return o(r.callee,t,"callee",e,1),t},t.pipelinePrimaryTopicReference=function(){return{type:"PipelinePrimaryTopicReference"}},t.pipelineTopicExpression=function(e){const t={type:"PipelineTopicExpression",expression:e},r=a.PipelineTopicExpression;return o(r.expression,t,"expression",e,1),t},t.placeholder=function(e,t){const r={type:"Placeholder",expectedNode:e,name:t},n=a.Placeholder;return o(n.expectedNode,r,"expectedNode",e),o(n.name,r,"name",t,1),r},t.privateName=function(e){const t={type:"PrivateName",id:e},r=a.PrivateName;return o(r.id,t,"id",e,1),t},t.program=function(e,t=[],r="script",n=null){const i={type:"Program",body:e,directives:t,sourceType:r,interpreter:n},s=a.Program;return o(s.body,i,"body",e,1),o(s.directives,i,"directives",t,1),o(s.sourceType,i,"sourceType",r),o(s.interpreter,i,"interpreter",n,1),i},t.qualifiedTypeIdentifier=function(e,t){const r={type:"QualifiedTypeIdentifier",id:e,qualification:t},n=a.QualifiedTypeIdentifier;return o(n.id,r,"id",e,1),o(n.qualification,r,"qualification",t,1),r},t.recordExpression=function(e){const t={type:"RecordExpression",properties:e},r=a.RecordExpression;return o(r.properties,t,"properties",e,1),t},t.regExpLiteral=p,t.regexLiteral=function(e,t=""){return(0,i.default)("RegexLiteral","RegExpLiteral","The node type "),p(e,t)},t.restElement=u,t.restProperty=function(e){return(0,i.default)("RestProperty","RestElement","The node type "),u(e)},t.returnStatement=function(e=null){const t={type:"ReturnStatement",argument:e},r=a.ReturnStatement;return o(r.argument,t,"argument",e,1),t},t.sequenceExpression=function(e){const t={type:"SequenceExpression",expressions:e},r=a.SequenceExpression;return o(r.expressions,t,"expressions",e,1),t},t.spreadElement=c,t.spreadProperty=function(e){return(0,i.default)("SpreadProperty","SpreadElement","The node type "),c(e)},t.staticBlock=function(e){const t={type:"StaticBlock",body:e},r=a.StaticBlock;return o(r.body,t,"body",e,1),t},t.stringLiteral=function(e){const t={type:"StringLiteral",value:e},r=a.StringLiteral;return o(r.value,t,"value",e),t},t.stringLiteralTypeAnnotation=function(e){const t={type:"StringLiteralTypeAnnotation",value:e},r=a.StringLiteralTypeAnnotation;return o(r.value,t,"value",e),t},t.stringTypeAnnotation=function(){return{type:"StringTypeAnnotation"}},t.super=function(){return{type:"Super"}},t.switchCase=function(e=null,t){const r={type:"SwitchCase",test:e,consequent:t},n=a.SwitchCase;return o(n.test,r,"test",e,1),o(n.consequent,r,"consequent",t,1),r},t.switchStatement=function(e,t){const r={type:"SwitchStatement",discriminant:e,cases:t},n=a.SwitchStatement;return o(n.discriminant,r,"discriminant",e,1),o(n.cases,r,"cases",t,1),r},t.symbolTypeAnnotation=function(){return{type:"SymbolTypeAnnotation"}},t.taggedTemplateExpression=function(e,t){const r={type:"TaggedTemplateExpression",tag:e,quasi:t},n=a.TaggedTemplateExpression;return o(n.tag,r,"tag",e,1),o(n.quasi,r,"quasi",t,1),r},t.templateElement=function(e,t=!1){const r={type:"TemplateElement",value:e,tail:t},n=a.TemplateElement;return o(n.value,r,"value",e),o(n.tail,r,"tail",t),r},t.templateLiteral=function(e,t){const r={type:"TemplateLiteral",quasis:e,expressions:t},n=a.TemplateLiteral;return o(n.quasis,r,"quasis",e,1),o(n.expressions,r,"expressions",t,1),r},t.thisExpression=function(){return{type:"ThisExpression"}},t.thisTypeAnnotation=function(){return{type:"ThisTypeAnnotation"}},t.throwStatement=function(e){const t={type:"ThrowStatement",argument:e},r=a.ThrowStatement;return o(r.argument,t,"argument",e,1),t},t.topicReference=function(){return{type:"TopicReference"}},t.tryStatement=function(e,t=null,r=null){const n={type:"TryStatement",block:e,handler:t,finalizer:r},i=a.TryStatement;return o(i.block,n,"block",e,1),o(i.handler,n,"handler",t,1),o(i.finalizer,n,"finalizer",r,1),n},t.tSAnyKeyword=t.tsAnyKeyword=function(){return{type:"TSAnyKeyword"}},t.tSArrayType=t.tsArrayType=function(e){const t={type:"TSArrayType",elementType:e},r=a.TSArrayType;return o(r.elementType,t,"elementType",e,1),t},t.tSAsExpression=t.tsAsExpression=function(e,t){const r={type:"TSAsExpression",expression:e,typeAnnotation:t},n=a.TSAsExpression;return o(n.expression,r,"expression",e,1),o(n.typeAnnotation,r,"typeAnnotation",t,1),r},t.tSBigIntKeyword=t.tsBigIntKeyword=function(){return{type:"TSBigIntKeyword"}},t.tSBooleanKeyword=t.tsBooleanKeyword=function(){return{type:"TSBooleanKeyword"}},t.tSCallSignatureDeclaration=t.tsCallSignatureDeclaration=function(e=null,t,r=null){const n={type:"TSCallSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r},i=a.TSCallSignatureDeclaration;return o(i.typeParameters,n,"typeParameters",e,1),o(i.parameters,n,"parameters",t,1),o(i.typeAnnotation,n,"typeAnnotation",r,1),n},t.tSConditionalType=t.tsConditionalType=function(e,t,r,n){const i={type:"TSConditionalType",checkType:e,extendsType:t,trueType:r,falseType:n},s=a.TSConditionalType;return o(s.checkType,i,"checkType",e,1),o(s.extendsType,i,"extendsType",t,1),o(s.trueType,i,"trueType",r,1),o(s.falseType,i,"falseType",n,1),i},t.tSConstructSignatureDeclaration=t.tsConstructSignatureDeclaration=function(e=null,t,r=null){const n={type:"TSConstructSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r},i=a.TSConstructSignatureDeclaration;return o(i.typeParameters,n,"typeParameters",e,1),o(i.parameters,n,"parameters",t,1),o(i.typeAnnotation,n,"typeAnnotation",r,1),n},t.tSConstructorType=t.tsConstructorType=function(e=null,t,r=null){const n={type:"TSConstructorType",typeParameters:e,parameters:t,typeAnnotation:r},i=a.TSConstructorType;return o(i.typeParameters,n,"typeParameters",e,1),o(i.parameters,n,"parameters",t,1),o(i.typeAnnotation,n,"typeAnnotation",r,1),n},t.tSDeclareFunction=t.tsDeclareFunction=function(e=null,t=null,r,n=null){const i={type:"TSDeclareFunction",id:e,typeParameters:t,params:r,returnType:n},s=a.TSDeclareFunction;return o(s.id,i,"id",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.params,i,"params",r,1),o(s.returnType,i,"returnType",n,1),i},t.tSDeclareMethod=t.tsDeclareMethod=function(e=null,t,r=null,n,i=null){const s={type:"TSDeclareMethod",decorators:e,key:t,typeParameters:r,params:n,returnType:i},l=a.TSDeclareMethod;return o(l.decorators,s,"decorators",e,1),o(l.key,s,"key",t,1),o(l.typeParameters,s,"typeParameters",r,1),o(l.params,s,"params",n,1),o(l.returnType,s,"returnType",i,1),s},t.tSEnumBody=t.tsEnumBody=function(e){const t={type:"TSEnumBody",members:e},r=a.TSEnumBody;return o(r.members,t,"members",e,1),t},t.tSEnumDeclaration=t.tsEnumDeclaration=function(e,t){const r={type:"TSEnumDeclaration",id:e,members:t},n=a.TSEnumDeclaration;return o(n.id,r,"id",e,1),o(n.members,r,"members",t,1),r},t.tSEnumMember=t.tsEnumMember=function(e,t=null){const r={type:"TSEnumMember",id:e,initializer:t},n=a.TSEnumMember;return o(n.id,r,"id",e,1),o(n.initializer,r,"initializer",t,1),r},t.tSExportAssignment=t.tsExportAssignment=function(e){const t={type:"TSExportAssignment",expression:e},r=a.TSExportAssignment;return o(r.expression,t,"expression",e,1),t},t.tSExpressionWithTypeArguments=t.tsExpressionWithTypeArguments=function(e,t=null){const r={type:"TSExpressionWithTypeArguments",expression:e,typeParameters:t},n=a.TSExpressionWithTypeArguments;return o(n.expression,r,"expression",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.tSExternalModuleReference=t.tsExternalModuleReference=function(e){const t={type:"TSExternalModuleReference",expression:e},r=a.TSExternalModuleReference;return o(r.expression,t,"expression",e,1),t},t.tSFunctionType=t.tsFunctionType=function(e=null,t,r=null){const n={type:"TSFunctionType",typeParameters:e,parameters:t,typeAnnotation:r},i=a.TSFunctionType;return o(i.typeParameters,n,"typeParameters",e,1),o(i.parameters,n,"parameters",t,1),o(i.typeAnnotation,n,"typeAnnotation",r,1),n},t.tSImportEqualsDeclaration=t.tsImportEqualsDeclaration=function(e,t){const r={type:"TSImportEqualsDeclaration",id:e,moduleReference:t,isExport:null},n=a.TSImportEqualsDeclaration;return o(n.id,r,"id",e,1),o(n.moduleReference,r,"moduleReference",t,1),r},t.tSImportType=t.tsImportType=function(e,t=null,r=null){const n={type:"TSImportType",argument:e,qualifier:t,typeParameters:r},i=a.TSImportType;return o(i.argument,n,"argument",e,1),o(i.qualifier,n,"qualifier",t,1),o(i.typeParameters,n,"typeParameters",r,1),n},t.tSIndexSignature=t.tsIndexSignature=function(e,t=null){const r={type:"TSIndexSignature",parameters:e,typeAnnotation:t},n=a.TSIndexSignature;return o(n.parameters,r,"parameters",e,1),o(n.typeAnnotation,r,"typeAnnotation",t,1),r},t.tSIndexedAccessType=t.tsIndexedAccessType=function(e,t){const r={type:"TSIndexedAccessType",objectType:e,indexType:t},n=a.TSIndexedAccessType;return o(n.objectType,r,"objectType",e,1),o(n.indexType,r,"indexType",t,1),r},t.tSInferType=t.tsInferType=function(e){const t={type:"TSInferType",typeParameter:e},r=a.TSInferType;return o(r.typeParameter,t,"typeParameter",e,1),t},t.tSInstantiationExpression=t.tsInstantiationExpression=function(e,t=null){const r={type:"TSInstantiationExpression",expression:e,typeParameters:t},n=a.TSInstantiationExpression;return o(n.expression,r,"expression",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.tSInterfaceBody=t.tsInterfaceBody=function(e){const t={type:"TSInterfaceBody",body:e},r=a.TSInterfaceBody;return o(r.body,t,"body",e,1),t},t.tSInterfaceDeclaration=t.tsInterfaceDeclaration=function(e,t=null,r=null,n){const i={type:"TSInterfaceDeclaration",id:e,typeParameters:t,extends:r,body:n},s=a.TSInterfaceDeclaration;return o(s.id,i,"id",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.extends,i,"extends",r,1),o(s.body,i,"body",n,1),i},t.tSIntersectionType=t.tsIntersectionType=function(e){const t={type:"TSIntersectionType",types:e},r=a.TSIntersectionType;return o(r.types,t,"types",e,1),t},t.tSIntrinsicKeyword=t.tsIntrinsicKeyword=function(){return{type:"TSIntrinsicKeyword"}},t.tSLiteralType=t.tsLiteralType=function(e){const t={type:"TSLiteralType",literal:e},r=a.TSLiteralType;return o(r.literal,t,"literal",e,1),t},t.tSMappedType=t.tsMappedType=function(e,t=null,r=null){const n={type:"TSMappedType",typeParameter:e,typeAnnotation:t,nameType:r},i=a.TSMappedType;return o(i.typeParameter,n,"typeParameter",e,1),o(i.typeAnnotation,n,"typeAnnotation",t,1),o(i.nameType,n,"nameType",r,1),n},t.tSMethodSignature=t.tsMethodSignature=function(e,t=null,r,n=null){const i={type:"TSMethodSignature",key:e,typeParameters:t,parameters:r,typeAnnotation:n,kind:null},s=a.TSMethodSignature;return o(s.key,i,"key",e,1),o(s.typeParameters,i,"typeParameters",t,1),o(s.parameters,i,"parameters",r,1),o(s.typeAnnotation,i,"typeAnnotation",n,1),i},t.tSModuleBlock=t.tsModuleBlock=function(e){const t={type:"TSModuleBlock",body:e},r=a.TSModuleBlock;return o(r.body,t,"body",e,1),t},t.tSModuleDeclaration=t.tsModuleDeclaration=function(e,t){const r={type:"TSModuleDeclaration",id:e,body:t,kind:null},n=a.TSModuleDeclaration;return o(n.id,r,"id",e,1),o(n.body,r,"body",t,1),r},t.tSNamedTupleMember=t.tsNamedTupleMember=function(e,t,r=!1){const n={type:"TSNamedTupleMember",label:e,elementType:t,optional:r},i=a.TSNamedTupleMember;return o(i.label,n,"label",e,1),o(i.elementType,n,"elementType",t,1),o(i.optional,n,"optional",r),n},t.tSNamespaceExportDeclaration=t.tsNamespaceExportDeclaration=function(e){const t={type:"TSNamespaceExportDeclaration",id:e},r=a.TSNamespaceExportDeclaration;return o(r.id,t,"id",e,1),t},t.tSNeverKeyword=t.tsNeverKeyword=function(){return{type:"TSNeverKeyword"}},t.tSNonNullExpression=t.tsNonNullExpression=function(e){const t={type:"TSNonNullExpression",expression:e},r=a.TSNonNullExpression;return o(r.expression,t,"expression",e,1),t},t.tSNullKeyword=t.tsNullKeyword=function(){return{type:"TSNullKeyword"}},t.tSNumberKeyword=t.tsNumberKeyword=function(){return{type:"TSNumberKeyword"}},t.tSObjectKeyword=t.tsObjectKeyword=function(){return{type:"TSObjectKeyword"}},t.tSOptionalType=t.tsOptionalType=function(e){const t={type:"TSOptionalType",typeAnnotation:e},r=a.TSOptionalType;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.tSParameterProperty=t.tsParameterProperty=function(e){const t={type:"TSParameterProperty",parameter:e},r=a.TSParameterProperty;return o(r.parameter,t,"parameter",e,1),t},t.tSParenthesizedType=t.tsParenthesizedType=function(e){const t={type:"TSParenthesizedType",typeAnnotation:e},r=a.TSParenthesizedType;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.tSPropertySignature=t.tsPropertySignature=function(e,t=null){const r={type:"TSPropertySignature",key:e,typeAnnotation:t},n=a.TSPropertySignature;return o(n.key,r,"key",e,1),o(n.typeAnnotation,r,"typeAnnotation",t,1),r},t.tSQualifiedName=t.tsQualifiedName=function(e,t){const r={type:"TSQualifiedName",left:e,right:t},n=a.TSQualifiedName;return o(n.left,r,"left",e,1),o(n.right,r,"right",t,1),r},t.tSRestType=t.tsRestType=function(e){const t={type:"TSRestType",typeAnnotation:e},r=a.TSRestType;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.tSSatisfiesExpression=t.tsSatisfiesExpression=function(e,t){const r={type:"TSSatisfiesExpression",expression:e,typeAnnotation:t},n=a.TSSatisfiesExpression;return o(n.expression,r,"expression",e,1),o(n.typeAnnotation,r,"typeAnnotation",t,1),r},t.tSStringKeyword=t.tsStringKeyword=function(){return{type:"TSStringKeyword"}},t.tSSymbolKeyword=t.tsSymbolKeyword=function(){return{type:"TSSymbolKeyword"}},t.tSTemplateLiteralType=t.tsTemplateLiteralType=function(e,t){const r={type:"TSTemplateLiteralType",quasis:e,types:t},n=a.TSTemplateLiteralType;return o(n.quasis,r,"quasis",e,1),o(n.types,r,"types",t,1),r},t.tSThisType=t.tsThisType=function(){return{type:"TSThisType"}},t.tSTupleType=t.tsTupleType=function(e){const t={type:"TSTupleType",elementTypes:e},r=a.TSTupleType;return o(r.elementTypes,t,"elementTypes",e,1),t},t.tSTypeAliasDeclaration=t.tsTypeAliasDeclaration=function(e,t=null,r){const n={type:"TSTypeAliasDeclaration",id:e,typeParameters:t,typeAnnotation:r},i=a.TSTypeAliasDeclaration;return o(i.id,n,"id",e,1),o(i.typeParameters,n,"typeParameters",t,1),o(i.typeAnnotation,n,"typeAnnotation",r,1),n},t.tSTypeAnnotation=t.tsTypeAnnotation=function(e){const t={type:"TSTypeAnnotation",typeAnnotation:e},r=a.TSTypeAnnotation;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.tSTypeAssertion=t.tsTypeAssertion=function(e,t){const r={type:"TSTypeAssertion",typeAnnotation:e,expression:t},n=a.TSTypeAssertion;return o(n.typeAnnotation,r,"typeAnnotation",e,1),o(n.expression,r,"expression",t,1),r},t.tSTypeLiteral=t.tsTypeLiteral=function(e){const t={type:"TSTypeLiteral",members:e},r=a.TSTypeLiteral;return o(r.members,t,"members",e,1),t},t.tSTypeOperator=t.tsTypeOperator=function(e,t="keyof"){const r={type:"TSTypeOperator",typeAnnotation:e,operator:t},n=a.TSTypeOperator;return o(n.typeAnnotation,r,"typeAnnotation",e,1),o(n.operator,r,"operator",t),r},t.tSTypeParameter=t.tsTypeParameter=function(e=null,t=null,r){const n={type:"TSTypeParameter",constraint:e,default:t,name:r},i=a.TSTypeParameter;return o(i.constraint,n,"constraint",e,1),o(i.default,n,"default",t,1),o(i.name,n,"name",r),n},t.tSTypeParameterDeclaration=t.tsTypeParameterDeclaration=function(e){const t={type:"TSTypeParameterDeclaration",params:e},r=a.TSTypeParameterDeclaration;return o(r.params,t,"params",e,1),t},t.tSTypeParameterInstantiation=t.tsTypeParameterInstantiation=function(e){const t={type:"TSTypeParameterInstantiation",params:e},r=a.TSTypeParameterInstantiation;return o(r.params,t,"params",e,1),t},t.tSTypePredicate=t.tsTypePredicate=function(e,t=null,r=null){const n={type:"TSTypePredicate",parameterName:e,typeAnnotation:t,asserts:r},i=a.TSTypePredicate;return o(i.parameterName,n,"parameterName",e,1),o(i.typeAnnotation,n,"typeAnnotation",t,1),o(i.asserts,n,"asserts",r),n},t.tSTypeQuery=t.tsTypeQuery=function(e,t=null){const r={type:"TSTypeQuery",exprName:e,typeParameters:t},n=a.TSTypeQuery;return o(n.exprName,r,"exprName",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.tSTypeReference=t.tsTypeReference=function(e,t=null){const r={type:"TSTypeReference",typeName:e,typeParameters:t},n=a.TSTypeReference;return o(n.typeName,r,"typeName",e,1),o(n.typeParameters,r,"typeParameters",t,1),r},t.tSUndefinedKeyword=t.tsUndefinedKeyword=function(){return{type:"TSUndefinedKeyword"}},t.tSUnionType=t.tsUnionType=function(e){const t={type:"TSUnionType",types:e},r=a.TSUnionType;return o(r.types,t,"types",e,1),t},t.tSUnknownKeyword=t.tsUnknownKeyword=function(){return{type:"TSUnknownKeyword"}},t.tSVoidKeyword=t.tsVoidKeyword=function(){return{type:"TSVoidKeyword"}},t.tupleExpression=function(e=[]){const t={type:"TupleExpression",elements:e},r=a.TupleExpression;return o(r.elements,t,"elements",e,1),t},t.tupleTypeAnnotation=function(e){const t={type:"TupleTypeAnnotation",types:e},r=a.TupleTypeAnnotation;return o(r.types,t,"types",e,1),t},t.typeAlias=function(e,t=null,r){const n={type:"TypeAlias",id:e,typeParameters:t,right:r},i=a.TypeAlias;return o(i.id,n,"id",e,1),o(i.typeParameters,n,"typeParameters",t,1),o(i.right,n,"right",r,1),n},t.typeAnnotation=function(e){const t={type:"TypeAnnotation",typeAnnotation:e},r=a.TypeAnnotation;return o(r.typeAnnotation,t,"typeAnnotation",e,1),t},t.typeCastExpression=function(e,t){const r={type:"TypeCastExpression",expression:e,typeAnnotation:t},n=a.TypeCastExpression;return o(n.expression,r,"expression",e,1),o(n.typeAnnotation,r,"typeAnnotation",t,1),r},t.typeParameter=function(e=null,t=null,r=null){const n={type:"TypeParameter",bound:e,default:t,variance:r,name:null},i=a.TypeParameter;return o(i.bound,n,"bound",e,1),o(i.default,n,"default",t,1),o(i.variance,n,"variance",r,1),n},t.typeParameterDeclaration=function(e){const t={type:"TypeParameterDeclaration",params:e},r=a.TypeParameterDeclaration;return o(r.params,t,"params",e,1),t},t.typeParameterInstantiation=function(e){const t={type:"TypeParameterInstantiation",params:e},r=a.TypeParameterInstantiation;return o(r.params,t,"params",e,1),t},t.typeofTypeAnnotation=function(e){const t={type:"TypeofTypeAnnotation",argument:e},r=a.TypeofTypeAnnotation;return o(r.argument,t,"argument",e,1),t},t.unaryExpression=function(e,t,r=!0){const n={type:"UnaryExpression",operator:e,argument:t,prefix:r},i=a.UnaryExpression;return o(i.operator,n,"operator",e),o(i.argument,n,"argument",t,1),o(i.prefix,n,"prefix",r),n},t.unionTypeAnnotation=function(e){const t={type:"UnionTypeAnnotation",types:e},r=a.UnionTypeAnnotation;return o(r.types,t,"types",e,1),t},t.updateExpression=function(e,t,r=!1){const n={type:"UpdateExpression",operator:e,argument:t,prefix:r},i=a.UpdateExpression;return o(i.operator,n,"operator",e),o(i.argument,n,"argument",t,1),o(i.prefix,n,"prefix",r),n},t.v8IntrinsicIdentifier=function(e){const t={type:"V8IntrinsicIdentifier",name:e},r=a.V8IntrinsicIdentifier;return o(r.name,t,"name",e),t},t.variableDeclaration=function(e,t){const r={type:"VariableDeclaration",kind:e,declarations:t},n=a.VariableDeclaration;return o(n.kind,r,"kind",e),o(n.declarations,r,"declarations",t,1),r},t.variableDeclarator=function(e,t=null){const r={type:"VariableDeclarator",id:e,init:t},n=a.VariableDeclarator;return o(n.id,r,"id",e,1),o(n.init,r,"init",t,1),r},t.variance=function(e){const t={type:"Variance",kind:e},r=a.Variance;return o(r.kind,t,"kind",e),t},t.voidPattern=function(){return{type:"VoidPattern"}},t.voidTypeAnnotation=function(){return{type:"VoidTypeAnnotation"}},t.whileStatement=function(e,t){const r={type:"WhileStatement",test:e,body:t},n=a.WhileStatement;return o(n.test,r,"test",e,1),o(n.body,r,"body",t,1),r},t.withStatement=function(e,t){const r={type:"WithStatement",object:e,body:t},n=a.WithStatement;return o(n.object,r,"object",e,1),o(n.body,r,"body",t,1),r},t.yieldExpression=function(e=null,t=!1){const r={type:"YieldExpression",argument:e,delegate:t},n=a.YieldExpression;return o(n.argument,r,"argument",e,1),o(n.delegate,r,"delegate",t),r};var n=r(59751),i=r(74641),s=r(73261);const{validateInternal:o}=n,{NODE_FIELDS:a}=s;function l(e){const t={type:"NumericLiteral",value:e},r=a.NumericLiteral;return o(r.value,t,"value",e),t}function p(e,t=""){const r={type:"RegExpLiteral",pattern:e,flags:t},n=a.RegExpLiteral;return o(n.pattern,r,"pattern",e),o(n.flags,r,"flags",t),r}function u(e){const t={type:"RestElement",argument:e},r=a.RestElement;return o(r.argument,t,"argument",e,1),t}function c(e){const t={type:"SpreadElement",argument:e},r=a.SpreadElement;return o(r.argument,t,"argument",e,1),t}},53896:(e,t,r)=>{var n=r(67787).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),s=0;s<r;++s)i[s]=e[s]^t[s];return i}},54072:(e,t,r)=>{var n=r(25003),i=r(55128).Reporter,s=r(67787).Buffer;function o(e,t){i.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(o,i),t.t=o,o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(e){var t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new o(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=a,a.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},54390:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){const l=[];let p=!0;for(const u of t)if((0,i.isEmptyStatement)(u)||(p=!1),(0,i.isExpression)(u))l.push(u);else if((0,i.isExpressionStatement)(u))l.push(u.expression);else if((0,i.isVariableDeclaration)(u)){if("var"!==u.kind)return;for(const e of u.declarations){const t=(0,n.default)(e);for(const e of Object.keys(t))r.push({kind:u.kind,id:(0,a.default)(t[e])});e.init&&l.push((0,s.assignmentExpression)("=",e.id,e.init))}p=!0}else if((0,i.isIfStatement)(u)){const t=u.consequent?e([u.consequent],r):(0,o.buildUndefinedNode)(),n=u.alternate?e([u.alternate],r):(0,o.buildUndefinedNode)();if(!t||!n)return;l.push((0,s.conditionalExpression)(u.test,t,n))}else if((0,i.isBlockStatement)(u)){const t=e(u.body,r);if(!t)return;l.push(t)}else{if(!(0,i.isEmptyStatement)(u))return;0===t.indexOf(u)&&(p=!0)}return p&&l.push((0,o.buildUndefinedNode)()),1===l.length?l[0]:(0,s.sequenceExpression)(l)};var n=r(68830),i=r(63555),s=r(82208),o=r(62062),a=r(16938)},54409:(e,t,r)=>{e.exports=s;var n=r(29075),i=Object.create(r(26571));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=r(25003),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},54667:(e,t)=>{t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=a(e),o=s[0],l=s[1],p=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,l)),u=0,c=l>0?o-4:o;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],p[u++]=t>>16&255,p[u++]=t>>8&255,p[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,p[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,p[u++]=t>>8&255,p[u++]=255&t),p},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,p=n-i;a<p;a+=o)s.push(l(e,a,a+o>p?p:a+o));return 1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},55110:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[].concat(e),r=Object.create(null);for(;t.length;){const e=t.pop();if(e)switch(e.type){case"ArrayPattern":t.push(...e.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":t.push(e.left);break;case"ObjectPattern":t.push(...e.properties);break;case"ObjectProperty":t.push(e.value);break;case"RestElement":case"UpdateExpression":t.push(e.argument);break;case"UnaryExpression":"delete"===e.operator&&t.push(e.argument);break;case"Identifier":r[e.name]=e}}return r}},55128:(e,t,r)=>{var n=t;n.Reporter=r(74591).a,n.DecoderBuffer=r(54072).t,n.EncoderBuffer=r(54072).d,n.Node=r(37254)},55186:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=!1){return e.object=(0,n.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e};var n=r(82208)},55354:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":return t.property===e?!!t.computed:t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":case"LabeledStatement":case"CatchClause":case"RestElement":case"BreakStatement":case"ContinueStatement":case"FunctionDeclaration":case"FunctionExpression":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportAttribute":case"JSXAttribute":case"ObjectPattern":case"ArrayPattern":case"MetaProperty":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return t.key===e&&!!t.computed;case"ObjectProperty":return t.key===e?!!t.computed:"ObjectPattern"!==(null==r?void 0:r.type);case"ClassProperty":case"ClassAccessorProperty":case"TSPropertySignature":return t.key!==e||!!t.computed;case"ClassPrivateProperty":case"ObjectTypeProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ExportSpecifier":return(null==r||!r.source)&&t.local===e;case"TSEnumMember":return t.id!==e}return!0}},56049:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentPlaceholder=function(){this.tokenChar(63)},t.ArrayPattern=t.ArrayExpression=function(e){const t=e.elements,r=t.length;this.tokenChar(91);const n=this.enterDelimited();for(let e=0;e<t.length;e++){const n=t[e];n?(e>0&&this.space(),this.print(n,void 0,!0),(e<r-1||this.shouldPrintTrailingComma("]"))&&this.tokenChar(44,e)):this.tokenChar(44,e)}this._noLineTerminatorAfterNode=n,this.tokenChar(93)},t.BigIntLiteral=function(e){const t=this.getPossibleRaw(e);this.format.minified||void 0===t?this.word(e.value+"n"):this.word(t)},t.BooleanLiteral=function(e){this.word(e.value?"true":"false")},t.Identifier=function(e){var t;this._buf._map&&this.sourceIdentifierName((null==(t=e.loc)?void 0:t.identifierName)||e.name),this.word(this.tokenMap?l:e.name)},t.NullLiteral=function(){this.word("null")},t.NumericLiteral=function(e){const t=this.getPossibleRaw(e),r=this.format.jsescOption,n=e.value,s=n+"";r.numbers?this.number(i(n,r),n):null==t?this.number(s,n):this.format.minified?this.number(t.length<s.length?t:s,n):this.number(t,n)},t.ObjectPattern=t.ObjectExpression=function(e){const t=e.properties;if(this.tokenChar(123),t.length){const e=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma("}"),!0,!0,void 0,!0),this.space(),this._noLineTerminatorAfterNode=e}this.rightBrace(e)},t.ObjectMethod=function(e){this.printJoin(e.decorators),s._methodHead.call(this,e),this.space(),this.print(e.body)},t.ObjectProperty=function(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(o(e.value)&&a(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value);if(this.print(e.key),e.shorthand&&a(e.key)&&a(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)},t.PipelineBareFunction=function(e){this.print(e.callee)},t.PipelinePrimaryTopicReference=function(){this.tokenChar(35)},t.PipelineTopicExpression=function(e){this.print(e.expression)},t.RegExpLiteral=function(e){this.word(`/${e.pattern}/${e.flags}`,!1)},t.SpreadElement=t.RestElement=function(e){this.token("..."),this.print(e.argument)},t.StringLiteral=function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&void 0!==t)return void this.token(t);const r=i(e.value,this.format.jsescOption);this.token(r)},t.TopicReference=function(){const{topicToken:e}=this.format;if(!p.has(e)){const t=JSON.stringify(e),r=Array.from(p,(e=>JSON.stringify(e)));throw new Error(`The "topicToken" generator option must be one of ${r.join(", ")} (${t} received instead).`)}this.token(e)},t.VoidPattern=function(){this.word("void")},t._getRawIdentifier=function(e){const{name:t}=e,r=this.tokenMap.find(e,(e=>e.value===t));return r?(l=this._originalCode.slice(r.start,r.end),l):l=e.name};var n=r(45741),i=r(41498),s=r(38118);const{isAssignmentPattern:o,isIdentifier:a}=n;let l="";const p=new Set(["^^","@@","^","%","#"])},56645:(e,t)=>{function r(){}function n(e){return this.actionType=e,this.isPositionDependent=!1,this}function i(){return n.call(this,r.SKIP),this}function s(e){return n.call(this,r.TYPE),this.type=e,this}function o(e){return n.call(this,r.PUSH_MODE),this.mode=e,this}function a(){return n.call(this,r.POP_MODE),this}function l(){return n.call(this,r.MORE),this}function p(e){return n.call(this,r.MODE),this.mode=e,this}function u(e,t){return n.call(this,r.CUSTOM),this.ruleIndex=e,this.actionIndex=t,this.isPositionDependent=!0,this}function c(e){return n.call(this,r.CHANNEL),this.channel=e,this}function h(e,t){return n.call(this,t.actionType),this.offset=e,this.action=t,this.isPositionDependent=!0,this}r.CHANNEL=0,r.CUSTOM=1,r.MODE=2,r.MORE=3,r.POP_MODE=4,r.PUSH_MODE=5,r.SKIP=6,r.TYPE=7,n.prototype.hashCode=function(){var e=new Hash;return this.updateHashCode(e),e.finish()},n.prototype.updateHashCode=function(e){e.update(this.actionType)},n.prototype.equals=function(e){return this===e},i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.INSTANCE=new i,i.prototype.execute=function(e){e.skip()},i.prototype.toString=function(){return"skip"},s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.prototype.execute=function(e){e.type=this.type},s.prototype.updateHashCode=function(e){e.update(this.actionType,this.type)},s.prototype.equals=function(e){return this===e||e instanceof s&&this.type===e.type},s.prototype.toString=function(){return"type("+this.type+")"},o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.prototype.execute=function(e){e.pushMode(this.mode)},o.prototype.updateHashCode=function(e){e.update(this.actionType,this.mode)},o.prototype.equals=function(e){return this===e||e instanceof o&&this.mode===e.mode},o.prototype.toString=function(){return"pushMode("+this.mode+")"},a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.INSTANCE=new a,a.prototype.execute=function(e){e.popMode()},a.prototype.toString=function(){return"popMode"},l.prototype=Object.create(n.prototype),l.prototype.constructor=l,l.INSTANCE=new l,l.prototype.execute=function(e){e.more()},l.prototype.toString=function(){return"more"},p.prototype=Object.create(n.prototype),p.prototype.constructor=p,p.prototype.execute=function(e){e.mode(this.mode)},p.prototype.updateHashCode=function(e){e.update(this.actionType,this.mode)},p.prototype.equals=function(e){return this===e||e instanceof p&&this.mode===e.mode},p.prototype.toString=function(){return"mode("+this.mode+")"},u.prototype=Object.create(n.prototype),u.prototype.constructor=u,u.prototype.execute=function(e){e.action(null,this.ruleIndex,this.actionIndex)},u.prototype.updateHashCode=function(e){e.update(this.actionType,this.ruleIndex,this.actionIndex)},u.prototype.equals=function(e){return this===e||e instanceof u&&this.ruleIndex===e.ruleIndex&&this.actionIndex===e.actionIndex},c.prototype=Object.create(n.prototype),c.prototype.constructor=c,c.prototype.execute=function(e){e._channel=this.channel},c.prototype.updateHashCode=function(e){e.update(this.actionType,this.channel)},c.prototype.equals=function(e){return this===e||e instanceof c&&this.channel===e.channel},c.prototype.toString=function(){return"channel("+this.channel+")"},h.prototype=Object.create(n.prototype),h.prototype.constructor=h,h.prototype.execute=function(e){this.action.execute(e)},h.prototype.updateHashCode=function(e){e.update(this.actionType,this.offset,this.action)},h.prototype.equals=function(e){return this===e||e instanceof h&&this.offset===e.offset&&this.action===e.action},t.LexerActionType=r,t.LexerSkipAction=i,t.LexerChannelAction=c,t.LexerCustomAction=u,t.LexerIndexedCustomAction=h,t.LexerMoreAction=l,t.LexerTypeAction=s,t.LexerPushModeAction=o,t.LexerPopModeAction=a,t.LexerModeAction=p},56773:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e)&&!i.has(e)};var n=r(26228);const i=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"])},57045:(e,t,r)=>{var n=r(73261);const i=(0,n.defineAliasedType)("JSX");i("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),i("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),i("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:(0,n.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,n.assertValueType)("boolean"),optional:!0}})}),i("JSXEmptyExpression",{}),i("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression","JSXEmptyExpression")}}}),i("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),i("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),i("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),i("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),i("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,n.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,n.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,n.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),i("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),i("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}}),i("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:(0,n.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),i("JSXOpeningFragment",{aliases:["Immutable"]}),i("JSXClosingFragment",{aliases:["Immutable"]})},57350:(e,t,r)=>{var n=r(73261),i=r(85604),s=r(8925);const o=(0,n.defineAliasedType)("Miscellaneous");o("Noop",{visitor:[]}),o("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,n.assertNodeType)("Identifier")},expectedNode:{validate:(0,n.assertOneOf)(...i.PLACEHOLDERS)}},(0,s.patternLikeCommon)())}),o("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,n.assertValueType)("string")}}})},57585:(e,t,r)=>{var n=r(6617),i=/\s+/;t.triggerEvents=function(e,t){var r,n=-1,i=e.length,s=t[0],o=t[1],a=t[2];switch(t.length){case 0:for(;++n<i;)(r=e[n]).callback.call(r.ctx);return;case 1:for(;++n<i;)(r=e[n]).callback.call(r.ctx,s);return;case 2:for(;++n<i;)(r=e[n]).callback.call(r.ctx,s,o);return;case 3:for(;++n<i;)(r=e[n]).callback.call(r.ctx,s,o,a);return;default:for(;++n<i;)(r=e[n]).callback.apply(r.ctx,t);return}},t.eventsApi=function(e,t,r,n){if(!r)return!0;if("object"==typeof r){for(var s in r)e[t].apply(e,[s,r[s]].concat(n));return!1}if(i.test(r)){for(var o=r.split(i),a=0,l=o.length;a<l;a++)e[t].apply(e,[o[a]].concat(n));return!1}return!0},t.createListenMethod=function(e){return function(t,r,i){if(!t)throw new Error("Trying to listenTo event: '"+r+"' but the target object is undefined");if((this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=n("l"))]=t,i||"object"!=typeof r||(i=this),"function"!=typeof t[e])throw new Error("Trying to listenTo event: '"+r+"' on object: "+t.toString()+" but it does not have an 'on' method so is unbindable");return t[e](r,i,this),this}}},58314:(e,t,r)=>{e.exports=r(4716)},58369:(e,t,r)=>{var n=r(66346).BitSet,i=r(93343).ErrorListener,s=r(70040).Interval;function o(e){return i.call(this),e=e||!0,this.exactOnly=e,this}o.prototype=Object.create(i.prototype),o.prototype.constructor=o,o.prototype.reportAmbiguity=function(e,t,r,n,i,o,a){if(!this.exactOnly||i){var l="reportAmbiguity d="+this.getDecisionDescription(e,t)+": ambigAlts="+this.getConflictingAlts(o,a)+", input='"+e.getTokenStream().getText(new s(r,n))+"'";e.notifyErrorListeners(l)}},o.prototype.reportAttemptingFullContext=function(e,t,r,n,i,o){var a="reportAttemptingFullContext d="+this.getDecisionDescription(e,t)+", input='"+e.getTokenStream().getText(new s(r,n))+"'";e.notifyErrorListeners(a)},o.prototype.reportContextSensitivity=function(e,t,r,n,i,o){var a="reportContextSensitivity d="+this.getDecisionDescription(e,t)+", input='"+e.getTokenStream().getText(new s(r,n))+"'";e.notifyErrorListeners(a)},o.prototype.getDecisionDescription=function(e,t){var r=t.decision,n=t.atnStartState.ruleIndex,i=e.ruleNames;if(n<0||n>=i.length)return""+r;var s=i[n]||null;return null===s||0===s.length?""+r:r+" ("+s+")"},o.prototype.getConflictingAlts=function(e,t){if(null!==e)return e;for(var r=new n,i=0;i<t.items.length;i++)r.add(t.items[i].alt);return"{"+r.values().join(", ")+"}"},t.DiagnosticErrorListener=o},58777:(e,t,r)=>{var n=r(67787),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},59198:()=>{var e,t,r,n;String.fromCodePoint||(e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t=String.fromCharCode,r=Math.floor,n=function(e){var n,i,s=[],o=-1,a=arguments.length;if(!a)return"";for(var l="";++o<a;){var p=Number(arguments[o]);if(!isFinite(p)||p<0||p>1114111||r(p)!=p)throw RangeError("Invalid code point: "+p);p<=65535?s.push(p):(n=55296+((p-=65536)>>10),i=p%1024+56320,s.push(n,i)),(o+1==a||s.length>16384)&&(l+=t.apply(null,s),s.length=0)}return l},e?e(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n)},59563:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(26228),i=r(82208);t.default=function e(t){if(void 0===t)return(0,i.identifier)("undefined");if(!0===t||!1===t)return(0,i.booleanLiteral)(t);if(null===t)return(0,i.nullLiteral)();if("string"==typeof t)return(0,i.stringLiteral)(t);if("number"==typeof t){let e;if(Number.isFinite(t))e=(0,i.numericLiteral)(Math.abs(t));else{let r;r=Number.isNaN(t)?(0,i.numericLiteral)(0):(0,i.numericLiteral)(1),e=(0,i.binaryExpression)("/",r,(0,i.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,i.unaryExpression)("-",e)),e}if("bigint"==typeof t)return t<0?(0,i.unaryExpression)("-",(0,i.bigIntLiteral)(-t)):(0,i.bigIntLiteral)(t);if(function(e){return"[object RegExp]"===s(e)}(t)){const e=t.source,r=/\/([a-z]*)$/.exec(t.toString())[1];return(0,i.regExpLiteral)(e,r)}if(Array.isArray(t))return(0,i.arrayExpression)(t.map(e));if(function(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(t)){const r=[];for(const s of Object.keys(t)){let o,a=!1;(0,n.default)(s)?"__proto__"===s?(a=!0,o=(0,i.stringLiteral)(s)):o=(0,i.identifier)(s):o=(0,i.stringLiteral)(s),r.push((0,i.objectProperty)(o,e(t[s]),a))}return(0,i.objectExpression)(r)}throw new Error("don't know how to turn this value into a node")};const s=Function.call.bind(Object.prototype.toString)},59751:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(!e)return;const o=n.NODE_FIELDS[e.type];if(!o)return;i(e,t,r,o[t]),s(e,t,r)},t.validateChild=s,t.validateField=i,t.validateInternal=function(e,t,r,i,s){if(null!=e&&e.validate&&(!e.optional||null!=i)&&(e.validate(t,r,i),s)){var o;const e=i.type;if(null==e)return;null==(o=n.NODE_PARENT_VALIDATIONS[e])||o.call(n.NODE_PARENT_VALIDATIONS,t,r,i)}};var n=r(35108);function i(e,t,r,n){null!=n&&n.validate&&(n.optional&&null==r||n.validate(e,t,r))}function s(e,t,r){var i;const s=null==r?void 0:r.type;null!=s&&(null==(i=n.NODE_PARENT_VALIDATIONS[s])||i.call(n.NODE_PARENT_VALIDATIONS,e,t,r))}},59892:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;const r=n.PLACEHOLDERS_ALIAS[e];return!(null==r||!r.includes(t))};var n=r(35108)},60124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.isVariableDeclaration)(e,{kind:"var"})&&!e[i]};var n=r(63555),i=Symbol.for("var used to be block scoped")},60581:function(e,t,r){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function s(e,t,r){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(67787).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function p(e,t,r,n){for(var i=0,s=Math.min(e.length,r),o=t;o<s;o++){var a=e.charCodeAt(o)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},s.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},s.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,s=0,o=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=l(e,t,n)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=l(e,t,n)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,o=s%n,a=Math.min(s,s-o)+r,l=0,u=r;u<a;u+=n)l=p(e,u,u+n,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var c=1;for(l=p(e,u,e.length,t),u=0;u<o;u++)c*=t;this.imuln(c),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;r.words[0]=a;for(var p=1;p<n;p++){for(var u=l>>>26,c=67108863&l,h=Math.min(p,t.length-1),d=Math.max(0,p-e.length+1);d<=h;d++){var f=p-d|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[d])+c)/67108864|0,c=67108863&o}r.words[p]=0|c,l=0|u}return 0!==l?r.words[p]=0|l:r.length--,r.strip()}s.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);r=0!=(s=a>>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=c[e],d=h[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(d).toString(e);r=(f=f.idivn(d)).isZero()?m+r:u[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===t,p=new e(s),u=this.clone();if(l){for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),p[a]=o;for(;a<s;a++)p[a]=0}else{for(a=0;a<s-i;a++)p[a]=0;for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),p[s-a-1]=o}return p},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},s.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)t=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<r.length;s++)t=(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,o=0;o<n.length;o++)s=(t=(0|r.words[o])-(0|n.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<r.length;o++)s=(t=(0|r.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,r){var n,i,s,o=e.words,a=t.words,l=r.words,p=0,u=0|o[0],c=8191&u,h=u>>>13,d=0|o[1],f=8191&d,m=d>>>13,y=0|o[2],g=8191&y,T=y>>>13,v=0|o[3],b=8191&v,S=v>>>13,x=0|o[4],E=8191&x,w=x>>>13,A=0|o[5],P=8191&A,I=A>>>13,C=0|o[6],_=8191&C,N=C>>>13,k=0|o[7],O=8191&k,M=k>>>13,L=0|o[8],D=8191&L,B=L>>>13,R=0|o[9],j=8191&R,F=R>>>13,U=0|a[0],q=8191&U,V=U>>>13,Y=0|a[1],K=8191&Y,$=Y>>>13,z=0|a[2],J=8191&z,H=z>>>13,X=0|a[3],W=8191&X,G=X>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,pe=ae>>>13,ue=0|a[8],ce=8191&ue,he=ue>>>13,de=0|a[9],fe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(p+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,V))+Math.imul(h,q)|0))<<13)|0;p=((s=Math.imul(h,V))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(f,q),i=(i=Math.imul(f,V))+Math.imul(m,q)|0,s=Math.imul(m,V);var ge=(p+(n=n+Math.imul(c,K)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(h,K)|0))<<13)|0;p=((s=s+Math.imul(h,$)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,q),i=(i=Math.imul(g,V))+Math.imul(T,q)|0,s=Math.imul(T,V),n=n+Math.imul(f,K)|0,i=(i=i+Math.imul(f,$)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,$)|0;var Te=(p+(n=n+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(h,J)|0))<<13)|0;p=((s=s+Math.imul(h,H)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,V))+Math.imul(S,q)|0,s=Math.imul(S,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,$)|0,n=n+Math.imul(f,J)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,H)|0;var ve=(p+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;p=((s=s+Math.imul(h,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,V))+Math.imul(w,q)|0,s=Math.imul(w,V),n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(S,K)|0,s=s+Math.imul(S,$)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,H)|0,n=n+Math.imul(f,W)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,W)|0,s=s+Math.imul(m,G)|0;var be=(p+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(h,Q)|0))<<13)|0;p=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,V))+Math.imul(I,q)|0,s=Math.imul(I,V),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(w,K)|0,s=s+Math.imul(w,$)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(S,J)|0,s=s+Math.imul(S,H)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(T,W)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var Se=(p+(n=n+Math.imul(c,re)|0)|0)+((8191&(i=(i=i+Math.imul(c,ne)|0)+Math.imul(h,re)|0))<<13)|0;p=((s=s+Math.imul(h,ne)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,V))+Math.imul(N,q)|0,s=Math.imul(N,V),n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(I,K)|0,s=s+Math.imul(I,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,H)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(S,W)|0,s=s+Math.imul(S,G)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(f,re)|0,i=(i=i+Math.imul(f,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0;var xe=(p+(n=n+Math.imul(c,se)|0)|0)+((8191&(i=(i=i+Math.imul(c,oe)|0)+Math.imul(h,se)|0))<<13)|0;p=((s=s+Math.imul(h,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,V))+Math.imul(M,q)|0,s=Math.imul(M,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(N,K)|0,s=s+Math.imul(N,$)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(I,J)|0,s=s+Math.imul(I,H)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(w,W)|0,s=s+Math.imul(w,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(T,re)|0,s=s+Math.imul(T,ne)|0,n=n+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Ee=(p+(n=n+Math.imul(c,le)|0)|0)+((8191&(i=(i=i+Math.imul(c,pe)|0)+Math.imul(h,le)|0))<<13)|0;p=((s=s+Math.imul(h,pe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(B,q)|0,s=Math.imul(B,V),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(M,K)|0,s=s+Math.imul(M,$)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,H)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,W)|0,s=s+Math.imul(I,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(S,re)|0,s=s+Math.imul(S,ne)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,oe)|0,n=n+Math.imul(f,le)|0,i=(i=i+Math.imul(f,pe)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,pe)|0;var we=(p+(n=n+Math.imul(c,ce)|0)|0)+((8191&(i=(i=i+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;p=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,V))+Math.imul(F,q)|0,s=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,K)|0,s=s+Math.imul(B,$)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,H)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(N,W)|0,s=s+Math.imul(N,G)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(w,re)|0,s=s+Math.imul(w,ne)|0,n=n+Math.imul(b,se)|0,i=(i=i+Math.imul(b,oe)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,oe)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,pe)|0)+Math.imul(T,le)|0,s=s+Math.imul(T,pe)|0,n=n+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,he)|0;var Ae=(p+(n=n+Math.imul(c,fe)|0)|0)+((8191&(i=(i=i+Math.imul(c,me)|0)+Math.imul(h,fe)|0))<<13)|0;p=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,$))+Math.imul(F,K)|0,s=Math.imul(F,$),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(B,J)|0,s=s+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(M,W)|0,s=s+Math.imul(M,G)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(N,Q)|0,s=s+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(I,re)|0,s=s+Math.imul(I,ne)|0,n=n+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,oe)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,pe)|0)+Math.imul(S,le)|0,s=s+Math.imul(S,pe)|0,n=n+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,he)|0;var Pe=(p+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;p=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,H))+Math.imul(F,J)|0,s=Math.imul(F,H),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(B,W)|0,s=s+Math.imul(B,G)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(N,re)|0,s=s+Math.imul(N,ne)|0,n=n+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,oe)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(w,le)|0,s=s+Math.imul(w,pe)|0,n=n+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,he)|0;var Ie=(p+(n=n+Math.imul(g,fe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(T,fe)|0))<<13)|0;p=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,G))+Math.imul(F,W)|0,s=Math.imul(F,G),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(M,re)|0,s=s+Math.imul(M,ne)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,oe)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,oe)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,pe)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,pe)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(w,ce)|0,s=s+Math.imul(w,he)|0;var Ce=(p+(n=n+Math.imul(b,fe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(S,fe)|0))<<13)|0;p=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,ee))+Math.imul(F,Q)|0,s=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,s=s+Math.imul(B,ne)|0,n=n+Math.imul(O,se)|0,i=(i=i+Math.imul(O,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,pe)|0)+Math.imul(N,le)|0,s=s+Math.imul(N,pe)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(I,ce)|0,s=s+Math.imul(I,he)|0;var _e=(p+(n=n+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(w,fe)|0))<<13)|0;p=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,s=Math.imul(F,ne),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(B,se)|0,s=s+Math.imul(B,oe)|0,n=n+Math.imul(O,le)|0,i=(i=i+Math.imul(O,pe)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,pe)|0,n=n+Math.imul(_,ce)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(N,ce)|0,s=s+Math.imul(N,he)|0;var Ne=(p+(n=n+Math.imul(P,fe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(I,fe)|0))<<13)|0;p=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,se),i=(i=Math.imul(j,oe))+Math.imul(F,se)|0,s=Math.imul(F,oe),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,pe)|0)+Math.imul(B,le)|0,s=s+Math.imul(B,pe)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,he)|0)+Math.imul(M,ce)|0,s=s+Math.imul(M,he)|0;var ke=(p+(n=n+Math.imul(_,fe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(N,fe)|0))<<13)|0;p=((s=s+Math.imul(N,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,pe))+Math.imul(F,le)|0,s=Math.imul(F,pe),n=n+Math.imul(D,ce)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,ce)|0,s=s+Math.imul(B,he)|0;var Oe=(p+(n=n+Math.imul(O,fe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(M,fe)|0))<<13)|0;p=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ce),i=(i=Math.imul(j,he))+Math.imul(F,ce)|0,s=Math.imul(F,he);var Me=(p+(n=n+Math.imul(D,fe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,fe)|0))<<13)|0;p=((s=s+Math.imul(B,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863;var Le=(p+(n=Math.imul(j,fe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,fe)|0))<<13)|0;return p=((s=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ye,l[1]=ge,l[2]=Te,l[3]=ve,l[4]=be,l[5]=Se,l[6]=xe,l[7]=Ee,l[8]=we,l[9]=Ae,l[10]=Pe,l[11]=Ie,l[12]=Ce,l[13]=_e,l[14]=Ne,l[15]=ke,l[16]=Oe,l[17]=Me,l[18]=Le,0!==p&&(l[19]=p,r.length++),r};function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(f=d),s.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?f(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var o=i;i=0;for(var a=67108863&n,l=Math.min(s,t.length-1),p=Math.max(0,s-e.length+1);p<=l;p++){var u=s-p,c=(0|e.words[u])*(0|t.words[p]),h=67108863&c;a=67108863&(h=h+a|0),i+=(o=(o=o+(c/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[s]=a,n=o,o=i}return 0!==n?r.words[s]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=s.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,s){for(var o=0;o<s;o++)n[o]=t[e[o]],i[o]=r[e[o]]},y.prototype.transform=function(e,t,r,n,i,s){this.permute(s,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),p=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var c=l,h=p,d=0;d<o;d++){var f=r[u+d],m=n[u+d],y=r[u+d+o],g=n[u+d+o],T=c*y-h*g;g=c*g+h*y,y=T,r[u+d]=f+y,n[u+d]=m+g,r[u+d+o]=f-y,n[u+d+o]=m-g,d!==a&&(T=l*c-p*h,h=l*h+p*c,c=T)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],r[2*o]=8191&s,s>>>=13,r[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===s),n(!(-8192&s))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),s=this.stub(n),o=new Array(n),a=new Array(n),l=new Array(n),p=new Array(n),u=new Array(n),c=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,p,n),this.transform(o,s,a,l,n,i),this.transform(p,s,u,c,n,i);for(var d=0;d<n;d++){var f=a[d]*u[d]-l[d]*c[d];l[d]=a[d]*c[d]+l[d]*u[d],a[d]=f}return this.conjugate(a,l,n),this.transform(a,l,h,s,n,i),this.conjugate(h,s,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[r]=67108863&s}return 0!==t&&(this.words[r]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},s.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,l=(0|this.words[t])-a<<r;this.words[t]=l|o,o=a>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,l=r;if(i-=o,i=Math.max(0,i),l){for(var p=0;p<o;p++)l.words[p]=this.words[p];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,p=0;p<this.length;p++)this.words[p]=this.words[p+o];else this.words[0]=0,this.length=1;var u=0;for(p=this.length-1;p>=0&&(0!==u||p>=i);p--){var c=0|this.words[p];this.words[p]=u<<26-s|c>>>s,u=c&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},s.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,r){var i,s,o=e.length+r;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)a=(s=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&s;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var p=0;p<a.length;p++)a.words[p]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,a&&(a.words[l]=1));for(var c=l-1;c>=0;c--){var h=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,c);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=h)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},s.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),p=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++p;for(var u=r.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;!(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(c)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(c)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),o.isub(l)):(r.isub(t),a.isub(i),l.isub(o))}return{a,b:l,gcd:r.iushln(p)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var p=0,u=1;!(t.words[0]&u)&&p<26;++p,u<<=1);if(p>0)for(t.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var c=0,h=1;!(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a)):(r.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return!(1&this.words[0])},s.prototype.isOdd=function(){return!(1&~this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,o=r;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new E(e)},s.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function T(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function w(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}T.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},T.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},T.prototype.split=function(e,t){e.iushrn(this.n,0,t)},T.prototype.imulK=function(e){return e.imul(this.k)},i(v,T),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(b,T),i(S,T),i(x,T),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new b;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new s(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),p=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,p).cmp(l);)u.redIAdd(l);for(var c=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),f=o;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<f);var g=this.pow(c,new s(1).iushln(f-y-1));h=h.redMul(g),c=g.redSqr(),d=d.redMul(c),f=y}return h},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new s(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var p=t.words[n],u=l-1;u>=0;u--){var c=p>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}l=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new w(e)},i(w,E),w.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},w.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},w.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},w.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},w.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},60616:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e,t),(0,i.default)(e,t),(0,s.default)(e,t),e};var n=r(6057),i=r(62563),s=r(25765)},60634:(e,t,r)=>{var n=r(72994).Token,i=r(18393).Lexer,s=r(51028).ATN,o=r(16068).e,a=r(41207).X,l=(r(87264).Q,r(87264).F),p=r(10559).PredictionContext,u=r(10559).SingletonPredictionContext,c=r(81367).RuleStopState,h=r(470).I,d=r(10014).Transition,f=r(96160).I,m=r(86587).LexerNoViableAltException;function y(e){e.index=-1,e.line=0,e.column=-1,e.dfaState=null}function g(){return y(this),this}function T(e,t,r,n){return o.call(this,t,n),this.decisionToDFA=r,this.recog=e,this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE,this.prevAccept=new g,this}g.prototype.reset=function(){y(this)},T.prototype=Object.create(o.prototype),T.prototype.constructor=T,T.debug=!1,T.dfa_debug=!1,T.MIN_DFA_EDGE=0,T.MAX_DFA_EDGE=127,T.match_calls=0,T.prototype.copyState=function(e){this.column=e.column,this.line=e.line,this.mode=e.mode,this.startIndex=e.startIndex},T.prototype.match=function(e,t){this.match_calls+=1,this.mode=t;var r=e.mark();try{this.startIndex=e.index,this.prevAccept.reset();var n=this.decisionToDFA[t];return null===n.s0?this.matchATN(e):this.execATN(e,n.s0)}finally{e.release(r)}},T.prototype.reset=function(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE},T.prototype.matchATN=function(e){var t=this.atn.modeToStartState[this.mode];T.debug&&console.log("matchATN mode "+this.mode+" start: "+t);var r=this.mode,n=this.computeStartState(e,t),i=n.hasSemanticContext;n.hasSemanticContext=!1;var s=this.addDFAState(n);i||(this.decisionToDFA[this.mode].s0=s);var o=this.execATN(e,s);return T.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[r].toLexerString()),o},T.prototype.execATN=function(e,t){T.debug&&console.log("start state closure="+t.configs),t.isAcceptState&&this.captureSimState(this.prevAccept,e,t);for(var r=e.LA(1),i=t;;){T.debug&&console.log("execATN loop starting closure: "+i.configs);var s=this.getExistingTargetState(i,r);if(null===s&&(s=this.computeTargetState(e,i,r)),s===o.ERROR)break;if(r!==n.EOF&&this.consume(e),s.isAcceptState&&(this.captureSimState(this.prevAccept,e,s),r===n.EOF))break;r=e.LA(1),i=s}return this.failOrAccept(this.prevAccept,e,i.configs,r)},T.prototype.getExistingTargetState=function(e,t){if(null===e.edges||t<T.MIN_DFA_EDGE||t>T.MAX_DFA_EDGE)return null;var r=e.edges[t-T.MIN_DFA_EDGE];return void 0===r&&(r=null),T.debug&&null!==r&&console.log("reuse state "+e.stateNumber+" edge to "+r.stateNumber),r},T.prototype.computeTargetState=function(e,t,r){var n=new l;return this.getReachableConfigSet(e,t.configs,n,r),0===n.items.length?(n.hasSemanticContext||this.addDFAEdge(t,r,o.ERROR),o.ERROR):this.addDFAEdge(t,r,null,n)},T.prototype.failOrAccept=function(e,t,r,i){if(null!==this.prevAccept.dfaState){var s=e.dfaState.lexerActionExecutor;return this.accept(t,s,this.startIndex,e.index,e.line,e.column),e.dfaState.prediction}if(i===n.EOF&&t.index===this.startIndex)return n.EOF;throw new m(this.recog,t,this.startIndex,r)},T.prototype.getReachableConfigSet=function(e,t,r,i){for(var o=s.INVALID_ALT_NUMBER,a=0;a<t.items.length;a++){var l=t.items[a],p=l.alt===o;if(!p||!l.passedThroughNonGreedyDecision){T.debug&&console.log("testing %s at %s\n",this.getTokenName(i),l.toString(this.recog,!0));for(var u=0;u<l.state.transitions.length;u++){var c=l.state.transitions[u],d=this.getReachableTarget(c,i);if(null!==d){var f=l.lexerActionExecutor;null!==f&&(f=f.fixOffsetBeforeMatch(e.index-this.startIndex));var m=i===n.EOF,y=new h({state:d,lexerActionExecutor:f},l);this.closure(e,y,r,p,!0,m)&&(o=l.alt)}}}}},T.prototype.accept=function(e,t,r,n,i,s){T.debug&&console.log("ACTION %s\n",t),e.seek(n),this.line=i,this.column=s,null!==t&&null!==this.recog&&t.execute(this.recog,e,r)},T.prototype.getReachableTarget=function(e,t){return e.matches(t,0,i.MAX_CHAR_VALUE)?e.target:null},T.prototype.computeStartState=function(e,t){for(var r=p.EMPTY,n=new l,i=0;i<t.transitions.length;i++){var s=t.transitions[i].target,o=new h({state:s,alt:i+1,context:r},null);this.closure(e,o,n,!1,!1,!1)}return n},T.prototype.closure=function(e,t,r,n,i,s){var o=null;if(T.debug&&console.log("closure("+t.toString(this.recog,!0)+")"),t.state instanceof c){if(T.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[t.state.ruleIndex],t):console.log("closure at rule stop %s\n",t)),null===t.context||t.context.hasEmptyPath()){if(null===t.context||t.context.isEmpty())return r.add(t),!0;r.add(new h({state:t.state,context:p.EMPTY},t)),n=!0}if(null!==t.context&&!t.context.isEmpty())for(var a=0;a<t.context.length;a++)if(t.context.getReturnState(a)!==p.EMPTY_RETURN_STATE){var l=t.context.getParent(a),u=this.atn.states[t.context.getReturnState(a)];o=new h({state:u,context:l},t),n=this.closure(e,o,r,n,i,s)}return n}t.state.epsilonOnlyTransitions||n&&t.passedThroughNonGreedyDecision||r.add(t);for(var d=0;d<t.state.transitions.length;d++){var f=t.state.transitions[d];null!==(o=this.getEpsilonTarget(e,t,f,r,i,s))&&(n=this.closure(e,o,r,n,i,s))}return n},T.prototype.getEpsilonTarget=function(e,t,r,s,o,a){var l=null;if(r.serializationType===d.RULE){var p=u.create(t.context,r.followState.stateNumber);l=new h({state:r.target,context:p},t)}else{if(r.serializationType===d.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(r.serializationType===d.PREDICATE)T.debug&&console.log("EVAL rule "+r.ruleIndex+":"+r.predIndex),s.hasSemanticContext=!0,this.evaluatePredicate(e,r.ruleIndex,r.predIndex,o)&&(l=new h({state:r.target},t));else if(r.serializationType===d.ACTION)if(null===t.context||t.context.hasEmptyPath()){var c=f.append(t.lexerActionExecutor,this.atn.lexerActions[r.actionIndex]);l=new h({state:r.target,lexerActionExecutor:c},t)}else l=new h({state:r.target},t);else r.serializationType===d.EPSILON?l=new h({state:r.target},t):r.serializationType!==d.ATOM&&r.serializationType!==d.RANGE&&r.serializationType!==d.SET||a&&r.matches(n.EOF,0,i.MAX_CHAR_VALUE)&&(l=new h({state:r.target},t))}return l},T.prototype.evaluatePredicate=function(e,t,r,n){if(null===this.recog)return!0;if(!n)return this.recog.sempred(null,t,r);var i=this.column,s=this.line,o=e.index,a=e.mark();try{return this.consume(e),this.recog.sempred(null,t,r)}finally{this.column=i,this.line=s,e.seek(o),e.release(a)}},T.prototype.captureSimState=function(e,t,r){e.index=t.index,e.line=this.line,e.column=this.column,e.dfaState=r},T.prototype.addDFAEdge=function(e,t,r,n){if(void 0===r&&(r=null),void 0===n&&(n=null),null===r&&null!==n){var i=n.hasSemanticContext;if(n.hasSemanticContext=!1,r=this.addDFAState(n),i)return r}return t<T.MIN_DFA_EDGE||t>T.MAX_DFA_EDGE||(T.debug&&console.log("EDGE "+e+" -> "+r+" upon "+t),null===e.edges&&(e.edges=[]),e.edges[t-T.MIN_DFA_EDGE]=r),r},T.prototype.addDFAState=function(e){for(var t=new a(null,e),r=null,n=0;n<e.items.length;n++){var i=e.items[n];if(i.state instanceof c){r=i;break}}null!==r&&(t.isAcceptState=!0,t.lexerActionExecutor=r.lexerActionExecutor,t.prediction=this.atn.ruleToTokenType[r.state.ruleIndex]);var s=this.decisionToDFA[this.mode],o=s.states.get(t);if(null!==o)return o;var l=t;return l.stateNumber=s.states.length,e.setReadonly(!0),l.configs=e,s.states.add(l),l},T.prototype.getDFA=function(e){return this.decisionToDFA[e]},T.prototype.getText=function(e){return e.getText(this.startIndex,e.index-1)},T.prototype.consume=function(e){e.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,e.consume()},T.prototype.getTokenName=function(e){return-1===e?"EOF":"'"+String.fromCharCode(e)+"'"},t.LexerATNSimulator=T},60752:(e,t,r)=>{function n(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}r.d(t,{A:()=>n})},61015:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(249),i=r(5981);t.default=class{constructor(e,t){var r;this._map=void 0,this._rawMappings=void 0,this._sourceFileName=void 0,this._lastGenLine=0,this._lastSourceLine=0,this._lastSourceColumn=0,this._inputMap=null;const s=this._map=new n.GenMapping({sourceRoot:e.sourceRoot});if(this._sourceFileName=null==(r=e.sourceFileName)?void 0:r.replace(/\\/g,"/"),this._rawMappings=void 0,e.inputSourceMap){this._inputMap=new i.TraceMap(e.inputSourceMap);const t=this._inputMap.resolvedSources;if(t.length)for(let e=0;e<t.length;e++){var o;(0,n.setSourceContent)(s,t[e],null==(o=this._inputMap.sourcesContent)?void 0:o[e])}}if("string"!=typeof t||e.inputSourceMap){if("object"==typeof t)for(const e of Object.keys(t))(0,n.setSourceContent)(s,e.replace(/\\/g,"/"),t[e])}else(0,n.setSourceContent)(s,this._sourceFileName,t)}get(){return(0,n.toEncodedMap)(this._map)}getDecoded(){return(0,n.toDecodedMap)(this._map)}getRawMappings(){return this._rawMappings||(this._rawMappings=(0,n.allMappings)(this._map))}mark(e,t,r,s,o,a){var l;let p;if(this._rawMappings=void 0,null!=t)if(this._inputMap){if(p=(0,i.originalPositionFor)(this._inputMap,{line:t,column:r}),!p.name&&o){const e=(0,i.originalPositionFor)(this._inputMap,o);e.name&&(s=e.name)}}else p={name:null,source:(null==a?void 0:a.replace(/\\/g,"/"))||this._sourceFileName,line:t,column:r};(0,n.maybeAddMapping)(this._map,{name:s,generated:e,source:null==(l=p)?void 0:l.source,original:p})}}},61625:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(!(0,n.isBlockStatement)(e)||!(0,n.isFunction)(t)&&!(0,n.isCatchClause)(t))&&(!(!(0,n.isPattern)(e)||!(0,n.isFunction)(t)&&!(0,n.isCatchClause)(t))||(0,n.isScopable)(e))};var n=r(63555)},61957:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(68830);t.default=function(e,t){return(0,n.default)(e,t,!0)}},62053:(e,t,r)=>{var n=r(79696).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function s(e){for(;0<e.length;e++)e[0]=0}function o(e,t,r,n,i){for(var s,o,a,l,p=r[0],u=r[1],c=r[2],h=r[3],d=e[0]^t[0],f=e[1]^t[1],m=e[2]^t[2],y=e[3]^t[3],g=4,T=1;T<i;T++)s=p[d>>>24]^u[f>>>16&255]^c[m>>>8&255]^h[255&y]^t[g++],o=p[f>>>24]^u[m>>>16&255]^c[y>>>8&255]^h[255&d]^t[g++],a=p[m>>>24]^u[y>>>16&255]^c[d>>>8&255]^h[255&f]^t[g++],l=p[y>>>24]^u[d>>>16&255]^c[f>>>8&255]^h[255&m]^t[g++],d=s,f=o,m=a,y=l;return s=(n[d>>>24]<<24|n[f>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^t[g++],o=(n[f>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^t[g++],a=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&f])^t[g++],l=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[f>>>8&255]<<8|n[255&m])^t[g++],[s>>>=0,o>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],s=[[],[],[],[]],o=0,a=0,l=0;l<256;++l){var p=a^a<<1^a<<2^a<<3^a<<4;p=p>>>8^255&p^99,r[o]=p,n[p]=o;var u=e[o],c=e[u],h=e[c],d=257*e[p]^16843008*p;i[0][o]=d<<24|d>>>8,i[1][o]=d<<16|d>>>16,i[2][o]=d<<8|d>>>24,i[3][o]=d,d=16843009*h^65537*c^257*u^16843008*o,s[0][p]=d<<24|d>>>8,s[1][p]=d<<16|d>>>16,s[2][p]=d<<8|d>>>24,s[3][p]=d,0===o?o=a=1:(o=u^e[e[e[h^u]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:s}}();function p(e){this._key=i(e),this._reset()}p.blockSize=16,p.keySize=32,p.prototype.blockSize=p.blockSize,p.prototype.keySize=p.keySize,p.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],s=0;s<t;s++)i[s]=e[s];for(s=t;s<n;s++){var o=i[s-1];s%t==0?(o=o<<8|o>>>24,o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o],o^=a[s/t|0]<<24):t>6&&s%t==4&&(o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o]),i[s]=i[s-t]^o}for(var p=[],u=0;u<n;u++){var c=n-u,h=i[c-(u%4?0:4)];p[u]=u<4||c<=4?h:l.INV_SUB_MIX[0][l.SBOX[h>>>24]]^l.INV_SUB_MIX[1][l.SBOX[h>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[h>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=p},p.prototype.encryptBlockRaw=function(e){return o(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},p.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},p.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),s=n.allocUnsafe(16);return s.writeUInt32BE(r[0],0),s.writeUInt32BE(r[3],4),s.writeUInt32BE(r[2],8),s.writeUInt32BE(r[1],12),s},p.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},e.exports.AES=p},62062:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildUndefinedNode=function(){return(0,n.unaryExpression)("void",(0,n.numericLiteral)(0),!0)};var n=r(82208)},62444:(e,t,r)=>{var n=r(67787).Buffer;const i=(()=>{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return t=>e.call(t)})();function s(e){return"Uint8Array"===i(e)}function o(e){return"object"==typeof e&&null!=e&&Symbol.toStringTag in e&&("ArrayBuffer"===e[Symbol.toStringTag]||"SharedArrayBuffer"===e[Symbol.toStringTag])}function a(e){return e instanceof RegExp||"[object RegExp]"===Object.prototype.toString.call(e)}function l(e){return"object"==typeof e&&null!=e&&Symbol.toStringTag in e&&"Map"===e[Symbol.toStringTag]}function p(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?{$numberLong:`${t}`}:l(t)?Object.fromEntries(t):t))}const c=7,h=Symbol.for("@@mdb.bson.version"),d=2147483647,f=-2147483648,m=Math.pow(2,63)-1,y=-Math.pow(2,63),g=Math.pow(2,53),T=-Math.pow(2,53),v=1,b=2,S=3,x=4,E=5,w=6,A=7,P=8,I=9,C=10,_=11,N=12,k=13,O=14,M=15,L=16,D=17,B=18,R=19,j=255,F=127,U=0,q=4,V=Object.freeze({double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:-1,maxKey:127});class Y extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(e,t){super(e,t)}static isBSONError(e){return null!=e&&"object"==typeof e&&"bsonError"in e&&!0===e.bsonError&&"name"in e&&"message"in e&&"stack"in e}}class K extends Y{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${c}.x.x`)}}class $ extends Y{get name(){return"BSONRuntimeError"}constructor(e){super(e)}}class z extends Y{get name(){return"BSONOffsetError"}offset;constructor(e,t,r){super(`${e}. offset: ${t}`,r),this.offset=t}}let J,H;function X(e,t,r,n){if(n){J??=new TextDecoder("utf8",{fatal:!0});try{return J.decode(e.subarray(t,r))}catch(e){throw new Y("Invalid UTF-8 string in BSON document",{cause:e})}}return H??=new TextDecoder("utf8",{fatal:!1}),H.decode(e.subarray(t,r))}function W(e,t,r){if(0===e.length)return"";const n=r-t;if(0===n)return"";if(n>20)return null;if(1===n&&e[t]<128)return String.fromCharCode(e[t]);if(2===n&&e[t]<128&&e[t+1]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(3===n&&e[t]<128&&e[t+1]<128&&e[t+2]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2]);const i=[];for(let n=t;n<r;n++){const t=e[n];if(t>127)return null;i.push(t)}return String.fromCharCode(...i)}function G(e){return ee.fromNumberArray(Array.from({length:e},(()=>Math.floor(256*Math.random()))))}function Z(e){return crypto.getRandomValues(ee.allocate(e))}const Q=(()=>{const{crypto:e}=globalThis;return null!=e&&"function"==typeof e.getRandomValues?Z:G})(),ee={isUint8Array:s,toLocalBufferType(e){if(n.isBuffer(e))return e;if(ArrayBuffer.isView(e))return n.from(e.buffer,e.byteOffset,e.byteLength);const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if("ArrayBuffer"===t||"SharedArrayBuffer"===t||"[object ArrayBuffer]"===t||"[object SharedArrayBuffer]"===t)return n.from(e);throw new Y("Cannot create Buffer from the passed potentialBuffer.")},allocate:e=>n.alloc(e),allocateUnsafe:e=>n.allocUnsafe(e),compare:(e,t)=>ee.toLocalBufferType(e).compare(t),concat:e=>n.concat(e),copy:(e,t,r,n,i)=>ee.toLocalBufferType(e).copy(t,r??0,n??0,i??e.length),equals:(e,t)=>ee.toLocalBufferType(e).equals(t),fromNumberArray:e=>n.from(e),fromBase64:e=>n.from(e,"base64"),fromUTF8:e=>n.from(e,"utf8"),toBase64:e=>ee.toLocalBufferType(e).toString("base64"),fromISO88591:e=>n.from(e,"binary"),toISO88591:e=>ee.toLocalBufferType(e).toString("binary"),fromHex:e=>n.from(e,"hex"),toHex:e=>ee.toLocalBufferType(e).toString("hex"),toUTF8(e,t,r,n){const i=r-t<=20?W(e,t,r):null;if(null!=i)return i;const s=ee.toLocalBufferType(e).toString("utf8",t,r);if(n)for(let n=0;n<s.length;n++)if(65533===s.charCodeAt(n)){X(e,t,r,!0);break}return s},utf8ByteLength:e=>n.byteLength(e,"utf8"),encodeUTF8Into(e,t,r){const n=function(e,t,r){if(0===t.length)return 0;if(t.length>25)return null;if(e.length-r<t.length)return null;for(let n=0,i=r;n<t.length;n++,i++){const r=t.charCodeAt(n);if(r>127)return null;e[i]=r}return t.length}(e,t,r);return null!=n?n:ee.toLocalBufferType(e).write(t,r,void 0,"utf8")},randomBytes:Q,swap32:e=>ee.toLocalBufferType(e).swap32()};function te(e){if(e<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${e}`);return ie.fromNumberArray(Array.from({length:e},(()=>Math.floor(256*Math.random()))))}const re=(()=>{const{crypto:e}=globalThis;if(null!=e&&"function"==typeof e.getRandomValues)return t=>e.getRandomValues(ie.allocate(t));if(function(){const{navigator:e}=globalThis;return"object"==typeof e&&"ReactNative"===e.product}()){const{console:e}=globalThis;e?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return te})(),ne=/(\d|[a-f])/i,ie={isUint8Array:s,toLocalBufferType(e){const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if("Uint8Array"===t)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));if("ArrayBuffer"===t||"SharedArrayBuffer"===t||"[object ArrayBuffer]"===t||"[object SharedArrayBuffer]"===t)return new Uint8Array(e);throw new Y("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(e){if("number"!=typeof e)throw new TypeError(`The "size" argument must be of type number. Received ${String(e)}`);return new Uint8Array(e)},allocateUnsafe:e=>ie.allocate(e),compare(e,t){if(e===t)return 0;const r=Math.min(e.length,t.length);for(let n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return e.length<t.length?-1:e.length>t.length?1:0},concat(e){if(0===e.length)return ie.allocate(0);let t=0;for(const r of e)t+=r.length;const r=ie.allocate(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r},copy(e,t,r,n,i){if(void 0!==i&&i<0)throw new RangeError(`The value of "sourceEnd" is out of range. It must be >= 0. Received ${i}`);if(i=i??e.length,void 0!==n&&(n<0||n>i))throw new RangeError(`The value of "sourceStart" is out of range. It must be >= 0 and <= ${i}. Received ${n}`);if(n=n??0,void 0!==r&&r<0)throw new RangeError(`The value of "targetStart" is out of range. It must be >= 0. Received ${r}`);r=r??0;const s=e.subarray(n,i),o=Math.min(s.length,t.length-r);return o<=0?0:(t.set(s.subarray(0,o),r),o)},equals(e,t){if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},fromNumberArray:e=>Uint8Array.from(e),fromBase64:e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))),fromUTF8:e=>(new TextEncoder).encode(e),toBase64:e=>btoa(ie.toISO88591(e)),fromISO88591:e=>Uint8Array.from(e,(e=>255&e.charCodeAt(0))),toISO88591:e=>Array.from(Uint16Array.from(e),(e=>String.fromCharCode(e))).join(""),fromHex(e){const t=e.length%2==0?e:e.slice(0,e.length-1),r=[];for(let e=0;e<t.length;e+=2){const n=t[e],i=t[e+1];if(!ne.test(n))break;if(!ne.test(i))break;const s=Number.parseInt(`${n}${i}`,16);r.push(s)}return Uint8Array.from(r)},toHex:e=>Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join(""),toUTF8(e,t,r,n){const i=r-t<=20?W(e,t,r):null;return null!=i?i:X(e,t,r,n)},utf8ByteLength:e=>(new TextEncoder).encode(e).byteLength,encodeUTF8Into(e,t,r){const n=(new TextEncoder).encode(t);return e.set(n,r),n.byteLength},randomBytes:re,swap32(e){if(e.length%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e.length;t+=4){const r=e[t],n=e[t+1],i=e[t+2],s=e[t+3];e[t]=s,e[t+1]=i,e[t+2]=n,e[t+3]=r}return e}},se="function"==typeof n&&!0!==n.prototype?._isBuffer?ee:ie,oe=Symbol.for("@@mdb.bson.type");class ae{get[oe](){return this._bsontype}get[h](){return c}[Symbol.for("nodejs.util.inspect.custom")](e,t,r){return this.inspect(e,t,r)}}const le=new Float64Array(1),pe=new Uint8Array(le.buffer,0,8);le[0]=-1;const ue=0===pe[7],ce={isBigEndian:ue,getNonnegativeInt32LE(e,t){if(e[t+3]>127)throw new RangeError(`Size cannot be negative at offset: ${t}`);return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getInt32LE:(e,t)=>e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,getUint32LE:(e,t)=>e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3],getUint32BE:(e,t)=>e[t+3]+256*e[t+2]+65536*e[t+1]+16777216*e[t],getBigInt64LE:(e,t)=>(BigInt(e[t+4]+256*e[t+5]+65536*e[t+6]+(e[t+7]<<24))<<32n)+BigInt(e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]),getFloat64LE:ue?(e,t)=>(pe[7]=e[t],pe[6]=e[t+1],pe[5]=e[t+2],pe[4]=e[t+3],pe[3]=e[t+4],pe[2]=e[t+5],pe[1]=e[t+6],pe[0]=e[t+7],le[0]):(e,t)=>(pe[0]=e[t],pe[1]=e[t+1],pe[2]=e[t+2],pe[3]=e[t+3],pe[4]=e[t+4],pe[5]=e[t+5],pe[6]=e[t+6],pe[7]=e[t+7],le[0]),setInt32BE:(e,t,r)=>(e[t+3]=r,r>>>=8,e[t+2]=r,r>>>=8,e[t+1]=r,r>>>=8,e[t]=r,4),setInt32LE:(e,t,r)=>(e[t]=r,r>>>=8,e[t+1]=r,r>>>=8,e[t+2]=r,r>>>=8,e[t+3]=r,4),setBigInt64LE(e,t,r){const n=0xffffffffn;let i=Number(r&n);e[t]=i,i>>=8,e[t+1]=i,i>>=8,e[t+2]=i,i>>=8,e[t+3]=i;let s=Number(r>>32n&n);return e[t+4]=s,s>>=8,e[t+5]=s,s>>=8,e[t+6]=s,s>>=8,e[t+7]=s,8},setFloat64LE:ue?(e,t,r)=>(le[0]=r,e[t]=pe[7],e[t+1]=pe[6],e[t+2]=pe[5],e[t+3]=pe[4],e[t+4]=pe[3],e[t+5]=pe[2],e[t+6]=pe[1],e[t+7]=pe[0],8):(e,t,r)=>(le[0]=r,e[t]=pe[0],e[t+1]=pe[1],e[t+2]=pe[2],e[t+3]=pe[3],e[t+4]=pe[4],e[t+5]=pe[5],e[t+6]=pe[6],e[t+7]=pe[7],8)};class he extends ae{get _bsontype(){return"Binary"}static BSON_BINARY_SUBTYPE_DEFAULT=0;static BUFFER_SIZE=256;static SUBTYPE_DEFAULT=0;static SUBTYPE_FUNCTION=1;static SUBTYPE_BYTE_ARRAY=2;static SUBTYPE_UUID_OLD=3;static SUBTYPE_UUID=4;static SUBTYPE_MD5=5;static SUBTYPE_ENCRYPTED=6;static SUBTYPE_COLUMN=7;static SUBTYPE_SENSITIVE=8;static SUBTYPE_VECTOR=9;static SUBTYPE_USER_DEFINED=128;static VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});buffer;sub_type;position;constructor(e,t){if(super(),null!=e&&"string"==typeof e&&!ArrayBuffer.isView(e)&&!o(e)&&!Array.isArray(e))throw new Y("Binary can only be constructed from Uint8Array or number[]");this.sub_type=t??he.BSON_BINARY_SUBTYPE_DEFAULT,null==e?(this.buffer=se.allocate(he.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(e)?se.fromNumberArray(e):se.toLocalBufferType(e),this.position=this.buffer.byteLength)}put(e){if("string"==typeof e&&1!==e.length)throw new Y("only accepts single character String");if("number"!=typeof e&&1!==e.length)throw new Y("only accepts single character Uint8Array or Array");let t;if(t="string"==typeof e?e.charCodeAt(0):"number"==typeof e?e:e[0],t<0||t>255)throw new Y("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=t;else{const e=se.allocate(he.BUFFER_SIZE+this.buffer.length);e.set(this.buffer,0),this.buffer=e,this.buffer[this.position++]=t}}write(e,t){if(t="number"==typeof t?t:this.position,this.buffer.byteLength<t+e.length){const t=se.allocate(this.buffer.byteLength+e.length);t.set(this.buffer,0),this.buffer=t}if(ArrayBuffer.isView(e))this.buffer.set(se.toLocalBufferType(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position;else if("string"==typeof e)throw new Y("input cannot be string")}read(e,t){const r=e+(t=t&&t>0?t:this.position);return this.buffer.subarray(e,r>this.position?this.position:r)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return se.toBase64(this.buffer.subarray(0,this.position))}toString(e){return"hex"===e?se.toHex(this.buffer.subarray(0,this.position)):"base64"===e?se.toBase64(this.buffer.subarray(0,this.position)):se.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(e){e=e||{},this.sub_type===he.SUBTYPE_VECTOR&&de(this);const t=se.toBase64(this.buffer),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}}toUUID(){if(this.sub_type===he.SUBTYPE_UUID)return new ye(this.buffer.subarray(0,this.position));throw new Y(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${he.SUBTYPE_UUID}" is currently supported.`)}static createFromHexString(e,t){return new he(se.fromHex(e),t)}static createFromBase64(e,t){return new he(se.fromBase64(e),t)}static fromExtendedJSON(e,t){let r,n;if(t=t||{},"$binary"in e?t.legacy&&"string"==typeof e.$binary&&"$type"in e?(n=e.$type?parseInt(e.$type,16):0,r=se.fromBase64(e.$binary)):"string"!=typeof e.$binary&&(n=e.$binary.subType?parseInt(e.$binary.subType,16):0,r=se.fromBase64(e.$binary.base64)):"$uuid"in e&&(n=4,r=ye.bytesFromString(e.$uuid)),!r)throw new Y(`Unexpected Binary Extended JSON format ${JSON.stringify(e)}`);return n===q?new ye(r):new he(r,n)}inspect(e,t,r){return r??=u,`Binary.createFromBase64(${r(se.toBase64(this.buffer.subarray(0,this.position)),t)}, ${r(this.sub_type,t)})`}toInt8Array(){if(this.sub_type!==he.SUBTYPE_VECTOR)throw new Y("Binary sub_type is not Vector");if(this.buffer[0]!==he.VECTOR_TYPE.Int8)throw new Y("Binary datatype field is not Int8");return de(this),new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==he.SUBTYPE_VECTOR)throw new Y("Binary sub_type is not Vector");if(this.buffer[0]!==he.VECTOR_TYPE.Float32)throw new Y("Binary datatype field is not Float32");de(this);const e=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return ce.isBigEndian&&se.swap32(e),new Float32Array(e.buffer)}toPackedBits(){if(this.sub_type!==he.SUBTYPE_VECTOR)throw new Y("Binary sub_type is not Vector");if(this.buffer[0]!==he.VECTOR_TYPE.PackedBit)throw new Y("Binary datatype field is not packed bit");return de(this),new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==he.SUBTYPE_VECTOR)throw new Y("Binary sub_type is not Vector");if(this.buffer[0]!==he.VECTOR_TYPE.PackedBit)throw new Y("Binary datatype field is not packed bit");de(this);const e=8*(this.length()-2)-this.buffer[1],t=new Int8Array(e);for(let e=0;e<t.length;e++){const r=e/8|0,n=this.buffer[r+2]>>7-e%8&1;t[e]=n}return t}static fromInt8Array(e){const t=se.allocate(e.byteLength+2);t[0]=he.VECTOR_TYPE.Int8,t[1]=0;const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.set(r,2);const n=new this(t,this.SUBTYPE_VECTOR);return de(n),n}static fromFloat32Array(e){const t=se.allocate(e.byteLength+2);t[0]=he.VECTOR_TYPE.Float32,t[1]=0;const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.set(r,2),ce.isBigEndian&&se.swap32(new Uint8Array(t.buffer,2));const n=new this(t,this.SUBTYPE_VECTOR);return de(n),n}static fromPackedBits(e,t=0){const r=se.allocate(e.byteLength+2);r[0]=he.VECTOR_TYPE.PackedBit,r[1]=t,r.set(e,2);const n=new this(r,this.SUBTYPE_VECTOR);return de(n),n}static fromBits(e){const t=e.length+7>>>3,r=new Uint8Array(t+2);r[0]=he.VECTOR_TYPE.PackedBit;const n=e.length%8;r[1]=0===n?0:8-n;for(let t=0;t<e.length;t++){const n=t>>>3,i=e[t];if(0!==i&&1!==i)throw new Y(`Invalid bit value at ${t}: must be 0 or 1, found ${e[t]}`);if(0===i)continue;const s=7-t%8;r[n+2]|=i<<s}return new this(r,he.SUBTYPE_VECTOR)}}function de(e){if(e.sub_type!==he.SUBTYPE_VECTOR)return;const t=e.position,r=e.buffer[0],n=e.buffer[1];if((r===he.VECTOR_TYPE.Float32||r===he.VECTOR_TYPE.Int8)&&0!==n)throw new Y("Invalid Vector: padding must be zero for int8 and float32 vectors");if(r===he.VECTOR_TYPE.Float32&&0!==t&&t-2!=0&&(t-2)%4!=0)throw new Y("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");if(r===he.VECTOR_TYPE.PackedBit&&0!==n&&2===t)throw new Y("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(r===he.VECTOR_TYPE.PackedBit&&n>7)throw new Y(`Invalid Vector: padding must be a value between 0 and 7. found: ${n}`)}const fe=/^[0-9A-F]{32}$/i,me=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class ye extends he{constructor(e){let t;if(null==e)t=ye.generate();else if(e instanceof ye)t=se.toLocalBufferType(new Uint8Array(e.buffer));else if(ArrayBuffer.isView(e)&&16===e.byteLength)t=se.toLocalBufferType(e);else{if("string"!=typeof e)throw new Y("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");t=ye.bytesFromString(e)}super(t,q)}get id(){return this.buffer}set id(e){this.buffer=e}toHexString(e=!0){return e?[se.toHex(this.buffer.subarray(0,4)),se.toHex(this.buffer.subarray(4,6)),se.toHex(this.buffer.subarray(6,8)),se.toHex(this.buffer.subarray(8,10)),se.toHex(this.buffer.subarray(10,16))].join("-"):se.toHex(this.buffer)}toString(e){return"hex"===e?se.toHex(this.id):"base64"===e?se.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(e){if(!e)return!1;if(e instanceof ye)return se.equals(e.id,this.id);try{return se.equals(new ye(e).id,this.id)}catch{return!1}}toBinary(){return new he(this.id,he.SUBTYPE_UUID)}static generate(){const e=se.randomBytes(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}static isValid(e){return!!e&&("string"==typeof e?ye.isValidUUIDString(e):s(e)?16===e.byteLength:"Binary"===e._bsontype&&e.sub_type===this.SUBTYPE_UUID&&16===e.buffer.byteLength)}static createFromHexString(e){const t=ye.bytesFromString(e);return new ye(t)}static createFromBase64(e){return new ye(se.fromBase64(e))}static bytesFromString(e){if(!ye.isValidUUIDString(e))throw new Y("UUID string representation must be 32 hex digits or canonical hyphenated representation");return se.fromHex(e.replace(/-/g,""))}static isValidUUIDString(e){return fe.test(e)||me.test(e)}inspect(e,t,r){return r??=u,`new UUID(${r(this.toHexString(),t)})`}}class ge extends ae{get _bsontype(){return"Code"}code;scope;constructor(e,t){super(),this.code=e.toString(),this.scope=t??null}toJSON(){return null!=this.scope?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(e){return new ge(e.$code,e.$scope)}inspect(e,t,r){r??=u;let n=r(this.code,t);const i=n.includes("\n");return null!=this.scope&&(n+=`,${i?"\n":" "}${r(this.scope,t)}`),`new Code(${i?"\n":""}${n}${i&&null===this.scope?"\n":""})`}}function Te(e){return null!=e&&"object"==typeof e&&"$id"in e&&null!=e.$id&&"$ref"in e&&"string"==typeof e.$ref&&(!("$db"in e)||"$db"in e&&"string"==typeof e.$db)}class ve extends ae{get _bsontype(){return"DBRef"}collection;oid;db;fields;constructor(e,t,r,n){super();const i=e.split(".");2===i.length&&(r=i.shift(),e=i.shift()),this.collection=e,this.oid=t,this.db=r,this.fields=n||{}}get namespace(){return this.collection}set namespace(e){this.collection=e}toJSON(){const e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e}toExtendedJSON(e){e=e||{};let t={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields)),t}static fromExtendedJSON(e){const t=Object.assign({},e);return delete t.$ref,delete t.$id,delete t.$db,new ve(e.$ref,e.$id,e.$db,t)}inspect(e,t,r){r??=u;const n=[r(this.namespace,t),r(this.oid,t),...this.db?[r(this.db,t)]:[],...Object.keys(this.fields).length>0?[r(this.fields,t)]:[]];return n[1]=r===u?`new ObjectId(${n[1]})`:n[1],`new DBRef(${n.join(", ")})`}}function be(e){if(""===e)return e;let t=0;const r="-"===e[t],n="+"===e[t];(n||r)&&(t+=1);let i=!1;for(;t<e.length&&"0"===e[t];++t)i=!0;return i?`${r?"-":""}${e.length===t?"0":e.slice(t)}`:n?e.slice(1):e}let Se;try{Se=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}const xe=4294967296,Ee=0x10000000000000000,we=Ee/2,Ae={},Pe={},Ie=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class Ce extends ae{get _bsontype(){return"Long"}get __isLong__(){return!0}high;low;unsigned;constructor(e=0,t,r){super();const n="boolean"==typeof t?t:Boolean(r),i="number"==typeof t?t:0,s="string"==typeof e?Ce.fromString(e,n):"bigint"==typeof e?Ce.fromBigInt(e,n):{low:0|e,high:0|i,unsigned:n};this.low=s.low,this.high=s.high,this.unsigned=s.unsigned}static TWO_PWR_24=Ce.fromInt(16777216);static MAX_UNSIGNED_VALUE=Ce.fromBits(-1,-1,!0);static ZERO=Ce.fromInt(0);static UZERO=Ce.fromInt(0,!0);static ONE=Ce.fromInt(1);static UONE=Ce.fromInt(1,!0);static NEG_ONE=Ce.fromInt(-1);static MAX_VALUE=Ce.fromBits(-1,2147483647,!1);static MIN_VALUE=Ce.fromBits(0,-2147483648,!1);static fromBits(e,t,r){return new Ce(e,t,r)}static fromInt(e,t){let r,n,i;return t?(i=0<=(e>>>=0)&&e<256)&&(n=Pe[e],n)?n:(r=Ce.fromBits(e,(0|e)<0?-1:0,!0),i&&(Pe[e]=r),r):(i=-128<=(e|=0)&&e<128)&&(n=Ae[e],n)?n:(r=Ce.fromBits(e,e<0?-1:0,!1),i&&(Ae[e]=r),r)}static fromNumber(e,t){if(isNaN(e))return t?Ce.UZERO:Ce.ZERO;if(t){if(e<0)return Ce.UZERO;if(e>=Ee)return Ce.MAX_UNSIGNED_VALUE}else{if(e<=-we)return Ce.MIN_VALUE;if(e+1>=we)return Ce.MAX_VALUE}return e<0?Ce.fromNumber(-e,t).neg():Ce.fromBits(e%xe|0,e/xe|0,t)}static fromBigInt(e,t){const r=0xffffffffn;return new Ce(Number(e&r),Number(e>>32n&r),t)}static _fromString(e,t,r){if(0===e.length)throw new Y("empty string");if(r<2||36<r)throw new Y("radix");let n;if((n=e.indexOf("-"))>0)throw new Y("interior hyphen");if(0===n)return Ce._fromString(e.substring(1),t,r).neg();const i=Ce.fromNumber(Math.pow(r,8));let s=Ce.ZERO;for(let t=0;t<e.length;t+=8){const n=Math.min(8,e.length-t),o=parseInt(e.substring(t,t+n),r);if(n<8){const e=Ce.fromNumber(Math.pow(r,n));s=s.mul(e).add(Ce.fromNumber(o))}else s=s.mul(i),s=s.add(Ce.fromNumber(o))}return s.unsigned=t,s}static fromStringStrict(e,t,r){let n=!1;if("number"==typeof t?(r=t,t=!1):n=!!t,r??=10,e.trim()!==e)throw new Y(`Input: '${e}' contains leading and/or trailing whitespace`);if(!function(e,t){const r="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,t=t??10);return!new RegExp(`[^-+${r}]`,"i").test(e)&&e}(e,r))throw new Y(`Input: '${e}' contains invalid characters for radix: ${r}`);const i=be(e),s=Ce._fromString(i,n,r);if(s.toString(r).toLowerCase()!==i.toLowerCase())throw new Y(`Input: ${e} is not representable as ${s.unsigned?"an unsigned":"a signed"} 64-bit Long ${null!=r?`with radix: ${r}`:""}`);return s}static fromString(e,t,r){let n=!1;return"number"==typeof t?(r=t,t=!1):n=!!t,r??=10,"NaN"===e&&r<24||("Infinity"===e||"+Infinity"===e||"-Infinity"===e)&&r<35?Ce.ZERO:Ce._fromString(e,n,r)}static fromBytes(e,t,r){return r?Ce.fromBytesLE(e,t):Ce.fromBytesBE(e,t)}static fromBytesLE(e,t){return new Ce(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)}static fromBytesBE(e,t){return new Ce(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}static isLong(e){return null!=e&&"object"==typeof e&&"__isLong__"in e&&!0===e.__isLong__}static fromValue(e,t){return"number"==typeof e?Ce.fromNumber(e,t):"string"==typeof e?Ce.fromString(e,t):Ce.fromBits(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}add(e){Ce.isLong(e)||(e=Ce.fromValue(e));const t=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,s=e.high>>>16,o=65535&e.high,a=e.low>>>16;let l=0,p=0,u=0,c=0;return c+=i+(65535&e.low),u+=c>>>16,c&=65535,u+=n+a,p+=u>>>16,u&=65535,p+=r+o,l+=p>>>16,p&=65535,l+=t+s,l&=65535,Ce.fromBits(u<<16|c,l<<16|p,this.unsigned)}and(e){return Ce.isLong(e)||(e=Ce.fromValue(e)),Ce.fromBits(this.low&e.low,this.high&e.high,this.unsigned)}compare(e){if(Ce.isLong(e)||(e=Ce.fromValue(e)),this.eq(e))return 0;const t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1}comp(e){return this.compare(e)}divide(e){if(Ce.isLong(e)||(e=Ce.fromValue(e)),e.isZero())throw new Y("division by zero");if(Se){if(!this.unsigned&&-2147483648===this.high&&-1===e.low&&-1===e.high)return this;const t=(this.unsigned?Se.div_u:Se.div_s)(this.low,this.high,e.low,e.high);return Ce.fromBits(t,Se.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Ce.UZERO:Ce.ZERO;let t,r,n;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return Ce.UZERO;if(e.gt(this.shru(1)))return Ce.UONE;n=Ce.UZERO}else{if(this.eq(Ce.MIN_VALUE))return e.eq(Ce.ONE)||e.eq(Ce.NEG_ONE)?Ce.MIN_VALUE:e.eq(Ce.MIN_VALUE)?Ce.ONE:(t=this.shr(1).div(e).shl(1),t.eq(Ce.ZERO)?e.isNegative()?Ce.ONE:Ce.NEG_ONE:(r=this.sub(e.mul(t)),n=t.add(r.div(e)),n));if(e.eq(Ce.MIN_VALUE))return this.unsigned?Ce.UZERO:Ce.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=Ce.ZERO}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));const i=Math.ceil(Math.log(t)/Math.LN2),s=i<=48?1:Math.pow(2,i-48);let o=Ce.fromNumber(t),a=o.mul(e);for(;a.isNegative()||a.gt(r);)t-=s,o=Ce.fromNumber(t,this.unsigned),a=o.mul(e);o.isZero()&&(o=Ce.ONE),n=n.add(o),r=r.sub(a)}return n}div(e){return this.divide(e)}equals(e){return Ce.isLong(e)||(e=Ce.fromValue(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low}eq(e){return this.equals(e)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(Ce.MIN_VALUE)?64:this.neg().getNumBitsAbs();const e=0!==this.high?this.high:this.low;let t;for(t=31;t>0&&!(e&1<<t);t--);return 0!==this.high?t+33:t+1}greaterThan(e){return this.comp(e)>0}gt(e){return this.greaterThan(e)}greaterThanOrEqual(e){return this.comp(e)>=0}gte(e){return this.greaterThanOrEqual(e)}ge(e){return this.greaterThanOrEqual(e)}isEven(){return!(1&this.low)}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return!(1&~this.low)}isPositive(){return this.unsigned||this.high>=0}isZero(){return 0===this.high&&0===this.low}lessThan(e){return this.comp(e)<0}lt(e){return this.lessThan(e)}lessThanOrEqual(e){return this.comp(e)<=0}lte(e){return this.lessThanOrEqual(e)}modulo(e){if(Ce.isLong(e)||(e=Ce.fromValue(e)),Se){const t=(this.unsigned?Se.rem_u:Se.rem_s)(this.low,this.high,e.low,e.high);return Ce.fromBits(t,Se.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))}mod(e){return this.modulo(e)}rem(e){return this.modulo(e)}multiply(e){if(this.isZero())return Ce.ZERO;if(Ce.isLong(e)||(e=Ce.fromValue(e)),Se){const t=Se.mul(this.low,this.high,e.low,e.high);return Ce.fromBits(t,Se.get_high(),this.unsigned)}if(e.isZero())return Ce.ZERO;if(this.eq(Ce.MIN_VALUE))return e.isOdd()?Ce.MIN_VALUE:Ce.ZERO;if(e.eq(Ce.MIN_VALUE))return this.isOdd()?Ce.MIN_VALUE:Ce.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(Ce.TWO_PWR_24)&&e.lt(Ce.TWO_PWR_24))return Ce.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);const t=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,s=e.high>>>16,o=65535&e.high,a=e.low>>>16,l=65535&e.low;let p=0,u=0,c=0,h=0;return h+=i*l,c+=h>>>16,h&=65535,c+=n*l,u+=c>>>16,c&=65535,c+=i*a,u+=c>>>16,c&=65535,u+=r*l,p+=u>>>16,u&=65535,u+=n*a,p+=u>>>16,u&=65535,u+=i*o,p+=u>>>16,u&=65535,p+=t*l+r*a+n*o+i*s,p&=65535,Ce.fromBits(c<<16|h,p<<16|u,this.unsigned)}mul(e){return this.multiply(e)}negate(){return!this.unsigned&&this.eq(Ce.MIN_VALUE)?Ce.MIN_VALUE:this.not().add(Ce.ONE)}neg(){return this.negate()}not(){return Ce.fromBits(~this.low,~this.high,this.unsigned)}notEquals(e){return!this.equals(e)}neq(e){return this.notEquals(e)}ne(e){return this.notEquals(e)}or(e){return Ce.isLong(e)||(e=Ce.fromValue(e)),Ce.fromBits(this.low|e.low,this.high|e.high,this.unsigned)}shiftLeft(e){return Ce.isLong(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?Ce.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):Ce.fromBits(0,this.low<<e-32,this.unsigned)}shl(e){return this.shiftLeft(e)}shiftRight(e){return Ce.isLong(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?Ce.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):Ce.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)}shr(e){return this.shiftRight(e)}shiftRightUnsigned(e){if(Ce.isLong(e)&&(e=e.toInt()),0==(e&=63))return this;{const t=this.high;if(e<32){const r=this.low;return Ce.fromBits(r>>>e|t<<32-e,t>>>e,this.unsigned)}return 32===e?Ce.fromBits(t,0,this.unsigned):Ce.fromBits(t>>>e-32,0,this.unsigned)}}shr_u(e){return this.shiftRightUnsigned(e)}shru(e){return this.shiftRightUnsigned(e)}subtract(e){return Ce.isLong(e)||(e=Ce.fromValue(e)),this.add(e.neg())}sub(e){return this.subtract(e)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*xe+(this.low>>>0):this.high*xe+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(e){return e?this.toBytesLE():this.toBytesBE()}toBytesLE(){const e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]}toBytesBE(){const e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]}toSigned(){return this.unsigned?Ce.fromBits(this.low,this.high,!1):this}toString(e){if((e=e||10)<2||36<e)throw new Y("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Ce.MIN_VALUE)){const t=Ce.fromNumber(e),r=this.div(t),n=r.mul(t).sub(this);return r.toString(e)+n.toInt().toString(e)}return"-"+this.neg().toString(e)}const t=Ce.fromNumber(Math.pow(e,6),this.unsigned);let r=this,n="";for(;;){const i=r.div(t);let s=(r.sub(i.mul(t)).toInt()>>>0).toString(e);if(r=i,r.isZero())return s+n;for(;s.length<6;)s="0"+s;n=""+s+n}}toUnsigned(){return this.unsigned?this:Ce.fromBits(this.low,this.high,!0)}xor(e){return Ce.isLong(e)||(e=Ce.fromValue(e)),Ce.fromBits(this.low^e.low,this.high^e.high,this.unsigned)}eqz(){return this.isZero()}le(e){return this.lessThanOrEqual(e)}toExtendedJSON(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(e,t){const{useBigInt64:r=!1,relaxed:n=!0}={...t};if(e.$numberLong.length>20)throw new Y("$numberLong string is too long");if(!Ie.test(e.$numberLong))throw new Y(`$numberLong string "${e.$numberLong}" is in an invalid format`);if(r){const t=BigInt(e.$numberLong);return BigInt.asIntN(64,t)}const i=Ce.fromString(e.$numberLong);return n?i.toNumber():i}inspect(e,t,r){return r??=u,`new Long(${r(this.toString(),t)}${this.unsigned?`, ${r(this.unsigned,t)}`:""})`}}const _e=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Ne=/^(\+|-)?(Infinity|inf)$/i,ke=/^(\+|-)?NaN$/i,Oe=6111,Me=-6176,Le=se.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),De=se.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),Be=se.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),Re=/^([-+])?(\d+)?$/;function je(e){return!isNaN(parseInt(e,10))}function Fe(e){const t=Ce.fromNumber(1e9);let r=Ce.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(let n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new Ce(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function Ue(e,t){throw new Y(`"${e}" is not a valid Decimal128 string - ${t}`)}class qe extends ae{get _bsontype(){return"Decimal128"}bytes;constructor(e){if(super(),"string"==typeof e)this.bytes=qe.fromString(e).bytes;else{if(!(e instanceof Uint8Array||s(e)))throw new Y("Decimal128 must take a Buffer or string");if(16!==e.byteLength)throw new Y("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}}static fromString(e){return qe._fromString(e,{allowRounding:!1})}static fromStringWithRounding(e){return qe._fromString(e,{allowRounding:!0})}static _fromString(e,t){let r=!1,n=!1,i=!1,s=!1,o=0,a=0,l=0,p=0,u=0;const c=[0];let h=0,d=0,f=0,m=0,y=new Ce(0,0),g=new Ce(0,0),T=0,v=0;if(e.length>=7e3)throw new Y(e+" not a valid Decimal128 string");const b=e.match(_e),S=e.match(Ne),x=e.match(ke);if(!b&&!S&&!x||0===e.length)throw new Y(e+" not a valid Decimal128 string");if(b){const t=b[2],r=b[4],n=b[5],i=b[6];r&&void 0===i&&Ue(e,"missing exponent power"),r&&void 0===t&&Ue(e,"missing exponent base"),void 0===r&&(n||i)&&Ue(e,"missing e before exponent")}if("+"!==e[v]&&"-"!==e[v]||(n=!0,r="-"===e[v++]),!je(e[v])&&"."!==e[v]){if("i"===e[v]||"I"===e[v])return new qe(r?De:Be);if("N"===e[v])return new qe(Le)}for(;je(e[v])||"."===e[v];)"."!==e[v]?(h<34&&("0"!==e[v]||s)&&(s||(u=a),s=!0,c[d++]=parseInt(e[v],10),h+=1),s&&(l+=1),i&&(p+=1),a+=1,v+=1):(i&&Ue(e,"contains multiple periods"),i=!0,v+=1);if(i&&!a)throw new Y(e+" not a valid Decimal128 string");if("e"===e[v]||"E"===e[v]){const t=e.substr(++v).match(Re);if(!t||!t[2])return new qe(Le);m=parseInt(t[0],10),v+=t[0].length}if(e[v])return new qe(Le);if(h){if(f=h-1,o=l,1!==o)for(;"0"===e[u+o-1+Number(n)+Number(i)];)o-=1}else c[0]=0,l=1,h=1,o=0;for(m<=p&&p>m+16384?m=Me:m-=p;m>Oe;){if(f+=1,f>=34){if(0===o){m=Oe;break}Ue(e,"overflow")}m-=1}if(t.allowRounding){for(;m<Me||h<l;){if(0===f&&o<h){m=Me,o=0;break}if(h<l?l-=1:f-=1,m<Oe)m+=1;else{if(c.join("").match(/^0+$/)){m=Oe;break}Ue(e,"overflow")}}if(f+1<o){let t=a;i&&(u+=1,t+=1),n&&(u+=1,t+=1);const s=parseInt(e[u+f+1],10);let o=0;if(s>=5&&(o=1,5===s)){o=c[f]%2==1?1:0;for(let r=u+f+2;r<t;r++)if(parseInt(e[r],10)){o=1;break}}if(o){let e=f;for(;e>=0&&++c[e]>9;e--)if(c[e]=0,0===e){if(!(m<Oe))return new qe(r?De:Be);m+=1,c[e]=1}}}}else{for(;m<Me||h<l;){if(0===f){if(0===o){m=Me;break}Ue(e,"exponent underflow")}h<l?("0"!==e[l-1+Number(n)+Number(i)]&&0!==o&&Ue(e,"inexact rounding"),l-=1):(0!==c[f]&&Ue(e,"inexact rounding"),f-=1),m<Oe?m+=1:Ue(e,"overflow")}f+1<o&&(i&&(u+=1),n&&(u+=1),0!==parseInt(e[u+f+1],10)&&Ue(e,"inexact rounding"))}if(y=Ce.fromNumber(0),g=Ce.fromNumber(0),0===o)y=Ce.fromNumber(0),g=Ce.fromNumber(0);else if(f<17){let e=0;for(g=Ce.fromNumber(c[e++]),y=new Ce(0,0);e<=f;e++)g=g.multiply(Ce.fromNumber(10)),g=g.add(Ce.fromNumber(c[e]))}else{let e=0;for(y=Ce.fromNumber(c[e++]);e<=f-17;e++)y=y.multiply(Ce.fromNumber(10)),y=y.add(Ce.fromNumber(c[e]));for(g=Ce.fromNumber(c[e++]);e<=f;e++)g=g.multiply(Ce.fromNumber(10)),g=g.add(Ce.fromNumber(c[e]))}const E=function(e,t){if(!e&&!t)return{high:Ce.fromNumber(0),low:Ce.fromNumber(0)};const r=e.shiftRightUnsigned(32),n=new Ce(e.getLowBits(),0),i=t.shiftRightUnsigned(32),s=new Ce(t.getLowBits(),0);let o=r.multiply(i),a=r.multiply(s);const l=n.multiply(i);let p=n.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new Ce(a.getLowBits(),0).add(l).add(p.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),p=a.shiftLeft(32).add(new Ce(p.getLowBits(),0)),{high:o,low:p}}(y,Ce.fromString("100000000000000000"));E.low=E.low.add(g),function(e,t){const r=e.high>>>0,n=t.high>>>0;return r<n||r===n&&e.low>>>0<t.low>>>0}(E.low,g)&&(E.high=E.high.add(Ce.fromNumber(1))),T=m+6176;const w={low:Ce.fromNumber(0),high:Ce.fromNumber(0)};E.high.shiftRightUnsigned(49).and(Ce.fromNumber(1)).equals(Ce.fromNumber(1))?(w.high=w.high.or(Ce.fromNumber(3).shiftLeft(61)),w.high=w.high.or(Ce.fromNumber(T).and(Ce.fromNumber(16383).shiftLeft(47))),w.high=w.high.or(E.high.and(Ce.fromNumber(0x7fffffffffff)))):(w.high=w.high.or(Ce.fromNumber(16383&T).shiftLeft(49)),w.high=w.high.or(E.high.and(Ce.fromNumber(562949953421311)))),w.low=E.low,r&&(w.high=w.high.or(Ce.fromString("9223372036854775808")));const A=se.allocateUnsafe(16);return v=0,A[v++]=255&w.low.low,A[v++]=w.low.low>>8&255,A[v++]=w.low.low>>16&255,A[v++]=w.low.low>>24&255,A[v++]=255&w.low.high,A[v++]=w.low.high>>8&255,A[v++]=w.low.high>>16&255,A[v++]=w.low.high>>24&255,A[v++]=255&w.high.low,A[v++]=w.high.low>>8&255,A[v++]=w.high.low>>16&255,A[v++]=w.high.low>>24&255,A[v++]=255&w.high.high,A[v++]=w.high.high>>8&255,A[v++]=w.high.high>>16&255,A[v++]=w.high.high>>24&255,new qe(A)}toString(){let e,t=0;const r=new Array(36);for(let e=0;e<r.length;e++)r[e]=0;let n,i,s,o=0,a=!1,l={parts:[0,0,0,0]};const p=[];o=0;const u=this.bytes,c=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24,h=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24,d=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24,f=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24;o=0,(new Ce(c,h),new Ce(d,f)).lessThan(Ce.ZERO)&&p.push("-");const m=f>>26&31;if(m>>3==3){if(30===m)return p.join("")+"Infinity";if(31===m)return"NaN";e=f>>15&16383,n=8+(f>>14&1)}else n=f>>14&7,e=f>>17&16383;const y=e-6176;if(l.parts[0]=(16383&f)+((15&n)<<14),l.parts[1]=d,l.parts[2]=h,l.parts[3]=c,0===l.parts[0]&&0===l.parts[1]&&0===l.parts[2]&&0===l.parts[3])a=!0;else for(s=3;s>=0;s--){let e=0;const t=Fe(l);if(l=t.quotient,e=t.rem.low,e)for(i=8;i>=0;i--)r[9*s+i]=e%10,e=Math.floor(e/10)}if(a)t=1,r[o]=0;else for(t=36;!r[o];)t-=1,o+=1;const g=t-1+y;if(g>=34||g<=-7||y>0){if(t>34)return p.push("0"),y>0?p.push(`E+${y}`):y<0&&p.push(`E${y}`),p.join("");p.push(`${r[o++]}`),t-=1,t&&p.push(".");for(let e=0;e<t;e++)p.push(`${r[o++]}`);p.push("E"),g>0?p.push(`+${g}`):p.push(`${g}`)}else if(y>=0)for(let e=0;e<t;e++)p.push(`${r[o++]}`);else{let e=t+y;if(e>0)for(let t=0;t<e;t++)p.push(`${r[o++]}`);else p.push("0");for(p.push(".");e++<0;)p.push("0");for(let n=0;n<t-Math.max(e-1,0);n++)p.push(`${r[o++]}`)}return p.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(e){return qe.fromString(e.$numberDecimal)}inspect(e,t,r){return r??=u,`new Decimal128(${r(this.toString(),t)})`}}class Ve extends ae{get _bsontype(){return"Double"}value;constructor(e){super(),e instanceof Number&&(e=e.valueOf()),this.value=+e}static fromString(e){const t=Number(e);if("NaN"===e)return new Ve(NaN);if("Infinity"===e)return new Ve(1/0);if("-Infinity"===e)return new Ve(-1/0);if(!Number.isFinite(t))throw new Y(`Input: ${e} is not representable as a Double`);if(e.trim()!==e)throw new Y(`Input: '${e}' contains whitespace`);if(""===e)throw new Y("Input is an empty string");if(/[^-0-9.+eE]/.test(e))throw new Y(`Input: '${e}' is not in decimal or exponential notation`);return new Ve(t)}valueOf(){return this.value}toJSON(){return this.value}toString(e){return this.value.toString(e)}toExtendedJSON(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(e,t){const r=parseFloat(e.$numberDouble);return t&&t.relaxed?r:new Ve(r)}inspect(e,t,r){return r??=u,`new Double(${r(this.value,t)})`}}class Ye extends ae{get _bsontype(){return"Int32"}value;constructor(e){super(),e instanceof Number&&(e=e.valueOf()),this.value=0|+e}static fromString(e){const t=be(e),r=Number(e);if(d<r)throw new Y(`Input: '${e}' is larger than the maximum value for Int32`);if(f>r)throw new Y(`Input: '${e}' is smaller than the minimum value for Int32`);if(!Number.isSafeInteger(r))throw new Y(`Input: '${e}' is not a safe integer`);if(r.toString()!==t)throw new Y(`Input: '${e}' is not a valid Int32 string`);return new Ye(r)}valueOf(){return this.value}toString(e){return this.value.toString(e)}toJSON(){return this.value}toExtendedJSON(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(e,t){return t&&t.relaxed?parseInt(e.$numberInt,10):new Ye(e.$numberInt)}inspect(e,t,r){return r??=u,`new Int32(${r(this.value,t)})`}}class Ke extends ae{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new Ke}inspect(){return"new MaxKey()"}}class $e extends ae{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new $e}inspect(){return"new MinKey()"}}let ze=null;const Je=new WeakMap;class He extends ae{get _bsontype(){return"ObjectId"}static index=Math.floor(16777215*Math.random());static cacheHexString;buffer;constructor(e){let t;if(super(),"object"==typeof e&&e&&"id"in e){if("string"!=typeof e.id&&!ArrayBuffer.isView(e.id))throw new Y("Argument passed in must have an id that is of type string or Buffer");t="toHexString"in e&&"function"==typeof e.toHexString?se.fromHex(e.toHexString()):e.id}else t=e;if(null==t)this.buffer=He.generate();else if(ArrayBuffer.isView(t)&&12===t.byteLength)this.buffer=se.toLocalBufferType(t);else{if("string"!=typeof t)throw new Y("Argument passed in does not match the accepted types");if(!He.validateHexString(t))throw new Y("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");this.buffer=se.fromHex(t),He.cacheHexString&&Je.set(this,t)}}get id(){return this.buffer}set id(e){this.buffer=e,He.cacheHexString&&Je.set(this,se.toHex(e))}static validateHexString(e){if(24!==e?.length)return!1;for(let t=0;t<24;t++){const r=e.charCodeAt(t);if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70))return!1}return!0}toHexString(){if(He.cacheHexString){const e=Je.get(this);if(e)return e}const e=se.toHex(this.id);return He.cacheHexString&&Je.set(this,e),e}static getInc(){return He.index=(He.index+1)%16777215}static generate(e){"number"!=typeof e&&(e=Math.floor(Date.now()/1e3));const t=He.getInc(),r=se.allocateUnsafe(12);return ce.setInt32BE(r,0,e),null===ze&&(ze=se.randomBytes(5)),r[4]=ze[0],r[5]=ze[1],r[6]=ze[2],r[7]=ze[3],r[8]=ze[4],r[11]=255&t,r[10]=t>>8&255,r[9]=t>>16&255,r}toString(e){return"base64"===e?se.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}static is(e){return null!=e&&"object"==typeof e&&"_bsontype"in e&&"ObjectId"===e._bsontype}equals(e){if(null==e)return!1;if(He.is(e))return this.buffer[11]===e.buffer[11]&&se.equals(this.buffer,e.buffer);if("string"==typeof e)return e.toLowerCase()===this.toHexString();if("object"==typeof e&&"function"==typeof e.toHexString){const t=e.toHexString(),r=this.toHexString();return"string"==typeof t&&t.toLowerCase()===r}return!1}getTimestamp(){const e=new Date,t=ce.getUint32BE(this.buffer,0);return e.setTime(1e3*Math.floor(t)),e}static createPk(){return new He}serializeInto(e,t){return e[t]=this.buffer[0],e[t+1]=this.buffer[1],e[t+2]=this.buffer[2],e[t+3]=this.buffer[3],e[t+4]=this.buffer[4],e[t+5]=this.buffer[5],e[t+6]=this.buffer[6],e[t+7]=this.buffer[7],e[t+8]=this.buffer[8],e[t+9]=this.buffer[9],e[t+10]=this.buffer[10],e[t+11]=this.buffer[11],12}static createFromTime(e){const t=se.allocate(12);for(let e=11;e>=4;e--)t[e]=0;return ce.setInt32BE(t,0,e),new He(t)}static createFromHexString(e){if(24!==e?.length)throw new Y("hex string must be 24 characters");return new He(se.fromHex(e))}static createFromBase64(e){if(16!==e?.length)throw new Y("base64 string must be 16 characters");return new He(se.fromBase64(e))}static isValid(e){if(null==e)return!1;if("string"==typeof e)return He.validateHexString(e);try{return new He(e),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(e){return new He(e.$oid)}isCached(){return He.cacheHexString&&Je.has(this)}inspect(e,t,r){return r??=u,`new ObjectId(${r(this.toHexString(),t)})`}}function Xe(e,t,r){let n=5;if(Array.isArray(e))for(let i=0;i<e.length;i++)n+=We(i.toString(),e[i],t,!0,r);else{"function"==typeof e?.toBSON&&(e=e.toBSON());for(const i of Object.keys(e))n+=We(i,e[i],t,!1,r)}return n}function We(e,t,r=!1,n=!1,i=!1){switch("function"==typeof t?.toBSON&&(t=t.toBSON()),typeof t){case"string":return 1+se.utf8ByteLength(e)+1+4+se.utf8ByteLength(t)+1;case"number":return Math.floor(t)===t&&t>=T&&t<=g&&t>=f&&t<=d?(null!=e?se.utf8ByteLength(e)+1:0)+5:(null!=e?se.utf8ByteLength(e)+1:0)+9;case"undefined":return n||!i?(null!=e?se.utf8ByteLength(e)+1:0)+1:0;case"boolean":return(null!=e?se.utf8ByteLength(e)+1:0)+2;case"object":if(null!=t&&"string"==typeof t._bsontype&&t[h]!==c)throw new K;if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?se.utf8ByteLength(e)+1:0)+1;if("ObjectId"===t._bsontype)return(null!=e?se.utf8ByteLength(e)+1:0)+13;if(t instanceof Date||p(t))return(null!=e?se.utf8ByteLength(e)+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||o(t))return(null!=e?se.utf8ByteLength(e)+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?se.utf8ByteLength(e)+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?se.utf8ByteLength(e)+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?se.utf8ByteLength(e)+1:0)+1+4+4+se.utf8ByteLength(t.code.toString())+1+Xe(t.scope,r,i):(null!=e?se.utf8ByteLength(e)+1:0)+1+4+se.utf8ByteLength(t.code.toString())+1;if("Binary"===t._bsontype){const r=t;return r.sub_type===he.SUBTYPE_BYTE_ARRAY?(null!=e?se.utf8ByteLength(e)+1:0)+(r.position+1+4+1+4):(null!=e?se.utf8ByteLength(e)+1:0)+(r.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?se.utf8ByteLength(e)+1:0)+se.utf8ByteLength(t.value)+4+1+1;if("DBRef"===t._bsontype){const n=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(n.$db=t.db),(null!=e?se.utf8ByteLength(e)+1:0)+1+Xe(n,r,i)}return t instanceof RegExp||a(t)?(null!=e?se.utf8ByteLength(e)+1:0)+1+se.utf8ByteLength(t.source)+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?se.utf8ByteLength(e)+1:0)+1+se.utf8ByteLength(t.pattern)+1+se.utf8ByteLength(t.options)+1:(null!=e?se.utf8ByteLength(e)+1:0)+Xe(t,r,i)+1;case"function":return r?(null!=e?se.utf8ByteLength(e)+1:0)+1+4+se.utf8ByteLength(t.toString())+1:0;case"bigint":return(null!=e?se.utf8ByteLength(e)+1:0)+9;case"symbol":return 0;default:throw new Y("Unrecognized JS type: "+typeof t)}}class Ge extends ae{get _bsontype(){return"BSONRegExp"}pattern;options;constructor(e,t){if(super(),this.pattern=e,this.options=(t??"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new Y(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(-1!==this.options.indexOf("\0"))throw new Y(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let e=0;e<this.options.length;e++)if("i"!==this.options[e]&&"m"!==this.options[e]&&"x"!==this.options[e]&&"l"!==this.options[e]&&"s"!==this.options[e]&&"u"!==this.options[e])throw new Y(`The regular expression option [${this.options[e]}] is not supported`)}static parseOptions(e){return e?e.split("").sort().join(""):""}toExtendedJSON(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(e){if("$regex"in e){if("string"==typeof e.$regex)return new Ge(e.$regex,Ge.parseOptions(e.$options));if("BSONRegExp"===e.$regex._bsontype)return e}if("$regularExpression"in e)return new Ge(e.$regularExpression.pattern,Ge.parseOptions(e.$regularExpression.options));throw new Y(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(e)}`)}inspect(e,t,r){const n=function(e){if(null!=e&&"object"==typeof e&&"stylize"in e&&"function"==typeof e.stylize)return e.stylize}(t)??(e=>e);return r??=u,`new BSONRegExp(${n(r(this.pattern),"regexp")}, ${n(r(this.options),"regexp")})`}}class Ze extends ae{get _bsontype(){return"BSONSymbol"}value;constructor(e){super(),this.value=e}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(e){return new Ze(e.$symbol)}inspect(e,t,r){return r??=u,`new BSONSymbol(${r(this.value,t)})`}}const Qe=Ce;class et extends Qe{get _bsontype(){return"Timestamp"}get[oe](){return"Timestamp"}static MAX_VALUE=Ce.MAX_UNSIGNED_VALUE;get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(e){if(null==e)super(0,0,!0);else if("bigint"==typeof e)super(e,!0);else if(Ce.isLong(e))super(e.low,e.high,!0);else{if("object"!=typeof e||!("t"in e)||!("i"in e))throw new Y("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }");{if("number"!=typeof e.t&&("object"!=typeof e.t||"Int32"!==e.t._bsontype))throw new Y("Timestamp constructed from { t, i } must provide t as a number");if("number"!=typeof e.i&&("object"!=typeof e.i||"Int32"!==e.i._bsontype))throw new Y("Timestamp constructed from { t, i } must provide i as a number");const t=Number(e.t),r=Number(e.i);if(t<0||Number.isNaN(t))throw new Y("Timestamp constructed from { t, i } must provide a positive t");if(r<0||Number.isNaN(r))throw new Y("Timestamp constructed from { t, i } must provide a positive i");if(t>4294967295)throw new Y("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(r>4294967295)throw new Y("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(r,t,!0)}}}toJSON(){return{$timestamp:this.toString()}}static fromInt(e){return new et(Ce.fromInt(e,!0))}static fromNumber(e){return new et(Ce.fromNumber(e,!0))}static fromBits(e,t){return new et({i:e,t})}static fromString(e,t){return new et(Ce.fromString(e,!0,t))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(e){const t=Ce.isLong(e.$timestamp.i)?e.$timestamp.i.getLowBitsUnsigned():e.$timestamp.i,r=Ce.isLong(e.$timestamp.t)?e.$timestamp.t.getLowBitsUnsigned():e.$timestamp.t;return new et({t:r,i:t})}inspect(e,t,r){return r??=u,`new Timestamp({ t: ${r(this.t,t)}, i: ${r(this.i,t)} })`}}const tt=Ce.fromNumber(g),rt=Ce.fromNumber(T);function nt(e,t,r){const n=(t=null==t?{}:t)&&t.index?t.index:0,i=ce.getInt32LE(e,n);if(i<5)throw new Y(`bson size must be >= 5, is ${i}`);if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new Y(`buffer length ${e.length} must be >= bson size ${i}`);if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new Y(`buffer length ${e.length} must === bson size ${i}`);if(i+n>e.byteLength)throw new Y(`(bson size ${i} + options.index ${n} must be <= buffer length ${e.byteLength})`);if(0!==e[n+i-1])throw new Y("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return st(e,n,t,r)}const it=/^\$ref$|^\$id$|^\$db$/;function st(e,t,r,n=!1){const i=null==r.fieldsAsRaw?null:r.fieldsAsRaw,s=null!=r.raw&&r.raw,o="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,a=r.promoteBuffers??!1,l=r.promoteLongs??!0,p=r.promoteValues??!0,u=r.useBigInt64??!1;if(u&&!p)throw new Y("Must either request bigint or Long for int64 deserialization");if(u&&!l)throw new Y("Must either request bigint or Long for int64 deserialization");let c,h,d=!0;const f=(null==r.validation?{utf8:!0}:r.validation).utf8;if("boolean"==typeof f)c=f;else{d=!1;const e=Object.keys(f).map((function(e){return f[e]}));if(0===e.length)throw new Y("UTF-8 validation setting cannot be empty");if("boolean"!=typeof e[0])throw new Y("Invalid UTF-8 validation option, must specify boolean values");if(c=e[0],!e.every((e=>e===c)))throw new Y("Invalid UTF-8 validation option - keys must be all true or all false")}if(!d){h=new Set;for(const e of Object.keys(f))h.add(e)}const m=t;if(e.length<5)throw new Y("corrupt bson message < 5 bytes long");const y=ce.getInt32LE(e,t);if(t+=4,y<5||y>e.length)throw new Y("corrupt bson message");const g=n?[]:{};let T=0,U=!n&&null;for(;;){const f=e[t++];if(0===f)break;let m=t;for(;0!==e[m]&&m<e.length;)m++;if(m>=e.byteLength)throw new Y("Bad BSON Document: illegal CString");const y=n?T++:se.toUTF8(e,t,m,!1);let V,K=!0;if(K=d||h?.has(y)?c:!c,!1!==U&&"$"===y[0]&&(U=it.test(y)),t=m+1,f===b){const r=ce.getInt32LE(e,t);if(t+=4,r<=0||r>e.length-t||0!==e[t+r-1])throw new Y("bad string length in bson");V=se.toUTF8(e,t,t+r-1,K),t+=r}else if(f===A){const r=se.allocateUnsafe(12);for(let n=0;n<12;n++)r[n]=e[t+n];V=new He(r),t+=12}else if(f===L&&!1===p)V=new Ye(ce.getInt32LE(e,t)),t+=4;else if(f===L)V=ce.getInt32LE(e,t),t+=4;else if(f===v)V=ce.getFloat64LE(e,t),t+=8,!1===p&&(V=new Ve(V));else if(f===I){const r=ce.getInt32LE(e,t),n=ce.getInt32LE(e,t+4);t+=8,V=new Date(new Ce(r,n).toNumber())}else if(f===P){if(0!==e[t]&&1!==e[t])throw new Y("illegal boolean type value");V=1===e[t++]}else if(f===S){const n=t,i=ce.getInt32LE(e,t);if(i<=0||i>e.length-t)throw new Y("bad embedded document length in bson");if(s)V=e.subarray(t,t+i);else{let t=r;d||(t={...r,validation:{utf8:K}}),V=st(e,n,t,!1)}t+=i}else if(f===x){const n=t,s=ce.getInt32LE(e,t);let o=r;const a=t+s;if(i&&i[y]&&(o={...r,raw:!0}),d||(o={...o,validation:{utf8:K}}),V=st(e,n,o,!0),0!==e[(t+=s)-1])throw new Y("invalid array terminator byte");if(t!==a)throw new Y("corrupted array bson")}else if(f===w)V=void 0;else if(f===C)V=null;else if(f===B)if(u)V=ce.getBigInt64LE(e,t),t+=8;else{const r=ce.getInt32LE(e,t),n=ce.getInt32LE(e,t+4);t+=8;const i=new Ce(r,n);V=l&&!0===p&&i.lessThanOrEqual(tt)&&i.greaterThanOrEqual(rt)?i.toNumber():i}else if(f===R){const r=se.allocateUnsafe(16);for(let n=0;n<16;n++)r[n]=e[t+n];t+=16,V=new qe(r)}else if(f===E){let r=ce.getInt32LE(e,t);t+=4;const n=r,i=e[t++];if(r<0)throw new Y("Negative binary type element size found");if(r>e.byteLength)throw new Y("Binary type size larger than document size");if(i===he.SUBTYPE_BYTE_ARRAY){if(r=ce.getInt32LE(e,t),t+=4,r<0)throw new Y("Negative binary type element size found for subtype 0x02");if(r>n-4)throw new Y("Binary type with subtype 0x02 contains too long binary size");if(r<n-4)throw new Y("Binary type with subtype 0x02 contains too short binary size")}a&&p?V=se.toLocalBufferType(e.subarray(t,t+r)):(V=new he(e.subarray(t,t+r),i),i===q&&ye.isValid(V)&&(V=V.toUUID())),t+=r}else if(f===_&&!1===o){for(m=t;0!==e[m]&&m<e.length;)m++;if(m>=e.length)throw new Y("Bad BSON Document: illegal CString");const r=se.toUTF8(e,t,m,!1);for(m=t=m+1;0!==e[m]&&m<e.length;)m++;if(m>=e.length)throw new Y("Bad BSON Document: illegal CString");const n=se.toUTF8(e,t,m,!1);t=m+1;const i=new Array(n.length);for(m=0;m<n.length;m++)switch(n[m]){case"m":i[m]="m";break;case"s":i[m]="g";break;case"i":i[m]="i"}V=new RegExp(r,i.join(""))}else if(f===_&&!0===o){for(m=t;0!==e[m]&&m<e.length;)m++;if(m>=e.length)throw new Y("Bad BSON Document: illegal CString");const r=se.toUTF8(e,t,m,!1);for(m=t=m+1;0!==e[m]&&m<e.length;)m++;if(m>=e.length)throw new Y("Bad BSON Document: illegal CString");const n=se.toUTF8(e,t,m,!1);t=m+1,V=new Ge(r,n)}else if(f===O){const r=ce.getInt32LE(e,t);if(t+=4,r<=0||r>e.length-t||0!==e[t+r-1])throw new Y("bad string length in bson");const n=se.toUTF8(e,t,t+r-1,K);V=p?n:new Ze(n),t+=r}else if(f===D)V=new et({i:ce.getUint32LE(e,t),t:ce.getUint32LE(e,t+4)}),t+=8;else if(f===j)V=new $e;else if(f===F)V=new Ke;else if(f===k){const r=ce.getInt32LE(e,t);if(t+=4,r<=0||r>e.length-t||0!==e[t+r-1])throw new Y("bad string length in bson");const n=se.toUTF8(e,t,t+r-1,K);V=new ge(n),t+=r}else if(f===M){const n=ce.getInt32LE(e,t);if(t+=4,n<13)throw new Y("code_w_scope total size shorter minimum expected length");const i=ce.getInt32LE(e,t);if(t+=4,i<=0||i>e.length-t||0!==e[t+i-1])throw new Y("bad string length in bson");const s=se.toUTF8(e,t,t+i-1,K),o=t+=i,a=ce.getInt32LE(e,t),l=st(e,o,r,!1);if(t+=a,n<8+a+i)throw new Y("code_w_scope total size is too short, truncating scope");if(n>8+a+i)throw new Y("code_w_scope total size is too long, clips outer document");V=new ge(s,l)}else{if(f!==N)throw new Y(`Detected unknown BSON type ${f.toString(16)} for fieldname "${y}"`);{const r=ce.getInt32LE(e,t);if(t+=4,r<=0||r>e.length-t||0!==e[t+r-1])throw new Y("bad string length in bson");const n=se.toUTF8(e,t,t+r-1,K);t+=r;const i=se.allocateUnsafe(12);for(let r=0;r<12;r++)i[r]=e[t+r];const s=new He(i);t+=12,V=new ve(n,s)}}"__proto__"===y?Object.defineProperty(g,y,{value:V,writable:!0,enumerable:!0,configurable:!0}):g[y]=V}if(y!==t-m){if(n)throw new Y("corrupt array bson");throw new Y("corrupt object bson")}if(!U)return g;if(Te(g)){const e=Object.assign({},g);return delete e.$ref,delete e.$id,delete e.$db,new ve(g.$ref,g.$id,g.$db,e)}return g}const ot=/\x00/,at=new Set(["$db","$ref","$id","$clusterTime"]);function lt(e,t,r,n){e[n++]=b,e[(n=n+se.encodeUTF8Into(e,t,n)+1)-1]=0;const i=se.encodeUTF8Into(e,r,n+4);return ce.setInt32LE(e,n,i+1),n=n+4+i,e[n++]=0,n}function pt(e,t,r,n){const i=!Object.is(r,-0)&&Number.isSafeInteger(r)&&r<=d&&r>=f?L:v;return e[n++]=i,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n+(i===L?ce.setInt32LE(e,n,r):ce.setFloat64LE(e,n,r))}function ut(e,t,r,n){return e[n++]=B,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n+ce.setBigInt64LE(e,n,r)}function ct(e,t,r,n){return e[n++]=C,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n}function ht(e,t,r,n){return e[n++]=P,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,e[n++]=r?1:0,n}function dt(e,t,r,n){e[n++]=I,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=Ce.fromNumber(r.getTime()),s=i.getLowBits(),o=i.getHighBits();return(n+=ce.setInt32LE(e,n,s))+ce.setInt32LE(e,n,o)}function ft(e,t,r,n){if(e[n++]=_,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,r.source&&null!=r.source.match(ot))throw new Y("value "+r.source+" must not contain null bytes");return n+=se.encodeUTF8Into(e,r.source,n),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function mt(e,t,r,n){if(e[n++]=_,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,null!=r.pattern.match(ot))throw new Y("pattern "+r.pattern+" must not contain null bytes");n+=se.encodeUTF8Into(e,r.pattern,n),e[n++]=0;const i=r.options.split("").sort().join("");return n+=se.encodeUTF8Into(e,i,n),e[n++]=0,n}function yt(e,t,r,n){return null===r?e[n++]=C:"MinKey"===r._bsontype?e[n++]=j:e[n++]=F,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n}function gt(e,t,r,n){return e[n++]=A,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n+r.serializeInto(e,n)}function Tt(e,t,r,n){e[n++]=E,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=r.length;if(n+=ce.setInt32LE(e,n,i),e[n++]=U,i<=16)for(let t=0;t<i;t++)e[n+t]=r[t];else e.set(r,n);return n+i}function vt(e,t,r,n,i,s,o,a,l){if(l.has(r))throw new Y("Cannot convert circular structure to BSON");l.add(r),e[n++]=Array.isArray(r)?x:S,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const p=_t(e,r,i,n,s+1,o,a,l);return l.delete(r),p}function bt(e,t,r,n){e[n++]=R,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;for(let t=0;t<16;t++)e[n+t]=r.bytes[t];return n+16}function St(e,t,r,n){e[n++]="Long"===r._bsontype?B:D,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=r.getLowBits(),s=r.getHighBits();return(n+=ce.setInt32LE(e,n,i))+ce.setInt32LE(e,n,s)}function xt(e,t,r,n){return r=r.valueOf(),e[n++]=L,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n+ce.setInt32LE(e,n,r)}function Et(e,t,r,n){return e[n++]=v,n+=se.encodeUTF8Into(e,t,n),e[n++]=0,n+ce.setFloat64LE(e,n,r.value)}function wt(e,t,r,n){e[n++]=k,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=r.toString(),s=se.encodeUTF8Into(e,i,n+4)+1;return ce.setInt32LE(e,n,s),n=n+4+s-1,e[n++]=0,n}function At(e,t,r,n,i=!1,s=0,o=!1,a=!0,l){if(r.scope&&"object"==typeof r.scope){e[n++]=M,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;let p=n;const u=r.code;n+=4;const c=se.encodeUTF8Into(e,u,n+4)+1;ce.setInt32LE(e,n,c),e[n+4+c-1]=0,n=n+c+4;const h=_t(e,r.scope,i,n,s+1,o,a,l);n=h-1;const d=h-p;p+=ce.setInt32LE(e,p,d),e[n++]=0}else{e[n++]=k,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=r.code.toString(),s=se.encodeUTF8Into(e,i,n+4)+1;ce.setInt32LE(e,n,s),n=n+4+s-1,e[n++]=0}return n}function Pt(e,t,r,n){e[n++]=E,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=r.buffer;let s=r.position;if(r.sub_type===he.SUBTYPE_BYTE_ARRAY&&(s+=4),n+=ce.setInt32LE(e,n,s),e[n++]=r.sub_type,r.sub_type===he.SUBTYPE_BYTE_ARRAY&&(s-=4,n+=ce.setInt32LE(e,n,s)),r.sub_type===he.SUBTYPE_VECTOR&&de(r),s<=16)for(let t=0;t<s;t++)e[n+t]=i[t];else e.set(i,n);return n+r.position}function It(e,t,r,n){e[n++]=O,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;const i=se.encodeUTF8Into(e,r.value,n+4)+1;return ce.setInt32LE(e,n,i),n=n+4+i-1,e[n++]=0,n}function Ct(e,t,r,n,i,s,o){e[n++]=S,n+=se.encodeUTF8Into(e,t,n),e[n++]=0;let a=n,l={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(l.$db=r.db),l=Object.assign(l,r.fields);const p=_t(e,l,!1,n,i+1,s,!0,o),u=p-a;return a+=ce.setInt32LE(e,n,u),p}function _t(e,t,r,n,i,u,d,f){if(null==f){if(null==t)return e[0]=5,e[1]=0,e[2]=0,e[3]=0,e[4]=0,5;if(Array.isArray(t))throw new Y("serialize does not support an array as the root input");if("object"!=typeof t)throw new Y("serialize does not support non-object as the root input");if("_bsontype"in t&&"string"==typeof t._bsontype)throw new Y("BSON types cannot be serialized as a document");if(p(t)||a(t)||s(t)||o(t))throw new Y("date, regexp, typedarray, and arraybuffer cannot be BSON documents");f=new Set}f.add(t);let m=n+4;if(Array.isArray(t))for(let n=0;n<t.length;n++){const o=`${n}`;let l=t[n];"function"==typeof l?.toBSON&&(l=l.toBSON());const y=typeof l;if(void 0===l)m=ct(e,o,0,m);else if(null===l)m=ct(e,o,0,m);else if("string"===y)m=lt(e,o,l,m);else if("number"===y)m=pt(e,o,l,m);else if("bigint"===y)m=ut(e,o,l,m);else if("boolean"===y)m=ht(e,o,l,m);else if("object"===y&&null==l._bsontype)m=l instanceof Date||p(l)?dt(e,o,l,m):l instanceof Uint8Array||s(l)?Tt(e,o,l,m):l instanceof RegExp||a(l)?ft(e,o,l,m):vt(e,o,l,m,r,i,u,d,f);else if("object"===y){if(l[h]!==c)throw new K;if("ObjectId"===l._bsontype)m=gt(e,o,l,m);else if("Decimal128"===l._bsontype)m=bt(e,o,l,m);else if("Long"===l._bsontype||"Timestamp"===l._bsontype)m=St(e,o,l,m);else if("Double"===l._bsontype)m=Et(e,o,l,m);else if("Code"===l._bsontype)m=At(e,o,l,m,r,i,u,d,f);else if("Binary"===l._bsontype)m=Pt(e,o,l,m);else if("BSONSymbol"===l._bsontype)m=It(e,o,l,m);else if("DBRef"===l._bsontype)m=Ct(e,o,l,m,i,u,f);else if("BSONRegExp"===l._bsontype)m=mt(e,o,l,m);else if("Int32"===l._bsontype)m=xt(e,o,l,m);else if("MinKey"===l._bsontype||"MaxKey"===l._bsontype)m=yt(e,o,l,m);else if(void 0!==l._bsontype)throw new Y(`Unrecognized or invalid _bsontype: ${String(l._bsontype)}`)}else"function"===y&&u&&(m=wt(e,o,l,m))}else if(t instanceof Map||l(t)){const n=t.entries();let o=!1;for(;!o;){const t=n.next();if(o=!!t.done,o)continue;const l=t.value?t.value[0]:void 0;let y=t.value?t.value[1]:void 0;"function"==typeof y?.toBSON&&(y=y.toBSON());const g=typeof y;if("string"==typeof l&&!at.has(l)){if(null!=l.match(ot))throw new Y("key "+l+" must not contain null bytes");if(r){if("$"===l[0])throw new Y("key "+l+" must not start with '$'");if(l.includes("."))throw new Y("key "+l+" must not contain '.'")}}if(void 0===y)!1===d&&(m=ct(e,l,0,m));else if(null===y)m=ct(e,l,0,m);else if("string"===g)m=lt(e,l,y,m);else if("number"===g)m=pt(e,l,y,m);else if("bigint"===g)m=ut(e,l,y,m);else if("boolean"===g)m=ht(e,l,y,m);else if("object"===g&&null==y._bsontype)m=y instanceof Date||p(y)?dt(e,l,y,m):y instanceof Uint8Array||s(y)?Tt(e,l,y,m):y instanceof RegExp||a(y)?ft(e,l,y,m):vt(e,l,y,m,r,i,u,d,f);else if("object"===g){if(y[h]!==c)throw new K;if("ObjectId"===y._bsontype)m=gt(e,l,y,m);else if("Decimal128"===y._bsontype)m=bt(e,l,y,m);else if("Long"===y._bsontype||"Timestamp"===y._bsontype)m=St(e,l,y,m);else if("Double"===y._bsontype)m=Et(e,l,y,m);else if("Code"===y._bsontype)m=At(e,l,y,m,r,i,u,d,f);else if("Binary"===y._bsontype)m=Pt(e,l,y,m);else if("BSONSymbol"===y._bsontype)m=It(e,l,y,m);else if("DBRef"===y._bsontype)m=Ct(e,l,y,m,i,u,f);else if("BSONRegExp"===y._bsontype)m=mt(e,l,y,m);else if("Int32"===y._bsontype)m=xt(e,l,y,m);else if("MinKey"===y._bsontype||"MaxKey"===y._bsontype)m=yt(e,l,y,m);else if(void 0!==y._bsontype)throw new Y(`Unrecognized or invalid _bsontype: ${String(y._bsontype)}`)}else"function"===g&&u&&(m=wt(e,l,y,m))}}else{if("function"==typeof t?.toBSON&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new Y("toBSON function did not return an object");for(const n of Object.keys(t)){let o=t[n];"function"==typeof o?.toBSON&&(o=o.toBSON());const l=typeof o;if("string"==typeof n&&!at.has(n)){if(null!=n.match(ot))throw new Y("key "+n+" must not contain null bytes");if(r){if("$"===n[0])throw new Y("key "+n+" must not start with '$'");if(n.includes("."))throw new Y("key "+n+" must not contain '.'")}}if(void 0===o)!1===d&&(m=ct(e,n,0,m));else if(null===o)m=ct(e,n,0,m);else if("string"===l)m=lt(e,n,o,m);else if("number"===l)m=pt(e,n,o,m);else if("bigint"===l)m=ut(e,n,o,m);else if("boolean"===l)m=ht(e,n,o,m);else if("object"===l&&null==o._bsontype)m=o instanceof Date||p(o)?dt(e,n,o,m):o instanceof Uint8Array||s(o)?Tt(e,n,o,m):o instanceof RegExp||a(o)?ft(e,n,o,m):vt(e,n,o,m,r,i,u,d,f);else if("object"===l){if(o[h]!==c)throw new K;if("ObjectId"===o._bsontype)m=gt(e,n,o,m);else if("Decimal128"===o._bsontype)m=bt(e,n,o,m);else if("Long"===o._bsontype||"Timestamp"===o._bsontype)m=St(e,n,o,m);else if("Double"===o._bsontype)m=Et(e,n,o,m);else if("Code"===o._bsontype)m=At(e,n,o,m,r,i,u,d,f);else if("Binary"===o._bsontype)m=Pt(e,n,o,m);else if("BSONSymbol"===o._bsontype)m=It(e,n,o,m);else if("DBRef"===o._bsontype)m=Ct(e,n,o,m,i,u,f);else if("BSONRegExp"===o._bsontype)m=mt(e,n,o,m);else if("Int32"===o._bsontype)m=xt(e,n,o,m);else if("MinKey"===o._bsontype||"MaxKey"===o._bsontype)m=yt(e,n,o,m);else if(void 0!==o._bsontype)throw new Y(`Unrecognized or invalid _bsontype: ${String(o._bsontype)}`)}else"function"===l&&u&&(m=wt(e,n,o,m))}}f.delete(t),e[m++]=0;const y=m-n;return n+=ce.setInt32LE(e,n,y),m}const Nt={$oid:He,$binary:he,$uuid:he,$symbol:Ze,$numberInt:Ye,$numberDecimal:qe,$numberDouble:Ve,$numberLong:Ce,$minKey:$e,$maxKey:Ke,$regex:Ge,$regularExpression:Ge,$timestamp:et};function kt(e,t={}){if("number"==typeof e){const r=e<=d&&e>=f,n=e<=m&&e>=y;if(t.relaxed||t.legacy)return e;if(Number.isInteger(e)&&!Object.is(e,-0)){if(r)return new Ye(e);if(n)return t.useBigInt64?BigInt(e):Ce.fromNumber(e)}return new Ve(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;const r=Object.keys(e).filter((t=>t.startsWith("$")&&null!=e[t]));for(let n=0;n<r.length;n++){const i=Nt[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){const r=e.$date,n=new Date;if(t.legacy)if("number"==typeof r)n.setTime(r);else if("string"==typeof r)n.setTime(Date.parse(r));else{if("bigint"!=typeof r)throw new $("Unrecognized type for EJSON date: "+typeof r);n.setTime(Number(r))}else if("string"==typeof r)n.setTime(Date.parse(r));else if(Ce.isLong(r))n.setTime(r.toNumber());else if("number"==typeof r&&t.relaxed)n.setTime(r);else{if("bigint"!=typeof r)throw new $("Unrecognized type for EJSON date: "+typeof r);n.setTime(Number(r))}return n}if(null!=e.$code){const t=Object.assign({},e);return e.$scope&&(t.$scope=kt(e.$scope)),ge.fromExtendedJSON(e)}if(Te(e)||e.$dbPointer){const t=e.$ref?e:e.$dbPointer;if(t instanceof ve)return t;const r=Object.keys(t).filter((e=>e.startsWith("$")));let n=!0;if(r.forEach((e=>{-1===["$ref","$id","$db"].indexOf(e)&&(n=!1)})),n)return ve.fromExtendedJSON(t)}return e}function Ot(e){const t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function Mt(e,t){if(e instanceof Map||l(e)){const r=Object.create(null);for(const[t,n]of e){if("string"!=typeof t)throw new Y("Can only serialize maps with string keys");r[t]=n}return Mt(r,t)}if(("object"==typeof e||"function"==typeof e)&&null!==e){const r=t.seenObjects.findIndex((t=>t.obj===e));if(-1!==r){const e=t.seenObjects.map((e=>e.propertyName)),n=e.slice(0,r).map((e=>`${e} -> `)).join(""),i=e[r],s=" -> "+e.slice(r+1,e.length-1).map((e=>`${e} -> `)).join(""),o=e[e.length-1],a=" ".repeat(n.length+i.length/2),l="-".repeat(s.length+(i.length+o.length)/2-1);throw new Y(`Converting circular structure to EJSON:\n ${n}${i}${s}${o}\n ${a}\\${l}/`)}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map(((e,r)=>{t.seenObjects.push({propertyName:`index ${r}`,obj:null});try{return Mt(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return t.ignoreUndefined?void 0:null;if(e instanceof Date||p(e)){const r=e.getTime(),n=r>-1&&r<2534023188e5;return t.legacy?t.relaxed&&n?{$date:e.getTime()}:{$date:Ot(e)}:t.relaxed&&n?{$date:Ot(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Number.isInteger(e)&&!Object.is(e,-0)){if(e>=f&&e<=d)return{$numberInt:e.toString()};if(e>=y&&e<=m)return{$numberLong:e.toString()}}return{$numberDouble:Object.is(e,-0)?"-0.0":e.toString()}}if("bigint"==typeof e)return t.relaxed?Number(BigInt.asIntN(64,e)):{$numberLong:BigInt.asIntN(64,e).toString()};if(e instanceof RegExp||a(e)){let r=e.flags;if(void 0===r){const t=e.toString().match(/[gimuy]*$/);t&&(r=t[0])}return new Ge(e.source,r).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new Y("not an object instance");const r=e._bsontype;if(void 0===r){const r={};for(const n of Object.keys(e)){t.seenObjects.push({propertyName:n,obj:null});try{const i=Mt(e[n],t);"__proto__"===n?Object.defineProperty(r,n,{value:i,writable:!0,enumerable:!0,configurable:!0}):r[n]=i}finally{t.seenObjects.pop()}}return r}if(null!=e&&"object"==typeof e&&"string"==typeof e._bsontype&&e[h]!==c)throw new K;if(function(e){return null!=e&&"object"==typeof e&&"_bsontype"in e&&"string"==typeof e._bsontype}(e)){let n=e;if("function"!=typeof n.toExtendedJSON){const t=Lt[e._bsontype];if(!t)throw new Y("Unrecognized or invalid _bsontype: "+e._bsontype);n=t(n)}return"Code"===r&&n.scope?n=new ge(n.code,Mt(n.scope,t)):"DBRef"===r&&n.oid&&(n=new ve(Mt(n.collection,t),Mt(n.oid,t),Mt(n.db,t),Mt(n.fields,t))),n.toExtendedJSON(t)}throw new Y("_bsontype must be a string, but was: "+typeof r)}(e,t):e}const Lt={Binary:e=>new he(e.value(),e.sub_type),Code:e=>new ge(e.code,e.scope),DBRef:e=>new ve(e.collection||e.namespace,e.oid,e.db,e.fields),Decimal128:e=>new qe(e.bytes),Double:e=>new Ve(e.value),Int32:e=>new Ye(e.value),Long:e=>Ce.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_),MaxKey:()=>new Ke,MinKey:()=>new $e,ObjectId:e=>new He(e),BSONRegExp:e=>new Ge(e.pattern,e.options),BSONSymbol:e=>new Ze(e.value),Timestamp:e=>et.fromBits(e.low,e.high)};function Dt(e,t){const r={useBigInt64:t?.useBigInt64??!1,relaxed:t?.relaxed??!0,legacy:t?.legacy??!1};return JSON.parse(e,((e,t)=>{if(-1!==e.indexOf("\0"))throw new Y(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(e)}`);return kt(t,r)}))}function Bt(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);const i=Mt(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}const Rt=Object.create(null);Rt.parse=Dt,Rt.stringify=Bt,Rt.serialize=function(e,t){return t=t||{},JSON.parse(Bt(e,t))},Rt.deserialize=function(e,t){return t=t||{},Dt(JSON.stringify(e),t)},Object.freeze(Rt);function jt(e,t){try{return ce.getNonnegativeInt32LE(e,t)}catch(e){throw new z("BSON size cannot be negative",t,{cause:e})}}function Ft(e,t){let r=t;for(;0!==e[r];r++);if(r===e.length-1)throw new z("Null terminator not found",t);return r}const Ut=Object.create(null);Ut.parseToElements=function(e,t=0){if(t??=0,e.length<5)throw new z(`Input must be at least 5 bytes, got ${e.length} bytes`,t);const r=jt(e,t);if(r>e.length-t)throw new z(`Parsed documentSize (${r} bytes) does not match input length (${e.length} bytes)`,t);if(0!==e[t+r-1])throw new z("BSON documents must end in 0x00",t+r);const n=[];let i=t+4;for(;i<=r+t;){const s=e[i];if(i+=1,0===s){if(i-t!==r)throw new z("Invalid 0x00 type byte",i);break}const o=i,a=Ft(e,i)-o;let l;if(i+=a+1,1===s||18===s||9===s||17===s)l=8;else if(16===s)l=4;else if(7===s)l=12;else if(19===s)l=16;else if(8===s)l=1;else if(10===s||6===s||127===s||255===s)l=0;else if(11===s)l=Ft(e,Ft(e,i)+1)+1-i;else if(3===s||4===s||15===s)l=jt(e,i);else{if(2!==s&&5!==s&&12!==s&&13!==s&&14!==s)throw new z(`Invalid 0x${s.toString(16).padStart(2,"0")} type byte`,i);l=jt(e,i)+4,5===s&&(l+=1),12===s&&(l+=12)}if(l>r)throw new z("value reports length larger than document",i);n.push([s,o,a,i,l]),i+=l}return n},Ut.ByteUtils=se,Ut.NumberUtils=ce,Object.freeze(Ut);const qt=17825792;let Vt=se.allocate(qt);function Yt(e){Vt.length<e&&(Vt=se.allocate(e))}function Kt(e,t={}){const r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,s="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:qt;Vt.length<s&&(Vt=se.allocate(s));const o=_t(Vt,e,r,0,0,n,i,null),a=se.allocateUnsafe(o);return a.set(Vt.subarray(0,o),0),a}function $t(e,t,r={}){const n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,s="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,o="number"==typeof r.index?r.index:0,a=_t(Vt,e,n,0,0,i,s,null);return t.set(Vt.subarray(0,a),o),o+a-1}function zt(e,t={}){return nt(se.toLocalBufferType(e),t)}function Jt(e,t={}){return Xe(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function Ht(e,t,r,n,i,s){const o=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},s),a=se.toLocalBufferType(e);let l=t;for(let e=0;e<r;e++){const t=ce.getInt32LE(a,l);o.index=l,n[i+e]=nt(a,o),l+=t}return l}var Xt=Object.freeze({__proto__:null,BSONError:Y,BSONOffsetError:z,BSONRegExp:Ge,BSONRuntimeError:$,BSONSymbol:Ze,BSONType:V,BSONValue:ae,BSONVersionError:K,Binary:he,ByteUtils:se,Code:ge,DBRef:ve,Decimal128:qe,Double:Ve,EJSON:Rt,Int32:Ye,Long:Ce,MaxKey:Ke,MinKey:$e,NumberUtils:ce,ObjectId:He,Timestamp:et,UUID:ye,bsonType:oe,calculateObjectSize:Jt,deserialize:zt,deserializeStream:Ht,onDemand:Ut,serialize:Kt,serializeWithBufferAndIndex:$t,setInternalBufferSize:Yt});t.BSON=Xt,t.BSONError=Y,t.BSONOffsetError=z,t.BSONRegExp=Ge,t.BSONRuntimeError=$,t.BSONSymbol=Ze,t.BSONType=V,t.BSONValue=ae,t.BSONVersionError=K,t.Binary=he,t.ByteUtils=se,t.Code=ge,t.DBRef=ve,t.Decimal128=qe,t.Double=Ve,t.EJSON=Rt,t.Int32=Ye,t.Long=Ce,t.MaxKey=Ke,t.MinKey=$e,t.NumberUtils=ce,t.ObjectId=He,t.Timestamp=et,t.UUID=ye,t.bsonType=oe,t.calculateObjectSize=Jt,t.deserialize=zt,t.deserializeStream=Ht,t.onDemand=Ut,t.serialize=Kt,t.serializeWithBufferAndIndex=$t,t.setInternalBufferSize=Yt},62563:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)("leadingComments",e,t)};var n=r(26284)},62811:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_OPERATORS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.STATEMENT_OR_BLOCK_KEYS=t.NUMBER_UNARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=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.BINARY_OPERATORS=t.ASSIGNMENT_OPERATORS=void 0,t.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],t.FLATTENABLE_KEYS=["body","expressions"],t.FOR_INIT_KEYS=["left","init"],t.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];const r=t.LOGICAL_OPERATORS=["||","&&","??"],n=(t.UPDATE_OPERATORS=["++","--"],t.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),i=t.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],s=t.COMPARISON_BINARY_OPERATORS=[...i,"in","instanceof"],o=t.BOOLEAN_BINARY_OPERATORS=[...s,...n],a=t.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(t.BINARY_OPERATORS=["+",...a,...o,"|>"],t.ASSIGNMENT_OPERATORS=["=","+=",...a.map((e=>e+"=")),...r.map((e=>e+"="))],t.BOOLEAN_UNARY_OPERATORS=["delete","!"]),p=t.NUMBER_UNARY_OPERATORS=["+","-","~"],u=t.STRING_UNARY_OPERATORS=["typeof"];t.UNARY_OPERATORS=["void","throw",...l,...p,...u],t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},t.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped"),t.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding")},62816:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.isVariableDeclaration)(e)&&("var"!==e.kind||e[i])};var n=r(63555),i=Symbol.for("var used to be block scoped")},63387:(e,t,r)=>{r(66346).Set;var n=r(66346).Map,i=r(66346).BitSet,s=r(66346).AltDict,o=r(51028).ATN,a=r(81367).RuleStopState,l=r(87264).Q,p=r(470).G,u=r(7842).Ij,c=(r(66346).Hash,r(66346).hashStuff);function h(){return this}r(66346).equalArrays,h.SLL=0,h.LL=1,h.LL_EXACT_AMBIG_DETECTION=2,h.hasSLLConflictTerminatingPrediction=function(e,t){if(h.allConfigsInRuleStopStates(t))return!0;if(e===h.SLL&&t.hasSemanticContext){for(var r=new l,n=0;n<t.items.length;n++){var i=t.items[n];i=new p({semanticContext:u.NONE},i),r.add(i)}t=r}var s=h.getConflictingAltSubsets(t);return h.hasConflictingAltSet(s)&&!h.hasStateAssociatedWithOneAlt(t)},h.hasConfigInRuleStopState=function(e){for(var t=0;t<e.items.length;t++)if(e.items[t].state instanceof a)return!0;return!1},h.allConfigsInRuleStopStates=function(e){for(var t=0;t<e.items.length;t++)if(!(e.items[t].state instanceof a))return!1;return!0},h.resolvesToJustOneViableAlt=function(e){return h.getSingleViableAlt(e)},h.allSubsetsConflict=function(e){return!h.hasNonConflictingAltSet(e)},h.hasNonConflictingAltSet=function(e){for(var t=0;t<e.length;t++)if(1===e[t].length)return!0;return!1},h.hasConflictingAltSet=function(e){for(var t=0;t<e.length;t++)if(e[t].length>1)return!0;return!1},h.allSubsetsEqual=function(e){for(var t=null,r=0;r<e.length;r++){var n=e[r];if(null===t)t=n;else if(n!==t)return!1}return!0},h.getUniqueAlt=function(e){var t=h.getAlts(e);return 1===t.length?t.minValue():o.INVALID_ALT_NUMBER},h.getAlts=function(e){var t=new i;return e.map((function(e){t.or(e)})),t},h.getConflictingAltSubsets=function(e){var t=new n;return t.hashFunction=function(e){c(e.state.stateNumber,e.context)},t.equalsFunction=function(e,t){return e.state.stateNumber==t.state.stateNumber&&e.context.equals(t.context)},e.items.map((function(e){var r=t.get(e);null===r&&(r=new i,t.put(e,r)),r.add(e.alt)})),t.getValues()},h.getStateToAltMap=function(e){var t=new s;return e.items.map((function(e){var r=t.get(e.state);null===r&&(r=new i,t.put(e.state,r)),r.add(e.alt)})),t},h.hasStateAssociatedWithOneAlt=function(e){for(var t=h.getStateToAltMap(e).values(),r=0;r<t.length;r++)if(1===t[r].length)return!0;return!1},h.getSingleViableAlt=function(e){for(var t=null,r=0;r<e.length;r++){var n=e[r].minValue();if(null===t)t=n;else if(t!==n)return o.INVALID_ALT_NUMBER}return t},t.PredictionMode=h},63555:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessor=function(e,t){return!!e&&("ClassAccessorProperty"===e.type&&(null==t||(0,n.default)(e,t)))},t.isAnyTypeAnnotation=function(e,t){return!!e&&"AnyTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isArgumentPlaceholder=function(e,t){return!!e&&"ArgumentPlaceholder"===e.type&&(null==t||(0,n.default)(e,t))},t.isArrayExpression=function(e,t){return!!e&&"ArrayExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isArrayPattern=function(e,t){return!!e&&"ArrayPattern"===e.type&&(null==t||(0,n.default)(e,t))},t.isArrayTypeAnnotation=function(e,t){return!!e&&"ArrayTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isArrowFunctionExpression=function(e,t){return!!e&&"ArrowFunctionExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isAssignmentExpression=function(e,t){return!!e&&"AssignmentExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isAssignmentPattern=function(e,t){return!!e&&"AssignmentPattern"===e.type&&(null==t||(0,n.default)(e,t))},t.isAwaitExpression=function(e,t){return!!e&&"AwaitExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isBigIntLiteral=function(e,t){return!!e&&"BigIntLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isBinary=function(e,t){if(!e)return!1;switch(e.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isBinaryExpression=function(e,t){return!!e&&"BinaryExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isBindExpression=function(e,t){return!!e&&"BindExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isBlock=function(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isBlockParent=function(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isBlockStatement=function(e,t){return!!e&&"BlockStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isBooleanLiteral=function(e,t){return!!e&&"BooleanLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isBooleanLiteralTypeAnnotation=function(e,t){return!!e&&"BooleanLiteralTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isBooleanTypeAnnotation=function(e,t){return!!e&&"BooleanTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isBreakStatement=function(e,t){return!!e&&"BreakStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isCallExpression=function(e,t){return!!e&&"CallExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isCatchClause=function(e,t){return!!e&&"CatchClause"===e.type&&(null==t||(0,n.default)(e,t))},t.isClass=function(e,t){if(!e)return!1;switch(e.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isClassAccessorProperty=function(e,t){return!!e&&"ClassAccessorProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassBody=function(e,t){return!!e&&"ClassBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassDeclaration=function(e,t){return!!e&&"ClassDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassExpression=function(e,t){return!!e&&"ClassExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassImplements=function(e,t){return!!e&&"ClassImplements"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassMethod=function(e,t){return!!e&&"ClassMethod"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassPrivateMethod=function(e,t){return!!e&&"ClassPrivateMethod"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassPrivateProperty=function(e,t){return!!e&&"ClassPrivateProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isClassProperty=function(e,t){return!!e&&"ClassProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isCompletionStatement=function(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isConditional=function(e,t){if(!e)return!1;switch(e.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isConditionalExpression=function(e,t){return!!e&&"ConditionalExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isContinueStatement=function(e,t){return!!e&&"ContinueStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isDebuggerStatement=function(e,t){return!!e&&"DebuggerStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isDecimalLiteral=function(e,t){return!!e&&"DecimalLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclaration=function(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if("Declaration"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isDeclareClass=function(e,t){return!!e&&"DeclareClass"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareExportAllDeclaration=function(e,t){return!!e&&"DeclareExportAllDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareExportDeclaration=function(e,t){return!!e&&"DeclareExportDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareFunction=function(e,t){return!!e&&"DeclareFunction"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareInterface=function(e,t){return!!e&&"DeclareInterface"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareModule=function(e,t){return!!e&&"DeclareModule"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareModuleExports=function(e,t){return!!e&&"DeclareModuleExports"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareOpaqueType=function(e,t){return!!e&&"DeclareOpaqueType"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareTypeAlias=function(e,t){return!!e&&"DeclareTypeAlias"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclareVariable=function(e,t){return!!e&&"DeclareVariable"===e.type&&(null==t||(0,n.default)(e,t))},t.isDeclaredPredicate=function(e,t){return!!e&&"DeclaredPredicate"===e.type&&(null==t||(0,n.default)(e,t))},t.isDecorator=function(e,t){return!!e&&"Decorator"===e.type&&(null==t||(0,n.default)(e,t))},t.isDirective=function(e,t){return!!e&&"Directive"===e.type&&(null==t||(0,n.default)(e,t))},t.isDirectiveLiteral=function(e,t){return!!e&&"DirectiveLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isDoExpression=function(e,t){return!!e&&"DoExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isDoWhileStatement=function(e,t){return!!e&&"DoWhileStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isEmptyStatement=function(e,t){return!!e&&"EmptyStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isEmptyTypeAnnotation=function(e,t){return!!e&&"EmptyTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumBody=function(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isEnumBooleanBody=function(e,t){return!!e&&"EnumBooleanBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumBooleanMember=function(e,t){return!!e&&"EnumBooleanMember"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumDeclaration=function(e,t){return!!e&&"EnumDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumDefaultedMember=function(e,t){return!!e&&"EnumDefaultedMember"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumMember=function(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isEnumNumberBody=function(e,t){return!!e&&"EnumNumberBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumNumberMember=function(e,t){return!!e&&"EnumNumberMember"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumStringBody=function(e,t){return!!e&&"EnumStringBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumStringMember=function(e,t){return!!e&&"EnumStringMember"===e.type&&(null==t||(0,n.default)(e,t))},t.isEnumSymbolBody=function(e,t){return!!e&&"EnumSymbolBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isExistsTypeAnnotation=function(e,t){return!!e&&"ExistsTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isExportAllDeclaration=function(e,t){return!!e&&"ExportAllDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isExportDeclaration=function(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isExportDefaultDeclaration=function(e,t){return!!e&&"ExportDefaultDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isExportDefaultSpecifier=function(e,t){return!!e&&"ExportDefaultSpecifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isExportNamedDeclaration=function(e,t){return!!e&&"ExportNamedDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isExportNamespaceSpecifier=function(e,t){return!!e&&"ExportNamespaceSpecifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isExportSpecifier=function(e,t){return!!e&&"ExportSpecifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isExpression=function(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return null==t||(0,n.default)(e,t)},t.isExpressionStatement=function(e,t){return!!e&&"ExpressionStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isExpressionWrapper=function(e,t){if(!e)return!1;switch(e.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFile=function(e,t){return!!e&&"File"===e.type&&(null==t||(0,n.default)(e,t))},t.isFlow=function(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFlowBaseAnnotation=function(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFlowDeclaration=function(e,t){if(!e)return!1;switch(e.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFlowPredicate=function(e,t){if(!e)return!1;switch(e.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFlowType=function(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFor=function(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isForInStatement=function(e,t){return!!e&&"ForInStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isForOfStatement=function(e,t){return!!e&&"ForOfStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isForStatement=function(e,t){return!!e&&"ForStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isForXStatement=function(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFunction=function(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFunctionDeclaration=function(e,t){return!!e&&"FunctionDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isFunctionExpression=function(e,t){return!!e&&"FunctionExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isFunctionParameter=function(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Identifier"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFunctionParent=function(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isFunctionTypeAnnotation=function(e,t){return!!e&&"FunctionTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isFunctionTypeParam=function(e,t){return!!e&&"FunctionTypeParam"===e.type&&(null==t||(0,n.default)(e,t))},t.isGenericTypeAnnotation=function(e,t){return!!e&&"GenericTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isIdentifier=function(e,t){return!!e&&"Identifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isIfStatement=function(e,t){return!!e&&"IfStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isImmutable=function(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isImport=function(e,t){return!!e&&"Import"===e.type&&(null==t||(0,n.default)(e,t))},t.isImportAttribute=function(e,t){return!!e&&"ImportAttribute"===e.type&&(null==t||(0,n.default)(e,t))},t.isImportDeclaration=function(e,t){return!!e&&"ImportDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isImportDefaultSpecifier=function(e,t){return!!e&&"ImportDefaultSpecifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isImportExpression=function(e,t){return!!e&&"ImportExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isImportNamespaceSpecifier=function(e,t){return!!e&&"ImportNamespaceSpecifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isImportOrExportDeclaration=s,t.isImportSpecifier=function(e,t){return!!e&&"ImportSpecifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isIndexedAccessType=function(e,t){return!!e&&"IndexedAccessType"===e.type&&(null==t||(0,n.default)(e,t))},t.isInferredPredicate=function(e,t){return!!e&&"InferredPredicate"===e.type&&(null==t||(0,n.default)(e,t))},t.isInterfaceDeclaration=function(e,t){return!!e&&"InterfaceDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isInterfaceExtends=function(e,t){return!!e&&"InterfaceExtends"===e.type&&(null==t||(0,n.default)(e,t))},t.isInterfaceTypeAnnotation=function(e,t){return!!e&&"InterfaceTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isInterpreterDirective=function(e,t){return!!e&&"InterpreterDirective"===e.type&&(null==t||(0,n.default)(e,t))},t.isIntersectionTypeAnnotation=function(e,t){return!!e&&"IntersectionTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSX=function(e,t){if(!e)return!1;switch(e.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isJSXAttribute=function(e,t){return!!e&&"JSXAttribute"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXClosingElement=function(e,t){return!!e&&"JSXClosingElement"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXClosingFragment=function(e,t){return!!e&&"JSXClosingFragment"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXElement=function(e,t){return!!e&&"JSXElement"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXEmptyExpression=function(e,t){return!!e&&"JSXEmptyExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXExpressionContainer=function(e,t){return!!e&&"JSXExpressionContainer"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXFragment=function(e,t){return!!e&&"JSXFragment"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXIdentifier=function(e,t){return!!e&&"JSXIdentifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXMemberExpression=function(e,t){return!!e&&"JSXMemberExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXNamespacedName=function(e,t){return!!e&&"JSXNamespacedName"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXOpeningElement=function(e,t){return!!e&&"JSXOpeningElement"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXOpeningFragment=function(e,t){return!!e&&"JSXOpeningFragment"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXSpreadAttribute=function(e,t){return!!e&&"JSXSpreadAttribute"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXSpreadChild=function(e,t){return!!e&&"JSXSpreadChild"===e.type&&(null==t||(0,n.default)(e,t))},t.isJSXText=function(e,t){return!!e&&"JSXText"===e.type&&(null==t||(0,n.default)(e,t))},t.isLVal=function(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return null==t||(0,n.default)(e,t)},t.isLabeledStatement=function(e,t){return!!e&&"LabeledStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isLiteral=function(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isLogicalExpression=function(e,t){return!!e&&"LogicalExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isLoop=function(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isMemberExpression=function(e,t){return!!e&&"MemberExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isMetaProperty=function(e,t){return!!e&&"MetaProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isMethod=function(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isMiscellaneous=function(e,t){if(!e)return!1;switch(e.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isMixedTypeAnnotation=function(e,t){return!!e&&"MixedTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isModuleDeclaration=function(e,t){return(0,i.default)("isModuleDeclaration","isImportOrExportDeclaration"),s(e,t)},t.isModuleExpression=function(e,t){return!!e&&"ModuleExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isModuleSpecifier=function(e,t){if(!e)return!1;switch(e.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isNewExpression=function(e,t){return!!e&&"NewExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isNoop=function(e,t){return!!e&&"Noop"===e.type&&(null==t||(0,n.default)(e,t))},t.isNullLiteral=function(e,t){return!!e&&"NullLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isNullLiteralTypeAnnotation=function(e,t){return!!e&&"NullLiteralTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isNullableTypeAnnotation=function(e,t){return!!e&&"NullableTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isNumberLiteral=function(e,t){return(0,i.default)("isNumberLiteral","isNumericLiteral"),!!e&&"NumberLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isNumberLiteralTypeAnnotation=function(e,t){return!!e&&"NumberLiteralTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isNumberTypeAnnotation=function(e,t){return!!e&&"NumberTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isNumericLiteral=function(e,t){return!!e&&"NumericLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectExpression=function(e,t){return!!e&&"ObjectExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectMember=function(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isObjectMethod=function(e,t){return!!e&&"ObjectMethod"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectPattern=function(e,t){return!!e&&"ObjectPattern"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectProperty=function(e,t){return!!e&&"ObjectProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectTypeAnnotation=function(e,t){return!!e&&"ObjectTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectTypeCallProperty=function(e,t){return!!e&&"ObjectTypeCallProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectTypeIndexer=function(e,t){return!!e&&"ObjectTypeIndexer"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectTypeInternalSlot=function(e,t){return!!e&&"ObjectTypeInternalSlot"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectTypeProperty=function(e,t){return!!e&&"ObjectTypeProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isObjectTypeSpreadProperty=function(e,t){return!!e&&"ObjectTypeSpreadProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isOpaqueType=function(e,t){return!!e&&"OpaqueType"===e.type&&(null==t||(0,n.default)(e,t))},t.isOptionalCallExpression=function(e,t){return!!e&&"OptionalCallExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isOptionalIndexedAccessType=function(e,t){return!!e&&"OptionalIndexedAccessType"===e.type&&(null==t||(0,n.default)(e,t))},t.isOptionalMemberExpression=function(e,t){return!!e&&"OptionalMemberExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isParenthesizedExpression=function(e,t){return!!e&&"ParenthesizedExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isPattern=function(e,t){if(!e)return!1;switch(e.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Pattern"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isPatternLike=function(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return null==t||(0,n.default)(e,t)},t.isPipelineBareFunction=function(e,t){return!!e&&"PipelineBareFunction"===e.type&&(null==t||(0,n.default)(e,t))},t.isPipelinePrimaryTopicReference=function(e,t){return!!e&&"PipelinePrimaryTopicReference"===e.type&&(null==t||(0,n.default)(e,t))},t.isPipelineTopicExpression=function(e,t){return!!e&&"PipelineTopicExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isPlaceholder=function(e,t){return!!e&&"Placeholder"===e.type&&(null==t||(0,n.default)(e,t))},t.isPrivate=function(e,t){if(!e)return!1;switch(e.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isPrivateName=function(e,t){return!!e&&"PrivateName"===e.type&&(null==t||(0,n.default)(e,t))},t.isProgram=function(e,t){return!!e&&"Program"===e.type&&(null==t||(0,n.default)(e,t))},t.isProperty=function(e,t){if(!e)return!1;switch(e.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isPureish=function(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isQualifiedTypeIdentifier=function(e,t){return!!e&&"QualifiedTypeIdentifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isRecordExpression=function(e,t){return!!e&&"RecordExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isRegExpLiteral=function(e,t){return!!e&&"RegExpLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isRegexLiteral=function(e,t){return(0,i.default)("isRegexLiteral","isRegExpLiteral"),!!e&&"RegexLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isRestElement=function(e,t){return!!e&&"RestElement"===e.type&&(null==t||(0,n.default)(e,t))},t.isRestProperty=function(e,t){return(0,i.default)("isRestProperty","isRestElement"),!!e&&"RestProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isReturnStatement=function(e,t){return!!e&&"ReturnStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isScopable=function(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isSequenceExpression=function(e,t){return!!e&&"SequenceExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isSpreadElement=function(e,t){return!!e&&"SpreadElement"===e.type&&(null==t||(0,n.default)(e,t))},t.isSpreadProperty=function(e,t){return(0,i.default)("isSpreadProperty","isSpreadElement"),!!e&&"SpreadProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isStandardized=function(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(e.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return null==t||(0,n.default)(e,t)},t.isStatement=function(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(e.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return null==t||(0,n.default)(e,t)},t.isStaticBlock=function(e,t){return!!e&&"StaticBlock"===e.type&&(null==t||(0,n.default)(e,t))},t.isStringLiteral=function(e,t){return!!e&&"StringLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isStringLiteralTypeAnnotation=function(e,t){return!!e&&"StringLiteralTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isStringTypeAnnotation=function(e,t){return!!e&&"StringTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isSuper=function(e,t){return!!e&&"Super"===e.type&&(null==t||(0,n.default)(e,t))},t.isSwitchCase=function(e,t){return!!e&&"SwitchCase"===e.type&&(null==t||(0,n.default)(e,t))},t.isSwitchStatement=function(e,t){return!!e&&"SwitchStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isSymbolTypeAnnotation=function(e,t){return!!e&&"SymbolTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSAnyKeyword=function(e,t){return!!e&&"TSAnyKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSArrayType=function(e,t){return!!e&&"TSArrayType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSAsExpression=function(e,t){return!!e&&"TSAsExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSBaseType=function(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isTSBigIntKeyword=function(e,t){return!!e&&"TSBigIntKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSBooleanKeyword=function(e,t){return!!e&&"TSBooleanKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSCallSignatureDeclaration=function(e,t){return!!e&&"TSCallSignatureDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSConditionalType=function(e,t){return!!e&&"TSConditionalType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSConstructSignatureDeclaration=function(e,t){return!!e&&"TSConstructSignatureDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSConstructorType=function(e,t){return!!e&&"TSConstructorType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSDeclareFunction=function(e,t){return!!e&&"TSDeclareFunction"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSDeclareMethod=function(e,t){return!!e&&"TSDeclareMethod"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSEntityName=function(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if("Identifier"===e.expectedNode)break;default:return!1}return null==t||(0,n.default)(e,t)},t.isTSEnumBody=function(e,t){return!!e&&"TSEnumBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSEnumDeclaration=function(e,t){return!!e&&"TSEnumDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSEnumMember=function(e,t){return!!e&&"TSEnumMember"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSExportAssignment=function(e,t){return!!e&&"TSExportAssignment"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSExpressionWithTypeArguments=function(e,t){return!!e&&"TSExpressionWithTypeArguments"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSExternalModuleReference=function(e,t){return!!e&&"TSExternalModuleReference"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSFunctionType=function(e,t){return!!e&&"TSFunctionType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSImportEqualsDeclaration=function(e,t){return!!e&&"TSImportEqualsDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSImportType=function(e,t){return!!e&&"TSImportType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSIndexSignature=function(e,t){return!!e&&"TSIndexSignature"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSIndexedAccessType=function(e,t){return!!e&&"TSIndexedAccessType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSInferType=function(e,t){return!!e&&"TSInferType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSInstantiationExpression=function(e,t){return!!e&&"TSInstantiationExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSInterfaceBody=function(e,t){return!!e&&"TSInterfaceBody"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSInterfaceDeclaration=function(e,t){return!!e&&"TSInterfaceDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSIntersectionType=function(e,t){return!!e&&"TSIntersectionType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSIntrinsicKeyword=function(e,t){return!!e&&"TSIntrinsicKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSLiteralType=function(e,t){return!!e&&"TSLiteralType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSMappedType=function(e,t){return!!e&&"TSMappedType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSMethodSignature=function(e,t){return!!e&&"TSMethodSignature"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSModuleBlock=function(e,t){return!!e&&"TSModuleBlock"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSModuleDeclaration=function(e,t){return!!e&&"TSModuleDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSNamedTupleMember=function(e,t){return!!e&&"TSNamedTupleMember"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSNamespaceExportDeclaration=function(e,t){return!!e&&"TSNamespaceExportDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSNeverKeyword=function(e,t){return!!e&&"TSNeverKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSNonNullExpression=function(e,t){return!!e&&"TSNonNullExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSNullKeyword=function(e,t){return!!e&&"TSNullKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSNumberKeyword=function(e,t){return!!e&&"TSNumberKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSObjectKeyword=function(e,t){return!!e&&"TSObjectKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSOptionalType=function(e,t){return!!e&&"TSOptionalType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSParameterProperty=function(e,t){return!!e&&"TSParameterProperty"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSParenthesizedType=function(e,t){return!!e&&"TSParenthesizedType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSPropertySignature=function(e,t){return!!e&&"TSPropertySignature"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSQualifiedName=function(e,t){return!!e&&"TSQualifiedName"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSRestType=function(e,t){return!!e&&"TSRestType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSSatisfiesExpression=function(e,t){return!!e&&"TSSatisfiesExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSStringKeyword=function(e,t){return!!e&&"TSStringKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSSymbolKeyword=function(e,t){return!!e&&"TSSymbolKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTemplateLiteralType=function(e,t){return!!e&&"TSTemplateLiteralType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSThisType=function(e,t){return!!e&&"TSThisType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTupleType=function(e,t){return!!e&&"TSTupleType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSType=function(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isTSTypeAliasDeclaration=function(e,t){return!!e&&"TSTypeAliasDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeAnnotation=function(e,t){return!!e&&"TSTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeAssertion=function(e,t){return!!e&&"TSTypeAssertion"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeElement=function(e,t){if(!e)return!1;switch(e.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isTSTypeLiteral=function(e,t){return!!e&&"TSTypeLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeOperator=function(e,t){return!!e&&"TSTypeOperator"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeParameter=function(e,t){return!!e&&"TSTypeParameter"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeParameterDeclaration=function(e,t){return!!e&&"TSTypeParameterDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeParameterInstantiation=function(e,t){return!!e&&"TSTypeParameterInstantiation"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypePredicate=function(e,t){return!!e&&"TSTypePredicate"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeQuery=function(e,t){return!!e&&"TSTypeQuery"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSTypeReference=function(e,t){return!!e&&"TSTypeReference"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSUndefinedKeyword=function(e,t){return!!e&&"TSUndefinedKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSUnionType=function(e,t){return!!e&&"TSUnionType"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSUnknownKeyword=function(e,t){return!!e&&"TSUnknownKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTSVoidKeyword=function(e,t){return!!e&&"TSVoidKeyword"===e.type&&(null==t||(0,n.default)(e,t))},t.isTaggedTemplateExpression=function(e,t){return!!e&&"TaggedTemplateExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTemplateElement=function(e,t){return!!e&&"TemplateElement"===e.type&&(null==t||(0,n.default)(e,t))},t.isTemplateLiteral=function(e,t){return!!e&&"TemplateLiteral"===e.type&&(null==t||(0,n.default)(e,t))},t.isTerminatorless=function(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isThisExpression=function(e,t){return!!e&&"ThisExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isThisTypeAnnotation=function(e,t){return!!e&&"ThisTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isThrowStatement=function(e,t){return!!e&&"ThrowStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isTopicReference=function(e,t){return!!e&&"TopicReference"===e.type&&(null==t||(0,n.default)(e,t))},t.isTryStatement=function(e,t){return!!e&&"TryStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isTupleExpression=function(e,t){return!!e&&"TupleExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTupleTypeAnnotation=function(e,t){return!!e&&"TupleTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeAlias=function(e,t){return!!e&&"TypeAlias"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeAnnotation=function(e,t){return!!e&&"TypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeCastExpression=function(e,t){return!!e&&"TypeCastExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeParameter=function(e,t){return!!e&&"TypeParameter"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeParameterDeclaration=function(e,t){return!!e&&"TypeParameterDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeParameterInstantiation=function(e,t){return!!e&&"TypeParameterInstantiation"===e.type&&(null==t||(0,n.default)(e,t))},t.isTypeScript=function(e,t){if(!e)return!1;switch(e.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isTypeofTypeAnnotation=function(e,t){return!!e&&"TypeofTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isUnaryExpression=function(e,t){return!!e&&"UnaryExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isUnaryLike=function(e,t){if(!e)return!1;switch(e.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isUnionTypeAnnotation=function(e,t){return!!e&&"UnionTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isUpdateExpression=function(e,t){return!!e&&"UpdateExpression"===e.type&&(null==t||(0,n.default)(e,t))},t.isUserWhitespacable=function(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isV8IntrinsicIdentifier=function(e,t){return!!e&&"V8IntrinsicIdentifier"===e.type&&(null==t||(0,n.default)(e,t))},t.isVariableDeclaration=function(e,t){return!!e&&"VariableDeclaration"===e.type&&(null==t||(0,n.default)(e,t))},t.isVariableDeclarator=function(e,t){return!!e&&"VariableDeclarator"===e.type&&(null==t||(0,n.default)(e,t))},t.isVariance=function(e,t){return!!e&&"Variance"===e.type&&(null==t||(0,n.default)(e,t))},t.isVoidPattern=function(e,t){return!!e&&"VoidPattern"===e.type&&(null==t||(0,n.default)(e,t))},t.isVoidTypeAnnotation=function(e,t){return!!e&&"VoidTypeAnnotation"===e.type&&(null==t||(0,n.default)(e,t))},t.isWhile=function(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return null==t||(0,n.default)(e,t)},t.isWhileStatement=function(e,t){return!!e&&"WhileStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isWithStatement=function(e,t){return!!e&&"WithStatement"===e.type&&(null==t||(0,n.default)(e,t))},t.isYieldExpression=function(e,t){return!!e&&"YieldExpression"===e.type&&(null==t||(0,n.default)(e,t))};var n=r(3903),i=r(74641);function s(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return null==t||(0,n.default)(e,t)}},63646:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e,!0,!0)};var n=r(16938)},64008:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,i.default)(e);return 1===t.length?t[0]:(0,n.unionTypeAnnotation)(t)};var n=r(82208),i=r(97884)},64697:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(!r||!e)return e;const n=`${t}Comments`;return e[n]?"leading"===t?e[n]=r.concat(e[n]):e[n].push(...r):e[n]=r,e}},65830:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={}){const r=t.preserveComments?i:s;for(const t of r)null!=e[t]&&(e[t]=void 0);for(const t of Object.keys(e))t.startsWith("_")&&null!=e[t]&&(e[t]=void 0);const n=Object.getOwnPropertySymbols(e);for(const t of n)e[t]=null};var n=r(62811);const i=["tokens","start","end","loc","raw","rawValue"],s=[...n.COMMENT_KEYS,"comments",...i]},65863:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},65987:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(63555),i=r(16938),s=r(37524);function o(e,t=e.key){let r;return"method"===e.kind?o.increment()+"":(r=(0,n.isIdentifier)(t)?t.name:(0,n.isStringLiteral)(t)?JSON.stringify(t.value):JSON.stringify((0,s.default)((0,i.default)(t))),e.computed&&(r=`[${r}]`),e.static&&(r=`static:${r}`),r)}o.uid=0,o.increment=function(){return o.uid>=Number.MAX_SAFE_INTEGER?o.uid=0:o.uid++}},66318:(e,t,r)=>{var n=r(65994).process;e.exports=n.hrtime||function(e){var t=.001*s.call(i),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]};var i=r.g.performance||{},s=i.now||i.mozNow||i.msNow||i.oNow||i.webkitNow||function(){return(new Date).getTime()}},66346:(e,t)=>{function r(e){return"["+e.join(", ")+"]"}function n(e,t){return e.equals(t)}function i(e){return e.hashCode()}function s(e,t){return this.data={},this.hashFunction=e||i,this.equalsFunction=t||n,this}function o(){return this.data=[],this}function a(e,t){return this.data={},this.hashFunction=e||i,this.equalsFunction=t||n,this}function l(){return this.data={},this}function p(){return this}function u(){return this.count=0,this.hash=0,this}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){var e,t,r,n,i,s,o,a,l=this.toString();for(e=3&l.length,t=l.length-e,r=String.prototype.seed,i=3432918353,s=461845907,a=0;a<t;)o=255&l.charCodeAt(a)|(255&l.charCodeAt(++a))<<8|(255&l.charCodeAt(++a))<<16|(255&l.charCodeAt(++a))<<24,++a,r=27492+(65535&(n=5*(65535&(r=(r^=o=(65535&(o=(o=(65535&o)*i+(((o>>>16)*i&65535)<<16)&4294967295)<<15|o>>>17))*s+(((o>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(n>>>16)&65535)<<16);switch(o=0,e){case 3:o^=(255&l.charCodeAt(a+2))<<16;case 2:o^=(255&l.charCodeAt(a+1))<<8;case 1:r^=o=(65535&(o=(o=(65535&(o^=255&l.charCodeAt(a)))*i+(((o>>>16)*i&65535)<<16)&4294967295)<<15|o>>>17))*s+(((o>>>16)*s&65535)<<16)&4294967295}return r^=l.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0},Object.defineProperty(s.prototype,"length",{get:function(){var e=0;for(var t in this.data)0===t.indexOf("hash_")&&(e+=this.data[t].length);return e}}),s.prototype.add=function(e){var t="hash_"+this.hashFunction(e);if(t in this.data){for(var r=this.data[t],n=0;n<r.length;n++)if(this.equalsFunction(e,r[n]))return r[n];return r.push(e),e}return this.data[t]=[e],e},s.prototype.contains=function(e){return null!=this.get(e)},s.prototype.get=function(e){var t="hash_"+this.hashFunction(e);if(t in this.data)for(var r=this.data[t],n=0;n<r.length;n++)if(this.equalsFunction(e,r[n]))return r[n];return null},s.prototype.values=function(){var e=[];for(var t in this.data)0===t.indexOf("hash_")&&(e=e.concat(this.data[t]));return e},s.prototype.toString=function(){return r(this.values())},o.prototype.add=function(e){this.data[e]=!0},o.prototype.or=function(e){var t=this;Object.keys(e.data).map((function(e){t.add(e)}))},o.prototype.remove=function(e){delete this.data[e]},o.prototype.contains=function(e){return!0===this.data[e]},o.prototype.values=function(){return Object.keys(this.data)},o.prototype.minValue=function(){return Math.min.apply(null,this.values())},o.prototype.hashCode=function(){var e=new u;return e.update(this.values()),e.finish()},o.prototype.equals=function(e){return e instanceof o&&this.hashCode()===e.hashCode()},Object.defineProperty(o.prototype,"length",{get:function(){return this.values().length}}),o.prototype.toString=function(){return"{"+this.values().join(", ")+"}"},Object.defineProperty(a.prototype,"length",{get:function(){var e=0;for(var t in this.data)0===t.indexOf("hash_")&&(e+=this.data[t].length);return e}}),a.prototype.put=function(e,t){var r="hash_"+this.hashFunction(e);if(r in this.data){for(var n=this.data[r],i=0;i<n.length;i++){var s=n[i];if(this.equalsFunction(e,s.key)){var o=s.value;return s.value=t,o}}return n.push({key:e,value:t}),t}return this.data[r]=[{key:e,value:t}],t},a.prototype.containsKey=function(e){var t="hash_"+this.hashFunction(e);if(t in this.data)for(var r=this.data[t],n=0;n<r.length;n++){var i=r[n];if(this.equalsFunction(e,i.key))return!0}return!1},a.prototype.get=function(e){var t="hash_"+this.hashFunction(e);if(t in this.data)for(var r=this.data[t],n=0;n<r.length;n++){var i=r[n];if(this.equalsFunction(e,i.key))return i.value}return null},a.prototype.entries=function(){var e=[];for(var t in this.data)0===t.indexOf("hash_")&&(e=e.concat(this.data[t]));return e},a.prototype.getKeys=function(){return this.entries().map((function(e){return e.key}))},a.prototype.getValues=function(){return this.entries().map((function(e){return e.value}))},a.prototype.toString=function(){return"["+this.entries().map((function(e){return"{"+e.key+":"+e.value+"}"})).join(", ")+"]"},l.prototype.get=function(e){return(e="k-"+e)in this.data?this.data[e]:null},l.prototype.put=function(e,t){e="k-"+e,this.data[e]=t},l.prototype.values=function(){var e=this.data;return Object.keys(this.data).map((function(t){return e[t]}))},u.prototype.update=function(){for(var e=0;e<arguments.length;e++){var t=arguments[e];if(null!=t)if(Array.isArray(t))this.update.apply(t);else{var r=0;switch(typeof t){case"undefined":case"function":continue;case"number":case"boolean":r=t;break;case"string":r=t.hashCode();break;default:t.updateHashCode(this);continue}r=(r*=3432918353)<<15|r>>>17,r*=461845907,this.count=this.count+1;var n=this.hash^r;n=5*(n=n<<13|n>>>19)+3864292196,this.hash=n}}},u.prototype.finish=function(){var e=this.hash^4*this.count;return e^=e>>>16,e*=2246822507,e^=e>>>13,(e*=3266489909)^e>>>16},p.prototype.get=function(e,t){var r=this[e]||null;return null===r?null:r[t]||null},p.prototype.set=function(e,t,r){var n=this[e]||null;null===n&&(n={},this[e]=n),n[t]=r},t.Hash=u,t.Set=s,t.Map=a,t.BitSet=o,t.AltDict=l,t.DoubleDict=p,t.hashStuff=function(){var e=new u;return e.update.apply(arguments),e.finish()},t.escapeWhitespace=function(e,t){return e=e.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),t&&(e=e.replace(/ /g,"·")),e},t.arrayToString=r,t.titleCase=function(e){return e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1)}))},t.equalArrays=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e==t)return!0;if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r]&&!e[r].equals(t[r]))return!1;return!0}},66840:(e,t,r)=>{var n=r(59830),i=r(63655),s=r(96830),o=r(76966),a=r(88141),l=Array.prototype.slice,p=r(36173),u={on:function(e,t,r){return p.eventsApi(this,"on",e,[t,r])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:r,ctx:r||this}),this):this},once:function(e,t,r){if(!p.eventsApi(this,"once",e,[t,r])||!t)return this;var i=this,s=n((function(){i.off(e,s),t.apply(this,arguments)}));return s._callback=t,this.on(e,s,r)},off:function(e,t,r){var n,s,o,a,l,u,c,h;if(!this._events||!p.eventsApi(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(l=0,u=(a=e?[e]:i(this._events)).length;l<u;l++)if(e=a[l],o=this._events[e]){if(this._events[e]=n=[],t||r)for(c=0,h=o.length;c<h;c++)s=o[c],(t&&t!==s.callback&&t!==s.callback._callback||r&&r!==s.context)&&n.push(s);n.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=l.call(arguments,1);if(!p.eventsApi(this,"trigger",e,t))return this;var r=this._events[e],n=this._events.all;return r&&p.triggerEvents(r,t),n&&p.triggerEvents(n,arguments),this},stopListening:function(e,t,r){var n=this._listeningTo;if(!n)return this;var i=!t&&!r;r||"object"!=typeof t||(r=this),e&&((n={})[e._listenId]=e);var o=this;return a(n,(function(e,n){e.off(t,r,o),(i||s(e._events))&&delete o._listeningTo[n]})),this},createEmitter:function(e){return o(e||{},u)},listenTo:p.createListenMethod("on"),listenToOnce:p.createListenMethod("once"),listenToAndRun:function(e,t,r){return this.listenTo.apply(this,arguments),r||"object"!=typeof t||(r=this),r.apply(this),this}};u.bind=u.on,u.unbind=u.off,u.removeListener=u.off,u.removeAllListeners=u.off,u.emit=u.trigger,e.exports=u},67787:(e,t,r)=>{const n=r(54667),i=r(96346),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return p(e,t,r)}function p(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||W(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(i)return n?-1:z(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function T(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let s,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,r/=2}function p(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(s=r;s<a;s++)if(p(e,s)===p(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===l)return n*o}else-1!==n&&(s-=s-n),n=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){let r=!0;for(let n=0;n<l;n++)if(p(e,s+n)!==p(t,n)){r=!1;break}if(r)return s}return-1}function b(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=t.length;let o;for(n>s/2&&(n=s/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if(W(n))return o;e[r+o]=n}return o}function S(e,t,r,n){return H(z(t,e.length-r),e,r,n)}function x(e,t,r,n){return H(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return H(J(t),e,r,n)}function w(e,t,r,n){return H(function(e,t){let r,n,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,a,l;switch(o){case 1:t<128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(s=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return p(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return c(e)},l.allocUnsafeSlow=function(e){return c(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=l.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,Uint8Array))i+t.length>n.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):y.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(s,o),p=this.slice(n,i),u=e.slice(t,r);for(let e=0;e<a;++e)if(p[e]!==u[e]){s=p[e],o=u[e];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return T(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return T(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function C(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=G[e[n]];return i}function k(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){V(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function D(e,t,r,n,i){V(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function B(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,n,s){return t=+t,r>>>=0,s||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,s){return t=+t,r>>>=0,s||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){Y(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Z((function(e){Y(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){Y(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Z((function(e){Y(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s|0)-o&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const s=l.isBuffer(e)?e:l.from(e,n),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};const F={};function U(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Y(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,i,s)}function Y(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw Y(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const $=/[^+/0-9A-Za-z-_]/g;function z(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function J(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}const G=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},67966:(e,t,r)=>{var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(4045)},68044:(e,t,r)=>{var n=r(79696).Buffer,i=r(53896);function s(e,t,r){var s=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=n.concat([e._prev,r?t:o]),o}t.encrypt=function(e,t,r){for(var i,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,s(e,t,r)]);break}i=e._cache.length,o=n.concat([o,s(e,t.slice(0,i),r)]),t=t.slice(i)}return o}},68667:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BlockStatement=function(e){var t;this.tokenChar(123);const r=this.enterDelimited(),n=null==(t=e.directives)?void 0:t.length;if(n){var i;const t=e.body.length?2:1;this.printSequence(e.directives,!0,!0,t),null!=(i=e.directives[n-1].trailingComments)&&i.length||this.newline(t)}this.printSequence(e.body,!0,!0),this._noLineTerminatorAfterNode=r,this.rightBrace(e)},t.Directive=function(e){this.print(e.value),this.semicolon()},t.DirectiveLiteral=function(e){const t=this.getPossibleRaw(e);if(!this.format.minified&&void 0!==t)return void this.token(t);const{value:i}=e;if(n.test(i)){if(r.test(i))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${i}'`)}else this.token(`"${i}"`)},t.File=function(e){e.program&&this.print(e.program.interpreter),this.print(e.program)},t.InterpreterDirective=function(e){this.token(`#!${e.value}`),this._newline()},t.Placeholder=function(e){this.token("%%"),this.print(e.name),this.token("%%"),"Statement"===e.expectedNode&&this.semicolon()},t.Program=function(e){var t;this.printInnerComments(!1);const r=null==(t=e.directives)?void 0:t.length;if(r){var n;const t=e.body.length?2:1;this.printSequence(e.directives,void 0,void 0,t),null!=(n=e.directives[r-1].trailingComments)&&n.length||this.newline(t)}this.printSequence(e.body)};const r=/(?:^|[^\\])(?:\\\\)*'/,n=/(?:^|[^\\])(?:\\\\)*"/},68740:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(!i(e))return!1;const s=Array.isArray(t)?t:t.split("."),o=[];let a;for(a=e;i(a);a=null!=(l=a.object)?l:a.meta){var l;o.push(a.property)}if(o.push(a),o.length<s.length)return!1;if(!r&&o.length>s.length)return!1;for(let e=0,t=o.length-1;e<s.length;e++,t--){const r=o[t];let i;if((0,n.isIdentifier)(r))i=r.name;else if((0,n.isStringLiteral)(r))i=r.value;else if((0,n.isThisExpression)(r))i="this";else if((0,n.isSuper)(r))i="super";else{if(!(0,n.isPrivateName)(r))return!1;i="#"+r.id.name}if(s[e]!==i)return!1}return!0};var n=r(63555);function i(e){return(0,n.isMemberExpression)(e)||(0,n.isMetaProperty)(e)}},68830:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(63555);function i(e,t,r,s){const o=[].concat(e),a=Object.create(null);for(;o.length;){const e=o.shift();if(!e)continue;if(s&&((0,n.isAssignmentExpression)(e)||(0,n.isUnaryExpression)(e)||(0,n.isUpdateExpression)(e)))continue;if((0,n.isIdentifier)(e)){t?(a[e.name]=a[e.name]||[]).push(e):a[e.name]=e;continue}if((0,n.isExportDeclaration)(e)&&!(0,n.isExportAllDeclaration)(e)){(0,n.isDeclaration)(e.declaration)&&o.push(e.declaration);continue}if(r){if((0,n.isFunctionDeclaration)(e)){o.push(e.id);continue}if((0,n.isFunctionExpression)(e))continue}const l=i.keys[e.type];if(l)for(let t=0;t<l.length;t++){const r=e[l[t]];r&&(Array.isArray(r)?o.push(...r):o.push(r))}}return a}i.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},69036:(e,t,r)=>{var n=r(48898);t.Trees=r(23438).Trees,t.RuleNode=n.RuleNode,t.ParseTreeListener=n.ParseTreeListener,t.ParseTreeVisitor=n.ParseTreeVisitor,t.ParseTreeWalker=n.ParseTreeWalker},69445:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},70040:(e,t,r)=>{var n=r(72994).Token;function i(e,t){return this.start=e,this.stop=t,this}function s(){this.intervals=null,this.readOnly=!1}i.prototype.contains=function(e){return e>=this.start&&e<this.stop},i.prototype.toString=function(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()},Object.defineProperty(i.prototype,"length",{get:function(){return this.stop-this.start}}),s.prototype.first=function(e){return null===this.intervals||0===this.intervals.length?n.INVALID_TYPE:this.intervals[0].start},s.prototype.addOne=function(e){this.addInterval(new i(e,e+1))},s.prototype.addRange=function(e,t){this.addInterval(new i(e,t+1))},s.prototype.addInterval=function(e){if(null===this.intervals)this.intervals=[],this.intervals.push(e);else{for(var t=0;t<this.intervals.length;t++){var r=this.intervals[t];if(e.stop<r.start)return void this.intervals.splice(t,0,e);if(e.stop===r.start)return void(this.intervals[t].start=e.start);if(e.start<=r.stop)return this.intervals[t]=new i(Math.min(r.start,e.start),Math.max(r.stop,e.stop)),void this.reduce(t)}this.intervals.push(e)}},s.prototype.addSet=function(e){if(null!==e.intervals)for(var t=0;t<e.intervals.length;t++){var r=e.intervals[t];this.addInterval(new i(r.start,r.stop))}return this},s.prototype.reduce=function(e){if(e<this.intervalslength-1){var t=this.intervals[e],r=this.intervals[e+1];t.stop>=r.stop?(this.intervals.pop(e+1),this.reduce(e)):t.stop>=r.start&&(this.intervals[e]=new i(t.start,r.stop),this.intervals.pop(e+1))}},s.prototype.complement=function(e,t){var r=new s;r.addInterval(new i(e,t+1));for(var n=0;n<this.intervals.length;n++)r.removeRange(this.intervals[n]);return r},s.prototype.contains=function(e){if(null===this.intervals)return!1;for(var t=0;t<this.intervals.length;t++)if(this.intervals[t].contains(e))return!0;return!1},Object.defineProperty(s.prototype,"length",{get:function(){var e=0;return this.intervals.map((function(t){e+=t.length})),e}}),s.prototype.removeRange=function(e){if(e.start===e.stop-1)this.removeOne(e.start);else if(null!==this.intervals)for(var t=0,r=0;r<this.intervals.length;r++){var n=this.intervals[t];if(e.stop<=n.start)return;if(e.start>n.start&&e.stop<n.stop){this.intervals[t]=new i(n.start,e.start);var s=new i(e.stop,n.stop);return void this.intervals.splice(t,0,s)}e.start<=n.start&&e.stop>=n.stop?(this.intervals.splice(t,1),t-=1):e.start<n.stop?this.intervals[t]=new i(n.start,e.start):e.stop<n.stop&&(this.intervals[t]=new i(e.stop,n.stop)),t+=1}},s.prototype.removeOne=function(e){if(null!==this.intervals)for(var t=0;t<this.intervals.length;t++){var r=this.intervals[t];if(e<r.start)return;if(e===r.start&&e===r.stop-1)return void this.intervals.splice(t,1);if(e===r.start)return void(this.intervals[t]=new i(r.start+1,r.stop));if(e===r.stop-1)return void(this.intervals[t]=new i(r.start,r.stop-1));if(e<r.stop-1){var n=new i(r.start,e);return r.start=e+1,void this.intervals.splice(t,0,n)}}},s.prototype.toString=function(e,t,r){return e=e||null,t=t||null,r=r||!1,null===this.intervals?"{}":null!==e||null!==t?this.toTokenString(e,t):r?this.toCharString():this.toIndexString()},s.prototype.toCharString=function(){for(var e=[],t=0;t<this.intervals.length;t++){var r=this.intervals[t];r.stop===r.start+1?r.start===n.EOF?e.push("<EOF>"):e.push("'"+String.fromCharCode(r.start)+"'"):e.push("'"+String.fromCharCode(r.start)+"'..'"+String.fromCharCode(r.stop-1)+"'")}return e.length>1?"{"+e.join(", ")+"}":e[0]},s.prototype.toIndexString=function(){for(var e=[],t=0;t<this.intervals.length;t++){var r=this.intervals[t];r.stop===r.start+1?r.start===n.EOF?e.push("<EOF>"):e.push(r.start.toString()):e.push(r.start.toString()+".."+(r.stop-1).toString())}return e.length>1?"{"+e.join(", ")+"}":e[0]},s.prototype.toTokenString=function(e,t){for(var r=[],n=0;n<this.intervals.length;n++)for(var i=this.intervals[n],s=i.start;s<i.stop;s++)r.push(this.elementName(e,t,s));return r.length>1?"{"+r.join(", ")+"}":r[0]},s.prototype.elementName=function(e,t,r){return r===n.EOF?"<EOF>":r===n.EPSILON?"<EPSILON>":e[r]||t[r]},t.Interval=i,t.m=s},70161:(e,t,r)=>{function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(null,arguments)}r.d(t,{A:()=>n})},70243:function(e,t,r){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function s(e,t,r){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(67787).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function l(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function p(e,t,r,i){for(var s=0,o=0,a=Math.min(e.length,r),l=t;l<a;l++){var p=e.charCodeAt(l)-48;s*=i,o=p>=49?p-49+10:p>=17?p-17+10:p,n(p>=0&&o<i,"Invalid character"),s+=o}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},s.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},s.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===r)for(i=e.length-1,s=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===r)for(i=0,s=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,s=0,o=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=l(e,t,n)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=l(e,t,n)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,o=s%n,a=Math.min(s,s-o)+r,l=0,u=r;u<a;u+=n)l=p(e,u,u+n,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var c=1;for(l=p(e,u,e.length,t),u=0;u<o;u++)c*=t;this.imuln(c),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){u(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){s.prototype.inspect=c}else s.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],o=i*s,a=67108863&o,l=o/67108864|0;r.words[0]=a;for(var p=1;p<n;p++){for(var u=l>>>26,c=67108863&l,h=Math.min(p,t.length-1),d=Math.max(0,p-e.length+1);d<=h;d++){var f=p-d|0;u+=(o=(i=0|e.words[f])*(s=0|t.words[d])+c)/67108864|0,c=67108863&o}r.words[p]=0|c,l=0|u}return 0!==l?r.words[p]=0|l:r.length--,r._strip()}s.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),r=0!==s||o!==this.length-1?h[6-l.length]+l+r:l+r}for(0!==s&&(r=s.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=d[e],u=f[e];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var m=c.modrn(u).toString(e);r=(c=c.idivn(u)).isZero()?m+r:h[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|n;e[r++]=255&o,r<e.length&&(e[r++]=o>>8&255),r<e.length&&(e[r++]=o>>16&255),6===s?(r<e.length&&(e[r++]=o>>24&255),n=0,s=0):(n=o>>>24,s+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|n;e[r--]=255&o,r>=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===s?(r>=0&&(e[r--]=o>>24&255),n=0,s=0):(n=o>>>24,s+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return n(!(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return n(!(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return n(!(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},s.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)t=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<r.length;s++)t=(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,o=0;o<n.length;o++)s=(t=(0|r.words[o])-(0|n.words[o])+s)>>26,this.words[o]=67108863&t;for(;0!==s&&o<r.length;o++)s=(t=(0|r.words[o])+s)>>26,this.words[o]=67108863&t;if(0===s&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var y=function(e,t,r){var n,i,s,o=e.words,a=t.words,l=r.words,p=0,u=0|o[0],c=8191&u,h=u>>>13,d=0|o[1],f=8191&d,m=d>>>13,y=0|o[2],g=8191&y,T=y>>>13,v=0|o[3],b=8191&v,S=v>>>13,x=0|o[4],E=8191&x,w=x>>>13,A=0|o[5],P=8191&A,I=A>>>13,C=0|o[6],_=8191&C,N=C>>>13,k=0|o[7],O=8191&k,M=k>>>13,L=0|o[8],D=8191&L,B=L>>>13,R=0|o[9],j=8191&R,F=R>>>13,U=0|a[0],q=8191&U,V=U>>>13,Y=0|a[1],K=8191&Y,$=Y>>>13,z=0|a[2],J=8191&z,H=z>>>13,X=0|a[3],W=8191&X,G=X>>>13,Z=0|a[4],Q=8191&Z,ee=Z>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],se=8191&ie,oe=ie>>>13,ae=0|a[7],le=8191&ae,pe=ae>>>13,ue=0|a[8],ce=8191&ue,he=ue>>>13,de=0|a[9],fe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(p+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,V))+Math.imul(h,q)|0))<<13)|0;p=((s=Math.imul(h,V))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(f,q),i=(i=Math.imul(f,V))+Math.imul(m,q)|0,s=Math.imul(m,V);var ge=(p+(n=n+Math.imul(c,K)|0)|0)+((8191&(i=(i=i+Math.imul(c,$)|0)+Math.imul(h,K)|0))<<13)|0;p=((s=s+Math.imul(h,$)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,q),i=(i=Math.imul(g,V))+Math.imul(T,q)|0,s=Math.imul(T,V),n=n+Math.imul(f,K)|0,i=(i=i+Math.imul(f,$)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,$)|0;var Te=(p+(n=n+Math.imul(c,J)|0)|0)+((8191&(i=(i=i+Math.imul(c,H)|0)+Math.imul(h,J)|0))<<13)|0;p=((s=s+Math.imul(h,H)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,V))+Math.imul(S,q)|0,s=Math.imul(S,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,$)|0,n=n+Math.imul(f,J)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,H)|0;var ve=(p+(n=n+Math.imul(c,W)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(h,W)|0))<<13)|0;p=((s=s+Math.imul(h,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,V))+Math.imul(w,q)|0,s=Math.imul(w,V),n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(S,K)|0,s=s+Math.imul(S,$)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,H)|0,n=n+Math.imul(f,W)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,W)|0,s=s+Math.imul(m,G)|0;var be=(p+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(h,Q)|0))<<13)|0;p=((s=s+Math.imul(h,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,V))+Math.imul(I,q)|0,s=Math.imul(I,V),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(w,K)|0,s=s+Math.imul(w,$)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(S,J)|0,s=s+Math.imul(S,H)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(T,W)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var Se=(p+(n=n+Math.imul(c,re)|0)|0)+((8191&(i=(i=i+Math.imul(c,ne)|0)+Math.imul(h,re)|0))<<13)|0;p=((s=s+Math.imul(h,ne)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,V))+Math.imul(N,q)|0,s=Math.imul(N,V),n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(I,K)|0,s=s+Math.imul(I,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,H)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(S,W)|0,s=s+Math.imul(S,G)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(f,re)|0,i=(i=i+Math.imul(f,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0;var xe=(p+(n=n+Math.imul(c,se)|0)|0)+((8191&(i=(i=i+Math.imul(c,oe)|0)+Math.imul(h,se)|0))<<13)|0;p=((s=s+Math.imul(h,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,V))+Math.imul(M,q)|0,s=Math.imul(M,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(N,K)|0,s=s+Math.imul(N,$)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(I,J)|0,s=s+Math.imul(I,H)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(w,W)|0,s=s+Math.imul(w,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(T,re)|0,s=s+Math.imul(T,ne)|0,n=n+Math.imul(f,se)|0,i=(i=i+Math.imul(f,oe)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,oe)|0;var Ee=(p+(n=n+Math.imul(c,le)|0)|0)+((8191&(i=(i=i+Math.imul(c,pe)|0)+Math.imul(h,le)|0))<<13)|0;p=((s=s+Math.imul(h,pe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(B,q)|0,s=Math.imul(B,V),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(M,K)|0,s=s+Math.imul(M,$)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,H)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,H)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,W)|0,s=s+Math.imul(I,G)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(S,re)|0,s=s+Math.imul(S,ne)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,oe)|0,n=n+Math.imul(f,le)|0,i=(i=i+Math.imul(f,pe)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,pe)|0;var we=(p+(n=n+Math.imul(c,ce)|0)|0)+((8191&(i=(i=i+Math.imul(c,he)|0)+Math.imul(h,ce)|0))<<13)|0;p=((s=s+Math.imul(h,he)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,V))+Math.imul(F,q)|0,s=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,K)|0,s=s+Math.imul(B,$)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,H)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(N,W)|0,s=s+Math.imul(N,G)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(w,re)|0,s=s+Math.imul(w,ne)|0,n=n+Math.imul(b,se)|0,i=(i=i+Math.imul(b,oe)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,oe)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,pe)|0)+Math.imul(T,le)|0,s=s+Math.imul(T,pe)|0,n=n+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,he)|0)+Math.imul(m,ce)|0,s=s+Math.imul(m,he)|0;var Ae=(p+(n=n+Math.imul(c,fe)|0)|0)+((8191&(i=(i=i+Math.imul(c,me)|0)+Math.imul(h,fe)|0))<<13)|0;p=((s=s+Math.imul(h,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,$))+Math.imul(F,K)|0,s=Math.imul(F,$),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(B,J)|0,s=s+Math.imul(B,H)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(M,W)|0,s=s+Math.imul(M,G)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(N,Q)|0,s=s+Math.imul(N,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(I,re)|0,s=s+Math.imul(I,ne)|0,n=n+Math.imul(E,se)|0,i=(i=i+Math.imul(E,oe)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,oe)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,pe)|0)+Math.imul(S,le)|0,s=s+Math.imul(S,pe)|0,n=n+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,he)|0;var Pe=(p+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;p=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,H))+Math.imul(F,J)|0,s=Math.imul(F,H),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(B,W)|0,s=s+Math.imul(B,G)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(N,re)|0,s=s+Math.imul(N,ne)|0,n=n+Math.imul(P,se)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,oe)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(w,le)|0,s=s+Math.imul(w,pe)|0,n=n+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(S,ce)|0,s=s+Math.imul(S,he)|0;var Ie=(p+(n=n+Math.imul(g,fe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(T,fe)|0))<<13)|0;p=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,G))+Math.imul(F,W)|0,s=Math.imul(F,G),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(M,re)|0,s=s+Math.imul(M,ne)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,oe)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,oe)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,pe)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,pe)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(w,ce)|0,s=s+Math.imul(w,he)|0;var Ce=(p+(n=n+Math.imul(b,fe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(S,fe)|0))<<13)|0;p=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,Q),i=(i=Math.imul(j,ee))+Math.imul(F,Q)|0,s=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,s=s+Math.imul(B,ne)|0,n=n+Math.imul(O,se)|0,i=(i=i+Math.imul(O,oe)|0)+Math.imul(M,se)|0,s=s+Math.imul(M,oe)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,pe)|0)+Math.imul(N,le)|0,s=s+Math.imul(N,pe)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,he)|0)+Math.imul(I,ce)|0,s=s+Math.imul(I,he)|0;var _e=(p+(n=n+Math.imul(E,fe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(w,fe)|0))<<13)|0;p=((s=s+Math.imul(w,me)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(F,re)|0,s=Math.imul(F,ne),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,oe)|0)+Math.imul(B,se)|0,s=s+Math.imul(B,oe)|0,n=n+Math.imul(O,le)|0,i=(i=i+Math.imul(O,pe)|0)+Math.imul(M,le)|0,s=s+Math.imul(M,pe)|0,n=n+Math.imul(_,ce)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(N,ce)|0,s=s+Math.imul(N,he)|0;var Ne=(p+(n=n+Math.imul(P,fe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(I,fe)|0))<<13)|0;p=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,se),i=(i=Math.imul(j,oe))+Math.imul(F,se)|0,s=Math.imul(F,oe),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,pe)|0)+Math.imul(B,le)|0,s=s+Math.imul(B,pe)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,he)|0)+Math.imul(M,ce)|0,s=s+Math.imul(M,he)|0;var ke=(p+(n=n+Math.imul(_,fe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(N,fe)|0))<<13)|0;p=((s=s+Math.imul(N,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,le),i=(i=Math.imul(j,pe))+Math.imul(F,le)|0,s=Math.imul(F,pe),n=n+Math.imul(D,ce)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,ce)|0,s=s+Math.imul(B,he)|0;var Oe=(p+(n=n+Math.imul(O,fe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(M,fe)|0))<<13)|0;p=((s=s+Math.imul(M,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ce),i=(i=Math.imul(j,he))+Math.imul(F,ce)|0,s=Math.imul(F,he);var Me=(p+(n=n+Math.imul(D,fe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,fe)|0))<<13)|0;p=((s=s+Math.imul(B,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863;var Le=(p+(n=Math.imul(j,fe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,fe)|0))<<13)|0;return p=((s=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ye,l[1]=ge,l[2]=Te,l[3]=ve,l[4]=be,l[5]=Se,l[6]=xe,l[7]=Ee,l[8]=we,l[9]=Ae,l[10]=Pe,l[11]=Ie,l[12]=Ce,l[13]=_e,l[14]=Ne,l[15]=ke,l[16]=Oe,l[17]=Me,l[18]=Le,0!==p&&(l[19]=p,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var o=i;i=0;for(var a=67108863&n,l=Math.min(s,t.length-1),p=Math.max(0,s-e.length+1);p<=l;p++){var u=s-p,c=(0|e.words[u])*(0|t.words[p]),h=67108863&c;a=67108863&(h=h+a|0),i+=(o=(o=o+(c/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[s]=a,n=o,o=i}return 0!==n?r.words[s]=n:r.length--,r._strip()}function T(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(y=m),s.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?m(this,e,t):r<1024?g(this,e,t):T(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=s.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,s){for(var o=0;o<s;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,s){this.permute(s,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),p=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var c=l,h=p,d=0;d<o;d++){var f=r[u+d],m=n[u+d],y=r[u+d+o],g=n[u+d+o],T=c*y-h*g;g=c*g+h*y,y=T,r[u+d]=f+y,n[u+d]=m+g,r[u+d+o]=f-y,n[u+d+o]=m-g,d!==a&&(T=l*c-p*h,h=l*h+p*c,c=T)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var s=0,o=0;o<t;o++)s+=0|e[o],r[2*o]=8191&s,s>>>=13,r[2*o+1]=8191&s,s>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===s),n(!(-8192&s))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),s=this.stub(n),o=new Array(n),a=new Array(n),l=new Array(n),p=new Array(n),u=new Array(n),c=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,p,n),this.transform(o,s,a,l,n,i),this.transform(p,s,u,c,n,i);for(var d=0;d<n;d++){var f=a[d]*u[d]-l[d]*c[d];l[d]=a[d]*c[d]+l[d]*u[d],a[d]=f}return this.conjugate(a,l,n),this.transform(a,l,h,s,n,i),this.conjugate(h,s,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),T(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,o=(67108863&s)+(67108863&r);r>>=26,r+=s/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},s.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var a=this.words[t]&s,l=(0|this.words[t])-a<<r;this.words[t]=l|o,o=a>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,o=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<<s,l=r;if(i-=o,i=Math.max(0,i),l){for(var p=0;p<o;p++)l.words[p]=this.words[p];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,p=0;p<this.length;p++)this.words[p]=this.words[p+o];else this.words[0]=0,this.length=1;var u=0;for(p=this.length-1;p>=0&&(0!==u||p>=i);p--){var c=0|this.words[p];this.words[p]=u<<26-s|c>>>s,u=c&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},s.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,r){var i,s,o=e.length+r;this._expand(o);var a=0;for(i=0;i<e.length;i++){s=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&s}for(;i<this.length-r;i++)a=(s=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&s;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var p=0;p<a.length;p++)a.words[p]=0}var u=n.clone()._ishlnsubmul(i,1,l);0===u.negative&&(n=u,a&&(a.words[l]=1));for(var c=l-1;c>=0;c--){var h=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,c);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=h)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(r*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*r;this.words[i]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),p=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++p;for(var u=r.clone(),c=t.clone();!t.isZero();){for(var h=0,d=1;!(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(c)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;!(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(c)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),o.isub(l)):(r.isub(t),a.isub(i),l.isub(o))}return{a,b:l,gcd:r.iushln(p)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new s(1),a=new s(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var p=0,u=1;!(t.words[0]&u)&&p<26;++p,u<<=1);if(p>0)for(t.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var c=0,h=1;!(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a)):(r.isub(t),a.isub(o))}return(i=0===t.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return!(1&this.words[0])},s.prototype.isOdd=function(){return!(1&~this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,o=r;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},s.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new P(e)},s.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)},i(x,S),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|s>>>22,s=o}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,S),i(w,S),i(A,S),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new E;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return b[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new s(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),p=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,p).cmp(l);)u.redIAdd(l);for(var c=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),f=o;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<f);var g=this.pow(c,new s(1).iushln(f-y-1));h=h.redMul(g),c=g.redSqr(),d=d.redMul(c),f=y}return h},P.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},P.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new s(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var p=t.words[n],u=l-1;u>=0;u--){var c=p>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}l=26}return i},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new I(e)},i(I,P),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},70257:(e,t,r)=>{t.Ay=void 0;var n=r(61015),i=r(88497);t.Ay=function(e,t={},r){const s=function(e,t,r){var n;if(t.experimental_preserveFormat){if("string"!=typeof e)throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!t.retainLines)throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(t.compact&&"auto"!==t.compact)throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(t.minified)throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(t.jsescOption)throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(r.tokens))throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.")}const i={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,preserveFormat:t.experimental_preserveFormat,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,indent:{adjustMultilineComment:!0,style:" "},jsescOption:Object.assign({quotes:"double",wrap:!0,minimal:!1},t.jsescOption),topicToken:t.topicToken};i.decoratorsBeforeExport=t.decoratorsBeforeExport,i.jsescOption.json=t.jsonCompatibleStrings,i.recordAndTupleSyntaxType=null!=(n=t.recordAndTupleSyntaxType)?n:"hash",i.importAttributesKeyword=t.importAttributesKeyword,i.minified?(i.compact=!0,i.shouldPrintComment=i.shouldPrintComment||(()=>i.comments)):i.shouldPrintComment=i.shouldPrintComment||(e=>i.comments||e.includes("@license")||e.includes("@preserve")),"auto"===i.compact&&(i.compact="string"==typeof e&&e.length>5e5,i.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${t.filename} as it exceeds the max of 500KB.`)),(i.compact||i.preserveFormat)&&(i.indent.adjustMultilineComment=!1);const{auxiliaryCommentBefore:s,auxiliaryCommentAfter:o,shouldPrintComment:a}=i;return s&&!a(s)&&(i.auxiliaryCommentBefore=void 0),o&&!a(o)&&(i.auxiliaryCommentAfter=void 0),i}(r,t,e),o=t.sourceMaps?new n.default(t,r):null;return new i.default(s,o,e.tokens,"string"==typeof r?r:null).generate(e)}},70470:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.key||e.property){return!e.computed&&(0,n.isIdentifier)(t)&&(t=(0,i.stringLiteral)(t.name)),t};var n=r(63555),i=r(82208)},71535:(e,t,r)=>{var n=r(53896);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},72994:(e,t)=>{function r(){return this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null,this}function n(e,t,i,s,o){return r.call(this),this.source=void 0!==e?e:n.EMPTY_SOURCE,this.type=void 0!==t?t:null,this.channel=void 0!==i?i:r.DEFAULT_CHANNEL,this.start=void 0!==s?s:-1,this.stop=void 0!==o?o:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=e[0].line,this.column=e[0].column):this.column=-1,this}r.INVALID_TYPE=0,r.EPSILON=-2,r.MIN_USER_TOKEN_TYPE=1,r.EOF=-1,r.DEFAULT_CHANNEL=0,r.HIDDEN_CHANNEL=1,Object.defineProperty(r.prototype,"text",{get:function(){return this._text},set:function(e){this._text=e}}),r.prototype.getTokenSource=function(){return this.source[0]},r.prototype.getInputStream=function(){return this.source[1]},n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.EMPTY_SOURCE=[null,null],n.prototype.clone=function(){var e=new n(this.source,this.type,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,e.text=this.text,e},Object.defineProperty(n.prototype,"text",{get:function(){if(null!==this._text)return this._text;var e=this.getInputStream();if(null===e)return null;var t=e.size;return this.start<t&&this.stop<t?e.getText(this.start,this.stop):"<EOF>"},set:function(e){this._text=e}}),n.prototype.toString=function(){var e=this.text;return e=null!==e?e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+e+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"},t.Token=r,t.CommonToken=n},73019:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogicalExpression=t.AssignmentExpression=function(e){this.print(e.left),this.space(),this.token(e.operator,!1,0,!0),this.space(),this.print(e.right)},t.AssignmentPattern=function(e){this.print(e.left),("Identifier"===e.left.type||p(e.left))&&(e.left.optional&&this.tokenChar(63),this.print(e.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(e.right)},t.AwaitExpression=function(e){this.word("await"),this.space(),this.print(e.argument)},t.BinaryExpression=function(e){this.print(e.left),this.space();const{operator:t}=e;105===t.charCodeAt(0)?this.word(t):(this.token(t,!1,0,!0),this.setLastChar(t.charCodeAt(t.length-1))),this.space(),this.print(e.right)},t.BindExpression=function(e){this.print(e.object),this.token("::"),this.print(e.callee)},t.CallExpression=function(e){this.print(e.callee),this.print(e.typeArguments),this.print(e.typeParameters),this.tokenChar(40);const t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)},t.ConditionalExpression=function(e){this.print(e.test),this.space(),this.tokenChar(63),this.space(),this.print(e.consequent),this.space(),this.tokenChar(58),this.space(),this.print(e.alternate)},t.Decorator=function(e){this.tokenChar(64);const{expression:t}=e;this.print(t),this.newline()},t.DoExpression=function(e){e.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(e.body)},t.EmptyStatement=function(){this.semicolon(!0)},t.ExpressionStatement=function(e){this.tokenContext|=i.TokenContext.expressionStatement,this.print(e.expression),this.semicolon()},t.Import=function(){this.word("import")},t.MemberExpression=function(e){if(this.print(e.object),!e.computed&&a(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;if(o(e.property)&&"number"==typeof e.property.value&&(t=!0),t){const t=this.enterDelimited();this.tokenChar(91),this.print(e.property,void 0,!0),this.tokenChar(93),this._noLineTerminatorAfterNode=t}else this.tokenChar(46),this.print(e.property)},t.MetaProperty=function(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)},t.ModuleExpression=function(e){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();const{body:t}=e;(t.body.length||t.directives.length)&&this.newline(),this.print(t),this.dedent(),this.rightBrace(e)},t.NewExpression=function(e,t){if(this.word("new"),this.space(),this.print(e.callee),this.format.minified&&0===e.arguments.length&&!e.optional&&!s(t,{callee:e})&&!a(t)&&!l(t))return;if(this.print(e.typeArguments),this.print(e.typeParameters),e.optional&&this.token("?."),0===e.arguments.length&&this.tokenMap&&!this.tokenMap.endMatches(e,")"))return;this.tokenChar(40);const r=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=r,this.rightParens(e)},t.OptionalCallExpression=function(e){this.print(e.callee),this.print(e.typeParameters),e.optional&&this.token("?."),this.print(e.typeArguments),this.tokenChar(40);const t=this.enterDelimited();this.printList(e.arguments,void 0,void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)},t.OptionalMemberExpression=function(e){let{computed:t}=e;const{optional:r,property:n}=e;if(this.print(e.object),!t&&a(n))throw new TypeError("Got a MemberExpression for MemberExpression property");o(n)&&"number"==typeof n.value&&(t=!0),r&&this.token("?."),t?(this.tokenChar(91),this.print(n),this.tokenChar(93)):(r||this.tokenChar(46),this.print(n))},t.ParenthesizedExpression=function(e){this.tokenChar(40);const t=this.enterDelimited();this.print(e.expression,void 0,!0),this._noLineTerminatorAfterNode=t,this.rightParens(e)},t.PrivateName=function(e){this.tokenChar(35),this.print(e.id)},t.SequenceExpression=function(e){this.printList(e.expressions)},t.Super=function(){this.word("super")},t.ThisExpression=function(){this.word("this")},t.UnaryExpression=function(e){const{operator:t}=e,r=t.charCodeAt(0);r>=97&&r<=122?(this.word(t),this.space()):this.tokenChar(r),this.print(e.argument)},t.UpdateExpression=function(e){e.prefix?(this.token(e.operator,!1,0,!0),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator,!1,0,!0))},t.V8IntrinsicIdentifier=function(e){this.tokenChar(37),this.word(e.name)},t.YieldExpression=function(e){e.delegate?(this.word("yield",!0),this.tokenChar(42),e.argument&&(this.space(),this.print(e.argument))):e.argument?(this.word("yield",!0),this.space(),this.print(e.argument)):this.word("yield")},t._shouldPrintDecoratorsBeforeExport=function(e){return"boolean"==typeof this.format.decoratorsBeforeExport?this.format.decoratorsBeforeExport:"number"==typeof e.start&&e.start===e.declaration.start};var n=r(45741),i=r(36306);const{isCallExpression:s,isLiteral:o,isMemberExpression:a,isNewExpression:l,isPattern:p}=n},73261:(e,t,r)=>{var n=r(65994).process;Object.defineProperty(t,"__esModule",{value:!0}),t.allExpandedTypes=t.VISITOR_KEYS=t.NODE_UNION_SHAPES__PRIVATE=t.NODE_PARENT_VALIDATIONS=t.NODE_FIELDS=t.FLIPPED_ALIAS_KEYS=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.ALIAS_KEYS=void 0,t.arrayOf=y,t.arrayOfType=g,t.assertEach=T,t.assertNodeOrValueType=function(...e){function t(t,r,n){const o=f(n);for(const a of e)if(o===a||(0,i.default)(a,n))return void(0,s.validateChild)(t,r,n);throw new TypeError(`Property ${r} of ${t.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(null==n?void 0:n.type)}`)}return t.oneOfNodeOrValueTypes=e,t},t.assertNodeType=b,t.assertOneOf=function(...e){function t(t,r,n){if(!e.includes(n))throw new TypeError(`Property ${r} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(n)}`)}return t.oneOf=e,t},t.assertOptionalChainStart=function(){return function(e){var t;let r=e;for(;e;){const{type:e}=r;if("OptionalCallExpression"!==e){if("OptionalMemberExpression"!==e)break;if(r.optional)return;r=r.object}else{if(r.optional)return;r=r.callee}}throw new TypeError(`Non-optional ${e.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${null==(t=r)?void 0:t.type}`)}},t.assertShape=function(e){const t=Object.keys(e);function r(r,n,i){const o=[];for(const n of t)try{(0,s.validateField)(r,n,i[n],e[n])}catch(e){if(e instanceof TypeError){o.push(e.message);continue}throw e}if(o.length)throw new TypeError(`Property ${n} of ${r.type} expected to have the following:\n${o.join("\n")}`)}return r.shapeOf=e,r},t.assertValueType=S,t.chain=x,t.default=P,t.defineAliasedType=function(...e){return(t,r={})=>{let n=r.aliases;var i;n||(r.inherits&&(n=null==(i=A[r.inherits].aliases)?void 0:i.slice()),null!=n||(n=[]),r.aliases=n);const s=e.filter((e=>!n.includes(e)));n.unshift(...s),P(t,r)}},t.validate=m,t.validateArrayOfType=function(...e){return m(g(...e))},t.validateOptional=function(e){return{validate:e,optional:!0}},t.validateOptionalType=function(...e){return{validate:b(...e),optional:!0}},t.validateType=function(...e){return m(b(...e))};var i=r(23781),s=r(59751);const o=t.VISITOR_KEYS={},a=t.ALIAS_KEYS={},l=t.FLIPPED_ALIAS_KEYS={},p=t.NODE_FIELDS={},u=t.BUILDER_KEYS={},c=t.DEPRECATED_KEYS={},h=t.NODE_PARENT_VALIDATIONS={},d=t.NODE_UNION_SHAPES__PRIVATE={};function f(e){return Array.isArray(e)?"array":null===e?"null":typeof e}function m(e){return{validate:e}}function y(e){return x(S("array"),T(e))}function g(...e){return y(b(...e))}function T(e){const t=n.env.BABEL_TYPES_8_BREAKING?s.validateChild:()=>{};function r(r,n,i){if(!Array.isArray(i))return;let s=0;const o={toString:()=>`${n}[${s}]`};for(;s<i.length;s++){const n=i[s];e(r,o,n),t(r,o,n)}}return r.each=e,r}const v=t.allExpandedTypes=[];function b(...e){const t=new Set;function r(r,n,o){const a=null==o?void 0:o.type;if(null!=a){if(t.has(a))return void(0,s.validateChild)(r,n,o);if("Placeholder"===a)for(const t of e)if((0,i.default)(t,o))return void(0,s.validateChild)(r,n,o)}throw new TypeError(`Property ${n} of ${r.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(a)}`)}return v.push({types:e,set:t}),r.oneOfNodeTypes=e,r}function S(e){function t(t,r,n){if(f(n)!==e)throw new TypeError(`Property ${r} expected type of ${e} but got ${f(n)}`)}return t.type=e,t}function x(...e){function t(...t){for(const r of e)r(...t)}if(t.chainOf=e,e.length>=2&&"type"in e[0]&&"array"===e[0].type&&!("each"in e[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return t}const E=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),w=new Set(["default","optional","deprecated","validate"]),A={};function P(e,t={}){const r=t.inherits&&A[t.inherits]||{};let n=t.fields;if(!n&&(n={},r.fields)){const e=Object.getOwnPropertyNames(r.fields);for(const t of e){const e=r.fields[t],i=e.default;if(Array.isArray(i)?i.length>0:i&&"object"==typeof i)throw new Error("field defaults can only be primitives or empty arrays currently");n[t]={default:Array.isArray(i)?[]:i,optional:e.optional,deprecated:e.deprecated,validate:e.validate}}}const i=t.visitor||r.visitor||[],s=t.aliases||r.aliases||[],m=t.builder||r.builder||t.visitor||[];for(const r of Object.keys(t))if(!E.has(r))throw new Error(`Unknown type option "${r}" on ${e}`);t.deprecatedAlias&&(c[t.deprecatedAlias]=e);for(const e of i.concat(m))n[e]=n[e]||{};for(const t of Object.keys(n)){const r=n[t];void 0===r.default||m.includes(t)||(r.optional=!0),void 0===r.default?r.default=null:r.validate||null==r.default||(r.validate=S(f(r.default)));for(const n of Object.keys(r))if(!w.has(n))throw new Error(`Unknown field key "${n}" on ${e}.${t}`)}o[e]=t.visitor=i,u[e]=t.builder=m,p[e]=t.fields=n,a[e]=t.aliases=s,s.forEach((t=>{l[t]=l[t]||[],l[t].push(e)})),t.validate&&(h[e]=t.validate),t.unionShape&&(d[e]=t.unionShape),A[e]=t}},73416:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.isFunctionDeclaration)(e)||(0,n.isClassDeclaration)(e)||(0,i.default)(e)};var n=r(63555),i=r(62816)},74591:(e,t,r)=>{var n=r(25003);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}t.a=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof s;if(t=n?e:new s(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},74641:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n="",i=e){if(r.has(i))return;r.add(i);const{internal:s,trace:o}=function(){const{stackTraceLimit:e,prepareStackTrace:t}=Error;let r;if(Error.stackTraceLimit=4,Error.prepareStackTrace=function(e,t){r=t},(new Error).stack,Error.stackTraceLimit=e,Error.prepareStackTrace=t,!r)return{internal:!1,trace:""};const n=r.slice(2,4);return{internal:/[\\/]@babel[\\/]/.test(n[1].getFileName()),trace:n.map((e=>` at ${e}`)).join("\n")}}();s||console.warn(`${n}\`${e}\` has been deprecated, please migrate to \`${t}\`\n${o}`)};const r=new Set},74763:(e,t,r)=>{var n=r(72994).CommonToken;function i(){return this}function s(e){return i.call(this),this.copyText=void 0!==e&&e,this}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.DEFAULT=new s,s.prototype.create=function(e,t,r,i,s,o,a,l){var p=new n(e,t,i,s,o);return p.line=a,p.column=l,null!==r?p.text=r:this.copyText&&null!==e[1]&&(p.text=e[1].getText(s,o)),p},s.prototype.createThin=function(e,t){var r=new n(null,e);return r.text=t,r},t.p=s},74941:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const r=Array.from(t),s=new Map,o=new Map,a=new Set,l=[];for(let t=0;t<r.length;t++){const p=r[t];if(!p)continue;if(l.includes(p))continue;if((0,n.isTSAnyKeyword)(p))return[p];if((0,n.isTSBaseType)(p)){o.set(p.type,p);continue}if((0,n.isTSUnionType)(p)){a.has(p.types)||(r.push(...p.types),a.add(p.types));continue}const u="typeParameters";if((0,n.isTSTypeReference)(p)&&p[u]){const t=p[u],r=i(p.typeName);if(s.has(r)){let n=s.get(r);const i=n[u];i?(i.params.push(...t.params),i.params=e(i.params)):n=t}else s.set(r,p)}else l.push(p)}for(const[,e]of o)l.push(e);for(const[,e]of s)l.push(e);return l};var n=r(63555);function i(e){return(0,n.isIdentifier)(e)?e.name:(0,n.isThisExpression)(e)?"this":`${e.right.name}.${i(e.left)}`}},77171:(e,t,r)=>{var n=r(72994).Token,i=r(18393).Lexer,s=r(70040).Interval;function o(){return this}function a(e){return o.call(this),this.tokenSource=e,this.tokens=[],this.index=-1,this.fetchedEOF=!1,this}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype.mark=function(){return 0},a.prototype.release=function(e){},a.prototype.reset=function(){this.seek(0)},a.prototype.seek=function(e){this.lazyInit(),this.index=this.adjustSeekIndex(e)},a.prototype.get=function(e){return this.lazyInit(),this.tokens[e]},a.prototype.consume=function(){if(!(this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length))&&this.LA(1)===n.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))},a.prototype.sync=function(e){var t=e-this.tokens.length+1;return!(t>0)||this.fetch(t)>=t},a.prototype.fetch=function(e){if(this.fetchedEOF)return 0;for(var t=0;t<e;t++){var r=this.tokenSource.nextToken();if(r.tokenIndex=this.tokens.length,this.tokens.push(r),r.type===n.EOF)return this.fetchedEOF=!0,t+1}return e},a.prototype.getTokens=function(e,t,r){if(void 0===r&&(r=null),e<0||t<0)return null;this.lazyInit();var i=[];t>=this.tokens.length&&(t=this.tokens.length-1);for(var s=e;s<t;s++){var o=this.tokens[s];if(o.type===n.EOF)break;(null===r||r.contains(o.type))&&i.push(o)}return i},a.prototype.LA=function(e){return this.LT(e).type},a.prototype.LB=function(e){return this.index-e<0?null:this.tokens[this.index-e]},a.prototype.LT=function(e){if(this.lazyInit(),0===e)return null;if(e<0)return this.LB(-e);var t=this.index+e-1;return this.sync(t),t>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[t]},a.prototype.adjustSeekIndex=function(e){return e},a.prototype.lazyInit=function(){-1===this.index&&this.setup()},a.prototype.setup=function(){this.sync(0),this.index=this.adjustSeekIndex(0)},a.prototype.setTokenSource=function(e){this.tokenSource=e,this.tokens=[],this.index=-1,this.fetchedEOF=!1},a.prototype.nextTokenOnChannel=function(e,t){if(this.sync(e),e>=this.tokens.length)return-1;for(var r=this.tokens[e];r.channel!==this.channel;){if(r.type===n.EOF)return-1;e+=1,this.sync(e),r=this.tokens[e]}return e},a.prototype.previousTokenOnChannel=function(e,t){for(;e>=0&&this.tokens[e].channel!==t;)e-=1;return e},a.prototype.getHiddenTokensToRight=function(e,t){if(void 0===t&&(t=-1),this.lazyInit(),e<0||e>=this.tokens.length)throw e+" not in 0.."+this.tokens.length-1;var r=this.nextTokenOnChannel(e+1,i.DEFAULT_TOKEN_CHANNEL),n=e+1,s=-1===r?this.tokens.length-1:r;return this.filterForChannel(n,s,t)},a.prototype.getHiddenTokensToLeft=function(e,t){if(void 0===t&&(t=-1),this.lazyInit(),e<0||e>=this.tokens.length)throw e+" not in 0.."+this.tokens.length-1;var r=this.previousTokenOnChannel(e-1,i.DEFAULT_TOKEN_CHANNEL);if(r===e-1)return null;var n=r+1,s=e-1;return this.filterForChannel(n,s,t)},a.prototype.filterForChannel=function(e,t,r){for(var n=[],s=e;s<t+1;s++){var o=this.tokens[s];-1===r?o.channel!==i.DEFAULT_TOKEN_CHANNEL&&n.push(o):o.channel===r&&n.push(o)}return 0===n.length?null:n},a.prototype.getSourceName=function(){return this.tokenSource.getSourceName()},a.prototype.getText=function(e){this.lazyInit(),this.fill(),null==e&&(e=new s(0,this.tokens.length-1));var t=e.start;t instanceof n&&(t=t.tokenIndex);var r=e.stop;if(r instanceof n&&(r=r.tokenIndex),null===t||null===r||t<0||r<0)return"";r>=this.tokens.length&&(r=this.tokens.length-1);for(var i="",o=t;o<r+1;o++){var a=this.tokens[o];if(a.type===n.EOF)break;i+=a.text}return i},a.prototype.fill=function(){for(this.lazyInit();1e3===this.fetch(1e3););},t.f=a},77255:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if(r&&"Identifier"===e.type&&"ObjectProperty"===t.type&&"ObjectExpression"===r.type)return!1;const i=n.default.keys[t.type];if(i)for(let r=0;r<i.length;r++){const n=t[i[r]];if(Array.isArray(n)){if(n.includes(e))return!0}else if(n===e)return!0}return!1};var n=r(68830)},78529:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.isBlockStatement)(e))return e;let r=[];return(0,n.isEmptyStatement)(e)?r=[]:((0,n.isStatement)(e)||(e=(0,n.isFunction)(t)?(0,i.returnStatement)(e):(0,i.expressionStatement)(e)),r=[e]),(0,i.blockStatement)(r)};var n=r(63555),i=r(82208)},79959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&/^[a-z]/.test(e)}},80264:(e,t,r)=>{var n=r(28525),i=r(90686),s=r(10441),o=r(69445),a=r(23457);function l(e,t,r){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,r);if(o[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function p(e,t,r){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,r);if(o[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),s[e])r=s[e].key,n=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");r=8*o[e].key,n=o[e].iv}var i=a(t,!1,r,n);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),s[e])r=s[e].key,n=s[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");r=8*o[e].key,n=o[e].iv}var i=a(t,!1,r,n);return p(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=p,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},80816:(e,t,r)=>{(t=e.exports=r(3971)).Stream=t,t.Readable=t,t.Writable=r(41175),t.Duplex=r(49837),t.Transform=r(29075),t.PassThrough=r(54409)},81204:(e,t,r)=>{var n=r(66346).Set,i=r(41207).X,s=r(81367).StarLoopEntryState,o=r(87264).Q,a=r(4768).DFASerializer,l=r(4768).LexerDFASerializer;function p(e,t){if(void 0===t&&(t=0),this.atnStartState=e,this.decision=t,this._states=new n,this.s0=null,this.precedenceDfa=!1,e instanceof s&&e.isPrecedenceDecision){this.precedenceDfa=!0;var r=new i(null,new o);r.edges=[],r.isAcceptState=!1,r.requiresFullContext=!1,this.s0=r}return this}p.prototype.getPrecedenceStartState=function(e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return e<0||e>=this.s0.edges.length?null:this.s0.edges[e]||null},p.prototype.setPrecedenceStartState=function(e,t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";e<0||(this.s0.edges[e]=t)},p.prototype.setPrecedenceDfa=function(e){if(this.precedenceDfa!==e){if(this._states=new DFAStatesSet,e){var t=new i(null,new o);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=e}},Object.defineProperty(p.prototype,"states",{get:function(){return this._states}}),p.prototype.sortedStates=function(){return this._states.values().sort((function(e,t){return e.stateNumber-t.stateNumber}))},p.prototype.toString=function(e,t){return e=e||null,t=t||null,null===this.s0?"":new a(this,e,t).toString()},p.prototype.toLexerString=function(){return null===this.s0?"":new l(this).toString()},t.DFA=p},81324:(e,t,r)=>{var n=t;n.der=r(4715),n.pem=r(27022)},81339:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e)};var n=r(16938)},81367:(e,t)=>{function r(){return this.atn=null,this.stateNumber=r.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null,this}function n(){return r.call(this),this.stateType=r.BASIC,this}function i(){return r.call(this),this.decision=-1,this.nonGreedy=!1,this}function s(){return i.call(this),this.endState=null,this}function o(){return s.call(this),this.stateType=r.BLOCK_START,this}function a(){return r.call(this),this.stateType=r.BLOCK_END,this.startState=null,this}function l(){return r.call(this),this.stateType=r.RULE_STOP,this}function p(){return r.call(this),this.stateType=r.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}function u(){return i.call(this),this.stateType=r.PLUS_LOOP_BACK,this}function c(){return s.call(this),this.stateType=r.PLUS_BLOCK_START,this.loopBackState=null,this}function h(){return s.call(this),this.stateType=r.STAR_BLOCK_START,this}function d(){return r.call(this),this.stateType=r.STAR_LOOP_BACK,this}function f(){return i.call(this),this.stateType=r.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}function m(){return r.call(this),this.stateType=r.LOOP_END,this.loopBackState=null,this}function y(){return i.call(this),this.stateType=r.TOKEN_START,this}r.INVALID_TYPE=0,r.BASIC=1,r.RULE_START=2,r.BLOCK_START=3,r.PLUS_BLOCK_START=4,r.STAR_BLOCK_START=5,r.TOKEN_START=6,r.RULE_STOP=7,r.BLOCK_END=8,r.STAR_LOOP_BACK=9,r.STAR_LOOP_ENTRY=10,r.PLUS_LOOP_BACK=11,r.LOOP_END=12,r.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],r.INVALID_STATE_NUMBER=-1,r.prototype.toString=function(){return this.stateNumber},r.prototype.equals=function(e){return e instanceof r&&this.stateNumber===e.stateNumber},r.prototype.isNonGreedyExitState=function(){return!1},r.prototype.addTransition=function(e,t){void 0===t&&(t=-1),0===this.transitions.length?this.epsilonOnlyTransitions=e.isEpsilon:this.epsilonOnlyTransitions!==e.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===t?this.transitions.push(e):this.transitions.splice(t,1,e)},n.prototype=Object.create(r.prototype),n.prototype.constructor=n,i.prototype=Object.create(r.prototype),i.prototype.constructor=i,s.prototype=Object.create(i.prototype),s.prototype.constructor=s,o.prototype=Object.create(s.prototype),o.prototype.constructor=o,a.prototype=Object.create(r.prototype),a.prototype.constructor=a,l.prototype=Object.create(r.prototype),l.prototype.constructor=l,p.prototype=Object.create(r.prototype),p.prototype.constructor=p,u.prototype=Object.create(i.prototype),u.prototype.constructor=u,c.prototype=Object.create(s.prototype),c.prototype.constructor=c,h.prototype=Object.create(s.prototype),h.prototype.constructor=h,d.prototype=Object.create(r.prototype),d.prototype.constructor=d,f.prototype=Object.create(i.prototype),f.prototype.constructor=f,m.prototype=Object.create(r.prototype),m.prototype.constructor=m,y.prototype=Object.create(i.prototype),y.prototype.constructor=y,t.ATNState=r,t.BasicState=n,t.DecisionState=i,t.BlockStartState=s,t.BlockEndState=a,t.LoopEndState=m,t.RuleStartState=p,t.RuleStopState=l,t.TokensStartState=y,t.PlusLoopbackState=u,t.StarLoopbackState=d,t.StarLoopEntryState=f,t.PlusBlockStartState=c,t.StarBlockStartState=h,t.BasicBlockStartState=o},81540:(e,t,r)=>{var n=r(11265),i=r(79696).Buffer,s=r(10441),o=r(5339),a=r(84913),l=r(62053),p=r(23457);function u(e,t,r){a.call(this),this._cache=new c,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function c(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var a=s[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new o(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new u(a.module,t,r)}r(25003)(u,a),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},c.prototype.add=function(e){this.cache=i.concat([this.cache,e])},c.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=s[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=p(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},81625:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"eval"!==(e=(0,n.default)(e))&&"arguments"!==e||(e="_"+e),e};var n=r(29221)},82129:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),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.IMPORTOREXPORTDECLARATION_TYPES=t.IMMUTABLE_TYPES=t.FUNCTION_TYPES=t.FUNCTIONPARENT_TYPES=t.FUNCTIONPARAMETER_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(35108);t.STANDARDIZED_TYPES=n.FLIPPED_ALIAS_KEYS.Standardized,t.EXPRESSION_TYPES=n.FLIPPED_ALIAS_KEYS.Expression,t.BINARY_TYPES=n.FLIPPED_ALIAS_KEYS.Binary,t.SCOPABLE_TYPES=n.FLIPPED_ALIAS_KEYS.Scopable,t.BLOCKPARENT_TYPES=n.FLIPPED_ALIAS_KEYS.BlockParent,t.BLOCK_TYPES=n.FLIPPED_ALIAS_KEYS.Block,t.STATEMENT_TYPES=n.FLIPPED_ALIAS_KEYS.Statement,t.TERMINATORLESS_TYPES=n.FLIPPED_ALIAS_KEYS.Terminatorless,t.COMPLETIONSTATEMENT_TYPES=n.FLIPPED_ALIAS_KEYS.CompletionStatement,t.CONDITIONAL_TYPES=n.FLIPPED_ALIAS_KEYS.Conditional,t.LOOP_TYPES=n.FLIPPED_ALIAS_KEYS.Loop,t.WHILE_TYPES=n.FLIPPED_ALIAS_KEYS.While,t.EXPRESSIONWRAPPER_TYPES=n.FLIPPED_ALIAS_KEYS.ExpressionWrapper,t.FOR_TYPES=n.FLIPPED_ALIAS_KEYS.For,t.FORXSTATEMENT_TYPES=n.FLIPPED_ALIAS_KEYS.ForXStatement,t.FUNCTION_TYPES=n.FLIPPED_ALIAS_KEYS.Function,t.FUNCTIONPARENT_TYPES=n.FLIPPED_ALIAS_KEYS.FunctionParent,t.PUREISH_TYPES=n.FLIPPED_ALIAS_KEYS.Pureish,t.DECLARATION_TYPES=n.FLIPPED_ALIAS_KEYS.Declaration,t.FUNCTIONPARAMETER_TYPES=n.FLIPPED_ALIAS_KEYS.FunctionParameter,t.PATTERNLIKE_TYPES=n.FLIPPED_ALIAS_KEYS.PatternLike,t.LVAL_TYPES=n.FLIPPED_ALIAS_KEYS.LVal,t.TSENTITYNAME_TYPES=n.FLIPPED_ALIAS_KEYS.TSEntityName,t.LITERAL_TYPES=n.FLIPPED_ALIAS_KEYS.Literal,t.IMMUTABLE_TYPES=n.FLIPPED_ALIAS_KEYS.Immutable,t.USERWHITESPACABLE_TYPES=n.FLIPPED_ALIAS_KEYS.UserWhitespacable,t.METHOD_TYPES=n.FLIPPED_ALIAS_KEYS.Method,t.OBJECTMEMBER_TYPES=n.FLIPPED_ALIAS_KEYS.ObjectMember,t.PROPERTY_TYPES=n.FLIPPED_ALIAS_KEYS.Property,t.UNARYLIKE_TYPES=n.FLIPPED_ALIAS_KEYS.UnaryLike,t.PATTERN_TYPES=n.FLIPPED_ALIAS_KEYS.Pattern,t.CLASS_TYPES=n.FLIPPED_ALIAS_KEYS.Class;const i=t.IMPORTOREXPORTDECLARATION_TYPES=n.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration;t.EXPORTDECLARATION_TYPES=n.FLIPPED_ALIAS_KEYS.ExportDeclaration,t.MODULESPECIFIER_TYPES=n.FLIPPED_ALIAS_KEYS.ModuleSpecifier,t.ACCESSOR_TYPES=n.FLIPPED_ALIAS_KEYS.Accessor,t.PRIVATE_TYPES=n.FLIPPED_ALIAS_KEYS.Private,t.FLOW_TYPES=n.FLIPPED_ALIAS_KEYS.Flow,t.FLOWTYPE_TYPES=n.FLIPPED_ALIAS_KEYS.FlowType,t.FLOWBASEANNOTATION_TYPES=n.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,t.FLOWDECLARATION_TYPES=n.FLIPPED_ALIAS_KEYS.FlowDeclaration,t.FLOWPREDICATE_TYPES=n.FLIPPED_ALIAS_KEYS.FlowPredicate,t.ENUMBODY_TYPES=n.FLIPPED_ALIAS_KEYS.EnumBody,t.ENUMMEMBER_TYPES=n.FLIPPED_ALIAS_KEYS.EnumMember,t.JSX_TYPES=n.FLIPPED_ALIAS_KEYS.JSX,t.MISCELLANEOUS_TYPES=n.FLIPPED_ALIAS_KEYS.Miscellaneous,t.TYPESCRIPT_TYPES=n.FLIPPED_ALIAS_KEYS.TypeScript,t.TSTYPEELEMENT_TYPES=n.FLIPPED_ALIAS_KEYS.TSTypeElement,t.TSTYPE_TYPES=n.FLIPPED_ALIAS_KEYS.TSType,t.TSBASETYPE_TYPES=n.FLIPPED_ALIAS_KEYS.TSBaseType,t.MODULEDECLARATION_TYPES=i},82208:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(52625);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}}))}));var i=r(496);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}))},83872:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=e.split(".");return e=>(0,n.default)(e,r,t)};var n=r(68740)},84579:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const n=(0,r(83872).default)("React.Component");t.default=n},85404:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generatorInfosMap=void 0;var n=r(34228),i=r(89887);const s=t.generatorInfosMap=new Map;let o=0;for(const e of Object.keys(n).sort())e.startsWith("_")||s.set(e,[n[e],o++,void 0]);for(const e of Object.keys(i))s.set(e,[i[e],o++,void 0])},85604:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PLACEHOLDERS_FLIPPED_ALIAS=t.PLACEHOLDERS_ALIAS=t.PLACEHOLDERS=void 0;var n=r(73261);const i=t.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],s=t.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const e of i){const t=n.ALIAS_KEYS[e];null!=t&&t.length&&(s[e]=t)}const o=t.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(s).forEach((e=>{s[e].forEach((t=>{hasOwnProperty.call(o,t)||(o[t]=[]),o[t].push(e)}))}))},86587:(e,t,r)=>{var n=r(10014).PredicateTransition;function i(e){return Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,i):(new Error).stack,this.message=e.message,this.recognizer=e.recognizer,this.input=e.input,this.ctx=e.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state),this}function s(e,t,r,n){return i.call(this,{message:"",recognizer:e,input:t,ctx:null}),this.startIndex=r,this.deadEndConfigs=n,this}function o(e,t,r,n,s,o){o=o||e._ctx,n=n||e.getCurrentToken(),r=r||e.getCurrentToken(),t=t||e.getInputStream(),i.call(this,{message:"",recognizer:e,input:t,ctx:o}),this.deadEndConfigs=s,this.startToken=r,this.offendingToken=n}function a(e){i.call(this,{message:"",recognizer:e,input:e.getInputStream(),ctx:e._ctx}),this.offendingToken=e.getCurrentToken()}function l(e,t,r){i.call(this,{message:this.formatMessage(t,r||null),recognizer:e,input:e.getInputStream(),ctx:e._ctx});var s=e._interp.atn.states[e.state].transitions[0];return s instanceof n?(this.ruleIndex=s.ruleIndex,this.predicateIndex=s.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=t,this.offendingToken=e.getCurrentToken(),this}function p(){return Error.call(this),Error.captureStackTrace(this,p),this}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.getExpectedTokens=function(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null},i.prototype.toString=function(){return this.message},s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.prototype.toString=function(){var e="";return this.startIndex>=0&&this.startIndex<this.input.size&&(e=this.input.getText((this.startIndex,this.startIndex))),"LexerNoViableAltException"+e},o.prototype=Object.create(i.prototype),o.prototype.constructor=o,a.prototype=Object.create(i.prototype),a.prototype.constructor=a,l.prototype=Object.create(i.prototype),l.prototype.constructor=l,l.prototype.formatMessage=function(e,t){return null!==t?t:"failed predicate: {"+e+"}?"},p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,t.RecognitionException=i,t.NoViableAltException=o,t.LexerNoViableAltException=s,t.InputMismatchException=a,t.FailedPredicateException=l,t.ParseCancellationException=p},86809:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TSAnyKeyword=function(){this.word("any")},t.TSArrayType=function(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)},t.TSAsExpression=function(e){const{expression:t,typeAnnotation:r}=e;this.print(t,!0),this.space(),this.word("as"),this.space(),this.print(r)},t.TSBigIntKeyword=function(){this.word("bigint")},t.TSBooleanKeyword=function(){this.word("boolean")},t.TSCallSignatureDeclaration=function(e){h.call(this,e),o(this,e)},t.TSInterfaceHeritage=t.TSClassImplements=function(e){this.print(e.expression),this.print(e.typeArguments)},t.TSConditionalType=function(e){this.print(e.checkType),this.space(),this.word("extends"),this.space(),this.print(e.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(e.trueType),this.space(),this.tokenChar(58),this.space(),this.print(e.falseType)},t.TSConstructSignatureDeclaration=function(e){this.word("new"),this.space(),h.call(this,e),o(this,e)},t.TSConstructorType=function(e){e.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),l.call(this,e)},t.TSDeclareFunction=function(e,t){e.declare&&(this.word("declare"),this.space()),n._functionHead.call(this,e,t,!1),this.semicolon()},t.TSDeclareMethod=function(e){i._classMethodHead.call(this,e),this.semicolon()},t.TSEnumBody=c,t.TSEnumDeclaration=function(e){const{declare:t,const:r,id:n}=e;t&&(this.word("declare"),this.space()),r&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(n),this.space(),c.call(this,e)},t.TSEnumMember=function(e){const{id:t,initializer:r}=e;this.print(t),r&&(this.space(),this.tokenChar(61),this.space(),this.print(r))},t.TSExportAssignment=function(e){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()},t.TSExternalModuleReference=function(e){this.token("require("),this.print(e.expression),this.tokenChar(41)},t.TSFunctionType=function(e){l.call(this,e)},t.TSImportEqualsDeclaration=function(e){const{id:t,moduleReference:r}=e;e.isExport&&(this.word("export"),this.space()),this.word("import"),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(r),this.semicolon()},t.TSImportType=function(e){const{qualifier:t,options:r}=e;this.word("import"),this.tokenChar(40),this.print(e.argument),r&&(this.tokenChar(44),this.print(r)),this.tokenChar(41),t&&(this.tokenChar(46),this.print(t));const n=e.typeParameters;n&&this.print(n)},t.TSIndexSignature=function(e){const{readonly:t,static:r}=e;r&&(this.word("static"),this.space()),t&&(this.word("readonly"),this.space()),this.tokenChar(91),n._parameters.call(this,e.parameters,93),this.print(e.typeAnnotation),o(this,e)},t.TSIndexedAccessType=function(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)},t.TSInferType=function(e){this.word("infer"),this.print(e.typeParameter)},t.TSInstantiationExpression=function(e){this.print(e.expression),this.print(e.typeParameters)},t.TSInterfaceBody=function(e){d(this,e,(()=>this.printJoin(e.body,!0,!0,void 0,void 0,!0)))},t.TSInterfaceDeclaration=function(e){const{declare:t,id:r,typeParameters:n,extends:i,body:s}=e;t&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(r),this.print(n),null!=i&&i.length&&(this.space(),this.word("extends"),this.space(),this.printList(i)),this.space(),this.print(s)},t.TSIntersectionType=function(e){p(this,e,"&")},t.TSIntrinsicKeyword=function(){this.word("intrinsic")},t.TSLiteralType=function(e){this.print(e.literal)},t.TSMappedType=function(e){const{nameType:t,optional:r,readonly:n,typeAnnotation:i}=e;this.tokenChar(123);const s=this.enterDelimited();this.space(),n&&(u(this,n),this.word("readonly"),this.space()),this.tokenChar(91),this.word(e.typeParameter.name),this.space(),this.word("in"),this.space(),this.print(e.typeParameter.constraint,void 0,!0),t&&(this.space(),this.word("as"),this.space(),this.print(t,void 0,!0)),this.tokenChar(93),r&&(u(this,r),this.tokenChar(63)),i&&(this.tokenChar(58),this.space(),this.print(i,void 0,!0)),this.space(),this._noLineTerminatorAfterNode=s,this.tokenChar(125)},t.TSMethodSignature=function(e){const{kind:t}=e;"set"!==t&&"get"!==t||(this.word(t),this.space()),a.call(this,e),h.call(this,e),o(this,e)},t.TSModuleBlock=function(e){d(this,e,(()=>this.printSequence(e.body,!0,!0)))},t.TSModuleDeclaration=function(e){const{declare:t,id:r,kind:n}=e;if(t&&(this.word("declare"),this.space()),e.global||(this.word(null!=n?n:"Identifier"===r.type?"namespace":"module"),this.space()),this.print(r),!e.body)return void this.semicolon();let i=e.body;for(;"TSModuleDeclaration"===i.type;)this.tokenChar(46),this.print(i.id),i=i.body;this.space(),this.print(i)},t.TSNamedTupleMember=function(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)},t.TSNamespaceExportDeclaration=function(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id),this.semicolon()},t.TSNeverKeyword=function(){this.word("never")},t.TSNonNullExpression=function(e){this.print(e.expression),this.tokenChar(33),this.setLastChar(33)},t.TSNullKeyword=function(){this.word("null")},t.TSNumberKeyword=function(){this.word("number")},t.TSObjectKeyword=function(){this.word("object")},t.TSOptionalType=function(e){this.print(e.typeAnnotation),this.tokenChar(63)},t.TSParameterProperty=function(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word("readonly"),this.space()),n._param.call(this,e.parameter)},t.TSParenthesizedType=function(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)},t.TSPropertySignature=function(e){const{readonly:t}=e;t&&(this.word("readonly"),this.space()),a.call(this,e),this.print(e.typeAnnotation),o(this,e)},t.TSQualifiedName=function(e){this.print(e.left),this.tokenChar(46),this.print(e.right)},t.TSRestType=function(e){this.token("..."),this.print(e.typeAnnotation)},t.TSSatisfiesExpression=function(e){const{expression:t,typeAnnotation:r}=e;this.print(t,!0),this.space(),this.word("satisfies"),this.space(),this.print(r)},t.TSStringKeyword=function(){this.word("string")},t.TSSymbolKeyword=function(){this.word("symbol")},t.TSTemplateLiteralType=function(e){s._printTemplate.call(this,e,e.types)},t.TSThisType=function(){this.word("this")},t.TSTupleType=function(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)},t.TSTypeAliasDeclaration=function(e){const{declare:t,id:r,typeParameters:n,typeAnnotation:i}=e;t&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(r),this.print(n),this.space(),this.tokenChar(61),this.space(),this.print(i),this.semicolon()},t.TSTypeAnnotation=function(e,t){this.token("TSFunctionType"!==t.type&&"TSConstructorType"!==t.type||t.typeAnnotation!==e?":":"=>"),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)},t.TSTypeAssertion=function(e){const{typeAnnotation:t,expression:r}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(r)},t.TSTypeLiteral=function(e){d(this,e,(()=>this.printJoin(e.members,!0,!0,void 0,void 0,!0)))},t.TSTypeOperator=function(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)},t.TSTypeParameter=function(e){e.const&&(this.word("const"),this.space()),e.in&&(this.word("in"),this.space()),e.out&&(this.word("out"),this.space()),this.word(e.name),e.constraint&&(this.space(),this.word("extends"),this.space(),this.print(e.constraint)),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))},t.TSTypeParameterDeclaration=t.TSTypeParameterInstantiation=function(e,t){this.tokenChar(60);let r="ArrowFunctionExpression"===t.type&&1===e.params.length;this.tokenMap&&null!=e.start&&null!=e.end&&(r&&(r=!!this.tokenMap.find(e,(e=>this.tokenMap.matchesOriginal(e,",")))),r||(r=this.shouldPrintTrailingComma(">"))),this.printList(e.params,r),this.tokenChar(62)},t.TSTypePredicate=function(e){e.asserts&&(this.word("asserts"),this.space()),this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(e.typeAnnotation.typeAnnotation))},t.TSTypeQuery=function(e){this.word("typeof"),this.space(),this.print(e.exprName);const t=e.typeParameters;t&&this.print(t)},t.TSTypeReference=function(e){const t=e.typeParameters;this.print(e.typeName,!!t),this.print(t)},t.TSUndefinedKeyword=function(){this.word("undefined")},t.TSUnionType=function(e){p(this,e,"|")},t.TSUnknownKeyword=function(){this.word("unknown")},t.TSVoidKeyword=function(){this.word("void")},t._tsPrintClassMemberModifiers=function(e){const t="ClassPrivateProperty"===e.type,r="ClassAccessorProperty"===e.type||"ClassProperty"===e.type;f(this,e,[r&&e.declare&&"declare",!t&&e.accessibility]),e.static&&(this.word("static"),this.space()),f(this,e,[!t&&e.abstract&&"abstract",!t&&e.override&&"override",(r||t)&&e.readonly&&"readonly"])};var n=r(38118),i=r(18744),s=r(18133);function o(e,t){e.tokenMap&&t.start&&t.end?e.tokenMap.endMatches(t,",")?e.token(","):e.tokenMap.endMatches(t,";")&&e.semicolon():e.semicolon()}function a(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function l(e){const{typeParameters:t}=e,r=e.parameters;this.print(t),this.tokenChar(40),n._parameters.call(this,r,41),this.space();const i=e.typeAnnotation;this.print(i)}function p(e,t,r){var n;let i=0;null!=(n=e.tokenMap)&&n.startMatches(t,r)&&(i=1,e.token(r)),e.printJoin(t.types,void 0,void 0,(function(e){this.space(),this.token(r,void 0,e+i),this.space()}))}function u(e,t){!0!==t&&e.token(t)}function c(e){d(this,e,(()=>{var t;return this.printList(e.members,null==(t=this.shouldPrintTrailingComma("}"))||t,!0,!0,void 0,!0)}))}function h(e){const{typeParameters:t}=e,r=e.parameters;this.print(t),this.tokenChar(40),n._parameters.call(this,r,41);const i=e.typeAnnotation;this.print(i)}function d(e,t,r){e.token("{");const n=e.enterDelimited();r(),e._noLineTerminatorAfterNode=n,e.rightBrace(t)}function f(e,t,r){var n;const i=new Set;for(const e of r)e&&i.add(e);null==(n=e.tokenMap)||n.find(t,(t=>!!i.has(t.value)&&(e.token(t.value),e.space(),i.delete(t.value),0===i.size)));for(const t of i)e.word(t),e.space()}},87264:(e,t,r)=>{var n=r(51028).ATN,i=r(66346),s=i.Hash,o=i.Set,a=r(7842).Ij,l=r(10559).merge;function p(e){return e.hashCodeForConfigSet()}function u(e,t){return e===t||null!==e&&null!==t&&e.equalsForConfigSet(t)}function c(e){return this.configLookup=new o(p,u),this.fullCtx=void 0===e||e,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1,this}function h(){return c.call(this),this.configLookup=new o,this}c.prototype.add=function(e,t){if(void 0===t&&(t=null),this.readOnly)throw"This set is readonly";e.semanticContext!==a.NONE&&(this.hasSemanticContext=!0),e.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);var r=this.configLookup.add(e);if(r===e)return this.cachedHashCode=-1,this.configs.push(e),!0;var n=!this.fullCtx,i=l(r.context,e.context,n,t);return r.reachesIntoOuterContext=Math.max(r.reachesIntoOuterContext,e.reachesIntoOuterContext),e.precedenceFilterSuppressed&&(r.precedenceFilterSuppressed=!0),r.context=i,!0},c.prototype.getStates=function(){for(var e=new o,t=0;t<this.configs.length;t++)e.add(this.configs[t].state);return e},c.prototype.getPredicates=function(){for(var e=[],t=0;t<this.configs.length;t++){var r=this.configs[t].semanticContext;r!==a.NONE&&e.push(r.semanticContext)}return e},Object.defineProperty(c.prototype,"items",{get:function(){return this.configs}}),c.prototype.optimizeConfigs=function(e){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(var t=0;t<this.configs.length;t++){var r=this.configs[t];r.context=e.getCachedContext(r.context)}},c.prototype.addAll=function(e){for(var t=0;t<e.length;t++)this.add(e[t]);return!1},c.prototype.equals=function(e){return this===e||e instanceof c&&i.equalArrays(this.configs,e.configs)&&this.fullCtx===e.fullCtx&&this.uniqueAlt===e.uniqueAlt&&this.conflictingAlts===e.conflictingAlts&&this.hasSemanticContext===e.hasSemanticContext&&this.dipsIntoOuterContext===e.dipsIntoOuterContext},c.prototype.hashCode=function(){var e=new s;return this.updateHashCode(e),e.finish()},c.prototype.updateHashCode=function(e){this.readOnly?(-1===this.cachedHashCode&&((e=new s).update(this.configs),this.cachedHashCode=e.finish()),e.update(this.cachedHashCode)):e.update(this.configs)},Object.defineProperty(c.prototype,"length",{get:function(){return this.configs.length}}),c.prototype.isEmpty=function(){return 0===this.configs.length},c.prototype.contains=function(e){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(e)},c.prototype.containsFast=function(e){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(e)},c.prototype.clear=function(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new o},c.prototype.setReadonly=function(e){this.readOnly=e,e&&(this.configLookup=null)},c.prototype.toString=function(){return i.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==n.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")},h.prototype=Object.create(c.prototype),h.prototype.constructor=h,t.Q=c,t.F=h},88497:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1123),i=r(36306),s=r(85404),o=r(45741),a=r(98703),l=r(56049);const{isExpression:p,isFunction:u,isStatement:c,isClassBody:h,isTSInterfaceBody:d,isTSEnumMember:f}=o,m=/e/i,y=/\.0+$/,g=/[\n\r\u2028\u2029]/,T=/[\n\r\u2028\u2029]|\*\//;function v(e){return"CommentLine"===e.type||g.test(e.value)}function b(e,t){this.tokenChar(44,e),t||this.space()}t.default=class{constructor(e,t,r=null,s=null){this.tokenContext=i.TokenContext.normal,this._tokens=null,this._originalCode=null,this._currentNode=null,this._currentTypeId=null,this._indent=0,this._indentRepeat=0,this._insideAux=!1,this._noLineTerminator=!1,this._noLineTerminatorAfterNode=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new Set,this._lastCommentLine=0,this._innerCommentsState=0,this._flags=0,this.tokenMap=null,this._boundGetRawIdentifier=null,this._printSemicolonBeforeNextNode=-1,this._printSemicolonBeforeNextToken=-1,this.format=e,this._tokens=r,this._originalCode=s,this._indentRepeat=e.indent.style.length,this._inputMap=(null==t?void 0:t._inputMap)||null,this._buf=new n.default(t,e.indent.style[0]);const{preserveFormat:o,compact:a,concise:l,retainLines:p,retainFunctionParens:u}=e;o&&(this._flags|=1),a&&(this._flags|=2),l&&(this._flags|=4),p&&(this._flags|=8),u&&(this._flags|=16),(e.auxiliaryCommentBefore||e.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){const e=this._noLineTerminatorAfterNode;return null!==e&&(this._noLineTerminatorAfterNode=null),e}generate(e){return this.format.preserveFormat&&(this.tokenMap=new a.TokenMap(e,this._tokens,this._originalCode),this._boundGetRawIdentifier=l._getRawIdentifier.bind(this)),this.print(e),this._maybeAddAuxComment(),this._buf.get()}indent(e=this._flags){7&e||(this._indent+=this._indentRepeat)}dedent(e=this._flags){7&e||(this._indent-=this._indentRepeat)}semicolon(e=!1){const t=this._flags;if(32&t&&this._maybeAddAuxComment(),1&t){const e=this._currentNode;if(null!=e.start&&null!=e.end){if(!this.tokenMap.endMatches(e,";"))return void(this._printSemicolonBeforeNextNode=this._buf.getCurrentLine());const t=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[t[t.length-1]].loc.start)}}e?this._appendChar(59):this._queue(59),this._noLineTerminator=!1}rightBrace(e){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",e.loc,-1),this.tokenChar(125)}rightParens(e){this.sourceWithOffset("end",e.loc,-1),this.tokenChar(41)}space(e=!1){if(!(3&this._flags))if(e)this._space();else{const e=this.getLastChar(!0);0!==e&&32!==e&&10!==e&&this._space()}}word(e,t=!1){this.tokenContext&=i.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e);const r=this._flags;32&r&&this._maybeAddAuxComment(),1&r&&this._catchUpToCurrentToken(e);const n=this.getLastChar();(-2===n||-3===n||47===n&&47===e.charCodeAt(0))&&this._space(),this._append(e,!1),this.setLastChar(-3),this._noLineTerminator=t}number(e,t){this.word(e),!Number.isInteger(t)||function(e){if(e.length>2&&48===e.charCodeAt(0)){const t=e.charCodeAt(1);return 98===t||111===t||120===t}return!1}(e)||m.test(e)||y.test(e)||46===e.charCodeAt(e.length-1)||this.setLastChar(-2)}token(e,t=!1,r=0,n=!1){this.tokenContext&=i.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e,r);const s=this._flags;if(32&s&&this._maybeAddAuxComment(),1&s&&this._catchUpToCurrentToken(e,r),n){const t=e.charCodeAt(0);((45===t&&"--"===e||61===t)&&33===this.getLastChar()||43===t&&43===this.getLastChar()||45===t&&45===this.getLastChar()||46===t&&-2===this.getLastChar())&&this._space()}this._append(e,t),this._noLineTerminator=!1}tokenChar(e,t=0){this.tokenContext&=i.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(e,t);const r=this._flags;32&r&&this._maybeAddAuxComment(),1&r&&this._catchUpToCurrentToken(e,t),(43===e&&43===this.getLastChar()||45===e&&45===this.getLastChar()||46===e&&-2===this.getLastChar())&&this._space(),this._appendChar(e),this._noLineTerminator=!1}newline(e=1,t=this._flags){if(!(e<=0||10&t))if(4&t)this.space();else{e>2&&(e=2),e-=this._buf.getNewlineCount();for(let t=0;t<e;t++)this._newline()}}endsWith(e){return this.getLastChar(!0)===e}getLastChar(e){return this._buf.getLastChar(e)}setLastChar(e){this._buf._last=e}exactSource(e,t){e?(this._catchUp("start",e),this._buf.exactSource(e,t)):t()}source(e,t){t&&(this._catchUp(e,t),this._buf.source(e,t))}sourceWithOffset(e,t,r){t&&!this.format.preserveFormat&&(this._catchUp(e,t),this._buf.sourceWithOffset(e,t,r))}sourceIdentifierName(e,t){if(!this._buf._canMarkIdName)return;const r=this._buf._sourcePosition;r.identifierNamePos=t,r.identifierName=e}_space(){this._queue(32)}_newline(){32===this._buf._queuedChar&&(this._buf._queuedChar=0),this._appendChar(10,!0)}_catchUpToCurrentToken(e,t=0){const r=this.tokenMap.findMatching(this._currentNode,e,t);r&&this._catchUpTo(r.loc.start),-1!==this._printSemicolonBeforeNextToken&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&this._appendChar(59,!0),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(e,t){this._maybeIndent(),this._buf.append(e,t)}_appendChar(e,t){t||this._maybeIndent(),this._buf.appendChar(e)}_queue(e){this._buf.queue(e),this.setLastChar(-1)}_maybeIndent(){const e=this._shouldIndent();e>0&&this._buf._appendChar(-1,e,!1)}_shouldIndent(){return this.endsWith(10)?this._indent:0}catchUp(e){if(!this.format.retainLines)return;const t=e-this._buf.getCurrentLine();for(let e=0;e<t;e++)this._newline()}_catchUp(e,t){const r=this._flags;if(!(1&r))return void(8&r&&null!=t&&t[e]&&this.catchUp(t[e].line));const n=null==t?void 0:t[e];null!=n&&this._catchUpTo(n)}_catchUpTo({line:e,column:t,index:r}){const n=e-this._buf.getCurrentLine();if(n>0&&this._noLineTerminator)return;for(let e=0;e<n;e++)this._newline();const i=n>0?t:t-this._buf.getCurrentColumn();if(i>0){const e=this._originalCode?this._originalCode.slice(r-i,r).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu," "):" ".repeat(i);this._append(e,!1),this.setLastChar(32)}}printTerminatorless(e){this._noLineTerminator=!0,this.print(e)}print(e,t=!1,r=!1,n){var o,a;if(!e)return;this._innerCommentsState=0;const{type:l,loc:u,extra:c}=e,h=this._flags;let d=!1;e._compact&&(this._flags|=4,d=!0);const f=s.generatorInfosMap.get(l);if(void 0===f)throw new ReferenceError(`unknown node of type ${JSON.stringify(l)} with constructor ${JSON.stringify(e.constructor.name)}`);const[m,y,g]=f,T=this._currentNode,b=this._currentTypeId;let S;this._currentNode=e,this._currentTypeId=y,1&h&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode),32&h&&(S=this._insideAux,this._insideAux=null==u,this._maybeAddAuxComment(this._insideAux&&!S));let x=0;r&&(x=this.tokenContext,x&i.TokenContext.forInOrInitHeadAccumulate?this.tokenContext=0:x=0);const E=null!=c&&c.parenthesized;let w=E&&1&h||E&&16&h&&71===y||T&&((0,i.parentNeedsParens)(e,T,b)||null!=g&&g(e,T,b,this.tokenContext,1&h?this._boundGetRawIdentifier:void 0));if(!w&&E&&null!=(o=e.leadingComments)&&o.length&&"CommentBlock"===e.leadingComments[0].type)switch(b){case 65:case 243:case 6:case 143:break;case 17:case 130:case 112:if(T.callee!==e)break;default:w=!0}let A,P=!1;var I;!w&&this._noLineTerminator&&(null!=(a=e.leadingComments)&&a.some(v)||8&h&&u&&u.start.line>this._buf.getCurrentLine())&&(w=!0,P=!0),w||(t||(t=!!T&&this._noLineTerminatorAfterNode===T&&(0,i.isLastChild)(T,e)),t&&(null!=(I=e.trailingComments)&&I.some(v)?p(e)&&(w=!0):(A=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=e))),w&&(this.tokenChar(40),P&&this.indent(),this._innerCommentsState=0,r||(x=this.tokenContext),x&i.TokenContext.forInOrInitHeadAccumulate&&(this.tokenContext=0),A=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(e,T),this.exactSource(139===y||66===y?null:u,m.bind(this,e,T)),w?(this._printTrailingComments(e,T),P&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=t):t&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(e,T)):this._printTrailingComments(e,T,n),x&&(this.tokenContext=x),this._currentNode=T,this._currentTypeId=b,d&&(this._flags=h),32&h&&(this._insideAux=S),null!=A&&(this._noLineTerminatorAfterNode=A),this._innerCommentsState=0}_maybeAddAuxComment(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e},0)}getPossibleRaw(e){const t=e.extra;if(null!=(null==t?void 0:t.raw)&&null!=t.rawValue&&e.value===t.rawValue)return t.raw}printJoin(e,t,r,n,i,s,o){if(null==e||!e.length)return;const a=this._flags;if(null==r&&8&a){var l;const t=null==(l=e[0].loc)?void 0:l.start.line;null!=t&&t!==this._buf.getCurrentLine()&&(r=!0)}r&&this.indent(a);const p=e.length;for(let r=0;r<p;r++){const l=e[r];if(l&&(t&&0===r&&this._buf.hasContent()&&this.newline(1,a),this.print(l,!1,s,o||0),null!=n&&(r<p-1?n.call(this,r,!1):i&&n.call(this,r,!0)),t))if(r+1===p)this.newline(1,a);else{const t=this._lastCommentLine;if(t>0){var u;const n=((null==(u=e[r+1].loc)?void 0:u.start.line)||0)-t;if(n>=0){this.newline(n||1,a);continue}}this.newline(1,a)}}r&&this.dedent(a)}printAndIndentOnComments(e){const t=e.leadingComments&&e.leadingComments.length>0;t&&this.indent(),this.print(e),t&&this.dedent()}printBlock(e){"EmptyStatement"!==e.type&&this.space(),this.print(e)}_printTrailingComments(e,t,r){const{innerComments:n,trailingComments:i}=e;null!=n&&n.length&&this._printComments(2,n,e,t,r),null!=i&&i.length?this._printComments(2,i,e,t,r):this._lastCommentLine=0}_printLeadingComments(e,t){const r=e.leadingComments;null!=r&&r.length&&this._printComments(0,r,e,t)}_maybePrintInnerComments(e,t){var r;const n=this._innerCommentsState;switch(3&n){case 0:return void(this._innerCommentsState=5);case 1:this.printInnerComments((4&n)>0,null==(r=this.tokenMap)?void 0:r.findMatching(this._currentNode,e,t))}}printInnerComments(e=!0,t){const r=this._currentNode,n=r.innerComments;if(null==n||!n.length)return void(this._innerCommentsState=2);const i=this.endsWith(32);switch(e&&this.indent(),this._printComments(1,n,r,void 0,void 0,t)){case 2:this._innerCommentsState=2;case 1:i&&this.space()}e&&this.dedent()}noIndentInnerCommentsHere(){this._innerCommentsState&=-5}printSequence(e,t,r,n){this.printJoin(e,!0,null!=t&&t,void 0,void 0,r,n)}printList(e,t,r,n,i,s){this.printJoin(e,r,n,null!=i?i:b,t,s)}shouldPrintTrailingComma(e){if(!this.tokenMap)return null;const t=this.tokenMap.findLastIndex(this._currentNode,(t=>this.tokenMap.matchesOriginal(t,"number"==typeof e?String.fromCharCode(e):e)));return t<=0?null:this.tokenMap.matchesOriginal(this._tokens[t-1],",")}_shouldPrintComment(e,t){if(e.ignore)return 0;if(this._printedComments.has(e))return 0;if(this._noLineTerminator&&T.test(e.value))return 2;if(t&&this.tokenMap){const r=this.tokenMap.find(this._currentNode,(t=>t.value===e.value));if(r&&r.start>t.start)return 2}return this._printedComments.add(e),this.format.shouldPrintComment(e.value)?1:0}_printComment(e,t){const r=this._noLineTerminator,n="CommentBlock"===e.type,i=n&&1!==t&&!r;switch(i&&this._buf.hasContent()&&2!==t&&this.newline(1),this.getLastChar(!0)){case 47:this._space();case 91:case 123:case 40:break;default:this.space()}let s;if(n){if(s=`/*${e.value}*/`,this.format.indent.adjustMultilineComment){var o;const t=null==(o=e.loc)?void 0:o.start.column;if(t){const e=new RegExp("\\n\\s{1,"+t+"}","g");s=s.replace(e,"\n")}if(4&this._flags)s=s.replace(/\n(?!$)/g,"\n");else{let e=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent()||this.format.retainLines)&&(e+=this._indent),s=s.replace(/\n(?!$)/g,`\n${" ".repeat(e)}`)}}}else s=r?`/*${e.value}*/`:`//${e.value}`;this.source("start",e.loc),this._append(s,n),n||r||this._newline(),i&&3!==t&&this.newline(1)}_printComments(e,t,r,n,i=0,s){const o=r.loc,a=t.length;let l=!!o;const p=l?o.start.line:0,m=l?o.end.line:0;let y=0,T=0;const{_noLineTerminator:v,_flags:b}=this;for(let o=0;o<a;o++){const S=t[o],x=this._shouldPrintComment(S,s);if(2===x)return 0===o?0:1;if(l&&S.loc&&1===x){const t=S.loc.start.line,r=S.loc.end.line;if(0===e){let e=0;if(0===o?!this._buf.hasContent()||"CommentLine"!==S.type&&t===r||(e=T=1):e=t-y,y=r,e>0&&!v&&this.newline(e,b),this._printComment(S,1),o+1===a){const e=Math.max(p-y,T);e>0&&!v&&this.newline(e,b),y=p}}else if(1===e){const e=t-(0===o?p:y);if(y=r,e>0&&!v&&this.newline(e,b),this._printComment(S,1),o+1===a){const e=Math.min(1,m-y);e>0&&!v&&this.newline(e,b),y=m}}else{const e=t-(0===o?m-i:y);y=r,e>0&&!v&&this.newline(e,b),this._printComment(S,1)}}else{if(l=!1,1!==x)continue;if(1===a){const t=S.loc?S.loc.start.line===S.loc.end.line:!g.test(S.value),i=t&&!c(r)&&!h(n)&&!d(n)&&!f(r);0===e?this._printComment(S,i&&"ObjectExpression"!==r.type||t&&u(n)&&n.body===r?1:0):i&&2===e?this._printComment(S,1):this._printComment(S,0)}else 1!==e||"ObjectExpression"===r.type&&r.properties.length>1||"ClassBody"===r.type||"TSInterfaceBody"===r.type?this._printComment(S,0):this._printComment(S,0===o?2:o===a-1?3:0)}}return 2===e&&l&&y&&(this._lastCommentLine=y),2}}},89135:(e,t,r)=>{var n=r(79696).Buffer,i=n.alloc(16,0);function s(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(!!(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=!!(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=s(i)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},e.exports=o},89779:(e,t,r)=>{var n=r(10626);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},89859:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="body"){const r=(0,n.default)(e[t],e);return e[t]=r,r};var n=r(78529)},89887:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecimalLiteral=function(e){const t=this.getPossibleRaw(e);this.format.minified||void 0===t?this.word(e.value+"m"):this.word(t)},t.Noop=function(){},t.RecordExpression=function(e){const t=e.properties;let r,n;if("bar"===this.format.recordAndTupleSyntaxType)r="{|",n="|}";else{if("hash"!==this.format.recordAndTupleSyntaxType&&null!=this.format.recordAndTupleSyntaxType)throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);r="#{",n="}"}this.token(r),t.length&&(this.space(),this.printList(t,this.shouldPrintTrailingComma(n),!0,!0),this.space()),this.token(n)},t.TSExpressionWithTypeArguments=function(e){this.print(e.expression),this.print(e.typeParameters)},t.TupleExpression=function(e){const t=e.elements,r=t.length;let n,i;if("bar"===this.format.recordAndTupleSyntaxType)n="[|",i="|]";else{if("hash"!==this.format.recordAndTupleSyntaxType)throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);n="#[",i="]"}this.token(n);for(let e=0;e<t.length;e++){const n=t[e];n&&(e>0&&this.space(),this.print(n),(e<r-1||this.shouldPrintTrailingComma(i))&&this.token(",",!1,e))}this.token(i)}},89912:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.map((e=>(0,s.isTSTypeAnnotation)(e)?e.typeAnnotation:e)),r=(0,i.default)(t);return 1===r.length?r[0]:(0,n.tsUnionType)(r)};var n=r(82208),i=r(74941),s=r(63555)},90686:(e,t,r)=>{var n=r(45080),i=r(81540),s=r(50006);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(s)}},92339:(e,t,r)=>{var n=r(58777).Buffer,i=r(98437);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i=n.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=i,r=o,s.data.copy(t,r),o+=s.data.length,s=s.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},92494:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isKeyword=function(e){return r.has(e)},t.isReservedWord=s,t.isStrictBindOnlyReservedWord=a,t.isStrictBindReservedWord=function(e,t){return o(e,t)||a(e)},t.isStrictReservedWord=o;const r=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"]),n=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),i=new Set(["eval","arguments"]);function s(e,t){return t&&"await"===e||"enum"===e}function o(e,t){return s(e,t)||n.has(e)}function a(e){return i.has(e)}},93343:(e,t)=>{function r(){return this}function n(){return r.call(this),this}function i(e){if(r.call(this),null===e)throw"delegates";return this.delegates=e,this}r.prototype.syntaxError=function(e,t,r,n,i,s){},r.prototype.reportAmbiguity=function(e,t,r,n,i,s,o){},r.prototype.reportAttemptingFullContext=function(e,t,r,n,i,s){},r.prototype.reportContextSensitivity=function(e,t,r,n,i,s){},n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.INSTANCE=new n,n.prototype.syntaxError=function(e,t,r,n,i,s){console.error("line "+r+":"+n+" "+i)},i.prototype=Object.create(r.prototype),i.prototype.constructor=i,i.prototype.syntaxError=function(e,t,r,n,i,s){this.delegates.map((function(o){o.syntaxError(e,t,r,n,i,s)}))},i.prototype.reportAmbiguity=function(e,t,r,n,i,s,o){this.delegates.map((function(a){a.reportAmbiguity(e,t,r,n,i,s,o)}))},i.prototype.reportAttemptingFullContext=function(e,t,r,n,i,s){this.delegates.map((function(o){o.reportAttemptingFullContext(e,t,r,n,i,s)}))},i.prototype.reportContextSensitivity=function(e,t,r,n,i,s){this.delegates.map((function(o){o.reportContextSensitivity(e,t,r,n,i,s)}))},t.ErrorListener=r,t.q=n,t.X=i},93567:(e,t,r)=>{var n=r(59830),i=r(63655),s=r(96830),o=r(76966),a=r(88141),l=Array.prototype.slice,p=r(57585),u={on:function(e,t,r){return p.eventsApi(this,"on",e,[t,r])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:r,ctx:r||this}),this):this},once:function(e,t,r){if(!p.eventsApi(this,"once",e,[t,r])||!t)return this;var i=this,s=n((function(){i.off(e,s),t.apply(this,arguments)}));return s._callback=t,this.on(e,s,r)},off:function(e,t,r){var n,s,o,a,l,u,c,h;if(!this._events||!p.eventsApi(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(l=0,u=(a=e?[e]:i(this._events)).length;l<u;l++)if(e=a[l],o=this._events[e]){if(this._events[e]=n=[],t||r)for(c=0,h=o.length;c<h;c++)s=o[c],(t&&t!==s.callback&&t!==s.callback._callback||r&&r!==s.context)&&n.push(s);n.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=l.call(arguments,1);if(!p.eventsApi(this,"trigger",e,t))return this;var r=this._events[e],n=this._events.all;return r&&p.triggerEvents(r,t),n&&p.triggerEvents(n,arguments),this},stopListening:function(e,t,r){var n=this._listeningTo;if(!n)return this;var i=!t&&!r;r||"object"!=typeof t||(r=this),e&&((n={})[e._listenId]=e);var o=this;return a(n,(function(e,n){e.off(t,r,o),(i||s(e._events))&&delete o._listeningTo[n]})),this},createEmitter:function(e){return o(e||{},u)},listenTo:p.createListenMethod("on"),listenToOnce:p.createListenMethod("once"),listenToAndRun:function(e,t,r){return this.listenTo.apply(this,arguments),r||"object"!=typeof t||(r=this),r.apply(this),this}};u.bind=u.on,u.unbind=u.off,u.removeListener=u.off,u.removeAllListeners=u.off,u.emit=u.trigger,e.exports=u},93862:(e,t,r)=>{var n=r(25003),i=r(67787).Buffer,s=r(5555);function o(e){s.call(this,e),this.enc="pem"}n(o,s),e.exports=o,o.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,l=-1,p=0;p<r.length;p++){var u=r[p].match(o);if(null!==u&&u[2]===n){if(-1!==a){if("END"!==u[1])break;l=p;break}if("BEGIN"!==u[1])break;a=p}}if(-1===a||-1===l)throw new Error("PEM section not found for: "+n);var c=r.slice(a+1,l).join("");c.replace(/[^a-z0-9\+\/=]+/gi,"");var h=new i(c,"base64");return s.prototype.decode.call(this,h,t)}},93971:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(82208);t.default=function(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)}},94198:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isIdentifierChar=u,t.isIdentifierName=function(e){let t=!0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(55296==(64512&n)&&r+1<e.length){const t=e.charCodeAt(++r);56320==(64512&t)&&(n=65536+((1023&n)<<10)+(1023&t))}if(t){if(t=!1,!p(n))return!1}else if(!u(n))return!1}return!t},t.isIdentifierStart=p;let r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",n="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const i=new RegExp("["+r+"]"),s=new RegExp("["+r+n+"]");r=n=null;const o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,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,7,25,39,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,39,27,10,22,251,41,7,1,17,5,57,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,20,1,64,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,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,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,199,7,137,9,54,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,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function l(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function p(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&i.test(String.fromCharCode(e)):l(e,o)))}function u(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):l(e,o)||l(e,a))))}},95694:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=e.value.split(/\r\n|\n|\r/);let s=0;for(let e=0;e<r.length;e++)/[^ \t]/.exec(r[e])&&(s=e);let o="";for(let e=0;e<r.length;e++){const t=r[e],n=0===e,i=e===r.length-1,a=e===s;let l=t.replace(/\t/g," ");n||(l=l.replace(/^ +/,"")),i||(l=l.replace(/ +$/,"")),l&&(a||(l+=" "),o+=l)}o&&t.push((0,i.inherits)((0,n.stringLiteral)(o),e))};var n=r(82208),i=r(45741)},96160:(e,t,r)=>{var n=r(66346).hashStuff,i=r(56645).LexerIndexedCustomAction;function s(e){return this.lexerActions=null===e?[]:e,this.cachedHashCode=n(e),this}s.append=function(e,t){return new s(null===e?[t]:e.lexerActions.concat([t]))},s.prototype.fixOffsetBeforeMatch=function(e){for(var t=null,r=0;r<this.lexerActions.length;r++)!this.lexerActions[r].isPositionDependent||this.lexerActions[r]instanceof i||(null===t&&(t=this.lexerActions.concat([])),t[r]=new i(e,this.lexerActions[r]));return null===t?this:new s(t)},s.prototype.execute=function(e,t,r){var n=!1,s=t.index;try{for(var o=0;o<this.lexerActions.length;o++){var a=this.lexerActions[o];if(a instanceof i){var l=a.offset;t.seek(r+l),a=a.action,n=r+l!==s}else a.isPositionDependent&&(t.seek(s),n=!1);a.execute(e)}}finally{n&&t.seek(s)}},s.prototype.hashCode=function(){return this.cachedHashCode},s.prototype.updateHashCode=function(e){e.update(this.cachedHashCode)},s.prototype.equals=function(e){if(this===e)return!0;if(e instanceof s){if(this.cachedHashCode!=e.cachedHashCode)return!1;if(this.lexerActions.length!=e.lexerActions.length)return!1;for(var t=this.lexerActions.length,r=0;r<t;++r)if(!this.lexerActions[r].equals(e.lexerActions[r]))return!1;return!0}return!1},t.I=s},96196:(e,t,r)=>{function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>n})},96268:(e,t,r)=>{var n=r(79696).Buffer,i=r(70243),s=r(79548).ec,o=r(28113),a=r(36646);function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,p,u){var c=o(r);if("ec"===c.type){if("ecdsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new s(n),o=r.data.subjectPrivateKey.data;return i.verify(t,e,o)}(e,t,c)}if("dsa"===c.type){if("dsa"!==p)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,s=r.data.q,a=r.data.g,p=r.data.pub_key,u=o.signature.decode(e,"der"),c=u.s,h=u.r;l(c,s),l(h,s);var d=i.mont(n),f=c.invm(s);return 0===a.toRed(d).redPow(new i(t).mul(f).mod(s)).fromRed().mul(p.toRed(d).redPow(h.mul(f).mod(s)).fromRed()).mod(n).mod(s).cmp(h)}(e,t,c)}if("rsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong public key type");t=n.concat([u,t]);for(var h=c.modulus.byteLength(),d=[1],f=0;t.length+d.length+2<h;)d.push(255),f+=1;d.push(0);for(var m=-1;++m<t.length;)d.push(t[m]);d=n.from(d);var y=i.mont(c.modulus);e=(e=new i(e).toRed(y)).redPow(new i(c.publicExponent)),e=n.from(e.fromRed().toArray());var g=f<8?1:0;for(h=Math.min(e.length,d.length),e.length!==d.length&&(g=1),m=-1;++m<h;)g|=e[m]^d[m];return 0===g}},97232:(e,t,r)=>{var n=r(65994).process,i=r(73261);(0,i.default)("ArgumentPlaceholder",{}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:n.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,i.assertNodeType)("Expression")},callee:{validate:(0,i.assertNodeType)("Expression")}}:{object:{validate:Object.assign((()=>{}),{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign((()=>{}),{oneOfNodeTypes:["Expression"]})}}}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,i.assertNodeType)("BlockStatement")},async:{validate:(0,i.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,i.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,i.validateArrayOfType)("ObjectProperty","SpreadElement")}}),(0,i.default)("TupleExpression",{fields:{elements:{validate:(0,i.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,i.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,i.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,i.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,i.assertNodeType)("Program")}},aliases:["Expression"]}),(0,i.default)("TopicReference",{aliases:["Expression"]}),(0,i.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,i.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,i.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,i.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]}),(0,i.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]})},97884:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){const r=Array.from(t),s=new Map,o=new Map,a=new Set,l=[];for(let t=0;t<r.length;t++){const p=r[t];if(p&&!l.includes(p)){if((0,n.isAnyTypeAnnotation)(p))return[p];if((0,n.isFlowBaseAnnotation)(p))o.set(p.type,p);else if((0,n.isUnionTypeAnnotation)(p))a.has(p.types)||(r.push(...p.types),a.add(p.types));else if((0,n.isGenericTypeAnnotation)(p)){const t=i(p.id);if(s.has(t)){let r=s.get(t);r.typeParameters?p.typeParameters&&(r.typeParameters.params.push(...p.typeParameters.params),r.typeParameters.params=e(r.typeParameters.params)):r=p.typeParameters}else s.set(t,p)}else l.push(p)}}for(const[,e]of o)l.push(e);for(const[,e]of s)l.push(e);return l};var n=r(63555);function i(e){return(0,n.isIdentifier)(e)?e.name:`${e.id.name}.${i(e.qualification)}`}},98109:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return n.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return n.isIdentifierName}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return n.isIdentifierStart}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return i.isKeyword}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return i.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return i.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return i.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return i.isStrictReservedWord}});var n=r(94198),i=r(92494)},98703:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TokenMap=void 0;var n=r(45741);const{traverseFast:i,VISITOR_KEYS:s}=n;t.TokenMap=class{constructor(e,t,r){this._tokens=void 0,this._source=void 0,this._nodesToTokenIndexes=new Map,this._nodesOccurrencesCountCache=new Map,this._tokensCache=new Map,this._tokens=t,this._source=r,i(e,(e=>{const t=this._getTokensIndexesOfNode(e);t.length>0&&this._nodesToTokenIndexes.set(e,t)})),this._tokensCache.clear()}has(e){return this._nodesToTokenIndexes.has(e)}getIndexes(e){return this._nodesToTokenIndexes.get(e)}find(e,t){const r=this._nodesToTokenIndexes.get(e);if(r)for(let e=0;e<r.length;e++){const n=r[e],i=this._tokens[n];if(t(i,n))return i}return null}findLastIndex(e,t){const r=this._nodesToTokenIndexes.get(e);if(r)for(let e=r.length-1;e>=0;e--){const n=r[e];if(t(this._tokens[n],n))return n}return-1}findMatching(e,t,r=0){const n=this._nodesToTokenIndexes.get(e);if(n){"number"==typeof t&&(t=String.fromCharCode(t));let i=0;const s=r;if(s>1){const n=this._nodesOccurrencesCountCache.get(e);(null==n?void 0:n.test)===t&&n.count<s&&(i=n.i+1,r-=n.count+1)}for(;i<n.length;i++){const o=this._tokens[n[i]];if(this.matchesOriginal(o,t)){if(0===r)return s>0&&this._nodesOccurrencesCountCache.set(e,{test:t,count:s,i}),o;r--}}}return null}matchesOriginal(e,t){return e.end-e.start===t.length&&(null!=e.value?e.value===t:this._source.startsWith(t,e.start))}startMatches(e,t){const r=this._nodesToTokenIndexes.get(e);if(!r)return!1;const n=this._tokens[r[0]];return n.start===e.start&&this.matchesOriginal(n,t)}endMatches(e,t){const r=this._nodesToTokenIndexes.get(e);if(!r)return!1;const n=this._tokens[r[r.length-1]];return n.end===e.end&&this.matchesOriginal(n,t)}_getTokensIndexesOfNode(e){var t;if(null==e.start||null==e.end)return[];const{first:r,last:n}=this._findTokensOfNode(e,0,this._tokens.length-1);let i=r;const o=function*(e){if("TemplateLiteral"===e.type){yield e.quasis[0];for(let t=1;t<e.quasis.length;t++)yield e.expressions[t-1],yield e.quasis[t];return}const t=s[e.type];for(const r of t){const t=e[r];t&&(Array.isArray(t)?yield*t:yield t)}}(e);"ExportNamedDeclaration"!==e.type&&"ExportDefaultDeclaration"!==e.type||"ClassDeclaration"!==(null==(t=e.declaration)?void 0:t.type)||o.next();const a=[];for(const e of o){if(null==e)continue;if(null==e.start||null==e.end)continue;const t=this._findTokensOfNode(e,i,n),r=t.first;for(let e=i;e<r;e++)a.push(e);i=t.last+1}for(let e=i;e<=n;e++)a.push(e);return a}_findTokensOfNode(e,t,r){const n=this._tokensCache.get(e);if(n)return n;const i=this._findFirstTokenOfNode(e.start,t,r),s=this._findLastTokenOfNode(e.end,i,r);return this._tokensCache.set(e,{first:i,last:s}),{first:i,last:s}}_findFirstTokenOfNode(e,t,r){for(;t<=r;){const n=r+t>>1;if(e<this._tokens[n].start)r=n-1;else{if(!(e>this._tokens[n].start))return n;t=n+1}}return t}_findLastTokenOfNode(e,t,r){for(;t<=r;){const n=r+t>>1;if(e<this._tokens[n].end)r=n-1;else{if(!(e>this._tokens[n].end))return n;t=n+1}}return r}}}};