prettier 4.0.0-alpha.4 → 4.0.0-alpha.5

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/plugins/flow.js CHANGED
@@ -18,4 +18,4 @@
18
18
  `;p0=p0.replace(cC0,"").replace(fC0,"").replace(vC0,"$1");let tr="";for(;tr!==p0;)tr=p0,p0=p0.replace(oC0,`${wx}$1 $2${wx}`);p0=p0.replace(xZ,"").trimRight();let gr=Object.create(null),nr=p0.replace(rZ,"").replace(xZ,"").trimRight(),Xr;for(;Xr=rZ.exec(p0);){let ir=Xr[2].replace(sC0,"");typeof gr[Xr[1]]=="string"||Array.isArray(gr[Xr[1]])?gr[Xr[1]]=nZ.concat(gr[Xr[1]],ir):gr[Xr[1]]=ir}return{comments:nr,pragmas:gr}}function dC0({comments:p0="",pragmas:wx={}}){let tr=`
19
19
  `,gr="/**",nr=" *",Xr=" */",ir=Object.keys(wx),tn=ir.flatMap(Nt=>eZ(Nt,wx[Nt])).map(Nt=>`${nr} ${Nt}${tr}`).join("");if(!p0){if(ir.length===0)return"";if(ir.length===1&&!Array.isArray(wx[ir[0]])){let Nt=wx[ir[0]];return`${gr} ${eZ(ir[0],Nt)[0]}${Xr}`}}let X4=p0.split(tr).map(Nt=>`${nr} ${Nt}`).join(tr)+tr;return gr+tr+(p0?X4:"")+(p0&&ir.length?nr+tr:"")+tn+Xr}function eZ(p0,wx){return nZ.concat(wx).map(tr=>`@${p0} ${tr}`.trim())}});var MC0={};FK(MC0,{parsers:()=>JM});var JM={};FK(JM,{flow:()=>LC0});var kZ=qK(GK(),1);function iC0(p0,wx){let tr=new SyntaxError(p0+" ("+wx.loc.start.line+":"+wx.loc.start.column+")");return Object.assign(tr,wx)}var bK=iC0;var X3=qK(iZ(),1);function yC0(p0){if(!p0.startsWith("#!"))return"";let wx=p0.indexOf(`
20
20
  `);return wx===-1?p0:p0.slice(0,wx)}var fZ=yC0;function mC0(p0){let wx=fZ(p0);wx&&(p0=p0.slice(wx.length+1));let tr=(0,X3.extract)(p0),{pragmas:gr,comments:nr}=(0,X3.parseWithComments)(tr);return{shebang:wx,text:p0,pragmas:gr,comments:nr}}function cZ(p0){let{pragmas:wx}=mC0(p0);return Object.prototype.hasOwnProperty.call(wx,"prettier")||Object.prototype.hasOwnProperty.call(wx,"format")}function kC0(p0){return Array.isArray(p0)&&p0.length>0}var ym=kC0;function Pt(p0){var gr;let wx=p0.range?p0.range[0]:p0.start,tr=((gr=p0.declaration)==null?void 0:gr.decorators)??p0.decorators;return ym(tr)?Math.min(Pt(tr[0]),wx):wx}function As(p0){return p0.range?p0.range[1]:p0.end}function hC0(p0){return p0=typeof p0=="function"?{parse:p0}:p0,{astFormat:"estree",hasPragma:cZ,locStart:Pt,locEnd:As,...p0}}var sZ=hC0;function _C0(p0){return p0.charAt(0)==="#"&&p0.charAt(1)==="!"?"//"+p0.slice(2):p0}var oZ=_C0;var wC0=(p0,wx,tr)=>{if(!(p0&&wx==null))return Array.isArray(wx)||typeof wx=="string"?wx[tr<0?wx.length+tr:tr]:wx.at(tr)},jM=wC0;function TC0(p0){return p0=new Set(p0),wx=>p0.has(wx==null?void 0:wx.type)}var vZ=TC0;var SC0=vZ(["Block","CommentBlock","MultiLine"]),U4=SC0;function EC0(p0){return U4(p0)&&p0.value[0]==="*"&&/@(?:type|satisfies)\b/.test(p0.value)}var aZ=EC0;function gC0(p0){let wx=`*${p0.value}*`.split(`
