You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
317 KiB
JavaScript

(function(e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var i=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};i.prettierPlugins=i.prettierPlugins||{},i.prettierPlugins.babel=e()}})(function(){"use strict";var E=(l,h)=>()=>(h||l((h={exports:{}}).exports,h),h.exports);var re=E((xd,Zr)=>{var Ct=function(l){return l&&l.Math==Math&&l};Zr.exports=Ct(typeof globalThis=="object"&&globalThis)||Ct(typeof window=="object"&&window)||Ct(typeof self=="object"&&self)||Ct(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ie=E((gd,ei)=>{ei.exports=function(l){try{return!!l()}catch{return!0}}});var ye=E((Pd,ti)=>{var kh=ie();ti.exports=!kh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var bt=E((Ad,si)=>{var Dh=ie();si.exports=!Dh(function(){var l=function(){}.bind();return typeof l!="function"||l.hasOwnProperty("prototype")})});var wt=E((Td,ri)=>{var Fh=bt(),St=Function.prototype.call;ri.exports=Fh?St.bind(St):function(){return St.apply(St,arguments)}});var oi=E(ni=>{"use strict";var ii={}.propertyIsEnumerable,ai=Object.getOwnPropertyDescriptor,Lh=ai&&!ii.call({1:2},1);ni.f=Lh?function(h){var p=ai(this,h);return!!p&&p.enumerable}:ii});var fs=E((Ed,li)=>{li.exports=function(l,h){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:h}}});var ae=E((Cd,ci)=>{var hi=bt(),ui=Function.prototype,ds=ui.call,Oh=hi&&ui.bind.bind(ds,ds);ci.exports=hi?Oh:function(l){return function(){return ds.apply(l,arguments)}}});var Ye=E((bd,fi)=>{var pi=ae(),Bh=pi({}.toString),Mh=pi("".slice);fi.exports=function(l){return Mh(Bh(l),8,-1)}});var mi=E((Sd,di)=>{var _h=ae(),Rh=ie(),jh=Ye(),ms=Object,qh=_h("".split);di.exports=Rh(function(){return!ms("z").propertyIsEnumerable(0)})?function(l){return jh(l)=="String"?qh(l,""):ms(l)}:ms});var ys=E((wd,yi)=>{yi.exports=function(l){return l==null}});var xs=E((Id,xi)=>{var Uh=ys(),$h=TypeError;xi.exports=function(l){if(Uh(l))throw $h("Can't call method on "+l);return l}});var It=E((Nd,gi)=>{var Hh=mi(),zh=xs();gi.exports=function(l){return Hh(zh(l))}});var Ps=E((kd,Pi)=>{var gs=typeof document=="object"&&document.all,Vh=typeof gs>"u"&&gs!==void 0;Pi.exports={all:gs,IS_HTMLDDA:Vh}});var ee=E((Dd,Ti)=>{var Ai=Ps(),Kh=Ai.all;Ti.exports=Ai.IS_HTMLDDA?function(l){return typeof l=="function"||l===Kh}:function(l){return typeof l=="function"}});var Ie=E((Fd,Ci)=>{var vi=ee(),Ei=Ps(),Wh=Ei.all;Ci.exports=Ei.IS_HTMLDDA?function(l){return typeof l=="object"?l!==null:vi(l)||l===Wh}:function(l){return typeof l=="object"?l!==null:vi(l)}});var Qe=E((Ld,bi)=>{var As=re(),Gh=ee(),Jh=function(l){return Gh(l)?l:void 0};bi.exports=function(l,h){return arguments.length<2?Jh(As[l]):As[l]&&As[l][h]}});var wi=E((Od,Si)=>{var Xh=ae();Si.exports=Xh({}.isPrototypeOf)});var Ni=E((Bd,Ii)=>{var Yh=Qe();Ii.exports=Yh("navigator","userAgent")||""});var Mi=E((Md,Bi)=>{var Oi=re(),Ts=Ni(),ki=Oi.process,Di=Oi.Deno,Fi=ki&&ki.versions||Di&&Di.version,Li=Fi&&Fi.v8,ne,Nt;Li&&(ne=Li.split("."),Nt=ne[0]>0&&ne[0]<4?1:+(ne[0]+ne[1]));!Nt&&Ts&&(ne=Ts.match(/Edge\/(\d+)/),(!ne||ne[1]>=74)&&(ne=Ts.match(/Chrome\/(\d+)/),ne&&(Nt=+ne[1])));Bi.exports=Nt});var vs=E((_d,Ri)=>{var _i=Mi(),Qh=ie();Ri.exports=!!Object.getOwnPropertySymbols&&!Qh(function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&_i&&_i<41})});var Es=E((Rd,ji)=>{var Zh=vs();ji.exports=Zh&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Cs=E((jd,qi)=>{var eu=Qe(),tu=ee(),su=wi(),ru=Es(),iu=Object;qi.exports=ru?function(l){return typeof l=="symbol"}:function(l){var h=eu("Symbol");return tu(h)&&su(h.prototype,iu(l))}});var $i=E((qd,Ui)=>{var au=String;Ui.exports=function(l){try{return au(l)}catch{return"Object"}}});var kt=E((Ud,Hi)=>{var nu=ee(),ou=$i(),lu=TypeError;Hi.exports=function(l){if(nu(l))return l;throw lu(ou(l)+" is not a function")}});var Vi=E(($d,zi)=>{var hu=kt(),uu=ys();zi.exports=function(l,h){var p=l[h];return uu(p)?void 0:hu(p)}});var
`);return x===-1?d:d.slice(0,x)}h.exports=p}}),Df=$({"src/utils/text/skip-inline-comment.js"(l,h){"use strict";U();function p(d,x){if(x===!1)return!1;if(d.charAt(x)==="/"&&d.charAt(x+1)==="*"){for(let P=x+2;P<d.length;++P)if(d.charAt(P)==="*"&&d.charAt(P+1)==="/")return P+2}return x}h.exports=p}}),Ff=$({"src/utils/text/skip-newline.js"(l,h){"use strict";U();function p(d,x,P){let m=P&&P.backwards;if(x===!1)return!1;let v=d.charAt(x);if(m){if(d.charAt(x-1)==="\r"&&v===`
`)return x-2;if(v===`
`||v==="\r"||v==="\u2028"||v==="\u2029")return x-1}else{if(v==="\r"&&d.charAt(x+1)===`
`)return x+2;if(v===`
`||v==="\r"||v==="\u2028"||v==="\u2029")return x+1}return x}h.exports=p}}),fo=$({"src/utils/text/skip.js"(l,h){"use strict";U();function p(v){return(S,k,F)=>{let w=F&&F.backwards;if(k===!1)return!1;let{length:L}=S,A=k;for(;A>=0&&A<L;){let _=S.charAt(A);if(v instanceof RegExp){if(!v.test(_))return A}else if(!v.includes(_))return A;w?A--:A++}return A===-1||A===L?A:!1}}var d=p(/\s/),x=p(" "),P=p(",; "),m=p(/[^\n\r]/);h.exports={skipWhitespace:d,skipSpaces:x,skipToLineEnd:P,skipEverythingButNewLine:m}}}),Lf=$({"src/utils/text/skip-trailing-comment.js"(l,h){"use strict";U();var{skipEverythingButNewLine:p}=fo();function d(x,P){return P===!1?!1:x.charAt(P)==="/"&&x.charAt(P+1)==="/"?p(x,P):P}h.exports=d}}),Of=$({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(l,h){"use strict";U();var p=Df(),d=Ff(),x=Lf(),{skipSpaces:P}=fo();function m(v,S){let k=null,F=S;for(;F!==k;)k=F,F=P(v,F),F=p(v,F),F=x(v,F),F=d(v,F);return F}h.exports=m}}),mo={};wf(mo,{EOL:()=>ar,arch:()=>Bf,cpus:()=>vo,default:()=>wo,endianness:()=>yo,freemem:()=>Ao,getNetworkInterfaces:()=>So,hostname:()=>xo,loadavg:()=>go,networkInterfaces:()=>bo,platform:()=>Mf,release:()=>Co,tmpDir:()=>rr,tmpdir:()=>ir,totalmem:()=>To,type:()=>Eo,uptime:()=>Po});function yo(){if(typeof Ut>"u"){var l=new ArrayBuffer(2),h=new Uint8Array(l),p=new Uint16Array(l);if(h[0]=1,h[1]=2,p[0]===258)Ut="BE";else if(p[0]===513)Ut="LE";else throw new Error("unable to figure out endianess")}return Ut}function xo(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function go(){return[]}function Po(){return 0}function Ao(){return Number.MAX_VALUE}function To(){return Number.MAX_VALUE}function vo(){return[]}function Eo(){return"Browser"}function Co(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function bo(){}function So(){}function Bf(){return"javascript"}function Mf(){return"browser"}function rr(){return"/tmp"}var Ut,ir,ar,wo,_f=co({"node-modules-polyfills:os"(){U(),ir=rr,ar=`
`,wo={EOL:ar,tmpdir:ir,tmpDir:rr,networkInterfaces:bo,getNetworkInterfaces:So,release:Co,type:Eo,cpus:vo,totalmem:To,freemem:Ao,uptime:Po,loadavg:go,hostname:xo,endianness:yo}}}),Rf=$({"node-modules-polyfills-commonjs:os"(l,h){U();var p=(_f(),Nf(mo));if(p&&p.default){h.exports=p.default;for(let d in p)h.exports[d]=p[d]}else p&&(h.exports=p)}}),jf=$({"node_modules/detect-newline/index.js"(l,h){"use strict";U();var p=d=>{if(typeof d!="string")throw new TypeError("Expected a string");let x=d.match(/(?:\r?\n)/g)||[];if(x.length===0)return;let P=x.filter(v=>v===`\r
`).length,m=x.length-P;return P>m?`\r
`:`
`};h.exports=p,h.exports.graceful=d=>typeof d=="string"&&p(d)||`
`}}),qf=$({"node_modules/jest-docblock/build/index.js"(l){"use strict";U(),Object.defineProperty(l,"__esModule",{value:!0}),l.extract=A,l.parse=G,l.parseWithComments=N,l.print=O,l.strip=_;function h(){let R=Rf();return h=function(){return R},R}function p(){let R=d(jf());return p=function(){return R},R}function d(R){return R&&R.__esModule?R:{default:R}}var x=/\*\/$/,P=/^\/\*\*?/,m=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,v=/(^|\s+)\/\/([^\r\n]*)/g,S=/^(\r?\n)+/,k=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,F=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,w=/(\r?\n|^) *\* ?/g,L=[];function A(R){let z=R.match(m);return z?z[0].trimLeft():""}function _(R){let z=R.match(m);return z&&z[0]?R.substring(z[0].length):R}function G(R){return N(R).pragmas}function N(R){let z=(0,p().default)(R)||h().EOL;R=R.replace(P,"").replace(x,"").replace(w,"$1");let Q="";for(;Q!==R;)Q=R,R=R.replace(k,`${z}$1 $2${z}`);R=R.replace(S,"").trimRight();let b=Object.create(null),B=R.replace(F,"").replace(S,"").trimRight(),Z;for(;Z=F.exec(R);){let q=Z[2].replace(v,"");typeof b[Z[1]]=="string"||Array.isArray(b[Z[1]])?b[Z[1]]=L.concat(b[Z[1]],q):b[Z[1]]=q}return{comments:B,pragmas:b}}function O(R){let{comments:z="",pragmas:Q={}}=R,b=(0,p().default)(z)||h().EOL,B="/**",Z=" *",q=" */",ue=Object.keys(Q),te=ue.map(se=>H(se,Q[se])).reduce((se,He)=>se.concat(He),[]).map(se=>`${Z} ${se}${b}`).join("");if(!z){if(ue.length===0)return"";if(ue.length===1&&!Array.isArray(Q[ue[0]])){let se=Q[ue[0]];return`${B} ${H(ue[0],se)[0]}${q}`}}let it=z.split(b).map(se=>`${Z} ${se}`).join(b)+b;return B+b+(z?it:"")+(z&&ue.length?Z+b:"")+te+q}function H(R,z){return L.concat(z).map(Q=>`@${R} ${Q}`.trim())}}}),Uf=$({"src/common/end-of-line.js"(l,h){"use strict";U();function p(m){let v=m.indexOf("\r");return v>=0?m.charAt(v+1)===`
`?"crlf":"cr":"lf"}function d(m){switch(m){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function x(m,v){let S;switch(v){case`
`:S=/\n/g;break;case"\r":S=/\r/g;break;case`\r
`:S=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(v)}.`)}let k=m.match(S);return k?k.length:0}function P(m){return m.replace(/\r\n?/g,`
`)}h.exports={guessEndOfLine:p,convertEndOfLineToChars:d,countEndOfLineChars:x,normalizeEndOfLine:P}}}),$f=$({"src/language-js/pragma.js"(l,h){"use strict";U();var{parseWithComments:p,strip:d,extract:x,print:P}=qf(),{normalizeEndOfLine:m}=Uf(),v=po();function S(w){let L=v(w);L&&(w=w.slice(L.length+1));let A=x(w),{pragmas:_,comments:G}=p(A);return{shebang:L,text:w,pragmas:_,comments:G}}function k(w){let L=Object.keys(S(w).pragmas);return L.includes("prettier")||L.includes("format")}function F(w){let{shebang:L,text:A,pragmas:_,comments:G}=S(w),N=d(A),O=P({pragmas:Object.assign({format:""},_),comments:G.trimStart()});return(L?`${L}
`:"")+m(O)+(N.startsWith(`
`)?`
`:`
`)+N}h.exports={hasPragma:k,insertPragma:F}}}),Io=$({"src/utils/is-non-empty-array.js"(l,h){"use strict";U();function p(d){return Array.isArray(d)&&d.length>0}h.exports=p}}),No=$({"src/language-js/loc.js"(l,h){"use strict";U();var p=Io();function d(S){var k,F;let w=S.range?S.range[0]:S.start,L=(k=(F=S.declaration)===null||F===void 0?void 0:F.decorators)!==null&&k!==void 0?k:S.decorators;return p(L)?Math.min(d(L[0]),w):w}function x(S){return S.range?S.range[1]:S.end}function P(S,k){let F=d(S);return Number.isInteger(F)&&F===d(k)}function m(S,k){let F=x(S);return Number.isInteger(F)&&F===x(k)}function v(S,k){return P(S,k)&&m(S,k)}h.exports={locStart:d,locEnd:x,hasSameLocStart:P,hasSameLoc:v}}}),ko=$({"src/language-js/parse/utils/create-parser.js"(l,h){"use strict";U();var{hasPragma:p}=$f(),{locStart:d,locEnd:x}=No();function P(m){return m=typeof m=="function"?{parse:m}:m,Object.assign({astFormat:"estree",hasPragma:p,locStart:d,locEnd:x},m)}h.exports=P}}),lr=$({"src/common/parser-create-error.js"(l,h){"use strict";U();function p(d,x){let P=new SyntaxError(d+" ("+x.start.line+":"+x.start.column+")");return P.loc=x,P}h.exports=p}}),Do=$({"src/language-js/parse/utils/create-babel-parse-error.js"(l,h){"use strict";U();var p=lr();function d(x){let{message:P,loc:m}=x;return p(P.replace(/ \(.*\)/,""),{start:{line:m?m.line:0,column:m?m.column+1:0}})}h.exports=d}}),Hf=$({"src/language-js/utils/is-ts-keyword-type.js"(l,h){"use strict";U();function p(d){let{type:x}=d;return x.startsWith("TS")&&x.endsWith("Keyword")}h.exports=p}}),zf=$({"src/language-js/utils/is-block-comment.js"(l,h){"use strict";U();var p=new Set(["Block","CommentBlock","MultiLine"]),d=x=>p.has(x==null?void 0:x.type);h.exports=d}}),Vf=$({"src/language-js/utils/is-type-cast-comment.js"(l,h){"use strict";U();var p=zf();function d(x){return p(x)&&x.value[0]==="*"&&/@(?:type|satisfies)\b/.test(x.value)}h.exports=d}}),Kf=$({"src/utils/get-last.js"(l,h){"use strict";U();var p=d=>d[d.length-1];h.exports=p}}),Wf=$({"src/language-js/parse/postprocess/visit-node.js"(l,h){"use strict";U();function p(d,x){if(Array.isArray(d)){for(let P=0;P<d.length;P++)d[P]=p(d[P],x);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let P=Object.keys(d);for(let m=0;m<P.length;m++)d[P[m]]=p(d[P[m]],x);return x(d)||d}return d}h.exports=p}}),Gf=$({"src/language-js/parse/postprocess/throw-syntax-error.js"(l,h){"use strict";U();var p=lr();function d(x,P){let{start:m,end:v}=x.loc;throw p(P,{start:{line:m.line,column:m.column+1},end:{line:v.line,column:v.column+1}})}h.exports=d}}),Jf=$({"src/language-js/parse/postprocess/index.js"(l,h){"use strict";U();var{locStart:p,locEnd:d}=No(),x=Hf(),P=Vf(),m=Kf(),v=Wf(),S=Gf();function k(A,_){if(_.parser!=="typescript"&&_.parser!=="flow"&&_.parser!=="acorn"&&_.parser!=="espree"&&_.parser!=="meriyah"){let N=new Set;A=v(A,O=>{O.leadingComments&&O.leadingComments.some(P)&&N.add(p(O))}),A=v(A,O=>{if(O.type==="ParenthesizedExpression"){let{expression:H}=O;if(H.type==="TypeCastExpression")return H.range=O.range,H;let R=p(O);if(!N.has(R))return H.extra=Object.assign(Object.assign({},H.extra),{},{parenthesized:!0}),H}})}return A=v(A,N=>{switch(N.type){case"ChainExpression":return F(N.expression);case"LogicalExpression":{if(w(N))return L(N);break}case"VariableDeclaration":{let O=m(N.declarations);O&&O.init&&G(N,O);break}case"TSParenthesizedType":return x(N.typeAnnotation)||N.typeAnnotation.type==="TSThisType"||(N.typeAnnotation.range=[p(N),d(N)]),N.typeAnnotation;case"TSTypeParameter":if(typeof N.name=="string"){let O=p(N);N.name={type:"Identifier",name:N.name,range:[O,O+N.name.length]}}break;case"ObjectExpression":if(_.parser==="typescript"){let O=N.properties.find(H=>H.type==="Property"&&H.value.type==="TSEmptyBodyFunctionExpression");O&&S(O.value,"Unexpected token.")}break;case"SequenceExpression":{let O=m(N.expressions);N.range=[p(N),Math.min(d(O),d(N))];break}case"TopicReference":_.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:O}=N;if(_.parser==="meriyah"&&O&&O.type==="Identifier"){let H=_.originalText.slice(p(O),d(O));(H.startsWi
- Did you mean \`export { '${r}' as '${e}' } from 'some-module'\`?`},ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:t=>{let{type:r}=t;return`'${r==="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:t=>{let{type:r}=t;return`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`},IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:t=>{let{importName:r}=t;return`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${r}" as foo }\`?`},ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:t=>{let{maxArgumentCount:r}=t;return`\`import()\` requires exactly ${r===1?"one argument":"one or two arguments"}.`},ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:t=>{let{radix:r}=t;return`Expected number in radix ${r}.`},InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:t=>{let{reservedWord:r}=t;return`Escape sequence in keyword ${r}.`},InvalidIdentifier:t=>{let{identifierName:r}=t;return`Invalid identifier ${r}.`},InvalidLhs:t=>{let{ancestor:r}=t;return`Invalid left-hand side in ${zt(r)}.`},InvalidLhsBinding:t=>{let{ancestor:r}=t;return`Binding invalid left-hand side in ${zt(r)}.`},InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:t=>{let{unexpected:r}=t;return`Unexpected character '${r}'.`},InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:t=>{let{identifierName:r}=t;return`Private name #${r} is not defined.`},InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:t=>{let{labelName:r}=t;return`Label '${r}' is already declared.`},LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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:t=>{let{missingPlugin:r}=t;return`This experimental syntax requires enabling the parser plugin: ${r.map(e=>JSON.stringify(e)).join(", ")}.`},MissingOneOfPlugins:t=>{let{missingPlugin:r}=t;return`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(e=>JSON.stringify(e)).join(", ")}.`},MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:t=>{let{key:r}=t;return`Duplicate key "${r}" is not allowed in module attributes.`},ModuleExportNameHasLoneSurrogate:t=>{let{surrogateCharCode:r}=t;return`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`},ModuleExportUndefined:t=>{let{localName:r}=t;return`Export '${r}' 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 ar
`,++e,C===13&&r.charCodeAt(e)===10&&++e,++i,g=s=e):a.unterminated(n,o,u):++e}return{pos:e,str:c,firstInvalidLoc:y,lineStart:s,curLine:i,containsInvalid:!!y}}function kl(t,r,e,s){return t==="template"?r===96||r===36&&e.charCodeAt(s+1)===123:r===(t==="double"?34:39)}function Dl(t,r,e,s,i,a){let n=!i;r++;let o=c=>({pos:r,ch:c,lineStart:e,curLine:s}),u=t.charCodeAt(r++);switch(u){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:r}=os(t,r,e,s,2,!1,n,a),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:r}=Lr(t,r,e,s,n,a),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:t.charCodeAt(r)===10&&++r;case 10:e=r,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);a.strictNumericEscape(r-1,e,s);default:if(u>=48&&u<=55){let c=r-1,g=t.slice(c,r+2).match(/^[0-7]+/)[0],T=parseInt(g,8);T>255&&(g=g.slice(0,-1),T=parseInt(g,8)),r+=g.length-1;let C=t.charCodeAt(r);if(g!=="0"||C===56||C===57){if(i)return o(null);a.strictNumericEscape(c,e,s)}return o(String.fromCharCode(T))}return o(String.fromCharCode(u))}}function os(t,r,e,s,i,a,n,o){let u=r,c;return{n:c,pos:r}=Fr(t,r,e,s,16,i,a,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(u,e,s):r=u-1),{code:c,pos:r}}function Fr(t,r,e,s,i,a,n,o,u,c){let y=r,g=i===16?kr.hex:kr.decBinOct,T=i===16?gt.hex:i===10?gt.dec:i===8?gt.oct:gt.bin,C=!1,M=0;for(let j=0,K=a==null?1/0:a;j<K;++j){let W=t.charCodeAt(r),V;if(W===95&&o!=="bail"){let X=t.charCodeAt(r-1),je=t.charCodeAt(r+1);if(o){if(Number.isNaN(je)||!T(je)||g.has(X)||g.has(je)){if(c)return{n:null,pos:r};u.unexpectedNumericSeparator(r,e,s)}}else{if(c)return{n:null,pos:r};u.numericSeparatorInEscapeSequence(r,e,s)}++r;continue}if(W>=97?V=W-97+10:W>=65?V=W-65+10:Nl(W)?V=W-48:V=1/0,V>=i){if(V<=9&&c)return{n:null,pos:r};if(V<=9&&u.invalidDigit(r,e,s,i))V=0;else if(n)V=0,C=!0;else break}++r,M=M*i+V}return r===y||a!=null&&r-y!==a||C?{n:null,pos:r}:{n:M,pos:r}}function Lr(t,r,e,s,i,a){let n=t.charCodeAt(r),o;if(n===123){if(++r,{code:o,pos:r}=os(t,r,e,s,t.indexOf("}",r)-r,!0,i,a),++r,o!==null&&o>1114111)if(i)a.invalidCodePoint(r,e,s);else return{code:null,pos:r}}else({code:o,pos:r}=os(t,r,e,s,4,!1,i,a));return{code:o,pos:r}}var Fl=["at"],Ll=["at"];function Je(t,r,e){return new ge(e,t-r,t)}var Ol=new Set([103,109,115,105,121,117,100,118]),Ae=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new lt(t.startLoc,t.endLoc)}},Bl=class extends Sl{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,s,i,a)=>this.options.errorRecovery?(this.raise(f.InvalidDigit,{at:Je(e,s,i),radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(f.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(f.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(f.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(f.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,s,i)=>{this.recordStrictModeErrors(f.StrictNumericEscape,{at:Je(e,s,i)})},unterminated:(e,s,i)=>{throw this.raise(f.UnterminatedString,{at:Je(e-1,s,i)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(f.StrictNumericEscape),unterminated:(e,s,i)=>{throw this.raise(f.UnterminatedTemplate,{at:Je(e,s,i)})}}),this.state=new Nr,this.state.init(t),this.input=r,this.length=r.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ae(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nex
`:`\r
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(f.UnterminatedString,{at:this.state.startLoc});let a=this.input.charCodeAt(this.state.pos);if(a===e)break;a===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):Ge(a)?(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(131,s)}jsxReadEntity(){let e=++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 a=this.input.slice(e,this.state.pos),n=eh[a];if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(De(e)||e===45);this.finishToken(138,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:$t(this.state.type)?e.name=xe(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(x.brace),this.next(),e=this.jsxParseExpressionContainer(e,x.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Se.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(Se.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(x.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(x.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(x.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(141)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(141);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(141)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(141),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],a=this.jsxParseOpeningElementAt(e),n=null;if(!a.selfClosing){e:for(;;)switch(this.state.t
`),cooked:i===null?null:i.slice(1,u)},n.tail=o,this.next();let y=this.finishNode(n,"TemplateElement");return this.resetEndLocation(y,Y(this.state.lastTokEndLoc,u)),y}parseTemplate(t){let r=this.startNode();r.expressions=[];let e=this.parseTemplateElement(t);for(r.quasis=[e];!e.tail;)r.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.quasis.push(e=this.parseTemplateElement(t));return this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),n=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(o);break}let c;r?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(s),this.checkProto(c,e,a,s)),e&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(f.InvalidRecordProperty,{at:c}),c.shorthand&&this.addExtra(c,"shorthand",!0),o.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return r?u="ObjectPattern":e&&(u="RecordExpression"),this.finishNode(o,u)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStart),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(f.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)r.push(this.parseDecorator());let e=this.startNode(),s=!1,i=!1,a;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(e.decorators=r,r=[]),e.method=!1,t&&(a=this.state.startLoc);let n=this.eat(55);this.parsePropertyNamePrefixOperator(e);let o=this.state.containsEsc,u=this.parsePropertyName(e,t);if(!n&&!o&&this.maybeAsyncOrAccessorProp(e)){let c=u.name;c==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(u),n=this.eat(55),this.parsePropertyName(e)),(c==="get"||c==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(u),e.kind=c,this.match(55)&&(n=!0,this.raise(f.AccessorIsGenerator,{at:this.state.curPosition(),kind:c}),this.next()),this.parsePropertyName(e))}return this.parseObjPropValue(e,a,n,s,!1,i,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let e=this.getGetterSetterExpectedParamCount(t),s=this.getObjectOrClassMethodParams(t);s.length!==e&&this.raise(t.kind==="get"?f.BadGetterArity:f.BadSetterArity,{at:t}),t.kind==="set"&&((r=s[s.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(f.BadSetterRestParameter,{at:t})}parseObjectMethod(t,r,e,s,i){if(i){let a=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(e||r||this.match(10))return s&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,e,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,e,s){if(t.shorthand=!1,this.eat(14))return t.value=e?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),e)t.value=this.parseMaybeDefault(r,me(t.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(f.InvalidCoverInitializedName,{at:i}),t.value=this.parseMaybeDefault(r,me(t.key))}else t.value=me(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,r,e,s,i,a,n){let o=this.parseObjectMethod(t,e,s,i,a)||this.parseObjectProperty(t,r,i,n);return o||this.unexpected(),o}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:e,value:s}=this.stat