27 lines
298 KiB
JavaScript
27 lines
298 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 v=(h,l)=>()=>(l||h((l={exports:{}}).exports,l),l.exports);var z=v((mf,qr)=>{var mt=function(h){return h&&h.Math==Math&&h};qr.exports=mt(typeof globalThis=="object"&&globalThis)||mt(typeof window=="object"&&window)||mt(typeof self=="object"&&self)||mt(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var xe=v((yf,Ur)=>{Ur.exports=function(h){try{return!!h()}catch{return!0}}});var Ie=v((xf,Kr)=>{var Rh=xe();Kr.exports=!Rh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var yt=v((gf,Vr)=>{var jh=xe();Vr.exports=!jh(function(){var h=function(){}.bind();return typeof h!="function"||h.hasOwnProperty("prototype")})});var gt=v((Af,Hr)=>{var qh=yt(),xt=Function.prototype.call;Hr.exports=qh?xt.bind(xt):function(){return xt.apply(xt,arguments)}});var Xr=v(Gr=>{"use strict";var zr={}.propertyIsEnumerable,Wr=Object.getOwnPropertyDescriptor,Uh=Wr&&!zr.call({1:2},1);Gr.f=Uh?function(l){var p=Wr(this,l);return!!p&&p.enumerable}:zr});var hs=v((Tf,Jr)=>{Jr.exports=function(h,l){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:l}}});var ie=v((Ef,Qr)=>{var Yr=yt(),$r=Function.prototype,Kh=$r.bind,us=$r.call,Vh=Yr&&Kh.bind(us,us);Qr.exports=Yr?function(h){return h&&Vh(h)}:function(h){return h&&function(){return us.apply(h,arguments)}}});var At=v((bf,ei)=>{var Zr=ie(),Hh=Zr({}.toString),zh=Zr("".slice);ei.exports=function(h){return zh(Hh(h),8,-1)}});var si=v((vf,ti)=>{var Wh=z(),Gh=ie(),Xh=xe(),Jh=At(),ls=Wh.Object,Yh=Gh("".split);ti.exports=Xh(function(){return!ls("z").propertyIsEnumerable(0)})?function(h){return Jh(h)=="String"?Yh(h,""):ls(h)}:ls});var cs=v((Cf,ri)=>{var $h=z(),Qh=$h.TypeError;ri.exports=function(h){if(h==null)throw Qh("Can't call method on "+h);return h}});var Pt=v((Sf,ii)=>{var Zh=si(),eu=cs();ii.exports=function(h){return Zh(eu(h))}});var ae=v((wf,ai)=>{ai.exports=function(h){return typeof h=="function"}});var ke=v((Nf,ni)=>{var tu=ae();ni.exports=function(h){return typeof h=="object"?h!==null:tu(h)}});var ze=v((If,oi)=>{var ps=z(),su=ae(),ru=function(h){return su(h)?h:void 0};oi.exports=function(h,l){return arguments.length<2?ru(ps[h]):ps[h]&&ps[h][l]}});var ui=v((kf,hi)=>{var iu=ie();hi.exports=iu({}.isPrototypeOf)});var ci=v((Df,li)=>{var au=ze();li.exports=au("navigator","userAgent")||""});var gi=v((Ff,xi)=>{var yi=z(),fs=ci(),pi=yi.process,fi=yi.Deno,di=pi&&pi.versions||fi&&fi.version,mi=di&&di.v8,le,Tt;mi&&(le=mi.split("."),Tt=le[0]>0&&le[0]<4?1:+(le[0]+le[1]));!Tt&&fs&&(le=fs.match(/Edge\/(\d+)/),(!le||le[1]>=74)&&(le=fs.match(/Chrome\/(\d+)/),le&&(Tt=+le[1])));xi.exports=Tt});var ds=v((Lf,Pi)=>{var Ai=gi(),nu=xe();Pi.exports=!!Object.getOwnPropertySymbols&&!nu(function(){var h=Symbol();return!String(h)||!(Object(h)instanceof Symbol)||!Symbol.sham&&Ai&&Ai<41})});var ms=v((Of,Ti)=>{var ou=ds();Ti.exports=ou&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ys=v((Bf,Ei)=>{var hu=z(),uu=ze(),lu=ae(),cu=ui(),pu=ms(),fu=hu.Object;Ei.exports=pu?function(h){return typeof h=="symbol"}:function(h){var l=uu("Symbol");return lu(l)&&cu(l.prototype,fu(h))}});var vi=v((Mf,bi)=>{var du=z(),mu=du.String;bi.exports=function(h){try{return mu(h)}catch{return"Object"}}});var Et=v((_f,Ci)=>{var yu=z(),xu=ae(),gu=vi(),Au=yu.TypeError;Ci.exports=function(h){if(xu(h))return h;throw Au(gu(h)+" is not a function")}});var wi=v((Rf,Si)=>{var Pu=Et();Si.exports=function(h,l){var p=h[l];return p==null?void 0:Pu(p)}});var Ii=v((jf,Ni)=>{var Tu=z(),xs=gt(),gs=ae(),As=ke(),Eu=Tu.TypeError;Ni.exports=function(h,l){var p,d;if(l==="string"&&gs(p=h.toString)&&!As(d=xs(p,h))||gs(p=h.valueOf)&&!As(d=xs(p,h))||l!=="string"&&gs(p=h.toString)&&!As(d=xs(p,h)))return d;throw Eu("Can't convert object to primitive value")}});var Di
|
||
|
`);return m===-1?d:d.slice(0,m)}l.exports=p}}),Dp=H({"src/utils/text/skip-inline-comment.js"(h,l){"use strict";V();function p(d,m){if(m===!1)return!1;if(d.charAt(m)==="/"&&d.charAt(m+1)==="*"){for(let A=m+2;A<d.length;++A)if(d.charAt(A)==="*"&&d.charAt(A+1)==="/")return A+2}return m}l.exports=p}}),Fp=H({"src/utils/text/skip-newline.js"(h,l){"use strict";V();function p(d,m,A){let P=A&&A.backwards;if(m===!1)return!1;let y=d.charAt(m);if(P){if(d.charAt(m-1)==="\r"&&y===`
|
||
|
`)return m-2;if(y===`
|
||
|
`||y==="\r"||y==="\u2028"||y==="\u2029")return m-1}else{if(y==="\r"&&d.charAt(m+1)===`
|
||
|
`)return m+2;if(y===`
|
||
|
`||y==="\r"||y==="\u2028"||y==="\u2029")return m+1}return m}l.exports=p}}),Rn=H({"src/utils/text/skip.js"(h,l){"use strict";V();function p(y){return(u,N,D)=>{let T=D&&D.backwards;if(N===!1)return!1;let{length:L}=u,b=N;for(;b>=0&&b<L;){let q=u.charAt(b);if(y instanceof RegExp){if(!y.test(q))return b}else if(!y.includes(q))return b;T?b--:b++}return b===-1||b===L?b:!1}}var d=p(/\s/),m=p(" "),A=p(",; "),P=p(/[^\n\r]/);l.exports={skipWhitespace:d,skipSpaces:m,skipToLineEnd:A,skipEverythingButNewLine:P}}}),Lp=H({"src/utils/text/skip-trailing-comment.js"(h,l){"use strict";V();var{skipEverythingButNewLine:p}=Rn();function d(m,A){return A===!1?!1:m.charAt(A)==="/"&&m.charAt(A+1)==="/"?p(m,A):A}l.exports=d}}),Op=H({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(h,l){"use strict";V();var p=Dp(),d=Fp(),m=Lp(),{skipSpaces:A}=Rn();function P(y,u){let N=null,D=u;for(;D!==N;)N=D,D=A(y,D),D=p(y,D),D=m(y,D),D=d(y,D);return D}l.exports=P}}),jn={};wp(jn,{EOL:()=>Ys,arch:()=>Bp,cpus:()=>Wn,default:()=>$n,endianness:()=>qn,freemem:()=>Hn,getNetworkInterfaces:()=>Yn,hostname:()=>Un,loadavg:()=>Kn,networkInterfaces:()=>Jn,platform:()=>Mp,release:()=>Xn,tmpDir:()=>Xs,tmpdir:()=>Js,totalmem:()=>zn,type:()=>Gn,uptime:()=>Vn});function qn(){if(typeof Ft>"u"){var h=new ArrayBuffer(2),l=new Uint8Array(h),p=new Uint16Array(h);if(l[0]=1,l[1]=2,p[0]===258)Ft="BE";else if(p[0]===513)Ft="LE";else throw new Error("unable to figure out endianess")}return Ft}function Un(){return typeof globalThis.location<"u"?globalThis.location.hostname:""}function Kn(){return[]}function Vn(){return 0}function Hn(){return Number.MAX_VALUE}function zn(){return Number.MAX_VALUE}function Wn(){return[]}function Gn(){return"Browser"}function Xn(){return typeof globalThis.navigator<"u"?globalThis.navigator.appVersion:""}function Jn(){}function Yn(){}function Bp(){return"javascript"}function Mp(){return"browser"}function Xs(){return"/tmp"}var Ft,Js,Ys,$n,_p=Mn({"node-modules-polyfills:os"(){V(),Js=Xs,Ys=`
|
||
|
`,$n={EOL:Ys,tmpdir:Js,tmpDir:Xs,networkInterfaces:Jn,getNetworkInterfaces:Yn,release:Xn,type:Gn,cpus:Wn,totalmem:zn,freemem:Hn,uptime:Vn,loadavg:Kn,hostname:Un,endianness:qn}}}),Rp=H({"node-modules-polyfills-commonjs:os"(h,l){V();var p=(_p(),Ip(jn));if(p&&p.default){l.exports=p.default;for(let d in p)l.exports[d]=p[d]}else p&&(l.exports=p)}}),jp=H({"node_modules/detect-newline/index.js"(h,l){"use strict";V();var p=d=>{if(typeof d!="string")throw new TypeError("Expected a string");let m=d.match(/(?:\r?\n)/g)||[];if(m.length===0)return;let A=m.filter(y=>y===`\r
|
||
|
`).length,P=m.length-A;return A>P?`\r
|
||
|
`:`
|
||
|
`};l.exports=p,l.exports.graceful=d=>typeof d=="string"&&p(d)||`
|
||
|
`}}),qp=H({"node_modules/jest-docblock/build/index.js"(h){"use strict";V(),Object.defineProperty(h,"__esModule",{value:!0}),h.extract=b,h.parse=J,h.parseWithComments=O,h.print=M,h.strip=q;function l(){let E=Rp();return l=function(){return E},E}function p(){let E=d(jp());return p=function(){return E},E}function d(E){return E&&E.__esModule?E:{default:E}}var m=/\*\/$/,A=/^\/\*\*/,P=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,y=/(^|\s+)\/\/([^\r\n]*)/g,u=/^(\r?\n)+/,N=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,D=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,T=/(\r?\n|^) *\* ?/g,L=[];function b(E){let g=E.match(P);return g?g[0].trimLeft():""}function q(E){let g=E.match(P);return g&&g[0]?E.substring(g[0].length):E}function J(E){return O(E).pragmas}function O(E){let g=(0,p().default)(E)||l().EOL;E=E.replace(A,"").replace(m,"").replace(T,"$1");let ee="";for(;ee!==E;)ee=E,E=E.replace(N,"".concat(g,"$1 $2").concat(g));E=E.replace(u,"").trimRight();let W=Object.create(null),te=E.replace(D,"").replace(u,"").trimRight(),se;for(;se=D.exec(E);){let Ae=se[2].replace(y,"");typeof W[se[1]]=="string"||Array.isArray(W[se[1]])?W[se[1]]=L.concat(W[se[1]],Ae):W[se[1]]=Ae}return{comments:te,pragmas:W}}function M(E){let{comments:g="",pragmas:ee={}}=E,W=(0,p().default)(g)||l().EOL,te="/**",se=" *",Ae=" */",ne=Object.keys(ee),_=ne.map(Y=>B(Y,ee[Y])).reduce((Y,oe)=>Y.concat(oe),[]).map(Y=>se+" "+Y+W).join("");if(!g){if(ne.length===0)return"";if(ne.length===1&&!Array.isArray(ee[ne[0]])){let Y=ee[ne[0]];return"".concat(te," ").concat(B(ne[0],Y)[0]).concat(Ae)}}let G=g.split(W).map(Y=>"".concat(se," ").concat(Y)).join(W)+W;return te+W+(g?G:"")+(g&&ne.length?se+W:"")+_+Ae}function B(E,g){return L.concat(g).map(ee=>"@".concat(E," ").concat(ee).trim())}}}),Up=H({"src/common/end-of-line.js"(h,l){"use strict";V();function p(P){let y=P.indexOf("\r");return y>=0?P.charAt(y+1)===`
|
||
|
`?"crlf":"cr":"lf"}function d(P){switch(P){case"cr":return"\r";case"crlf":return`\r
|
||
|
`;default:return`
|
||
|
`}}function m(P,y){let u;switch(y){case`
|
||
|
`:u=/\n/g;break;case"\r":u=/\r/g;break;case`\r
|
||
|
`:u=/\r\n/g;break;default:throw new Error('Unexpected "eol" '.concat(JSON.stringify(y),"."))}let N=P.match(u);return N?N.length:0}function A(P){return P.replace(/\r\n?/g,`
|
||
|
`)}l.exports={guessEndOfLine:p,convertEndOfLineToChars:d,countEndOfLineChars:m,normalizeEndOfLine:A}}}),Kp=H({"src/language-js/pragma.js"(h,l){"use strict";V();var{parseWithComments:p,strip:d,extract:m,print:A}=qp(),{normalizeEndOfLine:P}=Up(),y=_n();function u(T){let L=y(T);L&&(T=T.slice(L.length+1));let b=m(T),{pragmas:q,comments:J}=p(b);return{shebang:L,text:T,pragmas:q,comments:J}}function N(T){let L=Object.keys(u(T).pragmas);return L.includes("prettier")||L.includes("format")}function D(T){let{shebang:L,text:b,pragmas:q,comments:J}=u(T),O=d(b),M=A({pragmas:Object.assign({format:""},q),comments:J.trimStart()});return(L?"".concat(L,`
|
||
|
`):"")+P(M)+(O.startsWith(`
|
||
|
`)?`
|
||
|
`:`
|
||
|
|
||
|
`)+O}l.exports={hasPragma:N,insertPragma:D}}}),Qn=H({"src/utils/is-non-empty-array.js"(h,l){"use strict";V();function p(d){return Array.isArray(d)&&d.length>0}l.exports=p}}),Zn=H({"src/language-js/loc.js"(h,l){"use strict";V();var p=Qn();function d(u,N){let{ignoreDecorators:D}=N||{};if(!D){let T=u.declaration&&u.declaration.decorators||u.decorators;if(p(T))return d(T[0])}return u.range?u.range[0]:u.start}function m(u){return u.range?u.range[1]:u.end}function A(u,N){let D=d(u);return Number.isInteger(D)&&D===d(N)}function P(u,N){let D=m(u);return Number.isInteger(D)&&D===m(N)}function y(u,N){return A(u,N)&&P(u,N)}l.exports={locStart:d,locEnd:m,hasSameLocStart:A,hasSameLoc:y}}}),eo=H({"src/language-js/parse/utils/create-parser.js"(h,l){"use strict";V();var{hasPragma:p}=Kp(),{locStart:d,locEnd:m}=Zn();function A(P){return P=typeof P=="function"?{parse:P}:P,Object.assign({astFormat:"estree",hasPragma:p,locStart:d,locEnd:m},P)}l.exports=A}}),Zs=H({"src/common/parser-create-error.js"(h,l){"use strict";V();function p(d,m){let A=new SyntaxError(d+" ("+m.start.line+":"+m.start.column+")");return A.loc=m,A}l.exports=p}}),to=H({"src/language-js/parse/utils/create-babel-parse-error.js"(h,l){"use strict";V();var p=Zs();function d(m){let{message:A,loc:P}=m;return p(A.replace(/ \(.*\)/,""),{start:{line:P?P.line:0,column:P?P.column+1:0}})}l.exports=d}}),Vp=H({"src/language-js/utils/is-ts-keyword-type.js"(h,l){"use strict";V();function p(d){let{type:m}=d;return m.startsWith("TS")&&m.endsWith("Keyword")}l.exports=p}}),Hp=H({"src/language-js/utils/is-block-comment.js"(h,l){"use strict";V();function p(d){return d.type==="Block"||d.type==="CommentBlock"||d.type==="MultiLine"}l.exports=p}}),zp=H({"src/language-js/utils/is-type-cast-comment.js"(h,l){"use strict";V();var p=Hp();function d(m){return p(m)&&m.value[0]==="*"&&/@type\b/.test(m.value)}l.exports=d}}),Wp=H({"src/utils/get-last.js"(h,l){"use strict";V();var p=d=>d[d.length-1];l.exports=p}}),so=H({"src/language-js/parse/postprocess/visit-node.js"(h,l){"use strict";V();function p(d,m){if(Array.isArray(d)){for(let A=0;A<d.length;A++)d[A]=p(d[A],m);return d}if(d&&typeof d=="object"&&typeof d.type=="string"){let A=Object.keys(d);for(let P=0;P<A.length;P++)d[A[P]]=p(d[A[P]],m);return m(d)||d}return d}l.exports=p}}),Gp=H({"src/language-js/parse/postprocess/typescript.js"(h,l){"use strict";V();var p=Zs(),d=so();function m(u,N){let{start:D,end:T}=u.loc;throw p(N,{start:{line:D.line,column:D.column+1},end:{line:T.line,column:T.column+1}})}function A(u,N,D){let T=u.decorators;if(!Array.isArray(T))return;let L=N.decorators;(!Array.isArray(L)||L.length!==T.length||T.some(b=>{let q=D.get(b);return!q||!L.includes(q)}))&&m(N,"Leading decorators must be attached to a class declaration")}function P(u,N){u.kind!==166||u.modifiers&&!u.modifiers.some(L=>L.kind===126)||u.initializer&&N.value===null&&m(N,"Abstract property cannot have an initializer")}function y(u,N){let{esTreeNodeToTSNodeMap:D,tsNodeToESTreeNodeMap:T}=N.tsParseResult;d(u,L=>{let b=D.get(L);if(!b)return;let q=T.get(b);q===L&&(A(b,q,T),P(b,q))})}l.exports={throwErrorForInvalidNodes:y}}}),Xp=H({"src/language-js/parse/postprocess/index.js"(h,l){"use strict";V();var{locStart:p,locEnd:d}=Zn(),m=Vp(),A=zp(),P=Wp(),y=so(),{throwErrorForInvalidNodes:u}=Gp();function N(b,q){if(q.parser==="typescript"&&/@|abstract/.test(q.originalText)&&u(b,q),q.parser!=="typescript"&&q.parser!=="flow"&&q.parser!=="acorn"&&q.parser!=="espree"&&q.parser!=="meriyah"){let O=new Set;b=y(b,M=>{M.leadingComments&&M.leadingComments.some(A)&&O.add(p(M))}),b=y(b,M=>{if(M.type==="ParenthesizedExpression"){let{expression:B}=M;if(B.type==="TypeCastExpression")return B.range=M.range,B;let E=p(M);if(!O.has(E))return B.extra=Object.assign(Object.assign({},B.extra),{},{parenthesized:!0}),B}})}return b=y(b,O=>{switch(O.type){case"ChainExpression":return D(O.expression);case"LogicalExpression":{if(T(O))return L(O);break}case"VariableDeclaration":{let M=P(O.declarations);M&&M.init&&J(O,M);break}case"TSParenthesizedType":return m(O.typeAnnotation)||O.typeAnnotation.type==="TSThisType"||(
|
||
|
`;break;default:t+=String.fromCharCode(r);break}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}recordStrictModeErrors(t,e){this.state.strict&&!this.state.strictErrors.has(e.index)?this.raise(t,{at:e}):this.state.strictErrors.set(e.index,{loc:e,message:t})}readEscapedChar(t){let e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return`
|
||
|
`;case 114:return"\r";case 120:{let r=this.readHexChar(2,!1,e);return r===null?null:String.fromCharCode(r)}case 117:{let r=this.readCodePoint(e);return r===null?null:String.fromCodePoint(r)}case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.state.pos)===10&&++this.state.pos;case 10:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t)return null;this.recordStrictModeErrors(u.StrictNumericEscape,$(this.state.curPosition(),-1));default:if(s>=48&&s<=55){let r=$(this.state.curPosition(),-1),a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(a,8);n>255&&(a=a.slice(0,-1),n=parseInt(a,8)),this.state.pos+=a.length-1;let o=this.input.charCodeAt(this.state.pos);if(a!=="0"||o===56||o===57){if(t)return null;this.recordStrictModeErrors(u.StrictNumericEscape,r)}return String.fromCharCode(n)}return String.fromCharCode(s)}}readHexChar(t,e,s){let r=this.state.curPosition(),i=this.readInt(16,t,e,!1);return i===null&&(s?this.raise(u.InvalidEscapeSequence,{at:r}):this.state.pos=r.index-1),i}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(Le(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),n=this.state.pos===s?fe:Le;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(u.MissingUnicodeEscape,{at:this.state.curPosition()}),r=this.state.pos-1;continue}++this.state.pos;let o=this.readCodePoint(!0);o!==null&&(n(o)||this.raise(u.EscapedCharNotAnIdentifier,{at:a}),e+=String.fromCodePoint(o)),r=this.state.pos}else break}return e+this.input.slice(r,this.state.pos)}readWord(t){let e=this.readWord1(t),s=ne.get(e);s!==void 0?this.finishToken(s,Pe(s)):this.finishToken(128,e)}checkKeywordEscapes(){let{type:t}=this.state;Rt(t)&&this.state.containsEsc&&this.raise(u.InvalidEscapedReservedWord,{at:this.state.startLoc},Pe(t))}updateContext(t){}},zo=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Wo=class{constructor(t){this.stack=[],this.undefinedPrivateNames=new Map,this.raise=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new zo)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.raise(u.InvalidPrivateFieldResolution,{at:r},s)}declarePrivateName(t,e,s){let{privateNames:r,loneAccessors:i,undefinedPrivateNames:a}=this.current(),n=r.has(t);if(e&Jt){let o=n&&i.get(t);if(o){let c=o&ht,f=e&ht,x=o&Jt,C=e&Jt;n=x===C||c!==f,n||i.delete(t)}else n||i.set(t,e)}n&&this.raise(u.PrivateNameRedeclaration,{at:s},t),r.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.raise(u.InvalidPrivateFieldResolution,{at:e},t)}},Go=0,Tr=1,ts=2,Er=3,lt=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Go;this.type=void 0,this.type=t}canBeArrowParameterDeclaration(){return this.type===ts||this.type===Tr}isCertainlyParameterDeclaration(){return this.type===Er}},br=class extends lt{constructor(t){super(t);this.errors=new Map}recordDeclarationError(t,e){this.errors.set(e.index,{message:t,loc:e})}clearDeclarationError(t){this.errors.delete(t.index)}iterateErrors(t){this.errors.forEach(t)}},Xo=class{constructor(t){this.stack=[new lt],this.raise=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){let{stack:s}=this,r=s.length-1,i=s[r];for(;!i.isCertainlyParameterDeclaration();){if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,t);else return;i=s[--r]}this.raise(e,{at:t})}recordParenthesizedIdentifierError(t,e){let{stack:s}=this,r=s[s.length-1];if(r.isCertainlyParameterDeclaration())this.raise(t,{at:e});else if(r.canBeArrowParameterDeclar
|
||
|
`:`\r
|
||
|
`):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(u.UnterminatedString,{at:this.state.startLoc});let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):we(i)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return s+=this.input.slice(r,this.state.pos++),this.finishToken(129,s)}jsxReadEntity(){let e="",s=0,r,i=this.input[this.state.pos],a=++this.state.pos;for(;this.state.pos<this.length&&s++<10;){if(i=this.input[this.state.pos++],i===";"){e[0]==="#"?e[1]==="x"?(e=e.substr(2),lh.test(e)&&(r=String.fromCodePoint(parseInt(e,16)))):(e=e.substr(1),ch.test(e)&&(r=String.fromCodePoint(parseInt(e,10)))):r=uh[e];break}e+=i}return r||(this.state.pos=a,"&")}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Le(e)||e===45);return this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(136)?e.name=this.state.value:Rt(this.state.type)?e.name=Pe(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.start,s=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(14))return r;let i=this.startNodeAt(e,s);return i.namespace=r,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.start,s=this.state.startLoc,r=this.jsxParseNamespacedName();if(r.type==="JSXNamespacedName")return r;for(;this.eat(16);){let i=this.startNodeAt(e,s);i.object=r,i.property=this.jsxParseIdentifier(),r=this.finishNode(i,"JSXMemberExpression")}return r}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(B.brace),this.next(),e=this.jsxParseExpressionContainer(e,B.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Ne.AttributeIsEmpty,{node:e}),e;case 138:case 129:return this.parseExprAtom();default:throw this.raise(Ne.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc.index,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(B.j_oTag),this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();e.expression=r}return this.setContext(s),this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(B.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(B.j_oTag),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,s){let r=this.startNodeAt(e,s);return this.match(139)?(this.expect(139),this.finishNode(r,"JSXOpeningFragment")):(r.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(r))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(139);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(139),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e,s){let r=this.startNodeAt(e,s);return this.match(139)?(this.expect(139),this.finishNode(r,"JSXClosingFragment")):(r.name=this.jsxParseElementName(),this.expect(139),this.finishNode(r,"JSXClosingElement"))}jsxParseElementAt(e,s){let r=this.startNodeAt(e,s),i=[],a=this.jsxParseOpeningElementAt(e,s),n=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case 138:if(e=this.state.start,s=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(e,s);break e}i.p
|
||
|
`),cooked:i===null?null:i.slice(1,c)},n.tail=o,this.next(),this.finishNode(n,"TemplateElement"),this.resetEndLocation(n,$(this.state.lastTokEndLoc,c)),n}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&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 f;e?f=this.parseBindingProperty():(f=this.parsePropertyDefinition(r),this.checkProto(f,s,a,r)),s&&!this.isObjectProperty(f)&&f.type!=="SpreadElement"&&this.raise(u.InvalidRecordProperty,{node:f}),f.shorthand&&this.addExtra(f,"shorthand",!0),o.properties.push(f)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return e?c="ObjectPattern":s&&(c="RecordExpression"),this.finishNode(o,c)}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 e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(u.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),r=!1,i=!1,a,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.start,n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let c=this.state.containsEsc,f=this.parsePropertyName(s,t);if(!o&&!c&&this.maybeAsyncOrAccessorProp(s)){let x=f.name;x==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(f),o=this.eat(55),this.parsePropertyName(s)),(x==="get"||x==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(f),s.kind=x,this.match(55)&&(o=!0,this.raise(u.AccessorIsGenerator,{at:this.state.curPosition()},x),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,n,o,r,!1,i,t),s}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?u.BadGetterArity:u.BadSetterArity,{node:t}),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(u.BadSetterRestParameter,{node:t})}parseObjectMethod(t,e,s,r,i){if(i)return this.parseMethod(t,e,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t;if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r,i){if(t.shorthand=!1,this.eat(14))return t.value=r?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),r)t.value=this.parseMaybeDefault(e,s,ye(t.key));else if(this.match(29)){let a=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=a):this.raise(u.InvalidCoverInitializedName,{at:a}),t.value=this.parseMaybeDefault(e,s,ye(t.key))}else t.value=ye(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,i,a,n,o){let c=this.parseObjectMethod(t,r,i,a,n)||this.parseObjectProperty(t,e,s,a,o);return c||this.unexpected(),c}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);e
|