builder.io 1.13.1 → 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/node/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Pa=Object.create;var Pt=Object.defineProperty;var Sa=Object.getOwnPropertyDescriptor;var Ea=Object.getOwnPropertyNames;var Aa=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty;var va=(i,s,e)=>s in i?Pt(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var pe=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),Qr=(i,s)=>{for(var e in s)Pt(i,e,{get:s[e],enumerable:!0})},Yr=(i,s,e,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of Ea(s))!wa.call(i,r)&&r!==e&&Pt(i,r,{get:()=>s[r],enumerable:!(t=Sa(s,r))||t.enumerable});return i};var Re=(i,s,e)=>(e=i!=null?Pa(Aa(i)):{},Yr(s||!i||!i.__esModule?Pt(e,"default",{value:i,enumerable:!0}):e,i)),Ca=i=>Yr(Pt({},"__esModule",{value:!0}),i);var et=(i,s,e)=>va(i,typeof s!="symbol"?s+"":s,e);var ti=pe((cu,ei)=>{"use strict";ei.exports=function(){if(process.env.npm_config_user_agent)return Ia(process.env.npm_config_user_agent)};function Ia(i){let s=i.split(" ")[0],e=s.lastIndexOf("/"),t=s.substring(0,e);return{name:t==="npminstall"?"cnpm":t,version:s.substring(e+1)}}});var oi=pe(Bs=>{var ai="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Bs.encode=function(i){if(0<=i&&i<ai.length)return ai[i];throw new TypeError("Must be between 0 and 63: "+i)};Bs.decode=function(i){var s=65,e=90,t=97,r=122,n=48,a=57,o=43,l=47,c=26,u=52;return s<=i&&i<=e?i-s:t<=i&&i<=r?i-t+c:n<=i&&i<=a?i-n+u:i==o?62:i==l?63:-1}});var Rs=pe(js=>{var li=oi(),_s=5,ci=1<<_s,ui=ci-1,hi=ci;function La(i){return i<0?(-i<<1)+1:(i<<1)+0}function Da(i){var s=(i&1)===1,e=i>>1;return s?-e:e}js.encode=function(s){var e="",t,r=La(s);do t=r&ui,r>>>=_s,r>0&&(t|=hi),e+=li.encode(t);while(r>0);return e};js.decode=function(s,e,t){var r=s.length,n=0,a=0,o,l;do{if(e>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=li.decode(s.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+s.charAt(e-1));o=!!(l&hi),l&=ui,n=n+(l<<a),a+=_s}while(o);t.value=Da(n),t.rest=e}});var st=pe(te=>{function Oa(i,s,e){if(s in i)return i[s];if(arguments.length===3)return e;throw new Error('"'+s+'" is a required argument.')}te.getArg=Oa;var pi=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ma=/^data:.+\,.+$/;function St(i){var s=i.match(pi);return s?{scheme:s[1],auth:s[2],host:s[3],port:s[4],path:s[5]}:null}te.urlParse=St;function tt(i){var s="";return i.scheme&&(s+=i.scheme+":"),s+="//",i.auth&&(s+=i.auth+"@"),i.host&&(s+=i.host),i.port&&(s+=":"+i.port),i.path&&(s+=i.path),s}te.urlGenerate=tt;var Fa=32;function Ba(i){var s=[];return function(e){for(var t=0;t<s.length;t++)if(s[t].input===e){var r=s[0];return s[0]=s[t],s[t]=r,s[0].result}var n=i(e);return s.unshift({input:e,result:n}),s.length>Fa&&s.pop(),n}}var Us=Ba(function(s){var e=s,t=St(s);if(t){if(!t.path)return s;e=t.path}for(var r=te.isAbsolute(e),n=[],a=0,o=0;;)if(a=o,o=e.indexOf("/",a),o===-1){n.push(e.slice(a));break}else for(n.push(e.slice(a,o));o<e.length&&e[o]==="/";)o++;for(var l,c=0,o=n.length-1;o>=0;o--)l=n[o],l==="."?n.splice(o,1):l===".."?c++:c>0&&(l===""?(n.splice(o+1,c),c=0):(n.splice(o,2),c--));return e=n.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,tt(t)):e});te.normalize=Us;function fi(i,s){i===""&&(i="."),s===""&&(s=".");var e=St(s),t=St(i);if(t&&(i=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),tt(e);if(e||s.match(Ma))return s;if(t&&!t.host&&!t.path)return t.host=s,tt(t);var r=s.charAt(0)==="/"?s:Us(i.replace(/\/+$/,"")+"/"+s);return t?(t.path=r,tt(t)):r}te.join=fi;te.isAbsolute=function(i){return i.charAt(0)==="/"||pi.test(i)};function _a(i,s){i===""&&(i="."),i=i.replace(/\/$/,"");for(var e=0;s.indexOf(i+"/")!==0;){var t=i.lastIndexOf("/");if(t<0||(i=i.slice(0,t),i.match(/^([^\/]+:\/)?\/*$/)))return s;++e}return Array(e+1).join("../")+s.substr(i.length+1)}te.relative=_a;var di=function(){var i=Object.create(null);return!("__proto__"in i)}();function mi(i){return i}function ja(i){return yi(i)?"$"+i:i}te.toSetString=di?mi:ja;function Ra(i){return yi(i)?i.slice(1):i}te.fromSetString=di?mi:Ra;function yi(i){if(!i)return!1;var s=i.length;if(s<9||i.charCodeAt(s-1)!==95||i.charCodeAt(s-2)!==95||i.charCodeAt(s-3)!==111||i.charCodeAt(s-4)!==116||i.charCodeAt(s-5)!==111||i.charCodeAt(s-6)!==114||i.charCodeAt(s-7)!==112||i.charCodeAt(s-8)!==95||i.charCodeAt(s-9)!==95)return!1;for(var e=s-10;e>=0;e--)if(i.charCodeAt(e)!==36)return!1;return!0}function Ua(i,s,e){var t=Le(i.source,s.source);return t!==0||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0||e)||(t=i.generatedColumn-s.generatedColumn,t!==0)||(t=i.generatedLine-s.generatedLine,t!==0)?t:Le(i.name,s.name)}te.compareByOriginalPositions=Ua;function Va(i,s,e){var t;return t=i.originalLine-s.originalLine,t!==0||(t=i.originalColumn-s.originalColumn,t!==0||e)||(t=i.generatedColumn-s.generatedColumn,t!==0)||(t=i.generatedLine-s.generatedLine,t!==0)?t:Le(i.name,s.name)}te.compareByOriginalPositionsNoSource=Va;function $a(i,s,e){var t=i.generatedLine-s.generatedLine;return t!==0||(t=i.generatedColumn-s.generatedColumn,t!==0||e)||(t=Le(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:Le(i.name,s.name)}te.compareByGeneratedPositionsDeflated=$a;function qa(i,s,e){var t=i.generatedColumn-s.generatedColumn;return t!==0||e||(t=Le(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:Le(i.name,s.name)}te.compareByGeneratedPositionsDeflatedNoLine=qa;function Le(i,s){return i===s?0:i===null?1:s===null?-1:i>s?1:-1}function za(i,s){var e=i.generatedLine-s.generatedLine;return e!==0||(e=i.generatedColumn-s.generatedColumn,e!==0)||(e=Le(i.source,s.source),e!==0)||(e=i.originalLine-s.originalLine,e!==0)||(e=i.originalColumn-s.originalColumn,e!==0)?e:Le(i.name,s.name)}te.compareByGeneratedPositionsInflated=za;function Wa(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}te.parseSourceMapInput=Wa;function Ja(i,s,e){if(s=s||"",i&&(i[i.length-1]!=="/"&&s[0]!=="/"&&(i+="/"),s=i+s),e){var t=St(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var r=t.path.lastIndexOf("/");r>=0&&(t.path=t.path.substring(0,r+1))}s=fi(tt(t),s)}return Us(s)}te.computeSourceURL=Ja});var qs=pe(gi=>{var Vs=st(),$s=Object.prototype.hasOwnProperty,We=typeof Map<"u";function De(){this._array=[],this._set=We?new Map:Object.create(null)}De.fromArray=function(s,e){for(var t=new De,r=0,n=s.length;r<n;r++)t.add(s[r],e);return t};De.prototype.size=function(){return We?this._set.size:Object.getOwnPropertyNames(this._set).length};De.prototype.add=function(s,e){var t=We?s:Vs.toSetString(s),r=We?this.has(s):$s.call(this._set,t),n=this._array.length;(!r||e)&&this._array.push(s),r||(We?this._set.set(s,n):this._set[t]=n)};De.prototype.has=function(s){if(We)return this._set.has(s);var e=Vs.toSetString(s);return $s.call(this._set,e)};De.prototype.indexOf=function(s){if(We){var e=this._set.get(s);if(e>=0)return e}else{var t=Vs.toSetString(s);if($s.call(this._set,t))return this._set[t]}throw new Error('"'+s+'" is not in the set.')};De.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)};De.prototype.toArray=function(){return this._array.slice()};gi.ArraySet=De});var Ti=pe(bi=>{var xi=st();function Ka(i,s){var e=i.generatedLine,t=s.generatedLine,r=i.generatedColumn,n=s.generatedColumn;return t>e||t==e&&n>=r||xi.compareByGeneratedPositionsInflated(i,s)<=0}function Gt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Gt.prototype.unsortedForEach=function(s,e){this._array.forEach(s,e)};Gt.prototype.add=function(s){Ka(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))};Gt.prototype.toArray=function(){return this._sorted||(this._array.sort(xi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};bi.MappingList=Gt});var zs=pe(Pi=>{var Et=Rs(),Y=st(),Qt=qs().ArraySet,Ha=Ti().MappingList;function ge(i){i||(i={}),this._file=Y.getArg(i,"file",null),this._sourceRoot=Y.getArg(i,"sourceRoot",null),this._skipValidation=Y.getArg(i,"skipValidation",!1),this._ignoreInvalidMapping=Y.getArg(i,"ignoreInvalidMapping",!1),this._sources=new Qt,this._names=new Qt,this._mappings=new Ha,this._sourcesContents=null}ge.prototype._version=3;ge.fromSourceMap=function(s,e){var t=s.sourceRoot,r=new ge(Object.assign(e||{},{file:s.file,sourceRoot:t}));return s.eachMapping(function(n){var a={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(a.source=n.source,t!=null&&(a.source=Y.relative(t,a.source)),a.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(a.name=n.name)),r.addMapping(a)}),s.sources.forEach(function(n){var a=n;t!==null&&(a=Y.relative(t,n)),r._sources.has(a)||r._sources.add(a);var o=s.sourceContentFor(n);o!=null&&r.setSourceContent(n,o)}),r};ge.prototype.addMapping=function(s){var e=Y.getArg(s,"generated"),t=Y.getArg(s,"original",null),r=Y.getArg(s,"source",null),n=Y.getArg(s,"name",null);!this._skipValidation&&this._validateMapping(e,t,r,n)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),n!=null&&(n=String(n),this._names.has(n)||this._names.add(n)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:r,name:n}))};ge.prototype.setSourceContent=function(s,e){var t=s;this._sourceRoot!=null&&(t=Y.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ge.prototype.applySourceMap=function(s,e,t){var r=e;if(e==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=s.file}var n=this._sourceRoot;n!=null&&(r=Y.relative(n,r));var a=new Qt,o=new Qt;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var c=s.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=Y.join(t,l.source)),n!=null&&(l.source=Y.relative(n,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var u=l.source;u!=null&&!a.has(u)&&a.add(u);var h=l.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=a,this._names=o,s.sources.forEach(function(l){var c=s.sourceContentFor(l);c!=null&&(t!=null&&(l=Y.join(t,l)),n!=null&&(l=Y.relative(n,l)),this.setSourceContent(l,c))},this)};ge.prototype._validateMapping=function(s,e,t,r){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var n="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(n),!1;throw new Error(n)}if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!e&&!t&&!r)){if(s&&"line"in s&&"column"in s&&e&&"line"in e&&"column"in e&&s.line>0&&s.column>=0&&e.line>0&&e.column>=0&&t)return;var n="Invalid mapping: "+JSON.stringify({generated:s,source:t,original:e,name:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(n),!1;throw new Error(n)}};ge.prototype._serializeMappings=function(){for(var s=0,e=1,t=0,r=0,n=0,a=0,o="",l,c,u,h,f=this._mappings.toArray(),d=0,p=f.length;d<p;d++){if(c=f[d],l="",c.generatedLine!==e)for(s=0;c.generatedLine!==e;)l+=";",e++;else if(d>0){if(!Y.compareByGeneratedPositionsInflated(c,f[d-1]))continue;l+=","}l+=Et.encode(c.generatedColumn-s),s=c.generatedColumn,c.source!=null&&(h=this._sources.indexOf(c.source),l+=Et.encode(h-a),a=h,l+=Et.encode(c.originalLine-1-r),r=c.originalLine-1,l+=Et.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(u=this._names.indexOf(c.name),l+=Et.encode(u-n),n=u)),o+=l}return o};ge.prototype._generateSourcesContent=function(s,e){return s.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=Y.relative(e,t));var r=Y.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};ge.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s};ge.prototype.toString=function(){return JSON.stringify(this.toJSON())};Pi.SourceMapGenerator=ge});var Si=pe(Je=>{Je.GREATEST_LOWER_BOUND=1;Je.LEAST_UPPER_BOUND=2;function Ws(i,s,e,t,r,n){var a=Math.floor((s-i)/2)+i,o=r(e,t[a],!0);return o===0?a:o>0?s-a>1?Ws(a,s,e,t,r,n):n==Je.LEAST_UPPER_BOUND?s<t.length?s:-1:a:a-i>1?Ws(i,a,e,t,r,n):n==Je.LEAST_UPPER_BOUND?a:i<0?-1:i}Je.search=function(s,e,t,r){if(e.length===0)return-1;var n=Ws(-1,e.length,s,e,t,r||Je.GREATEST_LOWER_BOUND);if(n<0)return-1;for(;n-1>=0&&t(e[n],e[n-1],!0)===0;)--n;return n}});var wi=pe(Ai=>{function Xa(i){function s(r,n,a){var o=r[n];r[n]=r[a],r[a]=o}function e(r,n){return Math.round(r+Math.random()*(n-r))}function t(r,n,a,o){if(a<o){var l=e(a,o),c=a-1;s(r,l,o);for(var u=r[o],h=a;h<o;h++)n(r[h],u,!1)<=0&&(c+=1,s(r,c,h));s(r,c+1,h);var f=c+1;t(r,n,a,f-1),t(r,n,f+1,o)}}return t}function Ga(i){let s=Xa.toString();return new Function(`return ${s}`)()(i)}var Ei=new WeakMap;Ai.quickSort=function(i,s,e=0){let t=Ei.get(s);t===void 0&&(t=Ga(s),Ei.set(s,t)),t(i,s,e,i.length-1)}});var Ii=pe(Yt=>{var N=st(),Ks=Si(),rt=qs().ArraySet,Qa=Rs(),At=wi().quickSort;function H(i,s){var e=i;return typeof i=="string"&&(e=N.parseSourceMapInput(i)),e.sections!=null?new Te(e,s):new se(e,s)}H.fromSourceMap=function(i,s){return se.fromSourceMap(i,s)};H.prototype._version=3;H.prototype.__generatedMappings=null;Object.defineProperty(H.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});H.prototype.__originalMappings=null;Object.defineProperty(H.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});H.prototype._charIsMappingSeparator=function(s,e){var t=s.charAt(e);return t===";"||t===","};H.prototype._parseMappings=function(s,e){throw new Error("Subclasses must implement _parseMappings")};H.GENERATED_ORDER=1;H.ORIGINAL_ORDER=2;H.GREATEST_LOWER_BOUND=1;H.LEAST_UPPER_BOUND=2;H.prototype.eachMapping=function(s,e,t){var r=e||null,n=t||H.GENERATED_ORDER,a;switch(n){case H.GENERATED_ORDER:a=this._generatedMappings;break;case H.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,l=s.bind(r),c=this._names,u=this._sources,h=this._sourceMapURL,f=0,d=a.length;f<d;f++){var p=a[f],g=p.source===null?null:u.at(p.source);g!==null&&(g=N.computeSourceURL(o,g,h)),l({source:g,generatedLine:p.generatedLine,generatedColumn:p.generatedColumn,originalLine:p.originalLine,originalColumn:p.originalColumn,name:p.name===null?null:c.at(p.name)})}};H.prototype.allGeneratedPositionsFor=function(s){var e=N.getArg(s,"line"),t={source:N.getArg(s,"source"),originalLine:e,originalColumn:N.getArg(s,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,Ks.LEAST_UPPER_BOUND);if(n>=0){var a=this._originalMappings[n];if(s.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:N.getArg(a,"generatedLine",null),column:N.getArg(a,"generatedColumn",null),lastColumn:N.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++n];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)r.push({line:N.getArg(a,"generatedLine",null),column:N.getArg(a,"generatedColumn",null),lastColumn:N.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++n]}return r};Yt.SourceMapConsumer=H;function se(i,s){var e=i;typeof i=="string"&&(e=N.parseSourceMapInput(i));var t=N.getArg(e,"version"),r=N.getArg(e,"sources"),n=N.getArg(e,"names",[]),a=N.getArg(e,"sourceRoot",null),o=N.getArg(e,"sourcesContent",null),l=N.getArg(e,"mappings"),c=N.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);a&&(a=N.normalize(a)),r=r.map(String).map(N.normalize).map(function(u){return a&&N.isAbsolute(a)&&N.isAbsolute(u)?N.relative(a,u):u}),this._names=rt.fromArray(n.map(String),!0),this._sources=rt.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(u){return N.computeSourceURL(a,u,s)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=l,this._sourceMapURL=s,this.file=c}se.prototype=Object.create(H.prototype);se.prototype.consumer=H;se.prototype._findSourceIndex=function(i){var s=i;if(this.sourceRoot!=null&&(s=N.relative(this.sourceRoot,s)),this._sources.has(s))return this._sources.indexOf(s);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==i)return e;return-1};se.fromSourceMap=function(s,e){var t=Object.create(se.prototype),r=t._names=rt.fromArray(s._names.toArray(),!0),n=t._sources=rt.fromArray(s._sources.toArray(),!0);t.sourceRoot=s._sourceRoot,t.sourcesContent=s._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=s._file,t._sourceMapURL=e,t._absoluteSources=t._sources.toArray().map(function(d){return N.computeSourceURL(t.sourceRoot,d,e)});for(var a=s._mappings.toArray().slice(),o=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,u=a.length;c<u;c++){var h=a[c],f=new Ci;f.generatedLine=h.generatedLine,f.generatedColumn=h.generatedColumn,h.source&&(f.source=n.indexOf(h.source),f.originalLine=h.originalLine,f.originalColumn=h.originalColumn,h.name&&(f.name=r.indexOf(h.name)),l.push(f)),o.push(f)}return At(t.__originalMappings,N.compareByOriginalPositions),t};se.prototype._version=3;Object.defineProperty(se.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Ci(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Js=N.compareByGeneratedPositionsDeflatedNoLine;function vi(i,s){let e=i.length,t=i.length-s;if(!(t<=1))if(t==2){let r=i[s],n=i[s+1];Js(r,n)>0&&(i[s]=n,i[s+1]=r)}else if(t<20)for(let r=s;r<e;r++)for(let n=r;n>s;n--){let a=i[n-1],o=i[n];if(Js(a,o)<=0)break;i[n-1]=o,i[n]=a}else At(i,Js,s)}se.prototype._parseMappings=function(s,e){var t=1,r=0,n=0,a=0,o=0,l=0,c=s.length,u=0,h={},f={},d=[],p=[],g,y,b,P,k;let T=0;for(;u<c;)if(s.charAt(u)===";")t++,u++,r=0,vi(p,T),T=p.length;else if(s.charAt(u)===",")u++;else{for(g=new Ci,g.generatedLine=t,P=u;P<c&&!this._charIsMappingSeparator(s,P);P++);for(y=s.slice(u,P),b=[];u<P;)Qa.decode(s,u,f),k=f.value,u=f.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=r+b[0],r=g.generatedColumn,b.length>1&&(g.source=o+b[1],o+=b[1],g.originalLine=n+b[2],n=g.originalLine,g.originalLine+=1,g.originalColumn=a+b[3],a=g.originalColumn,b.length>4&&(g.name=l+b[4],l+=b[4])),p.push(g),typeof g.originalLine=="number"){let A=g.source;for(;d.length<=A;)d.push(null);d[A]===null&&(d[A]=[]),d[A].push(g)}}vi(p,T),this.__generatedMappings=p;for(var E=0;E<d.length;E++)d[E]!=null&&At(d[E],N.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...d)};se.prototype._findMapping=function(s,e,t,r,n,a){if(s[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+s[t]);if(s[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+s[r]);return Ks.search(s,e,n,a)};se.prototype.computeColumnSpans=function(){for(var s=0;s<this._generatedMappings.length;++s){var e=this._generatedMappings[s];if(s+1<this._generatedMappings.length){var t=this._generatedMappings[s+1];if(e.generatedLine===t.generatedLine){e.lastGeneratedColumn=t.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}};se.prototype.originalPositionFor=function(s){var e={generatedLine:N.getArg(s,"line"),generatedColumn:N.getArg(s,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",N.compareByGeneratedPositionsDeflated,N.getArg(s,"bias",H.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===e.generatedLine){var n=N.getArg(r,"source",null);n!==null&&(n=this._sources.at(n),n=N.computeSourceURL(this.sourceRoot,n,this._sourceMapURL));var a=N.getArg(r,"name",null);return a!==null&&(a=this._names.at(a)),{source:n,line:N.getArg(r,"originalLine",null),column:N.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};se.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(s){return s==null}):!1};se.prototype.sourceContentFor=function(s,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(s);if(t>=0)return this.sourcesContent[t];var r=s;this.sourceRoot!=null&&(r=N.relative(this.sourceRoot,r));var n;if(this.sourceRoot!=null&&(n=N.urlParse(this.sourceRoot))){var a=r.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||n.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(e)return null;throw new Error('"'+r+'" is not in the SourceMap.')};se.prototype.generatedPositionFor=function(s){var e=N.getArg(s,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:N.getArg(s,"line"),originalColumn:N.getArg(s,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,N.getArg(s,"bias",H.GREATEST_LOWER_BOUND));if(r>=0){var n=this._originalMappings[r];if(n.source===t.source)return{line:N.getArg(n,"generatedLine",null),column:N.getArg(n,"generatedColumn",null),lastColumn:N.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Yt.BasicSourceMapConsumer=se;function Te(i,s){var e=i;typeof i=="string"&&(e=N.parseSourceMapInput(i));var t=N.getArg(e,"version"),r=N.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new rt,this._names=new rt;var n={line:-1,column:0};this._sections=r.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=N.getArg(a,"offset"),l=N.getArg(o,"line"),c=N.getArg(o,"column");if(l<n.line||l===n.line&&c<n.column)throw new Error("Section offsets must be ordered and non-overlapping.");return n=o,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new H(N.getArg(a,"map"),s)}})}Te.prototype=Object.create(H.prototype);Te.prototype.constructor=H;Te.prototype._version=3;Object.defineProperty(Te.prototype,"sources",{get:function(){for(var i=[],s=0;s<this._sections.length;s++)for(var e=0;e<this._sections[s].consumer.sources.length;e++)i.push(this._sections[s].consumer.sources[e]);return i}});Te.prototype.originalPositionFor=function(s){var e={generatedLine:N.getArg(s,"line"),generatedColumn:N.getArg(s,"column")},t=Ks.search(e,this._sections,function(n,a){var o=n.generatedLine-a.generatedOffset.generatedLine;return o||n.generatedColumn-a.generatedOffset.generatedColumn}),r=this._sections[t];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:s.bias}):{source:null,line:null,column:null,name:null}};Te.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(s){return s.consumer.hasContentsOfAllSources()})};Te.prototype.sourceContentFor=function(s,e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t],n=r.consumer.sourceContentFor(s,!0);if(n||n==="")return n}if(e)return null;throw new Error('"'+s+'" is not in the SourceMap.')};Te.prototype.generatedPositionFor=function(s){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(N.getArg(s,"source"))!==-1){var r=t.consumer.generatedPositionFor(s);if(r){var n={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return n}}}return{line:null,column:null}};Te.prototype._parseMappings=function(s,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],n=r.consumer._generatedMappings,a=0;a<n.length;a++){var o=n[a],l=r.consumer._sources.at(o.source);l!==null&&(l=N.computeSourceURL(r.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;o.name&&(c=r.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var u={source:l,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(u),typeof u.originalLine=="number"&&this.__originalMappings.push(u)}At(this.__generatedMappings,N.compareByGeneratedPositionsDeflated),At(this.__originalMappings,N.compareByOriginalPositions)};Yt.IndexedSourceMapConsumer=Te});var ki=pe(Ni=>{var Ya=zs().SourceMapGenerator,Zt=st(),Za=/(\r?\n)/,eo=10,it="$$$isSourceNode$$$";function fe(i,s,e,t,r){this.children=[],this.sourceContents={},this.line=i??null,this.column=s??null,this.source=e??null,this.name=r??null,this[it]=!0,t!=null&&this.add(t)}fe.fromStringWithSourceMap=function(s,e,t){var r=new fe,n=s.split(Za),a=0,o=function(){var f=p(),d=p()||"";return f+d;function p(){return a<n.length?n[a++]:void 0}},l=1,c=0,u=null;return e.eachMapping(function(f){if(u!==null)if(l<f.generatedLine)h(u,o()),l++,c=0;else{var d=n[a]||"",p=d.substr(0,f.generatedColumn-c);n[a]=d.substr(f.generatedColumn-c),c=f.generatedColumn,h(u,p),u=f;return}for(;l<f.generatedLine;)r.add(o()),l++;if(c<f.generatedColumn){var d=n[a]||"";r.add(d.substr(0,f.generatedColumn)),n[a]=d.substr(f.generatedColumn),c=f.generatedColumn}u=f},this),a<n.length&&(u&&h(u,o()),r.add(n.splice(a).join(""))),e.sources.forEach(function(f){var d=e.sourceContentFor(f);d!=null&&(t!=null&&(f=Zt.join(t,f)),r.setSourceContent(f,d))}),r;function h(f,d){if(f===null||f.source===void 0)r.add(d);else{var p=t?Zt.join(t,f.source):f.source;r.add(new fe(f.originalLine,f.originalColumn,p,d,f.name))}}};fe.prototype.add=function(s){if(Array.isArray(s))s.forEach(function(e){this.add(e)},this);else if(s[it]||typeof s=="string")s&&this.children.push(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this};fe.prototype.prepend=function(s){if(Array.isArray(s))for(var e=s.length-1;e>=0;e--)this.prepend(s[e]);else if(s[it]||typeof s=="string")this.children.unshift(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this};fe.prototype.walk=function(s){for(var e,t=0,r=this.children.length;t<r;t++)e=this.children[t],e[it]?e.walk(s):e!==""&&s(e,{source:this.source,line:this.line,column:this.column,name:this.name})};fe.prototype.join=function(s){var e,t,r=this.children.length;if(r>0){for(e=[],t=0;t<r-1;t++)e.push(this.children[t]),e.push(s);e.push(this.children[t]),this.children=e}return this};fe.prototype.replaceRight=function(s,e){var t=this.children[this.children.length-1];return t[it]?t.replaceRight(s,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(s,e):this.children.push("".replace(s,e)),this};fe.prototype.setSourceContent=function(s,e){this.sourceContents[Zt.toSetString(s)]=e};fe.prototype.walkSourceContents=function(s){for(var e=0,t=this.children.length;e<t;e++)this.children[e][it]&&this.children[e].walkSourceContents(s);for(var r=Object.keys(this.sourceContents),e=0,t=r.length;e<t;e++)s(Zt.fromSetString(r[e]),this.sourceContents[r[e]])};fe.prototype.toString=function(){var s="";return this.walk(function(e){s+=e}),s};fe.prototype.toStringWithSourceMap=function(s){var e={code:"",line:1,column:0},t=new Ya(s),r=!1,n=null,a=null,o=null,l=null;return this.walk(function(c,u){e.code+=c,u.source!==null&&u.line!==null&&u.column!==null?((n!==u.source||a!==u.line||o!==u.column||l!==u.name)&&t.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name}),n=u.source,a=u.line,o=u.column,l=u.name,r=!0):r&&(t.addMapping({generated:{line:e.line,column:e.column}}),n=null,r=!1);for(var h=0,f=c.length;h<f;h++)c.charCodeAt(h)===eo?(e.line++,e.column=0,h+1===f?(n=null,r=!1):r&&t.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name})):e.column++}),this.walkSourceContents(function(c,u){t.setSourceContent(c,u)}),{code:e.code,map:t}};Ni.SourceNode=fe});var Li=pe(es=>{es.SourceMapGenerator=zs().SourceMapGenerator;es.SourceMapConsumer=Ii().SourceMapConsumer;es.SourceNode=ki().SourceNode});var cn=pe(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});function to(i,s){if(i==null)return{};var e={};for(var t in i)if({}.hasOwnProperty.call(i,t)){if(s.includes(t))continue;e[t]=i[t]}return e}var Ce=class{constructor(s,e,t){this.line=void 0,this.column=void 0,this.index=void 0,this.line=s,this.column=e,this.index=t}},ct=class{constructor(s,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=s,this.end=e}};function ae(i,s){let{line:e,column:t,index:r}=i;return new Ce(e,t+s,r+s)}var Di="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",so={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Di},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Di}},Oi={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"},rs=i=>i.type==="UpdateExpression"?Oi.UpdateExpression[`${i.prefix}`]:Oi[i.type],ro={AccessorIsGenerator:({kind:i})=>`A ${i}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.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",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 constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:s})=>`A string literal cannot be used as an exported binding without \`from\`.
1
+ "use strict";var Pa=Object.create;var Pt=Object.defineProperty;var Sa=Object.getOwnPropertyDescriptor;var Ea=Object.getOwnPropertyNames;var Aa=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty;var va=(i,s,e)=>s in i?Pt(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var pe=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),Qr=(i,s)=>{for(var e in s)Pt(i,e,{get:s[e],enumerable:!0})},Yr=(i,s,e,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of Ea(s))!wa.call(i,r)&&r!==e&&Pt(i,r,{get:()=>s[r],enumerable:!(t=Sa(s,r))||t.enumerable});return i};var Re=(i,s,e)=>(e=i!=null?Pa(Aa(i)):{},Yr(s||!i||!i.__esModule?Pt(e,"default",{value:i,enumerable:!0}):e,i)),Ca=i=>Yr(Pt({},"__esModule",{value:!0}),i);var et=(i,s,e)=>va(i,typeof s!="symbol"?s+"":s,e);var ti=pe((cu,ei)=>{"use strict";ei.exports=function(){if(process.env.npm_config_user_agent)return Ia(process.env.npm_config_user_agent)};function Ia(i){let s=i.split(" ")[0],e=s.lastIndexOf("/"),t=s.substring(0,e);return{name:t==="npminstall"?"cnpm":t,version:s.substring(e+1)}}});var oi=pe(Bs=>{var ai="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Bs.encode=function(i){if(0<=i&&i<ai.length)return ai[i];throw new TypeError("Must be between 0 and 63: "+i)};Bs.decode=function(i){var s=65,e=90,t=97,r=122,n=48,a=57,o=43,l=47,c=26,u=52;return s<=i&&i<=e?i-s:t<=i&&i<=r?i-t+c:n<=i&&i<=a?i-n+u:i==o?62:i==l?63:-1}});var Rs=pe(js=>{var li=oi(),_s=5,ci=1<<_s,ui=ci-1,hi=ci;function La(i){return i<0?(-i<<1)+1:(i<<1)+0}function Da(i){var s=(i&1)===1,e=i>>1;return s?-e:e}js.encode=function(s){var e="",t,r=La(s);do t=r&ui,r>>>=_s,r>0&&(t|=hi),e+=li.encode(t);while(r>0);return e};js.decode=function(s,e,t){var r=s.length,n=0,a=0,o,l;do{if(e>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=li.decode(s.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+s.charAt(e-1));o=!!(l&hi),l&=ui,n=n+(l<<a),a+=_s}while(o);t.value=Da(n),t.rest=e}});var st=pe(te=>{function Oa(i,s,e){if(s in i)return i[s];if(arguments.length===3)return e;throw new Error('"'+s+'" is a required argument.')}te.getArg=Oa;var pi=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ma=/^data:.+\,.+$/;function St(i){var s=i.match(pi);return s?{scheme:s[1],auth:s[2],host:s[3],port:s[4],path:s[5]}:null}te.urlParse=St;function tt(i){var s="";return i.scheme&&(s+=i.scheme+":"),s+="//",i.auth&&(s+=i.auth+"@"),i.host&&(s+=i.host),i.port&&(s+=":"+i.port),i.path&&(s+=i.path),s}te.urlGenerate=tt;var Fa=32;function Ba(i){var s=[];return function(e){for(var t=0;t<s.length;t++)if(s[t].input===e){var r=s[0];return s[0]=s[t],s[t]=r,s[0].result}var n=i(e);return s.unshift({input:e,result:n}),s.length>Fa&&s.pop(),n}}var Us=Ba(function(s){var e=s,t=St(s);if(t){if(!t.path)return s;e=t.path}for(var r=te.isAbsolute(e),n=[],a=0,o=0;;)if(a=o,o=e.indexOf("/",a),o===-1){n.push(e.slice(a));break}else for(n.push(e.slice(a,o));o<e.length&&e[o]==="/";)o++;for(var l,c=0,o=n.length-1;o>=0;o--)l=n[o],l==="."?n.splice(o,1):l===".."?c++:c>0&&(l===""?(n.splice(o+1,c),c=0):(n.splice(o,2),c--));return e=n.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,tt(t)):e});te.normalize=Us;function fi(i,s){i===""&&(i="."),s===""&&(s=".");var e=St(s),t=St(i);if(t&&(i=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),tt(e);if(e||s.match(Ma))return s;if(t&&!t.host&&!t.path)return t.host=s,tt(t);var r=s.charAt(0)==="/"?s:Us(i.replace(/\/+$/,"")+"/"+s);return t?(t.path=r,tt(t)):r}te.join=fi;te.isAbsolute=function(i){return i.charAt(0)==="/"||pi.test(i)};function _a(i,s){i===""&&(i="."),i=i.replace(/\/$/,"");for(var e=0;s.indexOf(i+"/")!==0;){var t=i.lastIndexOf("/");if(t<0||(i=i.slice(0,t),i.match(/^([^\/]+:\/)?\/*$/)))return s;++e}return Array(e+1).join("../")+s.substr(i.length+1)}te.relative=_a;var di=(function(){var i=Object.create(null);return!("__proto__"in i)})();function mi(i){return i}function ja(i){return yi(i)?"$"+i:i}te.toSetString=di?mi:ja;function Ra(i){return yi(i)?i.slice(1):i}te.fromSetString=di?mi:Ra;function yi(i){if(!i)return!1;var s=i.length;if(s<9||i.charCodeAt(s-1)!==95||i.charCodeAt(s-2)!==95||i.charCodeAt(s-3)!==111||i.charCodeAt(s-4)!==116||i.charCodeAt(s-5)!==111||i.charCodeAt(s-6)!==114||i.charCodeAt(s-7)!==112||i.charCodeAt(s-8)!==95||i.charCodeAt(s-9)!==95)return!1;for(var e=s-10;e>=0;e--)if(i.charCodeAt(e)!==36)return!1;return!0}function Ua(i,s,e){var t=Le(i.source,s.source);return t!==0||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0||e)||(t=i.generatedColumn-s.generatedColumn,t!==0)||(t=i.generatedLine-s.generatedLine,t!==0)?t:Le(i.name,s.name)}te.compareByOriginalPositions=Ua;function Va(i,s,e){var t;return t=i.originalLine-s.originalLine,t!==0||(t=i.originalColumn-s.originalColumn,t!==0||e)||(t=i.generatedColumn-s.generatedColumn,t!==0)||(t=i.generatedLine-s.generatedLine,t!==0)?t:Le(i.name,s.name)}te.compareByOriginalPositionsNoSource=Va;function $a(i,s,e){var t=i.generatedLine-s.generatedLine;return t!==0||(t=i.generatedColumn-s.generatedColumn,t!==0||e)||(t=Le(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:Le(i.name,s.name)}te.compareByGeneratedPositionsDeflated=$a;function qa(i,s,e){var t=i.generatedColumn-s.generatedColumn;return t!==0||e||(t=Le(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:Le(i.name,s.name)}te.compareByGeneratedPositionsDeflatedNoLine=qa;function Le(i,s){return i===s?0:i===null?1:s===null?-1:i>s?1:-1}function za(i,s){var e=i.generatedLine-s.generatedLine;return e!==0||(e=i.generatedColumn-s.generatedColumn,e!==0)||(e=Le(i.source,s.source),e!==0)||(e=i.originalLine-s.originalLine,e!==0)||(e=i.originalColumn-s.originalColumn,e!==0)?e:Le(i.name,s.name)}te.compareByGeneratedPositionsInflated=za;function Wa(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}te.parseSourceMapInput=Wa;function Ja(i,s,e){if(s=s||"",i&&(i[i.length-1]!=="/"&&s[0]!=="/"&&(i+="/"),s=i+s),e){var t=St(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var r=t.path.lastIndexOf("/");r>=0&&(t.path=t.path.substring(0,r+1))}s=fi(tt(t),s)}return Us(s)}te.computeSourceURL=Ja});var qs=pe(gi=>{var Vs=st(),$s=Object.prototype.hasOwnProperty,We=typeof Map<"u";function De(){this._array=[],this._set=We?new Map:Object.create(null)}De.fromArray=function(s,e){for(var t=new De,r=0,n=s.length;r<n;r++)t.add(s[r],e);return t};De.prototype.size=function(){return We?this._set.size:Object.getOwnPropertyNames(this._set).length};De.prototype.add=function(s,e){var t=We?s:Vs.toSetString(s),r=We?this.has(s):$s.call(this._set,t),n=this._array.length;(!r||e)&&this._array.push(s),r||(We?this._set.set(s,n):this._set[t]=n)};De.prototype.has=function(s){if(We)return this._set.has(s);var e=Vs.toSetString(s);return $s.call(this._set,e)};De.prototype.indexOf=function(s){if(We){var e=this._set.get(s);if(e>=0)return e}else{var t=Vs.toSetString(s);if($s.call(this._set,t))return this._set[t]}throw new Error('"'+s+'" is not in the set.')};De.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)};De.prototype.toArray=function(){return this._array.slice()};gi.ArraySet=De});var Ti=pe(bi=>{var xi=st();function Ka(i,s){var e=i.generatedLine,t=s.generatedLine,r=i.generatedColumn,n=s.generatedColumn;return t>e||t==e&&n>=r||xi.compareByGeneratedPositionsInflated(i,s)<=0}function Gt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Gt.prototype.unsortedForEach=function(s,e){this._array.forEach(s,e)};Gt.prototype.add=function(s){Ka(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))};Gt.prototype.toArray=function(){return this._sorted||(this._array.sort(xi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};bi.MappingList=Gt});var zs=pe(Pi=>{var Et=Rs(),Y=st(),Qt=qs().ArraySet,Ha=Ti().MappingList;function ge(i){i||(i={}),this._file=Y.getArg(i,"file",null),this._sourceRoot=Y.getArg(i,"sourceRoot",null),this._skipValidation=Y.getArg(i,"skipValidation",!1),this._ignoreInvalidMapping=Y.getArg(i,"ignoreInvalidMapping",!1),this._sources=new Qt,this._names=new Qt,this._mappings=new Ha,this._sourcesContents=null}ge.prototype._version=3;ge.fromSourceMap=function(s,e){var t=s.sourceRoot,r=new ge(Object.assign(e||{},{file:s.file,sourceRoot:t}));return s.eachMapping(function(n){var a={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(a.source=n.source,t!=null&&(a.source=Y.relative(t,a.source)),a.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(a.name=n.name)),r.addMapping(a)}),s.sources.forEach(function(n){var a=n;t!==null&&(a=Y.relative(t,n)),r._sources.has(a)||r._sources.add(a);var o=s.sourceContentFor(n);o!=null&&r.setSourceContent(n,o)}),r};ge.prototype.addMapping=function(s){var e=Y.getArg(s,"generated"),t=Y.getArg(s,"original",null),r=Y.getArg(s,"source",null),n=Y.getArg(s,"name",null);!this._skipValidation&&this._validateMapping(e,t,r,n)===!1||(r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),n!=null&&(n=String(n),this._names.has(n)||this._names.add(n)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:r,name:n}))};ge.prototype.setSourceContent=function(s,e){var t=s;this._sourceRoot!=null&&(t=Y.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ge.prototype.applySourceMap=function(s,e,t){var r=e;if(e==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=s.file}var n=this._sourceRoot;n!=null&&(r=Y.relative(n,r));var a=new Qt,o=new Qt;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var c=s.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,t!=null&&(l.source=Y.join(t,l.source)),n!=null&&(l.source=Y.relative(n,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var u=l.source;u!=null&&!a.has(u)&&a.add(u);var h=l.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=a,this._names=o,s.sources.forEach(function(l){var c=s.sourceContentFor(l);c!=null&&(t!=null&&(l=Y.join(t,l)),n!=null&&(l=Y.relative(n,l)),this.setSourceContent(l,c))},this)};ge.prototype._validateMapping=function(s,e,t,r){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var n="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(n),!1;throw new Error(n)}if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!e&&!t&&!r)){if(s&&"line"in s&&"column"in s&&e&&"line"in e&&"column"in e&&s.line>0&&s.column>=0&&e.line>0&&e.column>=0&&t)return;var n="Invalid mapping: "+JSON.stringify({generated:s,source:t,original:e,name:r});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(n),!1;throw new Error(n)}};ge.prototype._serializeMappings=function(){for(var s=0,e=1,t=0,r=0,n=0,a=0,o="",l,c,u,h,f=this._mappings.toArray(),d=0,p=f.length;d<p;d++){if(c=f[d],l="",c.generatedLine!==e)for(s=0;c.generatedLine!==e;)l+=";",e++;else if(d>0){if(!Y.compareByGeneratedPositionsInflated(c,f[d-1]))continue;l+=","}l+=Et.encode(c.generatedColumn-s),s=c.generatedColumn,c.source!=null&&(h=this._sources.indexOf(c.source),l+=Et.encode(h-a),a=h,l+=Et.encode(c.originalLine-1-r),r=c.originalLine-1,l+=Et.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(u=this._names.indexOf(c.name),l+=Et.encode(u-n),n=u)),o+=l}return o};ge.prototype._generateSourcesContent=function(s,e){return s.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=Y.relative(e,t));var r=Y.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};ge.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s};ge.prototype.toString=function(){return JSON.stringify(this.toJSON())};Pi.SourceMapGenerator=ge});var Si=pe(Je=>{Je.GREATEST_LOWER_BOUND=1;Je.LEAST_UPPER_BOUND=2;function Ws(i,s,e,t,r,n){var a=Math.floor((s-i)/2)+i,o=r(e,t[a],!0);return o===0?a:o>0?s-a>1?Ws(a,s,e,t,r,n):n==Je.LEAST_UPPER_BOUND?s<t.length?s:-1:a:a-i>1?Ws(i,a,e,t,r,n):n==Je.LEAST_UPPER_BOUND?a:i<0?-1:i}Je.search=function(s,e,t,r){if(e.length===0)return-1;var n=Ws(-1,e.length,s,e,t,r||Je.GREATEST_LOWER_BOUND);if(n<0)return-1;for(;n-1>=0&&t(e[n],e[n-1],!0)===0;)--n;return n}});var wi=pe(Ai=>{function Xa(i){function s(r,n,a){var o=r[n];r[n]=r[a],r[a]=o}function e(r,n){return Math.round(r+Math.random()*(n-r))}function t(r,n,a,o){if(a<o){var l=e(a,o),c=a-1;s(r,l,o);for(var u=r[o],h=a;h<o;h++)n(r[h],u,!1)<=0&&(c+=1,s(r,c,h));s(r,c+1,h);var f=c+1;t(r,n,a,f-1),t(r,n,f+1,o)}}return t}function Ga(i){let s=Xa.toString();return new Function(`return ${s}`)()(i)}var Ei=new WeakMap;Ai.quickSort=function(i,s,e=0){let t=Ei.get(s);t===void 0&&(t=Ga(s),Ei.set(s,t)),t(i,s,e,i.length-1)}});var Ii=pe(Yt=>{var N=st(),Ks=Si(),rt=qs().ArraySet,Qa=Rs(),At=wi().quickSort;function H(i,s){var e=i;return typeof i=="string"&&(e=N.parseSourceMapInput(i)),e.sections!=null?new Te(e,s):new se(e,s)}H.fromSourceMap=function(i,s){return se.fromSourceMap(i,s)};H.prototype._version=3;H.prototype.__generatedMappings=null;Object.defineProperty(H.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});H.prototype.__originalMappings=null;Object.defineProperty(H.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});H.prototype._charIsMappingSeparator=function(s,e){var t=s.charAt(e);return t===";"||t===","};H.prototype._parseMappings=function(s,e){throw new Error("Subclasses must implement _parseMappings")};H.GENERATED_ORDER=1;H.ORIGINAL_ORDER=2;H.GREATEST_LOWER_BOUND=1;H.LEAST_UPPER_BOUND=2;H.prototype.eachMapping=function(s,e,t){var r=e||null,n=t||H.GENERATED_ORDER,a;switch(n){case H.GENERATED_ORDER:a=this._generatedMappings;break;case H.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,l=s.bind(r),c=this._names,u=this._sources,h=this._sourceMapURL,f=0,d=a.length;f<d;f++){var p=a[f],g=p.source===null?null:u.at(p.source);g!==null&&(g=N.computeSourceURL(o,g,h)),l({source:g,generatedLine:p.generatedLine,generatedColumn:p.generatedColumn,originalLine:p.originalLine,originalColumn:p.originalColumn,name:p.name===null?null:c.at(p.name)})}};H.prototype.allGeneratedPositionsFor=function(s){var e=N.getArg(s,"line"),t={source:N.getArg(s,"source"),originalLine:e,originalColumn:N.getArg(s,"column",0)};if(t.source=this._findSourceIndex(t.source),t.source<0)return[];var r=[],n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,Ks.LEAST_UPPER_BOUND);if(n>=0){var a=this._originalMappings[n];if(s.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)r.push({line:N.getArg(a,"generatedLine",null),column:N.getArg(a,"generatedColumn",null),lastColumn:N.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++n];else for(var l=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==l;)r.push({line:N.getArg(a,"generatedLine",null),column:N.getArg(a,"generatedColumn",null),lastColumn:N.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++n]}return r};Yt.SourceMapConsumer=H;function se(i,s){var e=i;typeof i=="string"&&(e=N.parseSourceMapInput(i));var t=N.getArg(e,"version"),r=N.getArg(e,"sources"),n=N.getArg(e,"names",[]),a=N.getArg(e,"sourceRoot",null),o=N.getArg(e,"sourcesContent",null),l=N.getArg(e,"mappings"),c=N.getArg(e,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);a&&(a=N.normalize(a)),r=r.map(String).map(N.normalize).map(function(u){return a&&N.isAbsolute(a)&&N.isAbsolute(u)?N.relative(a,u):u}),this._names=rt.fromArray(n.map(String),!0),this._sources=rt.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(u){return N.computeSourceURL(a,u,s)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=l,this._sourceMapURL=s,this.file=c}se.prototype=Object.create(H.prototype);se.prototype.consumer=H;se.prototype._findSourceIndex=function(i){var s=i;if(this.sourceRoot!=null&&(s=N.relative(this.sourceRoot,s)),this._sources.has(s))return this._sources.indexOf(s);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==i)return e;return-1};se.fromSourceMap=function(s,e){var t=Object.create(se.prototype),r=t._names=rt.fromArray(s._names.toArray(),!0),n=t._sources=rt.fromArray(s._sources.toArray(),!0);t.sourceRoot=s._sourceRoot,t.sourcesContent=s._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=s._file,t._sourceMapURL=e,t._absoluteSources=t._sources.toArray().map(function(d){return N.computeSourceURL(t.sourceRoot,d,e)});for(var a=s._mappings.toArray().slice(),o=t.__generatedMappings=[],l=t.__originalMappings=[],c=0,u=a.length;c<u;c++){var h=a[c],f=new Ci;f.generatedLine=h.generatedLine,f.generatedColumn=h.generatedColumn,h.source&&(f.source=n.indexOf(h.source),f.originalLine=h.originalLine,f.originalColumn=h.originalColumn,h.name&&(f.name=r.indexOf(h.name)),l.push(f)),o.push(f)}return At(t.__originalMappings,N.compareByOriginalPositions),t};se.prototype._version=3;Object.defineProperty(se.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Ci(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Js=N.compareByGeneratedPositionsDeflatedNoLine;function vi(i,s){let e=i.length,t=i.length-s;if(!(t<=1))if(t==2){let r=i[s],n=i[s+1];Js(r,n)>0&&(i[s]=n,i[s+1]=r)}else if(t<20)for(let r=s;r<e;r++)for(let n=r;n>s;n--){let a=i[n-1],o=i[n];if(Js(a,o)<=0)break;i[n-1]=o,i[n]=a}else At(i,Js,s)}se.prototype._parseMappings=function(s,e){var t=1,r=0,n=0,a=0,o=0,l=0,c=s.length,u=0,h={},f={},d=[],p=[],g,y,b,P,k;let T=0;for(;u<c;)if(s.charAt(u)===";")t++,u++,r=0,vi(p,T),T=p.length;else if(s.charAt(u)===",")u++;else{for(g=new Ci,g.generatedLine=t,P=u;P<c&&!this._charIsMappingSeparator(s,P);P++);for(y=s.slice(u,P),b=[];u<P;)Qa.decode(s,u,f),k=f.value,u=f.rest,b.push(k);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=r+b[0],r=g.generatedColumn,b.length>1&&(g.source=o+b[1],o+=b[1],g.originalLine=n+b[2],n=g.originalLine,g.originalLine+=1,g.originalColumn=a+b[3],a=g.originalColumn,b.length>4&&(g.name=l+b[4],l+=b[4])),p.push(g),typeof g.originalLine=="number"){let A=g.source;for(;d.length<=A;)d.push(null);d[A]===null&&(d[A]=[]),d[A].push(g)}}vi(p,T),this.__generatedMappings=p;for(var E=0;E<d.length;E++)d[E]!=null&&At(d[E],N.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...d)};se.prototype._findMapping=function(s,e,t,r,n,a){if(s[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+s[t]);if(s[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+s[r]);return Ks.search(s,e,n,a)};se.prototype.computeColumnSpans=function(){for(var s=0;s<this._generatedMappings.length;++s){var e=this._generatedMappings[s];if(s+1<this._generatedMappings.length){var t=this._generatedMappings[s+1];if(e.generatedLine===t.generatedLine){e.lastGeneratedColumn=t.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}};se.prototype.originalPositionFor=function(s){var e={generatedLine:N.getArg(s,"line"),generatedColumn:N.getArg(s,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",N.compareByGeneratedPositionsDeflated,N.getArg(s,"bias",H.GREATEST_LOWER_BOUND));if(t>=0){var r=this._generatedMappings[t];if(r.generatedLine===e.generatedLine){var n=N.getArg(r,"source",null);n!==null&&(n=this._sources.at(n),n=N.computeSourceURL(this.sourceRoot,n,this._sourceMapURL));var a=N.getArg(r,"name",null);return a!==null&&(a=this._names.at(a)),{source:n,line:N.getArg(r,"originalLine",null),column:N.getArg(r,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};se.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(s){return s==null}):!1};se.prototype.sourceContentFor=function(s,e){if(!this.sourcesContent)return null;var t=this._findSourceIndex(s);if(t>=0)return this.sourcesContent[t];var r=s;this.sourceRoot!=null&&(r=N.relative(this.sourceRoot,r));var n;if(this.sourceRoot!=null&&(n=N.urlParse(this.sourceRoot))){var a=r.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||n.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(e)return null;throw new Error('"'+r+'" is not in the SourceMap.')};se.prototype.generatedPositionFor=function(s){var e=N.getArg(s,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var t={source:e,originalLine:N.getArg(s,"line"),originalColumn:N.getArg(s,"column")},r=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,N.getArg(s,"bias",H.GREATEST_LOWER_BOUND));if(r>=0){var n=this._originalMappings[r];if(n.source===t.source)return{line:N.getArg(n,"generatedLine",null),column:N.getArg(n,"generatedColumn",null),lastColumn:N.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Yt.BasicSourceMapConsumer=se;function Te(i,s){var e=i;typeof i=="string"&&(e=N.parseSourceMapInput(i));var t=N.getArg(e,"version"),r=N.getArg(e,"sections");if(t!=this._version)throw new Error("Unsupported version: "+t);this._sources=new rt,this._names=new rt;var n={line:-1,column:0};this._sections=r.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=N.getArg(a,"offset"),l=N.getArg(o,"line"),c=N.getArg(o,"column");if(l<n.line||l===n.line&&c<n.column)throw new Error("Section offsets must be ordered and non-overlapping.");return n=o,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new H(N.getArg(a,"map"),s)}})}Te.prototype=Object.create(H.prototype);Te.prototype.constructor=H;Te.prototype._version=3;Object.defineProperty(Te.prototype,"sources",{get:function(){for(var i=[],s=0;s<this._sections.length;s++)for(var e=0;e<this._sections[s].consumer.sources.length;e++)i.push(this._sections[s].consumer.sources[e]);return i}});Te.prototype.originalPositionFor=function(s){var e={generatedLine:N.getArg(s,"line"),generatedColumn:N.getArg(s,"column")},t=Ks.search(e,this._sections,function(n,a){var o=n.generatedLine-a.generatedOffset.generatedLine;return o||n.generatedColumn-a.generatedOffset.generatedColumn}),r=this._sections[t];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:s.bias}):{source:null,line:null,column:null,name:null}};Te.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(s){return s.consumer.hasContentsOfAllSources()})};Te.prototype.sourceContentFor=function(s,e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t],n=r.consumer.sourceContentFor(s,!0);if(n||n==="")return n}if(e)return null;throw new Error('"'+s+'" is not in the SourceMap.')};Te.prototype.generatedPositionFor=function(s){for(var e=0;e<this._sections.length;e++){var t=this._sections[e];if(t.consumer._findSourceIndex(N.getArg(s,"source"))!==-1){var r=t.consumer.generatedPositionFor(s);if(r){var n={line:r.line+(t.generatedOffset.generatedLine-1),column:r.column+(t.generatedOffset.generatedLine===r.line?t.generatedOffset.generatedColumn-1:0)};return n}}}return{line:null,column:null}};Te.prototype._parseMappings=function(s,e){this.__generatedMappings=[],this.__originalMappings=[];for(var t=0;t<this._sections.length;t++)for(var r=this._sections[t],n=r.consumer._generatedMappings,a=0;a<n.length;a++){var o=n[a],l=r.consumer._sources.at(o.source);l!==null&&(l=N.computeSourceURL(r.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var c=null;o.name&&(c=r.consumer._names.at(o.name),this._names.add(c),c=this._names.indexOf(c));var u={source:l,generatedLine:o.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(r.generatedOffset.generatedLine===o.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(u),typeof u.originalLine=="number"&&this.__originalMappings.push(u)}At(this.__generatedMappings,N.compareByGeneratedPositionsDeflated),At(this.__originalMappings,N.compareByOriginalPositions)};Yt.IndexedSourceMapConsumer=Te});var ki=pe(Ni=>{var Ya=zs().SourceMapGenerator,Zt=st(),Za=/(\r?\n)/,eo=10,it="$$$isSourceNode$$$";function fe(i,s,e,t,r){this.children=[],this.sourceContents={},this.line=i??null,this.column=s??null,this.source=e??null,this.name=r??null,this[it]=!0,t!=null&&this.add(t)}fe.fromStringWithSourceMap=function(s,e,t){var r=new fe,n=s.split(Za),a=0,o=function(){var f=p(),d=p()||"";return f+d;function p(){return a<n.length?n[a++]:void 0}},l=1,c=0,u=null;return e.eachMapping(function(f){if(u!==null)if(l<f.generatedLine)h(u,o()),l++,c=0;else{var d=n[a]||"",p=d.substr(0,f.generatedColumn-c);n[a]=d.substr(f.generatedColumn-c),c=f.generatedColumn,h(u,p),u=f;return}for(;l<f.generatedLine;)r.add(o()),l++;if(c<f.generatedColumn){var d=n[a]||"";r.add(d.substr(0,f.generatedColumn)),n[a]=d.substr(f.generatedColumn),c=f.generatedColumn}u=f},this),a<n.length&&(u&&h(u,o()),r.add(n.splice(a).join(""))),e.sources.forEach(function(f){var d=e.sourceContentFor(f);d!=null&&(t!=null&&(f=Zt.join(t,f)),r.setSourceContent(f,d))}),r;function h(f,d){if(f===null||f.source===void 0)r.add(d);else{var p=t?Zt.join(t,f.source):f.source;r.add(new fe(f.originalLine,f.originalColumn,p,d,f.name))}}};fe.prototype.add=function(s){if(Array.isArray(s))s.forEach(function(e){this.add(e)},this);else if(s[it]||typeof s=="string")s&&this.children.push(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this};fe.prototype.prepend=function(s){if(Array.isArray(s))for(var e=s.length-1;e>=0;e--)this.prepend(s[e]);else if(s[it]||typeof s=="string")this.children.unshift(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this};fe.prototype.walk=function(s){for(var e,t=0,r=this.children.length;t<r;t++)e=this.children[t],e[it]?e.walk(s):e!==""&&s(e,{source:this.source,line:this.line,column:this.column,name:this.name})};fe.prototype.join=function(s){var e,t,r=this.children.length;if(r>0){for(e=[],t=0;t<r-1;t++)e.push(this.children[t]),e.push(s);e.push(this.children[t]),this.children=e}return this};fe.prototype.replaceRight=function(s,e){var t=this.children[this.children.length-1];return t[it]?t.replaceRight(s,e):typeof t=="string"?this.children[this.children.length-1]=t.replace(s,e):this.children.push("".replace(s,e)),this};fe.prototype.setSourceContent=function(s,e){this.sourceContents[Zt.toSetString(s)]=e};fe.prototype.walkSourceContents=function(s){for(var e=0,t=this.children.length;e<t;e++)this.children[e][it]&&this.children[e].walkSourceContents(s);for(var r=Object.keys(this.sourceContents),e=0,t=r.length;e<t;e++)s(Zt.fromSetString(r[e]),this.sourceContents[r[e]])};fe.prototype.toString=function(){var s="";return this.walk(function(e){s+=e}),s};fe.prototype.toStringWithSourceMap=function(s){var e={code:"",line:1,column:0},t=new Ya(s),r=!1,n=null,a=null,o=null,l=null;return this.walk(function(c,u){e.code+=c,u.source!==null&&u.line!==null&&u.column!==null?((n!==u.source||a!==u.line||o!==u.column||l!==u.name)&&t.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name}),n=u.source,a=u.line,o=u.column,l=u.name,r=!0):r&&(t.addMapping({generated:{line:e.line,column:e.column}}),n=null,r=!1);for(var h=0,f=c.length;h<f;h++)c.charCodeAt(h)===eo?(e.line++,e.column=0,h+1===f?(n=null,r=!1):r&&t.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name})):e.column++}),this.walkSourceContents(function(c,u){t.setSourceContent(c,u)}),{code:e.code,map:t}};Ni.SourceNode=fe});var Li=pe(es=>{es.SourceMapGenerator=zs().SourceMapGenerator;es.SourceMapConsumer=Ii().SourceMapConsumer;es.SourceNode=ki().SourceNode});var cn=pe(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});function to(i,s){if(i==null)return{};var e={};for(var t in i)if({}.hasOwnProperty.call(i,t)){if(s.includes(t))continue;e[t]=i[t]}return e}var Ce=class{constructor(s,e,t){this.line=void 0,this.column=void 0,this.index=void 0,this.line=s,this.column=e,this.index=t}},ct=class{constructor(s,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=s,this.end=e}};function ae(i,s){let{line:e,column:t,index:r}=i;return new Ce(e,t+s,r+s)}var Di="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",so={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Di},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Di}},Oi={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"},rs=i=>i.type==="UpdateExpression"?Oi.UpdateExpression[`${i.prefix}`]:Oi[i.type],ro={AccessorIsGenerator:({kind:i})=>`A ${i}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.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",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 constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:s})=>`A string literal cannot be used as an exported binding without \`from\`.
2
2
  - Did you mean \`export { '${i}' as '${s}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:i})=>`'${i==="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:i})=>`Unsyntactic ${i==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:i})=>`A string literal cannot be used as an imported binding.
3
3
  - Did you mean \`import { "${i}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:i})=>`\`import()\` requires exactly ${i===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:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${rs(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${rs(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${rs(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} 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:({labelName:i})=>`Label '${i}' 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:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(s=>JSON.stringify(s)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(s=>JSON.stringify(s)).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:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' 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:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:s})=>`Unexpected token${s?` '${s}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:s})=>`The only valid meta property for ${i} is ${i}.${s}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},io={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},no=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ao={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${rs({type:i})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},oo=["message"];function Mi(i,s,e){Object.defineProperty(i,s,{enumerable:!1,configurable:!0,value:e})}function lo({toMessage:i,code:s,reasonCode:e,syntaxPlugin:t}){let r=e==="MissingPlugin"||e==="MissingOneOfPlugins";{let n={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};n[e]&&(e=n[e])}return function n(a,o){let l=new SyntaxError;return l.code=s,l.reasonCode=e,l.loc=a,l.pos=a.index,l.syntaxPlugin=t,r&&(l.missingPlugin=o.missingPlugin),Mi(l,"clone",function(u={}){var h;let{line:f,column:d,index:p}=(h=u.loc)!=null?h:a;return n(new Ce(f,d,p),Object.assign({},o,u.details))}),Mi(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${i(o)} (${a.line}:${a.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function Be(i,s){if(Array.isArray(i))return t=>Be(t,i[0]);let e={};for(let t of Object.keys(i)){let r=i[t],n=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:a}=n,o=to(n,oo),l=typeof a=="string"?()=>a:a;e[t]=lo(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},s?{syntaxPlugin:s}:{},o))}return e}var m=Object.assign({},Be(so),Be(ro),Be(io),Be`pipelineOperator`(ao)),{defineProperty:co}=Object,Fi=(i,s)=>{i&&co(i,s,{enumerable:!1,value:i[s]})};function wt(i){return Fi(i.loc.start,"index"),Fi(i.loc.end,"index"),i}var uo=i=>class extends i{parse(){let e=wt(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(wt)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((t=e.expression.extra)!=null&&t.parenthesized)}parseBlockBody(e,t,r,n,a){super.parseBlockBody(e,t,r,n,a);let o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,t,r,n,a,o){this.parseMethod(t,r,n,a,o,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,t,r,n,a,o,l=!1){let c=this.startNode();return c.kind=e.kind,c=super.parseMethod(c,t,r,n,a,o,l),c.type="FunctionExpression",delete c.kind,e.value=c,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,r,n,a){let o=super.parseObjectMethod(e,t,r,n,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,t,r,n){let a=super.parseObjectProperty(e,t,r,n);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,t,r){return e==="Property"?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(e!=null&&this.isObjectProperty(e)){let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(m.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(m.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if(r.callee.type==="Import"){if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var n,a;r.options=(n=r.arguments[1])!=null?n:null,r.attributes=(a=r.arguments[1])!=null?a:null}delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,t){let r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;let{declaration:o}=n;o?.type==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,r)}break}return n}parseSubscript(e,t,r,n){let a=super.parseSubscript(e,t,r,n);if(n.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),n.stop){let o=this.startNodeAtNode(a);return o.expression=a,this.finishNode(o,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}finishNodeAt(e,t,r){return wt(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),wt(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),wt(e)}},He=class{constructor(s,e){this.token=void 0,this.preserveSpace=void 0,this.token=s,this.preserveSpace=!!e}},$={brace:new He("{"),j_oTag:new He("<tag"),j_cTag:new He("</tag"),j_expr:new He("<tag>...</tag>",!0)};$.template=new He("`",!0);var _=!0,C=!0,Hs=!0,vt=!0,Ue=!0,ho=!0,as=class{constructor(s,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=s,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},Tr=new Map;function j(i,s={}){s.keyword=i;let e=D(i,s);return Tr.set(i,e),e}function ne(i,s){return D(i,{beforeExpr:_,binop:s})}var kt=-1,Me=[],Pr=[],Sr=[],Er=[],Ar=[],wr=[];function D(i,s={}){var e,t,r,n;return++kt,Pr.push(i),Sr.push((e=s.binop)!=null?e:-1),Er.push((t=s.beforeExpr)!=null?t:!1),Ar.push((r=s.startsExpr)!=null?r:!1),wr.push((n=s.prefix)!=null?n:!1),Me.push(new as(i,s)),kt}function B(i,s={}){var e,t,r,n;return++kt,Tr.set(i,kt),Pr.push(i),Sr.push((e=s.binop)!=null?e:-1),Er.push((t=s.beforeExpr)!=null?t:!1),Ar.push((r=s.startsExpr)!=null?r:!1),wr.push((n=s.prefix)!=null?n:!1),Me.push(new as("name",s)),kt}var po={bracketL:D("[",{beforeExpr:_,startsExpr:C}),bracketHashL:D("#[",{beforeExpr:_,startsExpr:C}),bracketBarL:D("[|",{beforeExpr:_,startsExpr:C}),bracketR:D("]"),bracketBarR:D("|]"),braceL:D("{",{beforeExpr:_,startsExpr:C}),braceBarL:D("{|",{beforeExpr:_,startsExpr:C}),braceHashL:D("#{",{beforeExpr:_,startsExpr:C}),braceR:D("}"),braceBarR:D("|}"),parenL:D("(",{beforeExpr:_,startsExpr:C}),parenR:D(")"),comma:D(",",{beforeExpr:_}),semi:D(";",{beforeExpr:_}),colon:D(":",{beforeExpr:_}),doubleColon:D("::",{beforeExpr:_}),dot:D("."),question:D("?",{beforeExpr:_}),questionDot:D("?."),arrow:D("=>",{beforeExpr:_}),template:D("template"),ellipsis:D("...",{beforeExpr:_}),backQuote:D("`",{startsExpr:C}),dollarBraceL:D("${",{beforeExpr:_,startsExpr:C}),templateTail:D("...`",{startsExpr:C}),templateNonTail:D("...${",{beforeExpr:_,startsExpr:C}),at:D("@"),hash:D("#",{startsExpr:C}),interpreterDirective:D("#!..."),eq:D("=",{beforeExpr:_,isAssign:vt}),assign:D("_=",{beforeExpr:_,isAssign:vt}),slashAssign:D("_=",{beforeExpr:_,isAssign:vt}),xorAssign:D("_=",{beforeExpr:_,isAssign:vt}),moduloAssign:D("_=",{beforeExpr:_,isAssign:vt}),incDec:D("++/--",{prefix:Ue,postfix:ho,startsExpr:C}),bang:D("!",{beforeExpr:_,prefix:Ue,startsExpr:C}),tilde:D("~",{beforeExpr:_,prefix:Ue,startsExpr:C}),doubleCaret:D("^^",{startsExpr:C}),doubleAt:D("@@",{startsExpr:C}),pipeline:ne("|>",0),nullishCoalescing:ne("??",1),logicalOR:ne("||",1),logicalAND:ne("&&",2),bitwiseOR:ne("|",3),bitwiseXOR:ne("^",4),bitwiseAND:ne("&",5),equality:ne("==/!=/===/!==",6),lt:ne("</>/<=/>=",7),gt:ne("</>/<=/>=",7),relational:ne("</>/<=/>=",7),bitShift:ne("<</>>/>>>",8),bitShiftL:ne("<</>>/>>>",8),bitShiftR:ne("<</>>/>>>",8),plusMin:D("+/-",{beforeExpr:_,binop:9,prefix:Ue,startsExpr:C}),modulo:D("%",{binop:10,startsExpr:C}),star:D("*",{binop:10}),slash:ne("/",10),exponent:D("**",{beforeExpr:_,binop:11,rightAssociative:!0}),_in:j("in",{beforeExpr:_,binop:7}),_instanceof:j("instanceof",{beforeExpr:_,binop:7}),_break:j("break"),_case:j("case",{beforeExpr:_}),_catch:j("catch"),_continue:j("continue"),_debugger:j("debugger"),_default:j("default",{beforeExpr:_}),_else:j("else",{beforeExpr:_}),_finally:j("finally"),_function:j("function",{startsExpr:C}),_if:j("if"),_return:j("return",{beforeExpr:_}),_switch:j("switch"),_throw:j("throw",{beforeExpr:_,prefix:Ue,startsExpr:C}),_try:j("try"),_var:j("var"),_const:j("const"),_with:j("with"),_new:j("new",{beforeExpr:_,startsExpr:C}),_this:j("this",{startsExpr:C}),_super:j("super",{startsExpr:C}),_class:j("class",{startsExpr:C}),_extends:j("extends",{beforeExpr:_}),_export:j("export"),_import:j("import",{startsExpr:C}),_null:j("null",{startsExpr:C}),_true:j("true",{startsExpr:C}),_false:j("false",{startsExpr:C}),_typeof:j("typeof",{beforeExpr:_,prefix:Ue,startsExpr:C}),_void:j("void",{beforeExpr:_,prefix:Ue,startsExpr:C}),_delete:j("delete",{beforeExpr:_,prefix:Ue,startsExpr:C}),_do:j("do",{isLoop:Hs,beforeExpr:_}),_for:j("for",{isLoop:Hs}),_while:j("while",{isLoop:Hs}),_as:B("as",{startsExpr:C}),_assert:B("assert",{startsExpr:C}),_async:B("async",{startsExpr:C}),_await:B("await",{startsExpr:C}),_defer:B("defer",{startsExpr:C}),_from:B("from",{startsExpr:C}),_get:B("get",{startsExpr:C}),_let:B("let",{startsExpr:C}),_meta:B("meta",{startsExpr:C}),_of:B("of",{startsExpr:C}),_sent:B("sent",{startsExpr:C}),_set:B("set",{startsExpr:C}),_source:B("source",{startsExpr:C}),_static:B("static",{startsExpr:C}),_using:B("using",{startsExpr:C}),_yield:B("yield",{startsExpr:C}),_asserts:B("asserts",{startsExpr:C}),_checks:B("checks",{startsExpr:C}),_exports:B("exports",{startsExpr:C}),_global:B("global",{startsExpr:C}),_implements:B("implements",{startsExpr:C}),_intrinsic:B("intrinsic",{startsExpr:C}),_infer:B("infer",{startsExpr:C}),_is:B("is",{startsExpr:C}),_mixins:B("mixins",{startsExpr:C}),_proto:B("proto",{startsExpr:C}),_require:B("require",{startsExpr:C}),_satisfies:B("satisfies",{startsExpr:C}),_keyof:B("keyof",{startsExpr:C}),_readonly:B("readonly",{startsExpr:C}),_unique:B("unique",{startsExpr:C}),_abstract:B("abstract",{startsExpr:C}),_declare:B("declare",{startsExpr:C}),_enum:B("enum",{startsExpr:C}),_module:B("module",{startsExpr:C}),_namespace:B("namespace",{startsExpr:C}),_interface:B("interface",{startsExpr:C}),_type:B("type",{startsExpr:C}),_opaque:B("opaque",{startsExpr:C}),name:D("name",{startsExpr:C}),string:D("string",{startsExpr:C}),num:D("num",{startsExpr:C}),bigint:D("bigint",{startsExpr:C}),decimal:D("decimal",{startsExpr:C}),regexp:D("regexp",{startsExpr:C}),privateName:D("#name",{startsExpr:C}),eof:D("eof"),jsxName:D("jsxName"),jsxText:D("jsxText",{beforeExpr:!0}),jsxTagStart:D("jsxTagStart",{startsExpr:!0}),jsxTagEnd:D("jsxTagEnd"),placeholder:D("%%",{startsExpr:!0})};function U(i){return i>=93&&i<=132}function fo(i){return i<=92}function Pe(i){return i>=58&&i<=132}function Ki(i){return i>=58&&i<=136}function mo(i){return Er[i]}function er(i){return Ar[i]}function yo(i){return i>=29&&i<=33}function Bi(i){return i>=129&&i<=131}function go(i){return i>=90&&i<=92}function vr(i){return i>=58&&i<=92}function xo(i){return i>=39&&i<=59}function bo(i){return i===34}function To(i){return wr[i]}function Po(i){return i>=121&&i<=123}function So(i){return i>=124&&i<=130}function $e(i){return Pr[i]}function is(i){return Sr[i]}function Eo(i){return i===57}function os(i){return i>=24&&i<=25}function Oe(i){return Me[i]}Me[8].updateContext=i=>{i.pop()},Me[5].updateContext=Me[7].updateContext=Me[23].updateContext=i=>{i.push($.brace)},Me[22].updateContext=i=>{i[i.length-1]===$.template?i.pop():i.push($.template)},Me[142].updateContext=i=>{i.push($.j_expr,$.j_oTag)};var Cr="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Hi="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Ao=new RegExp("["+Cr+"]"),wo=new RegExp("["+Cr+Hi+"]");Cr=Hi=null;var Xi=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],vo=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function tr(i,s){let e=65536;for(let t=0,r=s.length;t<r;t+=2){if(e+=s[t],e>i)return!1;if(e+=s[t+1],e>=i)return!0}return!1}function Fe(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Ao.test(String.fromCharCode(i)):tr(i,Xi)}function at(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&wo.test(String.fromCharCode(i)):tr(i,Xi)||tr(i,vo)}var Ir={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Co=new Set(Ir.keyword),Io=new Set(Ir.strict),No=new Set(Ir.strictBind);function Gi(i,s){return s&&i==="await"||i==="enum"}function Qi(i,s){return Gi(i,s)||Io.has(i)}function Yi(i){return No.has(i)}function Zi(i,s){return Qi(i,s)||Yi(i)}function ko(i){return Co.has(i)}function Lo(i,s,e){return i===64&&s===64&&Fe(e)}var Do=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Oo(i){return Do.has(i)}var Lt=class{constructor(s){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=s}},Dt=class{constructor(s,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=s,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let s=this.currentThisScopeFlags();return(s&64)>0&&(s&2)===0}get inStaticBlock(){for(let s=this.scopeStack.length-1;;s--){let{flags:e}=this.scopeStack[s];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(s){return new Lt(s)}enter(s){this.scopeStack.push(this.createScope(s))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(s){return!!(s.flags&130||!this.parser.inModule&&s.flags&1)}declareName(s,e,t){let r=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(r,s,e,t);let n=r.names.get(s)||0;e&16?n=n|4:(r.firstLexicalName||(r.firstLexicalName=s),n=n|2),r.names.set(s,n),e&8&&this.maybeExportDefined(r,s)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(r=this.scopeStack[n],this.checkRedeclarationInScope(r,s,e,t),r.names.set(s,(r.names.get(s)||0)|1),this.maybeExportDefined(r,s),!(r.flags&387));--n);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(s)}maybeExportDefined(s,e){this.parser.inModule&&s.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(s,e,t,r){this.isRedeclaredInScope(s,e,t)&&this.parser.raise(m.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(s,e,t){if(!(t&1))return!1;if(t&8)return s.names.has(e);let r=s.names.get(e);return t&16?(r&2)>0||!this.treatFunctionsAsVarInScope(s)&&(r&1)>0:(r&2)>0&&!(s.flags&8&&s.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(s)&&(r&4)>0}checkLocalExport(s){let{name:e}=s;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,s.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let s=this.scopeStack.length-1;;s--){let{flags:e}=this.scopeStack[s];if(e&387)return e}}currentThisScopeFlags(){for(let s=this.scopeStack.length-1;;s--){let{flags:e}=this.scopeStack[s];if(e&451&&!(e&4))return e}}},sr=class extends Lt{constructor(...s){super(...s),this.declareFunctions=new Set}},rr=class extends Dt{createScope(s){return new sr(s)}declareName(s,e,t){let r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,s,e,t),this.maybeExportDefined(r,s),r.declareFunctions.add(s);return}super.declareName(s,e,t)}isRedeclaredInScope(s,e,t){if(super.isRedeclaredInScope(s,e,t))return!0;if(t&2048&&!s.declareFunctions.has(e)){let r=s.names.get(e);return(r&4)>0||(r&2)>0}return!1}checkLocalExport(s){this.scopeStack[0].declareFunctions.has(s.name)||super.checkLocalExport(s)}},ir=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(s){if(typeof s=="string")return this.plugins.has(s);{let[e,t]=s;if(!this.hasPlugin(e))return!1;let r=this.plugins.get(e);for(let n of Object.keys(t))if(r?.[n]!==t[n])return!1;return!0}}getPluginOption(s,e){var t;return(t=this.plugins.get(s))==null?void 0:t[e]}};function en(i,s){i.trailingComments===void 0?i.trailingComments=s:i.trailingComments.unshift(...s)}function Mo(i,s){i.leadingComments===void 0?i.leadingComments=s:i.leadingComments.unshift(...s)}function Ot(i,s){i.innerComments===void 0?i.innerComments=s:i.innerComments.unshift(...s)}function Ct(i,s,e){let t=null,r=s.length;for(;t===null&&r>0;)t=s[--r];t===null||t.start>e.start?Ot(i,e.comments):en(t,e.comments)}var nr=class extends ir{addComment(s){this.filename&&(s.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(s),this.state.commentsLen++}processComment(s){let{commentStack:e}=this.state,t=e.length;if(t===0)return;let r=t-1,n=e[r];n.start===s.end&&(n.leadingNode=s,r--);let{start:a}=s;for(;r>=0;r--){let o=e[r],l=o.end;if(l>a)o.containingNode=s,this.finalizeComment(o),e.splice(r,1);else{l===a&&(o.trailingNode=s);break}}}finalizeComment(s){let{comments:e}=s;if(s.leadingNode!==null||s.trailingNode!==null)s.leadingNode!==null&&en(s.leadingNode,e),s.trailingNode!==null&&Mo(s.trailingNode,e);else{let{containingNode:t,start:r}=s;if(this.input.charCodeAt(r-1)===44)switch(t.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Ct(t,t.properties,s);break;case"CallExpression":case"OptionalCallExpression":Ct(t,t.arguments,s);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ct(t,t.params,s);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Ct(t,t.elements,s);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ct(t,t.specifiers,s);break;default:Ot(t,e)}else Ot(t,e)}}finalizeRemainingComments(){let{commentStack:s}=this.state;for(let e=s.length-1;e>=0;e--)this.finalizeComment(s[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(s){let{commentStack:e}=this.state,{length:t}=e;if(t===0)return;let r=e[t-1];r.leadingNode===s&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(s){let{commentStack:e}=this.state,{length:t}=e;t!==0&&(e[t-1].trailingNode===s?e[t-1].trailingNode=null:t>=2&&e[t-2].trailingNode===s&&(e[t-2].trailingNode=null))}takeSurroundingComments(s,e,t){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1;for(;a>=0;a--){let o=r[a],l=o.end;if(o.start===t)o.leadingNode=s;else if(l===e)o.trailingNode=s;else if(l<e)break}}},Fo=/\r\n|[\r\n\u2028\u2029]/,ts=new RegExp(Fo.source,"g");function ot(i){switch(i){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function _i(i,s,e){for(let t=s;t<e;t++)if(ot(i.charCodeAt(t)))return!0;return!1}var Xs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Gs=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Bo(i){switch(i){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var ar=class i{constructor(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[$.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(s){s?this.flags|=1:this.flags&=-2}init({strictMode:s,sourceType:e,startLine:t,startColumn:r}){this.strict=s===!1?!1:s===!0?!0:e==="module",this.curLine=t,this.lineStart=-r,this.startLoc=this.endLoc=new Ce(t,r,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(s){s?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(s){s?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(s){s?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(s){s?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(s){s?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(s){s?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(s){s?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(s){s?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(s){s?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(s){s?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(s){s?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(s){s?this.flags|=4096:this.flags&=-4097}curPosition(){return new Ce(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let s=new i;return s.flags=this.flags,s.curLine=this.curLine,s.lineStart=this.lineStart,s.startLoc=this.startLoc,s.endLoc=this.endLoc,s.errors=this.errors.slice(),s.potentialArrowAt=this.potentialArrowAt,s.noArrowAt=this.noArrowAt.slice(),s.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),s.topicContext=this.topicContext,s.labels=this.labels.slice(),s.commentsLen=this.commentsLen,s.commentStack=this.commentStack.slice(),s.pos=this.pos,s.type=this.type,s.value=this.value,s.start=this.start,s.end=this.end,s.lastTokEndLoc=this.lastTokEndLoc,s.lastTokStartLoc=this.lastTokStartLoc,s.context=this.context.slice(),s.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,s.strictErrors=this.strictErrors,s.tokensLength=this.tokensLength,s}},_o=function(s){return s>=48&&s<=57},ji={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},ss={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function Ri(i,s,e,t,r,n){let a=e,o=t,l=r,c="",u=null,h=e,{length:f}=s;for(;;){if(e>=f){n.unterminated(a,o,l),c+=s.slice(h,e);break}let d=s.charCodeAt(e);if(jo(i,d,s,e)){c+=s.slice(h,e);break}if(d===92){c+=s.slice(h,e);let p=Ro(s,e,t,r,i==="template",n);p.ch===null&&!u?u={pos:e,lineStart:t,curLine:r}:c+=p.ch,{pos:e,lineStart:t,curLine:r}=p,h=e}else d===8232||d===8233?(++e,++r,t=e):d===10||d===13?i==="template"?(c+=s.slice(h,e)+`
4
4
  `,++e,d===13&&s.charCodeAt(e)===10&&++e,++r,h=t=e):n.unterminated(a,o,l):++e}return{pos:e,str:c,firstInvalidLoc:u,lineStart:t,curLine:r,containsInvalid:!!u}}function jo(i,s,e,t){return i==="template"?s===96||s===36&&e.charCodeAt(t+1)===123:s===(i==="double"?34:39)}function Ro(i,s,e,t,r,n){let a=!r;s++;let o=c=>({pos:s,ch:c,lineStart:e,curLine:t}),l=i.charCodeAt(s++);switch(l){case 110:return o(`
@@ -7,7 +7,7 @@
7
7
  `):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(m.UnterminatedString,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);if(n===e)break;n===38?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):ot(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(133,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let t=10;this.codePointAtPos(this.state.pos)===120&&(t=16,++this.state.pos);let r=this.readInt(t,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(r){let n=this.input.slice(e,this.state.pos),a=Yo[n];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(at(e)||e===45);this.finishToken(140,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(140)?e.name=this.state.value:vr(this.state.type)?e.name=$e(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext($.brace),this.next(),e=this.jsxParseExpressionContainer(e,$.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Ke.AttributeIsEmpty,e),e;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Ke.UnsupportedJsxValue,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($.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();e.expression=r}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext($.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext($.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 t=this.startNodeAt(e);return this.eat(143)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(143);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(143),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(143)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(143),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e),a=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 142:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 141:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext($.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,$.j_expr));break}default:this.unexpected()}Ve(n)&&!Ve(a)&&a!==null?this.raise(Ke.MissingClosingTagFragment,a):!Ve(n)&&Ve(a)?this.raise(Ke.MissingClosingTagElement,a,{openingTagName:nt(n.name)}):!Ve(n)&&!Ve(a)&&nt(a.name)!==nt(n.name)&&this.raise(Ke.MissingClosingTagElement,a,{openingTagName:nt(n.name)})}if(Ve(n)?(t.openingFragment=n,t.closingFragment=a):(t.openingElement=n,t.closingElement=a),t.children=r,this.match(47))throw this.raise(Ke.UnwrappedAdjacentJSXElements,this.state.startLoc);return Ve(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===$.j_expr){this.jsxReadToken();return}if(t===$.j_oTag||t===$.j_cTag){if(Fe(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(143);return}if((e===34||e===39)&&t===$.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:r}=this.state;if(r===56&&e===142)t.splice(-2,2,$.j_cTag),this.state.canStartJSXElement=!1;else if(r===142)t.push($.j_oTag);else if(r===143){let n=t[t.length-1];n===$.j_oTag&&e===56||n===$.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===$.j_expr):(this.setContext($.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=mo(r)}},mr=class extends Lt{constructor(...s){super(...s),this.tsNames=new Map}},yr=class extends Dt{constructor(...s){super(...s),this.importsStack=[]}createScope(s){return this.importsStack.push(new Set),new mr(s)}enter(s){s===256&&this.importsStack.push(new Set),super.enter(s)}exit(){let s=super.exit();return s===256&&this.importsStack.pop(),s}hasImport(s,e){let t=this.importsStack.length;if(this.importsStack[t-1].has(s))return!0;if(!e&&t>1){for(let r=0;r<t-1;r++)if(this.importsStack[r].has(s))return!0}return!1}declareName(s,e,t){if(e&4096){this.hasImport(s,!0)&&this.parser.raise(m.VarRedeclaration,t,{identifierName:s}),this.importsStack[this.importsStack.length-1].add(s);return}let r=this.currentScope(),n=r.tsNames.get(s)||0;if(e&1024){this.maybeExportDefined(r,s),r.tsNames.set(s,n|16);return}super.declareName(s,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(r,s,e,t),this.maybeExportDefined(r,s)),n=n|1),e&256&&(n=n|2),e&512&&(n=n|4),e&128&&(n=n|8),n&&r.tsNames.set(s,n)}isRedeclaredInScope(s,e,t){let r=s.tsNames.get(e);if((r&2)>0){if(t&256){let n=!!(t&512),a=(r&4)>0;return n!==a}return!0}return t&128&&(r&8)>0?s.names.get(e)&2?!!(t&1):!1:t&2&&(r&1)>0?!0:super.isRedeclaredInScope(s,e,t)}checkLocalExport(s){let{name:e}=s;if(this.hasImport(e))return;let t=this.scopeStack.length;for(let r=t-1;r>=0;r--){let a=this.scopeStack[r].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(s)}},nn=i=>i.type==="ParenthesizedExpression"?nn(i.expression):i,gr=class extends dr{toAssignable(s,e=!1){var t,r;let n;switch((s.type==="ParenthesizedExpression"||(t=s.extra)!=null&&t.parenthesized)&&(n=nn(s),e?n.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(m.InvalidParenthesizedAssignment,s):n.type!=="MemberExpression"&&!this.isOptionalMemberExpression(n)&&this.raise(m.InvalidParenthesizedAssignment,s):this.raise(m.InvalidParenthesizedAssignment,s)),s.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":s.type="ObjectPattern";for(let o=0,l=s.properties.length,c=l-1;o<l;o++){var a;let u=s.properties[o],h=o===c;this.toAssignableObjectExpressionProp(u,h,e),h&&u.type==="RestElement"&&(a=s.extra)!=null&&a.trailingCommaLoc&&this.raise(m.RestTrailingComma,s.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=s;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(l,e);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":s.type="ArrayPattern",this.toAssignableList(s.elements,(r=s.extra)==null?void 0:r.trailingCommaLoc,e);break;case"AssignmentExpression":s.operator!=="="&&this.raise(m.MissingEqInAssignment,s.left.loc.end),s.type="AssignmentPattern",delete s.operator,this.toAssignable(s.left,e);break;case"ParenthesizedExpression":this.toAssignable(n,e);break}}toAssignableObjectExpressionProp(s,e,t){if(s.type==="ObjectMethod")this.raise(s.kind==="get"||s.kind==="set"?m.PatternHasAccessor:m.PatternHasMethod,s.key);else if(s.type==="SpreadElement"){s.type="RestElement";let r=s.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,t),e||this.raise(m.RestTrailingComma,s)}else this.toAssignable(s,t)}toAssignableList(s,e,t){let r=s.length-1;for(let n=0;n<=r;n++){let a=s[n];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let o=a.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,t)}else this.toAssignable(a,t);a.type==="RestElement"&&(n<r?this.raise(m.RestTrailingComma,a):e&&this.raise(m.RestTrailingComma,e))}}}isAssignable(s,e){switch(s.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=s.properties.length-1;return s.properties.every((r,n)=>r.type!=="ObjectMethod"&&(n===t||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(s.value);case"SpreadElement":return this.isAssignable(s.argument);case"ArrayExpression":return s.elements.every(t=>t===null||this.isAssignable(t));case"AssignmentExpression":return s.operator==="=";case"ParenthesizedExpression":return this.isAssignable(s.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(s,e){return s}toReferencedListDeep(s,e){this.toReferencedList(s,e);for(let t of s)t?.type==="ArrayExpression"&&this.toReferencedListDeep(t.elements)}parseSpread(s){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(s,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let s=this.startNode();return this.next(),s.argument=this.parseBindingAtom(),this.finishNode(s,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let s=this.startNode();return this.next(),s.elements=this.parseBindingList(3,93,1),this.finishNode(s,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(s,e,t){let r=t&1,n=[],a=!0;for(;!this.eat(s);)if(a?a=!1:this.expect(12),r&&this.match(12))n.push(null);else{if(this.eat(s))break;if(this.match(21)){if(n.push(this.parseAssignableListItemTypes(this.parseRestBinding(),t)),!this.checkCommaAfterRest(e)){this.expect(s);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(m.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());n.push(this.parseAssignableListItem(t,o))}}return n}parseBindingRestProperty(s){return this.next(),s.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(s,"RestElement")}parseBindingProperty(){let{type:s,startLoc:e}=this.state;if(s===21)return this.parseBindingRestProperty(this.startNode());let t=this.startNode();return s===138?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,e,!1,!1,!0,!1)}parseAssignableListItem(s,e){let t=this.parseMaybeDefault();this.parseAssignableListItemTypes(t,s);let r=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),r}parseAssignableListItemTypes(s,e){return s}parseMaybeDefault(s,e){var t,r;if((t=s)!=null||(s=this.state.startLoc),e=(r=e)!=null?r:this.parseBindingAtom(),!this.eat(29))return e;let n=this.startNodeAt(s);return n.left=e,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(s,e,t){switch(s){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(s){return s.type==="OptionalMemberExpression"}checkLVal(s,e,t=64,r=!1,n=!1,a=!1){var o;let l=s.type;if(this.isObjectMethod(s))return;let c=this.isOptionalMemberExpression(s);if(c||l==="MemberExpression"){c&&(this.expectPlugin("optionalChainingAssign",s.loc.start),e.type!=="AssignmentExpression"&&this.raise(m.InvalidLhsOptionalChaining,s,{ancestor:e})),t!==64&&this.raise(m.InvalidPropertyBindingPattern,s);return}if(l==="Identifier"){this.checkIdentifier(s,t,n);let{name:g}=s;r&&(r.has(g)?this.raise(m.ParamDupe,s):r.add(g));return}let u=this.isValidLVal(l,!(a||(o=s.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",t);if(u===!0)return;if(u===!1){let g=t===64?m.InvalidLhs:m.InvalidLhsBinding;this.raise(g,s,{ancestor:e});return}let h,f;typeof u=="string"?(h=u,f=l==="ParenthesizedExpression"):[h,f]=u;let d=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e,p=s[h];if(Array.isArray(p))for(let g of p)g&&this.checkLVal(g,d,t,r,n,f);else p&&this.checkLVal(p,d,t,r,n,f)}checkIdentifier(s,e,t=!1){this.state.strict&&(t?Zi(s.name,this.inModule):Yi(s.name))&&(e===64?this.raise(m.StrictEvalArguments,s,{referenceName:s.name}):this.raise(m.StrictEvalArgumentsBinding,s,{bindingName:s.name})),e&8192&&s.name==="let"&&this.raise(m.LetInLexicalBinding,s),e&64||this.declareNameFromIdentifier(s,e)}declareNameFromIdentifier(s,e){this.scope.declareName(s.name,e,s.loc.start)}checkToRestConversion(s,e){switch(s.type){case"ParenthesizedExpression":this.checkToRestConversion(s.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(m.InvalidRestAssignmentPattern,s)}}checkCommaAfterRest(s){return this.match(12)?(this.raise(this.lookaheadCharCode()===s?m.RestTrailingComma:m.ElementAfterRest,this.state.startLoc),!0):!1}};function el(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function Vi(i){if(!i)throw new Error("Assert fail")}var I=Be`typescript`({AbstractMethodHasImplementation:({methodName:i})=>`Method '${i}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:i})=>`Property '${i}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:i})=>`'declare' is not allowed in ${i}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:i})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:i})=>`Duplicate modifier: '${i}'.`,EmptyHeritageClauseType:({token:i})=>`'${i}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:i})=>`'${i[0]}' modifier cannot be used with '${i[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:i})=>`Index signatures cannot have an accessibility modifier ('${i}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:i})=>`'${i}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:i})=>`'${i}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:i})=>`'${i}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:i})=>`'${i[0]}' modifier must precede '${i[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:i})=>`Private elements cannot have an accessibility modifier ('${i}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:i})=>`Single type parameter ${i} should have a trailing comma. Example usage: <${i},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:i})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${i}.`});function tl(i){switch(i){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function $i(i){return i==="private"||i==="public"||i==="protected"}function sl(i){return i==="in"||i==="out"}var rl=i=>class extends i{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:I.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:I.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:I.InvalidModifierOnTypeParameter})}getScopeHandler(){return yr}tsIsIdentifier(){return U(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t){if(!U(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let r=this.state.value;if(e.includes(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=I.InvalidModifierOnTypeMember},a){let o=(c,u,h,f)=>{u===h&&a[f]&&this.raise(I.InvalidModifiersOrder,c,{orderedModifiers:[h,f]})},l=(c,u,h,f)=>{(a[h]&&u===f||a[f]&&u===h)&&this.raise(I.IncompatibleModifiers,c,{modifiers:[h,f]})};for(;;){let{startLoc:c}=this.state,u=this.tsParseModifier(e.concat(t??[]),r);if(!u)break;$i(u)?a.accessibility?this.raise(I.DuplicateAccessibilityModifier,c,{modifier:u}):(o(c,u,u,"override"),o(c,u,u,"static"),o(c,u,u,"readonly"),a.accessibility=u):sl(u)?(a[u]&&this.raise(I.DuplicateModifier,c,{modifier:u}),a[u]=!0,o(c,u,"in","out")):(hasOwnProperty.call(a,u)?this.raise(I.DuplicateModifier,c,{modifier:u}):(o(c,u,"static","readonly"),o(c,u,"static","override"),o(c,u,"override","readonly"),o(c,u,"abstract","override"),l(c,u,"declare","override"),l(c,u,"static","abstract")),a[u]=!0),t!=null&&t.includes(u)&&this.raise(n,c,{modifier:u})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return el(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let l=t();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return n&&(n.value=o),a}tsParseBracketedList(e,t,r,n,a){n||(r?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,t,a);return r?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(I.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(e.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),t.params.length===0&&this.raise(I.EmptyTypeParameters,t),r.value!==-1&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=e===19,n="parameters",a="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[n]=this.tsParseBindingListForSignature(),r?t[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:r}=t;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(I.UnsupportedSignatureParameterKind,t,{type:r})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),U(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(I.ReadonlyForMethodSignature,e);let n=r;n.kind&&this.match(47)&&this.raise(I.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let a="parameters",o="typeAnnotation";if(n.kind==="get")n[a].length>0&&(this.raise(m.BadGetterArity,this.state.curPosition()),this.isThisParam(n[a][0])&&this.raise(I.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(n.kind==="set"){if(n[a].length!==1)this.raise(m.BadSetterArity,this.state.curPosition());else{let l=n[a][0];this.isThisParam(l)&&this.raise(I.AccessorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(I.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(I.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[o]&&this.raise(I.SetAccessorCannotHaveReturnType,n[o])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}else{let n=r;t&&(n.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(n.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{let t=this.startNode();t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(r=>{let{type:n}=r;t&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&r.optional)&&this.raise(I.OptionalTypeBeforeRequired,r),t||(t=n==="TSNamedTupleMember"&&r.optional||n==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),r,n,a,o,c=Pe(this.state.type)?this.lookaheadCharCode():null;if(c===58)r=!0,a=!1,n=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(c===63){a=!0;let u=this.state.startLoc,h=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,n=this.createIdentifier(this.startNodeAt(u),h),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=f,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),r=this.eat(14);if(r){let u;n?(u=this.startNodeAtNode(n),u.optional=a,u.label=n,u.elementType=o,this.eat(17)&&(u.optional=!0,this.raise(I.TupleOptionalAfterType,this.state.lastTokStartLoc))):(u=this.startNodeAtNode(o),u.optional=a,this.raise(I.InvalidTupleMemberLabel,o),u.label=o,u.elementType=this.tsParseType()),o=this.finishNode(u,"TSNamedTupleMember")}else if(a){let u=this.startNodeAtNode(o);u.typeAnnotation=o,o=this.finishNode(u,"TSOptionalType")}if(t){let u=this.startNodeAt(e);u.typeAnnotation=o,o=this.finishNode(u,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),t=this.lookahead();return t.type!==134&&t.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(U(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":tl(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(I.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Po(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,r){let n=this.startNode(),a=this.eat(r),o=[];do o.push(t());while(this.eat(r));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(U(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(r.parameterName=l,r.asserts=!0,r.typeAnnotation=null,l=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(l,r),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let o=this.tsParseTypeAnnotation(!1);return r.parameterName=a,r.typeAnnotation=o,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!U(this.state.type)&&!this.match(78)?!1:(e&&this.raise(m.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Vi(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(I.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{let n=this.startNode();return n.expression=this.tsParseEntityName(),this.match(47)&&(n.typeParameters=this.tsParseTypeArguments()),this.finishNode(n,"TSExpressionWithTypeArguments")});return r.length||this.raise(I.EmptyHeritageClauseType,t,{token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),U(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(I.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let n=this.tsParseModuleReference();return e.importKind==="type"&&n.type!=="TSExternalModuleReference"&&this.raise(I.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse(r=>e()||r());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,r;return this.isContextual(100)&&(t=74,r="let"),this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,r||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let n=this.tsParseInterfaceDeclaration(e,{declare:!0});if(n)return n}default:if(U(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){switch(t.name){case"declare":{let n=this.tsTryParseDeclare(e);return n&&(n.declare=!0),n}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let n=e;return n.global=!0,n.id=t,n.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(n,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,r)}}tsParseDeclaration(e,t,r,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||U(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(U(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&U(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&U(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let r=this.tsTryParseAndCatch(()=>{let n=this.startNodeAt(e);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),n});if(this.state.maybeInArrowParameters=t,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(I.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===$.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return So(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);let a=n.accessibility,o=n.override,l=n.readonly;!(e&4)&&(a||l||o)&&this.raise(I.UnexpectedParameterModifier,r);let c=this.parseMaybeDefault();this.parseAssignableListItemTypes(c,e);let u=this.parseMaybeDefault(c.loc.start,c);if(a||l||o){let h=this.startNodeAt(r);return t.length&&(h.decorators=t),a&&(h.accessibility=a),l&&(h.readonly=l),o&&(h.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(I.UnsupportedParameterPropertyKind,h),h.parameter=u,this.finishNode(h,"TSParameterProperty")}return t.length&&(c.decorators=t),u}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!=="Identifier"&&t.optional&&!this.state.isAmbientContext&&this.raise(I.PatternIsOptional,t)}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let n=t==="FunctionDeclaration"?"TSDeclareFunction":t==="ClassMethod"||t==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):n==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(I.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(t=>{t?.type==="TSTypeCastExpression"&&this.raise(I.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,n){let a=super.parseArrayLike(e,t,r,n);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(t);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return n.stop=!0,e;n.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(t);if(f)return f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(os(this.state.type)){let f=super.parseTaggedTemplateExpression(e,t,n);return f.typeParameters=c,f}if(!r&&this.eat(10)){let f=this.startNodeAt(t);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,n.optionalChainMember&&(f.optional=a),this.finishCallExpression(f,n.optionalChainMember)}let u=this.state.type;if(u===48||u===52||u!==10&&er(u)&&!this.hasPrecedingLineBreak())return;let h=this.startNodeAt(t);return h.expression=e,h.typeParameters=c,this.finishNode(h,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(I.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;r.type==="TSInstantiationExpression"&&!((t=r.extra)!=null&&t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(is(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){let a=this.startNodeAt(t);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(n&&this.raise(m.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(I.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let t;if(U(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(I.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let r=e,n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(r,!1):r.importKind="value",this.tsParseImportEqualsDeclaration(r,n,!0)}else if(this.eat(29)){let r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){let r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){let{isAmbientContext:n}=this.state,a=super.parseVarStatement(e,t,r||n);if(!n)return a;for(let{id:o,init:l}of a.declarations)l&&(t!=="const"||o.typeAnnotation?this.raise(I.InitializerNotAllowedInAmbientContext,l):nl(l,this.hasPlugin("estree"))||this.raise(I.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(r=>$i(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,r){let n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:I.InvalidModifierOnTypeParameterPositions},t);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(I.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,t,r,n){let a=this.tsTryParseIndexSignature(t);if(a){e.body.push(a),t.abstract&&this.raise(I.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(I.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(I.IndexSignatureHasDeclare,t),t.override&&this.raise(I.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(I.NonAbstractClassHasAbstractMethod,t),t.override&&(r.hadSuperClass||this.raise(I.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(I.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(I.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,r){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let n=this.tryParse(()=>super.parseConditional(e,t));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,t){let r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){let n=this.startNodeAt(t);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(I.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=U(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(a,t),a.declare=!0),a):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(113))return;super.parseClassId(e,t,r,e.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(I.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(I.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type==="Identifier"&&!e.computed?t.name:`[${this.input.slice(t.start,t.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(I.PrivateElementHasAbstract,e),e.accessibility&&this.raise(I.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(I.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,a,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(I.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:u}=t;c&&(u==="get"||u==="set")&&this.raise(I.DeclareAccessor,t,{kind:u}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,r,n,a,o)}pushClassPrivateMethod(e,t,r,n){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(t.typeParameters=a),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,a,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,r,n,a,o,l)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,a,o,l;let c,u,h;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(c=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!u.error)return u.node;let{context:p}=this.state,g=p[p.length-1];(g===$.j_oTag||g===$.j_expr)&&p.pop()}if(!((r=u)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let f,d=this.tryParse(p=>{var g,y;f=this.tsParseTypeParameters(this.tsParseConstModifier);let b=super.parseMaybeAssign(e,t);return(b.type!=="ArrowFunctionExpression"||(g=b.extra)!=null&&g.parenthesized)&&p(),((y=f)==null?void 0:y.params.length)!==0&&this.resetStartLocationFromNode(b,f),b.typeParameters=f,b},c);if(!d.error&&!d.aborted)return f&&this.reportReservedArrowTypeParam(f),d.node;if(!u&&(Vi(!this.hasPlugin("jsx")),h=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!h.error))return h.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;if(d.node)return this.state=d.failState,f&&this.reportReservedArrowTypeParam(f),d.node;if((a=h)!=null&&a.node)return this.state=h.failState,h.node;throw((o=u)==null?void 0:o.error)||d.error||((l=h)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(I.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(r=>{let n=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),n});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(t&2))return e;this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(I.UnexpectedTypeCastInParameter,e):this.raise(I.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(r!==64||!t)&&["expression",!0];default:return super.isValidLVal(e,t,r)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=t,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(I.TypeAnnotationAfterAssign,r.typeAnnotation),r}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,r){for(let n=0;n<e.length;n++){let a=e[n];a?.type==="TSTypeCastExpression"&&(e[n]=this.typeCastToParameter(a))}super.toAssignableList(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(t=>this.isAssignable(t,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:t,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=r}}parseClass(e,t,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(I.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,n,a,o,l){let c=super.parseMethod(e,t,r,n,a,o,l);if(c.abstract&&(this.hasPlugin("estree")?!!c.value.body:!!c.body)){let{key:h}=c;this.raise(I.AbstractMethodHasImplementation,c,{methodName:h.type==="Identifier"&&!c.computed?h.name:`[${this.input.slice(h.start,h.end)}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,a){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,r){let n=t?"imported":"local",a=t?"local":"exported",o=e[n],l,c=!1,u=!0,h=o.loc.start;if(this.isContextual(93)){let d=this.parseIdentifier();if(this.isContextual(93)){let p=this.parseIdentifier();Pe(this.state.type)?(c=!0,o=d,l=t?this.parseIdentifier():this.parseModuleExportName(),u=!1):(l=p,u=!1)}else Pe(this.state.type)?(u=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=d)}else Pe(this.state.type)&&(c=!0,t?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&r&&this.raise(t?I.TypeModifierIsUsedInTypeImports:I.TypeModifierIsUsedInTypeExports,h),e[n]=o,e[a]=l;let f=t?"importKind":"exportKind";e[f]=c?"type":"value",u&&this.eatContextual(93)&&(e[a]=t?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=_e(e[n])),t&&this.checkIdentifier(e[a],c?4098:4096)}};function il(i){if(i.type!=="MemberExpression")return!1;let{computed:s,property:e}=i;return s&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:on(i.object)}function nl(i,s){var e;let{type:t}=i;if((e=i.extra)!=null&&e.parenthesized)return!1;if(s){if(t==="Literal"){let{value:r}=i;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(an(i,s)||al(i,s)||t==="TemplateLiteral"&&i.expressions.length===0||il(i))}function an(i,s){return s?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function al(i,s){if(i.type==="UnaryExpression"){let{operator:e,argument:t}=i;if(e==="-"&&an(t,s))return!0}return!1}function on(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:on(i.object)}var qi=Be`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),ol=i=>class extends i{parsePlaceholder(e){if(this.match(144)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=e;return(!r.expectedNode||!r.type)&&(r=this.finishNode(r,"Placeholder")),r.expectedNode=t,r}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){e!==void 0&&super.checkReservedWord(e,t,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return e==="Placeholder"||super.isValidLVal(e,t,r)}toAssignable(e,t){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!(super.chStartsBindingIdentifier(e,t)||this.lookahead().type===144)}verifyBreakContinue(e,t){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var r;if(t.type!=="Placeholder"||(r=t.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let a=e;return a.label=this.finishPlaceholder(t,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();let n=e;return n.name=t.name,this.finishPlaceholder(n,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let n=t?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(r||!t)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,n);throw this.raise(qi.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,n)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);let n=e;if(!this.isContextual(98)&&!this.match(12))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=r,n.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(n,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith($e(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(r=>r.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(qi.UnexpectedSpace,this.state.lastTokEndLoc)}},ll=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),U(this.state.type)){let r=this.parseIdentifierName(),n=this.createIdentifier(t,r);if(n.type="V8IntrinsicIdentifier",this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},zi=["minimal","fsharp","hack","smart"],Wi=["^^","@@","^","%","#"];function cl(i){if(i.has("decorators")){if(i.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=i.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let t=i.get("decorators").allowCallParenthesized;if(t!=null&&typeof t!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(i.has("flow")&&i.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(i.has("placeholders")&&i.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(i.has("pipelineOperator")){var s;let e=i.get("pipelineOperator").proposal;if(!zi.includes(e)){let r=zi.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}let t=((s=i.get("recordAndTuple"))==null?void 0:s.syntaxType)==="hash";if(e==="hack"){if(i.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(i.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let r=i.get("pipelineOperator").topicToken;if(!Wi.includes(r)){let n=Wi.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${n}.`)}if(r==="#"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",i.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&t)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",i.get("recordAndTuple")])}\`.`)}if(i.has("moduleAttributes")){if(i.has("importAttributes")||i.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(i.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(i.has("importAttributes")&&i.has("importAssertions"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(i.has("recordAndTuple")){let e=i.get("recordAndTuple").syntaxType;if(e!=null){let t=["hash","bar"];if(!t.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+t.map(r=>`'${r}'`).join(", "))}}if(i.has("asyncDoExpressions")&&!i.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(i.has("optionalChainingAssign")&&i.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var ln={estree:uo,jsx:Zo,flow:Qo,typescript:rl,v8intrinsic:ll,placeholders:ol},ul=Object.keys(ln),Qs={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function hl(i){if(i==null)return Object.assign({},Qs);if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let s={};for(let t of Object.keys(Qs)){var e;s[t]=(e=i[t])!=null?e:Qs[t]}return s}var xr=class extends gr{checkProto(s,e,t,r){if(s.type==="SpreadElement"||this.isObjectMethod(s)||s.computed||s.shorthand)return;let n=s.key;if((n.type==="Identifier"?n.name:n.value)==="__proto__"){if(e){this.raise(m.RecordNoProto,n);return}t.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=n.loc.start):this.raise(m.DuplicateProto,n)),t.used=!0}}shouldExitDescending(s,e){return s.type==="ArrowFunctionExpression"&&s.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let s=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),s.comments=this.comments,s.errors=this.state.errors,this.options.tokens&&(s.tokens=this.tokens),s}parseExpression(s,e){return s?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(s){let e=this.state.startLoc,t=this.parseMaybeAssign(s);if(this.match(12)){let r=this.startNodeAt(e);for(r.expressions=[t];this.eat(12);)r.expressions.push(this.parseMaybeAssign(s));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return t}parseMaybeAssignDisallowIn(s,e){return this.disallowInAnd(()=>this.parseMaybeAssign(s,e))}parseMaybeAssignAllowIn(s,e){return this.allowInAnd(()=>this.parseMaybeAssign(s,e))}setOptionalParametersError(s,e){var t;s.optionalParametersLoc=(t=e?.loc)!=null?t:this.state.startLoc}parseMaybeAssign(s,e){let t=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,t)),o}let r;s?r=!1:(s=new lt,r=!0);let{type:n}=this.state;(n===10||U(n))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(s);if(e&&(a=e.call(this,a,t)),yo(this.state.type)){let o=this.startNodeAt(t),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;let c=t.index;s.doubleProtoLoc!=null&&s.doubleProtoLoc.index>=c&&(s.doubleProtoLoc=null),s.shorthandAssignLoc!=null&&s.shorthandAssignLoc.index>=c&&(s.shorthandAssignLoc=null),s.privateKeyLoc!=null&&s.privateKeyLoc.index>=c&&(this.checkDestructuringPrivate(s),s.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression")),o}else r&&this.checkExpressionErrors(s,!0);return a}parseMaybeConditional(s){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseExprOps(s);return this.shouldExitDescending(r,t)?r:this.parseConditional(r,e,s)}parseConditional(s,e,t){if(this.eat(17)){let r=this.startNodeAt(e);return r.test=s,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return s}parseMaybeUnaryOrPrivate(s){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(s)}parseExprOps(s){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(s);return this.shouldExitDescending(r,t)?r:this.parseExprOp(r,e,-1)}parseExprOp(s,e,t){if(this.isPrivateName(s)){let n=this.getPrivateNameSV(s);(t>=is(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(m.PrivateInExpectedIn,s,{identifierName:n}),this.classScope.usePrivateName(n,s.loc.start)}let r=this.state.type;if(xo(r)&&(this.prodParam.hasIn||!this.match(58))){let n=is(r);if(n>t){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return s;this.checkPipelineAtInfixOperator(s,e)}let a=this.startNodeAt(e);a.left=s,a.operator=this.state.value;let o=r===41||r===42,l=r===40;if(l&&(n=is(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(m.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(r,n);let c=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(l&&(u===41||u===42)||o&&u===40)throw this.raise(m.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,e,t)}}return s}parseExprOpRightExpr(s,e){let t=this.state.startLoc;switch(s){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(m.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(s,e),t)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(s,e)}}parseExprOpBaseRightExpr(s,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,Eo(s)?e-1:e)}parseHackPipeBody(){var s;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return no.has(t.type)&&!((s=t.extra)!=null&&s.parenthesized)&&this.raise(m.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(m.PipeTopicUnused,e),t}checkExponentialAfterUnary(s){this.match(57)&&this.raise(m.UnexpectedTokenUnaryExponentiation,s.argument)}parseMaybeUnary(s,e){let t=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let n=this.match(34),a=this.startNode();if(To(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(s,!0),this.state.strict&&l){let c=a.argument;c.type==="Identifier"?this.raise(m.StrictDelete,a):this.hasPropertyAsPrivateName(c)&&this.raise(m.DeletePrivateField,a)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,n,s);if(r){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?er(l):er(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(m.AwaitNotInAsyncContext,t),this.parseAwait(t)}return o}parseUpdate(s,e,t){if(e){let a=s;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),s}let r=this.state.startLoc,n=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return n;for(;bo(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(r);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(a,"UpdateExpression"))}return n}parseExprSubscripts(s){let e=this.state.startLoc,t=this.state.potentialArrowAt,r=this.parseExprAtom(s);return this.shouldExitDescending(r,t)?r:this.parseSubscripts(r,e)}parseSubscripts(s,e,t){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(s),stop:!1};do s=this.parseSubscript(s,e,t,r),r.maybeAsyncArrow=!1;while(!r.stop);return s}parseSubscript(s,e,t,r){let{type:n}=this.state;if(!t&&n===15)return this.parseBind(s,e,t,r);if(os(n))return this.parseTaggedTemplateExpression(s,e,r);let a=!1;if(n===18){if(t&&(this.raise(m.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return r.stop=!0,s;r.optionalChainMember=a=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(s,e,r,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(s,e,r,o,a):(r.stop=!0,s)}}parseMember(s,e,t,r,n){let a=this.startNodeAt(e);return a.object=s,a.computed=r,r?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(s.type==="Super"&&this.raise(m.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),t.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(s,e,t,r){let n=this.startNodeAt(e);return n.object=s,this.next(),n.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(s,e,t,r){let n=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=s;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(qo()),a=new lt),c&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,s.type==="Import",s.type!=="Super",o,a);let u=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!r?(t.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),u)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=n,u}toReferencedArguments(s,e){this.toReferencedListDeep(s.arguments,e)}parseTaggedTemplateExpression(s,e,t){let r=this.startNodeAt(e);return r.tag=s,r.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(m.OptionalChainingNoTemplate,e),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(s){return s.type==="Identifier"&&s.name==="async"&&this.state.lastTokEndLoc.index===s.end&&!this.canInsertSemicolon()&&s.end-s.start===5&&s.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(s,e){if(s.callee.type==="Import")if(s.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),s.arguments.length===0||s.arguments.length>2)this.raise(m.ImportCallArity,s,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of s.arguments)t.type==="SpreadElement"&&this.raise(m.ImportCallSpreadArgument,t);return this.finishNode(s,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(s,e,t,r,n){let a=[],o=!0,l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(s);){if(o)o=!1;else if(this.expect(12),this.match(s)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(m.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(!1,n,t))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(s,e){var t;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(s,e.arguments,!0,(t=e.extra)==null?void 0:t.trailingCommaLoc),e.innerComments&&Ot(s,e.innerComments),e.callee.trailingComments&&Ot(s,e.callee.trailingComments),s}parseNoCallExpr(){let s=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),s,!0)}parseExprAtom(s){let e,t=null,{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(m.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let n=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(n)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,s);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,s);case 68:return this.parseFunctionOrFunctionSent();case 26:t=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(t,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let n=e.callee=this.parseNoCallExpr();if(n.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(m.UnsupportedBind,n)}case 138:return this.raise(m.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);this.unexpected();break}case 47:{let n=this.input.codePointAt(this.nextTokenStart());Fe(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(U(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let n=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(U(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(s,e){let t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.state.type=s,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=ae(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(s){let e=this.startNode(),t=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,t,s,r)}finishTopicReference(s,e,t,r){if(this.testTopicReferenceConfiguration(t,e,r)){let n=t==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(t==="smart"?m.PrimaryTopicNotAllowed:m.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(s,n)}else throw this.raise(m.PipeTopicUnconfiguredToken,e,{token:$e(r)})}testTopicReferenceConfiguration(s,e,t){switch(s){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:$e(t)}]);case"smart":return t===27;default:throw this.raise(m.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(s){this.prodParam.enter(ns(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(m.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(s,e,!0)}parseDo(s,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),s.async=e,this.next();let t=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),s.body=this.parseBlock(),this.prodParam.exit()):s.body=this.parseBlock(),this.state.labels=t,this.finishNode(s,"DoExpression")}parseSuper(){let s=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(m.SuperNotAllowed,s):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(m.UnexpectedSuper,s),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(m.UnsupportedSuper,s),this.finishNode(s,"Super")}parsePrivateName(){let s=this.startNode(),e=this.startNodeAt(ae(this.state.startLoc,1)),t=this.state.value;return this.next(),s.id=this.createIdentifier(e,t),this.finishNode(s,"PrivateName")}parseFunctionOrFunctionSent(){let s=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(s),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(s,e,"sent")}return this.parseFunction(s)}parseMetaProperty(s,e,t){s.meta=e;let r=this.state.containsEsc;return s.property=this.parseIdentifier(!0),(s.property.name!==t||r)&&this.raise(m.UnsupportedMetaProperty,s.property,{target:e.name,onlyValidPropertyName:t}),this.finishNode(s,"MetaProperty")}parseImportMetaProperty(s){let e=this.createIdentifier(this.startNodeAtNode(s),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(m.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(t||this.unexpected(),this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(m.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),s.phase=t?"source":"defer",this.parseImportCall(s)}return this.parseMetaProperty(s,e,"meta")}parseLiteralAtNode(s,e,t){return this.addExtra(t,"rawValue",s),this.addExtra(t,"raw",this.input.slice(t.start,this.state.end)),t.value=s,this.next(),this.finishNode(t,e)}parseLiteral(s,e){let t=this.startNode();return this.parseLiteralAtNode(s,e,t)}parseStringLiteral(s){return this.parseLiteral(s,"StringLiteral")}parseNumericLiteral(s){return this.parseLiteral(s,"NumericLiteral")}parseBigIntLiteral(s){return this.parseLiteral(s,"BigIntLiteral")}parseDecimalLiteral(s){return this.parseLiteral(s,"DecimalLiteral")}parseRegExpLiteral(s){let e=this.startNode();return this.addExtra(e,"raw",this.input.slice(e.start,this.state.end)),e.pattern=s.pattern,e.flags=s.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(s){let e=this.startNode();return e.value=s,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let s=this.startNode();return this.next(),this.finishNode(s,"NullLiteral")}parseParenAndDistinguishExpression(s){let e=this.state.startLoc,t;this.next(),this.expressionScope.enter($o());let r=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],l=new lt,c=!0,u,h;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){h=this.state.startLoc;break}if(this.match(21)){let p=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),p)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=n;let d=this.startNodeAt(e);return s&&this.shouldParseArrow(o)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,o,!1),d):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),h&&this.unexpected(h),u&&this.unexpected(u),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(t=this.startNodeAt(a),t.expressions=o,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,f)):t=o[0],this.wrapParenthesis(e,t))}wrapParenthesis(s,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",s.index),this.takeSurroundingComments(e,s.index,this.state.lastTokEndLoc.index),e;let t=this.startNodeAt(s);return t.expression=e,this.finishNode(t,"ParenthesizedExpression")}shouldParseArrow(s){return!this.canInsertSemicolon()}parseArrow(s){if(this.eat(19))return s}parseParenItem(s,e){return s}parseNewOrNewTarget(){let s=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(s),"new");this.next();let t=this.parseMetaProperty(s,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(m.UnexpectedNewTarget,t),t}return this.parseNew(s)}parseNew(s){if(this.parseNewCallee(s),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),s.arguments=e}else s.arguments=[];return this.finishNode(s,"NewExpression")}parseNewCallee(s){let e=this.match(83),t=this.parseNoCallExpr();s.callee=t,e&&(t.type==="Import"||t.type==="ImportExpression")&&this.raise(m.ImportCallNotNewExpression,t)}parseTemplateElement(s){let{start:e,startLoc:t,end:r,value:n}=this.state,a=e+1,o=this.startNodeAt(ae(t,1));n===null&&(s||this.raise(m.InvalidEscapeSequenceTemplate,ae(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,u=r+c;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,`
8
8
  `),cooked:n===null?null:n.slice(1,c)},o.tail=l,this.next();let h=this.finishNode(o,"TemplateElement");return this.resetEndLocation(h,ae(this.state.lastTokEndLoc,c)),h}parseTemplate(s){let e=this.startNode(),t=this.parseTemplateElement(s),r=[t],n=[];for(;!t.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(t=this.parseTemplateElement(s));return e.expressions=n,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(s,e,t,r){t&&this.expectPlugin("recordAndTuple");let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(s);){if(o)o=!1;else if(this.expect(12),this.match(s)){this.addTrailingCommaExtraToNode(l);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(r),this.checkProto(u,t,a,r)),t&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(m.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=n;let c="ObjectExpression";return e?c="ObjectPattern":t&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(s){this.addExtra(s,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(s,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(s){return!s.computed&&s.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(s){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(m.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let t=this.startNode(),r=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(t.decorators=e,e=[]),t.method=!1,s&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(t);let l=this.state.containsEsc;if(this.parsePropertyName(t,s),!o&&!l&&this.maybeAsyncOrAccessorProp(t)){let{key:c}=t,u=c.name;u==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(t)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(c),t.kind=u,this.match(55)&&(o=!0,this.raise(m.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(t))}return this.parseObjPropValue(t,a,o,r,!1,n,s)}getGetterSetterExpectedParamCount(s){return s.kind==="get"?0:1}getObjectOrClassMethodParams(s){return s.params}checkGetterSetterParams(s){var e;let t=this.getGetterSetterExpectedParamCount(s),r=this.getObjectOrClassMethodParams(s);r.length!==t&&this.raise(s.kind==="get"?m.BadGetterArity:m.BadSetterArity,s),s.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(m.BadSetterRestParameter,s)}parseObjectMethod(s,e,t,r,n){if(n){let a=this.parseMethod(s,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(t||e||this.match(10))return r&&this.unexpected(),s.kind="method",s.method=!0,this.parseMethod(s,e,t,!1,!1,"ObjectMethod")}parseObjectProperty(s,e,t,r){if(s.shorthand=!1,this.eat(14))return s.value=t?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(s,"ObjectProperty");if(!s.computed&&s.key.type==="Identifier"){if(this.checkReservedWord(s.key.name,s.key.loc.start,!0,!1),t)s.value=this.parseMaybeDefault(e,_e(s.key));else if(this.match(29)){let n=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=n):this.raise(m.InvalidCoverInitializedName,n),s.value=this.parseMaybeDefault(e,_e(s.key))}else s.value=_e(s.key);return s.shorthand=!0,this.finishNode(s,"ObjectProperty")}}parseObjPropValue(s,e,t,r,n,a,o){let l=this.parseObjectMethod(s,t,r,n,a)||this.parseObjectProperty(s,e,n,o);return l||this.unexpected(),l}parsePropertyName(s,e){if(this.eat(0))s.computed=!0,s.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:t,value:r}=this.state,n;if(Pe(t))n=this.parseIdentifier(!0);else switch(t){case 134:n=this.parseNumericLiteral(r);break;case 133:n=this.parseStringLiteral(r);break;case 135:n=this.parseBigIntLiteral(r);break;case 136:n=this.parseDecimalLiteral(r);break;case 138:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(m.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:this.unexpected()}s.key=n,t!==138&&(s.computed=!1)}}initFunction(s,e){s.id=null,s.generator=!1,s.async=e}parseMethod(s,e,t,r,n,a,o=!1){this.initFunction(s,t),s.generator=e,this.scope.enter(18|(o?64:0)|(n?32:0)),this.prodParam.enter(ns(t,s.generator)),this.parseFunctionParams(s,r);let l=this.parseFunctionBodyAndFinish(s,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(s,e,t,r){t&&this.expectPlugin("recordAndTuple");let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(s,!t,r,a),this.state.inFSharpPipelineDirectBody=n,this.finishNode(a,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(s,e,t,r){this.scope.enter(6);let n=ns(t,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(s,t);let a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(s,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(s,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(s,"ArrowFunctionExpression")}setArrowFunctionParameters(s,e,t){this.toAssignableList(e,t,!1),s.params=e}parseFunctionBodyAndFinish(s,e,t=!1){return this.parseFunctionBody(s,!1,t),this.finishNode(s,e)}parseFunctionBody(s,e,t=!1){let r=e&&!this.match(5);if(this.expressionScope.enter(rn()),r)s.body=this.parseMaybeAssign(),this.checkParams(s,!1,e,!1);else{let n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),s.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(s.params);o&&l&&this.raise(m.IllegalLanguageModeDirective,(s.kind==="method"||s.kind==="constructor")&&s.key?s.key.loc.end:s);let c=!n&&this.state.strict;this.checkParams(s,!this.state.strict&&!e&&!t&&!l,e,c),this.state.strict&&s.id&&this.checkIdentifier(s.id,65,c)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(s){return s.type==="Identifier"}isSimpleParamList(s){for(let e=0,t=s.length;e<t;e++)if(!this.isSimpleParameter(s[e]))return!1;return!0}checkParams(s,e,t,r=!0){let n=!e&&new Set,a={type:"FormalParameters"};for(let o of s.params)this.checkLVal(o,a,5,n,r)}parseExprList(s,e,t,r){let n=[],a=!0;for(;!this.eat(s);){if(a)a=!1;else if(this.expect(12),this.match(s)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(e,t))}return n}parseExprListItem(s,e,t){let r;if(this.match(12))s||this.raise(m.UnexpectedToken,this.state.curPosition(),{unexpected:","}),r=null;else if(this.match(21)){let n=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e),n)}else if(this.match(17)){this.expectPlugin("partialApplication"),t||this.raise(m.UnexpectedArgumentPlaceholder,this.state.startLoc);let n=this.startNode();this.next(),r=this.finishNode(n,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return r}parseIdentifier(s){let e=this.startNode(),t=this.parseIdentifierName(s);return this.createIdentifier(e,t)}createIdentifier(s,e){return s.name=e,s.loc.identifierName=e,this.finishNode(s,"Identifier")}parseIdentifierName(s){let e,{startLoc:t,type:r}=this.state;Pe(r)?e=this.state.value:this.unexpected();let n=fo(r);return s?n&&this.replaceToken(132):this.checkReservedWord(e,t,n,!1),this.next(),e}checkReservedWord(s,e,t,r){if(s.length>10||!Oo(s))return;if(t&&ko(s)){this.raise(m.UnexpectedKeyword,e,{keyword:s});return}if((this.state.strict?r?Zi:Qi:Gi)(s,this.inModule)){this.raise(m.UnexpectedReservedWord,e,{reservedWord:s});return}else if(s==="yield"){if(this.prodParam.hasYield){this.raise(m.YieldBindingIdentifier,e);return}}else if(s==="await"){if(this.prodParam.hasAwait){this.raise(m.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(m.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(s==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(m.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let s=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return s&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),s}parseAwait(s){let e=this.startNodeAt(s);return this.expressionScope.recordParameterInitializerError(m.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(m.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:s}=this.state;return s===53||s===10||s===0||os(s)||s===102&&!this.state.containsEsc||s===137||s===56||this.hasPlugin("v8intrinsic")&&s===54}parseYield(){let s=this.startNode();this.expressionScope.recordParameterInitializerError(m.YieldInParameter,s),this.next();let e=!1,t=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:t=this.parseMaybeAssign()}return s.delegate=e,s.argument=t,this.finishNode(s,"YieldExpression")}parseImportCall(s){return this.next(),s.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(s.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(s.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(s,"ImportExpression")}checkPipelineAtInfixOperator(s,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&s.type==="SequenceExpression"&&this.raise(m.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(s,e){if(this.isSimpleReference(s)){let t=this.startNodeAt(e);return t.callee=s,this.finishNode(t,"PipelineBareFunction")}else{let t=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),t.expression=s,this.finishNode(t,"PipelineTopicExpression")}}isSimpleReference(s){switch(s.type){case"MemberExpression":return!s.computed&&this.isSimpleReference(s.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(s){if(this.match(19))throw this.raise(m.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(m.PipelineTopicUnused,s)}withTopicBindingContext(s){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return s()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(s){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return s()}finally{this.state.topicContext=e}}else return s()}withSoloAwaitPermittingContext(s){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return s()}finally{this.state.soloAwait=e}}allowInAnd(s){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return s()}finally{this.prodParam.exit()}}return s()}disallowInAnd(s){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return s()}finally{this.prodParam.exit()}}return s()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(s){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let t=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,s);return this.state.inFSharpPipelineDirectBody=t,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");let s=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let t=this.initializeScopes(!0);this.enterInitialScopes();try{s.body=this.parseProgram(e,8,"module")}finally{t()}return this.finishNode(s,"ModuleExpression")}parsePropertyNamePrefixOperator(s){}},Ys={kind:1},pl={kind:2},fl=/[\uD800-\uDFFF]/u,Zs=/in(?:stanceof)?/y;function dl(i,s){for(let e=0;e<i.length;e++){let t=i[e],{type:r}=t;if(typeof r=="number"){{if(r===138){let{loc:n,start:a,value:o,end:l}=t,c=a+1,u=ae(n.start,1);i.splice(e,1,new ve({type:Oe(27),value:"#",start:a,end:c,startLoc:n.start,endLoc:u}),new ve({type:Oe(132),value:o,start:c,end:l,startLoc:u,endLoc:n.end})),e++;continue}if(os(r)){let{loc:n,start:a,value:o,end:l}=t,c=a+1,u=ae(n.start,1),h;s.charCodeAt(a)===96?h=new ve({type:Oe(22),value:"`",start:a,end:c,startLoc:n.start,endLoc:u}):h=new ve({type:Oe(8),value:"}",start:a,end:c,startLoc:n.start,endLoc:u});let f,d,p,g;r===24?(d=l-1,p=ae(n.end,-1),f=o===null?null:o.slice(1,-1),g=new ve({type:Oe(22),value:"`",start:d,end:l,startLoc:p,endLoc:n.end})):(d=l-2,p=ae(n.end,-2),f=o===null?null:o.slice(1,-2),g=new ve({type:Oe(23),value:"${",start:d,end:l,startLoc:p,endLoc:n.end})),i.splice(e,1,h,new ve({type:Oe(20),value:f,start:c,end:d,startLoc:u,endLoc:p}),g),e+=2;continue}}t.type=Oe(r)}}return i}var br=class extends xr{parseTopLevel(s,e){return s.program=this.parseProgram(e),s.comments=this.comments,this.options.tokens&&(s.tokens=dl(this.tokens,this.input)),this.finishNode(s,"File")}parseProgram(s,e=139,t=this.options.sourceType){if(s.sourceType=t,s.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(s,!0,!0,e),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[n,a]of Array.from(this.scope.undefinedExports))this.raise(m.ModuleExportUndefined,a,{localName:n});this.addExtra(s,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return e===139?r=this.finishNode(s,"Program"):r=this.finishNodeAt(s,"Program",ae(this.state.startLoc,-1)),r}stmtToDirective(s){let e=s;e.type="Directive",e.value=e.expression,delete e.expression;let t=e.value,r=t.value,n=this.input.slice(t.start,t.end),a=t.value=n.slice(1,-1);return this.addExtra(t,"raw",n),this.addExtra(t,"rawValue",a),this.addExtra(t,"expressionValue",r),t.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let s=this.startNode();return s.value=this.state.value,this.next(),this.finishNode(s,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(s,e){if(Fe(s)){if(Zs.lastIndex=e,Zs.test(this.input)){let t=this.codePointAtPos(Zs.lastIndex);if(!at(t)&&t!==92)return!1}return!0}else return s===92}chStartsBindingPattern(s){return s===91||s===123}hasFollowingBindingAtom(){let s=this.nextTokenStart(),e=this.codePointAtPos(s);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,s)}hasInLineFollowingBindingIdentifierOrBrace(){let s=this.nextTokenInLineStart(),e=this.codePointAtPos(s);return e===123||this.chStartsBindingIdentifier(e,s)}startsUsingForOf(){let{type:s,containsEsc:e}=this.lookahead();if(s===102&&!e)return!1;if(U(s)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let s=this.nextTokenInLineStart();if(this.isUnparsedContextual(s,"using")){s=this.nextTokenInLineStartSince(s+5);let e=this.codePointAtPos(s);if(this.chStartsBindingIdentifier(e,s))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(s=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,s&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(s){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(s,e)}parseStatementContent(s,e){let t=this.state.type,r=this.startNode(),n=!!(s&2),a=!!(s&4),o=s&1;switch(t){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?m.StrictFunction:this.options.annexB?m.SloppyFunctionAnnexB:m.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?n||this.raise(m.UnexpectedLexicalDeclaration,r):this.raise(m.AwaitUsingNotInAsyncContext,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(m.UnexpectedUsingDeclaration,this.state.startLoc):n||this.raise(m.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),h=this.codePointAtPos(u);if(h!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(h,u)&&h!==123))break}case 75:n||this.raise(m.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let u=this.state.value;return this.parseVarStatement(r,u)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(m.UnexpectedImportExport,this.state.startLoc),this.next();let u;return t===83?(u=this.parseImport(r),u.type==="ImportDeclaration"&&(!u.importKind||u.importKind==="value")&&(this.sawUnambiguousESM=!0)):(u=this.parseExport(r,e),(u.type==="ExportNamedDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportAllDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(m.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!n&&a)}let l=this.state.value,c=this.parseExpression();return U(t)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,l,c,s):this.parseExpressionStatement(r,c,e)}assertModuleNodeAllowed(s){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(m.ImportOutsideModule,s)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(s,e,t){return s&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(m.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...s)):e.decorators=s,this.resetStartLocationFromNode(e,s[0]),t&&this.resetStartLocationFromNode(t,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(s){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))s||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(m.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(m.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let s=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,t;if(this.match(10)){let r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let n=this.state.startLoc;s.expression=this.parseMaybeDecoratorArguments(t),this.getPluginOption("decorators","allowCallParenthesized")===!1&&s.expression!==t&&this.raise(m.DecoratorArgumentsOutsideParentheses,n)}else{for(t=this.parseIdentifier(!1);this.eat(16);){let r=this.startNodeAt(e);r.object=t,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,t=this.finishNode(r,"MemberExpression")}s.expression=this.parseMaybeDecoratorArguments(t)}}else s.expression=this.parseExprSubscripts();return this.finishNode(s,"Decorator")}parseMaybeDecoratorArguments(s){if(this.eat(10)){let e=this.startNodeAtNode(s);return e.callee=s,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return s}parseBreakContinueStatement(s,e){return this.next(),this.isLineTerminator()?s.label=null:(s.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(s,e),this.finishNode(s,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(s,e){let t;for(t=0;t<this.state.labels.length;++t){let r=this.state.labels[t];if((s.label==null||r.name===s.label.name)&&(r.kind!=null&&(e||r.kind===1)||s.label&&e))break}if(t===this.state.labels.length){let r=e?"BreakStatement":"ContinueStatement";this.raise(m.IllegalBreakContinue,s,{type:r})}}parseDebuggerStatement(s){return this.next(),this.semicolon(),this.finishNode(s,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let s=this.parseExpression();return this.expect(11),s}parseDoWhileStatement(s){return this.next(),this.state.labels.push(Ys),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),s.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(s,"DoWhileStatement")}parseForStatement(s){this.next(),this.state.labels.push(Ys);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(s,null);let t=this.isContextual(100);{let l=this.isContextual(96)&&this.startsAwaitUsing(),c=l||this.isContextual(107)&&this.startsUsingForOf(),u=t&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||u){let h=this.startNode(),f;l?(f="await using",this.recordAwaitIfAllowed()||this.raise(m.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(h,!0,f);let d=this.finishNode(h,"VariableDeclaration"),p=this.match(58);return p&&c&&this.raise(m.ForInUsing,d),(p||this.isContextual(102))&&d.declarations.length===1?this.parseForIn(s,d,e):(e!==null&&this.unexpected(e),this.parseFor(s,d))}}let r=this.isContextual(95),n=new lt,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(t&&this.raise(m.ForOfLet,a),e===null&&r&&a.type==="Identifier"&&this.raise(m.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(s,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(s,a)}parseFunctionStatement(s,e,t){return this.next(),this.parseFunction(s,1|(t?2:0)|(e?8:0))}parseIfStatement(s){return this.next(),s.test=this.parseHeaderExpression(),s.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),s.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(s,"IfStatement")}parseReturnStatement(s){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(m.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?s.argument=null:(s.argument=this.parseExpression(),this.semicolon()),this.finishNode(s,"ReturnStatement")}parseSwitchStatement(s){this.next(),s.discriminant=this.parseHeaderExpression();let e=s.cases=[];this.expect(5),this.state.labels.push(pl),this.scope.enter(0);let t;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){let n=this.match(61);t&&this.finishNode(t,"SwitchCase"),e.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raise(m.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),r=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(s,"SwitchStatement")}parseThrowStatement(s){return this.next(),this.hasPrecedingLineBreak()&&this.raise(m.NewlineAfterThrow,this.state.lastTokEndLoc),s.argument=this.parseExpression(),this.semicolon(),this.finishNode(s,"ThrowStatement")}parseCatchClauseParam(){let s=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&s.type==="Identifier"?8:0),this.checkLVal(s,{type:"CatchClause"},9),s}parseTryStatement(s){if(this.next(),s.block=this.parseBlock(),s.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),s.handler=this.finishNode(e,"CatchClause")}return s.finalizer=this.eat(67)?this.parseBlock():null,!s.handler&&!s.finalizer&&this.raise(m.NoCatchOrFinally,s),this.finishNode(s,"TryStatement")}parseVarStatement(s,e,t=!1){return this.next(),this.parseVar(s,!1,e,t),this.semicolon(),this.finishNode(s,"VariableDeclaration")}parseWhileStatement(s){return this.next(),s.test=this.parseHeaderExpression(),this.state.labels.push(Ys),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(s,"WhileStatement")}parseWithStatement(s){return this.state.strict&&this.raise(m.StrictWith,this.state.startLoc),this.next(),s.object=this.parseHeaderExpression(),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(s,"WithStatement")}parseEmptyStatement(s){return this.next(),this.finishNode(s,"EmptyStatement")}parseLabeledStatement(s,e,t,r){for(let a of this.state.labels)a.name===e&&this.raise(m.LabelRedeclaration,t,{labelName:e});let n=go(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===s.start)o.statementStart=this.state.start,o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),s.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),s.label=t,this.finishNode(s,"LabeledStatement")}parseExpressionStatement(s,e,t){return s.expression=e,this.semicolon(),this.finishNode(s,"ExpressionStatement")}parseBlock(s=!1,e=!0,t){let r=this.startNode();return s&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,s,!1,8,t),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(s){return s.type==="ExpressionStatement"&&s.expression.type==="StringLiteral"&&!s.expression.extra.parenthesized}parseBlockBody(s,e,t,r,n){let a=s.body=[],o=s.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,t,r,n)}parseBlockOrModuleBlockBody(s,e,t,r,n){let a=this.state.strict,o=!1,l=!1;for(;!this.match(r);){let c=t?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let u=this.stmtToDirective(c);e.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}s.push(c)}n?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(s,e){return s.init=e,this.semicolon(!1),s.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),s.update=this.match(11)?null:this.parseExpression(),this.expect(11),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(s,"ForStatement")}parseForIn(s,e,t){let r=this.match(58);return this.next(),r?t!==null&&this.unexpected(t):s.await=t!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(m.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(m.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),s.left=e,s.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),s.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(s,r?"ForInStatement":"ForOfStatement")}parseVar(s,e,t,r=!1){let n=s.declarations=[];for(s.kind=t;;){let a=this.startNode();if(this.parseVarId(a,t),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!r&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(m.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(t==="const"||t==="using"||t==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(m.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:t})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return s}parseVarId(s,e){let t=this.parseBindingAtom();(e==="using"||e==="await using")&&(t.type==="ArrayPattern"||t.type==="ObjectPattern")&&this.raise(m.UsingDeclarationHasBindingPattern,t.loc.start),this.checkLVal(t,{type:"VariableDeclarator"},e==="var"?5:8201),s.id=t}parseAsyncFunctionExpression(s){return this.parseFunction(s,8)}parseFunction(s,e=0){let t=e&2,r=!!(e&1),n=r&&!(e&4),a=!!(e&8);this.initFunction(s,a),this.match(55)&&(t&&this.raise(m.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),s.generator=!0),r&&(s.id=this.parseFunctionId(n));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ns(a,s.generator)),r||(s.id=this.parseFunctionId()),this.parseFunctionParams(s,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(s,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!t&&this.registerFunctionStatementId(s),this.state.maybeInArrowParameters=o,s}parseFunctionId(s){return s||U(this.state.type)?this.parseIdentifier():null}parseFunctionParams(s,e){this.expect(10),this.expressionScope.enter(Vo()),s.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(s){s.id&&this.scope.declareName(s.id.name,!this.options.annexB||this.state.strict||s.generator||s.async?this.scope.treatFunctionsAsVar?5:8201:17,s.id.loc.start)}parseClass(s,e,t){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(s,e,t),this.parseClassSuper(s),s.body=this.parseClassBody(!!s.superClass,r),this.finishNode(s,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(s){return s.type==="Identifier"&&s.name==="constructor"||s.type==="StringLiteral"&&s.value==="constructor"}isNonstaticConstructor(s){return!s.computed&&!s.static&&this.nameIsConstructor(s.key)}parseClassBody(s,e){this.classScope.enter();let t={hadConstructor:!1,hadSuperClass:s},r=[],n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(m.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}let a=this.startNode();r.length&&(a.decorators=r,this.resetStartLocationFromNode(a,r[0]),r=[]),this.parseClassMember(n,a,t),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(m.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),r.length)throw this.raise(m.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(s,e){let t=this.parseIdentifier(!0);if(this.isClassMethod()){let r=e;return r.kind="method",r.computed=!1,r.key=t,r.static=!1,this.pushClassMethod(s,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=e;return r.computed=!1,r.key=t,r.static=!1,s.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(t),!1}parseClassMember(s,e,t){let r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(s,e))return;if(this.eat(5)){this.parseClassStaticBlock(s,e);return}}this.parseClassMemberWithIsStatic(s,e,t,r)}parseClassMemberWithIsStatic(s,e,t,r){let n=e,a=e,o=e,l=e,c=e,u=n,h=n;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){u.kind="method";let b=this.match(138);if(this.parseClassElementName(u),b){this.pushClassPrivateMethod(s,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(m.ConstructorIsGenerator,n.key),this.pushClassMethod(s,n,!0,!1,!1,!1);return}let f=!this.state.containsEsc&&U(this.state.type),d=this.parseClassElementName(e),p=f?d.name:null,g=this.isPrivateName(d),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(h),this.isClassMethod()){if(u.kind="method",g){this.pushClassPrivateMethod(s,a,!1,!1);return}let b=this.isNonstaticConstructor(n),P=!1;b&&(n.kind="constructor",t.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(m.DuplicateConstructor,d),b&&this.hasPlugin("typescript")&&e.override&&this.raise(m.OverrideOnConstructor,d),t.hadConstructor=!0,P=t.hadSuperClass),this.pushClassMethod(s,n,!1,!1,b,P)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(s,l):this.pushClassProperty(s,o);else if(p==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(d);let b=this.eat(55);h.optional&&this.unexpected(y),u.kind="method";let P=this.match(138);this.parseClassElementName(u),this.parsePostMemberNameModifiers(h),P?this.pushClassPrivateMethod(s,a,b,!0):(this.isNonstaticConstructor(n)&&this.raise(m.ConstructorIsAsync,n.key),this.pushClassMethod(s,n,b,!0,!1,!1))}else if((p==="get"||p==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(d),u.kind=p;let b=this.match(138);this.parseClassElementName(n),b?this.pushClassPrivateMethod(s,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(m.ConstructorIsAccessor,n.key),this.pushClassMethod(s,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(p==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(d);let b=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(s,c,b)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(s,l):this.pushClassProperty(s,o):this.unexpected()}parseClassElementName(s){let{type:e,value:t}=this.state;if((e===132||e===133)&&s.static&&t==="prototype"&&this.raise(m.StaticPrototype,this.state.startLoc),e===138){t==="constructor"&&this.raise(m.ConstructorClassPrivateField,this.state.startLoc);let r=this.parsePrivateName();return s.key=r,r}return this.parsePropertyName(s),s.key}parseClassStaticBlock(s,e){var t;this.scope.enter(208);let r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,s.body.push(this.finishNode(e,"StaticBlock")),(t=e.decorators)!=null&&t.length&&this.raise(m.DecoratorStaticBlock,e)}pushClassProperty(s,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(m.ConstructorClassField,e.key),s.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(s,e){let t=this.parseClassPrivateProperty(e);s.body.push(t),this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),0,t.key.loc.start)}pushClassAccessorProperty(s,e,t){!t&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(m.ConstructorClassField,e.key);let r=this.parseClassAccessorProperty(e);s.body.push(r),t&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(s,e,t,r,n,a){s.body.push(this.parseMethod(e,t,r,n,a,"ClassMethod",!0))}pushClassPrivateMethod(s,e,t,r){let n=this.parseMethod(e,t,r,!1,!1,"ClassPrivateMethod",!0);s.body.push(n);let a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(s,e){this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),e,s.key.loc.start)}parsePostMemberNameModifiers(s){}parseClassPrivateProperty(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassPrivateProperty")}parseClassProperty(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassProperty")}parseClassAccessorProperty(s){return this.parseInitializer(s),this.semicolon(),this.finishNode(s,"ClassAccessorProperty")}parseInitializer(s){this.scope.enter(80),this.expressionScope.enter(rn()),this.prodParam.enter(0),s.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(s,e,t,r=8331){if(U(this.state.type))s.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(s.id,r);else if(t||!e)s.id=null;else throw this.raise(m.MissingClassName,this.state.startLoc)}parseClassSuper(s){s.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(s,e){let t=this.parseMaybeImportPhase(s,!0),r=this.maybeParseExportDefaultSpecifier(s,t),n=!r||this.eat(12),a=n&&this.eatExportStar(s),o=a&&this.maybeParseExportNamespaceSpecifier(s),l=n&&(!o||this.eat(12)),c=r||a;if(a&&!o){if(r&&this.unexpected(),e)throw this.raise(m.UnsupportedDecoratorExport,s);return this.parseExportFrom(s,!0),this.finishNode(s,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(s);r&&n&&!a&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let h;if(c||u){if(h=!1,e)throw this.raise(m.UnsupportedDecoratorExport,s);this.parseExportFrom(s,c)}else h=this.maybeParseExportDeclaration(s);if(c||u||h){var f;let d=s;if(this.checkExport(d,!0,!1,!!d.source),((f=d.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,d.declaration,d);else if(e)throw this.raise(m.UnsupportedDecoratorExport,s);return this.finishNode(d,"ExportNamedDeclaration")}if(this.eat(65)){let d=s,p=this.parseExportDefaultExpression();if(d.declaration=p,p.type==="ClassDeclaration")this.maybeTakeDecorators(e,p,d);else if(e)throw this.raise(m.UnsupportedDecoratorExport,s);return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(s){return this.eat(55)}maybeParseExportDefaultSpecifier(s,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);let t=e||this.parseIdentifier(!0),r=this.startNodeAtNode(t);return r.exported=t,s.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(s){if(this.isContextual(93)){var e,t;(t=(e=s).specifiers)!=null||(e.specifiers=[]);let r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),s.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(s){if(this.match(5)){let e=s;e.specifiers||(e.specifiers=[]);let t=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(s){return this.shouldParseExportDeclaration()?(s.specifiers=[],s.source=null,this.hasPlugin("importAssertions")&&(s.assertions=[]),s.declaration=this.parseExportDeclaration(s),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let s=this.nextTokenInLineStart();return this.isUnparsedContextual(s,"function")}parseExportDefaultExpression(){let s=this.startNode();if(this.match(68))return this.next(),this.parseFunction(s,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(s,13);if(this.match(80))return this.parseClass(s,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(m.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(m.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(s){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:s}=this.state;if(U(s)){if(s===95&&!this.state.containsEsc||s===100)return!1;if((s===130||s===129)&&!this.state.containsEsc){let{type:r}=this.lookahead();if(U(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),t=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||U(this.state.type)&&t)return!0;if(this.match(65)&&t){let r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(s,e){this.eatContextual(98)?(s.source=this.parseImportSource(),this.checkExport(s),this.maybeParseImportAttributes(s),this.checkJSONModuleImport(s)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:s}=this.state;return s===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(m.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(m.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(m.UsingDeclarationExport,this.state.startLoc),!0):s===74||s===75||s===68||s===80||this.isLet()||this.isAsyncFunction()}checkExport(s,e,t,r){if(e){var n;if(t){if(this.checkDuplicateExports(s,"default"),this.hasPlugin("exportDefaultFrom")){var a;let o=s.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(m.ExportDefaultFromAsIdentifier,o)}}else if((n=s.specifiers)!=null&&n.length)for(let o of s.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!r&&o.local){let{local:u}=o;u.type!=="Identifier"?this.raise(m.ExportBindingIsString,o,{localName:u.value,exportName:c}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(s.declaration){let o=s.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(s,l.name)}else if(o.type==="VariableDeclaration")for(let l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(s){if(s.type==="Identifier")this.checkDuplicateExports(s,s.name);else if(s.type==="ObjectPattern")for(let e of s.properties)this.checkDeclaration(e);else if(s.type==="ArrayPattern")for(let e of s.elements)e&&this.checkDeclaration(e);else s.type==="ObjectProperty"?this.checkDeclaration(s.value):s.type==="RestElement"?this.checkDeclaration(s.argument):s.type==="AssignmentPattern"&&this.checkDeclaration(s.left)}checkDuplicateExports(s,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(m.DuplicateDefaultExport,s):this.raise(m.DuplicateExport,s,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(s){let e=[],t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else if(this.expect(12),this.eat(8))break;let r=this.isContextual(130),n=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,s,r))}return e}parseExportSpecifier(s,e,t,r){return this.eatContextual(93)?s.exported=this.parseModuleExportName():e?s.exported=Wo(s.local):s.exported||(s.exported=_e(s.local)),this.finishNode(s,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let s=this.parseStringLiteral(this.state.value),e=fl.exec(s.value);return e&&this.raise(m.ModuleExportNameHasLoneSurrogate,s,{surrogateCharCode:e[0].charCodeAt(0)}),s}return this.parseIdentifier(!0)}isJSONModuleImport(s){return s.assertions!=null?s.assertions.some(({key:e,value:t})=>t.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(s){let{specifiers:e}=s,t=e.length===1?e[0].type:null;if(s.phase==="source")t!=="ImportDefaultSpecifier"&&this.raise(m.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(s.phase==="defer")t!=="ImportNamespaceSpecifier"&&this.raise(m.DeferImportRequiresNamespace,e[0].loc.start);else if(s.module){var r;t!=="ImportDefaultSpecifier"&&this.raise(m.ImportReflectionNotBinding,e[0].loc.start),((r=s.assertions)==null?void 0:r.length)>0&&this.raise(m.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(s){if(this.isJSONModuleImport(s)&&s.type!=="ExportAllDeclaration"){let{specifiers:e}=s;if(e!=null){let t=e.find(r=>{let n;if(r.type==="ExportSpecifier"?n=r.local:r.type==="ImportSpecifier"&&(n=r.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});t!==void 0&&this.raise(m.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(s){return s?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(s,e,t,r){e||(t==="module"?(this.expectPlugin("importReflection",r),s.module=!0):this.hasPlugin("importReflection")&&(s.module=!1),t==="source"?(this.expectPlugin("sourcePhaseImports",r),s.phase="source"):t==="defer"?(this.expectPlugin("deferredImportEvaluation",r),s.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(s.phase=null))}parseMaybeImportPhase(s,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(s,e,null),null;let t=this.parseIdentifier(!0),{type:r}=this.state;return(Pe(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(t),this.applyImportPhase(s,e,t.name,t.loc.start),null):(this.applyImportPhase(s,e,null),t)}isPrecedingIdImportPhase(s){let{type:e}=this.state;return U(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(s){return this.match(133)?this.parseImportSourceAndAttributes(s):this.parseImportSpecifiersAndAfter(s,this.parseMaybeImportPhase(s,!1))}parseImportSpecifiersAndAfter(s,e){s.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(s,e)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(s);return r&&!n&&this.parseNamedImportSpecifiers(s),this.expectContextual(98),this.parseImportSourceAndAttributes(s)}parseImportSourceAndAttributes(s){var e;return(e=s.specifiers)!=null||(s.specifiers=[]),s.source=this.parseImportSource(),this.maybeParseImportAttributes(s),this.checkImportReflection(s),this.checkJSONModuleImport(s),this.semicolon(),this.finishNode(s,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(s,e,t){e.local=this.parseIdentifier(),s.specifiers.push(this.finishImportSpecifier(e,t))}finishImportSpecifier(s,e,t=8201){return this.checkLVal(s.local,{type:e},t),this.finishNode(s,e)}parseImportAttributes(){this.expect(5);let s=[],e=new Set;do{if(this.match(8))break;let t=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(m.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(133)?t.key=this.parseStringLiteral(r):t.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(m.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),s.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return this.expect(8),s}parseModuleAttributes(){let s=[],e=new Set;do{let t=this.startNode();if(t.key=this.parseIdentifier(!0),t.key.name!=="type"&&this.raise(m.ModuleAttributeDifferentFromType,t.key),e.has(t.key.name)&&this.raise(m.ModuleAttributesWithDuplicateKeys,t.key,{key:t.key.name}),e.add(t.key.name),this.expect(14),!this.match(133))throw this.raise(m.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),s.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return s}maybeParseImportAttributes(s){let e,t=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),t=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(m.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(s,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!t&&this.hasPlugin("importAssertions")?s.assertions=e:s.attributes=e}maybeParseDefaultImportSpecifier(s,e){if(e){let t=this.startNodeAtNode(e);return t.local=e,s.specifiers.push(this.finishImportSpecifier(t,"ImportDefaultSpecifier")),!0}else if(Pe(this.state.type))return this.parseImportSpecifierLocal(s,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(s){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(s,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(s){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(m.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let t=this.startNode(),r=this.match(133),n=this.isContextual(130);t.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(t,r,s.importKind==="type"||s.importKind==="typeof",n,void 0);s.specifiers.push(a)}}parseImportSpecifier(s,e,t,r,n){if(this.eatContextual(93))s.local=this.parseIdentifier();else{let{imported:a}=s;if(e)throw this.raise(m.ImportBindingIsString,s,{importName:a.value});this.checkReservedWord(a.name,s.loc.start,!0,!0),s.local||(s.local=_e(a))}return this.finishImportSpecifier(s,"ImportSpecifier",n)}isThisParam(s){return s.type==="Identifier"&&s.name==="this"}},cs=class extends br{constructor(s,e,t){s=hl(s),super(s,e),this.options=s,this.initializeScopes(),this.plugins=t,this.filename=s.sourceFilename}getScopeHandler(){return Dt}parse(){this.enterInitialScopes();let s=this.startNode(),e=this.startNode();return this.nextToken(),s.errors=null,this.parseTopLevel(s,e),s.errors=this.state.errors,s.comments.length=this.state.commentsLen,s}};function ml(i,s){var e;if(((e=s)==null?void 0:e.sourceType)==="unambiguous"){s=Object.assign({},s);try{s.sourceType="module";let t=Nt(s,i),r=t.parse();if(t.sawUnambiguousESM)return r;if(t.ambiguousScriptDifferentAst)try{return s.sourceType="script",Nt(s,i).parse()}catch{}else r.program.sourceType="script";return r}catch(t){try{return s.sourceType="script",Nt(s,i).parse()}catch{}throw t}}else return Nt(s,i).parse()}function yl(i,s){let e=Nt(s,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function gl(i){let s={};for(let e of Object.keys(i))s[e]=Oe(i[e]);return s}var xl=gl(po);function Nt(i,s){let e=cs,t=new Map;if(i!=null&&i.plugins){for(let r of i.plugins){let n,a;typeof r=="string"?n=r:[n,a]=r,t.has(n)||t.set(n,a||{})}cl(t),e=bl(t)}return new e(i,s,t)}var Ji=new Map;function bl(i){let s=[];for(let r of ul)i.has(r)&&s.push(r);let e=s.join("|"),t=Ji.get(e);if(!t){t=cs;for(let r of s)t=ln[r](t);Ji.set(e,t)}return t}Mt.parse=ml;Mt.parseExpression=yl;Mt.tokTypes=xl});var iu={};Qr(iu,{createDevToolsNodeSys:()=>pa});module.exports=Ca(iu);var Xt=class{constructor(s){et(this,"connections",new Set);et(this,"maxConnections",1e3);et(this,"sys");et(this,"healthCheckInterval",null);et(this,"HEALTH_CHECK_INTERVAL_MS",3e4);this.sys=s,this.startHealthMonitoring()}addConnection(s,e){if(this.connections.size>=this.maxConnections){let t=`Max connections (${this.maxConnections}) reached, rejecting new connection`;return console.error(`[ConnectionTracker] ${t}`),this.sys.Sentry?.captureMessage(t,{level:"error",tags:{component:"ConnectionTracker",maxConnections:this.maxConnections.toString(),currentConnections:this.connections.size.toString(),requestUrl:e?.url||"unknown",requestMethod:e?.method||"unknown",userAgent:e?.headers?.["user-agent"]||"unknown",origin:e?.headers?.origin||"unknown",referer:e?.headers?.referer||"unknown"},extra:{connectionLimit:this.maxConnections,activeConnections:this.connections.size,requestHeaders:e?.headers||{},requestUrl:e?.url}}),!1}return this.connections.add(s),s.on("close",()=>{this.removeConnection(s)}),s.on("error",()=>{this.removeConnection(s)}),!0}removeConnection(s){this.connections.delete(s)}getConnectionCount(){return this.connections.size}cleanup(){for(let s of this.connections)s.writable&&s.write(`HTTP/1.1 503 Service Unavailable\r
9
9
  \r
10
- `),s.destroy();this.connections.clear(),this.stopHealthMonitoring()}startHealthMonitoring(){this.healthCheckInterval||(this.healthCheckInterval=setInterval(()=>{this.performHealthCheck()},this.HEALTH_CHECK_INTERVAL_MS))}stopHealthMonitoring(){this.healthCheckInterval&&(clearInterval(this.healthCheckInterval),this.healthCheckInterval=null)}performHealthCheck(){let s=[];for(let e of this.connections)if(e.destroyed||!e.writable){s.push(e);continue}for(let e of s){this.removeConnection(e);try{e.destroy()}catch{}}}};var ue=require("fs/promises"),la=require("crypto"),K=require("fs"),Ls=require("os"),R=Re(require("path"),1),ca=Re(require("typescript"),1),ua=Re(require("launch-editor"),1);async function Zr(i,s){let e=i.resolve("/");for(let t=0;t<20;t++){let r=i.join(s,"package.json"),n=await i.readFile(r);if(n)return JSON.parse(n);if(s===e)break;s=i.dirname(s)}return null}var si=Re(ti(),1);function ri(){try{let i=(0,si.default)();if(i?.name)return i.name}catch{}return"npm"}async function ni(i){let s=[],e=await Zr(i,i.getRepoRootDir());if(e){let t=await Na(e,i);s.push(...t)}return s}async function Na(i,s){let e=[];if(i&&typeof i=="object"){let t=new Set(Object.keys({...i.dependencies,...i.devDependencies}));for(let r of ka)if(t.has(r)&&!e.some(n=>n.name===r)){let n={name:r};ii.has(r)&&(n.version=await ii.get(r)(s)),e.push(n)}}return e}function Fs(i){let s=parseInt(i);return Number.isNaN(s)?void 0:s}var ii=new Map([["next",async i=>{if(!i.spawnSync)return;let s=ri(),e=s==="npm"?"npx":s,{stdout:t}=i.spawnSync(e,["next","-v"],{encoding:"utf8"});if(!t)return;let r=t.match(/(Next.js v)([\d.]+)/g);if(!r)return;let n=r[0].split("Next.js v")[1],[a,o,l]=n.split(".");return{major:Fs(a),minor:Fs(o),patch:Fs(l)}}]]),ka=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"];var Ze=require("child_process");var Hr={};Qr(Hr,{MagicastError:()=>re,builders:()=>Xc,detectCodeFormat:()=>ia,generateCode:()=>Kr,loadFile:()=>Kc,parseExpression:()=>aa,parseModule:()=>na,writeFile:()=>Hc});var bs=require("fs");var Cs=Re(Li(),1),An=Re(cn(),1);function me(i){var s=i.use(Q),e=s.Type,t=s.builtInTypes,r=t.number;function n(c){return e.from(u=>r.check(u)&&u>=c,r+" >= "+c)}let a={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var o=e.or(t.string,t.number,t.boolean,t.null,t.undefined);let l=e.from(c=>{if(c===null)return!0;var u=typeof c;return!(u==="object"||u==="function")},o.toString());return{geq:n,defaults:a,isPrimitive:l}}function q(i){try{var s=i(),e=s.exports,t=e.default}catch{return}t&&t!==e&&typeof e=="object"&&(Object.assign(t,e,{default:t}),e.__esModule&&Object.defineProperty(t,"__esModule",{value:!0}),s.exports=t)}var Tl=Object.defineProperty,Pl=(i,s,e)=>s in i?Tl(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,oe=(i,s,e)=>(Pl(i,typeof s!="symbol"?s+"":s,e),e),wn=Object.prototype,Ts=wn.toString,xe=wn.hasOwnProperty,Ye=class{assert(s,e){if(!this.check(s,e)){var t=$r(s);throw new Error(t+" does not match type "+this)}return!0}arrayOf(){let s=this;return new qt(s)}},qt=class extends Ye{constructor(s){super(),this.elemType=s,oe(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(s,e){return Array.isArray(s)&&s.every(t=>this.elemType.check(t,e))}},Ps=class extends Ye{constructor(s){super(),this.value=s,oe(this,"kind","IdentityType")}toString(){return String(this.value)}check(s,e){let t=s===this.value;return!t&&typeof e=="function"&&e(this,s),t}},Ss=class extends Ye{constructor(s){super(),this.fields=s,oe(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(s,e){return Ts.call(s)===Ts.call({})&&this.fields.every(t=>t.type.check(s[t.name],e))}},Es=class extends Ye{constructor(s){super(),this.types=s,oe(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(s,e){return this.types.some(t=>t.check(s,!!e))?!0:(typeof e=="function"&&e(this,s),!1)}},Qe=class extends Ye{constructor(s,e){super(),this.name=s,this.predicate=e,oe(this,"kind","PredicateType")}toString(){return this.name}check(s,e){let t=this.predicate(s,e);return!t&&typeof e=="function"&&e(this,s),t}},Vt=class i{constructor(s,e){this.type=s,this.typeName=e,oe(this,"baseNames",[]),oe(this,"ownFields",Object.create(null)),oe(this,"allSupertypes",Object.create(null)),oe(this,"supertypeList",[]),oe(this,"allFields",Object.create(null)),oe(this,"fieldNames",[]),oe(this,"finalized",!1),oe(this,"buildable",!1),oe(this,"buildParams",[])}isSupertypeOf(s){if(s instanceof i){if(this.finalized!==!0||s.finalized!==!0)throw new Error("");return xe.call(s.allSupertypes,this.typeName)}else throw new Error(s+" is not a Def")}checkAllFields(s,e){var t=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function r(n){var a=t[n],o=a.type,l=a.getValue(s);return o.check(l,e)}return s!==null&&typeof s=="object"&&Object.keys(t).every(r)}bases(...s){var e=this.baseNames;if(this.finalized){if(s.length!==e.length)throw new Error("");for(var t=0;t<s.length;t++)if(s[t]!==e[t])throw new Error("");return this}return s.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),this}},As=class{constructor(s,e,t,r){this.name=s,this.type=e,this.defaultFn=t,oe(this,"hidden"),this.hidden=!!r}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(s){var e=s[this.name];return typeof e<"u"||typeof this.defaultFn=="function"&&(e=this.defaultFn.call(s)),e}};function $r(i){return Array.isArray(i)?"["+i.map($r).join(", ")+"]":i&&typeof i=="object"?"{ "+Object.keys(i).map(function(s){return s+": "+i[s]}).join(", ")+" }":JSON.stringify(i)}function Q(i){let s={or(...w){return new Es(w.map(v=>s.from(v)))},from(w,v){if(w instanceof qt||w instanceof Ps||w instanceof Ss||w instanceof Es||w instanceof Qe)return w;if(w instanceof Vt)return w.type;if(o.check(w)){if(w.length!==1)throw new Error("only one element type is permitted for typed arrays");return new qt(s.from(w[0]))}if(l.check(w))return new Ss(Object.keys(w).map(F=>new As(F,s.from(w[F],F))));if(typeof w=="function"){var M=e.indexOf(w);if(M>=0)return t[M];if(typeof v!="string")throw new Error("missing name");return new Qe(v,w)}return new Ps(w)},def(w){return xe.call(b,w)?b[w]:b[w]=new k(w)},hasDef(w){return xe.call(b,w)}};var e=[],t=[];function r(w,v){let M=Ts.call(v),F=new Qe(w,z=>Ts.call(z)===M);return v&&typeof v.constructor=="function"&&(e.push(v.constructor),t.push(F)),F}let n=r("string","truthy"),a=r("function",function(){}),o=r("array",[]),l=r("object",{}),c=r("RegExp",/./),u=r("Date",new Date),h=r("number",3),f=r("boolean",!0),d=r("null",null),p=r("undefined",void 0),g=typeof BigInt=="function"?r("BigInt",BigInt(1234)):new Qe("BigInt",()=>!1),y={string:n,function:a,array:o,object:l,RegExp:c,Date:u,number:h,boolean:f,null:d,undefined:p,BigInt:g};var b=Object.create(null);function P(w){if(w&&typeof w=="object"){var v=w.type;if(typeof v=="string"&&xe.call(b,v)){var M=b[v];if(M.finalized)return M}}return null}class k extends Vt{constructor(v){super(new Qe(v,(M,F)=>this.check(M,F)),v)}check(v,M){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(v===null||typeof v!="object")return!1;var F=P(v);return F?M&&F===this?this.checkAllFields(v,M):this.isSupertypeOf(F)?M?F.checkAllFields(v,M)&&this.checkAllFields(v,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(v,M):!1}build(...v){if(this.buildParams=v,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let M=(z,J,G,ye)=>{if(!xe.call(z,J)){var ke=this.allFields;if(!xe.call(ke,J))throw new Error(""+J);var Ht=ke[J],xa=Ht.type,Tt;if(ye)Tt=G;else if(Ht.defaultFn)Tt=Ht.defaultFn.call(z);else{var ba="no value or default function given for field "+JSON.stringify(J)+" of "+this.typeName+"("+this.buildParams.map(function(Ta){return ke[Ta]}).join(", ")+")";throw new Error(ba)}if(!xa.check(Tt))throw new Error($r(Tt)+" does not match field "+Ht+" of type "+this.typeName);z[J]=Tt}},F=(...z)=>{var J=z.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var G=Object.create(L);if(this.buildParams.forEach(function(ye,ke){ke<J?M(G,ye,z[ke],!0):M(G,ye,null,!1)}),Object.keys(this.allFields).forEach(function(ye){M(G,ye,null,!1)}),G.type!==this.typeName)throw new Error("");return G};return F.from=z=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var J=Object.create(L);if(Object.keys(this.allFields).forEach(function(G){xe.call(z,G)?M(J,G,z[G],!0):M(J,G,null,!1)}),J.type!==this.typeName)throw new Error("");return J},Object.defineProperty(A,he(this.typeName),{enumerable:!0,value:F}),this}field(v,M,F,z){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(v)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[v]=new As(v,s.from(M),F,z),this)}finalize(){if(!this.finalized){var v=this.allFields,M=this.allSupertypes;this.baseNames.forEach(z=>{var J=b[z];if(J instanceof Vt)J.finalize(),Ms(v,J.allFields),Ms(M,J.allSupertypes);else{var G="unknown supertype name "+JSON.stringify(z)+" for subtype "+JSON.stringify(this.typeName);throw new Error(G)}}),Ms(v,this.ownFields),M[this.typeName]=this,this.fieldNames.length=0;for(var F in v)xe.call(v,F)&&!v[F].hidden&&this.fieldNames.push(F);Object.defineProperty(Gr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,ya(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&ma(this.typeName)}}}function T(w){if(!xe.call(b,w))throw new Error("");var v=b[w];if(v.finalized!==!0)throw new Error("");return v.supertypeList.slice(1)}function E(w){for(var v={},M=Object.keys(b),F=M.length,z=0;z<F;++z){var J=M[z],G=b[J];if(G.finalized!==!0)throw new Error(""+J);for(var ye=0;ye<G.supertypeList.length;++ye){var ke=G.supertypeList[ye];if(xe.call(w,ke)){v[J]=ke;break}}}return v}var A=Object.create(null),L={};function W(w,v){var M=L[w];return p.check(v)?delete L[w]:(a.assert(v),Object.defineProperty(L,w,{enumerable:!0,configurable:!0,value:v})),M}function he(w){return w.replace(/^[A-Z]+/,function(v){var M=v.length;switch(M){case 0:return"";case 1:return v.toLowerCase();default:return v.slice(0,M-1).toLowerCase()+v.charAt(M-1)}})}function we(w){return w=he(w),w.replace(/(Expression)?$/,"Statement")}var Gr={};function Ds(w){var v=P(w);if(v)return v.fieldNames.slice(0);if("type"in w)throw new Error("did not recognize object of type "+JSON.stringify(w.type));return Object.keys(w)}function Os(w,v){var M=P(w);if(M){var F=M.allFields[v];if(F)return F.getValue(w)}return w&&w[v]}function fa(w,v,M){Ds(w).forEach(function(F){v.call(this,F,Os(w,F))},M)}function da(w,v,M){return Ds(w).some(function(F){return v.call(this,F,Os(w,F))},M)}function ma(w){var v=we(w);if(A[v])return;var M=A[he(w)];if(!M)return;let F=function(...z){return A.expressionStatement(M.apply(A,z))};F.from=function(...z){return A.expressionStatement(M.from.apply(A,z))},A[v]=F}function ya(w,v){v.length=0,v.push(w);for(var M=Object.create(null),F=0;F<v.length;++F){w=v[F];var z=b[w];if(z.finalized!==!0)throw new Error("");xe.call(M,w)&&delete v[M[w]],M[w]=F,v.push.apply(v,z.baseNames)}for(var J=0,G=J,ye=v.length;G<ye;++G)xe.call(v,G)&&(v[J++]=v[G]);v.length=J}function Ms(w,v){return Object.keys(v).forEach(function(M){w[M]=v[M]}),w}function ga(){Object.keys(b).forEach(function(w){b[w].finalize()})}return{Type:s,builtInTypes:y,getSupertypeNames:T,computeSupertypeLookupTable:E,builders:A,defineMethod:W,getBuilderName:he,getStatementBuilderName:we,namedTypes:Gr,getFieldNames:Ds,getFieldValue:Os,eachField:fa,someField:da,finalize:ga}}q(()=>module);var Sl=Object.prototype,us=Sl.hasOwnProperty;function vn(i){var s=i.use(Q),e=s.builtInTypes.array,t=s.builtInTypes.number;let r=function h(f,d,p){if(!(this instanceof h))throw new Error("Path constructor cannot be invoked without 'new'");if(d){if(!(d instanceof h))throw new Error("")}else d=null,p=null;this.value=f,this.parentPath=d,this.name=p,this.__childCache=null};var n=r.prototype;function a(h){return h.__childCache||(h.__childCache=Object.create(null))}function o(h,f){var d=a(h),p=h.getValueProperty(f),g=d[f];return(!us.call(d,f)||g.value!==p)&&(g=d[f]=new h.constructor(p,h,f)),g}n.getValueProperty=function(f){return this.value[f]},n.get=function(...f){for(var d=this,p=f.length,g=0;g<p;++g)d=o(d,f[g]);return d},n.each=function(f,d){for(var p=[],g=this.value.length,y=0,y=0;y<g;++y)us.call(this.value,y)&&(p[y]=this.get(y));for(d=d||this,y=0;y<g;++y)us.call(p,y)&&f.call(d,p[y])},n.map=function(f,d){var p=[];return this.each(function(g){p.push(f.call(this,g))},d),p},n.filter=function(f,d){var p=[];return this.each(function(g){f.call(this,g)&&p.push(g)},d),p};function l(){}function c(h,f,d,p){if(e.assert(h.value),f===0)return l;var g=h.value.length;if(g<1)return l;var y=arguments.length;y===2?(d=0,p=g):y===3?(d=Math.max(d,0),p=g):(d=Math.max(d,0),p=Math.min(p,g)),t.assert(d),t.assert(p);for(var b=Object.create(null),P=a(h),k=d;k<p;++k)if(us.call(h.value,k)){var T=h.get(k);if(T.name!==k)throw new Error("");var E=k+f;T.name=E,b[E]=T,delete P[k]}return delete P.length,function(){for(var A in b){var L=b[A];if(L.name!==+A)throw new Error("");P[A]=L,h.value[A]=L.value}}}n.shift=function(){var f=c(this,-1),d=this.value.shift();return f(),d},n.unshift=function(...f){var d=c(this,f.length),p=this.value.unshift.apply(this.value,f);return d(),p},n.push=function(...f){return e.assert(this.value),delete a(this).length,this.value.push.apply(this.value,f)},n.pop=function(){e.assert(this.value);var f=a(this);return delete f[this.value.length-1],delete f.length,this.value.pop()},n.insertAt=function(f){var d=arguments.length,p=c(this,d-1,f);if(p===l&&d<=1)return this;f=Math.max(f,0);for(var g=1;g<d;++g)this.value[f+g-1]=arguments[g];return p(),this},n.insertBefore=function(...f){for(var d=this.parentPath,p=f.length,g=[this.name],y=0;y<p;++y)g.push(f[y]);return d.insertAt.apply(d,g)},n.insertAfter=function(...f){for(var d=this.parentPath,p=f.length,g=[this.name+1],y=0;y<p;++y)g.push(f[y]);return d.insertAt.apply(d,g)};function u(h){if(!(h instanceof r))throw new Error("");var f=h.parentPath;if(!f)return h;var d=f.value,p=a(f);if(d[h.name]===h.value)p[h.name]=h;else if(e.check(d)){var g=d.indexOf(h.value);g>=0&&(p[h.name=g]=h)}else d[h.name]=h.value,p[h.name]=h;if(d[h.name]!==h.value)throw new Error("");if(h.parentPath.get(h.name)!==h)throw new Error("");return h}return n.replace=function(f){var d=[],p=this.parentPath.value,g=a(this.parentPath),y=arguments.length;if(u(this),e.check(p)){for(var b=p.length,P=c(this.parentPath,y-1,this.name+1),k=[this.name,1],T=0;T<y;++T)k.push(arguments[T]);var E=p.splice.apply(p,k);if(E[0]!==this.value)throw new Error("");if(p.length!==b-1+y)throw new Error("");if(P(),y===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(p[this.name]!==f)throw new Error("");for(this.value!==f&&(this.value=f,this.__childCache=null),T=0;T<y;++T)d.push(this.parentPath.get(this.name+T));if(d[0]!==this)throw new Error("")}}else if(y===1)this.value!==f&&(this.__childCache=null),this.value=p[this.name]=f,d.push(this);else if(y===0)delete p[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return d},r}q(()=>module);var pt=Object.prototype.hasOwnProperty;function El(i){var s=i.use(Q),e=s.Type,t=s.namedTypes,r=t.Node,n=t.Expression,a=s.builtInTypes.array,o=s.builders;let l=function T(E,A){if(!(this instanceof T))throw new Error("Scope constructor cannot be invoked without 'new'");u.check(E.value)||c.assert(E.value);var L;if(A){if(!(A instanceof T))throw new Error("");L=A.depth+1}else A=null,L=0;Object.defineProperties(this,{path:{value:E},node:{value:E.value},isGlobal:{value:!A,enumerable:!0},depth:{value:L},parent:{value:A},bindings:{value:{}},types:{value:{}}})};var c=e.or(t.Program,t.Function,t.CatchClause),u=e.or(t.Function,t.ClassDeclaration,t.ClassExpression,t.InterfaceDeclaration,t.TSInterfaceDeclaration,t.TypeAlias,t.TSTypeAliasDeclaration),h=e.or(t.TypeParameter,t.TSTypeParameter);l.isEstablishedBy=function(T){return c.check(T)||u.check(T)};var f=l.prototype;f.didScan=!1,f.declares=function(T){return this.scan(),pt.call(this.bindings,T)},f.declaresType=function(T){return this.scan(),pt.call(this.types,T)},f.declareTemporary=function(T){if(T){if(!/^[a-z$_]/i.test(T))throw new Error("")}else T="t$";T+=this.depth.toString(36)+"$",this.scan();for(var E=0;this.declares(T+E);)++E;var A=T+E;return this.bindings[A]=s.builders.identifier(A)},f.injectTemporary=function(T,E){T||(T=this.declareTemporary());var A=this.path.get("body");return t.BlockStatement.check(A.value)&&(A=A.get("body")),A.unshift(o.variableDeclaration("var",[o.variableDeclarator(T,E||null)])),T},f.scan=function(T){if(T||!this.didScan){for(var E in this.bindings)delete this.bindings[E];for(var E in this.types)delete this.types[E];d(this.path,this.bindings,this.types),this.didScan=!0}},f.getBindings=function(){return this.scan(),this.bindings},f.getTypes=function(){return this.scan(),this.types};function d(T,E,A){var L=T.value;if(u.check(L)){let W=T.get("typeParameters","params");a.check(W.value)&&W.each(he=>{k(he,A)})}c.check(L)&&(t.CatchClause.check(L)?b(T.get("param"),E):p(T,E,A))}function p(T,E,A){var L=T.value;T.parent&&t.FunctionExpression.check(T.parent.node)&&T.parent.node.id&&b(T.parent.get("id"),E),L&&(a.check(L)?T.each(W=>{y(W,E,A)}):t.Function.check(L)?(T.get("params").each(W=>{b(W,E)}),y(T.get("body"),E,A),p(T.get("typeParameters"),E,A)):t.TypeAlias&&t.TypeAlias.check(L)||t.InterfaceDeclaration&&t.InterfaceDeclaration.check(L)||t.TSTypeAliasDeclaration&&t.TSTypeAliasDeclaration.check(L)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(L)?P(T.get("id"),A):t.VariableDeclarator.check(L)?(b(T.get("id"),E),y(T.get("init"),E,A)):L.type==="ImportSpecifier"||L.type==="ImportNamespaceSpecifier"||L.type==="ImportDefaultSpecifier"?b(T.get(L.local?"local":L.name?"name":"id"),E):r.check(L)&&!n.check(L)&&s.eachField(L,function(W,he){var we=T.get(W);if(!g(we,he))throw new Error("");y(we,E,A)}))}function g(T,E){return!!(T.value===E||Array.isArray(T.value)&&T.value.length===0&&Array.isArray(E)&&E.length===0)}function y(T,E,A){var L=T.value;if(!(!L||n.check(L)))if(t.FunctionDeclaration.check(L)&&L.id!==null)b(T.get("id"),E);else if(t.ClassDeclaration&&t.ClassDeclaration.check(L)&&L.id!==null)b(T.get("id"),E),p(T.get("typeParameters"),E,A);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(L)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(L))P(T.get("id"),A);else if(c.check(L)){if(t.CatchClause.check(L)&&t.Identifier.check(L.param)){var W=L.param.name,he=pt.call(E,W);p(T.get("body"),E,A),he||delete E[W]}}else p(T,E,A)}function b(T,E){var A=T.value;t.Pattern.assert(A),t.Identifier.check(A)?pt.call(E,A.name)?E[A.name].push(T):E[A.name]=[T]:t.AssignmentPattern&&t.AssignmentPattern.check(A)?b(T.get("left"),E):t.ObjectPattern&&t.ObjectPattern.check(A)?T.get("properties").each(function(L){var W=L.value;t.Pattern.check(W)?b(L,E):t.Property.check(W)||t.ObjectProperty&&t.ObjectProperty.check(W)?b(L.get("value"),E):t.SpreadProperty&&t.SpreadProperty.check(W)&&b(L.get("argument"),E)}):t.ArrayPattern&&t.ArrayPattern.check(A)?T.get("elements").each(function(L){var W=L.value;t.Pattern.check(W)?b(L,E):t.SpreadElement&&t.SpreadElement.check(W)&&b(L.get("argument"),E)}):t.PropertyPattern&&t.PropertyPattern.check(A)?b(T.get("pattern"),E):(t.SpreadElementPattern&&t.SpreadElementPattern.check(A)||t.RestElement&&t.RestElement.check(A)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(A))&&b(T.get("argument"),E)}function P(T,E){var A=T.value;t.Pattern.assert(A),t.Identifier.check(A)&&(pt.call(E,A.name)?E[A.name].push(T):E[A.name]=[T])}function k(T,E){var A=T.value;h.assert(A),pt.call(E,A.name)?E[A.name].push(T):E[A.name]=[T]}return f.lookup=function(T){for(var E=this;E&&!E.declares(T);E=E.parent);return E},f.lookupType=function(T){for(var E=this;E&&!E.declaresType(T);E=E.parent);return E},f.getGlobalScope=function(){for(var T=this;!T.isGlobal;)T=T.parent;return T},l}q(()=>module);function Cn(i){var s=i.use(Q),e=s.namedTypes,t=s.builders,r=s.builtInTypes.number,n=s.builtInTypes.array,a=i.use(vn),o=i.use(El);let l=function y(b,P,k){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");a.call(this,b,P,k)};var c=l.prototype=Object.create(a.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(c,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),c.replace=function(){return delete this.node,delete this.parent,delete this.scope,a.prototype.replace.apply(this,arguments)},c.prune=function(){var y=this.parent;return this.replace(),p(y)},c._computeNode=function(){var y=this.value;if(e.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},c._computeParent=function(){var y=this.value,b=this.parentPath;if(!e.Node.check(y)){for(;b&&!e.Node.check(b.value);)b=b.parentPath;b&&(b=b.parentPath)}for(;b&&!e.Node.check(b.value);)b=b.parentPath;return b||null},c._computeScope=function(){var y=this.value,b=this.parentPath,P=b&&b.scope;return e.Node.check(y)&&o.isEstablishedBy(y)&&(P=new o(this,P)),P||null},c.getValueProperty=function(y){return s.getFieldValue(this.value,y)},c.needsParens=function(y){var b=this.parentPath;if(!b)return!1;var P=this.value;if(!e.Expression.check(P)||P.type==="Identifier")return!1;for(;!e.Node.check(b.value);)if(b=b.parentPath,!b)return!1;var k=b.value;switch(P.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return k.type==="MemberExpression"&&this.name==="object"&&k.object===P;case"BinaryExpression":case"LogicalExpression":switch(k.type){case"CallExpression":return this.name==="callee"&&k.callee===P;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&k.object===P;case"BinaryExpression":case"LogicalExpression":{let T=P,E=k.operator,A=h[E],L=T.operator,W=h[L];if(A>W)return!0;if(A===W&&this.name==="right"){if(k.right!==T)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(k.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(k.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return k.type==="MemberExpression"&&r.check(P.value)&&this.name==="object"&&k.object===P;case"AssignmentExpression":case"ConditionalExpression":switch(k.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&k.callee===P;case"ConditionalExpression":return this.name==="test"&&k.test===P;case"MemberExpression":return this.name==="object"&&k.object===P;default:return!1}default:if(k.type==="NewExpression"&&this.name==="callee"&&k.callee===P)return f(P)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function u(y){return e.BinaryExpression.check(y)||e.LogicalExpression.check(y)}var h={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,b){y.forEach(function(P){h[P]=b})});function f(y){return e.CallExpression.check(y)?!0:n.check(y)?y.some(f):e.Node.check(y)?s.someField(y,function(b,P){return f(P)}):!1}c.canBeFirstInStatement=function(){var y=this.node;return!e.FunctionExpression.check(y)&&!e.ObjectExpression.check(y)},c.firstInStatement=function(){return d(this)};function d(y){for(var b,P;y.parent;y=y.parent){if(b=y.node,P=y.parent.node,e.BlockStatement.check(P)&&y.parent.name==="body"&&y.name===0){if(P.body[0]!==b)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(P)&&y.name==="expression"){if(P.expression!==b)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(P)&&y.parent.name==="expressions"&&y.name===0){if(P.expressions[0]!==b)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(P)&&y.name==="callee"){if(P.callee!==b)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(P)&&y.name==="object"){if(P.object!==b)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(P)&&y.name==="test"){if(P.test!==b)throw new Error("Nodes must be equal");continue}if(u(P)&&y.name==="left"){if(P.left!==b)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(P)&&!P.prefix&&y.name==="argument"){if(P.argument!==b)throw new Error("Nodes must be equal");continue}return!1}return!0}function p(y){if(e.VariableDeclaration.check(y.node)){var b=y.get("declarations").value;if(!b||b.length===0)return y.prune()}else if(e.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else e.IfStatement.check(y.node)&&g(y);return y}function g(y){var b=y.get("test").value,P=y.get("alternate").value,k=y.get("consequent").value;if(!k&&!P){var T=t.expressionStatement(b);y.replace(T)}else if(!k&&P){var E=t.unaryExpression("!",b,!0);e.UnaryExpression.check(b)&&b.operator==="!"&&(E=b.argument),y.get("test").replace(E),y.get("consequent").replace(P),y.get("alternate").replace()}}return l}q(()=>module);var hs=Object.prototype.hasOwnProperty;function Al(i){var s=i.use(Q),e=i.use(Cn),t=s.builtInTypes.array,r=s.builtInTypes.object,n=s.builtInTypes.function,a;let o=function p(){if(!(this instanceof p))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=hs.call(this._methodNameTable,"Block")||hs.call(this._methodNameTable,"Line"),this.Context=f(this),this._visiting=!1,this._changeReported=!1};function l(p){var g=Object.create(null);for(var y in p)/^visit[A-Z]/.test(y)&&(g[y.slice(5)]=!0);for(var b=s.computeSupertypeLookupTable(g),P=Object.create(null),k=Object.keys(b),T=k.length,E=0;E<T;++E){var A=k[E];y="visit"+b[A],n.check(p[y])&&(P[A]=y)}return P}o.fromMethodsObject=function(g){if(g instanceof o)return g;if(!r.check(g))return new o;let y=function P(){if(!(this instanceof P))throw new Error("Visitor constructor cannot be invoked without 'new'");o.call(this)};var b=y.prototype=Object.create(u);return b.constructor=y,c(b,g),c(y,o),n.assert(y.fromMethodsObject),n.assert(y.visit),new y};function c(p,g){for(var y in g)hs.call(g,y)&&(p[y]=g[y]);return p}o.visit=function(g,y){return o.fromMethodsObject(y).visit(g)};var u=o.prototype;u.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var p=arguments.length,g=new Array(p),y=0;y<p;++y)g[y]=arguments[y];g[0]instanceof e||(g[0]=new e({root:g[0]}).get("root")),this.reset.apply(this,g);var b;try{var P=this.visitWithoutReset(g[0]);b=!0}finally{if(this._visiting=!1,!b&&this._abortRequested)return g[0].value}return P},u.AbortRequest=function(){},u.abort=function(){var p=this;p._abortRequested=!0;var g=new p.AbortRequest;throw g.cancel=function(){p._abortRequested=!1},g},u.reset=function(p){},u.visitWithoutReset=function(p){if(this instanceof this.Context)return this.visitor.visitWithoutReset(p);if(!(p instanceof e))throw new Error("");var g=p.value,y=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(y){var b=this.acquireContext(p);try{return b.invokeVisitorMethod(y)}finally{this.releaseContext(b)}}else return h(p,this)};function h(p,g){if(!(p instanceof e))throw new Error("");if(!(g instanceof o))throw new Error("");var y=p.value;if(t.check(y))p.each(g.visitWithoutReset,g);else if(r.check(y)){var b=s.getFieldNames(y);g._shouldVisitComments&&y.comments&&b.indexOf("comments")<0&&b.push("comments");for(var P=b.length,k=[],T=0;T<P;++T){var E=b[T];hs.call(y,E)||(y[E]=s.getFieldValue(y,E)),k.push(p.get(E))}for(var T=0;T<P;++T)g.visitWithoutReset(k[T])}return p.value}u.acquireContext=function(p){return this._reusableContextStack.length===0?new this.Context(p):this._reusableContextStack.pop().reset(p)},u.releaseContext=function(p){if(!(p instanceof this.Context))throw new Error("");this._reusableContextStack.push(p),p.currentPath=null},u.reportChanged=function(){this._changeReported=!0},u.wasChangeReported=function(){return this._changeReported};function f(p){function g(b){if(!(this instanceof g))throw new Error("");if(!(this instanceof o))throw new Error("");if(!(b instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:p,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=b,this.needToCallTraverse=!0,Object.seal(this)}if(!(p instanceof o))throw new Error("");var y=g.prototype=Object.create(p);return y.constructor=g,c(y,d),g}var d=Object.create(null);return d.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},d.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var y=this.visitor[g].call(this,this.currentPath);if(y===!1?this.needToCallTraverse=!1:y!==a&&(this.currentPath=this.currentPath.replace(y)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var b=this.currentPath;return b&&b.value},d.traverse=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,h(g,o.fromMethodsObject(y||this.visitor))},d.visit=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,o.fromMethodsObject(y||this.visitor).visitWithoutReset(g)},d.reportChanged=function(){this.visitor.reportChanged()},d.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},o}q(()=>module);function wl(i){var s=i.use(Q),e=s.getFieldNames,t=s.getFieldValue,r=s.builtInTypes.array,n=s.builtInTypes.object,a=s.builtInTypes.Date,o=s.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function c(p,g,y){return r.check(y)?y.length=0:y=null,h(p,g,y)}c.assert=function(p,g){var y=[];if(!c(p,g,y))if(y.length===0){if(p!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(u).join(""))};function u(p){return/[_$a-z][_$a-z0-9]*/i.test(p)?"."+p:"["+JSON.stringify(p)+"]"}function h(p,g,y){return p===g?!0:r.check(p)?f(p,g,y):n.check(p)?d(p,g,y):a.check(p)?a.check(g)&&+p==+g:o.check(p)?o.check(g)&&p.source===g.source&&p.global===g.global&&p.multiline===g.multiline&&p.ignoreCase===g.ignoreCase:p==g}function f(p,g,y){r.assert(p);var b=p.length;if(!r.check(g)||g.length!==b)return y&&y.push("length"),!1;for(var P=0;P<b;++P){if(y&&y.push(P),P in p!=P in g||!h(p[P],g[P],y))return!1;if(y){var k=y.pop();if(k!==P)throw new Error(""+k)}}return!0}function d(p,g,y){if(n.assert(p),!n.check(g))return!1;if(p.type!==g.type)return y&&y.push("type"),!1;var b=e(p),P=b.length,k=e(g),T=k.length;if(P===T){for(var E=0;E<P;++E){var A=b[E],L=t(p,A),W=t(g,A);if(y&&y.push(A),!h(L,W,y))return!1;if(y){var he=y.pop();if(he!==A)throw new Error(""+he)}}return!0}if(!y)return!1;var we=Object.create(null);for(E=0;E<P;++E)we[b[E]]=!0;for(E=0;E<T;++E){if(A=k[E],!l.call(we,A))return y.push(A),!1;delete we[A]}for(A in we){y.push(A);break}return!1}return c}q(()=>module);function vl(i){let s=Cl(),e=s.use(Q);i.forEach(s.use),e.finalize();let t=s.use(Al);return{Type:e.Type,builtInTypes:e.builtInTypes,namedTypes:e.namedTypes,builders:e.builders,defineMethod:e.defineMethod,getFieldNames:e.getFieldNames,getFieldValue:e.getFieldValue,eachField:e.eachField,someField:e.someField,getSupertypeNames:e.getSupertypeNames,getBuilderName:e.getBuilderName,astNodesAreEquivalent:s.use(wl),finalize:e.finalize,Path:s.use(vn),NodePath:s.use(Cn),PathVisitor:t,use:s.use,visit:t.visit}}function Cl(){let i=[],s=[];function e(r){var n=i.indexOf(r);return n===-1&&(n=i.length,i.push(r),s[n]=r(t)),s[n]}var t={use:e};return t}q(()=>module);function In(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}q(()=>module);function Nn(i){let s=i.use(In);return s.BinaryOperators.indexOf("**")<0&&s.BinaryOperators.push("**"),s.AssignmentOperators.indexOf("**=")<0&&s.AssignmentOperators.push("**="),s}q(()=>module);function kn(i){let s=i.use(Nn);return s.LogicalOperators.indexOf("??")<0&&s.LogicalOperators.push("??"),s}q(()=>module);function Il(i){let s=i.use(kn);return s.LogicalOperators.forEach(e=>{let t=e+"=";s.AssignmentOperators.indexOf(t)<0&&s.AssignmentOperators.push(t)}),s}q(()=>module);function Nl(i){var s=i.use(Q),e=s.Type,t=e.def,r=e.or,n=i.use(me),a=n.defaults,o=n.geq;let{BinaryOperators:l,AssignmentOperators:c,LogicalOperators:u}=i.use(In);t("Printable").field("loc",r(t("SourceLocation"),null),a.null,!0),t("Node").bases("Printable").field("type",String).field("comments",r([t("Comment")],null),a.null,!0),t("SourceLocation").field("start",t("Position")).field("end",t("Position")).field("source",r(String,null),a.null),t("Position").field("line",o(1)).field("column",o(0)),t("File").bases("Node").build("program","name").field("program",t("Program")).field("name",r(String,null),a.null),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",r(t("Identifier"),null),a.null).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("generator",Boolean,a.false).field("async",Boolean,a.false),t("Statement").bases("Node"),t("EmptyStatement").bases("Statement").build(),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]),t("ExpressionStatement").bases("Statement").build("expression").field("expression",t("Expression")),t("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Statement")).field("alternate",r(t("Statement"),null),a.null),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.null),t("ContinueStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.null),t("WithStatement").bases("Statement").build("object","body").field("object",t("Expression")).field("body",t("Statement")),t("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",t("Expression")).field("cases",[t("SwitchCase")]).field("lexical",Boolean,a.false),t("ReturnStatement").bases("Statement").build("argument").field("argument",r(t("Expression"),null)),t("ThrowStatement").bases("Statement").build("argument").field("argument",t("Expression")),t("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",t("BlockStatement")).field("handler",r(t("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[t("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[t("CatchClause")],a.emptyArray).field("finalizer",r(t("BlockStatement"),null),a.null),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",r(t("Expression"),null),a.null).field("body",t("BlockStatement")),t("WhileStatement").bases("Statement").build("test","body").field("test",t("Expression")).field("body",t("Statement")),t("DoWhileStatement").bases("Statement").build("body","test").field("body",t("Statement")).field("test",t("Expression")),t("ForStatement").bases("Statement").build("init","test","update","body").field("init",r(t("VariableDeclaration"),t("Expression"),null)).field("test",r(t("Expression"),null)).field("update",r(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body").field("left",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("DebuggerStatement").bases("Statement").build(),t("Declaration").bases("Statement"),t("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",t("Identifier")),t("FunctionExpression").bases("Function","Expression").build("id","params","body"),t("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",r("var","let","const")).field("declarations",[t("VariableDeclarator")]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",r(t("Expression"),null),a.null),t("Expression").bases("Node"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",r("init","get","set")).field("key",r(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var h=r("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",h).field("argument",t("Expression")).field("prefix",Boolean,a.true);let f=r(...l);t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",t("Expression")).field("right",t("Expression"));let d=r(...c);t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",r(t("Pattern"),t("MemberExpression"))).field("right",t("Expression"));var p=r("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",t("Expression")).field("prefix",Boolean);var g=r(...u);t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",t("Expression")).field("right",t("Expression")),t("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Expression")).field("alternate",t("Expression")),t("NewExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("CallExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("MemberExpression").bases("Expression").build("object","property","computed").field("object",t("Expression")).field("property",r(t("Identifier"),t("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),t("Pattern").bases("Node"),t("SwitchCase").bases("Node").build("test","consequent").field("test",r(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,a.false),t("Literal").bases("Expression").build("value").field("value",r(String,Boolean,null,Number,RegExp,BigInt)),t("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}q(()=>module);function kl(i){i.use(Nl);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("Function").field("generator",Boolean,r.false).field("expression",Boolean,r.false).field("defaults",[t(e("Expression"),null)],r.emptyArray).field("rest",t(e("Identifier"),null),r.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),r.null),e("SpreadElementPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("FunctionDeclaration").build("id","params","body","generator","expression").field("id",t(e("Identifier"),null)),e("FunctionExpression").build("id","params","body","generator","expression"),e("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,r.null).field("body",t(e("BlockStatement"),e("Expression"))).field("generator",!1,r.false),e("ForOfStatement").bases("Statement").build("left","right","body").field("left",t(e("VariableDeclaration"),e("Pattern"))).field("right",e("Expression")).field("body",e("Statement")),e("YieldExpression").bases("Expression").build("argument","delegate").field("argument",t(e("Expression"),null)).field("delegate",Boolean,r.false),e("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionBlock").bases("Node").build("left","right","each").field("left",e("Pattern")).field("right",e("Expression")).field("each",Boolean),e("Property").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("value",t(e("Expression"),e("Pattern"))).field("method",Boolean,r.false).field("shorthand",Boolean,r.false).field("computed",Boolean,r.false),e("ObjectProperty").field("shorthand",Boolean,r.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,r.false),e("ObjectPattern").bases("Pattern").build("properties").field("properties",[t(e("PropertyPattern"),e("Property"))]),e("ArrayPattern").bases("Pattern").build("elements").field("elements",[t(e("Pattern"),null)]),e("SpreadElement").bases("Node").build("argument").field("argument",e("Expression")),e("ArrayExpression").field("elements",[t(e("Expression"),e("SpreadElement"),e("RestElement"),null)]),e("NewExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("CallExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("AssignmentPattern").bases("Pattern").build("left","right").field("left",e("Pattern")).field("right",e("Expression")),e("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",t("constructor","method","get","set")).field("key",e("Expression")).field("value",e("Function")).field("computed",Boolean,r.false).field("static",Boolean,r.false);let n=t(e("MethodDefinition"),e("VariableDeclarator"),e("ClassPropertyDefinition"),e("ClassProperty"),e("StaticBlock"));e("ClassProperty").bases("Declaration").build("key").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("computed",Boolean,r.false),e("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",n),e("ClassBody").bases("Declaration").build("body").field("body",[n]),e("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",t(e("Identifier"),null)).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),r.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(e("Identifier"),null),r.null).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),r.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",t(e("Identifier"),null),r.null).field("id",t(e("Identifier"),null),r.null).field("name",t(e("Identifier"),null),r.null),e("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",e("Identifier")),e("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),e("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),e("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[t(e("ImportSpecifier"),e("ImportNamespaceSpecifier"),e("ImportDefaultSpecifier"))],r.emptyArray).field("source",e("Literal")).field("importKind",t("value","type"),function(){return"value"}),e("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",t(e("Declaration"),null)).field("specifiers",[e("ExportSpecifier")],r.emptyArray).field("source",t(e("Literal"),null),r.null),e("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",e("Identifier")),e("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",t(e("Declaration"),e("Expression"))),e("ExportAllDeclaration").bases("Declaration").build("source").field("source",e("Literal")),e("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",e("Expression")).field("quasi",e("TemplateLiteral")),e("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[e("TemplateElement")]).field("expressions",[e("Expression")]),e("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),e("MetaProperty").bases("Expression").build("meta","property").field("meta",e("Identifier")).field("property",e("Identifier"))}q(()=>module);function Ll(i){i.use(Nn),i.use(kl)}q(()=>module);function Dl(i){i.use(Ll);let e=i.use(Q).Type.def,t=i.use(me).defaults;e("Function").field("async",Boolean,t.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}q(()=>module);function Ol(i){i.use(Dl);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("ForOfStatement").field("await",Boolean,r.false),e("SpreadProperty").bases("Node").build("argument").field("argument",e("Expression")),e("ObjectExpression").field("properties",[t(e("Property"),e("SpreadProperty"),e("SpreadElement"))]),e("TemplateElement").field("value",{cooked:t(String,null),raw:String}),e("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("ObjectPattern").field("properties",[t(e("PropertyPattern"),e("Property"),e("RestElement"),e("SpreadPropertyPattern"))])}q(()=>module);function Ml(i){i.use(Ol);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("CatchClause").field("param",t(e("Pattern"),null),r.null)}q(()=>module);function Fl(i){i.use(kn),i.use(Ml);let s=i.use(Q),e=s.Type.def,t=s.Type.or,n=i.use(me).defaults;e("ImportExpression").bases("Expression").build("source").field("source",e("Expression")),e("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",e("Literal")).field("exported",t(e("Identifier"),null,void 0),n.null),e("ChainElement").bases("Node").field("optional",Boolean,n.false),e("CallExpression").bases("Expression","ChainElement"),e("MemberExpression").bases("Expression","ChainElement"),e("ChainExpression").bases("Expression").build("expression").field("expression",e("ChainElement")),e("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,n.true),e("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,n.true)}q(()=>module);function Bl(i){i.use(Il),i.use(Fl)}q(()=>module);function _l(i){i.use(Bl);let e=i.use(Q).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}q(()=>module);function Kt(i){i.use(_l);let s=i.use(Q),e=s.Type,t=s.Type.def,r=e.or,a=i.use(me).defaults;t("AwaitExpression").build("argument","all").field("argument",r(t("Expression"),null)).field("all",Boolean,a.false),t("Decorator").bases("Node").build("expression").field("expression",t("Expression")),t("Property").field("decorators",r([t("Decorator")],null),a.null),t("MethodDefinition").field("decorators",r([t("Decorator")],null),a.null),t("PrivateName").bases("Expression","Pattern").build("id").field("id",t("Identifier")),t("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",t("PrivateName")).field("value",r(t("Expression"),null),a.null),t("ImportAttribute").bases("Node").build("key","value").field("key",r(t("Identifier"),t("Literal"))).field("value",t("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(o=>{t(o).field("assertions",[t("ImportAttribute")],a.emptyArray)}),t("RecordExpression").bases("Expression").build("properties").field("properties",[r(t("ObjectProperty"),t("ObjectMethod"),t("SpreadElement"))]),t("TupleExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),t("SpreadElement"),null)]),t("ModuleExpression").bases("Node").build("body").field("body",t("Program"))}q(()=>module);function jl(i){i.use(Kt);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("JSXAttribute").bases("Node").build("name","value").field("name",t(e("JSXIdentifier"),e("JSXNamespacedName"))).field("value",t(e("Literal"),e("JSXExpressionContainer"),e("JSXElement"),e("JSXFragment"),null),r.null),e("JSXIdentifier").bases("Identifier").build("name").field("name",String),e("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",e("JSXIdentifier")).field("name",e("JSXIdentifier")),e("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",t(e("JSXIdentifier"),e("JSXMemberExpression"))).field("property",e("JSXIdentifier")).field("computed",Boolean,r.false);let n=t(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let a=[t(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",t(e("Expression"),e("JSXEmptyExpression")));let o=[t(e("JSXText"),e("JSXExpressionContainer"),e("JSXSpreadChild"),e("JSXElement"),e("JSXFragment"),e("Literal"))];e("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",e("JSXOpeningElement")).field("closingElement",t(e("JSXClosingElement"),null),r.null).field("children",o,r.emptyArray).field("name",n,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",a,function(){return this.openingElement.attributes},!0),e("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",n).field("attributes",a,r.emptyArray).field("selfClosing",Boolean,r.false),e("JSXClosingElement").bases("Node").build("name").field("name",n),e("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",e("JSXOpeningFragment")).field("closingFragment",e("JSXClosingFragment")).field("children",o,r.emptyArray),e("JSXOpeningFragment").bases("Node").build(),e("JSXClosingFragment").bases("Node").build(),e("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),e("JSXEmptyExpression").bases("Node").build(),e("JSXSpreadChild").bases("Node").build("expression").field("expression",e("Expression"))}q(()=>module);function Ln(i){var s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults,n=t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),a=t(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",n,r.null),e("ObjectPattern").field("typeAnnotation",n,r.null),e("Function").field("returnType",n,r.null).field("typeParameters",a,r.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",t(e("Expression"),null)).field("static",Boolean,r.false).field("typeAnnotation",n,r.null),["ClassDeclaration","ClassExpression"].forEach(o=>{e(o).field("typeParameters",a,r.null).field("superTypeParameters",t(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),r.null).field("implements",t([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),r.emptyArray)})}q(()=>module);function Dn(i){i.use(Kt),i.use(Ln);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("Flow").bases("Node"),e("FlowType").bases("Flow"),e("AnyTypeAnnotation").bases("FlowType").build(),e("EmptyTypeAnnotation").bases("FlowType").build(),e("MixedTypeAnnotation").bases("FlowType").build(),e("VoidTypeAnnotation").bases("FlowType").build(),e("SymbolTypeAnnotation").bases("FlowType").build(),e("NumberTypeAnnotation").bases("FlowType").build(),e("BigIntTypeAnnotation").bases("FlowType").build(),e("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),e("StringTypeAnnotation").bases("FlowType").build(),e("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),e("BooleanTypeAnnotation").bases("FlowType").build(),e("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),e("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullLiteralTypeAnnotation").bases("FlowType").build(),e("NullTypeAnnotation").bases("FlowType").build(),e("ThisTypeAnnotation").bases("FlowType").build(),e("ExistsTypeAnnotation").bases("FlowType").build(),e("ExistentialTypeParam").bases("FlowType").build(),e("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[e("FunctionTypeParam")]).field("returnType",e("FlowType")).field("rest",t(e("FunctionTypeParam"),null)).field("typeParameters",t(e("TypeParameterDeclaration"),null)),e("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",t(e("Identifier"),null)).field("typeAnnotation",e("FlowType")).field("optional",Boolean),e("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",e("FlowType")),e("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[t(e("ObjectTypeProperty"),e("ObjectTypeSpreadProperty"))]).field("indexers",[e("ObjectTypeIndexer")],r.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],r.emptyArray).field("inexact",t(Boolean,void 0),r.undefined).field("exact",Boolean,r.false).field("internalSlots",[e("ObjectTypeInternalSlot")],r.emptyArray),e("Variance").bases("Node").build("kind").field("kind",t("plus","minus"));let n=t(e("Variance"),"plus","minus",null);e("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",t(e("Literal"),e("Identifier"))).field("value",e("FlowType")).field("optional",Boolean).field("variance",n,r.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",n,r.null).field("static",Boolean,r.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,r.false),e("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("id",e("Identifier")),e("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("typeParameters",t(e("TypeParameterInstantiation"),null)),e("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",e("Identifier")).field("property",t(e("MemberTypeAnnotation"),e("GenericTypeAnnotation"))),e("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",e("FlowType")).field("indexType",e("FlowType")),e("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",e("FlowType")).field("indexType",e("FlowType")).field("optional",Boolean),e("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",e("FlowType")),e("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",e("FlowType")),e("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",e("Identifier")).field("value",e("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),e("TypeParameterDeclaration").bases("Node").build("params").field("params",[e("TypeParameter")]),e("TypeParameterInstantiation").bases("Node").build("params").field("params",[e("FlowType")]),e("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",n,r.null).field("bound",t(e("TypeAnnotation"),null),r.null).field("default",t(e("FlowType"),null),r.null),e("ClassProperty").field("variance",n,r.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",t(e("Expression"),null),r.null).field("typeParameters",t(e("TypeParameterInstantiation"),null),r.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",t([e("InterfaceExtends")],null),r.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null),r.null).field("body",e("ObjectTypeAnnotation")).field("extends",[e("InterfaceExtends")]),e("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),e("InterfaceExtends").bases("Node").build("id").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterInstantiation"),null),r.null),e("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("right",e("FlowType")),e("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),e("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("impltype",e("FlowType")).field("supertype",t(e("FlowType"),null)),e("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",t(e("FlowType"),null)),e("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",e("Expression")).field("typeAnnotation",e("TypeAnnotation")),e("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("DeclareVariable").bases("Statement").build("id").field("id",e("Identifier")),e("DeclareFunction").bases("Statement").build("id").field("id",e("Identifier")).field("predicate",t(e("FlowPredicate"),null),r.null),e("DeclareClass").bases("InterfaceDeclaration").build("id"),e("DeclareModule").bases("Statement").build("id","body").field("id",t(e("Identifier"),e("Literal"))).field("body",e("BlockStatement")),e("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",e("TypeAnnotation")),e("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",t(e("DeclareVariable"),e("DeclareFunction"),e("DeclareClass"),e("FlowType"),e("TypeAlias"),e("DeclareOpaqueType"),e("InterfaceDeclaration"),null)).field("specifiers",[t(e("ExportSpecifier"),e("ExportBatchSpecifier"))],r.emptyArray).field("source",t(e("Literal"),null),r.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",t(e("Literal"),null),r.null),e("ImportDeclaration").field("importKind",t("value","type","typeof"),()=>"value"),e("FlowPredicate").bases("Flow"),e("InferredPredicate").bases("FlowPredicate").build(),e("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",e("Expression")),e("Function").field("predicate",t(e("FlowPredicate"),null),r.null),e("CallExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.null),e("NewExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.null),e("EnumDeclaration").bases("Declaration").build("id","body").field("id",e("Identifier")).field("body",t(e("EnumBooleanBody"),e("EnumNumberBody"),e("EnumStringBody"),e("EnumSymbolBody"))),e("EnumBooleanBody").build("members","explicitType").field("members",[e("EnumBooleanMember")]).field("explicitType",Boolean),e("EnumNumberBody").build("members","explicitType").field("members",[e("EnumNumberMember")]).field("explicitType",Boolean),e("EnumStringBody").build("members","explicitType").field("members",t([e("EnumStringMember")],[e("EnumDefaultedMember")])).field("explicitType",Boolean),e("EnumSymbolBody").build("members").field("members",[e("EnumDefaultedMember")]),e("EnumBooleanMember").build("id","init").field("id",e("Identifier")).field("init",t(e("Literal"),Boolean)),e("EnumNumberMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumStringMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumDefaultedMember").build("id").field("id",e("Identifier"))}q(()=>module);function Rl(i){i.use(Kt);var s=i.use(Q),e=i.use(me).defaults,t=s.Type.def,r=s.Type.or;t("VariableDeclaration").field("declarations",[r(t("VariableDeclarator"),t("Identifier"))]),t("Property").field("value",r(t("Expression"),t("Pattern"))),t("ArrayPattern").field("elements",[r(t("Pattern"),t("SpreadElement"),null)]),t("ObjectPattern").field("properties",[r(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"))]),t("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),t("ExportBatchSpecifier").bases("Specifier").build(),t("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",r(t("Declaration"),t("Expression"),null)).field("specifiers",[r(t("ExportSpecifier"),t("ExportBatchSpecifier"))],e.emptyArray).field("source",r(t("Literal"),null),e.null),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")}q(()=>module);function On(i){i.use(Kt);let s=i.use(Q),e=i.use(me).defaults,t=s.Type.def,r=s.Type.or,{undefined:n}=s.builtInTypes;t("Noop").bases("Statement").build(),t("DoExpression").bases("Expression").build("body").field("body",[t("Statement")]),t("BindExpression").bases("Expression").build("object","callee").field("object",r(t("Expression"),null)).field("callee",t("Expression")),t("ParenthesizedExpression").bases("Expression").build("expression").field("expression",t("Expression")),t("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("CommentBlock").bases("Comment").build("value","leading","trailing"),t("CommentLine").bases("Comment").build("value","leading","trailing"),t("Directive").bases("Node").build("value").field("value",t("DirectiveLiteral")),t("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,e["use strict"]),t("InterpreterDirective").bases("Node").build("value").field("value",String),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray),t("Program").bases("Node").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray).field("interpreter",r(t("InterpreterDirective"),null),e.null);function a(u=String,h){return["extra",{rawValue:u,raw:String},function(){let d=s.getFieldValue(this,"value");return{rawValue:d,raw:h?h(d):String(d)}}]}t("StringLiteral").bases("Literal").build("value").field("value",String).field(...a(String,u=>JSON.stringify(u))),t("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",r(String,null),e.null).field(...a(Number)),t("BigIntLiteral").bases("Literal").build("value").field("value",r(String,Number)).field(...a(String,u=>u+"n")),t("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...a(String,u=>u+"m")),t("NullLiteral").bases("Literal").build().field("value",null,e.null),t("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),t("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...a(r(RegExp,n),u=>`/${u.pattern}/${u.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var o=r(t("Property"),t("ObjectMethod"),t("ObjectProperty"),t("SpreadProperty"),t("SpreadElement"));t("ObjectExpression").bases("Expression").build("properties").field("properties",[o]),t("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",r("method","get","set")).field("key",r(t("Literal"),t("Identifier"),t("Expression"))).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("computed",Boolean,e.false).field("generator",Boolean,e.false).field("async",Boolean,e.false).field("accessibility",r(t("Literal"),null),e.null).field("decorators",r([t("Decorator")],null),e.null),t("ObjectProperty").bases("Node").build("key","value").field("key",r(t("Literal"),t("Identifier"),t("Expression"))).field("value",r(t("Expression"),t("Pattern"))).field("accessibility",r(t("Literal"),null),e.null).field("computed",Boolean,e.false);var l=r(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("ClassAccessorProperty"),t("StaticBlock"));t("ClassBody").bases("Declaration").build("body").field("body",[l]),t("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",r(t("Literal"),t("Identifier"),t("Expression"))),t("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",t("PrivateName")),t("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",r(t("Literal"),t("Identifier"),t("PrivateName"),t("Expression"))).field("value",r(t("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(u=>{t(u).field("kind",r("get","set","method","constructor"),()=>"method").field("body",t("BlockStatement")).field("access",r("public","private","protected",null),e.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(u=>{t(u).field("computed",Boolean,e.false).field("static",Boolean,e.false).field("abstract",Boolean,e.false).field("accessibility",r("public","private","protected",null),e.null).field("decorators",r([t("Decorator")],null),e.null).field("definite",Boolean,e.false).field("optional",Boolean,e.false).field("override",Boolean,e.false).field("readonly",Boolean,e.false)});var c=r(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"),t("ObjectProperty"),t("RestProperty"),t("RestElement"));t("ObjectPattern").bases("Pattern").build("properties").field("properties",[c]).field("decorators",r([t("Decorator")],null),e.null),t("SpreadProperty").bases("Node").build("argument").field("argument",t("Expression")),t("RestProperty").bases("Node").build("argument").field("argument",t("Expression")),t("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("Import").bases("Expression").build()}q(()=>module);function Ul(i){let e=i.use(Q).Type.def;i.use(On),i.use(Dn),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}q(()=>module);function Vl(i){i.use(On),i.use(Ln);var s=i.use(Q),e=s.namedTypes,t=s.Type.def,r=s.Type.or,n=i.use(me).defaults,a=s.Type.from(function(u,h){return!!(e.StringLiteral&&e.StringLiteral.check(u,h)||e.Literal&&e.Literal.check(u,h)&&typeof u.value=="string")},"StringLiteral");t("TSType").bases("Node");var o=r(t("Identifier"),t("TSQualifiedName"));t("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",o),t("TSHasOptionalTypeParameterInstantiation").field("typeParameters",r(t("TSTypeParameterInstantiation"),null),n.null),t("TSHasOptionalTypeParameters").field("typeParameters",r(t("TSTypeParameterDeclaration"),null,void 0),n.null),t("TSHasOptionalTypeAnnotation").field("typeAnnotation",r(t("TSTypeAnnotation"),null),n.null),t("TSQualifiedName").bases("Node").build("left","right").field("left",o).field("right",o),t("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")).field("extra",r({parenthesized:Boolean},null),n.null),t("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",t("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(u=>{t(u).bases("TSType").build()}),t("TSArrayType").bases("TSType").build("elementType").field("elementType",t("TSType")),t("TSLiteralType").bases("TSType").build("literal").field("literal",r(t("NumericLiteral"),t("StringLiteral"),t("BooleanLiteral"),t("TemplateLiteral"),t("UnaryExpression"),t("BigIntLiteral"))),t("TemplateLiteral").field("expressions",r([t("Expression")],[t("TSType")])),["TSUnionType","TSIntersectionType"].forEach(u=>{t(u).bases("TSType").build("types").field("types",[t("TSType")])}),t("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",t("TSType")).field("extendsType",t("TSType")).field("trueType",t("TSType")).field("falseType",t("TSType")),t("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",t("TSTypeParameter")),t("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType"));var l=[r(t("Identifier"),t("RestElement"),t("ArrayPattern"),t("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(u=>{t(u).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",l)}),t("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,n.false).field("async",Boolean,n.false).field("generator",Boolean,n.false).field("id",r(t("Identifier"),null),n.null).field("params",[t("Pattern")]).field("returnType",r(t("TSTypeAnnotation"),t("Noop"),null),n.null),t("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,n.false).field("generator",Boolean,n.false).field("params",[t("Pattern")]).field("abstract",Boolean,n.false).field("accessibility",r("public","private","protected",void 0),n.undefined).field("static",Boolean,n.false).field("computed",Boolean,n.false).field("optional",Boolean,n.false).field("key",r(t("Identifier"),t("StringLiteral"),t("NumericLiteral"),t("Expression"))).field("kind",r("get","set","method","constructor"),function(){return"method"}).field("access",r("public","private","protected",void 0),n.undefined).field("decorators",r([t("Decorator")],null),n.null).field("returnType",r(t("TSTypeAnnotation"),t("Noop"),null),n.null),t("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",r(Boolean,"+","-"),n.false).field("typeParameter",t("TSTypeParameter")).field("optional",r(Boolean,"+","-"),n.false).field("typeAnnotation",r(t("TSType"),null),n.null),t("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[r(t("TSType"),t("TSNamedTupleMember"))]),t("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",t("Identifier")).field("optional",Boolean,n.false).field("elementType",t("TSType")),t("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",t("TSType")).field("indexType",t("TSType")),t("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",t("TSType")),t("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r(t("TSType"),t("TSTypeAnnotation"))),t("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[t("Identifier")]).field("readonly",Boolean,n.false),t("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",t("Expression")).field("computed",Boolean,n.false).field("readonly",Boolean,n.false).field("optional",Boolean,n.false).field("initializer",r(t("Expression"),null),n.null),t("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",t("Expression")).field("computed",Boolean,n.false).field("optional",Boolean,n.false).field("parameters",l),t("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",r(t("Identifier"),t("TSThisType"))).field("typeAnnotation",r(t("TSTypeAnnotation"),null),n.null).field("asserts",Boolean,n.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(u=>{t(u).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",l)}),t("TSEnumMember").bases("Node").build("id","initializer").field("id",r(t("Identifier"),a)).field("initializer",r(t("Expression"),null),n.null),t("TSTypeQuery").bases("TSType").build("exprName").field("exprName",r(o,t("TSImportType")));var c=r(t("TSCallSignatureDeclaration"),t("TSConstructSignatureDeclaration"),t("TSIndexSignature"),t("TSMethodSignature"),t("TSPropertySignature"));t("TSTypeLiteral").bases("TSType").build("members").field("members",[c]),t("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",r(t("Identifier"),String)).field("constraint",r(t("TSType"),void 0),n.undefined).field("default",r(t("TSType"),void 0),n.undefined),t("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",t("TSType")).field("expression",t("Expression")).field("extra",r({parenthesized:Boolean},null),n.null),t("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[t("TSTypeParameter")]),t("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",t("Expression")),t("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[t("TSType")]),t("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",t("Identifier")).field("const",Boolean,n.false).field("declare",Boolean,n.false).field("members",[t("TSEnumMember")]).field("initializer",r(t("Expression"),null),n.null),t("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",t("Identifier")).field("declare",Boolean,n.false).field("typeAnnotation",t("TSType")),t("TSModuleBlock").bases("Node").build("body").field("body",[t("Statement")]),t("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",r(a,o)).field("declare",Boolean,n.false).field("global",Boolean,n.false).field("body",r(t("TSModuleBlock"),t("TSModuleDeclaration"),null),n.null),t("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",a).field("qualifier",r(o,void 0),n.undefined),t("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",t("Identifier")).field("isExport",Boolean,n.false).field("moduleReference",r(o,t("TSExternalModuleReference"))),t("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",a),t("TSExportAssignment").bases("Statement").build("expression").field("expression",t("Expression")),t("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",t("Identifier")),t("TSInterfaceBody").bases("Node").build("body").field("body",[c]),t("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",o),t("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",o).field("declare",Boolean,n.false).field("extends",r([t("TSExpressionWithTypeArguments")],null),n.null).field("body",t("TSInterfaceBody")),t("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",r("public","private","protected",void 0),n.undefined).field("readonly",Boolean,n.false).field("parameter",r(t("Identifier"),t("AssignmentPattern"))),t("ClassProperty").field("access",r("public","private","protected",void 0),n.undefined),t("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),t("ClassBody").field("body",[r(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassAccessorProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("StaticBlock"),t("TSDeclareMethod"),c)])}q(()=>module);var Ee;Ee||(Ee={});var{astNodesAreEquivalent:Du,builders:bt,builtInTypes:Ae,defineMethod:Ou,eachField:Mu,finalize:Fu,getBuilderName:Bu,getFieldNames:$l,getFieldValue:je,getSupertypeNames:_u,namedTypes:ql,NodePath:zl,Path:ju,PathVisitor:Ru,someField:Wl,Type:Uu,use:Vu,visit:$u}=vl([Kt,jl,Dn,Rl,Ul,Vl]);Object.assign(Ee,ql);var ps=Ee,un=Cs.default.SourceMapConsumer,Jl=Cs.default.SourceMapGenerator,Mn=Object.prototype.hasOwnProperty;function Kl(){return`
10
+ `),s.destroy();this.connections.clear(),this.stopHealthMonitoring()}startHealthMonitoring(){this.healthCheckInterval||(this.healthCheckInterval=setInterval(()=>{this.performHealthCheck()},this.HEALTH_CHECK_INTERVAL_MS))}stopHealthMonitoring(){this.healthCheckInterval&&(clearInterval(this.healthCheckInterval),this.healthCheckInterval=null)}performHealthCheck(){let s=[];for(let e of this.connections)if(e.destroyed||!e.writable){s.push(e);continue}for(let e of s){this.removeConnection(e);try{e.destroy()}catch{}}}};var ue=require("node:fs/promises"),la=require("node:crypto"),K=require("node:fs"),Ls=require("node:os"),R=Re(require("node:path"),1),ca=Re(require("typescript"),1),ua=Re(require("launch-editor"),1);async function Zr(i,s){let e=i.resolve("/");for(let t=0;t<20;t++){let r=i.join(s,"package.json"),n=await i.readFile(r);if(n)return JSON.parse(n);if(s===e)break;s=i.dirname(s)}return null}var si=Re(ti(),1);function ri(){try{let i=(0,si.default)();if(i?.name)return i.name}catch{}return"npm"}async function ni(i){let s=[],e=await Zr(i,i.getRepoRootDir());if(e){let t=await Na(e,i);s.push(...t)}return s}async function Na(i,s){let e=[];if(i&&typeof i=="object"){let t=new Set(Object.keys({...i.dependencies,...i.devDependencies}));for(let r of ka)if(t.has(r)&&!e.some(n=>n.name===r)){let n={name:r};ii.has(r)&&(n.version=await ii.get(r)(s)),e.push(n)}}return e}function Fs(i){let s=parseInt(i);return Number.isNaN(s)?void 0:s}var ii=new Map([["next",async i=>{if(!i.spawnSync)return;let s=ri(),e=s==="npm"?"npx":s,{stdout:t}=i.spawnSync(e,["next","-v"],{encoding:"utf8"});if(!t)return;let r=t.match(/(Next.js v)([\d.]+)/g);if(!r)return;let n=r[0].split("Next.js v")[1],[a,o,l]=n.split(".");return{major:Fs(a),minor:Fs(o),patch:Fs(l)}}]]),ka=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"];var Ze=require("node:child_process");var Hr={};Qr(Hr,{MagicastError:()=>re,builders:()=>Xc,detectCodeFormat:()=>ia,generateCode:()=>Kr,loadFile:()=>Kc,parseExpression:()=>aa,parseModule:()=>na,writeFile:()=>Hc});var bs=require("node:fs");var Cs=Re(Li(),1),An=Re(cn(),1);function me(i){var s=i.use(Q),e=s.Type,t=s.builtInTypes,r=t.number;function n(c){return e.from(u=>r.check(u)&&u>=c,r+" >= "+c)}let a={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var o=e.or(t.string,t.number,t.boolean,t.null,t.undefined);let l=e.from(c=>{if(c===null)return!0;var u=typeof c;return!(u==="object"||u==="function")},o.toString());return{geq:n,defaults:a,isPrimitive:l}}function q(i){try{var s=i(),e=s.exports,t=e.default}catch{return}t&&t!==e&&typeof e=="object"&&(Object.assign(t,e,{default:t}),e.__esModule&&Object.defineProperty(t,"__esModule",{value:!0}),s.exports=t)}var Tl=Object.defineProperty,Pl=(i,s,e)=>s in i?Tl(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,oe=(i,s,e)=>(Pl(i,typeof s!="symbol"?s+"":s,e),e),wn=Object.prototype,Ts=wn.toString,xe=wn.hasOwnProperty,Ye=class{assert(s,e){if(!this.check(s,e)){var t=$r(s);throw new Error(t+" does not match type "+this)}return!0}arrayOf(){let s=this;return new qt(s)}},qt=class extends Ye{constructor(s){super(),this.elemType=s,oe(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(s,e){return Array.isArray(s)&&s.every(t=>this.elemType.check(t,e))}},Ps=class extends Ye{constructor(s){super(),this.value=s,oe(this,"kind","IdentityType")}toString(){return String(this.value)}check(s,e){let t=s===this.value;return!t&&typeof e=="function"&&e(this,s),t}},Ss=class extends Ye{constructor(s){super(),this.fields=s,oe(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(s,e){return Ts.call(s)===Ts.call({})&&this.fields.every(t=>t.type.check(s[t.name],e))}},Es=class extends Ye{constructor(s){super(),this.types=s,oe(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(s,e){return this.types.some(t=>t.check(s,!!e))?!0:(typeof e=="function"&&e(this,s),!1)}},Qe=class extends Ye{constructor(s,e){super(),this.name=s,this.predicate=e,oe(this,"kind","PredicateType")}toString(){return this.name}check(s,e){let t=this.predicate(s,e);return!t&&typeof e=="function"&&e(this,s),t}},Vt=class i{constructor(s,e){this.type=s,this.typeName=e,oe(this,"baseNames",[]),oe(this,"ownFields",Object.create(null)),oe(this,"allSupertypes",Object.create(null)),oe(this,"supertypeList",[]),oe(this,"allFields",Object.create(null)),oe(this,"fieldNames",[]),oe(this,"finalized",!1),oe(this,"buildable",!1),oe(this,"buildParams",[])}isSupertypeOf(s){if(s instanceof i){if(this.finalized!==!0||s.finalized!==!0)throw new Error("");return xe.call(s.allSupertypes,this.typeName)}else throw new Error(s+" is not a Def")}checkAllFields(s,e){var t=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function r(n){var a=t[n],o=a.type,l=a.getValue(s);return o.check(l,e)}return s!==null&&typeof s=="object"&&Object.keys(t).every(r)}bases(...s){var e=this.baseNames;if(this.finalized){if(s.length!==e.length)throw new Error("");for(var t=0;t<s.length;t++)if(s[t]!==e[t])throw new Error("");return this}return s.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),this}},As=class{constructor(s,e,t,r){this.name=s,this.type=e,this.defaultFn=t,oe(this,"hidden"),this.hidden=!!r}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(s){var e=s[this.name];return typeof e<"u"||typeof this.defaultFn=="function"&&(e=this.defaultFn.call(s)),e}};function $r(i){return Array.isArray(i)?"["+i.map($r).join(", ")+"]":i&&typeof i=="object"?"{ "+Object.keys(i).map(function(s){return s+": "+i[s]}).join(", ")+" }":JSON.stringify(i)}function Q(i){let s={or(...w){return new Es(w.map(v=>s.from(v)))},from(w,v){if(w instanceof qt||w instanceof Ps||w instanceof Ss||w instanceof Es||w instanceof Qe)return w;if(w instanceof Vt)return w.type;if(o.check(w)){if(w.length!==1)throw new Error("only one element type is permitted for typed arrays");return new qt(s.from(w[0]))}if(l.check(w))return new Ss(Object.keys(w).map(F=>new As(F,s.from(w[F],F))));if(typeof w=="function"){var M=e.indexOf(w);if(M>=0)return t[M];if(typeof v!="string")throw new Error("missing name");return new Qe(v,w)}return new Ps(w)},def(w){return xe.call(b,w)?b[w]:b[w]=new k(w)},hasDef(w){return xe.call(b,w)}};var e=[],t=[];function r(w,v){let M=Ts.call(v),F=new Qe(w,z=>Ts.call(z)===M);return v&&typeof v.constructor=="function"&&(e.push(v.constructor),t.push(F)),F}let n=r("string","truthy"),a=r("function",function(){}),o=r("array",[]),l=r("object",{}),c=r("RegExp",/./),u=r("Date",new Date),h=r("number",3),f=r("boolean",!0),d=r("null",null),p=r("undefined",void 0),g=typeof BigInt=="function"?r("BigInt",BigInt(1234)):new Qe("BigInt",()=>!1),y={string:n,function:a,array:o,object:l,RegExp:c,Date:u,number:h,boolean:f,null:d,undefined:p,BigInt:g};var b=Object.create(null);function P(w){if(w&&typeof w=="object"){var v=w.type;if(typeof v=="string"&&xe.call(b,v)){var M=b[v];if(M.finalized)return M}}return null}class k extends Vt{constructor(v){super(new Qe(v,(M,F)=>this.check(M,F)),v)}check(v,M){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(v===null||typeof v!="object")return!1;var F=P(v);return F?M&&F===this?this.checkAllFields(v,M):this.isSupertypeOf(F)?M?F.checkAllFields(v,M)&&this.checkAllFields(v,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(v,M):!1}build(...v){if(this.buildParams=v,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let M=(z,J,G,ye)=>{if(!xe.call(z,J)){var ke=this.allFields;if(!xe.call(ke,J))throw new Error(""+J);var Ht=ke[J],xa=Ht.type,Tt;if(ye)Tt=G;else if(Ht.defaultFn)Tt=Ht.defaultFn.call(z);else{var ba="no value or default function given for field "+JSON.stringify(J)+" of "+this.typeName+"("+this.buildParams.map(function(Ta){return ke[Ta]}).join(", ")+")";throw new Error(ba)}if(!xa.check(Tt))throw new Error($r(Tt)+" does not match field "+Ht+" of type "+this.typeName);z[J]=Tt}},F=(...z)=>{var J=z.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var G=Object.create(L);if(this.buildParams.forEach(function(ye,ke){ke<J?M(G,ye,z[ke],!0):M(G,ye,null,!1)}),Object.keys(this.allFields).forEach(function(ye){M(G,ye,null,!1)}),G.type!==this.typeName)throw new Error("");return G};return F.from=z=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var J=Object.create(L);if(Object.keys(this.allFields).forEach(function(G){xe.call(z,G)?M(J,G,z[G],!0):M(J,G,null,!1)}),J.type!==this.typeName)throw new Error("");return J},Object.defineProperty(A,he(this.typeName),{enumerable:!0,value:F}),this}field(v,M,F,z){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(v)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[v]=new As(v,s.from(M),F,z),this)}finalize(){if(!this.finalized){var v=this.allFields,M=this.allSupertypes;this.baseNames.forEach(z=>{var J=b[z];if(J instanceof Vt)J.finalize(),Ms(v,J.allFields),Ms(M,J.allSupertypes);else{var G="unknown supertype name "+JSON.stringify(z)+" for subtype "+JSON.stringify(this.typeName);throw new Error(G)}}),Ms(v,this.ownFields),M[this.typeName]=this,this.fieldNames.length=0;for(var F in v)xe.call(v,F)&&!v[F].hidden&&this.fieldNames.push(F);Object.defineProperty(Gr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,ya(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&ma(this.typeName)}}}function T(w){if(!xe.call(b,w))throw new Error("");var v=b[w];if(v.finalized!==!0)throw new Error("");return v.supertypeList.slice(1)}function E(w){for(var v={},M=Object.keys(b),F=M.length,z=0;z<F;++z){var J=M[z],G=b[J];if(G.finalized!==!0)throw new Error(""+J);for(var ye=0;ye<G.supertypeList.length;++ye){var ke=G.supertypeList[ye];if(xe.call(w,ke)){v[J]=ke;break}}}return v}var A=Object.create(null),L={};function W(w,v){var M=L[w];return p.check(v)?delete L[w]:(a.assert(v),Object.defineProperty(L,w,{enumerable:!0,configurable:!0,value:v})),M}function he(w){return w.replace(/^[A-Z]+/,function(v){var M=v.length;switch(M){case 0:return"";case 1:return v.toLowerCase();default:return v.slice(0,M-1).toLowerCase()+v.charAt(M-1)}})}function we(w){return w=he(w),w.replace(/(Expression)?$/,"Statement")}var Gr={};function Ds(w){var v=P(w);if(v)return v.fieldNames.slice(0);if("type"in w)throw new Error("did not recognize object of type "+JSON.stringify(w.type));return Object.keys(w)}function Os(w,v){var M=P(w);if(M){var F=M.allFields[v];if(F)return F.getValue(w)}return w&&w[v]}function fa(w,v,M){Ds(w).forEach(function(F){v.call(this,F,Os(w,F))},M)}function da(w,v,M){return Ds(w).some(function(F){return v.call(this,F,Os(w,F))},M)}function ma(w){var v=we(w);if(A[v])return;var M=A[he(w)];if(!M)return;let F=function(...z){return A.expressionStatement(M.apply(A,z))};F.from=function(...z){return A.expressionStatement(M.from.apply(A,z))},A[v]=F}function ya(w,v){v.length=0,v.push(w);for(var M=Object.create(null),F=0;F<v.length;++F){w=v[F];var z=b[w];if(z.finalized!==!0)throw new Error("");xe.call(M,w)&&delete v[M[w]],M[w]=F,v.push.apply(v,z.baseNames)}for(var J=0,G=J,ye=v.length;G<ye;++G)xe.call(v,G)&&(v[J++]=v[G]);v.length=J}function Ms(w,v){return Object.keys(v).forEach(function(M){w[M]=v[M]}),w}function ga(){Object.keys(b).forEach(function(w){b[w].finalize()})}return{Type:s,builtInTypes:y,getSupertypeNames:T,computeSupertypeLookupTable:E,builders:A,defineMethod:W,getBuilderName:he,getStatementBuilderName:we,namedTypes:Gr,getFieldNames:Ds,getFieldValue:Os,eachField:fa,someField:da,finalize:ga}}q(()=>module);var Sl=Object.prototype,us=Sl.hasOwnProperty;function vn(i){var s=i.use(Q),e=s.builtInTypes.array,t=s.builtInTypes.number;let r=function h(f,d,p){if(!(this instanceof h))throw new Error("Path constructor cannot be invoked without 'new'");if(d){if(!(d instanceof h))throw new Error("")}else d=null,p=null;this.value=f,this.parentPath=d,this.name=p,this.__childCache=null};var n=r.prototype;function a(h){return h.__childCache||(h.__childCache=Object.create(null))}function o(h,f){var d=a(h),p=h.getValueProperty(f),g=d[f];return(!us.call(d,f)||g.value!==p)&&(g=d[f]=new h.constructor(p,h,f)),g}n.getValueProperty=function(f){return this.value[f]},n.get=function(...f){for(var d=this,p=f.length,g=0;g<p;++g)d=o(d,f[g]);return d},n.each=function(f,d){for(var p=[],g=this.value.length,y=0,y=0;y<g;++y)us.call(this.value,y)&&(p[y]=this.get(y));for(d=d||this,y=0;y<g;++y)us.call(p,y)&&f.call(d,p[y])},n.map=function(f,d){var p=[];return this.each(function(g){p.push(f.call(this,g))},d),p},n.filter=function(f,d){var p=[];return this.each(function(g){f.call(this,g)&&p.push(g)},d),p};function l(){}function c(h,f,d,p){if(e.assert(h.value),f===0)return l;var g=h.value.length;if(g<1)return l;var y=arguments.length;y===2?(d=0,p=g):y===3?(d=Math.max(d,0),p=g):(d=Math.max(d,0),p=Math.min(p,g)),t.assert(d),t.assert(p);for(var b=Object.create(null),P=a(h),k=d;k<p;++k)if(us.call(h.value,k)){var T=h.get(k);if(T.name!==k)throw new Error("");var E=k+f;T.name=E,b[E]=T,delete P[k]}return delete P.length,function(){for(var A in b){var L=b[A];if(L.name!==+A)throw new Error("");P[A]=L,h.value[A]=L.value}}}n.shift=function(){var f=c(this,-1),d=this.value.shift();return f(),d},n.unshift=function(...f){var d=c(this,f.length),p=this.value.unshift.apply(this.value,f);return d(),p},n.push=function(...f){return e.assert(this.value),delete a(this).length,this.value.push.apply(this.value,f)},n.pop=function(){e.assert(this.value);var f=a(this);return delete f[this.value.length-1],delete f.length,this.value.pop()},n.insertAt=function(f){var d=arguments.length,p=c(this,d-1,f);if(p===l&&d<=1)return this;f=Math.max(f,0);for(var g=1;g<d;++g)this.value[f+g-1]=arguments[g];return p(),this},n.insertBefore=function(...f){for(var d=this.parentPath,p=f.length,g=[this.name],y=0;y<p;++y)g.push(f[y]);return d.insertAt.apply(d,g)},n.insertAfter=function(...f){for(var d=this.parentPath,p=f.length,g=[this.name+1],y=0;y<p;++y)g.push(f[y]);return d.insertAt.apply(d,g)};function u(h){if(!(h instanceof r))throw new Error("");var f=h.parentPath;if(!f)return h;var d=f.value,p=a(f);if(d[h.name]===h.value)p[h.name]=h;else if(e.check(d)){var g=d.indexOf(h.value);g>=0&&(p[h.name=g]=h)}else d[h.name]=h.value,p[h.name]=h;if(d[h.name]!==h.value)throw new Error("");if(h.parentPath.get(h.name)!==h)throw new Error("");return h}return n.replace=function(f){var d=[],p=this.parentPath.value,g=a(this.parentPath),y=arguments.length;if(u(this),e.check(p)){for(var b=p.length,P=c(this.parentPath,y-1,this.name+1),k=[this.name,1],T=0;T<y;++T)k.push(arguments[T]);var E=p.splice.apply(p,k);if(E[0]!==this.value)throw new Error("");if(p.length!==b-1+y)throw new Error("");if(P(),y===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(p[this.name]!==f)throw new Error("");for(this.value!==f&&(this.value=f,this.__childCache=null),T=0;T<y;++T)d.push(this.parentPath.get(this.name+T));if(d[0]!==this)throw new Error("")}}else if(y===1)this.value!==f&&(this.__childCache=null),this.value=p[this.name]=f,d.push(this);else if(y===0)delete p[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return d},r}q(()=>module);var pt=Object.prototype.hasOwnProperty;function El(i){var s=i.use(Q),e=s.Type,t=s.namedTypes,r=t.Node,n=t.Expression,a=s.builtInTypes.array,o=s.builders;let l=function T(E,A){if(!(this instanceof T))throw new Error("Scope constructor cannot be invoked without 'new'");u.check(E.value)||c.assert(E.value);var L;if(A){if(!(A instanceof T))throw new Error("");L=A.depth+1}else A=null,L=0;Object.defineProperties(this,{path:{value:E},node:{value:E.value},isGlobal:{value:!A,enumerable:!0},depth:{value:L},parent:{value:A},bindings:{value:{}},types:{value:{}}})};var c=e.or(t.Program,t.Function,t.CatchClause),u=e.or(t.Function,t.ClassDeclaration,t.ClassExpression,t.InterfaceDeclaration,t.TSInterfaceDeclaration,t.TypeAlias,t.TSTypeAliasDeclaration),h=e.or(t.TypeParameter,t.TSTypeParameter);l.isEstablishedBy=function(T){return c.check(T)||u.check(T)};var f=l.prototype;f.didScan=!1,f.declares=function(T){return this.scan(),pt.call(this.bindings,T)},f.declaresType=function(T){return this.scan(),pt.call(this.types,T)},f.declareTemporary=function(T){if(T){if(!/^[a-z$_]/i.test(T))throw new Error("")}else T="t$";T+=this.depth.toString(36)+"$",this.scan();for(var E=0;this.declares(T+E);)++E;var A=T+E;return this.bindings[A]=s.builders.identifier(A)},f.injectTemporary=function(T,E){T||(T=this.declareTemporary());var A=this.path.get("body");return t.BlockStatement.check(A.value)&&(A=A.get("body")),A.unshift(o.variableDeclaration("var",[o.variableDeclarator(T,E||null)])),T},f.scan=function(T){if(T||!this.didScan){for(var E in this.bindings)delete this.bindings[E];for(var E in this.types)delete this.types[E];d(this.path,this.bindings,this.types),this.didScan=!0}},f.getBindings=function(){return this.scan(),this.bindings},f.getTypes=function(){return this.scan(),this.types};function d(T,E,A){var L=T.value;if(u.check(L)){let W=T.get("typeParameters","params");a.check(W.value)&&W.each(he=>{k(he,A)})}c.check(L)&&(t.CatchClause.check(L)?b(T.get("param"),E):p(T,E,A))}function p(T,E,A){var L=T.value;T.parent&&t.FunctionExpression.check(T.parent.node)&&T.parent.node.id&&b(T.parent.get("id"),E),L&&(a.check(L)?T.each(W=>{y(W,E,A)}):t.Function.check(L)?(T.get("params").each(W=>{b(W,E)}),y(T.get("body"),E,A),p(T.get("typeParameters"),E,A)):t.TypeAlias&&t.TypeAlias.check(L)||t.InterfaceDeclaration&&t.InterfaceDeclaration.check(L)||t.TSTypeAliasDeclaration&&t.TSTypeAliasDeclaration.check(L)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(L)?P(T.get("id"),A):t.VariableDeclarator.check(L)?(b(T.get("id"),E),y(T.get("init"),E,A)):L.type==="ImportSpecifier"||L.type==="ImportNamespaceSpecifier"||L.type==="ImportDefaultSpecifier"?b(T.get(L.local?"local":L.name?"name":"id"),E):r.check(L)&&!n.check(L)&&s.eachField(L,function(W,he){var we=T.get(W);if(!g(we,he))throw new Error("");y(we,E,A)}))}function g(T,E){return!!(T.value===E||Array.isArray(T.value)&&T.value.length===0&&Array.isArray(E)&&E.length===0)}function y(T,E,A){var L=T.value;if(!(!L||n.check(L)))if(t.FunctionDeclaration.check(L)&&L.id!==null)b(T.get("id"),E);else if(t.ClassDeclaration&&t.ClassDeclaration.check(L)&&L.id!==null)b(T.get("id"),E),p(T.get("typeParameters"),E,A);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(L)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(L))P(T.get("id"),A);else if(c.check(L)){if(t.CatchClause.check(L)&&t.Identifier.check(L.param)){var W=L.param.name,he=pt.call(E,W);p(T.get("body"),E,A),he||delete E[W]}}else p(T,E,A)}function b(T,E){var A=T.value;t.Pattern.assert(A),t.Identifier.check(A)?pt.call(E,A.name)?E[A.name].push(T):E[A.name]=[T]:t.AssignmentPattern&&t.AssignmentPattern.check(A)?b(T.get("left"),E):t.ObjectPattern&&t.ObjectPattern.check(A)?T.get("properties").each(function(L){var W=L.value;t.Pattern.check(W)?b(L,E):t.Property.check(W)||t.ObjectProperty&&t.ObjectProperty.check(W)?b(L.get("value"),E):t.SpreadProperty&&t.SpreadProperty.check(W)&&b(L.get("argument"),E)}):t.ArrayPattern&&t.ArrayPattern.check(A)?T.get("elements").each(function(L){var W=L.value;t.Pattern.check(W)?b(L,E):t.SpreadElement&&t.SpreadElement.check(W)&&b(L.get("argument"),E)}):t.PropertyPattern&&t.PropertyPattern.check(A)?b(T.get("pattern"),E):(t.SpreadElementPattern&&t.SpreadElementPattern.check(A)||t.RestElement&&t.RestElement.check(A)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(A))&&b(T.get("argument"),E)}function P(T,E){var A=T.value;t.Pattern.assert(A),t.Identifier.check(A)&&(pt.call(E,A.name)?E[A.name].push(T):E[A.name]=[T])}function k(T,E){var A=T.value;h.assert(A),pt.call(E,A.name)?E[A.name].push(T):E[A.name]=[T]}return f.lookup=function(T){for(var E=this;E&&!E.declares(T);E=E.parent);return E},f.lookupType=function(T){for(var E=this;E&&!E.declaresType(T);E=E.parent);return E},f.getGlobalScope=function(){for(var T=this;!T.isGlobal;)T=T.parent;return T},l}q(()=>module);function Cn(i){var s=i.use(Q),e=s.namedTypes,t=s.builders,r=s.builtInTypes.number,n=s.builtInTypes.array,a=i.use(vn),o=i.use(El);let l=function y(b,P,k){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");a.call(this,b,P,k)};var c=l.prototype=Object.create(a.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(c,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),c.replace=function(){return delete this.node,delete this.parent,delete this.scope,a.prototype.replace.apply(this,arguments)},c.prune=function(){var y=this.parent;return this.replace(),p(y)},c._computeNode=function(){var y=this.value;if(e.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},c._computeParent=function(){var y=this.value,b=this.parentPath;if(!e.Node.check(y)){for(;b&&!e.Node.check(b.value);)b=b.parentPath;b&&(b=b.parentPath)}for(;b&&!e.Node.check(b.value);)b=b.parentPath;return b||null},c._computeScope=function(){var y=this.value,b=this.parentPath,P=b&&b.scope;return e.Node.check(y)&&o.isEstablishedBy(y)&&(P=new o(this,P)),P||null},c.getValueProperty=function(y){return s.getFieldValue(this.value,y)},c.needsParens=function(y){var b=this.parentPath;if(!b)return!1;var P=this.value;if(!e.Expression.check(P)||P.type==="Identifier")return!1;for(;!e.Node.check(b.value);)if(b=b.parentPath,!b)return!1;var k=b.value;switch(P.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return k.type==="MemberExpression"&&this.name==="object"&&k.object===P;case"BinaryExpression":case"LogicalExpression":switch(k.type){case"CallExpression":return this.name==="callee"&&k.callee===P;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&k.object===P;case"BinaryExpression":case"LogicalExpression":{let T=P,E=k.operator,A=h[E],L=T.operator,W=h[L];if(A>W)return!0;if(A===W&&this.name==="right"){if(k.right!==T)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(k.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(k.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return k.type==="MemberExpression"&&r.check(P.value)&&this.name==="object"&&k.object===P;case"AssignmentExpression":case"ConditionalExpression":switch(k.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&k.callee===P;case"ConditionalExpression":return this.name==="test"&&k.test===P;case"MemberExpression":return this.name==="object"&&k.object===P;default:return!1}default:if(k.type==="NewExpression"&&this.name==="callee"&&k.callee===P)return f(P)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function u(y){return e.BinaryExpression.check(y)||e.LogicalExpression.check(y)}var h={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,b){y.forEach(function(P){h[P]=b})});function f(y){return e.CallExpression.check(y)?!0:n.check(y)?y.some(f):e.Node.check(y)?s.someField(y,function(b,P){return f(P)}):!1}c.canBeFirstInStatement=function(){var y=this.node;return!e.FunctionExpression.check(y)&&!e.ObjectExpression.check(y)},c.firstInStatement=function(){return d(this)};function d(y){for(var b,P;y.parent;y=y.parent){if(b=y.node,P=y.parent.node,e.BlockStatement.check(P)&&y.parent.name==="body"&&y.name===0){if(P.body[0]!==b)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(P)&&y.name==="expression"){if(P.expression!==b)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(P)&&y.parent.name==="expressions"&&y.name===0){if(P.expressions[0]!==b)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(P)&&y.name==="callee"){if(P.callee!==b)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(P)&&y.name==="object"){if(P.object!==b)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(P)&&y.name==="test"){if(P.test!==b)throw new Error("Nodes must be equal");continue}if(u(P)&&y.name==="left"){if(P.left!==b)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(P)&&!P.prefix&&y.name==="argument"){if(P.argument!==b)throw new Error("Nodes must be equal");continue}return!1}return!0}function p(y){if(e.VariableDeclaration.check(y.node)){var b=y.get("declarations").value;if(!b||b.length===0)return y.prune()}else if(e.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else e.IfStatement.check(y.node)&&g(y);return y}function g(y){var b=y.get("test").value,P=y.get("alternate").value,k=y.get("consequent").value;if(!k&&!P){var T=t.expressionStatement(b);y.replace(T)}else if(!k&&P){var E=t.unaryExpression("!",b,!0);e.UnaryExpression.check(b)&&b.operator==="!"&&(E=b.argument),y.get("test").replace(E),y.get("consequent").replace(P),y.get("alternate").replace()}}return l}q(()=>module);var hs=Object.prototype.hasOwnProperty;function Al(i){var s=i.use(Q),e=i.use(Cn),t=s.builtInTypes.array,r=s.builtInTypes.object,n=s.builtInTypes.function,a;let o=function p(){if(!(this instanceof p))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=l(this),this._shouldVisitComments=hs.call(this._methodNameTable,"Block")||hs.call(this._methodNameTable,"Line"),this.Context=f(this),this._visiting=!1,this._changeReported=!1};function l(p){var g=Object.create(null);for(var y in p)/^visit[A-Z]/.test(y)&&(g[y.slice(5)]=!0);for(var b=s.computeSupertypeLookupTable(g),P=Object.create(null),k=Object.keys(b),T=k.length,E=0;E<T;++E){var A=k[E];y="visit"+b[A],n.check(p[y])&&(P[A]=y)}return P}o.fromMethodsObject=function(g){if(g instanceof o)return g;if(!r.check(g))return new o;let y=function P(){if(!(this instanceof P))throw new Error("Visitor constructor cannot be invoked without 'new'");o.call(this)};var b=y.prototype=Object.create(u);return b.constructor=y,c(b,g),c(y,o),n.assert(y.fromMethodsObject),n.assert(y.visit),new y};function c(p,g){for(var y in g)hs.call(g,y)&&(p[y]=g[y]);return p}o.visit=function(g,y){return o.fromMethodsObject(y).visit(g)};var u=o.prototype;u.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var p=arguments.length,g=new Array(p),y=0;y<p;++y)g[y]=arguments[y];g[0]instanceof e||(g[0]=new e({root:g[0]}).get("root")),this.reset.apply(this,g);var b;try{var P=this.visitWithoutReset(g[0]);b=!0}finally{if(this._visiting=!1,!b&&this._abortRequested)return g[0].value}return P},u.AbortRequest=function(){},u.abort=function(){var p=this;p._abortRequested=!0;var g=new p.AbortRequest;throw g.cancel=function(){p._abortRequested=!1},g},u.reset=function(p){},u.visitWithoutReset=function(p){if(this instanceof this.Context)return this.visitor.visitWithoutReset(p);if(!(p instanceof e))throw new Error("");var g=p.value,y=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(y){var b=this.acquireContext(p);try{return b.invokeVisitorMethod(y)}finally{this.releaseContext(b)}}else return h(p,this)};function h(p,g){if(!(p instanceof e))throw new Error("");if(!(g instanceof o))throw new Error("");var y=p.value;if(t.check(y))p.each(g.visitWithoutReset,g);else if(r.check(y)){var b=s.getFieldNames(y);g._shouldVisitComments&&y.comments&&b.indexOf("comments")<0&&b.push("comments");for(var P=b.length,k=[],T=0;T<P;++T){var E=b[T];hs.call(y,E)||(y[E]=s.getFieldValue(y,E)),k.push(p.get(E))}for(var T=0;T<P;++T)g.visitWithoutReset(k[T])}return p.value}u.acquireContext=function(p){return this._reusableContextStack.length===0?new this.Context(p):this._reusableContextStack.pop().reset(p)},u.releaseContext=function(p){if(!(p instanceof this.Context))throw new Error("");this._reusableContextStack.push(p),p.currentPath=null},u.reportChanged=function(){this._changeReported=!0},u.wasChangeReported=function(){return this._changeReported};function f(p){function g(b){if(!(this instanceof g))throw new Error("");if(!(this instanceof o))throw new Error("");if(!(b instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:p,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=b,this.needToCallTraverse=!0,Object.seal(this)}if(!(p instanceof o))throw new Error("");var y=g.prototype=Object.create(p);return y.constructor=g,c(y,d),g}var d=Object.create(null);return d.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},d.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var y=this.visitor[g].call(this,this.currentPath);if(y===!1?this.needToCallTraverse=!1:y!==a&&(this.currentPath=this.currentPath.replace(y)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var b=this.currentPath;return b&&b.value},d.traverse=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,h(g,o.fromMethodsObject(y||this.visitor))},d.visit=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,o.fromMethodsObject(y||this.visitor).visitWithoutReset(g)},d.reportChanged=function(){this.visitor.reportChanged()},d.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},o}q(()=>module);function wl(i){var s=i.use(Q),e=s.getFieldNames,t=s.getFieldValue,r=s.builtInTypes.array,n=s.builtInTypes.object,a=s.builtInTypes.Date,o=s.builtInTypes.RegExp,l=Object.prototype.hasOwnProperty;function c(p,g,y){return r.check(y)?y.length=0:y=null,h(p,g,y)}c.assert=function(p,g){var y=[];if(!c(p,g,y))if(y.length===0){if(p!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(u).join(""))};function u(p){return/[_$a-z][_$a-z0-9]*/i.test(p)?"."+p:"["+JSON.stringify(p)+"]"}function h(p,g,y){return p===g?!0:r.check(p)?f(p,g,y):n.check(p)?d(p,g,y):a.check(p)?a.check(g)&&+p==+g:o.check(p)?o.check(g)&&p.source===g.source&&p.global===g.global&&p.multiline===g.multiline&&p.ignoreCase===g.ignoreCase:p==g}function f(p,g,y){r.assert(p);var b=p.length;if(!r.check(g)||g.length!==b)return y&&y.push("length"),!1;for(var P=0;P<b;++P){if(y&&y.push(P),P in p!=P in g||!h(p[P],g[P],y))return!1;if(y){var k=y.pop();if(k!==P)throw new Error(""+k)}}return!0}function d(p,g,y){if(n.assert(p),!n.check(g))return!1;if(p.type!==g.type)return y&&y.push("type"),!1;var b=e(p),P=b.length,k=e(g),T=k.length;if(P===T){for(var E=0;E<P;++E){var A=b[E],L=t(p,A),W=t(g,A);if(y&&y.push(A),!h(L,W,y))return!1;if(y){var he=y.pop();if(he!==A)throw new Error(""+he)}}return!0}if(!y)return!1;var we=Object.create(null);for(E=0;E<P;++E)we[b[E]]=!0;for(E=0;E<T;++E){if(A=k[E],!l.call(we,A))return y.push(A),!1;delete we[A]}for(A in we){y.push(A);break}return!1}return c}q(()=>module);function vl(i){let s=Cl(),e=s.use(Q);i.forEach(s.use),e.finalize();let t=s.use(Al);return{Type:e.Type,builtInTypes:e.builtInTypes,namedTypes:e.namedTypes,builders:e.builders,defineMethod:e.defineMethod,getFieldNames:e.getFieldNames,getFieldValue:e.getFieldValue,eachField:e.eachField,someField:e.someField,getSupertypeNames:e.getSupertypeNames,getBuilderName:e.getBuilderName,astNodesAreEquivalent:s.use(wl),finalize:e.finalize,Path:s.use(vn),NodePath:s.use(Cn),PathVisitor:t,use:s.use,visit:t.visit}}function Cl(){let i=[],s=[];function e(r){var n=i.indexOf(r);return n===-1&&(n=i.length,i.push(r),s[n]=r(t)),s[n]}var t={use:e};return t}q(()=>module);function In(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}q(()=>module);function Nn(i){let s=i.use(In);return s.BinaryOperators.indexOf("**")<0&&s.BinaryOperators.push("**"),s.AssignmentOperators.indexOf("**=")<0&&s.AssignmentOperators.push("**="),s}q(()=>module);function kn(i){let s=i.use(Nn);return s.LogicalOperators.indexOf("??")<0&&s.LogicalOperators.push("??"),s}q(()=>module);function Il(i){let s=i.use(kn);return s.LogicalOperators.forEach(e=>{let t=e+"=";s.AssignmentOperators.indexOf(t)<0&&s.AssignmentOperators.push(t)}),s}q(()=>module);function Nl(i){var s=i.use(Q),e=s.Type,t=e.def,r=e.or,n=i.use(me),a=n.defaults,o=n.geq;let{BinaryOperators:l,AssignmentOperators:c,LogicalOperators:u}=i.use(In);t("Printable").field("loc",r(t("SourceLocation"),null),a.null,!0),t("Node").bases("Printable").field("type",String).field("comments",r([t("Comment")],null),a.null,!0),t("SourceLocation").field("start",t("Position")).field("end",t("Position")).field("source",r(String,null),a.null),t("Position").field("line",o(1)).field("column",o(0)),t("File").bases("Node").build("program","name").field("program",t("Program")).field("name",r(String,null),a.null),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",r(t("Identifier"),null),a.null).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("generator",Boolean,a.false).field("async",Boolean,a.false),t("Statement").bases("Node"),t("EmptyStatement").bases("Statement").build(),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]),t("ExpressionStatement").bases("Statement").build("expression").field("expression",t("Expression")),t("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Statement")).field("alternate",r(t("Statement"),null),a.null),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.null),t("ContinueStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),a.null),t("WithStatement").bases("Statement").build("object","body").field("object",t("Expression")).field("body",t("Statement")),t("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",t("Expression")).field("cases",[t("SwitchCase")]).field("lexical",Boolean,a.false),t("ReturnStatement").bases("Statement").build("argument").field("argument",r(t("Expression"),null)),t("ThrowStatement").bases("Statement").build("argument").field("argument",t("Expression")),t("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",t("BlockStatement")).field("handler",r(t("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[t("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[t("CatchClause")],a.emptyArray).field("finalizer",r(t("BlockStatement"),null),a.null),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",r(t("Expression"),null),a.null).field("body",t("BlockStatement")),t("WhileStatement").bases("Statement").build("test","body").field("test",t("Expression")).field("body",t("Statement")),t("DoWhileStatement").bases("Statement").build("body","test").field("body",t("Statement")).field("test",t("Expression")),t("ForStatement").bases("Statement").build("init","test","update","body").field("init",r(t("VariableDeclaration"),t("Expression"),null)).field("test",r(t("Expression"),null)).field("update",r(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body").field("left",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("DebuggerStatement").bases("Statement").build(),t("Declaration").bases("Statement"),t("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",t("Identifier")),t("FunctionExpression").bases("Function","Expression").build("id","params","body"),t("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",r("var","let","const")).field("declarations",[t("VariableDeclarator")]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",r(t("Expression"),null),a.null),t("Expression").bases("Node"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",r("init","get","set")).field("key",r(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var h=r("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",h).field("argument",t("Expression")).field("prefix",Boolean,a.true);let f=r(...l);t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",t("Expression")).field("right",t("Expression"));let d=r(...c);t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",r(t("Pattern"),t("MemberExpression"))).field("right",t("Expression"));var p=r("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",t("Expression")).field("prefix",Boolean);var g=r(...u);t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",t("Expression")).field("right",t("Expression")),t("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Expression")).field("alternate",t("Expression")),t("NewExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("CallExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("MemberExpression").bases("Expression").build("object","property","computed").field("object",t("Expression")).field("property",r(t("Identifier"),t("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),t("Pattern").bases("Node"),t("SwitchCase").bases("Node").build("test","consequent").field("test",r(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,a.false),t("Literal").bases("Expression").build("value").field("value",r(String,Boolean,null,Number,RegExp,BigInt)),t("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}q(()=>module);function kl(i){i.use(Nl);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("Function").field("generator",Boolean,r.false).field("expression",Boolean,r.false).field("defaults",[t(e("Expression"),null)],r.emptyArray).field("rest",t(e("Identifier"),null),r.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),r.null),e("SpreadElementPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("FunctionDeclaration").build("id","params","body","generator","expression").field("id",t(e("Identifier"),null)),e("FunctionExpression").build("id","params","body","generator","expression"),e("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,r.null).field("body",t(e("BlockStatement"),e("Expression"))).field("generator",!1,r.false),e("ForOfStatement").bases("Statement").build("left","right","body").field("left",t(e("VariableDeclaration"),e("Pattern"))).field("right",e("Expression")).field("body",e("Statement")),e("YieldExpression").bases("Expression").build("argument","delegate").field("argument",t(e("Expression"),null)).field("delegate",Boolean,r.false),e("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",t(e("Expression"),null)),e("ComprehensionBlock").bases("Node").build("left","right","each").field("left",e("Pattern")).field("right",e("Expression")).field("each",Boolean),e("Property").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("value",t(e("Expression"),e("Pattern"))).field("method",Boolean,r.false).field("shorthand",Boolean,r.false).field("computed",Boolean,r.false),e("ObjectProperty").field("shorthand",Boolean,r.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,r.false),e("ObjectPattern").bases("Pattern").build("properties").field("properties",[t(e("PropertyPattern"),e("Property"))]),e("ArrayPattern").bases("Pattern").build("elements").field("elements",[t(e("Pattern"),null)]),e("SpreadElement").bases("Node").build("argument").field("argument",e("Expression")),e("ArrayExpression").field("elements",[t(e("Expression"),e("SpreadElement"),e("RestElement"),null)]),e("NewExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("CallExpression").field("arguments",[t(e("Expression"),e("SpreadElement"))]),e("AssignmentPattern").bases("Pattern").build("left","right").field("left",e("Pattern")).field("right",e("Expression")),e("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",t("constructor","method","get","set")).field("key",e("Expression")).field("value",e("Function")).field("computed",Boolean,r.false).field("static",Boolean,r.false);let n=t(e("MethodDefinition"),e("VariableDeclarator"),e("ClassPropertyDefinition"),e("ClassProperty"),e("StaticBlock"));e("ClassProperty").bases("Declaration").build("key").field("key",t(e("Literal"),e("Identifier"),e("Expression"))).field("computed",Boolean,r.false),e("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",n),e("ClassBody").bases("Declaration").build("body").field("body",[n]),e("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",t(e("Identifier"),null)).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),r.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(e("Identifier"),null),r.null).field("body",e("ClassBody")).field("superClass",t(e("Expression"),null),r.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",t(e("Identifier"),null),r.null).field("id",t(e("Identifier"),null),r.null).field("name",t(e("Identifier"),null),r.null),e("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",e("Identifier")),e("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),e("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),e("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[t(e("ImportSpecifier"),e("ImportNamespaceSpecifier"),e("ImportDefaultSpecifier"))],r.emptyArray).field("source",e("Literal")).field("importKind",t("value","type"),function(){return"value"}),e("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",t(e("Declaration"),null)).field("specifiers",[e("ExportSpecifier")],r.emptyArray).field("source",t(e("Literal"),null),r.null),e("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",e("Identifier")),e("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",t(e("Declaration"),e("Expression"))),e("ExportAllDeclaration").bases("Declaration").build("source").field("source",e("Literal")),e("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",e("Expression")).field("quasi",e("TemplateLiteral")),e("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[e("TemplateElement")]).field("expressions",[e("Expression")]),e("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),e("MetaProperty").bases("Expression").build("meta","property").field("meta",e("Identifier")).field("property",e("Identifier"))}q(()=>module);function Ll(i){i.use(Nn),i.use(kl)}q(()=>module);function Dl(i){i.use(Ll);let e=i.use(Q).Type.def,t=i.use(me).defaults;e("Function").field("async",Boolean,t.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}q(()=>module);function Ol(i){i.use(Dl);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("ForOfStatement").field("await",Boolean,r.false),e("SpreadProperty").bases("Node").build("argument").field("argument",e("Expression")),e("ObjectExpression").field("properties",[t(e("Property"),e("SpreadProperty"),e("SpreadElement"))]),e("TemplateElement").field("value",{cooked:t(String,null),raw:String}),e("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("ObjectPattern").field("properties",[t(e("PropertyPattern"),e("Property"),e("RestElement"),e("SpreadPropertyPattern"))])}q(()=>module);function Ml(i){i.use(Ol);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("CatchClause").field("param",t(e("Pattern"),null),r.null)}q(()=>module);function Fl(i){i.use(kn),i.use(Ml);let s=i.use(Q),e=s.Type.def,t=s.Type.or,n=i.use(me).defaults;e("ImportExpression").bases("Expression").build("source").field("source",e("Expression")),e("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",e("Literal")).field("exported",t(e("Identifier"),null,void 0),n.null),e("ChainElement").bases("Node").field("optional",Boolean,n.false),e("CallExpression").bases("Expression","ChainElement"),e("MemberExpression").bases("Expression","ChainElement"),e("ChainExpression").bases("Expression").build("expression").field("expression",e("ChainElement")),e("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,n.true),e("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,n.true)}q(()=>module);function Bl(i){i.use(Il),i.use(Fl)}q(()=>module);function _l(i){i.use(Bl);let e=i.use(Q).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}q(()=>module);function Kt(i){i.use(_l);let s=i.use(Q),e=s.Type,t=s.Type.def,r=e.or,a=i.use(me).defaults;t("AwaitExpression").build("argument","all").field("argument",r(t("Expression"),null)).field("all",Boolean,a.false),t("Decorator").bases("Node").build("expression").field("expression",t("Expression")),t("Property").field("decorators",r([t("Decorator")],null),a.null),t("MethodDefinition").field("decorators",r([t("Decorator")],null),a.null),t("PrivateName").bases("Expression","Pattern").build("id").field("id",t("Identifier")),t("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",t("PrivateName")).field("value",r(t("Expression"),null),a.null),t("ImportAttribute").bases("Node").build("key","value").field("key",r(t("Identifier"),t("Literal"))).field("value",t("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(o=>{t(o).field("assertions",[t("ImportAttribute")],a.emptyArray)}),t("RecordExpression").bases("Expression").build("properties").field("properties",[r(t("ObjectProperty"),t("ObjectMethod"),t("SpreadElement"))]),t("TupleExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),t("SpreadElement"),null)]),t("ModuleExpression").bases("Node").build("body").field("body",t("Program"))}q(()=>module);function jl(i){i.use(Kt);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("JSXAttribute").bases("Node").build("name","value").field("name",t(e("JSXIdentifier"),e("JSXNamespacedName"))).field("value",t(e("Literal"),e("JSXExpressionContainer"),e("JSXElement"),e("JSXFragment"),null),r.null),e("JSXIdentifier").bases("Identifier").build("name").field("name",String),e("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",e("JSXIdentifier")).field("name",e("JSXIdentifier")),e("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",t(e("JSXIdentifier"),e("JSXMemberExpression"))).field("property",e("JSXIdentifier")).field("computed",Boolean,r.false);let n=t(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let a=[t(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",t(e("Expression"),e("JSXEmptyExpression")));let o=[t(e("JSXText"),e("JSXExpressionContainer"),e("JSXSpreadChild"),e("JSXElement"),e("JSXFragment"),e("Literal"))];e("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",e("JSXOpeningElement")).field("closingElement",t(e("JSXClosingElement"),null),r.null).field("children",o,r.emptyArray).field("name",n,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",a,function(){return this.openingElement.attributes},!0),e("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",n).field("attributes",a,r.emptyArray).field("selfClosing",Boolean,r.false),e("JSXClosingElement").bases("Node").build("name").field("name",n),e("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",e("JSXOpeningFragment")).field("closingFragment",e("JSXClosingFragment")).field("children",o,r.emptyArray),e("JSXOpeningFragment").bases("Node").build(),e("JSXClosingFragment").bases("Node").build(),e("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),e("JSXEmptyExpression").bases("Node").build(),e("JSXSpreadChild").bases("Node").build("expression").field("expression",e("Expression"))}q(()=>module);function Ln(i){var s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults,n=t(e("TypeAnnotation"),e("TSTypeAnnotation"),null),a=t(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",n,r.null),e("ObjectPattern").field("typeAnnotation",n,r.null),e("Function").field("returnType",n,r.null).field("typeParameters",a,r.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",t(e("Expression"),null)).field("static",Boolean,r.false).field("typeAnnotation",n,r.null),["ClassDeclaration","ClassExpression"].forEach(o=>{e(o).field("typeParameters",a,r.null).field("superTypeParameters",t(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),r.null).field("implements",t([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),r.emptyArray)})}q(()=>module);function Dn(i){i.use(Kt),i.use(Ln);let s=i.use(Q),e=s.Type.def,t=s.Type.or,r=i.use(me).defaults;e("Flow").bases("Node"),e("FlowType").bases("Flow"),e("AnyTypeAnnotation").bases("FlowType").build(),e("EmptyTypeAnnotation").bases("FlowType").build(),e("MixedTypeAnnotation").bases("FlowType").build(),e("VoidTypeAnnotation").bases("FlowType").build(),e("SymbolTypeAnnotation").bases("FlowType").build(),e("NumberTypeAnnotation").bases("FlowType").build(),e("BigIntTypeAnnotation").bases("FlowType").build(),e("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),e("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),e("StringTypeAnnotation").bases("FlowType").build(),e("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),e("BooleanTypeAnnotation").bases("FlowType").build(),e("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),e("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",e("FlowType")),e("NullLiteralTypeAnnotation").bases("FlowType").build(),e("NullTypeAnnotation").bases("FlowType").build(),e("ThisTypeAnnotation").bases("FlowType").build(),e("ExistsTypeAnnotation").bases("FlowType").build(),e("ExistentialTypeParam").bases("FlowType").build(),e("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[e("FunctionTypeParam")]).field("returnType",e("FlowType")).field("rest",t(e("FunctionTypeParam"),null)).field("typeParameters",t(e("TypeParameterDeclaration"),null)),e("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",t(e("Identifier"),null)).field("typeAnnotation",e("FlowType")).field("optional",Boolean),e("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",e("FlowType")),e("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[t(e("ObjectTypeProperty"),e("ObjectTypeSpreadProperty"))]).field("indexers",[e("ObjectTypeIndexer")],r.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],r.emptyArray).field("inexact",t(Boolean,void 0),r.undefined).field("exact",Boolean,r.false).field("internalSlots",[e("ObjectTypeInternalSlot")],r.emptyArray),e("Variance").bases("Node").build("kind").field("kind",t("plus","minus"));let n=t(e("Variance"),"plus","minus",null);e("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",t(e("Literal"),e("Identifier"))).field("value",e("FlowType")).field("optional",Boolean).field("variance",n,r.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",n,r.null).field("static",Boolean,r.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,r.false),e("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("id",e("Identifier")),e("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",t(e("Identifier"),e("QualifiedTypeIdentifier"))).field("typeParameters",t(e("TypeParameterInstantiation"),null)),e("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",e("Identifier")).field("property",t(e("MemberTypeAnnotation"),e("GenericTypeAnnotation"))),e("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",e("FlowType")).field("indexType",e("FlowType")),e("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",e("FlowType")).field("indexType",e("FlowType")).field("optional",Boolean),e("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",e("FlowType")),e("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",e("FlowType")),e("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",e("Identifier")).field("value",e("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),e("TypeParameterDeclaration").bases("Node").build("params").field("params",[e("TypeParameter")]),e("TypeParameterInstantiation").bases("Node").build("params").field("params",[e("FlowType")]),e("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",n,r.null).field("bound",t(e("TypeAnnotation"),null),r.null).field("default",t(e("FlowType"),null),r.null),e("ClassProperty").field("variance",n,r.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",t(e("Expression"),null),r.null).field("typeParameters",t(e("TypeParameterInstantiation"),null),r.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",t([e("InterfaceExtends")],null),r.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null),r.null).field("body",e("ObjectTypeAnnotation")).field("extends",[e("InterfaceExtends")]),e("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),e("InterfaceExtends").bases("Node").build("id").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterInstantiation"),null),r.null),e("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("right",e("FlowType")),e("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),e("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",e("Identifier")).field("typeParameters",t(e("TypeParameterDeclaration"),null)).field("impltype",e("FlowType")).field("supertype",t(e("FlowType"),null)),e("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",t(e("FlowType"),null)),e("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",e("Expression")).field("typeAnnotation",e("TypeAnnotation")),e("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[e("FlowType")]),e("DeclareVariable").bases("Statement").build("id").field("id",e("Identifier")),e("DeclareFunction").bases("Statement").build("id").field("id",e("Identifier")).field("predicate",t(e("FlowPredicate"),null),r.null),e("DeclareClass").bases("InterfaceDeclaration").build("id"),e("DeclareModule").bases("Statement").build("id","body").field("id",t(e("Identifier"),e("Literal"))).field("body",e("BlockStatement")),e("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",e("TypeAnnotation")),e("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",t(e("DeclareVariable"),e("DeclareFunction"),e("DeclareClass"),e("FlowType"),e("TypeAlias"),e("DeclareOpaqueType"),e("InterfaceDeclaration"),null)).field("specifiers",[t(e("ExportSpecifier"),e("ExportBatchSpecifier"))],r.emptyArray).field("source",t(e("Literal"),null),r.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",t(e("Literal"),null),r.null),e("ImportDeclaration").field("importKind",t("value","type","typeof"),()=>"value"),e("FlowPredicate").bases("Flow"),e("InferredPredicate").bases("FlowPredicate").build(),e("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",e("Expression")),e("Function").field("predicate",t(e("FlowPredicate"),null),r.null),e("CallExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.null),e("NewExpression").field("typeArguments",t(null,e("TypeParameterInstantiation")),r.null),e("EnumDeclaration").bases("Declaration").build("id","body").field("id",e("Identifier")).field("body",t(e("EnumBooleanBody"),e("EnumNumberBody"),e("EnumStringBody"),e("EnumSymbolBody"))),e("EnumBooleanBody").build("members","explicitType").field("members",[e("EnumBooleanMember")]).field("explicitType",Boolean),e("EnumNumberBody").build("members","explicitType").field("members",[e("EnumNumberMember")]).field("explicitType",Boolean),e("EnumStringBody").build("members","explicitType").field("members",t([e("EnumStringMember")],[e("EnumDefaultedMember")])).field("explicitType",Boolean),e("EnumSymbolBody").build("members").field("members",[e("EnumDefaultedMember")]),e("EnumBooleanMember").build("id","init").field("id",e("Identifier")).field("init",t(e("Literal"),Boolean)),e("EnumNumberMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumStringMember").build("id","init").field("id",e("Identifier")).field("init",e("Literal")),e("EnumDefaultedMember").build("id").field("id",e("Identifier"))}q(()=>module);function Rl(i){i.use(Kt);var s=i.use(Q),e=i.use(me).defaults,t=s.Type.def,r=s.Type.or;t("VariableDeclaration").field("declarations",[r(t("VariableDeclarator"),t("Identifier"))]),t("Property").field("value",r(t("Expression"),t("Pattern"))),t("ArrayPattern").field("elements",[r(t("Pattern"),t("SpreadElement"),null)]),t("ObjectPattern").field("properties",[r(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"))]),t("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),t("ExportBatchSpecifier").bases("Specifier").build(),t("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",r(t("Declaration"),t("Expression"),null)).field("specifiers",[r(t("ExportSpecifier"),t("ExportBatchSpecifier"))],e.emptyArray).field("source",r(t("Literal"),null),e.null),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")}q(()=>module);function On(i){i.use(Kt);let s=i.use(Q),e=i.use(me).defaults,t=s.Type.def,r=s.Type.or,{undefined:n}=s.builtInTypes;t("Noop").bases("Statement").build(),t("DoExpression").bases("Expression").build("body").field("body",[t("Statement")]),t("BindExpression").bases("Expression").build("object","callee").field("object",r(t("Expression"),null)).field("callee",t("Expression")),t("ParenthesizedExpression").bases("Expression").build("expression").field("expression",t("Expression")),t("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",t("Identifier")),t("CommentBlock").bases("Comment").build("value","leading","trailing"),t("CommentLine").bases("Comment").build("value","leading","trailing"),t("Directive").bases("Node").build("value").field("value",t("DirectiveLiteral")),t("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,e["use strict"]),t("InterpreterDirective").bases("Node").build("value").field("value",String),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray),t("Program").bases("Node").build("body").field("body",[t("Statement")]).field("directives",[t("Directive")],e.emptyArray).field("interpreter",r(t("InterpreterDirective"),null),e.null);function a(u=String,h){return["extra",{rawValue:u,raw:String},function(){let d=s.getFieldValue(this,"value");return{rawValue:d,raw:h?h(d):String(d)}}]}t("StringLiteral").bases("Literal").build("value").field("value",String).field(...a(String,u=>JSON.stringify(u))),t("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",r(String,null),e.null).field(...a(Number)),t("BigIntLiteral").bases("Literal").build("value").field("value",r(String,Number)).field(...a(String,u=>u+"n")),t("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...a(String,u=>u+"m")),t("NullLiteral").bases("Literal").build().field("value",null,e.null),t("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),t("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...a(r(RegExp,n),u=>`/${u.pattern}/${u.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var o=r(t("Property"),t("ObjectMethod"),t("ObjectProperty"),t("SpreadProperty"),t("SpreadElement"));t("ObjectExpression").bases("Expression").build("properties").field("properties",[o]),t("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",r("method","get","set")).field("key",r(t("Literal"),t("Identifier"),t("Expression"))).field("params",[t("Pattern")]).field("body",t("BlockStatement")).field("computed",Boolean,e.false).field("generator",Boolean,e.false).field("async",Boolean,e.false).field("accessibility",r(t("Literal"),null),e.null).field("decorators",r([t("Decorator")],null),e.null),t("ObjectProperty").bases("Node").build("key","value").field("key",r(t("Literal"),t("Identifier"),t("Expression"))).field("value",r(t("Expression"),t("Pattern"))).field("accessibility",r(t("Literal"),null),e.null).field("computed",Boolean,e.false);var l=r(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("ClassAccessorProperty"),t("StaticBlock"));t("ClassBody").bases("Declaration").build("body").field("body",[l]),t("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",r(t("Literal"),t("Identifier"),t("Expression"))),t("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",t("PrivateName")),t("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",r(t("Literal"),t("Identifier"),t("PrivateName"),t("Expression"))).field("value",r(t("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(u=>{t(u).field("kind",r("get","set","method","constructor"),()=>"method").field("body",t("BlockStatement")).field("access",r("public","private","protected",null),e.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(u=>{t(u).field("computed",Boolean,e.false).field("static",Boolean,e.false).field("abstract",Boolean,e.false).field("accessibility",r("public","private","protected",null),e.null).field("decorators",r([t("Decorator")],null),e.null).field("definite",Boolean,e.false).field("optional",Boolean,e.false).field("override",Boolean,e.false).field("readonly",Boolean,e.false)});var c=r(t("Property"),t("PropertyPattern"),t("SpreadPropertyPattern"),t("SpreadProperty"),t("ObjectProperty"),t("RestProperty"),t("RestElement"));t("ObjectPattern").bases("Pattern").build("properties").field("properties",[c]).field("decorators",r([t("Decorator")],null),e.null),t("SpreadProperty").bases("Node").build("argument").field("argument",t("Expression")),t("RestProperty").bases("Node").build("argument").field("argument",t("Expression")),t("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")),t("Import").bases("Expression").build()}q(()=>module);function Ul(i){let e=i.use(Q).Type.def;i.use(On),i.use(Dn),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}q(()=>module);function Vl(i){i.use(On),i.use(Ln);var s=i.use(Q),e=s.namedTypes,t=s.Type.def,r=s.Type.or,n=i.use(me).defaults,a=s.Type.from(function(u,h){return!!(e.StringLiteral&&e.StringLiteral.check(u,h)||e.Literal&&e.Literal.check(u,h)&&typeof u.value=="string")},"StringLiteral");t("TSType").bases("Node");var o=r(t("Identifier"),t("TSQualifiedName"));t("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",o),t("TSHasOptionalTypeParameterInstantiation").field("typeParameters",r(t("TSTypeParameterInstantiation"),null),n.null),t("TSHasOptionalTypeParameters").field("typeParameters",r(t("TSTypeParameterDeclaration"),null,void 0),n.null),t("TSHasOptionalTypeAnnotation").field("typeAnnotation",r(t("TSTypeAnnotation"),null),n.null),t("TSQualifiedName").bases("Node").build("left","right").field("left",o).field("right",o),t("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")).field("extra",r({parenthesized:Boolean},null),n.null),t("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",t("Expression")).field("typeAnnotation",t("TSType")),t("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",t("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(u=>{t(u).bases("TSType").build()}),t("TSArrayType").bases("TSType").build("elementType").field("elementType",t("TSType")),t("TSLiteralType").bases("TSType").build("literal").field("literal",r(t("NumericLiteral"),t("StringLiteral"),t("BooleanLiteral"),t("TemplateLiteral"),t("UnaryExpression"),t("BigIntLiteral"))),t("TemplateLiteral").field("expressions",r([t("Expression")],[t("TSType")])),["TSUnionType","TSIntersectionType"].forEach(u=>{t(u).bases("TSType").build("types").field("types",[t("TSType")])}),t("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",t("TSType")).field("extendsType",t("TSType")).field("trueType",t("TSType")).field("falseType",t("TSType")),t("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",t("TSTypeParameter")),t("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType"));var l=[r(t("Identifier"),t("RestElement"),t("ArrayPattern"),t("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(u=>{t(u).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",l)}),t("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,n.false).field("async",Boolean,n.false).field("generator",Boolean,n.false).field("id",r(t("Identifier"),null),n.null).field("params",[t("Pattern")]).field("returnType",r(t("TSTypeAnnotation"),t("Noop"),null),n.null),t("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,n.false).field("generator",Boolean,n.false).field("params",[t("Pattern")]).field("abstract",Boolean,n.false).field("accessibility",r("public","private","protected",void 0),n.undefined).field("static",Boolean,n.false).field("computed",Boolean,n.false).field("optional",Boolean,n.false).field("key",r(t("Identifier"),t("StringLiteral"),t("NumericLiteral"),t("Expression"))).field("kind",r("get","set","method","constructor"),function(){return"method"}).field("access",r("public","private","protected",void 0),n.undefined).field("decorators",r([t("Decorator")],null),n.null).field("returnType",r(t("TSTypeAnnotation"),t("Noop"),null),n.null),t("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",r(Boolean,"+","-"),n.false).field("typeParameter",t("TSTypeParameter")).field("optional",r(Boolean,"+","-"),n.false).field("typeAnnotation",r(t("TSType"),null),n.null),t("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[r(t("TSType"),t("TSNamedTupleMember"))]),t("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",t("Identifier")).field("optional",Boolean,n.false).field("elementType",t("TSType")),t("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",t("TSType")),t("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",t("TSType")).field("indexType",t("TSType")),t("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",t("TSType")),t("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r(t("TSType"),t("TSTypeAnnotation"))),t("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[t("Identifier")]).field("readonly",Boolean,n.false),t("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",t("Expression")).field("computed",Boolean,n.false).field("readonly",Boolean,n.false).field("optional",Boolean,n.false).field("initializer",r(t("Expression"),null),n.null),t("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",t("Expression")).field("computed",Boolean,n.false).field("optional",Boolean,n.false).field("parameters",l),t("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",r(t("Identifier"),t("TSThisType"))).field("typeAnnotation",r(t("TSTypeAnnotation"),null),n.null).field("asserts",Boolean,n.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(u=>{t(u).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",l)}),t("TSEnumMember").bases("Node").build("id","initializer").field("id",r(t("Identifier"),a)).field("initializer",r(t("Expression"),null),n.null),t("TSTypeQuery").bases("TSType").build("exprName").field("exprName",r(o,t("TSImportType")));var c=r(t("TSCallSignatureDeclaration"),t("TSConstructSignatureDeclaration"),t("TSIndexSignature"),t("TSMethodSignature"),t("TSPropertySignature"));t("TSTypeLiteral").bases("TSType").build("members").field("members",[c]),t("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",r(t("Identifier"),String)).field("constraint",r(t("TSType"),void 0),n.undefined).field("default",r(t("TSType"),void 0),n.undefined),t("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",t("TSType")).field("expression",t("Expression")).field("extra",r({parenthesized:Boolean},null),n.null),t("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[t("TSTypeParameter")]),t("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",t("Expression")),t("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[t("TSType")]),t("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",t("Identifier")).field("const",Boolean,n.false).field("declare",Boolean,n.false).field("members",[t("TSEnumMember")]).field("initializer",r(t("Expression"),null),n.null),t("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",t("Identifier")).field("declare",Boolean,n.false).field("typeAnnotation",t("TSType")),t("TSModuleBlock").bases("Node").build("body").field("body",[t("Statement")]),t("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",r(a,o)).field("declare",Boolean,n.false).field("global",Boolean,n.false).field("body",r(t("TSModuleBlock"),t("TSModuleDeclaration"),null),n.null),t("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",a).field("qualifier",r(o,void 0),n.undefined),t("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",t("Identifier")).field("isExport",Boolean,n.false).field("moduleReference",r(o,t("TSExternalModuleReference"))),t("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",a),t("TSExportAssignment").bases("Statement").build("expression").field("expression",t("Expression")),t("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",t("Identifier")),t("TSInterfaceBody").bases("Node").build("body").field("body",[c]),t("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",o),t("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",o).field("declare",Boolean,n.false).field("extends",r([t("TSExpressionWithTypeArguments")],null),n.null).field("body",t("TSInterfaceBody")),t("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",r("public","private","protected",void 0),n.undefined).field("readonly",Boolean,n.false).field("parameter",r(t("Identifier"),t("AssignmentPattern"))),t("ClassProperty").field("access",r("public","private","protected",void 0),n.undefined),t("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),t("ClassBody").field("body",[r(t("MethodDefinition"),t("VariableDeclarator"),t("ClassPropertyDefinition"),t("ClassProperty"),t("ClassPrivateProperty"),t("ClassAccessorProperty"),t("ClassMethod"),t("ClassPrivateMethod"),t("StaticBlock"),t("TSDeclareMethod"),c)])}q(()=>module);var Ee;Ee||(Ee={});var{astNodesAreEquivalent:Du,builders:bt,builtInTypes:Ae,defineMethod:Ou,eachField:Mu,finalize:Fu,getBuilderName:Bu,getFieldNames:$l,getFieldValue:je,getSupertypeNames:_u,namedTypes:ql,NodePath:zl,Path:ju,PathVisitor:Ru,someField:Wl,Type:Uu,use:Vu,visit:$u}=vl([Kt,jl,Dn,Rl,Ul,Vl]);Object.assign(Ee,ql);var ps=Ee,un=Cs.default.SourceMapConsumer,Jl=Cs.default.SourceMapGenerator,Mn=Object.prototype.hasOwnProperty;function Kl(){return`
11
11
  `}function hn(i,s,e){return i&&Mn.call(i,s)?i[s]:e}function Hl(...i){let s={},e=i.length;for(let t=0;t<e;++t){let r=Object.keys(i[t]),n=r.length;for(let a=0;a<n;++a)s[r[a]]=!0}return s}function V(i,s){return i.line-s.line||i.column-s.column}function ze(i){return{line:i.line,column:i.column}}function Xl(i,s){if(i){if(!s)return i}else return s||null;let e=new un(i),t=new un(s),r=new Jl({file:s.file,sourceRoot:s.sourceRoot}),n={};return t.eachMapping(function(a){let o=e.originalPositionFor({line:a.originalLine,column:a.originalColumn}),l=o.source;if(l===null)return;r.addMapping({source:l,original:ze(o),generated:{line:a.generatedLine,column:a.generatedColumn},name:a.name});let c=e.sourceContentFor(l);c&&!Mn.call(n,l)&&(n[l]=c,r.setSourceContent(l,c))}),r.toJSON()}function Fn(i,s){if(!i.loc)return null;let e={start:i.loc.start,end:i.loc.end};function t(r){Or(e,r.loc)}return i.declaration&&i.declaration.decorators&&Is(i)&&i.declaration.decorators.forEach(t),V(e.start,e.end)<0&&(e.start=ze(e.start),s.skipSpaces(e.start,!1,!0),V(e.start,e.end)<0&&(e.end=ze(e.end),s.skipSpaces(e.end,!0,!0))),i.comments&&i.comments.forEach(t),e}function Or(i,s){i&&s&&(V(s.start,i.start)<0&&(i.start=s.start),V(i.end,s.end)<0&&(i.end=s.end))}function qr(i,s){let e=i.loc;if(e&&(e.start.line<1&&(e.start.line=1),e.end.line<1&&(e.end.line=1)),i.type==="File"&&(e.start=s.firstPos(),e.end=s.lastPos()),Gl(i,s),Ql(i,s),e&&i.decorators)i.decorators.forEach(function(t){Or(e,t.loc)});else if(i.declaration&&Is(i)){i.declaration.loc=null;let t=i.declaration.decorators;t&&t.forEach(function(r){Or(e,r.loc)})}else if(ps.MethodDefinition&&ps.MethodDefinition.check(i)||ps.Property.check(i)&&(i.method||i.shorthand))i.value.loc=null,ps.FunctionExpression.check(i.value)&&(i.value.id=null);else if(i.type==="ObjectTypeProperty"){let t=i.loc,r=t&&t.end;r&&(r=ze(r),s.prevPos(r)&&s.charAt(r)===","&&(r=s.skipSpaces(r,!0,!0))&&(t.end=r))}}function Gl(i,s){if(i.type!=="ForStatement")return;function e(t){let r=t&&t.loc,n=r&&r.start,a=r&&ze(r.end);for(;n&&a&&V(n,a)<0&&(s.prevPos(a),s.charAt(a)===";");)r.end.line=a.line,r.end.column=a.column}e(i.init),e(i.test),e(i.update)}function Ql(i,s){if(i.type==="TemplateLiteral"&&i.quasis.length!==0){if(i.loc){let e=ze(i.loc.start),t=i.quasis[0];V(t.loc.start,e)<0&&(t.loc.start=e);let r=ze(i.loc.end),n=i.quasis[i.quasis.length-1];V(r,n.loc.end)<0&&(n.loc.end=r)}i.expressions.forEach(function(e,t){let r=s.skipSpaces(e.loc.start,!0,!1);if(s.prevPos(r)&&s.charAt(r)==="{"&&s.prevPos(r)&&s.charAt(r)==="$"){let a=i.quasis[t];V(r,a.loc.end)<0&&(a.loc.end=r)}let n=s.skipSpaces(e.loc.end,!1,!1);if(s.charAt(n)==="}"){let a=i.quasis[t+1];V(a.loc.start,n)<0&&(a.loc.start=n)}})}}function Is(i){if(i)switch(i.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function Bn(i){let s=i.getParentNode();return i.getName()==="declaration"&&Is(s)?s:null}function $t(i,s){let e=i.trailingComma;return typeof e=="object"?!!e[s]:!!e}var Mr={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:Kl(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},Yl=Mr.hasOwnProperty;function Ns(i){let s=i||Mr;function e(t){return Yl.call(s,t)?s[t]:Mr[t]}return{tabWidth:+e("tabWidth"),useTabs:!!e("useTabs"),reuseWhitespace:!!e("reuseWhitespace"),lineTerminator:e("lineTerminator"),wrapColumn:Math.max(e("wrapColumn"),0),sourceFileName:e("sourceFileName"),sourceMapName:e("sourceMapName"),sourceRoot:e("sourceRoot"),inputSourceMap:e("inputSourceMap"),parser:e("esprima")||e("parser"),range:e("range"),tolerant:e("tolerant"),quote:e("quote"),trailingComma:e("trailingComma"),arrayBracketSpacing:e("arrayBracketSpacing"),objectCurlySpacing:e("objectCurlySpacing"),arrowParensAlways:e("arrowParensAlways"),flowObjectCommas:e("flowObjectCommas"),tokens:!!e("tokens")}}var Fr=class i{constructor(s,e,t=e){this.sourceLines=s,this.sourceLoc=e,this.targetLoc=t}slice(s,e,t=s.lastPos()){let r=this.sourceLines,n=this.sourceLoc,a=this.targetLoc;function o(l){let c=n[l],u=a[l],h=e;return l==="end"&&(h=t),Zl(r,c,s,u,h)}if(V(e,a.start)<=0)if(V(a.end,t)<=0)a={start:qe(a.start,e.line,e.column),end:qe(a.end,e.line,e.column)};else{if(V(t,a.start)<=0)return null;n={start:n.start,end:o("end")},a={start:qe(a.start,e.line,e.column),end:qe(t,e.line,e.column)}}else{if(V(a.end,e)<=0)return null;V(a.end,t)<=0?(n={start:o("start"),end:n.end},a={start:{line:1,column:0},end:qe(a.end,e.line,e.column)}):(n={start:o("start"),end:o("end")},a={start:{line:1,column:0},end:qe(t,e.line,e.column)})}return new i(this.sourceLines,n,a)}add(s,e){return new i(this.sourceLines,this.sourceLoc,{start:pn(this.targetLoc.start,s,e),end:pn(this.targetLoc.end,s,e)})}subtract(s,e){return new i(this.sourceLines,this.sourceLoc,{start:qe(this.targetLoc.start,s,e),end:qe(this.targetLoc.end,s,e)})}indent(s,e=!1,t=!1){if(s===0)return this;let r=this.targetLoc,n=r.start.line,a=r.end.line;if(e&&n===1&&a===1)return this;if(r={start:r.start,end:r.end},!e||n>1){let o=r.start.column+s;r.start={line:n,column:t?Math.max(0,o):o}}if(!e||a>1){let o=r.end.column+s;r.end={line:a,column:t?Math.max(0,o):o}}return new i(this.sourceLines,this.sourceLoc,r)}};function pn(i,s,e){return{line:i.line+s-1,column:i.line===1?i.column+e:i.column}}function qe(i,s,e){return{line:i.line-s+1,column:i.line===s?i.column-e:i.column}}function Zl(i,s,e,t,r){let n=V(t,r);if(n===0)return s;let a,o;if(n<0){a=i.skipSpaces(s)||i.lastPos(),o=e.skipSpaces(t)||e.lastPos();let l=r.line-o.line;for(a.line+=l,o.line+=l,l>0&&(a.column=0,o.column=0);V(o,r)<0&&e.nextPos(o,!0););}else{a=i.skipSpaces(s,!0)||i.firstPos(),o=e.skipSpaces(t,!0)||e.firstPos();let l=r.line-o.line;for(a.line+=l,o.line+=l,l<0&&(a.column=i.getLineLength(a.line),o.column=e.getLineLength(o.line));V(r,o)<0&&e.prevPos(o,!0););}return a}var ec=Object.defineProperty,tc=(i,s,e)=>s in i?ec(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,Ft=(i,s,e)=>(tc(i,typeof s!="symbol"?s+"":s,e),e),gt=class i{constructor(s,e=null){this.infos=s,Ft(this,"length"),Ft(this,"name"),Ft(this,"mappings",[]),Ft(this,"cachedSourceMap",null),Ft(this,"cachedTabWidth"),this.length=s.length,this.name=e||null,this.name&&this.mappings.push(new Fr(this,{start:this.firstPos(),end:this.lastPos()}))}toString(s){return this.sliceString(this.firstPos(),this.lastPos(),s)}getSourceMap(s,e){if(!s)return null;let t=this;function r(o){return o=o||{},o.file=s,e&&(o.sourceRoot=e),o}if(t.cachedSourceMap)return r(t.cachedSourceMap.toJSON());let n=new Cs.default.SourceMapGenerator(r()),a={};return t.mappings.forEach(function(o){let l=o.sourceLines.skipSpaces(o.sourceLoc.start)||o.sourceLines.lastPos(),c=t.skipSpaces(o.targetLoc.start)||t.lastPos();for(;V(l,o.sourceLoc.end)<0&&V(c,o.targetLoc.end)<0;){o.sourceLines.charAt(l),t.charAt(c);let u=o.sourceLines.name;if(n.addMapping({source:u,original:{line:l.line,column:l.column},generated:{line:c.line,column:c.column}}),!Br.call(a,u)){let h=o.sourceLines.toString();n.setSourceContent(u,h),a[u]=h}t.nextPos(c,!0),o.sourceLines.nextPos(l,!0)}}),t.cachedSourceMap=n,n.toJSON()}bootstrapCharAt(s){let e=s.line,t=s.column,r=this.toString().split(_r),n=r[e-1];return typeof n>"u"?"":t===n.length&&e<r.length?`
12
12
  `:t>=n.length?"":n.charAt(t)}charAt(s){let e=s.line,t=s.column,r=this,n=r.infos,a=n[e-1],o=t;if(typeof a>"u"||o<0)return"";let l=this.getIndentAt(e);return o<l?" ":(o+=a.sliceStart-l,o===a.sliceEnd&&e<this.length?`
13
13
  `:o>=a.sliceEnd?"":a.line.charAt(o))}stripMargin(s,e){if(s===0)return this;if(e&&this.length===1)return this;let t=new i(this.infos.map(function(r,n){return r.line&&(n>0||!e)&&(r={...r,indent:Math.max(0,r.indent-s)}),r}));if(this.mappings.length>0){let r=t.mappings;this.mappings.forEach(function(n){r.push(n.indent(s,e,!0))})}return t}indent(s){if(s===0)return this;let e=new i(this.infos.map(function(t){return t.line&&!t.locked&&(t={...t,indent:t.indent+s}),t}));if(this.mappings.length>0){let t=e.mappings;this.mappings.forEach(function(r){t.push(r.indent(s))})}return e}indentTail(s){if(s===0)return this;if(this.length<2)return this;let e=new i(this.infos.map(function(t,r){return r>0&&t.line&&!t.locked&&(t={...t,indent:t.indent+s}),t}));if(this.mappings.length>0){let t=e.mappings;this.mappings.forEach(function(r){t.push(r.indent(s,!0))})}return e}lockIndentTail(){return this.length<2?this:new i(this.infos.map((s,e)=>({...s,locked:e>0})))}getIndentAt(s){return Math.max(this.infos[s-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let s=[],e=0;for(let n=1,a=this.length;n<=a;++n){let o=this.infos[n-1],l=o.line.slice(o.sliceStart,o.sliceEnd);if(ft(l))continue;let c=Math.abs(o.indent-e);s[c]=~~s[c]+1,e=o.indent}let t=-1,r=2;for(let n=1;n<s.length;n+=1)Br.call(s,n)&&s[n]>t&&(t=s[n],r=n);return this.cachedTabWidth=r}startsWithComment(){if(this.infos.length===0)return!1;let s=this.infos[0],e=s.sliceStart,t=s.sliceEnd,r=s.line.slice(e,t).trim();return r.length===0||r.slice(0,2)==="//"||r.slice(0,2)==="/*"}isOnlyWhitespace(){return ft(this.toString())}isPrecededOnlyByWhitespace(s){let e=this.infos[s.line-1],t=Math.max(e.indent,0),r=s.column-t;if(r<=0)return!0;let n=e.sliceStart,a=Math.min(n+r,e.sliceEnd),o=e.line.slice(n,a);return ft(o)}getLineLength(s){let e=this.infos[s-1];return this.getIndentAt(s)+e.sliceEnd-e.sliceStart}nextPos(s,e=!1){let t=Math.max(s.line,0);return Math.max(s.column,0)<this.getLineLength(t)?(s.column+=1,e?!!this.skipSpaces(s,!1,!0):!0):t<this.length?(s.line+=1,s.column=0,e?!!this.skipSpaces(s,!1,!0):!0):!1}prevPos(s,e=!1){let t=s.line,r=s.column;if(r<1){if(t-=1,t<1)return!1;r=this.getLineLength(t)}else r=Math.min(r-1,this.getLineLength(t));return s.line=t,s.column=r,e?!!this.skipSpaces(s,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(s,e=!1,t=!1){if(s?s=t?s:{line:s.line,column:s.column}:e?s=this.lastPos():s=this.firstPos(),e){for(;this.prevPos(s);)if(!ft(this.charAt(s))&&this.nextPos(s))return s;return null}else{for(;ft(this.charAt(s));)if(!this.nextPos(s))return null;return s}}trimLeft(){let s=this.skipSpaces(this.firstPos(),!1,!0);return s?this.slice(s):Ge}trimRight(){let s=this.skipSpaces(this.lastPos(),!0,!0);return s?this.slice(this.firstPos(),s):Ge}trim(){let s=this.skipSpaces(this.firstPos(),!1,!0);if(s===null)return Ge;let e=this.skipSpaces(this.lastPos(),!0,!0);return e===null?Ge:this.slice(s,e)}eachPos(s,e=this.firstPos(),t=!1){let r=this.firstPos();if(e&&(r.line=e.line,r.column=e.column),!(t&&!this.skipSpaces(r,!1,!0)))do s.call(this,r);while(this.nextPos(r,t))}bootstrapSlice(s,e){let t=this.toString().split(_r).slice(s.line-1,e.line);return t.length>0&&(t.push(t.pop().slice(0,e.column)),t[0]=t[0].slice(s.column)),S(t.join(`
@@ -103,5 +103,5 @@ ${" ".repeat(6+r)}^`),c));s+=`
103
103
  ${l.join(`
104
104
  `)}
105
105
  `}this.message=s}},Dc=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),ta=new Set(["string","number","boolean","bigint","symbol","undefined"]),ee=bt;function Oc(i){return/^[$A-Z_a-z][\w$]*$/.test(i)}var Jr="__magicast_proxy";function ce(i,s=new Set){if(i===void 0)return ee.identifier("undefined");if(i===null)return ee.literal(null);if(ta.has(typeof i))return ee.literal(i);if(s.has(i))throw new re("Can not serialize circular reference");if(s.add(i),i[Jr])return i.$ast;if(i instanceof RegExp){let e=ee.regExpLiteral(i.source,i.flags);return delete e.extra.raw,e}return i instanceof Set?ee.newExpression(ee.identifier("Set"),[ee.arrayExpression([...i].map(e=>ce(e,s)))]):i instanceof Date?ee.newExpression(ee.identifier("Date"),[ee.literal(i.toISOString())]):i instanceof Map?ee.newExpression(ee.identifier("Map"),[ee.arrayExpression([...i].map(([e,t])=>ee.arrayExpression([ce(e,s),ce(t,s)])))]):Array.isArray(i)?ee.arrayExpression(i.map(e=>ce(e,s))):typeof i=="object"?ee.objectExpression(Object.entries(i).map(([e,t])=>ee.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?ee.identifier(e):ee.literal(e),ce(t,s)))):ee.literal(i)}function Mc(i,s={}){let e=s;return e[Jr]=!0,e.$ast=i,e.$type||(e.$type="object"),e}var Fc={enumerable:!0,configurable:!0};function be(i,s,e){let t=Mc(i,s);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==Jr&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return Fc},has(r,n){return n in t},...e,get(r,n,a){if(n in t)return t[n];if(e.get)return e.get(r,n,a)},set(r,n,a,o){return n in t?(t[n]=a,!0):e.set?e.set(r,n,a,o):!1}})}var de=bt,Lr=new WeakMap;function Bc(i,s,e){if(Lr.has(s))return Lr.get(s);let t=be(s,{get $declaration(){return i},get imported(){return s.type==="ImportDefaultSpecifier"?"default":s.type==="ImportNamespaceSpecifier"?"*":s.imported.type==="Identifier"?s.imported.name:s.imported.value},set imported(r){if(s.type!=="ImportSpecifier")throw new re("Changing import name is not yet implemented");s.imported.type==="Identifier"?s.imported.name=r:s.imported.value=r},get local(){return s.local.name},set local(r){s.local.name=r},get from(){return i.source.value},set from(r){if(r===i.source.value)return;i.specifiers=i.specifiers.filter(a=>a!==s),i.specifiers.length===0&&(e.body=e.body.filter(a=>a!==i));let n=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===r);n?n.specifiers.push(s):e.body.unshift(de.importDeclaration([s],de.stringLiteral(r)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return Lr.set(s,t),t}function _c(i,s){let e=()=>{let a=[];for(let o of i.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(Bc(o,l,i));return a},t=(a,o,l)=>{let c=e(),u=c.find(p=>p.local===a),h=o.local||a;if(u)return u.imported=o.imported,u.local=h,u.from=o.from,!0;let f=o.imported==="default"?de.importDefaultSpecifier(de.identifier(h)):o.imported==="*"?de.importNamespaceSpecifier(de.identifier(h)):de.importSpecifier(de.identifier(o.imported),de.identifier(h)),d=c.find(p=>p.from===o.from)?.$declaration;if(d)d.specifiers.push(f);else if(l==="prepend"||c.length===0)i.body.unshift(de.importDeclaration([f],de.stringLiteral(o.from)));else{let p=c.at(-1).$declaration,g=i.body.indexOf(p);i.body.splice(g+1,0,de.importDeclaration([f],de.stringLiteral(o.from)))}return!0},r=a=>{let o=e().find(u=>u.local===a);if(!o)return!1;let l=o.$declaration,c=o.$ast;return l.specifiers=l.specifiers.filter(u=>u!==c),l.specifiers.length===0&&(i.body=i.body.filter(u=>u!==l)),!0};return be(i,{$type:"imports",$add(a){t(a.local||a.imported,a,"prepend")},$prepend(a){t(a.local||a.imported,a,"prepend")},$append(a){t(a.local||a.imported,a,"append")},get $items(){return e()},toJSON(){return e().reduce((a,o)=>(a[o.local]=o,a),{})}},{get(a,o){return e().find(l=>l.local===o)},set(a,o,l){return t(o,l,"prepend")},deleteProperty(a,o){return r(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(l=>l.local===o)}})}function ks(i,s,e){let t=n=>s[n],r=(n,a)=>{s[n]=a};return be(i,{$type:"array",push(n){s.push(ce(n))},pop(){return le(s.pop(),e)},unshift(n){s.unshift(ce(n))},shift(){return le(s.shift(),e)},splice(n,a,...o){return s.splice(n,a,...o.map(c=>ce(c))).map(c=>le(c,e))},find(n){return s.map(a=>le(a,e)).find(n)},findIndex(n){return s.map(a=>le(a,e)).findIndex(n)},includes(n){return s.map(a=>le(a,e)).includes(n)},toJSON(){return s.map(n=>le(n,e))}},{get(n,a){if(a==="length")return s.length;if(a===Symbol.iterator)return function*(){for(let c of s)yield le(c,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let l=t(o);if(l)return le(l,e)},set(n,a,o){if(typeof a=="symbol")return!1;let l=+a;return Number.isNaN(l)?!1:(r(l,ce(o)),!0)},deleteProperty(n,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(s[o]=ce(void 0),!0)},ownKeys(){return["length",...s.map((n,a)=>a.toString())]}})}function jc(i,s){if("elements"in i)return ks(i,i.elements,s)}function sa(i,s){if(i.type!=="CallExpression")throw new re("Not a function call");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new re("Not implemented")}let t=ks(i,i.arguments,s);return be(i,{$type:"function-call",$callee:e(i.callee),$args:t},{})}function Rc(i,s){if(i.type!=="ArrowFunctionExpression")throw new re("Not an arrow function expression");let e=ks(i,i.params,s);return be(i,{$type:"arrow-function-expression",$params:e,$body:le(i.body,s)},{})}var Uc=bt;function Vc(i,s){if(!("properties"in i))return;let e=n=>{for(let a of i.properties){if("key"in a&&"name"in a.key&&a.key.name===n)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===n)return a.value.value??a.value}},t=(n,a=!1)=>{if("key"in n&&"name"in n.key)return n.key.name;if(n.type==="ObjectProperty"&&(n.key.type==="StringLiteral"||n.key.type==="NumericLiteral"||n.key.type==="BooleanLiteral"))return n.key.value.toString();if(a)throw new re(`Casting "${n.type}" is not supported`,{ast:n,code:s?.$code})},r=(n,a)=>{let o=i.properties.find(l=>t(l)===n);o?o.value=a:Oc(n)?i.properties.push({type:"Property",key:{type:"Identifier",name:n},value:a}):i.properties.push({type:"ObjectProperty",key:Uc.stringLiteral(n),value:a})};return be(i,{$type:"object",toJSON(){return i.properties.reduce((n,a)=>("key"in a&&"name"in a.key&&(n[a.key.name]=le(a.value,s)),n),{})}},{get(n,a){let o=e(a);if(o)return le(o,s)},set(n,a,o){return typeof a!="string"&&(a=String(a)),r(a,ce(o)),!0},deleteProperty(n,a){typeof a!="string"&&(a=String(a));let o=i.properties.findIndex(l=>"key"in l&&"name"in l.key&&l.key.name===a);return o!==-1&&i.properties.splice(o,1),!0},ownKeys(){return i.properties.map(n=>t(n,!0)).filter(Boolean)}})}function ra(i,s){if(i.type!=="NewExpression")throw new re("Not a new expression");function e(r){if(r.type==="Identifier")return r.name;if(r.type==="MemberExpression")return`${e(r.object)}.${e(r.property)}`;throw new re("Not implemented")}let t=ks(i,i.arguments,s);return be(i,{$type:"new-expression",$callee:e(i.callee),$args:t},{})}function $c(i){if(i.type!=="Identifier")throw new re("Not an identifier");return be(i,{$type:"identifier",$name:i.name},{})}function qc(i){if(i.type!=="LogicalExpression")throw new re("Not a logical expression");return be(i,{$type:"logicalExpression"},{})}function zc(i){if(i.type!=="MemberExpression")throw new re("Not a member expression");return be(i,{$type:"memberExpression"},{})}var Dr=new WeakMap;function le(i,s){if(ta.has(typeof i))return i;if(Dc.has(i.type))return i.value;if(Dr.has(i))return Dr.get(i);let e;switch(i.type){case"ObjectExpression":{e=Vc(i,s);break}case"ArrayExpression":{e=jc(i,s);break}case"CallExpression":{e=sa(i,s);break}case"ArrowFunctionExpression":{e=Rc(i,s);break}case"NewExpression":{e=ra(i,s);break}case"Identifier":{e=$c(i);break}case"LogicalExpression":{e=qc(i);break}case"MemberExpression":{e=zc(i);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=le(i.expression,s);break}default:throw new re(`Casting "${i.type}" is not supported`,{ast:i,code:s?.$code})}return Dr.set(i,e),e}var Ut=bt;function Wc(i,s){let e=r=>{let n=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of i.body)if(a.type===n){if(r==="default")return a.declaration;if(a.declaration&&"declarations"in a.declaration){let o=a.declaration.declarations[0];if("name"in o.id&&o.id.name===r)return o.init}}},t=(r,n)=>{let a=r==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=ce(n);for(let l of i.body)if(l.type===a){if(r==="default"){l.declaration=o;return}if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===r){c.init=o;return}}}i.body.push(r==="default"?Ut.exportDefaultDeclaration(o):Ut.exportNamedDeclaration(Ut.variableDeclaration("const",[Ut.variableDeclarator(Ut.identifier(r),o)])))};return be(i,{$type:"exports"},{get(r,n){let a=e(n);if(a)return le(a,s)},set(r,n,a){return t(n,a),!0},ownKeys(){return i.body.flatMap(r=>r.type==="ExportDefaultDeclaration"?["default"]:r.type==="ExportNamedDeclaration"&&r.declaration&&"declarations"in r.declaration?r.declaration.declarations.map(n=>"name"in n.id?n.id.name:""):[]).filter(Boolean)},deleteProperty(r,n){let a=n==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<i.body.length;o++){let l=i.body[o];if(l.type===a){if(n==="default")return i.body.splice(o,1),!0;if(l.declaration&&"declarations"in l.declaration){let c=l.declaration.declarations[0];if("name"in c.id&&c.id.name===n)return i.body.splice(o,1),!0}}}return!1}})}function Jc(i,s){let e=i.program;if(e.type!=="Program")throw new re(`Cannot proxify ${i.type} as module`);let t={$code:s,$type:"module"},r=be(e,t,{ownKeys(){return["imports","exports","generate"]}});return t.exports=Wc(e,r),t.imports=_c(e),t.generate=n=>Kr(r,n),r}function ia(i,s={}){let e={wrapColumn:s.wrapColumn===void 0,indent:s.tabWidth===void 0||s.useTabs===void 0,quote:s.quote===void 0,arrowParens:s.arrowParensAlways===void 0,trailingComma:s.trailingComma===void 0},t=2,r=0,n=0,a=0,o=0,l=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,c={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},u=(i||"").split(`
106
- `),h=!1;for(let f of u){let d=f.trim();if(d.length!==0){if(e.wrapColumn&&f.length>a&&(a=f.length),e.indent){let p=f.match(/^\s+/)?.[0]||"";p.length>0&&(p.length>0&&p.length<t&&(t=p.length),p[0]===" "?r++:p.length>0&&r--)}if(d.at(-1)===";"?n++:d.length>0&&n--,e.quote||e.arrowParens){let p=d.matchAll(l);for(let g of p)if(g.groups)for(let y in c)g.groups[y]&&c[y]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(h?o++:o--),h=d.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:n>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...s}}function na(i,s){let e=qn(i,{parser:s?.parser||ea(),...s});return Jc(e,i)}function aa(i,s){let e=qn("("+i+")",{parser:s?.parser||ea(),...s}),t=e.program.body[0];t.type==="ExpressionStatement"&&(t=t.expression),t.extra?.parenthesized&&(t.extra.parenthesized=!1);let r={$ast:e,$code:" "+i+" ",$type:"module"};return le(t,r)}function Kr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:ia(i.$code,s.format),{code:r,map:n}=Ic(e,{...s,...t});return{code:r,map:n}}async function Kc(i,s={}){let e=await bs.promises.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,na(e,s)}async function Hc(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=Kr(t,e);await bs.promises.writeFile(s,r),n&&await bs.promises.writeFile(s+".map",n)}var ys=bt,Xc={functionCall(i,...s){let e=ys.callExpression(ys.identifier(i),s.map(t=>ce(t)));return sa(e)},newExpression(i,...s){let e=ys.newExpression(ys.identifier(i),s.map(t=>ce(t)));return ra(e)},literal(i){return ce(i)},raw(i){return aa(i)}};var Ne=Re(require("@sentry/node"),1);var Gc="1.13.1",oa=process.env.OVERRIDE_VERSION??Gc;var Xr=Re(require("prettier"),1);async function ha(i,s){let e=await(0,ue.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let n=R.default.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name))try{let a=await ha(n,s);t.push(...a)}catch(a){Ne.captureException(a,{tags:{errorType:"filesystem_permission",component:"readdirRecursive"},extra:{directory:n,errorCode:a.code}})}}else t.push(n)}return t}async function pa(i){let s=new Set,e=(...c)=>{if(process.env.DEBUG){let u=new Date,h=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(h,"[builder-dev-tools]",...c)}},t=async c=>{let u=(0,la.createHash)("md5");return u.update(c),u.digest("hex")},r=R.default.normalize(R.default.resolve(process.cwd(),i.cwd)),n=su(R.default.normalize(i.cwd))??r,a=ru(R.default.normalize(i.cwd))??n,o={...R.default,getCwdDir:()=>r,getRepoRootDir:()=>n,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async c=>{try{return await(0,ue.access)(c),!0}catch{return!1}},magicast:Hr,existsSync:c=>(0,K.existsSync)(c),readdir:async(c,u)=>{let h=await(0,ue.readdir)(c);return u?h.map(f=>R.default.join(c,f)):h},readdirRecursive:async(c,u)=>ha(c,new Set(u)),readdirSync:c=>(0,K.readdirSync)(c),readFile:async c=>{try{return await(0,ue.readFile)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSync(c){try{return(0,K.readFileSync)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSyncBuffer(c){try{return new Uint8Array((0,K.readFileSync)(c,{encoding:null}))}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:Ze.spawnSync,stat:async c=>await(0,ue.stat)(c),statSync:c=>(0,K.statSync)(c),unlinkSync:c=>{(0,K.unlinkSync)(c)},unlink:async c=>{await(0,ue.unlink)(c)},writeFile:async(c,u)=>{c=R.default.normalize(c);let h={path:c,basename:R.default.basename(c),dirname:R.default.dirname(c),extname:R.default.extname(c)};await(0,ue.mkdir)(R.default.dirname(c),{recursive:!0}),await(0,ue.writeFile)(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${(0,Ls.hostname)()}:${(0,Ls.homedir)()}`),formatCode:async(c,u)=>{let h=null;try{h=await Xr.default.resolveConfig(c)}catch{}try{return Xr.default.format(u,{...h,filepath:c})}catch{}return u},on:(c,u)=>{c==="change"&&s.add(u)},off:(c,u)=>{c==="change"&&s.delete(u)},debug:e,launchEditor:async c=>{try{let u=c.filePath;typeof c.line=="number"&&(u+=`:${c.line}`,typeof c.column=="number"&&(u+=`:${c.column}`)),(0,ua.default)(u,"code",(h,f)=>{Ne.captureException(new Error(`Failed to launch editor for ${f}`),{extra:{pathFile:h}})})}catch(u){Ne.captureException(new Error("Failed to launch editor",{cause:u}))}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async c=>{let u=R.default.normalize(c??i.cwd);return{hasGit:Zc(u),remoteUrl:Qc(u),defaultBranch:Yc(u),commit:eu(u),currentBranch:tu(u)}},getFrameworks:()=>[],ts:ca.default,Sentry:Ne,connectionTracker:null,version:oa,sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null};o.connectionTracker=new Xt(o);let l=await ni(o);return o.getFrameworks=()=>l,o}function Qc(i){try{return((0,Ze.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return Ne.captureException(new Error("Error getting git remote URL:",{cause:s})),""}}function Yc(i){let s="master";try{let e=(0,Ze.spawnSync)("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
106
+ `),h=!1;for(let f of u){let d=f.trim();if(d.length!==0){if(e.wrapColumn&&f.length>a&&(a=f.length),e.indent){let p=f.match(/^\s+/)?.[0]||"";p.length>0&&(p.length>0&&p.length<t&&(t=p.length),p[0]===" "?r++:p.length>0&&r--)}if(d.at(-1)===";"?n++:d.length>0&&n--,e.quote||e.arrowParens){let p=d.matchAll(l);for(let g of p)if(g.groups)for(let y in c)g.groups[y]&&c[y]++}e.trailingComma&&((f.startsWith("}")||f.startsWith("]"))&&(h?o++:o--),h=d.endsWith(","))}}return{wrapColumn:a,useTabs:r>0,tabWidth:t,quote:c.singleQuote>c.doubleQuote?"single":"double",arrowParensAlways:c.singleParam>0,trailingComma:o>0||c.trailingComma>0,useSemi:n>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...s}}function na(i,s){let e=qn(i,{parser:s?.parser||ea(),...s});return Jc(e,i)}function aa(i,s){let e=qn("("+i+")",{parser:s?.parser||ea(),...s}),t=e.program.body[0];t.type==="ExpressionStatement"&&(t=t.expression),t.extra?.parenthesized&&(t.extra.parenthesized=!1);let r={$ast:e,$code:" "+i+" ",$type:"module"};return le(t,r)}function Kr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:ia(i.$code,s.format),{code:r,map:n}=Ic(e,{...s,...t});return{code:r,map:n}}async function Kc(i,s={}){let e=await bs.promises.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,na(e,s)}async function Hc(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=Kr(t,e);await bs.promises.writeFile(s,r),n&&await bs.promises.writeFile(s+".map",n)}var ys=bt,Xc={functionCall(i,...s){let e=ys.callExpression(ys.identifier(i),s.map(t=>ce(t)));return sa(e)},newExpression(i,...s){let e=ys.newExpression(ys.identifier(i),s.map(t=>ce(t)));return ra(e)},literal(i){return ce(i)},raw(i){return aa(i)}};var Ne=Re(require("@sentry/node"),1);var Gc="1.13.2",oa=process.env.OVERRIDE_VERSION??Gc;var Xr=Re(require("prettier"),1);async function ha(i,s){let e=await(0,ue.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let n=R.default.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name))try{let a=await ha(n,s);t.push(...a)}catch(a){Ne.captureException(a,{tags:{errorType:"filesystem_permission",component:"readdirRecursive"},extra:{directory:n,errorCode:a.code}})}}else t.push(n)}return t}async function pa(i){let s=new Set,e=(...c)=>{if(process.env.DEBUG){let u=new Date,h=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(h,"[builder-dev-tools]",...c)}},t=async c=>{let u=(0,la.createHash)("md5");return u.update(c),u.digest("hex")},r=R.default.normalize(R.default.resolve(process.cwd(),i.cwd)),n=su(R.default.normalize(i.cwd))??r,a=ru(R.default.normalize(i.cwd))??n,o={...R.default,getCwdDir:()=>r,getRepoRootDir:()=>n,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async c=>{try{return await(0,ue.access)(c),!0}catch{return!1}},magicast:Hr,existsSync:c=>(0,K.existsSync)(c),readdir:async(c,u)=>{let h=await(0,ue.readdir)(c);return u?h.map(f=>R.default.join(c,f)):h},readdirRecursive:async(c,u)=>ha(c,new Set(u)),readdirSync:c=>(0,K.readdirSync)(c),readFile:async c=>{try{return await(0,ue.readFile)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSync(c){try{return(0,K.readFileSync)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},readFileSyncBuffer(c){try{return new Uint8Array((0,K.readFileSync)(c,{encoding:null}))}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:Ze.spawnSync,stat:async c=>await(0,ue.stat)(c),statSync:c=>(0,K.statSync)(c),unlinkSync:c=>{(0,K.unlinkSync)(c)},unlink:async c=>{await(0,ue.unlink)(c)},writeFile:async(c,u)=>{c=R.default.normalize(c);let h={path:c,basename:R.default.basename(c),dirname:R.default.dirname(c),extname:R.default.extname(c)};await(0,ue.mkdir)(R.default.dirname(c),{recursive:!0}),await(0,ue.writeFile)(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${(0,Ls.hostname)()}:${(0,Ls.homedir)()}`),formatCode:async(c,u)=>{let h=null;try{h=await Xr.default.resolveConfig(c)}catch{}try{return Xr.default.format(u,{...h,filepath:c})}catch{}return u},on:(c,u)=>{c==="change"&&s.add(u)},off:(c,u)=>{c==="change"&&s.delete(u)},debug:e,launchEditor:async c=>{try{let u=c.filePath;typeof c.line=="number"&&(u+=`:${c.line}`,typeof c.column=="number"&&(u+=`:${c.column}`)),(0,ua.default)(u,"code",(h,f)=>{Ne.captureException(new Error(`Failed to launch editor for ${f}`),{extra:{pathFile:h}})})}catch(u){Ne.captureException(new Error("Failed to launch editor",{cause:u}))}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async c=>{let u=R.default.normalize(c??i.cwd);return{hasGit:Zc(u),remoteUrl:Qc(u),defaultBranch:Yc(u),commit:eu(u),currentBranch:tu(u)}},getFrameworks:()=>[],ts:ca.default,Sentry:Ne,connectionTracker:null,version:oa,sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null};o.connectionTracker=new Xt(o);let l=await ni(o);return o.getFrameworks=()=>l,o}function Qc(i){try{return((0,Ze.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return Ne.captureException(new Error("Error getting git remote URL:",{cause:s})),""}}function Yc(i){let s="master";try{let e=(0,Ze.spawnSync)("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
107
107
  `).map(r=>r.trim()).includes("origin/main")?"main":s}catch(e){return Ne.captureException(new Error("Error getting git default branch name:",{cause:e})),s}}function Zc(i){try{return((0,Ze.spawnSync)("git",["rev-parse","--is-inside-work-tree"],{cwd:i}).stdout||"").toString().trim()==="true"}catch(s){return Ne.captureException(new Error("Error getting git commit:",{cause:s})),!1}}function eu(i){try{return((0,Ze.spawnSync)("git",["rev-parse","HEAD"],{cwd:i}).stdout||"").toString().trim()}catch(s){return Ne.captureException(new Error("Error getting git commit:",{cause:s})),""}}function tu(i){try{return((0,Ze.spawnSync)("git",["branch","--show-current"],{cwd:i}).stdout||"").toString().trim()}catch(s){return Ne.captureException(new Error("Error getting current branch name:",{cause:s})),""}}function su(i){let s=R.default.resolve("/");for(let e=0;e<20;e++){let t=R.default.join(i,"package.json");if((0,K.existsSync)(t))return i;if(i===s)break;i=R.default.dirname(i)}return null}function ru(i){let s=R.default.resolve("/");for(let e=0;e<20;e++){if((0,K.existsSync)(R.default.join(i,"builder.config.json"))||(0,K.existsSync)(R.default.join(i,"fusion.config.json"))||(0,K.existsSync)(R.default.join(i,"package.json"))||(0,K.existsSync)(R.default.join(i,"remix.config.js"))||(0,K.existsSync)(R.default.join(i,"remix.config.mjs"))||(0,K.existsSync)(R.default.join(i,"remix.config.ts"))||(0,K.existsSync)(R.default.join(i,"vite.config.js"))||(0,K.existsSync)(R.default.join(i,"vite.config.ts"))||(0,K.existsSync)(R.default.join(i,"vite.config.mjs"))||(0,K.existsSync)(R.default.join(i,"next.config.js"))||(0,K.existsSync)(R.default.join(i,"next.config.ts"))||(0,K.existsSync)(R.default.join(i,"angular.json"))||(0,K.existsSync)(R.default.join(i,"project.json"))||(0,K.existsSync)(R.default.join(i,"tsconfig.json")))return i;if(i===s)break;i=R.default.dirname(i)}return null}0&&(module.exports={createDevToolsNodeSys});