Files
client/node_modules/prettier/plugins/babel.js
T

16 lines
311 KiB
JavaScript
Raw Normal View History

2026-10-07 18:56:27 +02:00
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var qt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ii=Object.getOwnPropertyNames;var ri=Object.prototype.hasOwnProperty;var $t=(a,e)=>{for(var t in e)qt(a,t,{get:e[t],enumerable:!0})},ai=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ii(e))!ri.call(a,i)&&i!==t&&qt(a,i,{get:()=>e[i],enumerable:!(s=si(e,i))||s.enumerable});return a};var ni=a=>ai(qt({},"__esModule",{value:!0}),a);var Ia={};$t(Ia,{parsers:()=>wa});var Me={};$t(Me,{__babel_estree:()=>ga,__js_expression:()=>xa,__ts_expression:()=>Pa,__vue_event_binding:()=>ma,__vue_expression:()=>xa,__vue_ts_event_binding:()=>ya,__vue_ts_expression:()=>Pa,babel:()=>ma,"babel-flow":()=>ti,"babel-ts":()=>ya});var X=(a,e)=>(t,s,...i)=>t|1&&s==null?void 0:(e.call(s)??s[a]).apply(s,i);var oi=String.prototype.replaceAll??function(a,e){return a.global?this.replace(a,e):this.split(a).join(e)},hi=X("replaceAll",function(){if(typeof this=="string")return oi}),U=hi;var ci=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),lt=ci;var L=class{constructor(e,t,s){this.line=void 0,this.column=void 0,s!==void 0&&(this.index=void 0),this.line=e,this.column=t,s!==void 0&&(this.index=s)}},st=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function O(a,e){let{line:t,column:s,index:i}=a;return new L(t,s+e,i+e)}var Be="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",li={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Be},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Be}},Re={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},wt=a=>a.type==="UpdateExpression"?Re.UpdateExpression[`${a.prefix}`]:Re[a.type],pi={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructo
- Did you mean \`export { '${a}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:({phase:a})=>`\`import${a?`.${a}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:a})=>`Cannot use new with import${a?`.${a}`:""}().`,ImportCallSpreadArgument:({phase:a})=>`\`...\` is not allowed in \`import${a?`.${a}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${wt(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${wt(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${wt(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in o
`:`\r
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(t){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(l.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===t)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):tt(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(130,s)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(t,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t,s=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(W(t)||t===45);this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(136)?t.name=this.state.value:we(this.state.type)?t.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(10))return s;let i=this.startNodeAt(t);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(12);){let i=this.startNodeAt(t);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(w.brace),this.next(),t=this.jsxParseExpressionContainer(t,w.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(_.AttributeIsEmpty,t),t;case 138:case 130:return this.parseExprAtom();default:throw this.raise(_.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(w.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,s){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(_.UnexpectedSequenceExpression,i.expressions[1]),t.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let s=this.startNode();return this.setContext(w.brace),this.next(),this.expect(17),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(w.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(s,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXOpeningFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s)}jsxParseOpeningElementAfterName(t){let s=[];for(;!this.match(52)&&!this.match(139);)s.push(this.jsxParseAttribute());return t.attributes=s,t.selfClosing=this.eat(52),this.expect(139),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXClosingFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(
`,++t,x===13&&e.charCodeAt(t)===10&&++t,++i,f=s=t):r.unterminated(n,o,h):++t}return{pos:t,str:c,firstInvalidLoc:p,lineStart:s,curLine:i}}function sr(a,e,t,s){return a==="template"?e===96||e===36&&t.charCodeAt(s+1)===123:e===(a==="double"?34:39)}function ir(a,e,t,s,i,r){let n=!i;e++;let o=c=>({pos:e,ch:c,lineStart:t,curLine:s}),h=a.charCodeAt(e++);switch(h){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:e}=ae(a,e,t,s,2,!1,n,r),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=hs(a,e,t,s,n,r),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(e)===10&&++e;case 10:t=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(e-1,t,s);default:if(h>=48&&h<=55){let c=e-1,f=/^[0-7]+/.exec(a.slice(c,e+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),e+=f.length-1;let x=a.charCodeAt(e);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(c,t,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function ae(a,e,t,s,i,r,n,o){let h=e,c;return{n:c,pos:e}=os(a,e,t,s,16,i,r,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(h,t,s):e=h-1),{code:c,pos:e}}function os(a,e,t,s,i,r,n,o,h,c){let p=e,f=i===16?$e.hex:$e.decBinOct,d=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,x=!1,T=0;for(let D=0,v=r??1/0;D<v;++D){let E=a.charCodeAt(e),I;if(E===95&&o!=="bail"){let At=a.charCodeAt(e-1),ct=a.charCodeAt(e+1);if(o){if(Number.isNaN(ct)||!d(ct)||f.has(At)||f.has(ct)){if(c)return{n:null,pos:e};h.unexpectedNumericSeparator(e,t,s)}}else{if(c)return{n:null,pos:e};h.numericSeparatorInEscapeSequence(e,t,s)}++e;continue}if(E>=97?I=E-97+10:E>=65?I=E-65+10:er(E)?I=E-48:I=1/0,I>=i){if(I<=9&&c)return{n:null,pos:e};if(I<=9&&h.invalidDigit(e,t,s,i))I=0;else if(n)I=0,x=!0;else break}++e,T=T*i+I}return e===p||r!=null&&e-p!==r||x?{n:null,pos:e}:{n:T,pos:e}}function hs(a,e,t,s,i,r){let n=a.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=ae(a,e,t,s,a.indexOf("}",e)-e,!0,i,r),++e,o!==null&&o>1114111)if(i)r.invalidCodePoint(e,t,s);else return{code:null,pos:e}}else({code:o,pos:e}=ae(a,e,t,s,4,!1,i,r));return{code:o,pos:e}}function ut(a,e,t){return new L(t,a-e,a)}var rr=new Set([103,109,115,105,121,117,100,118]),ne=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new st(e.startLoc,e.endLoc)}},Et,oe=class extends ie{isLookahead;tokens=[];constructor(e,t){super(),this.state=new re,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Et||Et.length<(this.length+1)*2)&&(Et=new Uint32Array((this.length+1)*2)),this.locData=Et}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new L(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new ne(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ht.lastIndex=e,Ht.test(this.input)?Ht.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Kt.lastIndex=e,Kt.test(this.input)?Kt.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let s=this.input.charCodeAt(e);(s&64512)===56320&&(t=65536+
`),cooked:r===null?null:r.slice(1,c)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,O(this.state.lastTokEndLoc,c)),f}parseTemplate(e){let t=this.startNode(),s=this.parseTemplateElement(e),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=r,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,r=!0,n=this.startNode();for(n.properties=[],this.next();!this.match(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(n);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(s),i=this.checkProto(h,i,s)),n.properties.push(h)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(n,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(l.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:c}=s,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(51),this.parsePropertyName(s)),(p==="get"||p==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(c),s.kind=p,this.match(51)&&(o=!0,this.raise(l.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise(e.kind==="get"?l.BadGetterArity:l.BadSetterArity,e),e.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(l.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,r){if(r){let n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(l.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,s,i,r,n,o){let h=this.parseObjectMethod(e,s,i,r,n)||this.parseObjectProperty(e,t,r,o);return h||this.unexpected(),h}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:s,value:i}=this.state,r;if(B(s))r=this.parseIdentifier(!0);else switch(s){case 131:r=this.parseNumericLiteral(i);break;case 130:r=this.parseStringLiteral(i);break;case 132:r=this.parseBigIntLiteral(i);break;case 134:{let n=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=n):this.raise(l.Une
`||a==="\r"||a==="\u2028"||a==="\u2029";function wr(a,e,t){if(e===!1)return!1;let s=!!t?.backwards,i=a.charAt(e);if(s){if(a.charAt(e-1)==="\r"&&i===`
`)return e-2;if(xs(i))return e-1}else{if(i==="\r"&&a.charAt(e+1)===`
`)return e+2;if(xs(i))return e+1}return e}var Ps=wr;function Ir(a,e){return e===!1?!1:a.charAt(e)==="/"&&a.charAt(e+1)==="/"?ms(a,e):e}var gs=Ir;function Nr(a,e){let t=null,s=e;for(;s!==t;)t=s,s=ds(a,s),s=ys(a,s),s=gs(a,s),s=Ps(a,s);return s}var Ts=Nr;function bs(a){let e=[];for(let t of a)try{return t()}catch(s){e.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function kr(a){if(!a.startsWith("#!"))return"";let e=a.indexOf(`
`);return e===-1?a:a.slice(0,e)}var Ft=kr;var vr=Array.prototype.findLast??function(a){for(let e=this.length-1;e>=0;e--){let t=this[e];if(a(t,e,this))return t}},Lr=X("findLast",function(){if(Array.isArray(this))return vr}),As=Lr;var Bt=Symbol.for("comments");function Dr(a){return this[a<0?this.length+a:a]}var Mr=X("at",function(){if(Array.isArray(this)||typeof this=="string")return Dr}),Ss=Mr;function J(a){let e=new Set(a);return t=>e.has(t?.type)}function rt(a){return a.range?.[1]??a.end}function N(a){let e=a.range?.[0]??a.start,t=(a.declaration?.decorators??a.decorators)?.[0];return t?Math.min(N(t),e):e}var Or=5,Fr=8,Br=8,Cs=a=>e=>e.label?k(e.label):N(e)+a,Rr=a=>a.__contentEnd??rt(a),Es=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ur=new Map([["BreakStatement",Cs(Or)],["ContinueStatement",Cs(Fr)],["DebuggerStatement",a=>N(a)+Br],["VariableDeclaration",a=>k(Ss(0,a.declarations,-1))],...Es.map(a=>[a,Rr])]),Ne=J(Es);function k(a){let{type:e}=a;return e==="IfStatement"?k(a.alternate??a.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?k(a.body):Ur.get(e)?.(a)??rt(a)}var at=J(["Block","CommentBlock","MultiLine"]),ws=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function nt(a,e,t){if(!a.has(e)){let s=t(e);a.set(e,s)}return a.get(e)}var _r=new WeakMap;function Is(a){return nt(_r,a,e=>at(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function jr(a){return U(0,a,/[^\n]/g," ")}var Ns=jr;function Vr(a,e){for(let t of e){let s=N(t),i=k(t);a=a.slice(0,s)+Ns(a.slice(s,i))+a.slice(i)}return a}var qr=new WeakMap;function ks(a){let e=a[Bt];return nt(qr,e,t=>Vr(a.originalText,t))}function $r(a){if(!at(a))return[];if(!a.value.includes(`
`))return[];let e=[];for(let t of`*${a.value}*`.split(`
`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}var vs=new WeakMap;function zr(a){return nt(vs,a,$r)}function Ls(a){vs.delete(a)}function ke(a){return zr(a).length>0}function Ds(a){if(a.length<2)return;let e;for(let t=a.length-1;t>=0;t--){let s=a[t];if(e&&k(s)===N(e)&&ke(s)&&ke(e)&&(a.splice(t+1,1),s.value+="*//*"+e.value,s.range=[N(s),k(e)],Ls(s)),!ws(s)&&!at(s))throw new TypeError(`Unknown comment type: "${s.type}".`);e=s}}function Hr(a){return a!==null&&typeof a=="object"}var Ms=Hr;var gt=null;function Tt(a){if(gt!==null&&typeof gt.property){let e=gt;return gt=Tt.prototype=null,e}return gt=Tt.prototype=a??Object.create(null),new Tt}var Kr=10;for(let a=0;a<=Kr;a++)Tt();function ve(a){return Tt(a)}function Wr(a,e="type"){ve(a);function t(s){let i=s[e],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return t}var Os=Wr;var u=[["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"]],Fs={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],Impo
$1 $2
`);a=a.replace(Vs,"").trimEnd();let s=Object.create(null),i=U(0,a,qs,"").replace(Vs,"").trimEnd(),r;for(;r=qs.exec(a);){let n=U(0,r[2],sa,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...aa,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var Hs=["noformat","noprettier"],Ks=["format","prettier"];function Ws(a){let e=Ft(a);e&&(a=a.slice(e.length+1));let t=$s(a),{pragmas:s,comments:i}=zs(t);return{shebang:e,text:a,pragmas:s,comments:i}}function Js(a){let{pragmas:e}=Ws(a);return Ks.some(t=>lt(e,t))}function Gs(a){let{pragmas:e}=Ws(a);return Hs.some(t=>lt(e,t))}function na(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Js,hasIgnorePragma:Gs,locStart:N,locEnd:k,...a}}var G=na;var jt="module",De="commonjs";function Xs(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/i.test(a))return jt;if(/\.(?:cjs|cts)$/i.test(a))return De}}function oa(a){let{type:e="JsExpressionRoot",expression:t,comments:s=t?.comments??[],text:i,rootMarker:r}=a,n={type:e,comments:s,range:[0,i.length],rootMarker:r};return t&&(delete t.comments,n.node=t),n}var Vt=oa;var ot=a=>G(ua(a)),ha={sourceType:jt,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},Ys="v8intrinsic",Qs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,e=ha)=>({...e,plugins:[...e.plugins,...a]}),ca=/@(?:no)?flow\b/;function la(a,e){if(e?.endsWith(".js.flow"))return!0;let t=Ft(a);t&&(a=a.slice(t.length));let s=Ts(a,0);return s!==!1&&(a=a.slice(0,s)),ca.test(a)}function pa(a,e,t){let s=a(e,t),i=s.errors.find(r=>!da.has(r.reasonCode));if(i)throw i;return s}function ua({isExpression:a=!1,optionsCombinations:e}){return(t,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&la(t,i))return s.parser="babel-flow",ti.parse(t,s);let r=e,n=s.__babelSourceType??Xs(i);n&&n!==jt&&(r=r.map(p=>({...p,sourceType:n,...n===De?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/.test(t);t.includes("|>")?r=(o?[...Qs,Ys]:Qs).flatMap(f=>r.map(d=>j([f],d))):o&&(r=r.map(p=>j([Ys],p)));let h=a?Mt:Dt,c;try{c=bs(r.map(p=>()=>pa(h,t,p)))}catch({errors:[p]}){throw _t(p)}return a&&(c=Vt({expression:c,text:t,rootMarker:s.rootMarker})),_s(c,{text:t})}}var fa=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],da=new Set(fa),Zs=[j(["jsx"])],ma=ot({optionsCombinations:Zs}),ya=ot({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),xa=ot({isExpression:!0,optionsCombinations:[j(["jsx"])]}),Pa=ot({isExpression:!0,optionsCombinations:[j(["typescript"])]}),ti=ot({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),ga=ot({optionsCombinations:Zs.map(a=>j(["estree"],a))});var Fe={};$t(Fe,{json:()=>Aa,"json-stringify":()=>Ea,json5:()=>Sa,jsonc:()=>Ca});function Ta(a){return Array.isArray(a)&&a.length>0}var Oe=Ta;var ei={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function ba(a){let e=Dt(a,ei),{program:t}=e;if(t.b