21
- `);return wx.length>1&&wx.every(tr=>tr.trimStart()[0]==="*")}var UM=gC0;var B4=null;function Y4(p0){if(B4!==null&&typeof B4.property){let wx=B4;return B4=Y4.prototype=null,wx}return B4=Y4.prototype=p0??Object.create(null),new Y4}var AC0=10;for(let p0=0;p0<=AC0;p0++)Y4();function BM(p0){return Y4(p0)}function PC0(p0,wx="type"){BM(p0);function tr(gr){let nr=gr[wx],Xr=p0[nr];if(!Array.isArray(Xr))throw Object.assign(new Error(`Missing visitor keys for '${nr}'.`),{node:gr});return Xr}return tr}var lZ=PC0;var pZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var NC0=lZ(pZ),dZ=NC0;function YM(p0,wx){if(!(p0!==null&&typeof p0=="object"))return p0;if(Array.isArray(p0)){for(let gr=0;gr<p0.length;gr++)p0[gr]=YM(p0[gr],wx);return p0}let tr=dZ(p0);for(let gr=0;gr<tr.length;gr++)p0[tr[gr]]=YM(p0[tr[gr]],wx);return wx(p0)||p0}var mm=YM;function CC0(p0,wx){let{parser:tr,text:gr}=wx;if(p0.type==="File"&&p0.program.interpreter){let{program:{interpreter:nr},comments:Xr}=p0;delete p0.program.interpreter,Xr.unshift(nr)}if(tr==="babel"){let nr=new Set;p0=mm(p0,Xr=>{var ir;(ir=Xr.leadingComments)!=null&&ir.some(aZ)&&nr.add(Pt(Xr))}),p0=mm(p0,Xr=>{if(Xr.type==="ParenthesizedExpression"){let{expression:ir}=Xr;if(ir.type==="TypeCastExpression")return ir.range=[...Xr.range],ir;let tn=Pt(Xr);if(!nr.has(tn))return ir.extra={...ir.extra,parenthesized:!0},ir}})}if(p0=mm(p0,nr=>{var Xr;switch(nr.type){case"LogicalExpression":if(yZ(nr))return XM(nr);break;case"VariableDeclaration":{let ir=jM(!1,nr.declarations,-1);ir!=null&&ir.init&&gr[As(ir)]!==";"&&(nr.range=[Pt(nr),As(ir)]);break}case"TSParenthesizedType":return nr.typeAnnotation;case"TSTypeParameter":if(typeof nr.name=="string"){let ir=Pt(nr);nr.name={type:"Identifier",name:nr.name,range:[ir,ir+nr.name.length]}}break;case"TopicReference":p0.extra={...p0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(tr==="meriyah"&&((Xr=nr.exported)==null?void 0:Xr.type)==="Identifier"){let{exported:ir}=nr,tn=gr.slice(Pt(ir),As(ir));(tn.startsWith('"')||tn.startsWith("'"))&&(nr.exported={...nr.exported,type:"Literal",value:nr.exported.name,raw:tn})}break;case"TSUnionType":case"TSIntersectionType":if(nr.types.length===1)return nr.types[0];break}}),ym(p0.comments)){let nr=jM(!1,p0.comments,-1);for(let Xr=p0.comments.length-2;Xr>=0;Xr--){let ir=p0.comments[Xr];As(ir)===Pt(nr)&&U4(ir)&&U4(nr)&&UM(ir)&&UM(nr)&&(p0.comments.splice(Xr+1,1),ir.value+="*//*"+nr.value,ir.range=[Pt(ir),As(nr)]),nr=ir}}return p0.type==="Program"&&(p0.range=[0,gr.length]),p0}function yZ(p0){return p0.type==="LogicalExpression"&&p0.right.type==="LogicalExpression"&&p0.operator===p0.right.operator}function XM(p0){return yZ(p0)?XM({type:"LogicalExpression",operator:p0.operator,left:XM({type:"LogicalExpression",operator:p0.operator,left:p0.left,right:p0.right.left,range:[Pt(p0.left),As(p0.right.left)]}),right:p0.right.right,range:[Pt(p0),As(p0)]}):p0}var mZ=CC0;var RC0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function OC0(p0){let{message:wx,loc:{start:tr,end:gr}}=p0;return bK(wx,{loc:{start:{line:tr.line,column:tr.column+1},end:{line:gr.line,column:gr.column+1}},cause:p0})}function IC0(p0){let wx=kZ.default.parse(oZ(p0),RC0),[tr]=wx.errors;if(tr)throw OC0(tr);return mZ(wx,{text:p0})}var LC0=sZ(IC0);return uC0(MC0);});
21
+ `);return wx.length>1&&wx.every(tr=>tr.trimStart()[0]==="*")}var UM=gC0;var B4=null;function Y4(p0){if(B4!==null&&typeof B4.property){let wx=B4;return B4=Y4.prototype=null,wx}return B4=Y4.prototype=p0??Object.create(null),new Y4}var AC0=10;for(let p0=0;p0<=AC0;p0++)Y4();function BM(p0){return Y4(p0)}function PC0(p0,wx="type"){BM(p0);function tr(gr){let nr=gr[wx],Xr=p0[nr];if(!Array.isArray(Xr))throw Object.assign(new Error(`Missing visitor keys for '${nr}'.`),{node:gr});return Xr}return tr}var lZ=PC0;var pZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var NC0=lZ(pZ),dZ=NC0;function YM(p0,wx){if(!(p0!==null&&typeof p0=="object"))return p0;if(Array.isArray(p0)){for(let gr=0;gr<p0.length;gr++)p0[gr]=YM(p0[gr],wx);return p0}let tr=dZ(p0);for(let gr=0;gr<tr.length;gr++)p0[tr[gr]]=YM(p0[tr[gr]],wx);return wx(p0)||p0}var mm=YM;function CC0(p0,wx){let{parser:tr,text:gr}=wx;if(p0.type==="File"&&p0.program.interpreter){let{program:{interpreter:nr},comments:Xr}=p0;delete p0.program.interpreter,Xr.unshift(nr)}if(tr==="babel"){let nr=new Set;p0=mm(p0,Xr=>{var ir;(ir=Xr.leadingComments)!=null&&ir.some(aZ)&&nr.add(Pt(Xr))}),p0=mm(p0,Xr=>{if(Xr.type==="ParenthesizedExpression"){let{expression:ir}=Xr;if(ir.type==="TypeCastExpression")return ir.range=[...Xr.range],ir;let tn=Pt(Xr);if(!nr.has(tn))return ir.extra={...ir.extra,parenthesized:!0},ir}})}if(p0=mm(p0,nr=>{var Xr;switch(nr.type){case"LogicalExpression":if(yZ(nr))return XM(nr);break;case"VariableDeclaration":{let ir=jM(!1,nr.declarations,-1);ir!=null&&ir.init&&gr[As(ir)]!==";"&&(nr.range=[Pt(nr),As(ir)]);break}case"TSParenthesizedType":return nr.typeAnnotation;case"TSTypeParameter":if(typeof nr.name=="string"){let ir=Pt(nr);nr.name={type:"Identifier",name:nr.name,range:[ir,ir+nr.name.length]}}break;case"TopicReference":p0.extra={...p0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(tr==="meriyah"&&((Xr=nr.exported)==null?void 0:Xr.type)==="Identifier"){let{exported:ir}=nr,tn=gr.slice(Pt(ir),As(ir));(tn.startsWith('"')||tn.startsWith("'"))&&(nr.exported={...nr.exported,type:"Literal",value:nr.exported.name,raw:tn})}break;case"TSUnionType":case"TSIntersectionType":if(nr.types.length===1)return nr.types[0];break}}),ym(p0.comments)){let nr=jM(!1,p0.comments,-1);for(let Xr=p0.comments.length-2;Xr>=0;Xr--){let ir=p0.comments[Xr];As(ir)===Pt(nr)&&U4(ir)&&U4(nr)&&UM(ir)&&UM(nr)&&(p0.comments.splice(Xr+1,1),ir.value+="*//*"+nr.value,ir.range=[Pt(ir),As(nr)]),nr=ir}}return p0.type==="Program"&&(p0.range=[0,gr.length]),p0}function yZ(p0){return p0.type==="LogicalExpression"&&p0.right.type==="LogicalExpression"&&p0.operator===p0.right.operator}function XM(p0){return yZ(p0)?XM({type:"LogicalExpression",operator:p0.operator,left:XM({type:"LogicalExpression",operator:p0.operator,left:p0.left,right:p0.right.left,range:[Pt(p0.left),As(p0.right.left)]}),right:p0.right.right,range:[Pt(p0),As(p0)]}):p0}var mZ=CC0;var RC0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function OC0(p0){let{message:wx,loc:{start:tr,end:gr}}=p0;return bK(wx,{loc:{start:{line:tr.line,column:tr.column+1},end:{line:gr.line,column:gr.column+1}},cause:p0})}function IC0(p0){let wx=kZ.default.parse(oZ(p0),RC0),[tr]=wx.errors;if(tr)throw OC0(tr);return mZ(wx,{text:p0})}var LC0=sZ(IC0);return uC0(MC0);});
package/plugins/flow.mjs CHANGED
@@ -18,4 +18,4 @@ var xC0=Object.create;var MM=Object.defineProperty;var rC0=Object.getOwnProperty
18
18
  `;p0=p0.replace(cC0,"").replace(fC0,"").replace(vC0,"$1");let tr="";for(;tr!==p0;)tr=p0,p0=p0.replace(oC0,`${wx}$1 $2${wx}`);p0=p0.replace(xZ,"").trimRight();let gr=Object.create(null),nr=p0.replace(rZ,"").replace(xZ,"").trimRight(),Xr;for(;Xr=rZ.exec(p0);){let ir=Xr[2].replace(sC0,"");typeof gr[Xr[1]]=="string"||Array.isArray(gr[Xr[1]])?gr[Xr[1]]=nZ.concat(gr[Xr[1]],ir):gr[Xr[1]]=ir}return{comments:nr,pragmas:gr}}function dC0({comments:p0="",pragmas:wx={}}){let tr=`
