@mastra/deployer-cloud 1.81.0-alpha.1 → 1.81.0-alpha.2

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.
@@ -11,6 +11,6 @@ var e=Object.defineProperty,t=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:
11
11
  `)return t+2;if(Gn(i))return t+1}return t}var qn=Kn;function Jn(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?Hn(e,t):t}var Yn=Jn;function Xn(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Vn(e,r),r=Wn(e,r),r=Yn(e,r),r=qn(e,r);return r}var Zn=Xn;function Qn(e){let t=[];for(let n of e)try{return n()}catch(e){t.push(e)}throw Object.assign(Error(`All combinations failed`),{errors:t})}function $n(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(`
12
12
  `);return t===-1?e:e.slice(0,t)}var er=$n,tr=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},nr=i(`findLast`,function(){if(Array.isArray(this))return tr}),rr=Symbol.for(`comments`);function ir(e){return this[e<0?this.length+e:e]}var ar=i(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return ir});function or(e){let t=new Set(e);return e=>t.has(e?.type)}function sr(e){return e.range?.[1]??e.end}function W(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(W(n),t):t}var cr=5,lr=8,ur=8,dr=e=>t=>t.label?G(t.label):W(t)+e,fr=e=>e.__contentEnd??sr(e),pr=[`ExpressionStatement`,`Directive`,`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`ReturnStatement`,`ThrowStatement`,`DoWhileStatement`],mr=new Map([[`BreakStatement`,dr(cr)],[`ContinueStatement`,dr(lr)],[`DebuggerStatement`,e=>W(e)+ur],[`VariableDeclaration`,e=>G(ar(0,e.declarations,-1))],...pr.map(e=>[e,fr])]),hr=or(pr);function G(e){let{type:t}=e;return t===`IfStatement`?G(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?G(e.body):mr.get(t)?.(e)??sr(e)}var gr=or([`Block`,`CommentBlock`,`MultiLine`]),_r=or([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function vr(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}var yr=new WeakMap;function br(e){return vr(yr,e,e=>gr(e)&&e.value[0]===`*`&&/@(?:type|satisfies)\b/.test(e.value))}function xr(e){return o(0,e,/[^\n]/g,` `)}var Sr=xr;function Cr(e,t){for(let n of t){let t=W(n),r=G(n);e=e.slice(0,t)+Sr(e.slice(t,r))+e.slice(r)}return e}var wr=new WeakMap;function Tr(e){let t=e[rr];return vr(wr,t,t=>Cr(e.originalText,t))}function Er(e){if(!gr(e)||!e.value.includes(`
13
13
  `))return[];let t=[];for(let n of`*${e.value}*`.split(`
14
- `)){if(n=n.trimStart(),!n.startsWith(`*`))return[];t.push(n)}return t}var Dr=new WeakMap;function Or(e){return vr(Dr,e,Er)}function kr(e){Dr.delete(e)}function Ar(e){return Or(e).length>0}function jr(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let r=e[n];if(t&&G(r)===W(t)&&Ar(r)&&Ar(t)&&(e.splice(n+1,1),r.value+=`*//*`+t.value,r.range=[W(r),G(t)],kr(r)),!_r(r)&&!gr(r))throw TypeError(`Unknown comment type: "${r.type}".`);t=r}}function Mr(e){return typeof e==`object`&&!!e}var Nr=Mr,K=null;function q(e){if(K!==null&&typeof K.property){let e=K;return K=q.prototype=null,e}return K=q.prototype=e??Object.create(null),new q}var Pr=10;for(let e=0;e<=Pr;e++)q();function Fr(e){return q(e)}function Ir(e,t=`type`){Fr(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var Lr=Ir,J=[[`elements`],[`left`,`right`],[`value`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`test`,`consequent`,`alternate`],[`body`,`test`],[`expression`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`object`,`property`],[`properties`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`key`,`value`],[`argument`],[`expressions`],[`id`,`init`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`local`],[`exported`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`id`],[`key`,`value`],[`elementType`],[`id`,`typeParameters`],[`id`,`typeParameters`,`extends`,`body`],[`id`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`name`,`typeAnnotation`],[`types`],[`qualification`,`id`],[`elementTypes`],[`expression`,`typeAnnotation`],[`params`],[`members`],[`objectType`,`indexType`],[`decorators`,`key`,`typeAnnotation`,`value`],[`id`,`typeParameters`,`params`,`returnType`,`body`],[`key`,`typeParameters`,`params`,`returnType`],[`typeParameters`,`params`,`returnType`],[`parameterName`,`typeAnnotation`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`typeParameter`],[`literal`],[`expression`,`typeArguments`],[`decorators`,`key`,`typeAnnotation`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`properties`,`rest`],[`node`]],Rr=Lr({ArrayExpression:J[0],AssignmentExpression:J[1],BinaryExpression:J[1],InterpreterDirective:[],Directive:J[2],DirectiveLiteral:[],BlockStatement:J[3],BreakStatement:J[4],CallExpression:J[5],CatchClause:[`param`,`body`],ConditionalExpression:J[6],ContinueStatement:J[4],DebuggerStatement:[],DoWhileStatement:J[7],EmptyStatement:[],ExpressionStatement:J[8],File:[`program`],ForInStatement:J[9],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:J[10],FunctionExpression:J[10],Identifier:[`typeAnnotation`,`decorators`],IfStatement:J[6],LabeledStatement:[`label`,`body`],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:J[1],MemberExpression:J[11],NewExpression:J[5],Program:J[3],ObjectExpression:J[12],ObjectMethod:J[13],ObjectProperty:J[14],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:J[15],SequenceExpression:J[16],ParenthesizedExpression:J[8],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],ThisExpression:[],ThrowStatement:J[15],TryStatement:[`block`,`handler`,`finalizer`],UnaryExpression:J[15],UpdateExpression:J[15],VariableDeclaration:[`declarations`],VariableDeclarator:J[17],WhileStatement:J[7],WithStatement:[`object`,`body`],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],ClassBody:J[18],ClassExpression:J[19],ClassDeclaration:J[19],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportNamedDeclaration:J[20],ExportSpecifier:[`local`,`exported`],ForOfStatement:J[9],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:J[21],ImportNamespaceSpecifier:J[21],ImportSpecifier:[`imported`,`local`],MetaProperty:[`meta`,`property`],ClassMethod:J[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],SpreadElement:J[15],Super:[],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:[],TemplateLiteral:[`quasis`,`expressions`],YieldExpression:J[15],AwaitExpression:J[15],ImportExpression:[`source`,`options`],BigIntLiteral:[],ExportNamespaceSpecifier:J[22],OptionalMemberExpression:J[11],OptionalCallExpression:J[5],ClassProperty:J[23],ClassPrivateProperty:J[23],ClassPrivateMethod:J[13],PrivateName:J[24],StaticBlock:J[18],ImportAttribute:J[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:J[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:J[27],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareFunction:[`id`,`predicate`],DeclareInterface:J[28],DeclareModule:J[29],DeclareModuleExports:J[30],DeclareTypeAlias:J[31],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareVariable:[`id`,`declarations`],DeclareExportDeclaration:J[20],DeclareExportAllDeclaration:[`source`,`attributes`],DeclaredPredicate:J[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:J[32],GenericTypeAnnotation:J[27],InferredPredicate:[],InterfaceExtends:J[27],InterfaceDeclaration:J[28],InterfaceTypeAnnotation:[`extends`,`body`],IntersectionTypeAnnotation:J[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:J[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeCallProperty:J[2],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:J[15],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],QualifiedTypeIdentifier:J[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:J[35],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeAlias:J[31],TypeAnnotation:J[30],TypeCastExpression:J[36],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:J[37],TypeParameterInstantiation:J[37],UnionTypeAnnotation:J[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:J[29],EnumBooleanBody:J[38],EnumNumberBody:J[38],EnumStringBody:J[38],EnumSymbolBody:J[38],EnumBooleanMember:J[17],EnumNumberMember:J[17],EnumStringMember:J[17],EnumDefaultedMember:J[24],IndexedAccessType:J[39],OptionalIndexedAccessType:J[39],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:[],JSXExpressionContainer:J[8],JSXSpreadChild:J[8],JSXIdentifier:[],JSXMemberExpression:J[11],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXSpreadAttribute:J[15],JSXText:[],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:[`object`,`callee`],ClassAccessorProperty:J[40],Decorator:J[8],DoExpression:J[18],ExportDefaultSpecifier:J[22],ModuleExpression:J[18],TopicReference:[],VoidPattern:[],TSParameterProperty:[`parameter`,`decorators`],TSDeclareFunction:J[41],TSDeclareMethod:J[42],TSQualifiedName:J[1],TSCallSignatureDeclaration:J[43],TSConstructSignatureDeclaration:J[43],TSPropertySignature:[`key`,`typeAnnotation`],TSMethodSignature:J[42],TSIndexSignature:[`parameters`,`typeAnnotation`],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:J[43],TSConstructorType:J[43],TSTypeReference:[`typeName`,`typeArguments`],TSTypePredicate:J[44],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeLiteral:J[38],TSArrayType:J[26],TSTupleType:J[35],TSOptionalType:J[30],TSRestType:J[30],TSNamedTupleMember:[`label`,`elementType`],TSUnionType:J[33],TSIntersectionType:J[33],TSConditionalType:J[45],TSInferType:J[46],TSParenthesizedType:J[30],TSTypeOperator:J[30],TSIndexedAccessType:J[39],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSTemplateLiteralType:[`quasis`,`types`],TSLiteralType:J[47],TSClassImplements:J[48],TSInterfaceHeritage:J[48],TSInterfaceDeclaration:J[28],TSInterfaceBody:J[18],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSInstantiationExpression:J[48],TSAsExpression:J[36],TSSatisfiesExpression:J[36],TSTypeAssertion:J[36],TSEnumBody:J[38],TSEnumDeclaration:J[29],TSEnumMember:[`id`,`initializer`],TSModuleDeclaration:J[29],TSModuleBlock:J[18],TSImportType:[`source`,`options`,`qualifier`,`typeArguments`],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSExternalModuleReference:J[8],TSNonNullExpression:J[8],TSExportAssignment:J[8],TSNamespaceExportDeclaration:J[24],TSTypeAnnotation:J[30],TSTypeParameterInstantiation:J[37],TSTypeParameterDeclaration:J[37],TSTypeParameter:[`name`,`constraint`,`default`],ChainExpression:J[8],Literal:[],MethodDefinition:J[14],PrivateIdentifier:[],Property:J[25],PropertyDefinition:J[23],AccessorProperty:J[40],TSAbstractAccessorProperty:J[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:J[25],TSAbstractPropertyDefinition:J[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:J[8],AsExpression:J[36],BigIntTypeAnnotation:[],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:J[32],ConditionalTypeAnnotation:J[45],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclareEnum:J[29],DeclareHook:J[24],DeclareNamespace:J[29],EnumBigIntBody:J[38],EnumBigIntMember:J[17],EnumBody:J[38],HookDeclaration:J[41],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],InferTypeAnnotation:J[46],KeyofTypeAnnotation:J[15],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:J[24],MatchExpression:J[50],MatchExpressionCase:J[51],MatchIdentifierPattern:J[24],MatchInstanceObjectPattern:J[52],MatchInstancePattern:[`targetConstructor`,`properties`],MatchLiteralPattern:J[47],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:J[52],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:J[15],MatchStatement:J[50],MatchStatementCase:J[51],MatchUnaryPattern:J[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],QualifiedTypeofIdentifier:J[34],RecordDeclaration:[`id`,`typeParameters`,`implements`,`body`],RecordDeclarationBody:J[0],RecordDeclarationImplements:[`id`,`typeArguments`],RecordDeclarationProperty:[`key`,`typeAnnotation`,`defaultValue`],RecordDeclarationStaticProperty:[`key`,`typeAnnotation`,`value`],RecordExpression:[`recordConstructor`,`typeArguments`,`properties`],RecordExpressionProperties:J[12],SatisfiesExpression:J[36],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeOperator:J[30],TypePredicate:J[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:J[16],NGEmptyExpression:[],NGPipeExpression:[`left`,`right`,`arguments`],NGMicrosyntax:J[18],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:J[25],NGRoot:J[53],JsExpressionRoot:J[53],JsonRoot:J[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:J[30],TSJSDocNonNullableType:J[30]});function zr(e,t){if(!Nr(e))return e;if(Array.isArray(e)){for(let n=0;n<e.length;n++)e[n]=zr(e[n],t);return e}if(t.onEnter){let n=t.onEnter(e)??e;if(n!==e)return zr(n,t);e=n}let n=Rr(e);for(let r=0;r<n.length;r++)e[n[r]]=zr(e[n[r]],t);return t.onLeave&&(e=t.onLeave(e)||e),e}var Br=zr;or([`RegExpLiteral`,`BigIntLiteral`,`NumericLiteral`,`StringLiteral`,`DirectiveLiteral`,`Literal`,`JSXText`,`TemplateElement`,`StringLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`]);function Vr(e,t){let{text:n,astType:r}=t,i=r===`oxc-ts`,{comments:a}=e;jr(a);let o=e.type===`File`?e.program:e;o.interpreter&&(a.unshift(o.interpreter),delete o.interpreter),e.hashbang&&(i&&a.unshift(e.hashbang),delete e.hashbang),e.type===`Program`&&(e.range=[0,n.length]);let s;return e=Br(e,{onEnter(t){switch(Wr(t,a,n),t.type){case`ParenthesizedExpression`:{let{expression:e}=t,r=W(t);if(e.type===`TypeCastExpression`)return e.range=[r,G(t)],e;let o=!1;if(!i){if(!s){s=[];for(let e of a)br(e)&&s.push(G(e))}let e=nr(0,s,e=>e<=r);o=e&&n.slice(e,r).trim().length===0}return o?void 0:(e.extra={...e.extra,parenthesized:!0},e)}case`TemplateLiteral`:if(t.expressions.length!==t.quasis.length-1)throw Error(`Malformed template literal.`);break;case`TemplateElement`:(r===`flow`||r===`hermes`||r===`espree`||r===`typescript`||i)&&(t.range=[W(t)+1,G(t)-(t.tail?1:2)]);break;case`TSParenthesizedType`:return t.typeAnnotation;case`TopicReference`:e.extra={...e.extra,__isUsingHackPipeline:!0};break;case`TSUnionType`:case`TSIntersectionType`:if(t.types.length===1)return t.types[0];break;case`TupleTypeAnnotation`:t.types&&!t.elementTypes&&(t.elementTypes=t.types);break;case`ImportDeclaration`:r===`hermes`&&t.assertions&&!t.attributes&&(t.attributes=t.assertions,delete t.assertions)}},onLeave(e){if(e.type===`LogicalExpression`&&Hr(e))return Ur(e)}}),e}function Hr(e){return e.type===`LogicalExpression`&&e.right.type===`LogicalExpression`&&e.operator===e.right.operator}function Ur(e){return Hr(e)?Ur({type:`LogicalExpression`,operator:e.operator,left:Ur({type:`LogicalExpression`,operator:e.operator,left:e.left,right:e.right.left,range:[W(e.left),G(e.right.left)]}),right:e.right.right,range:[W(e),G(e)]}):e}function Wr(e,t,n){if(!hr(e))return;let r=sr(e);if(n[r-1]!==`;`)return;let i=Tr({[rr]:t,originalText:n});--r;let a=i.slice(W(e),r),o=a.trimEnd();e.__contentEnd=r-(a.length-o.length)}var Gr=Vr;function Kr(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var qr=Kr,Jr=`Unexpected parseExpression() input: `;function Yr(e){let{message:t,loc:n,reasonCode:r}=e;if(!n)return e;let{line:i,column:a}=n,o=e;(r===`MissingPlugin`||r===`MissingOneOfPlugins`)&&(t=`Unexpected token.`,o=void 0);let s=` (${i}:${a})`;return t.endsWith(s)&&(t=t.slice(0,-s.length)),t.startsWith(Jr)&&(t=t.slice(Jr.length)),qr(t,{loc:{start:{line:i,column:a+1}},cause:o})}var Xr=Yr,Zr=/\*\/$/,Qr=/^\/\*\*?/,$r=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,ei=/(^|\s+)\/\/([^\n\r]*)/g,ti=/^(\r?\n)+/,ni=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,ri=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,ii=/(\r?\n|^) *\* ?/g,ai=[];function oi(e){let t=e.match($r);return t?t[0].trimStart():``}function si(e){e=o(0,e.replace(Qr,``).replace(Zr,``),ii,`$1`);let t=``;for(;t!==e;)t=e,e=o(0,e,ni,`
14
+ `)){if(n=n.trimStart(),!n.startsWith(`*`))return[];t.push(n)}return t}var Dr=new WeakMap;function Or(e){return vr(Dr,e,Er)}function kr(e){Dr.delete(e)}function Ar(e){return Or(e).length>0}function jr(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let r=e[n];if(t&&G(r)===W(t)&&Ar(r)&&Ar(t)&&(e.splice(n+1,1),r.value+=`*//*`+t.value,r.range=[W(r),G(t)],kr(r)),!_r(r)&&!gr(r))throw TypeError(`Unknown comment type: "${r.type}".`);t=r}}function Mr(e){return typeof e==`object`&&!!e}var Nr=Mr,K=null;function q(e){if(K!==null&&typeof K.property){let e=K;return K=q.prototype=null,e}return K=q.prototype=e??Object.create(null),new q}var Pr=10;for(let e=0;e<=Pr;e++)q();function Fr(e){return q(e)}function Ir(e,t=`type`){Fr(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var Lr=Ir,J=[[`elements`],[`left`,`right`],[`value`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`test`,`consequent`,`alternate`],[`body`,`test`],[`expression`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`object`,`property`],[`properties`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`key`,`value`],[`argument`],[`expressions`],[`id`,`init`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`local`],[`exported`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`id`],[`key`,`value`],[`elementType`],[`id`,`typeParameters`],[`id`,`typeParameters`,`extends`,`body`],[`id`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`name`,`typeAnnotation`],[`types`],[`qualification`,`id`],[`elementTypes`],[`expression`,`typeAnnotation`],[`params`],[`members`],[`objectType`,`indexType`],[`decorators`,`key`,`typeAnnotation`,`value`],[`id`,`typeParameters`,`params`,`returnType`,`body`],[`key`,`typeParameters`,`params`,`returnType`],[`typeParameters`,`params`,`returnType`],[`parameterName`,`typeAnnotation`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`typeParameter`],[`literal`],[`expression`,`typeArguments`],[`decorators`,`key`,`typeAnnotation`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`properties`,`rest`],[`node`]],Rr=Lr({ArrayExpression:J[0],AssignmentExpression:J[1],BinaryExpression:J[1],InterpreterDirective:[],Directive:J[2],DirectiveLiteral:[],BlockStatement:J[3],BreakStatement:J[4],CallExpression:J[5],CatchClause:[`param`,`body`],ConditionalExpression:J[6],ContinueStatement:J[4],DebuggerStatement:[],DoWhileStatement:J[7],EmptyStatement:[],ExpressionStatement:J[8],File:[`program`],ForInStatement:J[9],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:J[10],FunctionExpression:J[10],Identifier:[`typeAnnotation`,`decorators`],IfStatement:J[6],LabeledStatement:[`label`,`body`],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:J[1],MemberExpression:J[11],NewExpression:J[5],Program:J[3],ObjectExpression:J[12],ObjectMethod:J[13],ObjectProperty:J[14],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:J[15],SequenceExpression:J[16],ParenthesizedExpression:J[8],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],ThisExpression:[],ThrowStatement:J[15],TryStatement:[`block`,`handler`,`finalizer`],UnaryExpression:J[15],UpdateExpression:J[15],VariableDeclaration:[`declarations`],VariableDeclarator:J[17],WhileStatement:J[7],WithStatement:[`object`,`body`],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],ClassBody:J[18],ClassExpression:J[19],ClassDeclaration:J[19],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportNamedDeclaration:J[20],ExportSpecifier:[`local`,`exported`],ForOfStatement:J[9],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:J[21],ImportNamespaceSpecifier:J[21],ImportSpecifier:[`imported`,`local`],MetaProperty:[`meta`,`property`],ClassMethod:J[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],SpreadElement:J[15],Super:[],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:[],TemplateLiteral:[`quasis`,`expressions`],YieldExpression:J[15],AwaitExpression:J[15],ImportExpression:[`source`,`options`],BigIntLiteral:[],ExportNamespaceSpecifier:J[22],OptionalMemberExpression:J[11],OptionalCallExpression:J[5],ClassProperty:J[23],ClassPrivateProperty:J[23],ClassPrivateMethod:J[13],PrivateName:J[24],StaticBlock:J[18],ImportAttribute:J[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:J[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:J[27],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareFunction:[`id`,`predicate`],DeclareInterface:J[28],DeclareModule:J[29],DeclareModuleExports:J[30],DeclareTypeAlias:J[31],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareVariable:[`id`,`declarations`],DeclareExportDeclaration:J[20],DeclareExportAllDeclaration:[`source`,`attributes`],DeclaredPredicate:J[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:J[32],GenericTypeAnnotation:J[27],InferredPredicate:[],InterfaceExtends:J[27],InterfaceDeclaration:J[28],InterfaceTypeAnnotation:[`extends`,`body`],IntersectionTypeAnnotation:J[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:J[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeCallProperty:J[2],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:J[15],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],QualifiedTypeIdentifier:J[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:J[35],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeAlias:J[31],TypeAnnotation:J[30],TypeCastExpression:J[36],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:J[37],TypeParameterInstantiation:J[37],UnionTypeAnnotation:J[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:J[29],EnumBooleanBody:J[38],EnumNumberBody:J[38],EnumStringBody:J[38],EnumSymbolBody:J[38],EnumBooleanMember:J[17],EnumNumberMember:J[17],EnumStringMember:J[17],EnumDefaultedMember:J[24],IndexedAccessType:J[39],OptionalIndexedAccessType:J[39],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:[],JSXExpressionContainer:J[8],JSXSpreadChild:J[8],JSXIdentifier:[],JSXMemberExpression:J[11],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXSpreadAttribute:J[15],JSXText:[],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:[`object`,`callee`],ClassAccessorProperty:J[40],Decorator:J[8],DoExpression:J[18],ExportDefaultSpecifier:J[22],ModuleExpression:J[18],TopicReference:[],VoidPattern:[],TSParameterProperty:[`parameter`,`decorators`],TSDeclareFunction:J[41],TSDeclareMethod:J[42],TSQualifiedName:J[1],TSCallSignatureDeclaration:J[43],TSConstructSignatureDeclaration:J[43],TSPropertySignature:[`key`,`typeAnnotation`],TSMethodSignature:J[42],TSIndexSignature:[`parameters`,`typeAnnotation`],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:J[43],TSConstructorType:J[43],TSTypeReference:[`typeName`,`typeArguments`],TSTypePredicate:J[44],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeLiteral:J[38],TSArrayType:J[26],TSTupleType:J[35],TSOptionalType:J[30],TSRestType:J[30],TSNamedTupleMember:[`label`,`elementType`],TSUnionType:J[33],TSIntersectionType:J[33],TSConditionalType:J[45],TSInferType:J[46],TSParenthesizedType:J[30],TSTypeOperator:J[30],TSIndexedAccessType:J[39],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSTemplateLiteralType:[`quasis`,`types`],TSLiteralType:J[47],TSClassImplements:J[48],TSInterfaceHeritage:J[48],TSInterfaceDeclaration:J[28],TSInterfaceBody:J[18],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSInstantiationExpression:J[48],TSAsExpression:J[36],TSSatisfiesExpression:J[36],TSTypeAssertion:J[36],TSEnumBody:J[38],TSEnumDeclaration:J[29],TSEnumMember:[`id`,`initializer`],TSModuleDeclaration:J[29],TSModuleBlock:J[18],TSImportType:[`source`,`options`,`qualifier`,`typeArguments`],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSExternalModuleReference:J[8],TSNonNullExpression:J[8],TSExportAssignment:J[8],TSNamespaceExportDeclaration:J[24],TSTypeAnnotation:J[30],TSTypeParameterInstantiation:J[37],TSTypeParameterDeclaration:J[37],TSTypeParameter:[`name`,`constraint`,`default`],ChainExpression:J[8],Literal:[],MethodDefinition:J[14],PrivateIdentifier:[],Property:J[25],PropertyDefinition:J[23],AccessorProperty:J[40],TSAbstractAccessorProperty:J[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:J[25],TSAbstractPropertyDefinition:J[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:J[8],AsExpression:J[36],BigIntTypeAnnotation:[],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:J[32],ConditionalTypeAnnotation:J[45],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclareEnum:J[29],DeclareHook:J[24],DeclareNamespace:J[29],EnumBigIntBody:J[38],EnumBigIntMember:J[17],EnumBody:J[38],HookDeclaration:J[41],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],InferTypeAnnotation:J[46],KeyofTypeAnnotation:J[15],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:J[24],MatchExpression:J[50],MatchExpressionCase:J[51],MatchIdentifierPattern:J[24],MatchInstanceObjectPattern:J[52],MatchInstancePattern:[`targetConstructor`,`properties`],MatchLiteralPattern:J[47],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:J[52],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:J[15],MatchStatement:J[50],MatchStatementCase:J[51],MatchUnaryPattern:J[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],QualifiedTypeofIdentifier:J[34],RecordDeclaration:[`id`,`typeParameters`,`implements`,`body`],RecordDeclarationBody:J[0],RecordDeclarationImplements:[`id`,`typeArguments`],RecordDeclarationProperty:[`key`,`typeAnnotation`,`defaultValue`],RecordDeclarationStaticProperty:[`key`,`typeAnnotation`,`value`],RecordExpression:[`recordConstructor`,`typeArguments`,`properties`],RecordExpressionProperties:J[12],SatisfiesExpression:J[36],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeOperator:J[30],TypePredicate:J[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:J[16],NGEmptyExpression:[],NGPipeExpression:[`left`,`right`,`arguments`],NGMicrosyntax:J[18],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:J[25],NGRoot:J[53],JsExpressionRoot:J[53],JsonRoot:J[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:J[30],TSJSDocNonNullableType:J[30]});function zr(e,t){if(!Nr(e))return e;if(Array.isArray(e)){for(let n=0;n<e.length;n++)e[n]=zr(e[n],t);return e}if(t.onEnter){let n=t.onEnter(e)??e;if(n!==e)return zr(n,t);e=n}let n=Rr(e);for(let r=0;r<n.length;r++)e[n[r]]=zr(e[n[r]],t);return t.onLeave&&(e=t.onLeave(e)||e),e}var Br=zr;or([`RegExpLiteral`,`BigIntLiteral`,`NumericLiteral`,`StringLiteral`,`DirectiveLiteral`,`Literal`,`JSXText`,`TemplateElement`,`StringLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`]);function Vr(e,t){let{text:n,astType:r}=t,{comments:i}=e;jr(i);let a=e.type===`File`?e.program:e;a.interpreter&&(i.unshift(a.interpreter),delete a.interpreter),e.hashbang&&((r===`oxc-ts`||r===`yuku-js`||r===`yuku-ts`)&&i.unshift(e.hashbang),delete e.hashbang),e.type===`Program`&&(e.range=[0,n.length]);let o;return e=Br(e,{onEnter(t){switch(Wr(t,i,n),t.type){case`ParenthesizedExpression`:{let{expression:e}=t,a=W(t);if(e.type===`TypeCastExpression`)return e.range=[a,G(t)],e;let s=!1;if(r!==`oxc-ts`){if(!o){o=[];for(let e of i)br(e)&&o.push(G(e))}let e=nr(0,o,e=>e<=a);s=e&&n.slice(e,a).trim().length===0}return s?void 0:(e.extra={...e.extra,parenthesized:!0},e)}case`TemplateLiteral`:if(t.expressions.length!==t.quasis.length-1)throw Error(`Malformed template literal.`);break;case`TemplateElement`:(r===`flow`||r===`hermes`||r===`espree`||r===`typescript`||r===`oxc-ts`||r===`yuku-ts`)&&(t.range=[W(t)+1,G(t)-(t.tail?1:2)]);break;case`TSParenthesizedType`:return t.typeAnnotation;case`TopicReference`:e.extra={...e.extra,__isUsingHackPipeline:!0};break;case`TSUnionType`:case`TSIntersectionType`:if(t.types.length===1)return t.types[0];break;case`TupleTypeAnnotation`:t.types&&!t.elementTypes&&(t.elementTypes=t.types);break;case`ImportDeclaration`:r===`hermes`&&t.assertions&&!t.attributes&&(t.attributes=t.assertions,delete t.assertions)}},onLeave(e){if(e.type===`LogicalExpression`&&Hr(e))return Ur(e)}}),e}function Hr(e){return e.type===`LogicalExpression`&&e.right.type===`LogicalExpression`&&e.operator===e.right.operator}function Ur(e){return Hr(e)?Ur({type:`LogicalExpression`,operator:e.operator,left:Ur({type:`LogicalExpression`,operator:e.operator,left:e.left,right:e.right.left,range:[W(e.left),G(e.right.left)]}),right:e.right.right,range:[W(e),G(e)]}):e}function Wr(e,t,n){if(!hr(e))return;let r=sr(e);if(n[r-1]!==`;`)return;let i=Tr({[rr]:t,originalText:n});--r;let a=i.slice(W(e),r),o=a.trimEnd();e.__contentEnd=r-(a.length-o.length)}var Gr=Vr;function Kr(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var qr=Kr,Jr=`Unexpected parseExpression() input: `;function Yr(e){let{message:t,loc:n,reasonCode:r}=e;if(!n)return e;let{line:i,column:a}=n,o=e;(r===`MissingPlugin`||r===`MissingOneOfPlugins`)&&(t=`Unexpected token.`,o=void 0);let s=` (${i}:${a})`;return t.endsWith(s)&&(t=t.slice(0,-s.length)),t.startsWith(Jr)&&(t=t.slice(Jr.length)),qr(t,{loc:{start:{line:i,column:a+1}},cause:o})}var Xr=Yr,Zr=/\*\/$/,Qr=/^\/\*\*?/,$r=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,ei=/(^|\s+)\/\/([^\n\r]*)/g,ti=/^(\r?\n)+/,ni=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,ri=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,ii=/(\r?\n|^) *\* ?/g,ai=[];function oi(e){let t=e.match($r);return t?t[0].trimStart():``}function si(e){e=o(0,e.replace(Qr,``).replace(Zr,``),ii,`$1`);let t=``;for(;t!==e;)t=e,e=o(0,e,ni,`
15
15
  $1 $2
16
16
  `);e=e.replace(ti,``).trimEnd();let n=Object.create(null),r=o(0,e,ri,``).replace(ti,``).trimEnd(),i;for(;i=ri.exec(e);){let e=o(0,i[2],ei,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...ai,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}var ci=[`noformat`,`noprettier`],li=[`format`,`prettier`];function ui(e){let t=er(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=si(oi(e));return{shebang:t,text:e,pragmas:n,comments:r}}function di(e){let{pragmas:t}=ui(e);return li.some(e=>s(t,e))}function fi(e){let{pragmas:t}=ui(e);return ci.some(e=>s(t,e))}function pi(e){return e=typeof e==`function`?{parse:e}:e,{astFormat:`estree`,hasPragma:di,hasIgnorePragma:fi,locStart:W,locEnd:G,...e}}var Y=pi,mi=`module`,hi=`commonjs`;function gi(e){if(typeof e==`string`){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return mi;if(/\.(?:cjs|cts)$/i.test(e))return hi}}function _i(e){let{type:t=`JsExpressionRoot`,expression:n,comments:r=n?.comments??[],text:i,rootMarker:a}=e,o={type:t,comments:r,range:[0,i.length],rootMarker:a};return n&&(delete n.comments,o.node=n),o}var vi=_i,X=e=>Y(Ti(e)),yi={sourceType:mi,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:[`doExpressions`,`exportDefaultFrom`,`functionBind`,`functionSent`,`throwExpressions`,[`partialApplication`,{version:`2018-07`}],`decorators`,`moduleBlocks`,`asyncDoExpressions`,`destructuringPrivate`,`decoratorAutoAccessors`,`sourcePhaseImports`,`deferredImportEvaluation`,[`optionalChainingAssign`,{version:`2023-07`}],[`discardBinding`,{syntaxType:`void`}]],tokens:!1,ranges:!1},bi=`v8intrinsic`,xi=[[`pipelineOperator`,{proposal:`hack`,topicToken:`%`}],[`pipelineOperator`,{proposal:`fsharp`}]],Z=(e,t=yi)=>({...t,plugins:[...t.plugins,...e]}),Si=/@(?:no)?flow\b/;function Ci(e,t){if(t?.endsWith(`.js.flow`))return!0;let n=er(e);n&&(e=e.slice(n.length));let r=Zn(e,0);return r!==!1&&(e=e.slice(0,r)),Si.test(e)}function wi(e,t,n){let r=e(t,n),i=r.errors.find(e=>!Ei.has(e.reasonCode));if(i)throw i;return r}function Ti({isExpression:e=!1,optionsCombinations:t}){return(n,r={})=>{let{filepath:i}=r;if(typeof i!=`string`&&(i=void 0),(r.parser===`babel`||r.parser===`__babel_estree`)&&Ci(n,i))return r.parser=`babel-flow`,Mi.parse(n,r);let a=t,o=r.__babelSourceType??gi(i);o&&o!==mi&&(a=a.map(e=>({...e,sourceType:o,...o===hi?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let s=/%[A-Z]/.test(n);n.includes(`|>`)?a=(s?[...xi,bi]:xi).flatMap(e=>a.map(t=>Z([e],t))):s&&(a=a.map(e=>Z([bi],e)));let c=e?In:Fn,l;try{l=Qn(a.map(e=>()=>wi(c,n,e)))}catch({errors:[e]}){throw Xr(e)}return e&&(l=vi({expression:l,text:n,rootMarker:r.rootMarker})),Gr(l,{text:n})}}var Ei=new Set([`StrictNumericEscape`,`StrictWith`,`StrictOctalLiteral`,`StrictDelete`,`StrictEvalArguments`,`StrictEvalArgumentsBinding`,`StrictFunction`,`ForInOfLoopInitializer`,`ParamDupe`,`RestTrailingComma`,`UnsupportedParameterDecorator`,`UnterminatedJsxContent`,`UnexpectedReservedWord`,`ModuleAttributesWithDuplicateKeys`,`InvalidEscapeSequenceTemplate`,`NonAbstractClassHasAbstractMethod`,`PatternIsOptional`,`VarRedeclaration`,`InvalidPrivateFieldResolution`,`DuplicateExport`,`DeclarationMissingInitializer`,`DecoratorAbstractMethod`]),Di=[Z([`jsx`])],Oi=X({optionsCombinations:Di}),ki=X({optionsCombinations:[Z([`jsx`,`typescript`]),Z([`typescript`])]}),Ai=X({isExpression:!0,optionsCombinations:[Z([`jsx`])]}),ji=X({isExpression:!0,optionsCombinations:[Z([`typescript`])]}),Mi=X({optionsCombinations:[Z([`jsx`,[`flow`,{all:!0}],`flowComments`])]}),Ni=X({optionsCombinations:Di.map(e=>Z([`estree`],e))}),Pi={};t(Pi,{json:()=>Bi,"json-stringify":()=>Ui,json5:()=>Vi,jsonc:()=>Hi});function Fi(e){return Array.isArray(e)&&e.length>0}var Ii=Fi,Li={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function Ri(e){let t=Fn(e,Li),{program:n}=t;if(n.body.length===0&&n.directives.length===0&&!n.interpreter)return{comments:t.comments}}function zi(e,t={}){let{allowComments:n=!0,allowEmpty:r=!1}=t,i,a;try{i=In(e,Li),a=i.comments}catch(t){if(r&&t.code===`BABEL_PARSER_SYNTAX_ERROR`&&t.reasonCode===`ParseExpressionEmptyInput`)try{({comments:a}=Ri(e))}catch{}if(!a)throw Xr(t)}if(!n&&Ii(a))throw Q(a[0],`Comment`);return(!r||i)&&$(i),i=vi({type:`JsonRoot`,expression:i,comments:a,text:e}),i}function Q(e,t){let[n,r]=[e.loc.start,e.loc.end].map(({line:e,column:t})=>({line:e,column:t+1}));return qr(`${t} is not allowed in JSON.`,{loc:{start:n,end:r}})}function $(e){switch(e.type){case`ArrayExpression`:for(let t of e.elements)t!==null&&$(t);return;case`ObjectExpression`:for(let t of e.properties)$(t);return;case`ObjectProperty`:if(e.computed)throw Q(e.key,`Computed key`);if(e.shorthand)throw Q(e.key,`Shorthand property`);e.key.type!==`Identifier`&&$(e.key),$(e.value);return;case`UnaryExpression`:{let{operator:t,argument:n}=e;if(t!==`+`&&t!==`-`)throw Q(e,`Operator '${e.operator}'`);if(n.type===`NumericLiteral`||n.type===`Identifier`&&(n.name===`Infinity`||n.name===`NaN`))return;throw Q(n,`Operator '${t}' before '${n.type}'`)}case`Identifier`:if(e.name!==`Infinity`&&e.name!==`NaN`&&e.name!==`undefined`)throw Q(e,`Identifier '${e.name}'`);return;case`TemplateLiteral`:if(Ii(e.expressions))throw Q(e.expressions[0],`'TemplateLiteral' with expression`);for(let t of e.quasis)$(t);return;case`NullLiteral`:case`BooleanLiteral`:case`NumericLiteral`:case`StringLiteral`:case`TemplateElement`:return;default:throw Q(e,`'${e.type}'`)}}var Bi=Y({parse:e=>zi(e),hasPragma:()=>!0,hasIgnorePragma:()=>!1}),Vi=Y(e=>zi(e)),Hi=Y(e=>zi(e,{allowEmpty:!0})),Ui=Y({parse:e=>zi(e,{allowComments:!1}),astFormat:`estree-json`}),Wi={...r,...Pi};export{n as default,Wi as parsers};