gemi 0.35.1 → 0.36.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.
- package/dist/app/index.js +272 -2
- package/dist/app/index.js.map +6 -4
- package/dist/app/prismaExtension.d.ts +5 -1
- package/dist/app/prismaExtension.d.ts.map +1 -1
- package/dist/bin/gemi.js +16 -2
- package/dist/bin/gemi.js.map +2 -2
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-wvjzg5z2.js → chunk-1gd1fyth.js} +1 -1
- package/dist/{chunk-wzba9wy7.js → chunk-1sdckzzr.js} +1 -1
- package/dist/{chunk-n0wwc7rb.js → chunk-21hd56fa.js} +1 -1
- package/dist/chunk-2vpsbhpm.js +5 -0
- package/dist/{chunk-dwsazw95.js.map → chunk-2vpsbhpm.js.map} +1 -1
- package/dist/{chunk-74zbp6jx.js → chunk-3vxaqv3c.js} +1 -1
- package/dist/{chunk-w4p9g023.js → chunk-4pxf7y2s.js} +1 -1
- package/dist/{chunk-nxybcsrs.js → chunk-513mekrd.js} +1 -1
- package/dist/{chunk-tcn3gykx.js → chunk-640e07kh.js} +1 -1
- package/dist/{chunk-61tk6d6h.js → chunk-65z4wbps.js} +1 -1
- package/dist/{chunk-rvp6vtqh.js → chunk-69wrnjjn.js} +1 -1
- package/dist/{chunk-q2h6t84y.js → chunk-6g2bsmwf.js} +1 -1
- package/dist/{chunk-e2k5akxp.js → chunk-bwd327vf.js} +3 -3
- package/dist/{chunk-e2k5akxp.js.map → chunk-bwd327vf.js.map} +2 -2
- package/dist/{chunk-v4871k17.js → chunk-es84e2a1.js} +2 -2
- package/dist/{chunk-gychaaxb.js → chunk-fjqa7s60.js} +1 -1
- package/dist/{chunk-cbzr2eg7.js → chunk-ghy6gn4g.js} +1 -1
- package/dist/{chunk-mjaervnt.js → chunk-gj2setdy.js} +1 -1
- package/dist/{chunk-hpjqg060.js → chunk-gncq70ga.js} +1 -1
- package/dist/{chunk-hzbeqg40.js → chunk-haenvmrp.js} +1 -1
- package/dist/{chunk-c97bw1re.js → chunk-kp6wx276.js} +1 -1
- package/dist/{chunk-1fs08n6j.js → chunk-mnvzewf8.js} +1 -1
- package/dist/{chunk-cpvmftfy.js → chunk-pp10jse0.js} +1 -1
- package/dist/{chunk-5bh1vy2a.js → chunk-qy4114a4.js} +1 -1
- package/dist/{chunk-0p9jcm4w.js → chunk-rat133ng.js} +3 -3
- package/dist/{chunk-v85jqkwg.js → chunk-tp6rd9q1.js} +1 -1
- package/dist/{chunk-e1v59k8r.js → chunk-txk5dr5r.js} +1 -1
- package/dist/{chunk-6mgdr9jm.js → chunk-vmpxc391.js} +1 -1
- package/dist/{chunk-g5q7a8zt.js → chunk-wm448x87.js} +1 -1
- package/dist/{chunk-qh9pbhfd.js → chunk-xak5xspk.js} +2 -2
- package/dist/{chunk-ykn3pyw0.js → chunk-xdm3d6a3.js} +1 -1
- package/dist/{chunk-8fvf22sv.js → chunk-yhrk5bfy.js} +1 -1
- package/dist/{chunk-yj6yh651.js → chunk-za0tn4cg.js} +1 -1
- package/dist/email/Email.d.ts +1 -0
- package/dist/email/Email.d.ts.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +3 -3
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-dwsazw95.js +0 -5
- /package/dist/{chunk-wvjzg5z2.js.map → chunk-1gd1fyth.js.map} +0 -0
- /package/dist/{chunk-wzba9wy7.js.map → chunk-1sdckzzr.js.map} +0 -0
- /package/dist/{chunk-n0wwc7rb.js.map → chunk-21hd56fa.js.map} +0 -0
- /package/dist/{chunk-74zbp6jx.js.map → chunk-3vxaqv3c.js.map} +0 -0
- /package/dist/{chunk-w4p9g023.js.map → chunk-4pxf7y2s.js.map} +0 -0
- /package/dist/{chunk-nxybcsrs.js.map → chunk-513mekrd.js.map} +0 -0
- /package/dist/{chunk-tcn3gykx.js.map → chunk-640e07kh.js.map} +0 -0
- /package/dist/{chunk-61tk6d6h.js.map → chunk-65z4wbps.js.map} +0 -0
- /package/dist/{chunk-rvp6vtqh.js.map → chunk-69wrnjjn.js.map} +0 -0
- /package/dist/{chunk-q2h6t84y.js.map → chunk-6g2bsmwf.js.map} +0 -0
- /package/dist/{chunk-v4871k17.js.map → chunk-es84e2a1.js.map} +0 -0
- /package/dist/{chunk-gychaaxb.js.map → chunk-fjqa7s60.js.map} +0 -0
- /package/dist/{chunk-cbzr2eg7.js.map → chunk-ghy6gn4g.js.map} +0 -0
- /package/dist/{chunk-mjaervnt.js.map → chunk-gj2setdy.js.map} +0 -0
- /package/dist/{chunk-hpjqg060.js.map → chunk-gncq70ga.js.map} +0 -0
- /package/dist/{chunk-hzbeqg40.js.map → chunk-haenvmrp.js.map} +0 -0
- /package/dist/{chunk-c97bw1re.js.map → chunk-kp6wx276.js.map} +0 -0
- /package/dist/{chunk-1fs08n6j.js.map → chunk-mnvzewf8.js.map} +0 -0
- /package/dist/{chunk-cpvmftfy.js.map → chunk-pp10jse0.js.map} +0 -0
- /package/dist/{chunk-5bh1vy2a.js.map → chunk-qy4114a4.js.map} +0 -0
- /package/dist/{chunk-0p9jcm4w.js.map → chunk-rat133ng.js.map} +0 -0
- /package/dist/{chunk-v85jqkwg.js.map → chunk-tp6rd9q1.js.map} +0 -0
- /package/dist/{chunk-e1v59k8r.js.map → chunk-txk5dr5r.js.map} +0 -0
- /package/dist/{chunk-6mgdr9jm.js.map → chunk-vmpxc391.js.map} +0 -0
- /package/dist/{chunk-g5q7a8zt.js.map → chunk-wm448x87.js.map} +0 -0
- /package/dist/{chunk-qh9pbhfd.js.map → chunk-xak5xspk.js.map} +0 -0
- /package/dist/{chunk-ykn3pyw0.js.map → chunk-xdm3d6a3.js.map} +0 -0
- /package/dist/{chunk-8fvf22sv.js.map → chunk-yhrk5bfy.js.map} +0 -0
- /package/dist/{chunk-yj6yh651.js.map → chunk-za0tn4cg.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{e as B0}from"./chunk-
|
|
2
|
+
import{e as B0}from"./chunk-vmpxc391.js";import{zb as q0}from"./chunk-haenvmrp.js";import{Bb as WJ,Db as m1}from"./chunk-2vpsbhpm.js";var FJ=WJ((OZ)=>{Object.defineProperty(OZ,"__esModule",{value:!0});var FZ=B0();function D0(Z){return{sourceType:(0,FZ.getOption)(Z,"sourceType","module"),strictMode:(0,FZ.getOption)(Z,"strictMode",!1),allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic"]}}OZ.default=D0});var U0=WJ((R0)=>{Object.defineProperty(R0,"__esModule",{value:!0});function N0(Z,X){if(Z==null)return{};var J={};for(var Q in Z)if({}.hasOwnProperty.call(Z,Q)){if(X.indexOf(Q)!==-1)continue;J[Q]=Z[Q]}return J}class E{constructor(Z,X,J){this.line=void 0,this.column=void 0,this.index=void 0,this.line=Z,this.column=X,this.index=J}}class QJ{constructor(Z,X){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=Z,this.end=X}}function _(Z,X){let{line:J,column:Q,index:V}=Z;return new E(J,Q+X,V+X)}var BZ="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",T0={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:BZ},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:BZ}},DZ={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"},UJ=(Z)=>Z.type==="UpdateExpression"?DZ.UpdateExpression[`${Z.prefix}`]:DZ[Z.type],I0={AccessorIsGenerator:({kind:Z})=>`A ${Z}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:Z})=>`Missing initializer in ${Z} 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:Z})=>`\`${Z}\` 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:Z,exportName:X})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
3
3
|
- Did you mean \`export { '${Z}' as '${X}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:Z})=>`'${Z==="ForInStatement"?"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:Z})=>`Unsyntactic ${Z==="BreakStatement"?"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:Z})=>`A string literal cannot be used as an imported binding.
|
|
4
4
|
- Did you mean \`import { "${Z}" 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:Z})=>`Expected number in radix ${Z}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:Z})=>`Escape sequence in keyword ${Z}.`,InvalidIdentifier:({identifierName:Z})=>`Invalid identifier ${Z}.`,InvalidLhs:({ancestor:Z})=>`Invalid left-hand side in ${UJ(Z)}.`,InvalidLhsBinding:({ancestor:Z})=>`Binding invalid left-hand side in ${UJ(Z)}.`,InvalidLhsOptionalChaining:({ancestor:Z})=>`Invalid optional chaining in the left-hand side of ${UJ(Z)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:Z})=>`Unexpected character '${Z}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:Z})=>`Private name #${Z} 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:Z})=>`Label '${Z}' 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:Z})=>`This experimental syntax requires enabling the parser plugin: ${Z.map((X)=>JSON.stringify(X)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:Z})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${Z.map((X)=>JSON.stringify(X)).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:Z})=>`Duplicate key "${Z}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:Z})=>`An export name cannot include a lone surrogate, found '\\u${Z.toString(16)}'.`,ModuleExportUndefined:({localName:Z})=>`Export '${Z}' 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:Z})=>`Private names are only allowed in property accesses (\`obj.#${Z}\`) or in \`in\` expressions (\`#${Z} in obj\`).`,PrivateNameRedeclaration:({identifierName:Z})=>`Duplicate private name #${Z}.`,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:Z})=>`Unexpected keyword '${Z}'.`,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:Z})=>`Unexpected reserved word '${Z}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:Z,unexpected:X})=>`Unexpected token${X?` '${X}'.`:""}${Z?`, expected "${Z}"`:""}`,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:Z,onlyValidPropertyName:X})=>`The only valid meta property for ${Z} is ${Z}.${X}.`,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:Z})=>`Identifier '${Z}' 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."},C0={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:Z})=>`Assigning to '${Z}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:Z})=>`Binding '${Z}' 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."},M0={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:Z})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(Z)}\`.`},$0=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),S0=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:Z})=>`Invalid topic token ${Z}. In order to use ${Z} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${Z}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:Z})=>`Hack-style pipe body cannot be an unparenthesized ${UJ({type:Z})}; 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.'}),A0=["message"];function vZ(Z,X,J){Object.defineProperty(Z,X,{enumerable:!1,configurable:!0,value:J})}function P0({toMessage:Z,code:X,reasonCode:J,syntaxPlugin:Q}){let V=J==="MissingPlugin"||J==="MissingOneOfPlugins",Y={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};if(Y[J])J=Y[J];return function W(j,U){let R=SyntaxError();if(R.code=X,R.reasonCode=J,R.loc=j,R.pos=j.index,R.syntaxPlugin=Q,V)R.missingPlugin=U.missingPlugin;return vZ(R,"clone",function(K={}){var G;let{line:F,column:v,index:M}=(G=K.loc)!=null?G:j;return W(new E(F,v,M),Object.assign({},U,K.details))}),vZ(R,"details",U),Object.defineProperty(R,"message",{configurable:!0,get(){let H=`${Z(U)} (${j.line}:${j.column})`;return this.message=H,H},set(H){Object.defineProperty(this,"message",{value:H,writable:!0})}}),R}}function g(Z,X){if(Array.isArray(Z))return(Q)=>g(Q,Z[0]);let J={};for(let Q of Object.keys(Z)){let V=Z[Q],Y=typeof V==="string"?{message:()=>V}:typeof V==="function"?{message:V}:V,{message:W}=Y,j=N0(Y,A0),U=typeof W==="string"?()=>W:W;J[Q]=P0(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:Q,toMessage:U},X?{syntaxPlugin:X}:{},j))}return J}var q=Object.assign({},g(T0),g(I0),g(C0),g(M0),g`pipelineOperator`(S0));function w0(){return{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}}function _0(Z){let X=w0();if(Z==null)return X;if(Z.annexB!=null&&Z.annexB!==!1)throw Error("The `annexB` option can only be set to `false`.");for(let J of Object.keys(X))if(Z[J]!=null)X[J]=Z[J];if(X.startLine===1){if(Z.startIndex==null&&X.startColumn>0)X.startIndex=X.startColumn;else if(Z.startColumn==null&&X.startIndex>0)X.startColumn=X.startIndex}else if(Z.startColumn==null||Z.startIndex==null){if(Z.startIndex!=null)throw Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.")}if(X.sourceType==="commonjs"){if(Z.allowAwaitOutsideFunction!=null)throw Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(Z.allowReturnOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(Z.allowNewTargetOutsideFunction!=null)throw Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return X}var{defineProperty:k0}=Object,NZ=(Z,X)=>{if(Z)k0(Z,X,{enumerable:!1,value:Z[X]})};function s(Z){return NZ(Z.loc.start,"index"),NZ(Z.loc.end,"index"),Z}var L0=(Z)=>class extends Z{parse(){let J=s(super.parse());if(this.optionFlags&256)J.tokens=J.tokens.map(s);return J}parseRegExpLiteral({pattern:J,flags:Q}){let V=null;try{V=new RegExp(J,Q)}catch(W){}let Y=this.estreeParseLiteral(V);return Y.regex={pattern:J,flags:Q},Y}parseBigIntLiteral(J){let Q;try{Q=BigInt(J)}catch(Y){Q=null}let V=this.estreeParseLiteral(Q);return V.bigint=String(V.value||J),V}parseDecimalLiteral(J){let V=this.estreeParseLiteral(null);return V.decimal=String(V.value||J),V}estreeParseLiteral(J){return this.parseLiteral(J,"Literal")}parseStringLiteral(J){return this.estreeParseLiteral(J)}parseNumericLiteral(J){return this.estreeParseLiteral(J)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(J){return this.estreeParseLiteral(J)}estreeParseChainExpression(J,Q){let V=this.startNodeAtNode(J);return V.expression=J,this.finishNodeAt(V,"ChainExpression",Q)}directiveToStmt(J){let Q=J.value;delete J.value,this.castNodeTo(Q,"Literal"),Q.raw=Q.extra.raw,Q.value=Q.extra.expressionValue;let V=this.castNodeTo(J,"ExpressionStatement");return V.expression=Q,V.directive=Q.extra.rawValue,delete Q.extra,V}fillOptionalPropertiesForTSESLint(J){}cloneEstreeStringLiteral(J){let{start:Q,end:V,loc:Y,range:W,raw:j,value:U}=J,R=Object.create(J.constructor.prototype);return R.type="Literal",R.start=Q,R.end=V,R.loc=Y,R.range=W,R.raw=j,R.value=U,R}initFunction(J,Q){super.initFunction(J,Q),J.expression=!1}checkDeclaration(J){if(J!=null&&this.isObjectProperty(J))this.checkDeclaration(J.value);else super.checkDeclaration(J)}getObjectOrClassMethodParams(J){return J.value.params}isValidDirective(J){var Q;return J.type==="ExpressionStatement"&&J.expression.type==="Literal"&&typeof J.expression.value==="string"&&!((Q=J.expression.extra)!=null&&Q.parenthesized)}parseBlockBody(J,Q,V,Y,W){super.parseBlockBody(J,Q,V,Y,W);let j=J.directives.map((U)=>this.directiveToStmt(U));J.body=j.concat(J.body),delete J.directives}parsePrivateName(){let J=super.parsePrivateName();if(!this.getPluginOption("estree","classFeatures"))return J;return this.convertPrivateNameToPrivateIdentifier(J)}convertPrivateNameToPrivateIdentifier(J){let Q=super.getPrivateNameSV(J);return delete J.id,J.name=Q,this.castNodeTo(J,"PrivateIdentifier")}isPrivateName(J){if(!this.getPluginOption("estree","classFeatures"))return super.isPrivateName(J);return J.type==="PrivateIdentifier"}getPrivateNameSV(J){if(!this.getPluginOption("estree","classFeatures"))return super.getPrivateNameSV(J);return J.name}parseLiteral(J,Q){let V=super.parseLiteral(J,Q);return V.raw=V.extra.raw,delete V.extra,V}parseFunctionBody(J,Q,V=!1){super.parseFunctionBody(J,Q,V),J.expression=J.body.type!=="BlockStatement"}parseMethod(J,Q,V,Y,W,j,U=!1){let R=this.startNode();R.kind=J.kind,R=super.parseMethod(R,Q,V,Y,W,j,U),delete R.kind;let{typeParameters:H}=J;if(H)delete J.typeParameters,R.typeParameters=H,this.resetStartLocationFromNode(R,H);let K=this.castNodeTo(R,"FunctionExpression");if(J.value=K,j==="ClassPrivateMethod")J.computed=!1;if(j==="ObjectMethod"){if(J.kind==="method")J.kind="init";return J.shorthand=!1,this.finishNode(J,"Property")}else return this.finishNode(J,"MethodDefinition")}nameIsConstructor(J){if(J.type==="Literal")return J.value==="constructor";return super.nameIsConstructor(J)}parseClassProperty(...J){let Q=super.parseClassProperty(...J);if(!this.getPluginOption("estree","classFeatures"))return Q;return this.castNodeTo(Q,"PropertyDefinition"),Q}parseClassPrivateProperty(...J){let Q=super.parseClassPrivateProperty(...J);if(!this.getPluginOption("estree","classFeatures"))return Q;return this.castNodeTo(Q,"PropertyDefinition"),Q.computed=!1,Q}parseClassAccessorProperty(J){let Q=super.parseClassAccessorProperty(J);if(!this.getPluginOption("estree","classFeatures"))return Q;if(Q.abstract&&this.hasPlugin("typescript"))delete Q.abstract,this.castNodeTo(Q,"TSAbstractAccessorProperty");else this.castNodeTo(Q,"AccessorProperty");return Q}parseObjectProperty(J,Q,V,Y){let W=super.parseObjectProperty(J,Q,V,Y);if(W)W.kind="init",this.castNodeTo(W,"Property");return W}finishObjectProperty(J){return J.kind="init",this.finishNode(J,"Property")}isValidLVal(J,Q,V,Y){return J==="Property"?"value":super.isValidLVal(J,Q,V,Y)}isAssignable(J,Q){if(J!=null&&this.isObjectProperty(J))return this.isAssignable(J.value,Q);return super.isAssignable(J,Q)}toAssignable(J,Q=!1){if(J!=null&&this.isObjectProperty(J)){let{key:V,value:Y}=J;if(this.isPrivateName(V))this.classScope.usePrivateName(this.getPrivateNameSV(V),V.loc.start);this.toAssignable(Y,Q)}else super.toAssignable(J,Q)}toAssignableObjectExpressionProp(J,Q,V){if(J.type==="Property"&&(J.kind==="get"||J.kind==="set"))this.raise(q.PatternHasAccessor,J.key);else if(J.type==="Property"&&J.method)this.raise(q.PatternHasMethod,J.key);else super.toAssignableObjectExpressionProp(J,Q,V)}finishCallExpression(J,Q){let V=super.finishCallExpression(J,Q);if(V.callee.type==="Import"){var Y,W;this.castNodeTo(V,"ImportExpression"),V.source=V.arguments[0],V.options=(Y=V.arguments[1])!=null?Y:null,V.attributes=(W=V.arguments[1])!=null?W:null,delete V.arguments,delete V.callee}else if(V.type==="OptionalCallExpression")this.castNodeTo(V,"CallExpression");else V.optional=!1;return V}toReferencedArguments(J){if(J.type==="ImportExpression")return;super.toReferencedArguments(J)}parseExport(J,Q){let V=this.state.lastTokStartLoc,Y=super.parseExport(J,Q);switch(Y.type){case"ExportAllDeclaration":Y.exported=null;break;case"ExportNamedDeclaration":if(Y.specifiers.length===1&&Y.specifiers[0].type==="ExportNamespaceSpecifier")this.castNodeTo(Y,"ExportAllDeclaration"),Y.exported=Y.specifiers[0].exported,delete Y.specifiers;case"ExportDefaultDeclaration":{var W;let{declaration:j}=Y;if((j==null?void 0:j.type)==="ClassDeclaration"&&((W=j.decorators)==null?void 0:W.length)>0&&j.start===Y.start)this.resetStartLocation(Y,V)}break}return Y}stopParseSubscript(J,Q){let V=super.stopParseSubscript(J,Q);if(Q.optionalChainMember)return this.estreeParseChainExpression(V,J.loc.end);return V}parseMember(J,Q,V,Y,W){let j=super.parseMember(J,Q,V,Y,W);if(j.type==="OptionalMemberExpression")this.castNodeTo(j,"MemberExpression");else j.optional=!1;return j}isOptionalMemberExpression(J){if(J.type==="ChainExpression")return J.expression.type==="MemberExpression";return super.isOptionalMemberExpression(J)}hasPropertyAsPrivateName(J){if(J.type==="ChainExpression")J=J.expression;return super.hasPropertyAsPrivateName(J)}isObjectProperty(J){return J.type==="Property"&&J.kind==="init"&&!J.method}isObjectMethod(J){return J.type==="Property"&&(J.method||J.kind==="get"||J.kind==="set")}castNodeTo(J,Q){let V=super.castNodeTo(J,Q);return this.fillOptionalPropertiesForTSESLint(V),V}cloneIdentifier(J){let Q=super.cloneIdentifier(J);return this.fillOptionalPropertiesForTSESLint(Q),Q}cloneStringLiteral(J){if(J.type==="Literal")return this.cloneEstreeStringLiteral(J);return super.cloneStringLiteral(J)}finishNodeAt(J,Q,V){return s(super.finishNodeAt(J,Q,V))}finishNode(J,Q){let V=super.finishNode(J,Q);return this.fillOptionalPropertiesForTSESLint(V),V}resetStartLocation(J,Q){super.resetStartLocation(J,Q),s(J)}resetEndLocation(J,Q=this.state.lastTokEndLoc){super.resetEndLocation(J,Q),s(J)}};class a{constructor(Z,X){this.token=void 0,this.preserveSpace=void 0,this.token=Z,this.preserveSpace=!!X}}var $={brace:new a("{"),j_oTag:new a("<tag"),j_cTag:new a("</tag"),j_expr:new a("<tag>...</tag>",!0)};$.template=new a("`",!0);var T=!0,z=!0,OJ=!0,n=!0,x=!0,g0=!0;class SJ{constructor(Z,X={}){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=Z,this.keyword=X.keyword,this.beforeExpr=!!X.beforeExpr,this.startsExpr=!!X.startsExpr,this.rightAssociative=!!X.rightAssociative,this.isLoop=!!X.isLoop,this.isAssign=!!X.isAssign,this.prefix=!!X.prefix,this.postfix=!!X.postfix,this.binop=X.binop!=null?X.binop:null,this.updateContext=null}}var AJ=new Map;function C(Z,X={}){X.keyword=Z;let J=B(Z,X);return AJ.set(Z,J),J}function w(Z,X){return B(Z,{beforeExpr:T,binop:X})}var JJ=-1,f=[],PJ=[],wJ=[],_J=[],kJ=[],LJ=[];function B(Z,X={}){var J,Q,V,Y;return++JJ,PJ.push(Z),wJ.push((J=X.binop)!=null?J:-1),_J.push((Q=X.beforeExpr)!=null?Q:!1),kJ.push((V=X.startsExpr)!=null?V:!1),LJ.push((Y=X.prefix)!=null?Y:!1),f.push(new SJ(Z,X)),JJ}function I(Z,X={}){var J,Q,V,Y;return++JJ,AJ.set(Z,JJ),PJ.push(Z),wJ.push((J=X.binop)!=null?J:-1),_J.push((Q=X.beforeExpr)!=null?Q:!1),kJ.push((V=X.startsExpr)!=null?V:!1),LJ.push((Y=X.prefix)!=null?Y:!1),f.push(new SJ("name",X)),JJ}var h0={bracketL:B("[",{beforeExpr:T,startsExpr:z}),bracketHashL:B("#[",{beforeExpr:T,startsExpr:z}),bracketBarL:B("[|",{beforeExpr:T,startsExpr:z}),bracketR:B("]"),bracketBarR:B("|]"),braceL:B("{",{beforeExpr:T,startsExpr:z}),braceBarL:B("{|",{beforeExpr:T,startsExpr:z}),braceHashL:B("#{",{beforeExpr:T,startsExpr:z}),braceR:B("}"),braceBarR:B("|}"),parenL:B("(",{beforeExpr:T,startsExpr:z}),parenR:B(")"),comma:B(",",{beforeExpr:T}),semi:B(";",{beforeExpr:T}),colon:B(":",{beforeExpr:T}),doubleColon:B("::",{beforeExpr:T}),dot:B("."),question:B("?",{beforeExpr:T}),questionDot:B("?."),arrow:B("=>",{beforeExpr:T}),template:B("template"),ellipsis:B("...",{beforeExpr:T}),backQuote:B("`",{startsExpr:z}),dollarBraceL:B("${",{beforeExpr:T,startsExpr:z}),templateTail:B("...`",{startsExpr:z}),templateNonTail:B("...${",{beforeExpr:T,startsExpr:z}),at:B("@"),hash:B("#",{startsExpr:z}),interpreterDirective:B("#!..."),eq:B("=",{beforeExpr:T,isAssign:n}),assign:B("_=",{beforeExpr:T,isAssign:n}),slashAssign:B("_=",{beforeExpr:T,isAssign:n}),xorAssign:B("_=",{beforeExpr:T,isAssign:n}),moduloAssign:B("_=",{beforeExpr:T,isAssign:n}),incDec:B("++/--",{prefix:x,postfix:g0,startsExpr:z}),bang:B("!",{beforeExpr:T,prefix:x,startsExpr:z}),tilde:B("~",{beforeExpr:T,prefix:x,startsExpr:z}),doubleCaret:B("^^",{startsExpr:z}),doubleAt:B("@@",{startsExpr:z}),pipeline:w("|>",0),nullishCoalescing:w("??",1),logicalOR:w("||",1),logicalAND:w("&&",2),bitwiseOR:w("|",3),bitwiseXOR:w("^",4),bitwiseAND:w("&",5),equality:w("==/!=/===/!==",6),lt:w("</>/<=/>=",7),gt:w("</>/<=/>=",7),relational:w("</>/<=/>=",7),bitShift:w("<</>>/>>>",8),bitShiftL:w("<</>>/>>>",8),bitShiftR:w("<</>>/>>>",8),plusMin:B("+/-",{beforeExpr:T,binop:9,prefix:x,startsExpr:z}),modulo:B("%",{binop:10,startsExpr:z}),star:B("*",{binop:10}),slash:w("/",10),exponent:B("**",{beforeExpr:T,binop:11,rightAssociative:!0}),_in:C("in",{beforeExpr:T,binop:7}),_instanceof:C("instanceof",{beforeExpr:T,binop:7}),_break:C("break"),_case:C("case",{beforeExpr:T}),_catch:C("catch"),_continue:C("continue"),_debugger:C("debugger"),_default:C("default",{beforeExpr:T}),_else:C("else",{beforeExpr:T}),_finally:C("finally"),_function:C("function",{startsExpr:z}),_if:C("if"),_return:C("return",{beforeExpr:T}),_switch:C("switch"),_throw:C("throw",{beforeExpr:T,prefix:x,startsExpr:z}),_try:C("try"),_var:C("var"),_const:C("const"),_with:C("with"),_new:C("new",{beforeExpr:T,startsExpr:z}),_this:C("this",{startsExpr:z}),_super:C("super",{startsExpr:z}),_class:C("class",{startsExpr:z}),_extends:C("extends",{beforeExpr:T}),_export:C("export"),_import:C("import",{startsExpr:z}),_null:C("null",{startsExpr:z}),_true:C("true",{startsExpr:z}),_false:C("false",{startsExpr:z}),_typeof:C("typeof",{beforeExpr:T,prefix:x,startsExpr:z}),_void:C("void",{beforeExpr:T,prefix:x,startsExpr:z}),_delete:C("delete",{beforeExpr:T,prefix:x,startsExpr:z}),_do:C("do",{isLoop:OJ,beforeExpr:T}),_for:C("for",{isLoop:OJ}),_while:C("while",{isLoop:OJ}),_as:I("as",{startsExpr:z}),_assert:I("assert",{startsExpr:z}),_async:I("async",{startsExpr:z}),_await:I("await",{startsExpr:z}),_defer:I("defer",{startsExpr:z}),_from:I("from",{startsExpr:z}),_get:I("get",{startsExpr:z}),_let:I("let",{startsExpr:z}),_meta:I("meta",{startsExpr:z}),_of:I("of",{startsExpr:z}),_sent:I("sent",{startsExpr:z}),_set:I("set",{startsExpr:z}),_source:I("source",{startsExpr:z}),_static:I("static",{startsExpr:z}),_using:I("using",{startsExpr:z}),_yield:I("yield",{startsExpr:z}),_asserts:I("asserts",{startsExpr:z}),_checks:I("checks",{startsExpr:z}),_exports:I("exports",{startsExpr:z}),_global:I("global",{startsExpr:z}),_implements:I("implements",{startsExpr:z}),_intrinsic:I("intrinsic",{startsExpr:z}),_infer:I("infer",{startsExpr:z}),_is:I("is",{startsExpr:z}),_mixins:I("mixins",{startsExpr:z}),_proto:I("proto",{startsExpr:z}),_require:I("require",{startsExpr:z}),_satisfies:I("satisfies",{startsExpr:z}),_keyof:I("keyof",{startsExpr:z}),_readonly:I("readonly",{startsExpr:z}),_unique:I("unique",{startsExpr:z}),_abstract:I("abstract",{startsExpr:z}),_declare:I("declare",{startsExpr:z}),_enum:I("enum",{startsExpr:z}),_module:I("module",{startsExpr:z}),_namespace:I("namespace",{startsExpr:z}),_interface:I("interface",{startsExpr:z}),_type:I("type",{startsExpr:z}),_opaque:I("opaque",{startsExpr:z}),name:B("name",{startsExpr:z}),placeholder:B("%%",{startsExpr:z}),string:B("string",{startsExpr:z}),num:B("num",{startsExpr:z}),bigint:B("bigint",{startsExpr:z}),decimal:B("decimal",{startsExpr:z}),regexp:B("regexp",{startsExpr:z}),privateName:B("#name",{startsExpr:z}),eof:B("eof"),jsxName:B("jsxName"),jsxText:B("jsxText",{beforeExpr:T}),jsxTagStart:B("jsxTagStart",{startsExpr:z}),jsxTagEnd:B("jsxTagEnd")};function S(Z){return Z>=93&&Z<=133}function b0(Z){return Z<=92}function k(Z){return Z>=58&&Z<=133}function LZ(Z){return Z>=58&&Z<=137}function u0(Z){return _J[Z]}function o(Z){return kJ[Z]}function E0(Z){return Z>=29&&Z<=33}function TZ(Z){return Z>=129&&Z<=131}function f0(Z){return Z>=90&&Z<=92}function gJ(Z){return Z>=58&&Z<=92}function y0(Z){return Z>=39&&Z<=59}function x0(Z){return Z===34}function m0(Z){return LJ[Z]}function c0(Z){return Z>=121&&Z<=123}function l0(Z){return Z>=124&&Z<=130}function c(Z){return PJ[Z]}function qJ(Z){return wJ[Z]}function p0(Z){return Z===57}function KJ(Z){return Z>=24&&Z<=25}function b(Z){return f[Z]}f[8].updateContext=(Z)=>{Z.pop()};f[5].updateContext=f[7].updateContext=f[23].updateContext=(Z)=>{Z.push($.brace)};f[22].updateContext=(Z)=>{if(Z[Z.length-1]===$.template)Z.pop();else Z.push($.template)};f[143].updateContext=(Z)=>{Z.push($.j_expr,$.j_oTag)};var hJ="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",gZ="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",i0=new RegExp("["+hJ+"]"),a0=new RegExp("["+hJ+gZ+"]");hJ=gZ=null;var hZ=[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],d0=[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 IJ(Z,X){let J=65536;for(let Q=0,V=X.length;Q<V;Q+=2){if(J+=X[Q],J>Z)return!1;if(J+=X[Q+1],J>=Z)return!0}return!1}function h(Z){if(Z<65)return Z===36;if(Z<=90)return!0;if(Z<97)return Z===95;if(Z<=122)return!0;if(Z<=65535)return Z>=170&&i0.test(String.fromCharCode(Z));return IJ(Z,hZ)}function i(Z){if(Z<48)return Z===36;if(Z<58)return!0;if(Z<65)return!1;if(Z<=90)return!0;if(Z<97)return Z===95;if(Z<=122)return!0;if(Z<=65535)return Z>=170&&a0.test(String.fromCharCode(Z));return IJ(Z,hZ)||IJ(Z,d0)}var bJ={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},t0=new Set(bJ.keyword),s0=new Set(bJ.strict),n0=new Set(bJ.strictBind);function bZ(Z,X){return X&&Z==="await"||Z==="enum"}function uZ(Z,X){return bZ(Z,X)||s0.has(Z)}function EZ(Z){return n0.has(Z)}function fZ(Z,X){return uZ(Z,X)||EZ(Z)}function r0(Z){return t0.has(Z)}function o0(Z,X,J){return Z===64&&X===64&&h(J)}var e0=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function J1(Z){return e0.has(Z)}class GJ{constructor(Z){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=Z}}class zJ{constructor(Z,X){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=Z,this.inModule=X}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let Z=this.currentThisScopeFlags();return(Z&64)>0&&(Z&2)===0}get inStaticBlock(){for(let Z=this.scopeStack.length-1;;Z--){let{flags:X}=this.scopeStack[Z];if(X&128)return!0;if(X&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(Z){return new GJ(Z)}enter(Z){this.scopeStack.push(this.createScope(Z))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(Z){return!!(Z.flags&130||!this.parser.inModule&&Z.flags&1)}declareName(Z,X,J){let Q=this.currentScope();if(X&8||X&16){this.checkRedeclarationInScope(Q,Z,X,J);let V=Q.names.get(Z)||0;if(X&16)V=V|4;else{if(!Q.firstLexicalName)Q.firstLexicalName=Z;V=V|2}if(Q.names.set(Z,V),X&8)this.maybeExportDefined(Q,Z)}else if(X&4){for(let V=this.scopeStack.length-1;V>=0;--V)if(Q=this.scopeStack[V],this.checkRedeclarationInScope(Q,Z,X,J),Q.names.set(Z,(Q.names.get(Z)||0)|1),this.maybeExportDefined(Q,Z),Q.flags&1667)break}if(this.parser.inModule&&Q.flags&1)this.undefinedExports.delete(Z)}maybeExportDefined(Z,X){if(this.parser.inModule&&Z.flags&1)this.undefinedExports.delete(X)}checkRedeclarationInScope(Z,X,J,Q){if(this.isRedeclaredInScope(Z,X,J))this.parser.raise(q.VarRedeclaration,Q,{identifierName:X})}isRedeclaredInScope(Z,X,J){if(!(J&1))return!1;if(J&8)return Z.names.has(X);let Q=Z.names.get(X)||0;if(J&16)return(Q&2)>0||!this.treatFunctionsAsVarInScope(Z)&&(Q&1)>0;return(Q&2)>0&&!(Z.flags&8&&Z.firstLexicalName===X)||!this.treatFunctionsAsVarInScope(Z)&&(Q&4)>0}checkLocalExport(Z){let{name:X}=Z;if(!this.scopeStack[0].names.has(X))this.undefinedExports.set(X,Z.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let Z=this.scopeStack.length-1;;Z--){let{flags:X}=this.scopeStack[Z];if(X&1667)return X}}currentThisScopeFlags(){for(let Z=this.scopeStack.length-1;;Z--){let{flags:X}=this.scopeStack[Z];if(X&1731&&!(X&4))return X}}}class yZ extends GJ{constructor(...Z){super(...Z);this.declareFunctions=new Set}}class xZ extends zJ{createScope(Z){return new yZ(Z)}declareName(Z,X,J){let Q=this.currentScope();if(X&2048){this.checkRedeclarationInScope(Q,Z,X,J),this.maybeExportDefined(Q,Z),Q.declareFunctions.add(Z);return}super.declareName(Z,X,J)}isRedeclaredInScope(Z,X,J){if(super.isRedeclaredInScope(Z,X,J))return!0;if(J&2048&&!Z.declareFunctions.has(X)){let Q=Z.names.get(X);return(Q&4)>0||(Q&2)>0}return!1}checkLocalExport(Z){if(!this.scopeStack[0].declareFunctions.has(Z.name))super.checkLocalExport(Z)}}var Z1=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),D=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:Z})=>`Cannot overwrite reserved type ${Z}.`,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:Z,enumName:X})=>`Boolean enum members need to be initialized. Use either \`${Z} = true,\` or \`${Z} = false,\` in enum \`${X}\`.`,EnumDuplicateMemberName:({memberName:Z,enumName:X})=>`Enum member names need to be unique, but the name \`${Z}\` has already been used before in enum \`${X}\`.`,EnumInconsistentMemberValues:({enumName:Z})=>`Enum \`${Z}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:Z,enumName:X})=>`Enum type \`${Z}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${X}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:Z})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${Z}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:Z,memberName:X,explicitType:J})=>`Enum \`${Z}\` has type \`${J}\`, so the initializer of \`${X}\` needs to be a ${J} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:Z,memberName:X})=>`Symbol enum members cannot be initialized. Use \`${X},\` in enum \`${Z}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:Z,memberName:X})=>`The enum member initializer for \`${X}\` needs to be a literal (either a boolean, number, or string) in enum \`${Z}\`.`,EnumInvalidMemberName:({enumName:Z,memberName:X,suggestion:J})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${X}\`, consider using \`${J}\`, in enum \`${Z}\`.`,EnumNumberMemberNotInitialized:({enumName:Z,memberName:X})=>`Number enum members need to be initialized, e.g. \`${X} = 1\` in enum \`${Z}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:Z})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${Z}\`.`,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:Z})=>`Unexpected reserved type ${Z}.`,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:Z,suggestion:X})=>`\`declare export ${Z}\` is not supported. Use \`${X}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Q1(Z){return Z.type==="DeclareExportAllDeclaration"||Z.type==="DeclareExportDeclaration"&&(!Z.declaration||Z.declaration.type!=="TypeAlias"&&Z.declaration.type!=="InterfaceDeclaration")}function IZ(Z){return Z.importKind==="type"||Z.importKind==="typeof"}var X1={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function V1(Z,X){let J=[],Q=[];for(let V=0;V<Z.length;V++)(X(Z[V],V,Z)?J:Q).push(Z[V]);return[J,Q]}var Y1=/\*?\s*@((?:no)?flow)\b/,W1=(Z)=>class extends Z{constructor(...J){super(...J);this.flowPragma=void 0}getScopeHandler(){return xZ}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(J,Q){if(J!==134&&J!==13&&J!==28){if(this.flowPragma===void 0)this.flowPragma=null}super.finishToken(J,Q)}addComment(J){if(this.flowPragma===void 0){let Q=Y1.exec(J.value);if(!Q);else if(Q[1]==="flow")this.flowPragma="flow";else if(Q[1]==="noflow")this.flowPragma="noflow";else throw Error("Unexpected flow pragma")}super.addComment(J)}flowParseTypeInitialiser(J){let Q=this.state.inType;this.state.inType=!0,this.expect(J||14);let V=this.flowParseType();return this.state.inType=Q,V}flowParsePredicate(){let J=this.startNode(),Q=this.state.startLoc;if(this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>Q.index+1)this.raise(D.UnexpectedSpaceBetweenModuloChecks,Q);if(this.eat(10))return J.value=super.parseExpression(),this.expect(11),this.finishNode(J,"DeclaredPredicate");else return this.finishNode(J,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let J=this.state.inType;this.state.inType=!0,this.expect(14);let Q=null,V=null;if(this.match(54))this.state.inType=J,V=this.flowParsePredicate();else if(Q=this.flowParseType(),this.state.inType=J,this.match(54))V=this.flowParsePredicate();return[Q,V]}flowParseDeclareClass(J){return this.next(),this.flowParseInterfaceish(J,!0),this.finishNode(J,"DeclareClass")}flowParseDeclareFunction(J){this.next();let Q=J.id=this.parseIdentifier(),V=this.startNode(),Y=this.startNode();if(this.match(47))V.typeParameters=this.flowParseTypeParameterDeclaration();else V.typeParameters=null;this.expect(10);let W=this.flowParseFunctionTypeParams();return V.params=W.params,V.rest=W.rest,V.this=W._this,this.expect(11),[V.returnType,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),Y.typeAnnotation=this.finishNode(V,"FunctionTypeAnnotation"),Q.typeAnnotation=this.finishNode(Y,"TypeAnnotation"),this.resetEndLocation(Q),this.semicolon(),this.scope.declareName(J.id.name,2048,J.id.loc.start),this.finishNode(J,"DeclareFunction")}flowParseDeclare(J,Q){if(this.match(80))return this.flowParseDeclareClass(J);else if(this.match(68))return this.flowParseDeclareFunction(J);else if(this.match(74))return this.flowParseDeclareVariable(J);else if(this.eatContextual(127))if(this.match(16))return this.flowParseDeclareModuleExports(J);else{if(Q)this.raise(D.NestedDeclareModule,this.state.lastTokStartLoc);return this.flowParseDeclareModule(J)}else if(this.isContextual(130))return this.flowParseDeclareTypeAlias(J);else if(this.isContextual(131))return this.flowParseDeclareOpaqueType(J);else if(this.isContextual(129))return this.flowParseDeclareInterface(J);else if(this.match(82))return this.flowParseDeclareExportDeclaration(J,Q);throw this.unexpected()}flowParseDeclareVariable(J){return this.next(),J.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(J.id.name,5,J.id.loc.start),this.semicolon(),this.finishNode(J,"DeclareVariable")}flowParseDeclareModule(J){if(this.scope.enter(0),this.match(134))J.id=super.parseExprAtom();else J.id=this.parseIdentifier();let Q=J.body=this.startNode(),V=Q.body=[];this.expect(5);while(!this.match(8)){let j=this.startNode();if(this.match(83)){if(this.next(),!this.isContextual(130)&&!this.match(87))this.raise(D.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc);V.push(super.parseImport(j))}else this.expectContextual(125,D.UnsupportedStatementInDeclareModule),V.push(this.flowParseDeclare(j,!0))}this.scope.exit(),this.expect(8),this.finishNode(Q,"BlockStatement");let Y=null,W=!1;return V.forEach((j)=>{if(Q1(j)){if(Y==="CommonJS")this.raise(D.AmbiguousDeclareModuleKind,j);Y="ES"}else if(j.type==="DeclareModuleExports"){if(W)this.raise(D.DuplicateDeclareModuleExports,j);if(Y==="ES")this.raise(D.AmbiguousDeclareModuleKind,j);Y="CommonJS",W=!0}}),J.kind=Y||"CommonJS",this.finishNode(J,"DeclareModule")}flowParseDeclareExportDeclaration(J,Q){if(this.expect(82),this.eat(65)){if(this.match(68)||this.match(80))J.declaration=this.flowParseDeclare(this.startNode());else J.declaration=this.flowParseType(),this.semicolon();return J.default=!0,this.finishNode(J,"DeclareExportDeclaration")}else{if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!Q){let V=this.state.value;throw this.raise(D.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:V,suggestion:X1[V]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return J.declaration=this.flowParseDeclare(this.startNode()),J.default=!1,this.finishNode(J,"DeclareExportDeclaration");else if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))if(J=this.parseExport(J,null),J.type==="ExportNamedDeclaration")return J.default=!1,delete J.exportKind,this.castNodeTo(J,"DeclareExportDeclaration");else return this.castNodeTo(J,"DeclareExportAllDeclaration")}throw this.unexpected()}flowParseDeclareModuleExports(J){return this.next(),this.expectContextual(111),J.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(J,"DeclareModuleExports")}flowParseDeclareTypeAlias(J){this.next();let Q=this.flowParseTypeAlias(J);return this.castNodeTo(Q,"DeclareTypeAlias"),Q}flowParseDeclareOpaqueType(J){this.next();let Q=this.flowParseOpaqueType(J,!0);return this.castNodeTo(Q,"DeclareOpaqueType"),Q}flowParseDeclareInterface(J){return this.next(),this.flowParseInterfaceish(J,!1),this.finishNode(J,"DeclareInterface")}flowParseInterfaceish(J,Q){if(J.id=this.flowParseRestrictedIdentifier(!Q,!0),this.scope.declareName(J.id.name,Q?17:8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;if(J.extends=[],this.eat(81))do J.extends.push(this.flowParseInterfaceExtends());while(!Q&&this.eat(12));if(Q){if(J.implements=[],J.mixins=[],this.eatContextual(117))do J.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do J.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}J.body=this.flowParseObjectType({allowStatic:Q,allowExact:!1,allowSpread:!1,allowProto:Q,allowInexact:!1})}flowParseInterfaceExtends(){let J=this.startNode();if(J.id=this.flowParseQualifiedTypeIdentifier(),this.match(47))J.typeParameters=this.flowParseTypeParameterInstantiation();else J.typeParameters=null;return this.finishNode(J,"InterfaceExtends")}flowParseInterface(J){return this.flowParseInterfaceish(J,!1),this.finishNode(J,"InterfaceDeclaration")}checkNotUnderscore(J){if(J==="_")this.raise(D.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(J,Q,V){if(!Z1.has(J))return;this.raise(V?D.AssignReservedType:D.UnexpectedReservedType,Q,{reservedType:J})}flowParseRestrictedIdentifier(J,Q){return this.checkReservedType(this.state.value,this.state.startLoc,Q),this.parseIdentifier(J)}flowParseTypeAlias(J){if(J.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(J.id.name,8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;return J.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(J,"TypeAlias")}flowParseOpaqueType(J,Q){if(this.expectContextual(130),J.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(J.id.name,8201,J.id.loc.start),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();else J.typeParameters=null;if(J.supertype=null,this.match(14))J.supertype=this.flowParseTypeInitialiser(14);if(J.impltype=null,!Q)J.impltype=this.flowParseTypeInitialiser(29);return this.semicolon(),this.finishNode(J,"OpaqueType")}flowParseTypeParameter(J=!1){let Q=this.state.startLoc,V=this.startNode(),Y=this.flowParseVariance(),W=this.flowParseTypeAnnotatableIdentifier();if(V.name=W.name,V.variance=Y,V.bound=W.typeAnnotation,this.match(29))this.eat(29),V.default=this.flowParseType();else if(J)this.raise(D.MissingTypeParamDefault,Q);return this.finishNode(V,"TypeParameter")}flowParseTypeParameterDeclaration(){let J=this.state.inType,Q=this.startNode();if(Q.params=[],this.state.inType=!0,this.match(47)||this.match(143))this.next();else this.unexpected();let V=!1;do{let Y=this.flowParseTypeParameter(V);if(Q.params.push(Y),Y.default)V=!0;if(!this.match(48))this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=J,this.finishNode(Q,"TypeParameterDeclaration")}flowInTopLevelContext(J){if(this.curContext()!==$.brace){let Q=this.state.context;this.state.context=[Q[0]];try{return J()}finally{this.state.context=Q}}else return J()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()!==47)return;return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let J=this.startNode(),Q=this.state.inType;if(this.state.inType=!0,J.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let V=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!1;while(!this.match(48))if(J.params.push(this.flowParseType()),!this.match(48))this.expect(12);this.state.noAnonFunctionType=V}),this.state.inType=Q,!this.state.inType&&this.curContext()===$.brace)this.reScan_lt_gt();return this.expect(48),this.finishNode(J,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let J=this.startNode(),Q=this.state.inType;J.params=[],this.state.inType=!0,this.expect(47);while(!this.match(48))if(J.params.push(this.flowParseTypeOrImplicitInstantiation()),!this.match(48))this.expect(12);return this.expect(48),this.state.inType=Q,this.finishNode(J,"TypeParameterInstantiation")}flowParseInterfaceType(){let J=this.startNode();if(this.expectContextual(129),J.extends=[],this.eat(81))do J.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return J.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(J,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(J,Q,V){if(J.static=Q,this.lookahead().type===14)J.id=this.flowParseObjectPropertyKey(),J.key=this.flowParseTypeInitialiser();else J.id=null,J.key=this.flowParseType();return this.expect(3),J.value=this.flowParseTypeInitialiser(),J.variance=V,this.finishNode(J,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(J,Q){if(J.static=Q,J.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10))J.method=!0,J.optional=!1,J.value=this.flowParseObjectTypeMethodish(this.startNodeAt(J.loc.start));else{if(J.method=!1,this.eat(17))J.optional=!0;J.value=this.flowParseTypeInitialiser()}return this.finishNode(J,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(J){if(J.params=[],J.rest=null,J.typeParameters=null,J.this=null,this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();if(this.expect(10),this.match(78)){if(J.this=this.flowParseFunctionTypeParam(!0),J.this.name=null,!this.match(11))this.expect(12)}while(!this.match(11)&&!this.match(21))if(J.params.push(this.flowParseFunctionTypeParam(!1)),!this.match(11))this.expect(12);if(this.eat(21))J.rest=this.flowParseFunctionTypeParam(!1);return this.expect(11),J.returnType=this.flowParseTypeInitialiser(),this.finishNode(J,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(J,Q){let V=this.startNode();return J.static=Q,J.value=this.flowParseObjectTypeMethodish(V),this.finishNode(J,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:J,allowExact:Q,allowSpread:V,allowProto:Y,allowInexact:W}){let j=this.state.inType;this.state.inType=!0;let U=this.startNode();U.callProperties=[],U.properties=[],U.indexers=[],U.internalSlots=[];let R,H,K=!1;if(Q&&this.match(6))this.expect(6),R=9,H=!0;else this.expect(5),R=8,H=!1;U.exact=H;while(!this.match(R)){let F=!1,v=null,M=null,N=this.startNode();if(Y&&this.isContextual(118)){let P=this.lookahead();if(P.type!==14&&P.type!==17)this.next(),v=this.state.startLoc,J=!1}if(J&&this.isContextual(106)){let P=this.lookahead();if(P.type!==14&&P.type!==17)this.next(),F=!0}let A=this.flowParseVariance();if(this.eat(0)){if(v!=null)this.unexpected(v);if(this.eat(0)){if(A)this.unexpected(A.loc.start);U.internalSlots.push(this.flowParseObjectTypeInternalSlot(N,F))}else U.indexers.push(this.flowParseObjectTypeIndexer(N,F,A))}else if(this.match(10)||this.match(47)){if(v!=null)this.unexpected(v);if(A)this.unexpected(A.loc.start);U.callProperties.push(this.flowParseObjectTypeCallProperty(N,F))}else{let P="init";if(this.isContextual(99)||this.isContextual(104)){let y=this.lookahead();if(LZ(y.type))P=this.state.value,this.next()}let l=this.flowParseObjectTypeProperty(N,F,v,A,P,V,W!=null?W:!H);if(l===null)K=!0,M=this.state.lastTokStartLoc;else U.properties.push(l)}if(this.flowObjectTypeSemicolon(),M&&!this.match(8)&&!this.match(9))this.raise(D.UnexpectedExplicitInexactInObject,M)}if(this.expect(R),V)U.inexact=K;let G=this.finishNode(U,"ObjectTypeAnnotation");return this.state.inType=j,G}flowParseObjectTypeProperty(J,Q,V,Y,W,j,U){if(this.eat(21)){if(this.match(12)||this.match(13)||this.match(8)||this.match(9)){if(!j)this.raise(D.InexactInsideNonObject,this.state.lastTokStartLoc);else if(!U)this.raise(D.InexactInsideExact,this.state.lastTokStartLoc);if(Y)this.raise(D.InexactVariance,Y);return null}if(!j)this.raise(D.UnexpectedSpreadType,this.state.lastTokStartLoc);if(V!=null)this.unexpected(V);if(Y)this.raise(D.SpreadVariance,Y);return J.argument=this.flowParseType(),this.finishNode(J,"ObjectTypeSpreadProperty")}else{J.key=this.flowParseObjectPropertyKey(),J.static=Q,J.proto=V!=null,J.kind=W;let R=!1;if(this.match(47)||this.match(10)){if(J.method=!0,V!=null)this.unexpected(V);if(Y)this.unexpected(Y.loc.start);if(J.value=this.flowParseObjectTypeMethodish(this.startNodeAt(J.loc.start)),W==="get"||W==="set")this.flowCheckGetterSetterParams(J);if(!j&&J.key.name==="constructor"&&J.value.this)this.raise(D.ThisParamBannedInConstructor,J.value.this)}else{if(W!=="init")this.unexpected();if(J.method=!1,this.eat(17))R=!0;J.value=this.flowParseTypeInitialiser(),J.variance=Y}return J.optional=R,this.finishNode(J,"ObjectTypeProperty")}}flowCheckGetterSetterParams(J){let Q=J.kind==="get"?0:1,V=J.value.params.length+(J.value.rest?1:0);if(J.value.this)this.raise(J.kind==="get"?D.GetterMayNotHaveThisParam:D.SetterMayNotHaveThisParam,J.value.this);if(V!==Q)this.raise(J.kind==="get"?q.BadGetterArity:q.BadSetterArity,J);if(J.kind==="set"&&J.value.rest)this.raise(q.BadSetterRestParameter,J)}flowObjectTypeSemicolon(){if(!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9))this.unexpected()}flowParseQualifiedTypeIdentifier(J,Q){J!=null||(J=this.state.startLoc);let V=Q||this.flowParseRestrictedIdentifier(!0);while(this.eat(16)){let Y=this.startNodeAt(J);Y.qualification=V,Y.id=this.flowParseRestrictedIdentifier(!0),V=this.finishNode(Y,"QualifiedTypeIdentifier")}return V}flowParseGenericType(J,Q){let V=this.startNodeAt(J);if(V.typeParameters=null,V.id=this.flowParseQualifiedTypeIdentifier(J,Q),this.match(47))V.typeParameters=this.flowParseTypeParameterInstantiation();return this.finishNode(V,"GenericTypeAnnotation")}flowParseTypeofType(){let J=this.startNode();return this.expect(87),J.argument=this.flowParsePrimaryType(),this.finishNode(J,"TypeofTypeAnnotation")}flowParseTupleType(){let J=this.startNode();J.types=[],this.expect(0);while(this.state.pos<this.length&&!this.match(3)){if(J.types.push(this.flowParseType()),this.match(3))break;this.expect(12)}return this.expect(3),this.finishNode(J,"TupleTypeAnnotation")}flowParseFunctionTypeParam(J){let Q=null,V=!1,Y=null,W=this.startNode(),j=this.lookahead(),U=this.state.type===78;if(j.type===14||j.type===17){if(U&&!J)this.raise(D.ThisParamMustBeFirst,W);if(Q=this.parseIdentifier(U),this.eat(17)){if(V=!0,U)this.raise(D.ThisParamMayNotBeOptional,W)}Y=this.flowParseTypeInitialiser()}else Y=this.flowParseType();return W.name=Q,W.optional=V,W.typeAnnotation=Y,this.finishNode(W,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(J){let Q=this.startNodeAt(J.loc.start);return Q.name=null,Q.optional=!1,Q.typeAnnotation=J,this.finishNode(Q,"FunctionTypeParam")}flowParseFunctionTypeParams(J=[]){let Q=null,V=null;if(this.match(78)){if(V=this.flowParseFunctionTypeParam(!0),V.name=null,!this.match(11))this.expect(12)}while(!this.match(11)&&!this.match(21))if(J.push(this.flowParseFunctionTypeParam(!1)),!this.match(11))this.expect(12);if(this.eat(21))Q=this.flowParseFunctionTypeParam(!1);return{params:J,rest:Q,_this:V}}flowIdentToTypeAnnotation(J,Q,V){switch(V.name){case"any":return this.finishNode(Q,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(Q,"BooleanTypeAnnotation");case"mixed":return this.finishNode(Q,"MixedTypeAnnotation");case"empty":return this.finishNode(Q,"EmptyTypeAnnotation");case"number":return this.finishNode(Q,"NumberTypeAnnotation");case"string":return this.finishNode(Q,"StringTypeAnnotation");case"symbol":return this.finishNode(Q,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(V.name),this.flowParseGenericType(J,V)}}flowParsePrimaryType(){let J=this.state.startLoc,Q=this.startNode(),V,Y,W=!1,j=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,Y=this.flowParseTupleType(),this.state.noAnonFunctionType=j,Y;case 47:{let U=this.startNode();return U.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),V=this.flowParseFunctionTypeParams(),U.params=V.params,U.rest=V.rest,U.this=V._this,this.expect(11),this.expect(19),U.returnType=this.flowParseType(),this.finishNode(U,"FunctionTypeAnnotation")}case 10:{let U=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(S(this.state.type)||this.match(78)){let R=this.lookahead().type;W=R!==17&&R!==14}else W=!0;if(W)if(this.state.noAnonFunctionType=!1,Y=this.flowParseType(),this.state.noAnonFunctionType=j,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),Y;else this.eat(12);if(Y)V=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(Y)]);else V=this.flowParseFunctionTypeParams();return U.params=V.params,U.rest=V.rest,U.this=V._this,this.expect(11),this.expect(19),U.returnType=this.flowParseType(),U.typeParameters=null,this.finishNode(U,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return Q.value=this.match(85),this.next(),this.finishNode(Q,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",Q);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",Q);throw this.raise(D.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(Q,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(Q,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(Q,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(Q,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(gJ(this.state.type)){let U=c(this.state.type);return this.next(),super.createIdentifier(Q,U)}else if(S(this.state.type)){if(this.isContextual(129))return this.flowParseInterfaceType();return this.flowIdentToTypeAnnotation(J,Q,this.parseIdentifier())}}throw this.unexpected()}flowParsePostfixType(){let J=this.state.startLoc,Q=this.flowParsePrimaryType(),V=!1;while((this.match(0)||this.match(18))&&!this.canInsertSemicolon()){let Y=this.startNodeAt(J),W=this.eat(18);if(V=V||W,this.expect(0),!W&&this.match(3))Y.elementType=Q,this.next(),Q=this.finishNode(Y,"ArrayTypeAnnotation");else if(Y.objectType=Q,Y.indexType=this.flowParseType(),this.expect(3),V)Y.optional=W,Q=this.finishNode(Y,"OptionalIndexedAccessType");else Q=this.finishNode(Y,"IndexedAccessType")}return Q}flowParsePrefixType(){let J=this.startNode();if(this.eat(17))return J.typeAnnotation=this.flowParsePrefixType(),this.finishNode(J,"NullableTypeAnnotation");else return this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let J=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let Q=this.startNodeAt(J.loc.start);return Q.params=[this.reinterpretTypeAsFunctionTypeParam(J)],Q.rest=null,Q.this=null,Q.returnType=this.flowParseType(),Q.typeParameters=null,this.finishNode(Q,"FunctionTypeAnnotation")}return J}flowParseIntersectionType(){let J=this.startNode();this.eat(45);let Q=this.flowParseAnonFunctionWithoutParens();J.types=[Q];while(this.eat(45))J.types.push(this.flowParseAnonFunctionWithoutParens());return J.types.length===1?Q:this.finishNode(J,"IntersectionTypeAnnotation")}flowParseUnionType(){let J=this.startNode();this.eat(43);let Q=this.flowParseIntersectionType();J.types=[Q];while(this.eat(43))J.types.push(this.flowParseIntersectionType());return J.types.length===1?Q:this.finishNode(J,"UnionTypeAnnotation")}flowParseType(){let J=this.state.inType;this.state.inType=!0;let Q=this.flowParseUnionType();return this.state.inType=J,Q}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let J=this.state.startLoc,Q=this.parseIdentifier();return this.flowParseGenericType(J,Q)}else return this.flowParseType()}flowParseTypeAnnotation(){let J=this.startNode();return J.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(J,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(J){let Q=J?this.parseIdentifier():this.flowParseRestrictedIdentifier();if(this.match(14))Q.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(Q);return Q}typeCastToParameter(J){return J.expression.typeAnnotation=J.typeAnnotation,this.resetEndLocation(J.expression,J.typeAnnotation.loc.end),J.expression}flowParseVariance(){let J=null;if(this.match(53)){if(J=this.startNode(),this.state.value==="+")J.kind="plus";else J.kind="minus";return this.next(),this.finishNode(J,"Variance")}return J}parseFunctionBody(J,Q,V=!1){if(Q){this.forwardNoArrowParamsConversionAt(J,()=>super.parseFunctionBody(J,!0,V));return}super.parseFunctionBody(J,!1,V)}parseFunctionBodyAndFinish(J,Q,V=!1){if(this.match(14)){let Y=this.startNode();[Y.typeAnnotation,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),J.returnType=Y.typeAnnotation?this.finishNode(Y,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(J,Q,V)}parseStatementLike(J){if(this.state.strict&&this.isContextual(129)){let V=this.lookahead();if(k(V.type)){let Y=this.startNode();return this.next(),this.flowParseInterface(Y)}}else if(this.isContextual(126)){let V=this.startNode();return this.next(),this.flowParseEnumDeclaration(V)}let Q=super.parseStatementLike(J);if(this.flowPragma===void 0&&!this.isValidDirective(Q))this.flowPragma=null;return Q}parseExpressionStatement(J,Q,V){if(Q.type==="Identifier"){if(Q.name==="declare"){if(this.match(80)||S(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(J)}else if(S(this.state.type)){if(Q.name==="interface")return this.flowParseInterface(J);else if(Q.name==="type")return this.flowParseTypeAlias(J);else if(Q.name==="opaque")return this.flowParseOpaqueType(J,!1)}}return super.parseExpressionStatement(J,Q,V)}shouldParseExportDeclaration(){let{type:J}=this.state;if(J===126||TZ(J))return!this.state.containsEsc;return super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:J}=this.state;if(J===126||TZ(J))return this.state.containsEsc;return super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let J=this.startNode();return this.next(),this.flowParseEnumDeclaration(J)}return super.parseExportDefaultExpression()}parseConditional(J,Q,V){if(!this.match(17))return J;if(this.state.maybeInArrowParameters){let G=this.lookaheadCharCode();if(G===44||G===61||G===58||G===41)return this.setOptionalParametersError(V),J}this.expect(17);let Y=this.state.clone(),W=this.state.noArrowAt,j=this.startNodeAt(Q),{consequent:U,failed:R}=this.tryParseConditionalConsequent(),[H,K]=this.getArrowLikeExpressions(U);if(R||K.length>0){let G=[...W];if(K.length>0){this.state=Y,this.state.noArrowAt=G;for(let F=0;F<K.length;F++)G.push(K[F].start);({consequent:U,failed:R}=this.tryParseConditionalConsequent()),[H,K]=this.getArrowLikeExpressions(U)}if(R&&H.length>1)this.raise(D.AmbiguousConditionalArrow,Y.startLoc);if(R&&H.length===1)this.state=Y,G.push(H[0].start),this.state.noArrowAt=G,{consequent:U,failed:R}=this.tryParseConditionalConsequent()}return this.getArrowLikeExpressions(U,!0),this.state.noArrowAt=W,this.expect(14),j.test=J,j.consequent=U,j.alternate=this.forwardNoArrowParamsConversionAt(j,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(j,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let J=this.parseMaybeAssignAllowIn(),Q=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:J,failed:Q}}getArrowLikeExpressions(J,Q){let V=[J],Y=[];while(V.length!==0){let W=V.pop();if(W.type==="ArrowFunctionExpression"&&W.body.type!=="BlockStatement"){if(W.typeParameters||!W.returnType)this.finishArrowValidation(W);else Y.push(W);V.push(W.body)}else if(W.type==="ConditionalExpression")V.push(W.consequent),V.push(W.alternate)}if(Q)return Y.forEach((W)=>this.finishArrowValidation(W)),[Y,[]];return V1(Y,(W)=>W.params.every((j)=>this.isAssignable(j,!0)))}finishArrowValidation(J){var Q;this.toAssignableList(J.params,(Q=J.extra)==null?void 0:Q.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(J,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(J,Q){let V;if(this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(J.start)))this.state.noArrowParamsConversionAt.push(this.state.start),V=Q(),this.state.noArrowParamsConversionAt.pop();else V=Q();return V}parseParenItem(J,Q){let V=super.parseParenItem(J,Q);if(this.eat(17))V.optional=!0,this.resetEndLocation(J);if(this.match(14)){let Y=this.startNodeAt(Q);return Y.expression=V,Y.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(Y,"TypeCastExpression")}return V}assertModuleNodeAllowed(J){if(J.type==="ImportDeclaration"&&(J.importKind==="type"||J.importKind==="typeof")||J.type==="ExportNamedDeclaration"&&J.exportKind==="type"||J.type==="ExportAllDeclaration"&&J.exportKind==="type")return;super.assertModuleNodeAllowed(J)}parseExportDeclaration(J){if(this.isContextual(130)){J.exportKind="type";let Q=this.startNode();if(this.next(),this.match(5))return J.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(J),null;else return this.flowParseTypeAlias(Q)}else if(this.isContextual(131)){J.exportKind="type";let Q=this.startNode();return this.next(),this.flowParseOpaqueType(Q,!1)}else if(this.isContextual(129)){J.exportKind="type";let Q=this.startNode();return this.next(),this.flowParseInterface(Q)}else if(this.isContextual(126)){J.exportKind="value";let Q=this.startNode();return this.next(),this.flowParseEnumDeclaration(Q)}else return super.parseExportDeclaration(J)}eatExportStar(J){if(super.eatExportStar(J))return!0;if(this.isContextual(130)&&this.lookahead().type===55)return J.exportKind="type",this.next(),this.next(),!0;return!1}maybeParseExportNamespaceSpecifier(J){let{startLoc:Q}=this.state,V=super.maybeParseExportNamespaceSpecifier(J);if(V&&J.exportKind==="type")this.unexpected(Q);return V}parseClassId(J,Q,V){if(super.parseClassId(J,Q,V),this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration()}parseClassMember(J,Q,V){let{startLoc:Y}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(J,Q))return;Q.declare=!0}if(super.parseClassMember(J,Q,V),Q.declare){if(Q.type!=="ClassProperty"&&Q.type!=="ClassPrivateProperty"&&Q.type!=="PropertyDefinition")this.raise(D.DeclareClassElement,Y);else if(Q.value)this.raise(D.DeclareClassFieldInitializer,Q.value)}}isIterator(J){return J==="iterator"||J==="asyncIterator"}readIterator(){let J=super.readWord1(),Q="@@"+J;if(!this.isIterator(J)||!this.state.inType)this.raise(q.InvalidIdentifier,this.state.curPosition(),{identifierName:Q});this.finishToken(132,Q)}getTokenFromCode(J){let Q=this.input.charCodeAt(this.state.pos+1);if(J===123&&Q===124)this.finishOp(6,2);else if(this.state.inType&&(J===62||J===60))this.finishOp(J===62?48:47,1);else if(this.state.inType&&J===63)if(Q===46)this.finishOp(18,2);else this.finishOp(17,1);else if(o0(J,Q,this.input.charCodeAt(this.state.pos+2)))this.state.pos+=2,this.readIterator();else super.getTokenFromCode(J)}isAssignable(J,Q){if(J.type==="TypeCastExpression")return this.isAssignable(J.expression,Q);else return super.isAssignable(J,Q)}toAssignable(J,Q=!1){if(!Q&&J.type==="AssignmentExpression"&&J.left.type==="TypeCastExpression")J.left=this.typeCastToParameter(J.left);super.toAssignable(J,Q)}toAssignableList(J,Q,V){for(let Y=0;Y<J.length;Y++){let W=J[Y];if((W==null?void 0:W.type)==="TypeCastExpression")J[Y]=this.typeCastToParameter(W)}super.toAssignableList(J,Q,V)}toReferencedList(J,Q){for(let Y=0;Y<J.length;Y++){var V;let W=J[Y];if(W&&W.type==="TypeCastExpression"&&!((V=W.extra)!=null&&V.parenthesized)&&(J.length>1||!Q))this.raise(D.TypeCastInPattern,W.typeAnnotation)}return J}parseArrayLike(J,Q,V){let Y=super.parseArrayLike(J,Q,V);if(V!=null&&!this.state.maybeInArrowParameters)this.toReferencedList(Y.elements);return Y}isValidLVal(J,Q,V,Y){return J==="TypeCastExpression"||super.isValidLVal(J,Q,V,Y)}parseClassProperty(J){if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();return super.parseClassProperty(J)}parseClassPrivateProperty(J){if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();return super.parseClassPrivateProperty(J)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(J){return!this.match(14)&&super.isNonstaticConstructor(J)}pushClassMethod(J,Q,V,Y,W,j){if(Q.variance)this.unexpected(Q.variance.loc.start);if(delete Q.variance,this.match(47))Q.typeParameters=this.flowParseTypeParameterDeclaration();if(super.pushClassMethod(J,Q,V,Y,W,j),Q.params&&W){let U=Q.params;if(U.length>0&&this.isThisParam(U[0]))this.raise(D.ThisParamBannedInConstructor,Q)}else if(Q.type==="MethodDefinition"&&W&&Q.value.params){let U=Q.value.params;if(U.length>0&&this.isThisParam(U[0]))this.raise(D.ThisParamBannedInConstructor,Q)}}pushClassPrivateMethod(J,Q,V,Y){if(Q.variance)this.unexpected(Q.variance.loc.start);if(delete Q.variance,this.match(47))Q.typeParameters=this.flowParseTypeParameterDeclaration();super.pushClassPrivateMethod(J,Q,V,Y)}parseClassSuper(J){if(super.parseClassSuper(J),J.superClass&&(this.match(47)||this.match(51)))J.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression();if(this.isContextual(113)){this.next();let Q=J.implements=[];do{let V=this.startNode();if(V.id=this.flowParseRestrictedIdentifier(!0),this.match(47))V.typeParameters=this.flowParseTypeParameterInstantiation();else V.typeParameters=null;Q.push(this.finishNode(V,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(J){super.checkGetterSetterParams(J);let Q=this.getObjectOrClassMethodParams(J);if(Q.length>0){let V=Q[0];if(this.isThisParam(V)&&J.kind==="get")this.raise(D.GetterMayNotHaveThisParam,V);else if(this.isThisParam(V))this.raise(D.SetterMayNotHaveThisParam,V)}}parsePropertyNamePrefixOperator(J){J.variance=this.flowParseVariance()}parseObjPropValue(J,Q,V,Y,W,j,U){if(J.variance)this.unexpected(J.variance.loc.start);delete J.variance;let R;if(this.match(47)&&!j){if(R=this.flowParseTypeParameterDeclaration(),!this.match(10))this.unexpected()}let H=super.parseObjPropValue(J,Q,V,Y,W,j,U);if(R)(H.value||H).typeParameters=R;return H}parseFunctionParamType(J){if(this.eat(17)){if(J.type!=="Identifier")this.raise(D.PatternIsOptional,J);if(this.isThisParam(J))this.raise(D.ThisParamMayNotBeOptional,J);J.optional=!0}if(this.match(14))J.typeAnnotation=this.flowParseTypeAnnotation();else if(this.isThisParam(J))this.raise(D.ThisParamAnnotationRequired,J);if(this.match(29)&&this.isThisParam(J))this.raise(D.ThisParamNoDefault,J);return this.resetEndLocation(J),J}parseMaybeDefault(J,Q){let V=super.parseMaybeDefault(J,Q);if(V.type==="AssignmentPattern"&&V.typeAnnotation&&V.right.start<V.typeAnnotation.start)this.raise(D.TypeBeforeInitializer,V.typeAnnotation);return V}checkImportReflection(J){if(super.checkImportReflection(J),J.module&&J.importKind!=="value")this.raise(D.ImportReflectionHasImportType,J.specifiers[0].loc.start)}parseImportSpecifierLocal(J,Q,V){Q.local=IZ(J)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),J.specifiers.push(this.finishImportSpecifier(Q,V))}isPotentialImportPhase(J){if(super.isPotentialImportPhase(J))return!0;if(this.isContextual(130)){if(!J)return!0;let Q=this.lookaheadCharCode();return Q===123||Q===42}return!J&&this.isContextual(87)}applyImportPhase(J,Q,V,Y){if(super.applyImportPhase(J,Q,V,Y),Q){if(!V&&this.match(65))return;J.exportKind=V==="type"?V:"value"}else{if(V==="type"&&this.match(55))this.unexpected();J.importKind=V==="type"||V==="typeof"?V:"value"}}parseImportSpecifier(J,Q,V,Y,W){let j=J.imported,U=null;if(j.type==="Identifier"){if(j.name==="type")U="type";else if(j.name==="typeof")U="typeof"}let R=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let K=this.parseIdentifier(!0);if(U!==null&&!k(this.state.type))J.imported=K,J.importKind=U,J.local=this.cloneIdentifier(K);else J.imported=j,J.importKind=null,J.local=this.parseIdentifier()}else{if(U!==null&&k(this.state.type))J.imported=this.parseIdentifier(!0),J.importKind=U;else{if(Q)throw this.raise(q.ImportBindingIsString,J,{importName:j.value});J.imported=j,J.importKind=null}if(this.eatContextual(93))J.local=this.parseIdentifier();else R=!0,J.local=this.cloneIdentifier(J.imported)}let H=IZ(J);if(V&&H)this.raise(D.ImportTypeShorthandOnlyInPureImport,J);if(V||H)this.checkReservedType(J.local.name,J.local.loc.start,!0);if(R&&!V&&!H)this.checkReservedWord(J.local.name,J.loc.start,!0,!0);return this.finishImportSpecifier(J,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(J,Q){let V=J.kind;if(V!=="get"&&V!=="set"&&this.match(47))J.typeParameters=this.flowParseTypeParameterDeclaration();super.parseFunctionParams(J,Q)}parseVarId(J,Q){if(super.parseVarId(J,Q),this.match(14))J.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(J.id)}parseAsyncArrowFromCallExpression(J,Q){if(this.match(14)){let V=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,J.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=V}return super.parseAsyncArrowFromCallExpression(J,Q)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(J,Q){var V;let Y=null,W;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(Y=this.state.clone(),W=this.tryParse(()=>super.parseMaybeAssign(J,Q),Y),!W.error)return W.node;let{context:R}=this.state,H=R[R.length-1];if(H===$.j_oTag||H===$.j_expr)R.pop()}if((V=W)!=null&&V.error||this.match(47)){var j,U;Y=Y||this.state.clone();let R,H=this.tryParse((G)=>{var F;R=this.flowParseTypeParameterDeclaration();let v=this.forwardNoArrowParamsConversionAt(R,()=>{let N=super.parseMaybeAssign(J,Q);return this.resetStartLocationFromNode(N,R),N});if((F=v.extra)!=null&&F.parenthesized)G();let M=this.maybeUnwrapTypeCastExpression(v);if(M.type!=="ArrowFunctionExpression")G();return M.typeParameters=R,this.resetStartLocationFromNode(M,R),v},Y),K=null;if(H.node&&this.maybeUnwrapTypeCastExpression(H.node).type==="ArrowFunctionExpression"){if(!H.error&&!H.aborted){if(H.node.async)this.raise(D.UnexpectedTypeParameterBeforeAsyncArrowFunction,R);return H.node}K=H.node}if((j=W)!=null&&j.node)return this.state=W.failState,W.node;if(K)return this.state=H.failState,K;if((U=W)!=null&&U.thrown)throw W.error;if(H.thrown)throw H.error;throw this.raise(D.UnexpectedTokenAfterTypeParameter,R)}return super.parseMaybeAssign(J,Q)}parseArrow(J){if(this.match(14)){let Q=this.tryParse(()=>{let V=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let Y=this.startNode();if([Y.typeAnnotation,J.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=V,this.canInsertSemicolon())this.unexpected();if(!this.match(19))this.unexpected();return Y});if(Q.thrown)return null;if(Q.error)this.state=Q.failState;J.returnType=Q.node.typeAnnotation?this.finishNode(Q.node,"TypeAnnotation"):null}return super.parseArrow(J)}shouldParseArrow(J){return this.match(14)||super.shouldParseArrow(J)}setArrowFunctionParameters(J,Q){if(this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(J.start)))J.params=Q;else super.setArrowFunctionParameters(J,Q)}checkParams(J,Q,V,Y=!0){if(V&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(J.start)))return;for(let W=0;W<J.params.length;W++)if(this.isThisParam(J.params[W])&&W>0)this.raise(D.ThisParamMustBeFirst,J.params[W]);super.checkParams(J,Q,V,Y)}parseParenAndDistinguishExpression(J){return super.parseParenAndDistinguishExpression(J&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(J,Q,V){if(J.type==="Identifier"&&J.name==="async"&&this.state.noArrowAt.includes(Q.index)){this.next();let Y=this.startNodeAt(Q);Y.callee=J,Y.arguments=super.parseCallExpressionArguments(),J=this.finishNode(Y,"CallExpression")}else if(J.type==="Identifier"&&J.name==="async"&&this.match(47)){let Y=this.state.clone(),W=this.tryParse((U)=>this.parseAsyncArrowWithTypeParameters(Q)||U(),Y);if(!W.error&&!W.aborted)return W.node;let j=this.tryParse(()=>super.parseSubscripts(J,Q,V),Y);if(j.node&&!j.error)return j.node;if(W.node)return this.state=W.failState,W.node;if(j.node)return this.state=j.failState,j.node;throw W.error||j.error}return super.parseSubscripts(J,Q,V)}parseSubscript(J,Q,V,Y){if(this.match(18)&&this.isLookaheadToken_lt()){if(Y.optionalChainMember=!0,V)return Y.stop=!0,J;this.next();let W=this.startNodeAt(Q);return W.callee=J,W.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),W.arguments=this.parseCallExpressionArguments(),W.optional=!0,this.finishCallExpression(W,!0)}else if(!V&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let W=this.startNodeAt(Q);W.callee=J;let j=this.tryParse(()=>{if(W.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),W.arguments=super.parseCallExpressionArguments(),Y.optionalChainMember)W.optional=!1;return this.finishCallExpression(W,Y.optionalChainMember)});if(j.node){if(j.error)this.state=j.failState;return j.node}}return super.parseSubscript(J,Q,V,Y)}parseNewCallee(J){super.parseNewCallee(J);let Q=null;if(this.shouldParseTypes()&&this.match(47))Q=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node;J.typeArguments=Q}parseAsyncArrowWithTypeParameters(J){let Q=this.startNodeAt(J);if(this.parseFunctionParams(Q,!1),!this.parseArrow(Q))return;return super.parseArrowExpression(Q,void 0,!0)}readToken_mult_modulo(J){let Q=this.input.charCodeAt(this.state.pos+1);if(J===42&&Q===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(J)}readToken_pipe_amp(J){let Q=this.input.charCodeAt(this.state.pos+1);if(J===124&&Q===125){this.finishOp(9,2);return}super.readToken_pipe_amp(J)}parseTopLevel(J,Q){let V=super.parseTopLevel(J,Q);if(this.state.hasFlowComment)this.raise(D.UnterminatedFlowComment,this.state.curPosition());return V}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(D.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let J=this.skipFlowComment();if(J)this.state.pos+=J,this.state.hasFlowComment=!0;return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:J}=this.state,Q=2;while([32,9].includes(this.input.charCodeAt(J+Q)))Q++;let V=this.input.charCodeAt(Q+J),Y=this.input.charCodeAt(Q+J+1);if(V===58&&Y===58)return Q+2;if(this.input.slice(Q+J,Q+J+12)==="flow-include")return Q+12;if(V===58&&Y!==58)return Q;return!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(q.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(J,{enumName:Q,memberName:V}){this.raise(D.EnumBooleanMemberNotInitialized,J,{memberName:V,enumName:Q})}flowEnumErrorInvalidMemberInitializer(J,Q){return this.raise(!Q.explicitType?D.EnumInvalidMemberInitializerUnknownType:Q.explicitType==="symbol"?D.EnumInvalidMemberInitializerSymbolType:D.EnumInvalidMemberInitializerPrimaryType,J,Q)}flowEnumErrorNumberMemberNotInitialized(J,Q){this.raise(D.EnumNumberMemberNotInitialized,J,Q)}flowEnumErrorStringMemberInconsistentlyInitialized(J,Q){this.raise(D.EnumStringMemberInconsistentlyInitialized,J,Q)}flowEnumMemberInit(){let J=this.state.startLoc,Q=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let V=this.parseNumericLiteral(this.state.value);if(Q())return{type:"number",loc:V.loc.start,value:V};return{type:"invalid",loc:J}}case 134:{let V=this.parseStringLiteral(this.state.value);if(Q())return{type:"string",loc:V.loc.start,value:V};return{type:"invalid",loc:J}}case 85:case 86:{let V=this.parseBooleanLiteral(this.match(85));if(Q())return{type:"boolean",loc:V.loc.start,value:V};return{type:"invalid",loc:J}}default:return{type:"invalid",loc:J}}}flowEnumMemberRaw(){let J=this.state.startLoc,Q=this.parseIdentifier(!0),V=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:J};return{id:Q,init:V}}flowEnumCheckExplicitTypeMismatch(J,Q,V){let{explicitType:Y}=Q;if(Y===null)return;if(Y!==V)this.flowEnumErrorInvalidMemberInitializer(J,Q)}flowEnumMembers({enumName:J,explicitType:Q}){let V=new Set,Y={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},W=!1;while(!this.match(8)){if(this.eat(21)){W=!0;break}let j=this.startNode(),{id:U,init:R}=this.flowEnumMemberRaw(),H=U.name;if(H==="")continue;if(/^[a-z]/.test(H))this.raise(D.EnumInvalidMemberName,U,{memberName:H,suggestion:H[0].toUpperCase()+H.slice(1),enumName:J});if(V.has(H))this.raise(D.EnumDuplicateMemberName,U,{memberName:H,enumName:J});V.add(H);let K={enumName:J,explicitType:Q,memberName:H};switch(j.id=U,R.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(R.loc,K,"boolean"),j.init=R.value,Y.booleanMembers.push(this.finishNode(j,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(R.loc,K,"number"),j.init=R.value,Y.numberMembers.push(this.finishNode(j,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(R.loc,K,"string"),j.init=R.value,Y.stringMembers.push(this.finishNode(j,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(R.loc,K);case"none":switch(Q){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(R.loc,K);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(R.loc,K);break;default:Y.defaultedMembers.push(this.finishNode(j,"EnumDefaultedMember"))}}if(!this.match(8))this.expect(12)}return{members:Y,hasUnknownMembers:W}}flowEnumStringMembers(J,Q,{enumName:V}){if(J.length===0)return Q;else if(Q.length===0)return J;else if(Q.length>J.length){for(let Y of J)this.flowEnumErrorStringMemberInconsistentlyInitialized(Y,{enumName:V});return Q}else{for(let Y of Q)this.flowEnumErrorStringMemberInconsistentlyInitialized(Y,{enumName:V});return J}}flowEnumParseExplicitType({enumName:J}){if(!this.eatContextual(102))return null;if(!S(this.state.type))throw this.raise(D.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:J});let{value:Q}=this.state;if(this.next(),Q!=="boolean"&&Q!=="number"&&Q!=="string"&&Q!=="symbol")this.raise(D.EnumInvalidExplicitType,this.state.startLoc,{enumName:J,invalidEnumType:Q});return Q}flowEnumBody(J,Q){let V=Q.name,Y=Q.loc.start,W=this.flowEnumParseExplicitType({enumName:V});this.expect(5);let{members:j,hasUnknownMembers:U}=this.flowEnumMembers({enumName:V,explicitType:W});switch(J.hasUnknownMembers=U,W){case"boolean":return J.explicitType=!0,J.members=j.booleanMembers,this.expect(8),this.finishNode(J,"EnumBooleanBody");case"number":return J.explicitType=!0,J.members=j.numberMembers,this.expect(8),this.finishNode(J,"EnumNumberBody");case"string":return J.explicitType=!0,J.members=this.flowEnumStringMembers(j.stringMembers,j.defaultedMembers,{enumName:V}),this.expect(8),this.finishNode(J,"EnumStringBody");case"symbol":return J.members=j.defaultedMembers,this.expect(8),this.finishNode(J,"EnumSymbolBody");default:{let R=()=>{return J.members=[],this.expect(8),this.finishNode(J,"EnumStringBody")};J.explicitType=!1;let H=j.booleanMembers.length,K=j.numberMembers.length,G=j.stringMembers.length,F=j.defaultedMembers.length;if(!H&&!K&&!G&&!F)return R();else if(!H&&!K)return J.members=this.flowEnumStringMembers(j.stringMembers,j.defaultedMembers,{enumName:V}),this.expect(8),this.finishNode(J,"EnumStringBody");else if(!K&&!G&&H>=F){for(let v of j.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(v.loc.start,{enumName:V,memberName:v.id.name});return J.members=j.booleanMembers,this.expect(8),this.finishNode(J,"EnumBooleanBody")}else if(!H&&!G&&K>=F){for(let v of j.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(v.loc.start,{enumName:V,memberName:v.id.name});return J.members=j.numberMembers,this.expect(8),this.finishNode(J,"EnumNumberBody")}else return this.raise(D.EnumInconsistentMemberValues,Y,{enumName:V}),R()}}}flowParseEnumDeclaration(J){let Q=this.parseIdentifier();return J.id=Q,J.body=this.flowEnumBody(this.startNode(),Q),this.finishNode(J,"EnumDeclaration")}jsxParseOpeningElementAfterName(J){if(this.shouldParseTypes()){if(this.match(47)||this.match(51))J.typeArguments=this.flowParseTypeParameterInstantiationInExpression()}return super.jsxParseOpeningElementAfterName(J)}isLookaheadToken_lt(){let J=this.nextTokenStart();if(this.input.charCodeAt(J)===60){let Q=this.input.charCodeAt(J+1);return Q!==60&&Q!==61}return!1}reScan_lt_gt(){let{type:J}=this.state;if(J===47)this.state.pos-=1,this.readToken_lt();else if(J===48)this.state.pos-=1,this.readToken_gt()}reScan_lt(){let{type:J}=this.state;if(J===51)return this.state.pos-=2,this.finishOp(47,1),47;return J}maybeUnwrapTypeCastExpression(J){return J.type==="TypeCastExpression"?J.expression:J}},j1={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},R1=/\r\n|[\r\n\u2028\u2029]/,jJ=new RegExp(R1.source,"g");function t(Z){switch(Z){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function CZ(Z,X,J){for(let Q=X;Q<J;Q++)if(t(Z.charCodeAt(Q)))return!0;return!1}var BJ=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,DJ=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function U1(Z){switch(Z){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}}var p=g`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:Z})=>`Expected corresponding JSX closing tag for <${Z}>.`,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:Z,HTMLEntity:X})=>`Unexpected token \`${Z}\`. Did you mean \`${X}\` or \`{'${Z}'}\`?`,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 m(Z){return Z?Z.type==="JSXOpeningFragment"||Z.type==="JSXClosingFragment":!1}function d(Z){if(Z.type==="JSXIdentifier")return Z.name;if(Z.type==="JSXNamespacedName")return Z.namespace.name+":"+Z.name.name;if(Z.type==="JSXMemberExpression")return d(Z.object)+"."+d(Z.property);throw Error("Node had unexpected type: "+Z.type)}var q1=(Z)=>class extends Z{jsxReadToken(){let J="",Q=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedJsxContent,this.state.startLoc);let V=this.input.charCodeAt(this.state.pos);switch(V){case 60:case 123:if(this.state.pos===this.state.start){if(V===60&&this.state.canStartJSXElement)++this.state.pos,this.finishToken(143);else super.getTokenFromCode(V);return}J+=this.input.slice(Q,this.state.pos),this.finishToken(142,J);return;case 38:J+=this.input.slice(Q,this.state.pos),J+=this.jsxReadEntity(),Q=this.state.pos;break;case 62:case 125:default:if(t(V))J+=this.input.slice(Q,this.state.pos),J+=this.jsxReadNewLine(!0),Q=this.state.pos;else++this.state.pos}}}jsxReadNewLine(J){let Q=this.input.charCodeAt(this.state.pos),V;if(++this.state.pos,Q===13&&this.input.charCodeAt(this.state.pos)===10)++this.state.pos,V=J?`
|
|
5
5
|
`:`\r
|
package/dist/email/Email.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class Email {
|
|
|
14
14
|
template: ComponentType<any>;
|
|
15
15
|
headers: Record<string, string>;
|
|
16
16
|
static send<T extends Email>(this: new () => T, args: SendEmailArgs<T["template"] extends (p: infer P) => any ? P : never>): Promise<void>;
|
|
17
|
+
static preview<T extends Email>(this: new () => T, args: Pick<SendEmailArgs<T["template"] extends (p: infer P) => any ? P : never>, "data" | "locale">): Promise<string>;
|
|
17
18
|
protected render<T extends Record<string, any>>(props: T): Promise<string>;
|
|
18
19
|
protected renderText<T extends Record<string, any>>(props: T): Promise<string>;
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../email/Email.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE,UAAU,aAAa,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACvE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,KAAK;IAChB,IAAI,SAAM;IACV,EAAE,QAAM;IACR,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAgB;IACxD,EAAE,QAAM;IACR,GAAG,QAAM;IACT,WAAW,QAAM;IACjB,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;WAExB,IAAI,CAAC,CAAC,SAAS,KAAK,EAC/B,IAAI,EAAE,UAAU,CAAC,EACjB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../email/Email.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE,UAAU,aAAa,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACvE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,KAAK;IAChB,IAAI,SAAM;IACV,EAAE,QAAM;IACR,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAgB;IACxD,EAAE,QAAM;IACR,GAAG,QAAM;IACT,WAAW,QAAM;IACjB,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;WAExB,IAAI,CAAC,CAAC,SAAS,KAAK,EAC/B,IAAI,EAAE,UAAU,CAAC,EACjB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;WA+D/D,OAAO,CAAC,CAAC,SAAS,KAAK,EAClC,IAAI,EAAE,UAAU,CAAC,EACjB,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;cAWrF,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;cAK9C,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;CAInE"}
|
package/dist/email/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{W as w}from"../chunk-y5h3n5t8.js";import{X as J}from"../chunk-e4vawn5g.js";import"../chunk-8ty8fefr.js";import"../chunk-
|
|
2
|
+
import{W as w}from"../chunk-y5h3n5t8.js";import{X as J}from"../chunk-e4vawn5g.js";import"../chunk-8ty8fefr.js";import"../chunk-2vpsbhpm.js";import{render as G}from"jsx-email";import{jsx as H}from"react/jsx-runtime";class K{from="";to=[];subject="No Subject";cc=[];bcc=[];attachments=[];template;headers={};static async send(q){let k=new this,M=J.use().service.defaultLocale,y=w.use().service,{to:z=k.to,from:O=k.from,subject:A=typeof k.subject==="string"?k.subject:k.subject[q.locale||M],cc:P=k.cc,bcc:Q=k.bcc,attachments:R=k.attachments,data:B,headers:U={}}=q,V={...y.headers??{},...k.headers??{},...U??{}};if(!(await y.filterRecipients(z)).length)return;let[D,W]=await Promise.all([k.render({...B,locale:q.locale}),k.renderText({...B,locale:q.locale})]);if(process.env.EMAIL_DEBUG==="true"){let F=`${process.env.ROOT_DIR}/.debug/emails/${new Date().toISOString()}${A}.html`;await Bun.write(F,D),Bun.spawnSync(["open",F]);return}await w.use().service.driver.send({bcc:Q,cc:P,from:O,subject:A,to:z,attachments:R,html:D,headers:V,text:W})}static async preview(q){return await new this().render({...q.data,locale:q.locale})}async render(q){let k=this.template;return await G(H(k,{...q}))}async renderText(q){let k=this.template;return await G(H(k,{...q}),{plainText:!0})}}export{K as Email};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=156B2D7F72969FDB64756E2164756E21
|
package/dist/email/index.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../email/Email.tsx"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { ComponentType } from \"react\";\nimport { render } from \"jsx-email\";\nimport { EmailServiceContainer } from \"../services/email/EmailServiceContainer\";\nimport type { SendEmailParams } from \"../services/email/drivers/types\";\nimport { I18nServiceContainer } from \"../i18n/I18nServiceContainer\";\n\ninterface SendEmailArgs<T> extends Partial<Omit<SendEmailParams, \"html\">> {\n data: Omit<T, \"locale\">;\n locale?: string;\n}\n\nexport class Email {\n from = \"\";\n to = [];\n subject: string | Record<string, string> = \"No Subject\";\n cc = [];\n bcc = [];\n attachments = [];\n template: ComponentType<any>;\n headers: Record<string, string> = {};\n\n static async send<T extends Email>(\n this: new () => T,\n args: SendEmailArgs<T[\"template\"] extends (p: infer P) => any ? P : never>,\n ) {\n const instance = new this();\n\n const defaultLocale = I18nServiceContainer.use().service.defaultLocale;\n const emailService = EmailServiceContainer.use().service;\n\n const {\n to = instance.to,\n from = instance.from,\n subject = typeof instance.subject === \"string\"\n ? instance.subject\n : instance.subject[args.locale || defaultLocale],\n cc = instance.cc,\n bcc = instance.bcc,\n attachments = instance.attachments,\n data,\n headers = {},\n } = args;\n\n const _headers = {\n ...(emailService.headers ?? {}),\n ...(instance.headers ?? {}),\n ...(headers ?? {}),\n };\n\n const recipients = await emailService.filterRecipients(to);\n\n if (!recipients.length) {\n return;\n }\n\n const [html, text] = await Promise.all([\n instance.render({\n ...(data as any),\n locale: args.locale,\n }),\n instance.renderText({\n ...(data as any),\n locale: args.locale,\n }),\n ]);\n\n if (process.env.EMAIL_DEBUG === \"true\") {\n const fileName = `${process.env.ROOT_DIR}/.debug/emails/${new Date().toISOString()}${subject}.html`;\n await Bun.write(fileName, html);\n Bun.spawnSync([\"open\", fileName]);\n return;\n }\n\n await EmailServiceContainer.use().service.driver.send({\n bcc,\n cc,\n from,\n subject,\n to,\n attachments,\n html,\n headers: _headers,\n text,\n });\n }\n\n protected async render<T extends Record<string, any>>(props: T) {\n const Template = this.template;\n return await render(<Template {...props} />);\n }\n\n protected async renderText<T extends Record<string, any>>(props: T) {\n const Template = this.template;\n return await render(<Template {...props} />, { plainText: true });\n }\n}\n"
|
|
5
|
+
"import type { ComponentType } from \"react\";\nimport { render } from \"jsx-email\";\nimport { EmailServiceContainer } from \"../services/email/EmailServiceContainer\";\nimport type { SendEmailParams } from \"../services/email/drivers/types\";\nimport { I18nServiceContainer } from \"../i18n/I18nServiceContainer\";\n\ninterface SendEmailArgs<T> extends Partial<Omit<SendEmailParams, \"html\">> {\n data: Omit<T, \"locale\">;\n locale?: string;\n}\n\nexport class Email {\n from = \"\";\n to = [];\n subject: string | Record<string, string> = \"No Subject\";\n cc = [];\n bcc = [];\n attachments = [];\n template: ComponentType<any>;\n headers: Record<string, string> = {};\n\n static async send<T extends Email>(\n this: new () => T,\n args: SendEmailArgs<T[\"template\"] extends (p: infer P) => any ? P : never>,\n ) {\n const instance = new this();\n\n const defaultLocale = I18nServiceContainer.use().service.defaultLocale;\n const emailService = EmailServiceContainer.use().service;\n\n const {\n to = instance.to,\n from = instance.from,\n subject = typeof instance.subject === \"string\"\n ? instance.subject\n : instance.subject[args.locale || defaultLocale],\n cc = instance.cc,\n bcc = instance.bcc,\n attachments = instance.attachments,\n data,\n headers = {},\n } = args;\n\n const _headers = {\n ...(emailService.headers ?? {}),\n ...(instance.headers ?? {}),\n ...(headers ?? {}),\n };\n\n const recipients = await emailService.filterRecipients(to);\n\n if (!recipients.length) {\n return;\n }\n\n const [html, text] = await Promise.all([\n instance.render({\n ...(data as any),\n locale: args.locale,\n }),\n instance.renderText({\n ...(data as any),\n locale: args.locale,\n }),\n ]);\n\n if (process.env.EMAIL_DEBUG === \"true\") {\n const fileName = `${process.env.ROOT_DIR}/.debug/emails/${new Date().toISOString()}${subject}.html`;\n await Bun.write(fileName, html);\n Bun.spawnSync([\"open\", fileName]);\n return;\n }\n\n await EmailServiceContainer.use().service.driver.send({\n bcc,\n cc,\n from,\n subject,\n to,\n attachments,\n html,\n headers: _headers,\n text,\n });\n }\n\n static async preview<T extends Email>(\n this: new () => T,\n args: Pick<SendEmailArgs<T[\"template\"] extends (p: infer P) => any ? P : never>, \"data\" | \"locale\">,\n ) {\n\n const instance = new this();\n\n return await instance.render({\n ...args.data,\n locale: args.locale,\n })\n }\n\n protected async render<T extends Record<string, any>>(props: T) {\n const Template = this.template;\n return await render(<Template {...props} />);\n }\n\n protected async renderText<T extends Record<string, any>>(props: T) {\n const Template = this.template;\n return await render(<Template {...props} />, { plainText: true });\n }\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";2JACA,YAAS,qDAUF,CAAM,CAAM,CACjB,KAAO,GACP,GAAK,CAAC,EACN,QAA2C,aAC3C,GAAK,CAAC,EACN,IAAM,CAAC,EACP,YAAc,CAAC,EACf,SACA,QAAkC,CAAC,cAEtB,KAAqB,CAEhC,EACA,CACA,IAAM,EAAW,IAAI,KAEf,EAAgB,EAAqB,IAAI,EAAE,QAAQ,cACnD,EAAe,EAAsB,IAAI,EAAE,SAG/C,KAAK,EAAS,GACd,OAAO,EAAS,KAChB,UAAU,OAAO,EAAS,UAAY,SAClC,EAAS,QACT,EAAS,QAAQ,EAAK,QAAU,GACpC,KAAK,EAAS,GACd,MAAM,EAAS,IACf,cAAc,EAAS,YACvB,OACA,UAAU,CAAC,GACT,EAEE,EAAW,IACX,EAAa,SAAW,CAAC,KACzB,EAAS,SAAW,CAAC,KACrB,GAAW,CAAC,CAClB,EAIA,GAAI,EAFe,MAAM,EAAa,iBAAiB,CAAE,GAEzC,OACd,OAGF,IAAO,EAAM,GAAQ,MAAM,QAAQ,IAAI,CACrC,EAAS,OAAO,IACV,EACJ,OAAQ,EAAK,MACf,CAAC,EACD,EAAS,WAAW,IACd,EACJ,OAAQ,EAAK,MACf,CAAC,CACH,CAAC,EAED,GAAI,QAAQ,IAAI,cAAgB,OAAQ,CACtC,IAAM,EAAW,GAAG,QAAQ,IAAI,0BAA0B,IAAI,KAAK,EAAE,YAAY,IAAI,SACrF,MAAM,IAAI,MAAM,EAAU,CAAI,EAC9B,IAAI,UAAU,CAAC,OAAQ,CAAQ,CAAC,EAChC,OAGF,MAAM,EAAsB,IAAI,EAAE,QAAQ,OAAO,KAAK,CACpD,MACA,KACA,OACA,UACA,KACA,cACA,OACA,QAAS,EACT,MACF,CAAC,OAGa,OAAqC,CAAC,EAAU,CAC9D,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,EAAC,EAAD,IAAc,EAAO,CAAE,OAG7B,WAAyC,CAAC,EAAU,CAClE,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,EAAC,EAAD,IAAc,EAAO,EAAI,CAAE,UAAW,EAAK,CAAC,EAEpE",
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";2JACA,YAAS,qDAUF,CAAM,CAAM,CACjB,KAAO,GACP,GAAK,CAAC,EACN,QAA2C,aAC3C,GAAK,CAAC,EACN,IAAM,CAAC,EACP,YAAc,CAAC,EACf,SACA,QAAkC,CAAC,cAEtB,KAAqB,CAEhC,EACA,CACA,IAAM,EAAW,IAAI,KAEf,EAAgB,EAAqB,IAAI,EAAE,QAAQ,cACnD,EAAe,EAAsB,IAAI,EAAE,SAG/C,KAAK,EAAS,GACd,OAAO,EAAS,KAChB,UAAU,OAAO,EAAS,UAAY,SAClC,EAAS,QACT,EAAS,QAAQ,EAAK,QAAU,GACpC,KAAK,EAAS,GACd,MAAM,EAAS,IACf,cAAc,EAAS,YACvB,OACA,UAAU,CAAC,GACT,EAEE,EAAW,IACX,EAAa,SAAW,CAAC,KACzB,EAAS,SAAW,CAAC,KACrB,GAAW,CAAC,CAClB,EAIA,GAAI,EAFe,MAAM,EAAa,iBAAiB,CAAE,GAEzC,OACd,OAGF,IAAO,EAAM,GAAQ,MAAM,QAAQ,IAAI,CACrC,EAAS,OAAO,IACV,EACJ,OAAQ,EAAK,MACf,CAAC,EACD,EAAS,WAAW,IACd,EACJ,OAAQ,EAAK,MACf,CAAC,CACH,CAAC,EAED,GAAI,QAAQ,IAAI,cAAgB,OAAQ,CACtC,IAAM,EAAW,GAAG,QAAQ,IAAI,0BAA0B,IAAI,KAAK,EAAE,YAAY,IAAI,SACrF,MAAM,IAAI,MAAM,EAAU,CAAI,EAC9B,IAAI,UAAU,CAAC,OAAQ,CAAQ,CAAC,EAChC,OAGF,MAAM,EAAsB,IAAI,EAAE,QAAQ,OAAO,KAAK,CACpD,MACA,KACA,OACA,UACA,KACA,cACA,OACA,QAAS,EACT,MACF,CAAC,cAGU,QAAwB,CAEnC,EACA,CAIA,OAAO,MAFU,IAAI,KAAK,EAEJ,OAAO,IACxB,EAAK,KACR,OAAQ,EAAK,MACf,CAAC,OAGa,OAAqC,CAAC,EAAU,CAC9D,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,EAAC,EAAD,IAAc,EAAO,CAAE,OAG7B,WAAyC,CAAC,EAAU,CAClE,IAAM,EAAW,KAAK,SACtB,OAAO,MAAM,EAAO,EAAC,EAAD,IAAc,EAAO,EAAI,CAAE,UAAW,EAAK,CAAC,EAEpE",
|
|
8
|
+
"debugId": "156B2D7F72969FDB64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/facades/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{h as b,i as c,k as d,l as e,m as f,n as g,p as h,q as i,r as j}from"../chunk-
|
|
2
|
+
import{h as b,i as c,k as d,l as e,m as f,n as g,p as h,q as i,r as j}from"../chunk-es84e2a1.js";import"../chunk-9p1z3vnt.js";import"../chunk-e4vawn5g.js";import"../chunk-9p8h8aej.js";import{vb as a}from"../chunk-07keqpsw.js";import"../chunk-8ty8fefr.js";import"../chunk-2vpsbhpm.js";export{g as Url,a as Redirect,e as Query,i as Meta,h as Log,c as I18n,d as FileStorage,j as Cookie,f as Broadcast,b as Auth};
|
|
3
3
|
|
|
4
4
|
//# debugId=39BA8E27FFA9B66E64756E2164756E21
|
package/dist/http/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{B as c,C as e,D as f,F as g,G as h,H as i,I as j,J as k,K as l,L as m,O as n,P as o,Q as p,S as q,T as r,U as s,V as t,y as a,z as b}from"../chunk-9p1z3vnt.js";import{tb as d}from"../chunk-07keqpsw.js";import"../chunk-8ty8fefr.js";import"../chunk-
|
|
2
|
+
import{B as c,C as e,D as f,F as g,G as h,H as i,I as j,J as k,K as l,L as m,O as n,P as o,Q as p,S as q,T as r,U as s,V as t,y as a,z as b}from"../chunk-9p1z3vnt.js";import{tb as d}from"../chunk-07keqpsw.js";import"../chunk-8ty8fefr.js";import"../chunk-2vpsbhpm.js";export{i as getCookies,e as ViewRouter,f as ValidationError,b as ResourceController,d as RequestBreakerError,q as RateLimitMiddleware,s as PoliciesServiceProvider,t as Policies,j as MiddlewareServiceProvider,h as Middleware,l as InsufficientPermissionsError,g as HttpRequest,p as CorsMiddleware,a as Controller,o as CacheMiddleware,r as CSRFMiddleware,k as AuthorizationError,n as AuthenticationMiddleware,m as AuthenticationError,c as ApiRouter};
|
|
3
3
|
|
|
4
4
|
//# debugId=89E856F57129284564756E2164756E21
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{f as x}from"../chunk-e2713ftx.js";import{i as S}from"../chunk-
|
|
2
|
+
import{f as x}from"../chunk-e2713ftx.js";import{i as S}from"../chunk-es84e2a1.js";import"../chunk-9p1z3vnt.js";import"../chunk-e4vawn5g.js";import"../chunk-9p8h8aej.js";import"../chunk-07keqpsw.js";import"../chunk-8ty8fefr.js";import"../chunk-2vpsbhpm.js";import{createElement as $,Fragment as e,isValidElement as b}from"react";function y(r,n){let s=Object.values(n).some((o)=>typeof o==="function"&&b(o(""))),g=/{{([^{}]+?)(?::([^{}\[\]]+?))?(?:\[(.*?)\])?}}/g;if(!s)return r.replace(g,(f,d,t,w)=>{let P=d.includes(":")?d.split(":")[0]:d,i=n[P];if(i===void 0)return f;if(typeof i==="function"){let U=i(w!==void 0?w:"");if(b(U))throw Error("JSX returned in string context");return String(U)}if(t)switch(t.toLowerCase()){case"number":return Number(i).toString();case"string":return String(i);case"boolean":return Boolean(i).toString();default:return String(i)}return String(i)});else{let o=[],f=0,d=null;while((d=g.exec(r))!==null){let[t,w,P,i]=d,c=d.index,U=w.includes(":")?w.split(":")[0]:w;if(c>f)o.push(r.substring(f,c));let T=n[U];if(T===void 0)o.push(t);else if(typeof T==="function"){let K=T(i!==void 0?i:"");o.push(K)}else if(P)switch(P.toLowerCase()){case"number":o.push(Number(T).toString());break;case"string":o.push(String(T));break;case"boolean":o.push(Boolean(T).toString());break;default:o.push(String(T))}else o.push(String(T));f=c+t.length}if(f<r.length)o.push(r.substring(f));return $(e,{},...o)}}class R{name;dictionary;constructor(r,n){this.name=r;this.dictionary=n}reference(r){if(typeof window<"u")throw Error("Cannot use reference in the browser");if(!this.dictionary?.[r])throw Error(`Translation not found for ${String(r)}`);return this.dictionary[r]}render(r,...n){let{locale:s=S.locale(),params:g}={params:{},...n[0]};if(typeof window<"u")throw Error("Cannot use render in the browser");if(!this.dictionary?.[r]?.[s])throw Error(`Translation not found for ${String(r)} in ${String(s)}`);return y(this.dictionary[r][s],g??{})}static create(r,n){return new R(r,n)}static text(r,...n){let{locale:s=S.locale(),params:g}={params:{},...n?.[0]};if(!r?.[s])throw Error(`Translation not found for ${String(s)}`);return y(r[s],g??{})}}export{x as I18nServiceProvider,R as Dictionary};
|
|
3
3
|
|
|
4
4
|
//# debugId=53AE96E7344B124364756E2164756E21
|
package/dist/kernel/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{f as k}from"../chunk-e2713ftx.js";import{g as Q,j as Y,o as Z,s as A,t as K,u as M,v as N,w as S,x as V}from"../chunk-v4871k17.js";import{I as w,N as H,R as L}from"../chunk-9p1z3vnt.js";import{W as z}from"../chunk-y5h3n5t8.js";import{X}from"../chunk-e4vawn5g.js";import"../chunk-9p8h8aej.js";import{$ as x,aa as C,ea as f,ha as I,ia as _,ja as v,ka as l,la as d,pa as p,ta as u}from"../chunk-0p9jcm4w.js";import"../chunk-e1v59k8r.js";import"../chunk-e2k5akxp.js";import"../chunk-rvp6vtqh.js";import"../chunk-8fvf22sv.js";import"../chunk-qh9pbhfd.js";import"../chunk-ykn3pyw0.js";import"../chunk-c97bw1re.js";import"../chunk-wzba9wy7.js";import"../chunk-cbzr2eg7.js";import"../chunk-hpjqg060.js";import"../chunk-cpvmftfy.js";import{rb as W}from"../chunk-m5g0mh9n.js";import{wb as R}from"../chunk-07keqpsw.js";import{xb as G,yb as O}from"../chunk-8ty8fefr.js";import"../chunk-hzbeqg40.js";import"../chunk-dwsazw95.js";var c=async(j)=>j instanceof Promise?await j:j,q=async(j)=>{try{if(j)await c(j())}catch(b){}},m=class j{name;cron;callback;onTick;onComplete;interval=null;next=null;status="stopped";parser;constructor(b){if(this.name=b.name,this.cron=b.cron,this.callback=q.bind(this,b.callback),this.onTick=q.bind(this,b.onTick),this.onComplete=q.bind(this,b.onComplete),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.destroy=this.destroy.bind(this),this.getStatus=this.getStatus.bind(this),this.isRunning=this.isRunning.bind(this),this.lastExecution=this.lastExecution.bind(this),this.nextExecution=this.nextExecution.bind(this),this.remaining=this.remaining.bind(this),this.time=this.time.bind(this),this.parser=new h(this.cron),b.start)this.start()}start(){if(this.status==="running")return;this.status="running",this.next=this.parser.getNext(),this.interval=setInterval(()=>{if(this.next&&this.next.getTime()<=Date.now())this.callback(),this.onTick(),this.next=this.parser.getNext()},1000)}stop(){if(this.status==="stopped")return;if(this.status="stopped",this.interval)clearInterval(this.interval)}destroy(){this.stop(),this.onComplete()}getStatus(){return this.status}isRunning(){return this.status==="running"}lastExecution(){return this.parser.getPrevious()}nextExecution(){return this.next||new Date}remaining(){return this.next?this.next.getTime()-Date.now():0}time(){return Date.now()}static create(b){return new j(b)}static parse(b){return new h(b).parse()}static getNext(b){return new h(b).getNext()}static getPrevious(b){return new h(b).getPrevious()}static isCron(b){try{return new h(b).parse(),!0}catch($){return!1}}static isValid(b){return j.isCron(b)}},t=m,i=class j{crons=new Map;constructor(b={}){if(b.autoStart)this.bakeAll()}add(b){let $=t.create(b);return this.crons.set($.name,$),$}remove(b){let $=this.crons.get(b);if($)$.destroy(),this.crons.delete(b)}bake(b){let $=this.crons.get(b);if($)$.start()}stop(b){let $=this.crons.get(b);if($)$.stop()}destroy(b){let $=this.crons.get(b);if($)$.destroy(),this.crons.delete(b)}getStatus(b){let $=this.crons.get(b);return $?$.getStatus():"stopped"}isRunning(b){let $=this.crons.get(b);return $?$.isRunning():!1}lastExecution(b){let $=this.crons.get(b);return $?$.lastExecution():new Date}nextExecution(b){let $=this.crons.get(b);return $?$.nextExecution():new Date}remaining(b){let $=this.crons.get(b);return $?$.remaining():0}time(b){let $=this.crons.get(b);return $?$.time():0}bakeAll(){this.crons.forEach((b)=>b.start())}stopAll(){this.crons.forEach((b)=>b.stop())}destroyAll(){this.crons.forEach((b)=>b.destroy()),this.crons.clear()}static create(b={}){return new j(b)}},s=i,o=class{constructor(j){this.cron=j}aliases=new Map([["@every_second","* * * * * *"],["@every_minute","0 * * * * *"],["@yearly","0 0 1 1 * *"],["@annually","0 0 1 1 * *"],["@monthly","0 0 1 * * *"],["@weekly","0 0 * * 0 *"],["@daily","0 0 * * * *"],["@hourly","0 * * * * *"]]);parseEveryStr(j){let[,b,$]=j.split("_");switch($){case"seconds":return`*/${b} * * * * *`;case"minutes":return`0 */${b} * * * *`;case"hours":return`0 0 */${b} * * *`;case"dayOfMonth":return`0 0 0 */${b} * *`;case"months":return`0 0 0 0 */${b} *`;case"dayOfWeek":return`0 0 0 0 0 */${b}`;default:return"* * * * * *"}}parseAtHourStr(j){let[,b]=j.split("_"),[$,J]=b.split(":");return`0 ${J} ${$} * * *`}parseOnDayStr(j){let[,b,$]=j.split("_");return`0 0 0 * * ${new Map([["sunday",1],["monday",2],["tuesday",3],["wednesday",4],["thursday",5],["friday",6],["saturday",7]]).get(b)}`}parseBetweenStr(j){let[,b,$]=j.split("_");return`0 0 ${b}-${$} * * *`}parseStr(j){if(this.aliases.has(j))return this.aliases.get(j)||"";if(j.includes("@every_"))return this.parseEveryStr(j);if(j.includes("@at_"))return this.parseAtHourStr(j);if(j.includes("@on_"))return this.parseOnDayStr(j);if(j.includes("@between_"))return this.parseBetweenStr(j);return j}parse(){this.cron=this.parseStr(this.cron);let[j,b,$,J,y,P]=this.cron.split(" ");return{second:this.parseCronTime(j,0,59),minute:this.parseCronTime(b,0,59),hour:this.parseCronTime($,0,23),dayOfMonth:this.parseCronTime(J,1,31),month:this.parseCronTime(y,1,12),dayOfWeek:this.parseCronTime(P,0,6)}}getNext(){let j=this.parse(),b=new Date,$=new Date(b.getFullYear(),b.getMonth(),b.getDate(),b.getHours(),b.getMinutes(),b.getSeconds());$.setMilliseconds(0),$.setSeconds($.getSeconds()+1);while(!this.checkCronTime(j,$))$.setSeconds($.getSeconds()+1);return $}getPrevious(){let j=this.parse(),b=new Date,$=new Date(b.getFullYear(),b.getMonth(),b.getDate(),b.getHours(),b.getMinutes(),b.getSeconds());$.setMilliseconds(0),$.setSeconds($.getSeconds()-1);while(!this.checkCronTime(j,$))$.setSeconds($.getSeconds()-1);return $}parseCronTime(j,b,$){let J=[];switch(!0){case j==="*":for(let y=b;y<=$;y++)J.push(y);break;case j.includes("-"):{let[y,P]=j.split("-"),F=this.getStep(j);for(let U=parseInt(y);U<=parseInt(P);U+=F)J.push(U);break}case j.includes("/"):{let[y,P]=j.split("/"),F=y==="*"?b:parseInt(y);for(let U=F;U<=$;U+=parseInt(P))J.push(U);break}case j.includes(","):{let y=j.split(",");for(let P=0;P<y.length;P++)J.push(parseInt(y[P]));break}default:J.push(parseInt(j));break}return J}getStep(j){let[,b]=j.split("/"),$=parseInt(b);return isNaN($)?1:$}checkCronTime(j,b){if(j.second&&!j.second.includes(b.getSeconds()))return!1;if(j.minute&&!j.minute.includes(b.getMinutes()))return!1;if(j.hour&&!j.hour.includes(b.getHours()))return!1;if(j.dayOfMonth&&!j.dayOfMonth.includes(b.getDate()))return!1;if(j.month&&!j.month.includes(b.getMonth()+1))return!1;else if(j.dayOfWeek&&!j.dayOfWeek.includes(b.getDay()))return!1;return!0}},h=o,B=s;class E extends O{service;static _name="CronServiceContainer";constructor(j){super();this.service=j;if(this.service.jobs.length===0)return;let b=B.create({autoStart:!0}),$=async(J)=>{return await this.service.kernel.waitForBoot.call(this.service.kernel),await this.service.kernel.run.call(this.service.kernel,J)};for(let J of this.service.jobs){let y=new J;if(!y.name){console.error(`Cron job must have a name. Job: ${JSON.stringify(y)}`);continue}if(!y.cron){console.error(`Cron job must have an expression. Job: ${y.name}`);continue}b.add({name:y.name,cron:y.cron,callback:()=>$(async()=>{try{await y.callback.call(y)}catch(P){console.error(`Error in cron job ${y.name}:`,P)}}),onComplete:()=>$(async()=>{try{await y.onComplete.call(y)}catch(P){console.error(`Error completing cron job ${y.name}:`,P)}}),onTick:()=>$(async()=>{try{await y.onTick.call(y)}catch(P){console.error(`Error executing cron job ${y.name}:`,P)}})})}b.bakeAll()}}class D extends R{id=crypto.randomUUID();boot(){}}class T{emailServiceProvider=I;authenticationServiceProvider=A;middlewareServiceProvider=w;i18nServiceProvider=k;fileStorageServiceProvider=x;apiRouterServiceProvider=C;viewRouterServiceProvider=v;rateLimiterServiceProvider=f;broadcastingsServiceProvider=_;loggingServiceProvider=l;queueServiceProvider=d;imageServiceProvider=p;cronServiceProvider=u;kernelIdServiceProvider=D;services={};booted=!1;boot(){this.services={[z._name]:new z(new this.emailServiceProvider),[H._name]:new H(new this.authenticationServiceProvider),[M._name]:new M(new this.middlewareServiceProvider),[X._name]:new X(new this.i18nServiceProvider),[Y._name]:new Y(new this.fileStorageServiceProvider),[V._name]:new V(new this.apiRouterServiceProvider),[S._name]:new S(new this.viewRouterServiceProvider),[L._name]:new L(new this.rateLimiterServiceProvider),[Q._name]:new Q(new this.broadcastingsServiceProvider),[Z._name]:new Z(new this.loggingServiceProvider),[W._name]:new W(new this.queueServiceProvider),[K._name]:new K(new this.imageServiceProvider),[E._name]:new E(new this.cronServiceProvider(this)),[N._name]:new N(new this.kernelIdServiceProvider)},this.booted=!0}run(j){let b=this.services;return G.run(b,j)}destroy(){for(let j of Object.keys(this.services))delete this.services[j];G.disable()}async waitForBoot(){if(!this.booted)await new Promise((j)=>{while(!this.booted)setTimeout(()=>{if(this.booted)j()},10)})}}class g{prisma;constructor(j){this.prisma=j}async findUserByVerificationToken(j){return await this.prisma.user.findFirst({where:{verificationToken:j}})}async verifyUser(j){return await this.prisma.user.update({where:{email:j},data:{emailVerifiedAt:new Date}})}async createSessionV2(j){return await this.prisma.session.create({data:j,include:{user:{select:{password:!1,id:!0,email:!0,globalRole:!0,name:!0,locale:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}}}}}})}async createSession(j){return await this.prisma.session.create({data:j,include:{user:!0}})}async createUser(j){return await this.prisma.user.create({data:j,omit:{password:!0}})}async deleteSession(j){return await this.prisma.session.deleteMany({where:{token:j.token}})}async findUserByEmailAddress(j,b){if(b)return await this.prisma.user.findUnique({where:{email:j,emailVerifiedAt:{not:null}}});return await this.prisma.user.findUnique({where:{email:j}})}async findSession(j){if(!j.token)return null;try{return await this.prisma.session.findUnique({where:{token:j.token},include:{user:{select:{password:!1,id:!0,email:!0,globalRole:!0,name:!0,locale:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}}}}}})}catch(b){return console.log(b),null}}async updateSession(j){return await this.prisma.session.update({where:{token:j.token},data:{expiresAt:j.expiresAt},include:{user:{select:{id:!0,password:!1,email:!0,globalRole:!0,name:!0,locale:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}},organization:!0}}}})}async updateUserPassword(j){return await this.prisma.user.update({where:{id:j.id},data:{password:j.password}})}async createPasswordResetToken(j){return await this.prisma.passwordResetToken.create({data:{user:{connect:{id:j.user.id}},token:j.token}})}async findPasswordResetToken(j){let{token:b}=j;return await this.prisma.passwordResetToken.findUnique({where:{token:b},include:{user:!0}})}async deleteAllUserSessions(j){return await this.prisma.session.deleteMany({where:{userId:j}})}async deletePasswordResetToken(j){let{token:b}=j;return await this.prisma.passwordResetToken.delete({where:{token:b}})}async createAccount(j){return await this.prisma.account.create({data:{organizationId:j.organizationId,organizationRole:j.organizationRole,userId:j.userId}})}async deleteInvitationById(j){return await this.prisma.organizationInvitation.delete({where:{publicId:j}})}async findInvitation(j,b){return await this.prisma.organizationInvitation.findFirst({where:{publicId:j,email:b}})}async createMagicLinkToken(j){return await this.prisma.magicLinkToken.create({data:{email:j.email,token:j.token,pin:j.pin}})}async findUserMagicLinkToken(j){let{token:b,pin:$,email:J}=j;if(b)return this.prisma.magicLinkToken.findUnique({where:{token_email:{email:J,token:b}}});else return await this.prisma.magicLinkToken.findUnique({where:{pin_email:{email:J,pin:$}}})}async deleteMagicLinkToken(j){return await this.prisma.magicLinkToken.deleteMany({where:{email:j}})}async createSocialAccount(j){return await this.prisma.socialAccount.create({data:j})}}export{g as PrismaAuthenticationAdapter,T as Kernel,A as AuthenticationServiceProvider};
|
|
2
|
+
import{f as k}from"../chunk-e2713ftx.js";import{g as Q,j as Y,o as Z,s as A,t as K,u as M,v as N,w as S,x as V}from"../chunk-es84e2a1.js";import{I as w,N as H,R as L}from"../chunk-9p1z3vnt.js";import{W as z}from"../chunk-y5h3n5t8.js";import{X}from"../chunk-e4vawn5g.js";import"../chunk-9p8h8aej.js";import{$ as x,aa as C,ea as f,ha as I,ia as _,ja as v,ka as l,la as d,pa as p,ta as u}from"../chunk-rat133ng.js";import"../chunk-txk5dr5r.js";import"../chunk-bwd327vf.js";import"../chunk-69wrnjjn.js";import"../chunk-yhrk5bfy.js";import"../chunk-xak5xspk.js";import"../chunk-xdm3d6a3.js";import"../chunk-kp6wx276.js";import"../chunk-1sdckzzr.js";import"../chunk-ghy6gn4g.js";import"../chunk-gncq70ga.js";import"../chunk-pp10jse0.js";import{rb as W}from"../chunk-m5g0mh9n.js";import{wb as R}from"../chunk-07keqpsw.js";import{xb as G,yb as O}from"../chunk-8ty8fefr.js";import"../chunk-haenvmrp.js";import"../chunk-2vpsbhpm.js";var c=async(j)=>j instanceof Promise?await j:j,q=async(j)=>{try{if(j)await c(j())}catch(b){}},m=class j{name;cron;callback;onTick;onComplete;interval=null;next=null;status="stopped";parser;constructor(b){if(this.name=b.name,this.cron=b.cron,this.callback=q.bind(this,b.callback),this.onTick=q.bind(this,b.onTick),this.onComplete=q.bind(this,b.onComplete),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.destroy=this.destroy.bind(this),this.getStatus=this.getStatus.bind(this),this.isRunning=this.isRunning.bind(this),this.lastExecution=this.lastExecution.bind(this),this.nextExecution=this.nextExecution.bind(this),this.remaining=this.remaining.bind(this),this.time=this.time.bind(this),this.parser=new h(this.cron),b.start)this.start()}start(){if(this.status==="running")return;this.status="running",this.next=this.parser.getNext(),this.interval=setInterval(()=>{if(this.next&&this.next.getTime()<=Date.now())this.callback(),this.onTick(),this.next=this.parser.getNext()},1000)}stop(){if(this.status==="stopped")return;if(this.status="stopped",this.interval)clearInterval(this.interval)}destroy(){this.stop(),this.onComplete()}getStatus(){return this.status}isRunning(){return this.status==="running"}lastExecution(){return this.parser.getPrevious()}nextExecution(){return this.next||new Date}remaining(){return this.next?this.next.getTime()-Date.now():0}time(){return Date.now()}static create(b){return new j(b)}static parse(b){return new h(b).parse()}static getNext(b){return new h(b).getNext()}static getPrevious(b){return new h(b).getPrevious()}static isCron(b){try{return new h(b).parse(),!0}catch($){return!1}}static isValid(b){return j.isCron(b)}},t=m,i=class j{crons=new Map;constructor(b={}){if(b.autoStart)this.bakeAll()}add(b){let $=t.create(b);return this.crons.set($.name,$),$}remove(b){let $=this.crons.get(b);if($)$.destroy(),this.crons.delete(b)}bake(b){let $=this.crons.get(b);if($)$.start()}stop(b){let $=this.crons.get(b);if($)$.stop()}destroy(b){let $=this.crons.get(b);if($)$.destroy(),this.crons.delete(b)}getStatus(b){let $=this.crons.get(b);return $?$.getStatus():"stopped"}isRunning(b){let $=this.crons.get(b);return $?$.isRunning():!1}lastExecution(b){let $=this.crons.get(b);return $?$.lastExecution():new Date}nextExecution(b){let $=this.crons.get(b);return $?$.nextExecution():new Date}remaining(b){let $=this.crons.get(b);return $?$.remaining():0}time(b){let $=this.crons.get(b);return $?$.time():0}bakeAll(){this.crons.forEach((b)=>b.start())}stopAll(){this.crons.forEach((b)=>b.stop())}destroyAll(){this.crons.forEach((b)=>b.destroy()),this.crons.clear()}static create(b={}){return new j(b)}},s=i,o=class{constructor(j){this.cron=j}aliases=new Map([["@every_second","* * * * * *"],["@every_minute","0 * * * * *"],["@yearly","0 0 1 1 * *"],["@annually","0 0 1 1 * *"],["@monthly","0 0 1 * * *"],["@weekly","0 0 * * 0 *"],["@daily","0 0 * * * *"],["@hourly","0 * * * * *"]]);parseEveryStr(j){let[,b,$]=j.split("_");switch($){case"seconds":return`*/${b} * * * * *`;case"minutes":return`0 */${b} * * * *`;case"hours":return`0 0 */${b} * * *`;case"dayOfMonth":return`0 0 0 */${b} * *`;case"months":return`0 0 0 0 */${b} *`;case"dayOfWeek":return`0 0 0 0 0 */${b}`;default:return"* * * * * *"}}parseAtHourStr(j){let[,b]=j.split("_"),[$,J]=b.split(":");return`0 ${J} ${$} * * *`}parseOnDayStr(j){let[,b,$]=j.split("_");return`0 0 0 * * ${new Map([["sunday",1],["monday",2],["tuesday",3],["wednesday",4],["thursday",5],["friday",6],["saturday",7]]).get(b)}`}parseBetweenStr(j){let[,b,$]=j.split("_");return`0 0 ${b}-${$} * * *`}parseStr(j){if(this.aliases.has(j))return this.aliases.get(j)||"";if(j.includes("@every_"))return this.parseEveryStr(j);if(j.includes("@at_"))return this.parseAtHourStr(j);if(j.includes("@on_"))return this.parseOnDayStr(j);if(j.includes("@between_"))return this.parseBetweenStr(j);return j}parse(){this.cron=this.parseStr(this.cron);let[j,b,$,J,y,P]=this.cron.split(" ");return{second:this.parseCronTime(j,0,59),minute:this.parseCronTime(b,0,59),hour:this.parseCronTime($,0,23),dayOfMonth:this.parseCronTime(J,1,31),month:this.parseCronTime(y,1,12),dayOfWeek:this.parseCronTime(P,0,6)}}getNext(){let j=this.parse(),b=new Date,$=new Date(b.getFullYear(),b.getMonth(),b.getDate(),b.getHours(),b.getMinutes(),b.getSeconds());$.setMilliseconds(0),$.setSeconds($.getSeconds()+1);while(!this.checkCronTime(j,$))$.setSeconds($.getSeconds()+1);return $}getPrevious(){let j=this.parse(),b=new Date,$=new Date(b.getFullYear(),b.getMonth(),b.getDate(),b.getHours(),b.getMinutes(),b.getSeconds());$.setMilliseconds(0),$.setSeconds($.getSeconds()-1);while(!this.checkCronTime(j,$))$.setSeconds($.getSeconds()-1);return $}parseCronTime(j,b,$){let J=[];switch(!0){case j==="*":for(let y=b;y<=$;y++)J.push(y);break;case j.includes("-"):{let[y,P]=j.split("-"),F=this.getStep(j);for(let U=parseInt(y);U<=parseInt(P);U+=F)J.push(U);break}case j.includes("/"):{let[y,P]=j.split("/"),F=y==="*"?b:parseInt(y);for(let U=F;U<=$;U+=parseInt(P))J.push(U);break}case j.includes(","):{let y=j.split(",");for(let P=0;P<y.length;P++)J.push(parseInt(y[P]));break}default:J.push(parseInt(j));break}return J}getStep(j){let[,b]=j.split("/"),$=parseInt(b);return isNaN($)?1:$}checkCronTime(j,b){if(j.second&&!j.second.includes(b.getSeconds()))return!1;if(j.minute&&!j.minute.includes(b.getMinutes()))return!1;if(j.hour&&!j.hour.includes(b.getHours()))return!1;if(j.dayOfMonth&&!j.dayOfMonth.includes(b.getDate()))return!1;if(j.month&&!j.month.includes(b.getMonth()+1))return!1;else if(j.dayOfWeek&&!j.dayOfWeek.includes(b.getDay()))return!1;return!0}},h=o,B=s;class E extends O{service;static _name="CronServiceContainer";constructor(j){super();this.service=j;if(this.service.jobs.length===0)return;let b=B.create({autoStart:!0}),$=async(J)=>{return await this.service.kernel.waitForBoot.call(this.service.kernel),await this.service.kernel.run.call(this.service.kernel,J)};for(let J of this.service.jobs){let y=new J;if(!y.name){console.error(`Cron job must have a name. Job: ${JSON.stringify(y)}`);continue}if(!y.cron){console.error(`Cron job must have an expression. Job: ${y.name}`);continue}b.add({name:y.name,cron:y.cron,callback:()=>$(async()=>{try{await y.callback.call(y)}catch(P){console.error(`Error in cron job ${y.name}:`,P)}}),onComplete:()=>$(async()=>{try{await y.onComplete.call(y)}catch(P){console.error(`Error completing cron job ${y.name}:`,P)}}),onTick:()=>$(async()=>{try{await y.onTick.call(y)}catch(P){console.error(`Error executing cron job ${y.name}:`,P)}})})}b.bakeAll()}}class D extends R{id=crypto.randomUUID();boot(){}}class T{emailServiceProvider=I;authenticationServiceProvider=A;middlewareServiceProvider=w;i18nServiceProvider=k;fileStorageServiceProvider=x;apiRouterServiceProvider=C;viewRouterServiceProvider=v;rateLimiterServiceProvider=f;broadcastingsServiceProvider=_;loggingServiceProvider=l;queueServiceProvider=d;imageServiceProvider=p;cronServiceProvider=u;kernelIdServiceProvider=D;services={};booted=!1;boot(){this.services={[z._name]:new z(new this.emailServiceProvider),[H._name]:new H(new this.authenticationServiceProvider),[M._name]:new M(new this.middlewareServiceProvider),[X._name]:new X(new this.i18nServiceProvider),[Y._name]:new Y(new this.fileStorageServiceProvider),[V._name]:new V(new this.apiRouterServiceProvider),[S._name]:new S(new this.viewRouterServiceProvider),[L._name]:new L(new this.rateLimiterServiceProvider),[Q._name]:new Q(new this.broadcastingsServiceProvider),[Z._name]:new Z(new this.loggingServiceProvider),[W._name]:new W(new this.queueServiceProvider),[K._name]:new K(new this.imageServiceProvider),[E._name]:new E(new this.cronServiceProvider(this)),[N._name]:new N(new this.kernelIdServiceProvider)},this.booted=!0}run(j){let b=this.services;return G.run(b,j)}destroy(){for(let j of Object.keys(this.services))delete this.services[j];G.disable()}async waitForBoot(){if(!this.booted)await new Promise((j)=>{while(!this.booted)setTimeout(()=>{if(this.booted)j()},10)})}}class g{prisma;constructor(j){this.prisma=j}async findUserByVerificationToken(j){return await this.prisma.user.findFirst({where:{verificationToken:j}})}async verifyUser(j){return await this.prisma.user.update({where:{email:j},data:{emailVerifiedAt:new Date}})}async createSessionV2(j){return await this.prisma.session.create({data:j,include:{user:{select:{password:!1,id:!0,email:!0,globalRole:!0,name:!0,locale:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}}}}}})}async createSession(j){return await this.prisma.session.create({data:j,include:{user:!0}})}async createUser(j){return await this.prisma.user.create({data:j,omit:{password:!0}})}async deleteSession(j){return await this.prisma.session.deleteMany({where:{token:j.token}})}async findUserByEmailAddress(j,b){if(b)return await this.prisma.user.findUnique({where:{email:j,emailVerifiedAt:{not:null}}});return await this.prisma.user.findUnique({where:{email:j}})}async findSession(j){if(!j.token)return null;try{return await this.prisma.session.findUnique({where:{token:j.token},include:{user:{select:{password:!1,id:!0,email:!0,globalRole:!0,name:!0,locale:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}}}}}})}catch(b){return console.log(b),null}}async updateSession(j){return await this.prisma.session.update({where:{token:j.token},data:{expiresAt:j.expiresAt},include:{user:{select:{id:!0,password:!1,email:!0,globalRole:!0,name:!0,locale:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}},organization:!0}}}})}async updateUserPassword(j){return await this.prisma.user.update({where:{id:j.id},data:{password:j.password}})}async createPasswordResetToken(j){return await this.prisma.passwordResetToken.create({data:{user:{connect:{id:j.user.id}},token:j.token}})}async findPasswordResetToken(j){let{token:b}=j;return await this.prisma.passwordResetToken.findUnique({where:{token:b},include:{user:!0}})}async deleteAllUserSessions(j){return await this.prisma.session.deleteMany({where:{userId:j}})}async deletePasswordResetToken(j){let{token:b}=j;return await this.prisma.passwordResetToken.delete({where:{token:b}})}async createAccount(j){return await this.prisma.account.create({data:{organizationId:j.organizationId,organizationRole:j.organizationRole,userId:j.userId}})}async deleteInvitationById(j){return await this.prisma.organizationInvitation.delete({where:{publicId:j}})}async findInvitation(j,b){return await this.prisma.organizationInvitation.findFirst({where:{publicId:j,email:b}})}async createMagicLinkToken(j){return await this.prisma.magicLinkToken.create({data:{email:j.email,token:j.token,pin:j.pin}})}async findUserMagicLinkToken(j){let{token:b,pin:$,email:J}=j;if(b)return this.prisma.magicLinkToken.findUnique({where:{token_email:{email:J,token:b}}});else return await this.prisma.magicLinkToken.findUnique({where:{pin_email:{email:J,pin:$}}})}async deleteMagicLinkToken(j){return await this.prisma.magicLinkToken.deleteMany({where:{email:j}})}async createSocialAccount(j){return await this.prisma.socialAccount.create({data:j})}}export{g as PrismaAuthenticationAdapter,T as Kernel,A as AuthenticationServiceProvider};
|
|
3
3
|
|
|
4
4
|
//# debugId=6B0EFEDF960CF4DC64756E2164756E21
|
package/dist/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Y as _}from"../chunk-9p8h8aej.js";import{Db as G}from"../chunk-
|
|
2
|
+
import{Y as _}from"../chunk-9p8h8aej.js";import{Db as G}from"../chunk-2vpsbhpm.js";import{join as C}from"path";import{jsx as L}from"react/jsx-runtime";function N(n,t){let l=Object.keys(t).sort((p,w)=>w.length-p.length).map((p)=>p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),h=new RegExp(l.join("|"),"g");return n.replace(h,(p)=>t[p])}async function B(n,t,l=[]){let h=[...l.map((e)=>`${n}/views/${e}.tsx`),`${n}/views/RootLayout.tsx`],p=new Set;for(let e of h){let s=t.moduleGraph.getModulesByFile(e);if(s)p=p.union(s)}let w=[],$=[],d={};for(let e of p)if(e)for(let s of e.importedModules){if(s.file.includes("module.css"))d[s.file]=s.ssrTransformResult.map.sourcesContent.join("");if(s.file.includes(".css"))$.push(s.file)}for(let e of $){let s=await t.transformRequest(e+"?direct"),i=e.includes("module.css"),c="";if(i)c=N(d[e],s.default);w.push({isDev:!0,id:e,content:i?c:s.code})}return w.map((e,s)=>{return L("style",{type:"text/css","data-vite-dev-id":e.id,children:e.content},s)})}async function I(n=[]){return n.map((t,l)=>{return L("style",{id:t?.id,type:"text/css",children:t.content},l)})}function k(n){return n.replace(/\x1b\[[0-9;]*m/g,"").replace(/\[[0-9;]*m/g,"").replace(/\n\s*\n/g,`
|
|
3
3
|
`).split(`
|
|
4
4
|
`).map((t)=>t.trim()).filter((t)=>t.length>0).join(`
|
|
5
5
|
`).trim()}function F(n){return`
|
package/dist/services/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$ as c,Z as a,_ as b,aa as d,ba as e,ca as f,da as g,ea as h,fa as i,ga as j,ha as k,ia as l,ja as m,ka as n,la as o,ma as p,na as q,oa as r,pa as s,qa as t,ra as u,sa as v,ta as w,ua as x}from"../chunk-
|
|
2
|
+
import{$ as c,Z as a,_ as b,aa as d,ba as e,ca as f,da as g,ea as h,fa as i,ga as j,ha as k,ia as l,ja as m,ka as n,la as o,ma as p,na as q,oa as r,pa as s,qa as t,ra as u,sa as v,ta as w,ua as x}from"../chunk-rat133ng.js";import"../chunk-txk5dr5r.js";import"../chunk-bwd327vf.js";import"../chunk-69wrnjjn.js";import"../chunk-yhrk5bfy.js";import"../chunk-xak5xspk.js";import"../chunk-xdm3d6a3.js";import"../chunk-kp6wx276.js";import"../chunk-1sdckzzr.js";import"../chunk-ghy6gn4g.js";import"../chunk-gncq70ga.js";import"../chunk-pp10jse0.js";import"../chunk-m5g0mh9n.js";import"../chunk-07keqpsw.js";import"../chunk-8ty8fefr.js";import"../chunk-haenvmrp.js";import"../chunk-2vpsbhpm.js";export{v as XOAuthProvider,m as ViewRouterServiceProvider,r as Sharp,e as S3Driver,j as ResendDriver,h as RateLimiterServiceProvider,f as RateLimiterDriver,o as QueueServiceProvider,t as OAuthProvider,n as LoggingServiceProvider,p as Job,g as InMemoryRateLimiter,s as ImageOptimizationServiceProvider,q as ImageOptimizationDriver,u as GoogleOAuthProvider,b as FileSystemDriver,c as FileStorageServiceProvider,a as FileStorageDriver,k as EmailServiceProvider,i as EmailDriver,w as CronServiceProvider,x as CronJob,l as BroadcastingServiceProvider,d as ApiRouterServiceProvider};
|
|
3
3
|
|
|
4
4
|
//# debugId=FF1B419BB85FD24C64756E2164756E21
|
package/package.json
CHANGED
package/dist/chunk-dwsazw95.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var g=Object.create;var{getPrototypeOf:h,defineProperty:f,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var k=(a,b,c)=>{c=a!=null?g(h(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var l=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var m=(a,b)=>()=>(a&&(b=a(a=0)),b);var n=import.meta.require;
|
|
3
|
-
export{k as Ab,l as Bb,m as Cb,n as Db};
|
|
4
|
-
|
|
5
|
-
//# debugId=0FB76287AFFCAADA64756E2164756E21
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|