19
19
  `,gr="/**",nr=" *",Xr=" */",ir=Object.keys(wx),tn=ir.flatMap(Nt=>eZ(Nt,wx[Nt])).map(Nt=>`${nr} ${Nt}${tr}`).join("");if(!p0){if(ir.length===0)return"";if(ir.length===1&&!Array.isArray(wx[ir[0]])){let Nt=wx[ir[0]];return`${gr} ${eZ(ir[0],Nt)[0]}${Xr}`}}let X4=p0.split(tr).map(Nt=>`${nr} ${Nt}`).join(tr)+tr;return gr+tr+(p0?X4:"")+(p0&&ir.length?nr+tr:"")+tn+Xr}function eZ(p0,wx){return nZ.concat(wx).map(tr=>`@${p0} ${tr}`.trim())}});var VM={};HK(VM,{parsers:()=>JM});var JM={};HK(JM,{flow:()=>LC0});var kZ=qK(GK(),1);function iC0(p0,wx){let tr=new SyntaxError(p0+" ("+wx.loc.start.line+":"+wx.loc.start.column+")");return Object.assign(tr,wx)}var bK=iC0;var X3=qK(iZ(),1);function yC0(p0){if(!p0.startsWith("#!"))return"";let wx=p0.indexOf(`
20
20
  `);return wx===-1?p0:p0.slice(0,wx)}var fZ=yC0;function mC0(p0){let wx=fZ(p0);wx&&(p0=p0.slice(wx.length+1));let tr=(0,X3.extract)(p0),{pragmas:gr,comments:nr}=(0,X3.parseWithComments)(tr);return{shebang:wx,text:p0,pragmas:gr,comments:nr}}function cZ(p0){let{pragmas:wx}=mC0(p0);return Object.prototype.hasOwnProperty.call(wx,"prettier")||Object.prototype.hasOwnProperty.call(wx,"format")}function kC0(p0){return Array.isArray(p0)&&p0.length>0}var dm=kC0;function Pt(p0){var gr;let wx=p0.range?p0.range[0]:p0.start,tr=((gr=p0.declaration)==null?void 0:gr.decorators)??p0.decorators;return dm(tr)?Math.min(Pt(tr[0]),wx):wx}function As(p0){return p0.range?p0.range[1]:p0.end}function hC0(p0){return p0=typeof p0=="function"?{parse:p0}:p0,{astFormat:"estree",hasPragma:cZ,locStart:Pt,locEnd:As,...p0}}var sZ=hC0;function _C0(p0){return p0.charAt(0)==="#"&&p0.charAt(1)==="!"?"//"+p0.slice(2):p0}var oZ=_C0;var wC0=(p0,wx,tr)=>{if(!(p0&&wx==null))return Array.isArray(wx)||typeof wx=="string"?wx[tr<0?wx.length+tr:tr]:wx.at(tr)},jM=wC0;function TC0(p0){return p0=new Set(p0),wx=>p0.has(wx==null?void 0:wx.type)}var vZ=TC0;var SC0=vZ(["Block","CommentBlock","MultiLine"]),U4=SC0;function EC0(p0){return U4(p0)&&p0.value[0]==="*"&&/@(?:type|satisfies)\b/.test(p0.value)}var aZ=EC0;function gC0(p0){let wx=`*${p0.value}*`.split(`
