hugo-batsite/node_modules/prettier/esm/parser-espree.mjs

27 lines
150 KiB
JavaScript
Raw Normal View History

2022-05-27 15:11:53 +00:00
"use strict";var k=(n,o)=>()=>(o||n((o={exports:{}}).exports,o),o.exports);var $=k((Bh,qr)=>{var Ze=function(n){return n&&n.Math==Math&&n};qr.exports=Ze(typeof globalThis=="object"&&globalThis)||Ze(typeof window=="object"&&window)||Ze(typeof self=="object"&&self)||Ze(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ye=k((Th,Mr)=>{Mr.exports=function(n){try{return!!n()}catch{return!0}}});var _e=k((Ih,Ur)=>{var Za=ye();Ur.exports=!Za(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Ct=k((Ph,zr)=>{var $a=ye();zr.exports=!$a(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})});var et=k((Nh,Wr)=>{var en=Ct(),$e=Function.prototype.call;Wr.exports=en?$e.bind($e):function(){return $e.apply($e,arguments)}});var Hr=k(Xr=>{"use strict";var Gr={}.propertyIsEnumerable,Kr=Object.getOwnPropertyDescriptor,tn=Kr&&!Gr.call({1:2},1);Xr.f=tn?function(o){var u=Kr(this,o);return!!u&&u.enumerable}:Gr});var Et=k((Oh,Jr)=>{Jr.exports=function(n,o){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:o}}});var ce=k((Lh,Zr)=>{var Yr=Ct(),Qr=Function.prototype,rn=Qr.bind,bt=Qr.call,sn=Yr&&rn.bind(bt,bt);Zr.exports=Yr?function(n){return n&&sn(n)}:function(n){return n&&function(){return bt.apply(n,arguments)}}});var ti=k((Vh,ei)=>{var $r=ce(),an=$r({}.toString),nn=$r("".slice);ei.exports=function(n){return nn(an(n),8,-1)}});var ii=k((Rh,ri)=>{var on=$(),un=ce(),hn=ye(),ln=ti(),_t=on.Object,cn=un("".split);ri.exports=hn(function(){return!_t("z").propertyIsEnumerable(0)})?function(n){return ln(n)=="String"?cn(n,""):_t(n)}:_t});var St=k((jh,si)=>{var pn=$(),fn=pn.TypeError;si.exports=function(n){if(n==null)throw fn("Can't call method on "+n);return n}});var tt=k((qh,ai)=>{var dn=ii(),mn=St();ai.exports=function(n){return dn(mn(n))}});var pe=k((Mh,ni)=>{ni.exports=function(n){return typeof n=="function"}});var Ie=k((Uh,oi)=>{var vn=pe();oi.exports=function(n){return typeof n=="object"?n!==null:vn(n)}});var rt=k((zh,ui)=>{var wt=$(),gn=pe(),xn=function(n){return gn(n)?n:void 0};ui.exports=function(n,o){return arguments.length<2?xn(wt[n]):wt[n]&&wt[n][o]}});var li=k((Wh,hi)=>{var yn=ce();hi.exports=yn({}.isPrototypeOf)});var pi=k((Gh,ci)=>{var An=rt();ci.exports=An("navigator","userAgent")||""});var yi=k((Kh,xi)=>{var gi=$(),kt=pi(),fi=gi.process,di=gi.Deno,mi=fi&&fi.versions||di&&di.version,vi=mi&&mi.v8,he,it;vi&&(he=vi.split("."),it=he[0]>0&&he[0]<4?1:+(he[0]+he[1]));!it&&kt&&(he=kt.match(/Edge\/(\d+)/),(!he||he[1]>=74)&&(he=kt.match(/Chrome\/(\d+)/),he&&(it=+he[1])));xi.exports=it});var Ft=k((Xh,Ci)=>{var Ai=yi(),Cn=ye();Ci.exports=!!Object.getOwnPropertySymbols&&!Cn(function(){var n=Symbol();return!String(n)||!(Object(n)instanceof Symbol)||!Symbol.sham&&Ai&&Ai<41})});var Bt=k((Hh,Ei)=>{var En=Ft();Ei.exports=En&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Tt=k((Jh,bi)=>{var bn=$(),_n=rt(),Sn=pe(),wn=li(),kn=Bt(),Fn=bn.Object;bi.exports=kn?function(n){return typeof n=="symbol"}:function(n){var o=_n("Symbol");return Sn(o)&&wn(o.prototype,Fn(n))}});var Si=k((Yh,_i)=>{var Bn=$(),Tn=Bn.String;_i.exports=function(n){try{return Tn(n)}catch{return"Object"}}});var ki=k((Qh,wi)=>{var In=$(),Pn=pe(),Nn=Si(),Dn=In.TypeError;wi.exports=function(n){if(Pn(n))return n;throw Dn(Nn(n)+" is not a function")}});var Bi=k((Zh,Fi)=>{var On=ki();Fi.exports=function(n,o){var u=n[o];return u==null?void 0:On(u)}});var Ii=k(($h,Ti)=>{var Ln=$(),It=et(),Pt=pe(),Nt=Ie(),Vn=Ln.TypeError;Ti.exports=function(n,o){var u,l;if(o==="string"&&Pt(u=n.toString)&&!Nt(l=It(u,n))||Pt(u=n.valueOf)&&!Nt(l=It(u,n))||o!=="string"&&Pt(u=n.toString)&&!Nt(l=It(u,n)))return l;throw Vn("Can't convert object to primitive value")}});var Ni=k((el,Pi)=>{Pi.exports=!1});var st=k((tl,Oi)=>{var Di=$(),Rn=Object.defineProperty;Oi.exports=function(n,o){try{Rn(Di,n,{value:o,configurable:!0,writable:!0})}catch{Di[n]=o}return o}});var at=k((rl,Vi)=>{var jn=$(),qn=st(),Li="__core-js_shared__",Mn=jn[Li]||qn(Li,{});Vi.exports=Mn});var Dt=k((il,ji)=>{var Un=Ni(),Ri=at(
`,Sa={EOL:or,tmpdir:nr,tmpDir:ar,networkInterfaces:ba,getNetworkInterfaces:_a,release:Ea,type:Ca,cpus:Aa,totalmem:ya,freemem:xa,uptime:ga,loadavg:va,hostname:ma,endianness:da}}}),lh=Y({"node-modules-polyfills-commonjs:os"(n,o){J();var u=(hh(),nh(fa));if(u&&u.default){o.exports=u.default;for(let l in u)o.exports[l]=u[l]}else u&&(o.exports=u)}}),ch=Y({"node_modules/detect-newline/index.js"(n,o){"use strict";J();var u=l=>{if(typeof l!="string")throw new TypeError("Expected a string");let x=l.match(/(?:\r?\n)/g)||[];if(x.length===0)return;let b=x.filter(w=>w===`\r
`).length,A=x.length-b;return b>A?`\r
`:`
`};o.exports=u,o.exports.graceful=l=>typeof l=="string"&&u(l)||`
`}}),ph=Y({"node_modules/jest-docblock/build/index.js"(n){"use strict";J(),Object.defineProperty(n,"__esModule",{value:!0}),n.extract=d,n.parse=K,n.parseWithComments=m,n.print=N,n.strip=C;function o(){let B=lh();return o=function(){return B},B}function u(){let B=l(ch());return u=function(){return B},B}function l(B){return B&&B.__esModule?B:{default:B}}var x=/\*\/$/,b=/^\/\*\*/,A=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,w=/(^|\s+)\/\/([^\r\n]*)/g,E=/^(\r?\n)+/,g=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,O=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,V=/(\r?\n|^) *\* ?/g,I=[];function d(B){let H=B.match(A);return H?H[0].trimLeft():""}function C(B){let H=B.match(A);return H&&H[0]?B.substring(H[0].length):B}function K(B){return m(B).pragmas}function m(B){let H=(0,u().default)(B)||o().EOL;B=B.replace(b,"").replace(x,"").replace(V,"$1");let L="";for(;L!==B;)L=B,B=B.replace(g,"".concat(H,"$1 $2").concat(H));B=B.replace(E,"").trimRight();let i=Object.create(null),_=B.replace(O,"").replace(E,"").trimRight(),T;for(;T=O.exec(B);){let q=T[2].replace(w,"");typeof i[T[1]]=="string"||Array.isArray(i[T[1]])?i[T[1]]=I.concat(i[T[1]],q):i[T[1]]=q}return{comments:_,pragmas:i}}function N(B){let{comments:H="",pragmas:L={}}=B,i=(0,u().default)(H)||o().EOL,_="/**",T=" *",q=" */",ee=Object.keys(L),ae=ee.map(ie=>j(ie,L[ie])).reduce((ie,Ne)=>ie.concat(Ne),[]).map(ie=>T+" "+ie+i).join("");if(!H){if(ee.length===0)return"";if(ee.length===1&&!Array.isArray(L[ee[0]])){let ie=L[ee[0]];return"".concat(_," ").concat(j(ee[0],ie)[0]).concat(q)}}let te=H.split(i).map(ie=>"".concat(T," ").concat(ie)).join(i)+i;return _+i+(H?te:"")+(H&&ee.length?T+i:"")+ae+q}function j(B,H){return I.concat(H).map(L=>"@".concat(B," ").concat(L).trim())}}}),fh=Y({"src/common/end-of-line.js"(n,o){"use strict";J();function u(A){let w=A.indexOf("\r");return w>=0?A.charAt(w+1)===`
`?"crlf":"cr":"lf"}function l(A){switch(A){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function x(A,w){let E;switch(w){case`
`:E=/\n/g;break;case"\r":E=/\r/g;break;case`\r
`:E=/\r\n/g;break;default:throw new Error('Unexpected "eol" '.concat(JSON.stringify(w),"."))}let g=A.match(E);return g?g.length:0}function b(A){return A.replace(/\r\n?/g,`
`)}o.exports={guessEndOfLine:u,convertEndOfLineToChars:l,countEndOfLineChars:x,normalizeEndOfLine:b}}}),dh=Y({"src/language-js/utils/get-shebang.js"(n,o){"use strict";J();function u(l){if(!l.startsWith("#!"))return"";let x=l.indexOf(`
`);return x===-1?l:l.slice(0,x)}o.exports=u}}),mh=Y({"src/language-js/pragma.js"(n,o){"use strict";J();var{parseWithComments:u,strip:l,extract:x,print:b}=ph(),{normalizeEndOfLine:A}=fh(),w=dh();function E(V){let I=w(V);I&&(V=V.slice(I.length+1));let d=x(V),{pragmas:C,comments:K}=u(d);return{shebang:I,text:V,pragmas:C,comments:K}}function g(V){let I=Object.keys(E(V).pragmas);return I.includes("prettier")||I.includes("format")}function O(V){let{shebang:I,text:d,pragmas:C,comments:K}=E(V),m=l(d),N=b({pragmas:Object.assign({format:""},C),comments:K.trimStart()});return(I?"".concat(I,`
`):"")+A(N)+(m.startsWith(`
`)?`
`:`
`)+m}o.exports={hasPragma:g,insertPragma:O}}}),vh=Y({"src/utils/is-non-empty-array.js"(n,o){"use strict";J();function u(l){return Array.isArray(l)&&l.length>0}o.exports=u}}),wa=Y({"src/language-js/loc.js"(n,o){"use strict";J();var u=vh();function l(E,g){let{ignoreDecorators:O}=g||{};if(!O){let V=E.declaration&&E.declaration.decorators||E.decorators;if(u(V))return l(V[0])}return E.range?E.range[0]:E.start}function x(E){return E.range?E.range[1]:E.end}function b(E,g){let O=l(E);return Number.isInteger(O)&&O===l(g)}function A(E,g){let O=x(E);return Number.isInteger(O)&&O===x(g)}function w(E,g){return b(E,g)&&A(E,g)}o.exports={locStart:l,locEnd:x,hasSameLocStart:b,hasSameLoc:w}}}),ka=Y({"src/language-js/parse/utils/create-parser.js"(n,o){"use strict";J();var{hasPragma:u}=mh(),{locStart:l,locEnd:x}=wa();function b(A){return A=typeof A=="function"?{parse:A}:A,Object.assign({astFormat:"estree",hasPragma:u,locStart:l,locEnd:x},A)}o.exports=b}}),gh=Y({"src/language-js/utils/is-ts-keyword-type.js"(n,o){"use strict";J();function u(l){let{type:x}=l;return x.startsWith("TS")&&x.endsWith("Keyword")}o.exports=u}}),xh=Y({"src/language-js/utils/is-block-comment.js"(n,o){"use strict";J();function u(l){return l.type==="Block"||l.type==="CommentBlock"||l.type==="MultiLine"}o.exports=u}}),yh=Y({"src/language-js/utils/is-type-cast-comment.js"(n,o){"use strict";J();var u=xh();function l(x){return u(x)&&x.value[0]==="*"&&/@type\b/.test(x.value)}o.exports=l}}),Ah=Y({"src/utils/get-last.js"(n,o){"use strict";J();var u=l=>l[l.length-1];o.exports=u}}),Fa=Y({"src/language-js/parse/postprocess/visit-node.js"(n,o){"use strict";J();function u(l,x){if(Array.isArray(l)){for(let b=0;b<l.length;b++)l[b]=u(l[b],x);return l}if(l&&typeof l=="object"&&typeof l.type=="string"){let b=Object.keys(l);for(let A=0;A<b.length;A++)l[b[A]]=u(l[b[A]],x);return x(l)||l}return l}o.exports=u}}),Ch=Y({"src/language-js/parse/postprocess/typescript.js"(n,o){"use strict";J();var u=lr(),l=Fa();function x(E,g){let{start:O,end:V}=E.loc;throw u(g,{start:{line:O.line,column:O.column+1},end:{line:V.line,column:V.column+1}})}function b(E,g,O){let V=E.decorators;if(!Array.isArray(V))return;let I=g.decorators;(!Array.isArray(I)||I.length!==V.length||V.some(d=>{let C=O.get(d);return!C||!I.includes(C)}))&&x(g,"Leading decorators must be attached to a class declaration")}function A(E,g){E.kind!==166||E.modifiers&&!E.modifiers.some(I=>I.kind===126)||E.initializer&&g.value===null&&x(g,"Abstract property cannot have an initializer")}function w(E,g){let{esTreeNodeToTSNodeMap:O,tsNodeToESTreeNodeMap:V}=g.tsParseResult;l(E,I=>{let d=O.get(I);if(!d)return;let C=V.get(d);C===I&&(b(d,C,V),A(d,C))})}o.exports={throwErrorForInvalidNodes:w}}}),Ba=Y({"src/language-js/parse/postprocess/index.js"(n,o){"use strict";J();var{locStart:u,locEnd:l}=wa(),x=gh(),b=yh(),A=Ah(),w=Fa(),{throwErrorForInvalidNodes:E}=Ch();function g(d,C){if(C.parser==="typescript"&&/@|abstract/.test(C.originalText)&&E(d,C),C.parser!=="typescript"&&C.parser!=="flow"&&C.parser!=="acorn"&&C.parser!=="espree"&&C.parser!=="meriyah"){let m=new Set;d=w(d,N=>{N.leadingComments&&N.leadingComments.some(b)&&m.add(u(N))}),d=w(d,N=>{if(N.type==="ParenthesizedExpression"){let{expression:j}=N;if(j.type==="TypeCastExpression")return j.range=N.range,j;let B=u(N);if(!m.has(B))return j.extra=Object.assign(Object.assign({},j.extra),{},{parenthesized:!0}),j}})}return d=w(d,m=>{switch(m.type){case"ChainExpression":return O(m.expression);case"LogicalExpression":{if(V(m))return I(m);break}case"VariableDeclaration":{let N=A(m.declarations);N&&N.init&&K(m,N);break}case"TSParenthesizedType":return x(m.typeAnnotation)||m.typeAnnotation.type==="TSThisType"||(m.typeAnnotation.range=[u(m),l(m)]),m.typeAnnotation;case"TSTypeParameter":if(typeof m.name=="string"){let N=u(m);m.name={type:"Identifier",name:m.name,range:[N,N+m.name.length]}}break;case"SequenceExpression":{let N=A(m.expressions);m.range=[u(m),Math.min(l(N),l(m))];break}case"TopicReference":C.__isUsingHackPipeline=!0;break;case"ExportAllDeclaration":{let{exported:N}=m;if(C.parser==="meriyah"&&N&&N.type
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),S(t.onToken)){var s=t.onToken;t.onToken=function(a){return s.push(a)}}return S(t.onComment)&&(t.onComment=ft(t,t.onComment)),t}function ft(e,t){return function(r,s,a,h,c,v){var y={type:r?"Block":"Line",value:s,start:a,end:h};e.locations&&(y.loc=new X(this,c,v)),e.ranges&&(y.range=[a,h]),t.push(y)}}var Ee=1,ge=2,De=4,Ue=8,cr=16,pr=32,dt=64,fr=128,Oe=256,mt=Ee|ge|Oe;function vt(e,t){return ge|(e?De:0)|(t?Ue:0)}var ze=0,gt=1,fe=2,dr=3,mr=4,vr=5,Z=function(t,r,s){this.options=t=pt(t),this.sourceFile=t.sourceFile,this.keywords=f(b[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var a="";t.allowReserved!==!0&&(a=l[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(a+=" await")),this.reservedWords=f(a);var h=(a?a+" ":"")+l.strict;this.reservedWordsStrict=f(h),this.reservedWordsStrictBind=f(h+" "+l.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=i.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ee),this.regexpState=null,this.privateNameStack=[]},le={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Z.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},le.inFunction.get=function(){return(this.currentVarScope().flags&ge)>0},le.inGenerator.get=function(){return(this.currentVarScope().flags&Ue)>0&&!this.currentVarScope().inClassFieldInit},le.inAsync.get=function(){return(this.currentVarScope().flags&De)>0&&!this.currentVarScope().inClassFieldInit},le.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Oe)return!1;if(t.flags&ge)return(t.flags&De)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},le.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&dt)>0||r||this.options.allowSuperOutsideMethod},le.allowDirectSuper.get=function(){return(this.currentThisScope().flags&fr)>0},le.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},le.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(ge|Oe))>0||r},le.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Oe)>0},Z.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var s=this,a=0;a<t.length;a++)s=t[a](s);return s},Z.parse=function(t,r){return new this(r,t).parse()},Z.parseExpressionAt=function(t,r,s){var a=new this(s,t,r);return a.nextToken(),a.parseExpression()},Z.tokenizer=function(t,r){return new this(r,t)},Object.defineProperties(Z.prototype,le);var se=Z.prototype,Ia=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;se.strictDirective=function(e){for(;;){te.lastIndex=e,e+=te.exec(this.input)[0].length;var t=Ia.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){te.lastIndex=e+t[0].length;var r=te.exec(this.input),s=r.index+r[0].length,a=this.input.charAt(s);return a===";"||a==="}"||_.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(a)||a==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,te.lastIndex=e,e+=te.exec(this.input)[0].length,this.input[e]===";"&&e++}},se.eat=function(e){return this.type===e?(this.next(),!0):!1},se.isContextual=function(e){return this.type===i.name&&this.value===e&&!this.containsEsc},se.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},se.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},se.canInsertSemicolon=function(){return this.type===i.eof||this.type===i.braceR||_.test(this.input.slice(this.lastTokEnd,this.start))},se.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},se.semicolon=function(){!this.eat(i.semi)&&!this.insertSemicolon()&&this.unexpected()},se.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},se.expect
`),cooked:this.value},this.next(),r.tail=this.type===i.backQuote,this.finishNode(r,"TemplateElement")},U.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(r.quasis=[s];!s.tail;)this.type===i.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(i.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(i.braceR),r.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")},U.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===i.name||this.type===i.num||this.type===i.string||this.type===i.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===i.star)&&!_.test(this.input.slice(this.lastTokEnd,this.start))},U.parseObj=function(e,t){var r=this.startNode(),s=!0,a={};for(r.properties=[],this.next();!this.eat(i.braceR);){if(s)s=!1;else if(this.expect(i.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(i.braceR))break;var h=this.parseProperty(e,t);e||this.checkPropClash(h,a,t),r.properties.push(h)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},U.parseProperty=function(e,t){var r=this.startNode(),s,a,h,c;if(this.options.ecmaVersion>=9&&this.eat(i.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===i.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(this.type===i.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),r.argument=this.parseMaybeAssign(!1,t),this.type===i.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(h=this.start,c=this.startLoc),e||(s=this.eat(i.star)));var v=this.containsEsc;return this.parsePropertyName(r),!e&&!v&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(r)?(a=!0,s=this.options.ecmaVersion>=9&&this.eat(i.star),this.parsePropertyName(r,t)):a=!1,this.parsePropertyValue(r,e,s,a,h,c,t,v),this.finishNode(r,"Property")},U.parsePropertyValue=function(e,t,r,s,a,h,c,v){if((r||s)&&this.type===i.colon&&this.unexpected(),this.eat(i.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,c),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===i.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,s);else if(!t&&!v&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==i.comma&&this.type!==i.braceR&&this.type!==i.eq){(r||s)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var y=e.kind==="get"?0:1;if(e.value.params.length!==y){var M=e.value.start;e.kind==="get"?this.raiseRecoverable(M,"getter should have no params"):this.raiseRecoverable(M,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=a),e.kind="init",t?e.value=this.parseMaybeDefault(a,h,this.copyNode(e.key)):this.type===i.eq&&c?(c.shorthandAssign<0&&(c.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,h,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()},U.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(i.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(i.bracketR),e.key;e.computed=!1}return e.key=this.type===i.num||this.type===i.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},U.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.opti
`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},W.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(i.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},W.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ye(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(s,8);return a>255&&(s=s.slice(0,-1),a=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return q(t)?"":String.fromCharCode(t)}},W.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r},W.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(K(a,s))this.pos+=a<=65535?1:2;else if(a===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var h=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var c=this.readCodePoint();(t?C:K)(c,s)||this.invalidStringToken(h,"Invalid Unicode escape"),e+=Ye(c),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)},W.readWord=function(){var e=this.readWord1(),t=i.name;return this.keywords.test(e)&&(t=H[e]),this.finishToken(t,e)};var jr="8.7.0";Z.acorn={Parser:Z,version:jr,defaultOptions:me,Position:G,SourceLocation:X,getLineInfo:oe,Node:Ve,TokenType:m,tokTypes:i,keywordTypes:H,TokContext:ne,tokContexts:Q,isIdentifierChar:K,isIdentifierStart:C,Token:Je,isNewLine:q,lineBreak:_,lineBreakG:T,nonASCIIwhitespace:ae};function Ja(e,t){return Z.parse(e,t)}function Ya(e,t,r){return Z.parseExpressionAt(e,t,r)}function Qa(e,t){return Z.tokenizer(e,t)}u.Node=Ve,u.Parser=Z,u.Position=G,u.SourceLocation=X,u.TokContext=ne,u.Token=Je,u.TokenType=m,u.defaultOptions=me,u.getLineInfo=oe,u.isIdentifierChar=K,u.isIdentifierStart=C,u.isNewLine=q,u.keywordTypes=H,u.lineBreak=_,u.lineBreakG=T,u.nonASCIIwhitespace=ae,u.parse=Ja,u.parseExpressionAt=Ya,u.tokContexts=Q,u.tokTypes=i,u.tokenizer=Qa,u.version=jr,Object.defineProperty(u,"__esModule",{value:!0})})}}),Eh=Y({"node_modules/acorn-jsx/xhtml.js"(n,o){J(),o.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u039
`:`\r
`):T=String.fromCharCode(_),this.options.locations&&(++this.curLine,this.lineStart=this.pos),T}jsx_readString(i){let _="",T=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let q=this.input.charCodeAt(this.pos);if(q===i)break;q===38?(_+=this.input.slice(T,this.pos),_+=this.jsx_readEntity(),T=this.pos):B(q)?(_+=this.input.slice(T,this.pos),_+=this.jsx_readNewLine(!1),T=this.pos):++this.pos}return _+=this.input.slice(T,this.pos++),this.finishToken(d.string,_)}jsx_readEntity(){let i="",_=0,T,q=this.input[this.pos];q!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let ee=++this.pos;for(;this.pos<this.input.length&&_++<10;){if(q=this.input[this.pos++],q===";"){i[0]==="#"?i[1]==="x"?(i=i.substr(2),l.test(i)&&(T=String.fromCharCode(parseInt(i,16)))):(i=i.substr(1),x.test(i)&&(T=String.fromCharCode(parseInt(i,10)))):T=u[i];break}i+=q}return T||(this.pos=ee,"&")}jsx_readWord(){let i,_=this.pos;do i=this.input.charCodeAt(++this.pos);while(L(i)||i===45);return this.finishToken(C.jsxName,this.input.slice(_,this.pos))}jsx_parseIdentifier(){let i=this.startNode();return this.type===C.jsxName?i.name=this.value:this.type.keyword?i.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(i,"JSXIdentifier")}jsx_parseNamespacedName(){let i=this.start,_=this.startLoc,T=this.jsx_parseIdentifier();if(!g.allowNamespaces||!this.eat(d.colon))return T;var q=this.startNodeAt(i,_);return q.namespace=T,q.name=this.jsx_parseIdentifier(),this.finishNode(q,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===C.jsxTagEnd)return"";let i=this.start,_=this.startLoc,T=this.jsx_parseNamespacedName();for(this.type===d.dot&&T.type==="JSXNamespacedName"&&!g.allowNamespacedObjects&&this.unexpected();this.eat(d.dot);){let q=this.startNodeAt(i,_);q.object=T,q.property=this.jsx_parseIdentifier(),T=this.finishNode(q,"JSXMemberExpression")}return T}jsx_parseAttributeValue(){switch(this.type){case d.braceL:let i=this.jsx_parseExpressionContainer();return i.expression.type==="JSXEmptyExpression"&&this.raise(i.start,"JSX attributes must only be assigned a non-empty expression"),i;case C.jsxTagStart:case d.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let i=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(i,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let i=this.startNode();return this.next(),i.expression=this.type===d.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(d.braceR),this.finishNode(i,"JSXExpressionContainer")}jsx_parseAttribute(){let i=this.startNode();return this.eat(d.braceL)?(this.expect(d.ellipsis),i.argument=this.parseMaybeAssign(),this.expect(d.braceR),this.finishNode(i,"JSXSpreadAttribute")):(i.name=this.jsx_parseNamespacedName(),i.value=this.eat(d.eq)?this.jsx_parseAttributeValue():null,this.finishNode(i,"JSXAttribute"))}jsx_parseOpeningElementAt(i,_){let T=this.startNodeAt(i,_);T.attributes=[];let q=this.jsx_parseElementName();for(q&&(T.name=q);this.type!==d.slash&&this.type!==C.jsxTagEnd;)T.attributes.push(this.jsx_parseAttribute());return T.selfClosing=this.eat(d.slash),this.expect(C.jsxTagEnd),this.finishNode(T,q?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(i,_){let T=this.startNodeAt(i,_),q=this.jsx_parseElementName();return q&&(T.name=q),this.expect(C.jsxTagEnd),this.finishNode(T,q?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(i,_){let T=this.startNodeAt(i,_),q=[],ee=this.jsx_parseOpeningElementAt(i,_),ae=null;if(!ee.selfClosing){e:for(;;)switch(this.type){case C.jsxTagStart:if(i=this.start,_=this.startLoc,this.next(),this.eat(d.slash)){ae=this.jsx_parseClosingElementAt(i,_);break e}q.push(this.jsx_parseElementAt(i,_));break;case C.jsxText:q.push(this.parseExprAtom());break;case d.braceL:q.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}w(ae.name)!==w(ee.name)&&this.raise(ae.start,"Expected correspon
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(F+=" ".concat(this.input.slice(this.start,this.end))),this.raise(this.start,F)}jsx_readString(f){let F=super.jsx_readString(f);return this.type===P.string&&(this[j].jsxAttrValueToken=!0),F}[B](f){return f.type==="TemplateElement"&&this[j].templateElements.push(f),f.type.includes("Function")&&!f.generator&&(f.generator=!1),f}}},i="9.3.1",_={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=A.Parser.extend(L())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=A.Parser.extend(w.default(),L())),this._jsx},get(p){return Boolean(p&&p.ecmaFeatures&&p.ecmaFeatures.jsx)?this.jsx:this.regular}};function T(p,P){let S=_.get(P);return(!P||P.tokens!==!0)&&(P=Object.assign({},P,{tokens:!0})),new S(P,p).tokenize()}function q(p,P){let S=_.get(P);return new S(P,p).parse()}var ee=i,ae=function(){return E.KEYS}(),te=void 0,ie=d(),Ne=C();n.Syntax=te,n.VisitorKeys=ae,n.latestEcmaVersion=ie,n.parse=q,n.supportedEcmaVersions=Ne,n.tokenize=T,n.version=ee}}),wh=Y({"src/language-js/parse/espree.js"(n,o){"use strict";J();var u=lr(),l=pa(),x=ka(),b=_h(),A=Ba(),w={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function E(O){let{message:V,lineNumber:I,column:d}=O;return typeof I!="number"?O:u(V,{start:{line:I,column:d}})}function g(O,V){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{parse:d}=Sh(),C=b(O),{result:K,error:m}=l(()=>d(C,Object.assign(Object.assign({},w),{},{sourceType:"module"})),()=>d(C,Object.assign(Object.assign({},w),{},{sourceType:"script"})));if(!K)throw E(m);return I.originalText=O,A(K,I)}o.exports=x(g)}}),kh=Y({"src/language-js/parse/acorn-and-espree.js"(n,o){J();var u=bh(),l=wh();o.exports={parsers:{acorn:u,espree:l}}}}),Ml=kh();"use strict";export{Ml as default};