21
- `);return wx.length>1&&wx.every(tr=>tr.trimStart()[0]==="*")}var UM=gC0;var B4=null;function Y4(p0){if(B4!==null&&typeof B4.property){let wx=B4;return B4=Y4.prototype=null,wx}return B4=Y4.prototype=p0??Object.create(null),new Y4}var AC0=10;for(let p0=0;p0<=AC0;p0++)Y4();function BM(p0){return Y4(p0)}function PC0(p0,wx="type"){BM(p0);function tr(gr){let nr=gr[wx],Xr=p0[nr];if(!Array.isArray(Xr))throw Object.assign(new Error(`Missing visitor keys for '${nr}'.`),{node:gr});return Xr}return tr}var lZ=PC0;var pZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var NC0=lZ(pZ),dZ=NC0;function YM(p0,wx){if(!(p0!==null&&typeof p0=="object"))return p0;if(Array.isArray(p0)){for(let gr=0;gr<p0.length;gr++)p0[gr]=YM(p0[gr],wx);return p0}let tr=dZ(p0);for(let gr=0;gr<tr.length;gr++)p0[tr[gr]]=YM(p0[tr[gr]],wx);return wx(p0)||p0}var ym=YM;function CC0(p0,wx){let{parser:tr,text:gr}=wx;if(p0.type==="File"&&p0.program.interpreter){let{program:{interpreter:nr},comments:Xr}=p0;delete p0.program.interpreter,Xr.unshift(nr)}if(tr==="babel"){let nr=new Set;p0=ym(p0,Xr=>{var ir;(ir=Xr.leadingComments)!=null&&ir.some(aZ)&&nr.add(Pt(Xr))}),p0=ym(p0,Xr=>{if(Xr.type==="ParenthesizedExpression"){let{expression:ir}=Xr;if(ir.type==="TypeCastExpression")return ir.range=[...Xr.range],ir;let tn=Pt(Xr);if(!nr.has(tn))return ir.extra={...ir.extra,parenthesized:!0},ir}})}if(p0=ym(p0,nr=>{var Xr;switch(nr.type){case"LogicalExpression":if(yZ(nr))return XM(nr);break;case"VariableDeclaration":{let ir=jM(!1,nr.declarations,-1);ir!=null&&ir.init&&gr[As(ir)]!==";"&&(nr.range=[Pt(nr),As(ir)]);break}case"TSParenthesizedType":return nr.typeAnnotation;case"TSTypeParameter":if(typeof nr.name=="string"){let ir=Pt(nr);nr.name={type:"Identifier",name:nr.name,range:[ir,ir+nr.name.length]}}break;case"TopicReference":p0.extra={...p0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(tr==="meriyah"&&((Xr=nr.exported)==null?void 0:Xr.type)==="Identifier"){let{exported:ir}=nr,tn=gr.slice(Pt(ir),As(ir));(tn.startsWith('"')||tn.startsWith("'"))&&(nr.exported={...nr.exported,type:"Literal",value:nr.exported.name,raw:tn})}break;case"TSUnionType":case"TSIntersectionType":if(nr.types.length===1)return nr.types[0];break}}),dm(p0.comments)){let nr=jM(!1,p0.comments,-1);for(let Xr=p0.comments.length-2;Xr>=0;Xr--){let ir=p0.comments[Xr];As(ir)===Pt(nr)&&U4(ir)&&U4(nr)&&UM(ir)&&UM(nr)&&(p0.comments.splice(Xr+1,1),ir.value+="*//*"+nr.value,ir.range=[Pt(ir),As(nr)]),nr=ir}}return p0.type==="Program"&&(p0.range=[0,gr.length]),p0}function yZ(p0){return p0.type==="LogicalExpression"&&p0.right.type==="LogicalExpression"&&p0.operator===p0.right.operator}function XM(p0){return yZ(p0)?XM({type:"LogicalExpression",operator:p0.operator,left:XM({type:"LogicalExpression",operator:p0.operator,left:p0.left,right:p0.right.left,range:[Pt(p0.left),As(p0.right.left)]}),right:p0.right.right,range:[Pt(p0),As(p0)]}):p0}var mZ=CC0;var RC0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function OC0(p0){let{message:wx,loc:{start:tr,end:gr}}=p0;return bK(wx,{loc:{start:{line:tr.line,column:tr.column+1},end:{line:gr.line,column:gr.column+1}},cause:p0})}function IC0(p0){let wx=kZ.default.parse(oZ(p0),RC0),[tr]=wx.errors;if(tr)throw OC0(tr);return mZ(wx,{text:p0})}var LC0=sZ(IC0);var LR0=VM;export{LR0 as default,JM as parsers};
21
+ `);return wx.length>1&&wx.every(tr=>tr.trimStart()[0]==="*")}var UM=gC0;var B4=null;function Y4(p0){if(B4!==null&&typeof B4.property){let wx=B4;return B4=Y4.prototype=null,wx}return B4=Y4.prototype=p0??Object.create(null),new Y4}var AC0=10;for(let p0=0;p0<=AC0;p0++)Y4();function BM(p0){return Y4(p0)}function PC0(p0,wx="type"){BM(p0);function tr(gr){let nr=gr[wx],Xr=p0[nr];if(!Array.isArray(Xr))throw Object.assign(new Error(`Missing visitor keys for '${nr}'.`),{node:gr});return Xr}return tr}var lZ=PC0;var pZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var NC0=lZ(pZ),dZ=NC0;function YM(p0,wx){if(!(p0!==null&&typeof p0=="object"))return p0;if(Array.isArray(p0)){for(let gr=0;gr<p0.length;gr++)p0[gr]=YM(p0[gr],wx);return p0}let tr=dZ(p0);for(let gr=0;gr<tr.length;gr++)p0[tr[gr]]=YM(p0[tr[gr]],wx);return wx(p0)||p0}var ym=YM;function CC0(p0,wx){let{parser:tr,text:gr}=wx;if(p0.type==="File"&&p0.program.interpreter){let{program:{interpreter:nr},comments:Xr}=p0;delete p0.program.interpreter,Xr.unshift(nr)}if(tr==="babel"){let nr=new Set;p0=ym(p0,Xr=>{var ir;(ir=Xr.leadingComments)!=null&&ir.some(aZ)&&nr.add(Pt(Xr))}),p0=ym(p0,Xr=>{if(Xr.type==="ParenthesizedExpression"){let{expression:ir}=Xr;if(ir.type==="TypeCastExpression")return ir.range=[...Xr.range],ir;let tn=Pt(Xr);if(!nr.has(tn))return ir.extra={...ir.extra,parenthesized:!0},ir}})}if(p0=ym(p0,nr=>{var Xr;switch(nr.type){case"LogicalExpression":if(yZ(nr))return XM(nr);break;case"VariableDeclaration":{let ir=jM(!1,nr.declarations,-1);ir!=null&&ir.init&&gr[As(ir)]!==";"&&(nr.range=[Pt(nr),As(ir)]);break}case"TSParenthesizedType":return nr.typeAnnotation;case"TSTypeParameter":if(typeof nr.name=="string"){let ir=Pt(nr);nr.name={type:"Identifier",name:nr.name,range:[ir,ir+nr.name.length]}}break;case"TopicReference":p0.extra={...p0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(tr==="meriyah"&&((Xr=nr.exported)==null?void 0:Xr.type)==="Identifier"){let{exported:ir}=nr,tn=gr.slice(Pt(ir),As(ir));(tn.startsWith('"')||tn.startsWith("'"))&&(nr.exported={...nr.exported,type:"Literal",value:nr.exported.name,raw:tn})}break;case"TSUnionType":case"TSIntersectionType":if(nr.types.length===1)return nr.types[0];break}}),dm(p0.comments)){let nr=jM(!1,p0.comments,-1);for(let Xr=p0.comments.length-2;Xr>=0;Xr--){let ir=p0.comments[Xr];As(ir)===Pt(nr)&&U4(ir)&&U4(nr)&&UM(ir)&&UM(nr)&&(p0.comments.splice(Xr+1,1),ir.value+="*//*"+nr.value,ir.range=[Pt(ir),As(nr)]),nr=ir}}return p0.type==="Program"&&(p0.range=[0,gr.length]),p0}function yZ(p0){return p0.type==="LogicalExpression"&&p0.right.type==="LogicalExpression"&&p0.operator===p0.right.operator}function XM(p0){return yZ(p0)?XM({type:"LogicalExpression",operator:p0.operator,left:XM({type:"LogicalExpression",operator:p0.operator,left:p0.left,right:p0.right.left,range:[Pt(p0.left),As(p0.right.left)]}),right:p0.right.right,range:[Pt(p0),As(p0)]}):p0}var mZ=CC0;var RC0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function OC0(p0){let{message:wx,loc:{start:tr,end:gr}}=p0;return bK(wx,{loc:{start:{line:tr.line,column:tr.column+1},end:{line:gr.line,column:gr.column+1}},cause:p0})}function IC0(p0){let wx=kZ.default.parse(oZ(p0),RC0),[tr]=wx.errors;if(tr)throw OC0(tr);return mZ(wx,{text:p0})}var LC0=sZ(IC0);var LR0=VM;export{LR0 as default,JM as parsers};