builder.io 1.3.4 → 1.3.5

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,146 +1,106 @@
1
- "use strict";var JS=Object.create;var bi=Object.defineProperty;var KS=Object.getOwnPropertyDescriptor;var XS=Object.getOwnPropertyNames;var QS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty;var _=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),zh=(r,t)=>{for(var e in t)bi(r,e,{get:t[e],enumerable:!0})},Jh=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of XS(t))!ZS.call(r,n)&&n!==e&&bi(r,n,{get:()=>t[n],enumerable:!(s=KS(t,n))||s.enumerable});return r};var zt=(r,t,e)=>(e=r!=null?JS(QS(r)):{},Jh(t||!r||!r.__esModule?bi(e,"default",{value:r,enumerable:!0}):e,r)),e_=r=>Jh(bi({},"__esModule",{value:!0}),r);var Qh=_((sO,Xh)=>{"use strict";Xh.exports=function(){if(process.env.npm_config_user_agent)return t_(process.env.npm_config_user_agent)};function t_(r){let t=r.split(" ")[0],e=t.lastIndexOf("/"),s=t.substring(0,e);return{name:s==="npminstall"?"cnpm":s,version:t.substring(e+1)}}});var nd=_(Ho=>{var rd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ho.encode=function(r){if(0<=r&&r<rd.length)return rd[r];throw new TypeError("Must be between 0 and 63: "+r)};Ho.decode=function(r){var t=65,e=90,s=97,n=122,i=48,a=57,o=43,c=47,l=26,u=52;return t<=r&&r<=e?r-t:s<=r&&r<=n?r-s+l:i<=r&&r<=a?r-i+u:r==o?62:r==c?63:-1}});var Wo=_(Yo=>{var id=nd(),Vo=5,ad=1<<Vo,od=ad-1,cd=ad;function n_(r){return r<0?(-r<<1)+1:(r<<1)+0}function i_(r){var t=(r&1)===1,e=r>>1;return t?-e:e}Yo.encode=function(t){var e="",s,n=n_(t);do s=n&od,n>>>=Vo,n>0&&(s|=cd),e+=id.encode(s);while(n>0);return e};Yo.decode=function(t,e,s){var n=t.length,i=0,a=0,o,c;do{if(e>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(c=id.decode(t.charCodeAt(e++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(e-1));o=!!(c&cd),c&=od,i=i+(c<<a),a+=Vo}while(o);s.value=i_(i),s.rest=e}});var Vs=_(ye=>{function a_(r,t,e){if(t in r)return r[t];if(arguments.length===3)return e;throw new Error('"'+t+'" is a required argument.')}ye.getArg=a_;var ld=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,o_=/^data:.+\,.+$/;function Hr(r){var t=r.match(ld);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}ye.urlParse=Hr;function Hs(r){var t="";return r.scheme&&(t+=r.scheme+":"),t+="//",r.auth&&(t+=r.auth+"@"),r.host&&(t+=r.host),r.port&&(t+=":"+r.port),r.path&&(t+=r.path),t}ye.urlGenerate=Hs;var c_=32;function l_(r){var t=[];return function(e){for(var s=0;s<t.length;s++)if(t[s].input===e){var n=t[0];return t[0]=t[s],t[s]=n,t[0].result}var i=r(e);return t.unshift({input:e,result:i}),t.length>c_&&t.pop(),i}}var zo=l_(function(t){var e=t,s=Hr(t);if(s){if(!s.path)return t;e=s.path}for(var n=ye.isAbsolute(e),i=[],a=0,o=0;;)if(a=o,o=e.indexOf("/",a),o===-1){i.push(e.slice(a));break}else for(i.push(e.slice(a,o));o<e.length&&e[o]==="/";)o++;for(var c,l=0,o=i.length-1;o>=0;o--)c=i[o],c==="."?i.splice(o,1):c===".."?l++:l>0&&(c===""?(i.splice(o+1,l),l=0):(i.splice(o,2),l--));return e=i.join("/"),e===""&&(e=n?"/":"."),s?(s.path=e,Hs(s)):e});ye.normalize=zo;function ud(r,t){r===""&&(r="."),t===""&&(t=".");var e=Hr(t),s=Hr(r);if(s&&(r=s.path||"/"),e&&!e.scheme)return s&&(e.scheme=s.scheme),Hs(e);if(e||t.match(o_))return t;if(s&&!s.host&&!s.path)return s.host=t,Hs(s);var n=t.charAt(0)==="/"?t:zo(r.replace(/\/+$/,"")+"/"+t);return s?(s.path=n,Hs(s)):n}ye.join=ud;ye.isAbsolute=function(r){return r.charAt(0)==="/"||ld.test(r)};function u_(r,t){r===""&&(r="."),r=r.replace(/\/$/,"");for(var e=0;t.indexOf(r+"/")!==0;){var s=r.lastIndexOf("/");if(s<0||(r=r.slice(0,s),r.match(/^([^\/]+:\/)?\/*$/)))return t;++e}return Array(e+1).join("../")+t.substr(r.length+1)}ye.relative=u_;var pd=function(){var r=Object.create(null);return!("__proto__"in r)}();function hd(r){return r}function p_(r){return dd(r)?"$"+r:r}ye.toSetString=pd?hd:p_;function h_(r){return dd(r)?r.slice(1):r}ye.fromSetString=pd?hd:h_;function dd(r){if(!r)return!1;var t=r.length;if(t<9||r.charCodeAt(t-1)!==95||r.charCodeAt(t-2)!==95||r.charCodeAt(t-3)!==111||r.charCodeAt(t-4)!==116||r.charCodeAt(t-5)!==111||r.charCodeAt(t-6)!==114||r.charCodeAt(t-7)!==112||r.charCodeAt(t-8)!==95||r.charCodeAt(t-9)!==95)return!1;for(var e=t-10;e>=0;e--)if(r.charCodeAt(e)!==36)return!1;return!0}function d_(r,t,e){var s=wt(r.source,t.source);return s!==0||(s=r.originalLine-t.originalLine,s!==0)||(s=r.originalColumn-t.originalColumn,s!==0||e)||(s=r.generatedColumn-t.generatedColumn,s!==0)||(s=r.generatedLine-t.generatedLine,s!==0)?s:wt(r.name,t.name)}ye.compareByOriginalPositions=d_;function f_(r,t,e){var s;return s=r.originalLine-t.originalLine,s!==0||(s=r.originalColumn-t.originalColumn,s!==0||e)||(s=r.generatedColumn-t.generatedColumn,s!==0)||(s=r.generatedLine-t.generatedLine,s!==0)?s:wt(r.name,t.name)}ye.compareByOriginalPositionsNoSource=f_;function m_(r,t,e){var s=r.generatedLine-t.generatedLine;return s!==0||(s=r.generatedColumn-t.generatedColumn,s!==0||e)||(s=wt(r.source,t.source),s!==0)||(s=r.originalLine-t.originalLine,s!==0)||(s=r.originalColumn-t.originalColumn,s!==0)?s:wt(r.name,t.name)}ye.compareByGeneratedPositionsDeflated=m_;function y_(r,t,e){var s=r.generatedColumn-t.generatedColumn;return s!==0||e||(s=wt(r.source,t.source),s!==0)||(s=r.originalLine-t.originalLine,s!==0)||(s=r.originalColumn-t.originalColumn,s!==0)?s:wt(r.name,t.name)}ye.compareByGeneratedPositionsDeflatedNoLine=y_;function wt(r,t){return r===t?0:r===null?1:t===null?-1:r>t?1:-1}function g_(r,t){var e=r.generatedLine-t.generatedLine;return e!==0||(e=r.generatedColumn-t.generatedColumn,e!==0)||(e=wt(r.source,t.source),e!==0)||(e=r.originalLine-t.originalLine,e!==0)||(e=r.originalColumn-t.originalColumn,e!==0)?e:wt(r.name,t.name)}ye.compareByGeneratedPositionsInflated=g_;function b_(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}ye.parseSourceMapInput=b_;function S_(r,t,e){if(t=t||"",r&&(r[r.length-1]!=="/"&&t[0]!=="/"&&(r+="/"),t=r+t),e){var s=Hr(e);if(!s)throw new Error("sourceMapURL could not be parsed");if(s.path){var n=s.path.lastIndexOf("/");n>=0&&(s.path=s.path.substring(0,n+1))}t=ud(Hs(s),t)}return zo(t)}ye.computeSourceURL=S_});var Xo=_(fd=>{var Jo=Vs(),Ko=Object.prototype.hasOwnProperty,ds=typeof Map<"u";function It(){this._array=[],this._set=ds?new Map:Object.create(null)}It.fromArray=function(t,e){for(var s=new It,n=0,i=t.length;n<i;n++)s.add(t[n],e);return s};It.prototype.size=function(){return ds?this._set.size:Object.getOwnPropertyNames(this._set).length};It.prototype.add=function(t,e){var s=ds?t:Jo.toSetString(t),n=ds?this.has(t):Ko.call(this._set,s),i=this._array.length;(!n||e)&&this._array.push(t),n||(ds?this._set.set(t,i):this._set[s]=i)};It.prototype.has=function(t){if(ds)return this._set.has(t);var e=Jo.toSetString(t);return Ko.call(this._set,e)};It.prototype.indexOf=function(t){if(ds){var e=this._set.get(t);if(e>=0)return e}else{var s=Jo.toSetString(t);if(Ko.call(this._set,s))return this._set[s]}throw new Error('"'+t+'" is not in the set.')};It.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};It.prototype.toArray=function(){return this._array.slice()};fd.ArraySet=It});var gd=_(yd=>{var md=Vs();function __(r,t){var e=r.generatedLine,s=t.generatedLine,n=r.generatedColumn,i=t.generatedColumn;return s>e||s==e&&i>=n||md.compareByGeneratedPositionsInflated(r,t)<=0}function Si(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Si.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)};Si.prototype.add=function(t){__(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Si.prototype.toArray=function(){return this._sorted||(this._array.sort(md.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};yd.MappingList=Si});var Qo=_(bd=>{var Vr=Wo(),ce=Vs(),_i=Xo().ArraySet,x_=gd().MappingList;function We(r){r||(r={}),this._file=ce.getArg(r,"file",null),this._sourceRoot=ce.getArg(r,"sourceRoot",null),this._skipValidation=ce.getArg(r,"skipValidation",!1),this._ignoreInvalidMapping=ce.getArg(r,"ignoreInvalidMapping",!1),this._sources=new _i,this._names=new _i,this._mappings=new x_,this._sourcesContents=null}We.prototype._version=3;We.fromSourceMap=function(t,e){var s=t.sourceRoot,n=new We(Object.assign(e||{},{file:t.file,sourceRoot:s}));return t.eachMapping(function(i){var a={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(a.source=i.source,s!=null&&(a.source=ce.relative(s,a.source)),a.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(a.name=i.name)),n.addMapping(a)}),t.sources.forEach(function(i){var a=i;s!==null&&(a=ce.relative(s,i)),n._sources.has(a)||n._sources.add(a);var o=t.sourceContentFor(i);o!=null&&n.setSourceContent(i,o)}),n};We.prototype.addMapping=function(t){var e=ce.getArg(t,"generated"),s=ce.getArg(t,"original",null),n=ce.getArg(t,"source",null),i=ce.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(e,s,n,i)===!1||(n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:s!=null&&s.line,originalColumn:s!=null&&s.column,source:n,name:i}))};We.prototype.setSourceContent=function(t,e){var s=t;this._sourceRoot!=null&&(s=ce.relative(this._sourceRoot,s)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ce.toSetString(s)]=e):this._sourcesContents&&(delete this._sourcesContents[ce.toSetString(s)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};We.prototype.applySourceMap=function(t,e,s){var n=e;if(e==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=t.file}var i=this._sourceRoot;i!=null&&(n=ce.relative(i,n));var a=new _i,o=new _i;this._mappings.unsortedForEach(function(c){if(c.source===n&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,s!=null&&(c.source=ce.join(s,c.source)),i!=null&&(c.source=ce.relative(i,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var u=c.source;u!=null&&!a.has(u)&&a.add(u);var p=c.name;p!=null&&!o.has(p)&&o.add(p)},this),this._sources=a,this._names=o,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(s!=null&&(c=ce.join(s,c)),i!=null&&(c=ce.relative(i,c)),this.setSourceContent(c,l))},this)};We.prototype._validateMapping=function(t,e,s,n){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var i="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(i),!1;throw new Error(i)}if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!e&&!s&&!n)){if(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&s)return;var i="Invalid mapping: "+JSON.stringify({generated:t,source:s,original:e,name:n});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(i),!1;throw new Error(i)}};We.prototype._serializeMappings=function(){for(var t=0,e=1,s=0,n=0,i=0,a=0,o="",c,l,u,p,h=this._mappings.toArray(),d=0,f=h.length;d<f;d++){if(l=h[d],c="",l.generatedLine!==e)for(t=0;l.generatedLine!==e;)c+=";",e++;else if(d>0){if(!ce.compareByGeneratedPositionsInflated(l,h[d-1]))continue;c+=","}c+=Vr.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(p=this._sources.indexOf(l.source),c+=Vr.encode(p-a),a=p,c+=Vr.encode(l.originalLine-1-n),n=l.originalLine-1,c+=Vr.encode(l.originalColumn-s),s=l.originalColumn,l.name!=null&&(u=this._names.indexOf(l.name),c+=Vr.encode(u-i),i=u)),o+=c}return o};We.prototype._generateSourcesContent=function(t,e){return t.map(function(s){if(!this._sourcesContents)return null;e!=null&&(s=ce.relative(e,s));var n=ce.toSetString(s);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};We.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};We.prototype.toString=function(){return JSON.stringify(this.toJSON())};bd.SourceMapGenerator=We});var Sd=_(fs=>{fs.GREATEST_LOWER_BOUND=1;fs.LEAST_UPPER_BOUND=2;function Zo(r,t,e,s,n,i){var a=Math.floor((t-r)/2)+r,o=n(e,s[a],!0);return o===0?a:o>0?t-a>1?Zo(a,t,e,s,n,i):i==fs.LEAST_UPPER_BOUND?t<s.length?t:-1:a:a-r>1?Zo(r,a,e,s,n,i):i==fs.LEAST_UPPER_BOUND?a:r<0?-1:r}fs.search=function(t,e,s,n){if(e.length===0)return-1;var i=Zo(-1,e.length,t,e,s,n||fs.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&s(e[i],e[i-1],!0)===0;)--i;return i}});var Ed=_(xd=>{function E_(r){function t(n,i,a){var o=n[i];n[i]=n[a],n[a]=o}function e(n,i){return Math.round(n+Math.random()*(i-n))}function s(n,i,a,o){if(a<o){var c=e(a,o),l=a-1;t(n,c,o);for(var u=n[o],p=a;p<o;p++)i(n[p],u,!1)<=0&&(l+=1,t(n,l,p));t(n,l+1,p);var h=l+1;s(n,i,a,h-1),s(n,i,h+1,o)}}return s}function T_(r){let t=E_.toString();return new Function(`return ${t}`)()(r)}var _d=new WeakMap;xd.quickSort=function(r,t,e=0){let s=_d.get(t);s===void 0&&(s=T_(t),_d.set(t,s)),s(r,t,e,r.length-1)}});var vd=_(xi=>{var M=Vs(),tc=Sd(),Ys=Xo().ArraySet,P_=Wo(),Yr=Ed().quickSort;function te(r,t){var e=r;return typeof r=="string"&&(e=M.parseSourceMapInput(r)),e.sections!=null?new nt(e,t):new Ee(e,t)}te.fromSourceMap=function(r,t){return Ee.fromSourceMap(r,t)};te.prototype._version=3;te.prototype.__generatedMappings=null;Object.defineProperty(te.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});te.prototype.__originalMappings=null;Object.defineProperty(te.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});te.prototype._charIsMappingSeparator=function(t,e){var s=t.charAt(e);return s===";"||s===","};te.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")};te.GENERATED_ORDER=1;te.ORIGINAL_ORDER=2;te.GREATEST_LOWER_BOUND=1;te.LEAST_UPPER_BOUND=2;te.prototype.eachMapping=function(t,e,s){var n=e||null,i=s||te.GENERATED_ORDER,a;switch(i){case te.GENERATED_ORDER:a=this._generatedMappings;break;case te.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,c=t.bind(n),l=this._names,u=this._sources,p=this._sourceMapURL,h=0,d=a.length;h<d;h++){var f=a[h],m=f.source===null?null:u.at(f.source);m!==null&&(m=M.computeSourceURL(o,m,p)),c({source:m,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:l.at(f.name)})}};te.prototype.allGeneratedPositionsFor=function(t){var e=M.getArg(t,"line"),s={source:M.getArg(t,"source"),originalLine:e,originalColumn:M.getArg(t,"column",0)};if(s.source=this._findSourceIndex(s.source),s.source<0)return[];var n=[],i=this._findMapping(s,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,tc.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(t.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:M.getArg(a,"generatedLine",null),column:M.getArg(a,"generatedColumn",null),lastColumn:M.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var c=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==c;)n.push({line:M.getArg(a,"generatedLine",null),column:M.getArg(a,"generatedColumn",null),lastColumn:M.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n};xi.SourceMapConsumer=te;function Ee(r,t){var e=r;typeof r=="string"&&(e=M.parseSourceMapInput(r));var s=M.getArg(e,"version"),n=M.getArg(e,"sources"),i=M.getArg(e,"names",[]),a=M.getArg(e,"sourceRoot",null),o=M.getArg(e,"sourcesContent",null),c=M.getArg(e,"mappings"),l=M.getArg(e,"file",null);if(s!=this._version)throw new Error("Unsupported version: "+s);a&&(a=M.normalize(a)),n=n.map(String).map(M.normalize).map(function(u){return a&&M.isAbsolute(a)&&M.isAbsolute(u)?M.relative(a,u):u}),this._names=Ys.fromArray(i.map(String),!0),this._sources=Ys.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(u){return M.computeSourceURL(a,u,t)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=c,this._sourceMapURL=t,this.file=l}Ee.prototype=Object.create(te.prototype);Ee.prototype.consumer=te;Ee.prototype._findSourceIndex=function(r){var t=r;if(this.sourceRoot!=null&&(t=M.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==r)return e;return-1};Ee.fromSourceMap=function(t,e){var s=Object.create(Ee.prototype),n=s._names=Ys.fromArray(t._names.toArray(),!0),i=s._sources=Ys.fromArray(t._sources.toArray(),!0);s.sourceRoot=t._sourceRoot,s.sourcesContent=t._generateSourcesContent(s._sources.toArray(),s.sourceRoot),s.file=t._file,s._sourceMapURL=e,s._absoluteSources=s._sources.toArray().map(function(d){return M.computeSourceURL(s.sourceRoot,d,e)});for(var a=t._mappings.toArray().slice(),o=s.__generatedMappings=[],c=s.__originalMappings=[],l=0,u=a.length;l<u;l++){var p=a[l],h=new Pd;h.generatedLine=p.generatedLine,h.generatedColumn=p.generatedColumn,p.source&&(h.source=i.indexOf(p.source),h.originalLine=p.originalLine,h.originalColumn=p.originalColumn,p.name&&(h.name=n.indexOf(p.name)),c.push(h)),o.push(h)}return Yr(s.__originalMappings,M.compareByOriginalPositions),s};Ee.prototype._version=3;Object.defineProperty(Ee.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Pd(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var ec=M.compareByGeneratedPositionsDeflatedNoLine;function Td(r,t){let e=r.length,s=r.length-t;if(!(s<=1))if(s==2){let n=r[t],i=r[t+1];ec(n,i)>0&&(r[t]=i,r[t+1]=n)}else if(s<20)for(let n=t;n<e;n++)for(let i=n;i>t;i--){let a=r[i-1],o=r[i];if(ec(a,o)<=0)break;r[i-1]=o,r[i]=a}else Yr(r,ec,t)}Ee.prototype._parseMappings=function(t,e){var s=1,n=0,i=0,a=0,o=0,c=0,l=t.length,u=0,p={},h={},d=[],f=[],m,y,b,x,N;let T=0;for(;u<l;)if(t.charAt(u)===";")s++,u++,n=0,Td(f,T),T=f.length;else if(t.charAt(u)===",")u++;else{for(m=new Pd,m.generatedLine=s,x=u;x<l&&!this._charIsMappingSeparator(t,x);x++);for(y=t.slice(u,x),b=[];u<x;)P_.decode(t,u,h),N=h.value,u=h.rest,b.push(N);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(m.generatedColumn=n+b[0],n=m.generatedColumn,b.length>1&&(m.source=o+b[1],o+=b[1],m.originalLine=i+b[2],i=m.originalLine,m.originalLine+=1,m.originalColumn=a+b[3],a=m.originalColumn,b.length>4&&(m.name=c+b[4],c+=b[4])),f.push(m),typeof m.originalLine=="number"){let A=m.source;for(;d.length<=A;)d.push(null);d[A]===null&&(d[A]=[]),d[A].push(m)}}Td(f,T),this.__generatedMappings=f;for(var P=0;P<d.length;P++)d[P]!=null&&Yr(d[P],M.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...d)};Ee.prototype._findMapping=function(t,e,s,n,i,a){if(t[s]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[s]);if(t[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[n]);return tc.search(t,e,i,a)};Ee.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var s=this._generatedMappings[t+1];if(e.generatedLine===s.generatedLine){e.lastGeneratedColumn=s.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}};Ee.prototype.originalPositionFor=function(t){var e={generatedLine:M.getArg(t,"line"),generatedColumn:M.getArg(t,"column")},s=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",M.compareByGeneratedPositionsDeflated,M.getArg(t,"bias",te.GREATEST_LOWER_BOUND));if(s>=0){var n=this._generatedMappings[s];if(n.generatedLine===e.generatedLine){var i=M.getArg(n,"source",null);i!==null&&(i=this._sources.at(i),i=M.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=M.getArg(n,"name",null);return a!==null&&(a=this._names.at(a)),{source:i,line:M.getArg(n,"originalLine",null),column:M.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};Ee.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Ee.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var s=this._findSourceIndex(t);if(s>=0)return this.sourcesContent[s];var n=t;this.sourceRoot!=null&&(n=M.relative(this.sourceRoot,n));var i;if(this.sourceRoot!=null&&(i=M.urlParse(this.sourceRoot))){var a=n.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!i.path||i.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(e)return null;throw new Error('"'+n+'" is not in the SourceMap.')};Ee.prototype.generatedPositionFor=function(t){var e=M.getArg(t,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var s={source:e,originalLine:M.getArg(t,"line"),originalColumn:M.getArg(t,"column")},n=this._findMapping(s,this._originalMappings,"originalLine","originalColumn",M.compareByOriginalPositions,M.getArg(t,"bias",te.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===s.source)return{line:M.getArg(i,"generatedLine",null),column:M.getArg(i,"generatedColumn",null),lastColumn:M.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};xi.BasicSourceMapConsumer=Ee;function nt(r,t){var e=r;typeof r=="string"&&(e=M.parseSourceMapInput(r));var s=M.getArg(e,"version"),n=M.getArg(e,"sections");if(s!=this._version)throw new Error("Unsupported version: "+s);this._sources=new Ys,this._names=new Ys;var i={line:-1,column:0};this._sections=n.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=M.getArg(a,"offset"),c=M.getArg(o,"line"),l=M.getArg(o,"column");if(c<i.line||c===i.line&&l<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=o,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new te(M.getArg(a,"map"),t)}})}nt.prototype=Object.create(te.prototype);nt.prototype.constructor=te;nt.prototype._version=3;Object.defineProperty(nt.prototype,"sources",{get:function(){for(var r=[],t=0;t<this._sections.length;t++)for(var e=0;e<this._sections[t].consumer.sources.length;e++)r.push(this._sections[t].consumer.sources[e]);return r}});nt.prototype.originalPositionFor=function(t){var e={generatedLine:M.getArg(t,"line"),generatedColumn:M.getArg(t,"column")},s=tc.search(e,this._sections,function(i,a){var o=i.generatedLine-a.generatedOffset.generatedLine;return o||i.generatedColumn-a.generatedOffset.generatedColumn}),n=this._sections[s];return n?n.consumer.originalPositionFor({line:e.generatedLine-(n.generatedOffset.generatedLine-1),column:e.generatedColumn-(n.generatedOffset.generatedLine===e.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};nt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};nt.prototype.sourceContentFor=function(t,e){for(var s=0;s<this._sections.length;s++){var n=this._sections[s],i=n.consumer.sourceContentFor(t,!0);if(i||i==="")return i}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')};nt.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var s=this._sections[e];if(s.consumer._findSourceIndex(M.getArg(t,"source"))!==-1){var n=s.consumer.generatedPositionFor(t);if(n){var i={line:n.line+(s.generatedOffset.generatedLine-1),column:n.column+(s.generatedOffset.generatedLine===n.line?s.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};nt.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var s=0;s<this._sections.length;s++)for(var n=this._sections[s],i=n.consumer._generatedMappings,a=0;a<i.length;a++){var o=i[a],c=n.consumer._sources.at(o.source);c!==null&&(c=M.computeSourceURL(n.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var l=null;o.name&&(l=n.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var u={source:c,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(u),typeof u.originalLine=="number"&&this.__originalMappings.push(u)}Yr(this.__generatedMappings,M.compareByGeneratedPositionsDeflated),Yr(this.__originalMappings,M.compareByOriginalPositions)};xi.IndexedSourceMapConsumer=nt});var Cd=_(Ad=>{var v_=Qo().SourceMapGenerator,Ei=Vs(),A_=/(\r?\n)/,C_=10,Ws="$$$isSourceNode$$$";function je(r,t,e,s,n){this.children=[],this.sourceContents={},this.line=r??null,this.column=t??null,this.source=e??null,this.name=n??null,this[Ws]=!0,s!=null&&this.add(s)}je.fromStringWithSourceMap=function(t,e,s){var n=new je,i=t.split(A_),a=0,o=function(){var h=f(),d=f()||"";return h+d;function f(){return a<i.length?i[a++]:void 0}},c=1,l=0,u=null;return e.eachMapping(function(h){if(u!==null)if(c<h.generatedLine)p(u,o()),c++,l=0;else{var d=i[a]||"",f=d.substr(0,h.generatedColumn-l);i[a]=d.substr(h.generatedColumn-l),l=h.generatedColumn,p(u,f),u=h;return}for(;c<h.generatedLine;)n.add(o()),c++;if(l<h.generatedColumn){var d=i[a]||"";n.add(d.substr(0,h.generatedColumn)),i[a]=d.substr(h.generatedColumn),l=h.generatedColumn}u=h},this),a<i.length&&(u&&p(u,o()),n.add(i.splice(a).join(""))),e.sources.forEach(function(h){var d=e.sourceContentFor(h);d!=null&&(s!=null&&(h=Ei.join(s,h)),n.setSourceContent(h,d))}),n;function p(h,d){if(h===null||h.source===void 0)n.add(d);else{var f=s?Ei.join(s,h.source):h.source;n.add(new je(h.originalLine,h.originalColumn,f,d,h.name))}}};je.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(e){this.add(e)},this);else if(t[Ws]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};je.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else if(t[Ws]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};je.prototype.walk=function(t){for(var e,s=0,n=this.children.length;s<n;s++)e=this.children[s],e[Ws]?e.walk(t):e!==""&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})};je.prototype.join=function(t){var e,s,n=this.children.length;if(n>0){for(e=[],s=0;s<n-1;s++)e.push(this.children[s]),e.push(t);e.push(this.children[s]),this.children=e}return this};je.prototype.replaceRight=function(t,e){var s=this.children[this.children.length-1];return s[Ws]?s.replaceRight(t,e):typeof s=="string"?this.children[this.children.length-1]=s.replace(t,e):this.children.push("".replace(t,e)),this};je.prototype.setSourceContent=function(t,e){this.sourceContents[Ei.toSetString(t)]=e};je.prototype.walkSourceContents=function(t){for(var e=0,s=this.children.length;e<s;e++)this.children[e][Ws]&&this.children[e].walkSourceContents(t);for(var n=Object.keys(this.sourceContents),e=0,s=n.length;e<s;e++)t(Ei.fromSetString(n[e]),this.sourceContents[n[e]])};je.prototype.toString=function(){var t="";return this.walk(function(e){t+=e}),t};je.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},s=new v_(t),n=!1,i=null,a=null,o=null,c=null;return this.walk(function(l,u){e.code+=l,u.source!==null&&u.line!==null&&u.column!==null?((i!==u.source||a!==u.line||o!==u.column||c!==u.name)&&s.addMapping({source:u.source,original:{line:u.line,column:u.column},generated:{line:e.line,column:e.column},name:u.name}),i=u.source,a=u.line,o=u.column,c=u.name,n=!0):n&&(s.addMapping({generated:{line:e.line,column:e.column}}),i=null,n=!1);for(var p=0,h=l.length;p<h;p++)l.charCodeAt(p)===C_?(e.line++,e.column=0,p+1===h?(i=null,n=!1):n&&s.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(l,u){s.setSourceContent(l,u)}),{code:e.code,map:s}};Ad.SourceNode=je});var wd=_(Ti=>{Ti.SourceMapGenerator=Qo().SourceMapGenerator;Ti.SourceMapConsumer=vd().SourceMapConsumer;Ti.SourceNode=Cd().SourceNode});var af=_(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});function w_(r,t){if(r==null)return{};var e={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(t.includes(s))continue;e[s]=r[s]}return e}var mt=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},Qs=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function De(r,t){let{line:e,column:s,index:n}=r;return new mt(e,s+t,n+t)}var Id="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",I_={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Id},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Id}},Nd={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"},Ai=r=>r.type==="UpdateExpression"?Nd.UpdateExpression[`${r.prefix}`]:Nd[r.type],N_={AccessorIsGenerator:({kind:r})=>`A ${r}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:r})=>`Missing initializer in ${r} 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:r})=>`\`${r}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:r})=>`'import.${r}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:r,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
2
- - Did you mean \`export { '${r}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:r})=>`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:r})=>`Unsyntactic ${r==="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:r})=>`A string literal cannot be used as an imported binding.
3
- - Did you mean \`import { "${r}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:r})=>`\`import()\` requires exactly ${r===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:r})=>`Expected number in radix ${r}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:r})=>`Escape sequence in keyword ${r}.`,InvalidIdentifier:({identifierName:r})=>`Invalid identifier ${r}.`,InvalidLhs:({ancestor:r})=>`Invalid left-hand side in ${Ai(r)}.`,InvalidLhsBinding:({ancestor:r})=>`Binding invalid left-hand side in ${Ai(r)}.`,InvalidLhsOptionalChaining:({ancestor:r})=>`Invalid optional chaining in the left-hand side of ${Ai(r)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:r})=>`Unexpected character '${r}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:r})=>`Private name #${r} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:r})=>`Label '${r}' 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:r})=>`This experimental syntax requires enabling the parser plugin: ${r.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:r})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(t=>JSON.stringify(t)).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:r})=>`Duplicate key "${r}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:r})=>`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`,ModuleExportUndefined:({localName:r})=>`Export '${r}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain 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:r})=>`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`,PrivateNameRedeclaration:({identifierName:r})=>`Duplicate private name #${r}.`,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:r})=>`Unexpected keyword '${r}'.`,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:r})=>`Unexpected reserved word '${r}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:r,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${r?`, expected "${r}"`:""}`,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:r,onlyValidPropertyName:t})=>`The only valid meta property for ${r} is ${r}.${t}.`,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:r})=>`Identifier '${r}' 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."},k_={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:r})=>`Assigning to '${r}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:r})=>`Binding '${r}' 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."},D_=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),O_={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:r})=>`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:r})=>`Hack-style pipe body cannot be an unparenthesized ${Ai({type:r})}; 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.'},M_=["message"];function kd(r,t,e){Object.defineProperty(r,t,{enumerable:!1,configurable:!0,value:e})}function L_({toMessage:r,code:t,reasonCode:e,syntaxPlugin:s}){let n=e==="MissingPlugin"||e==="MissingOneOfPlugins";{let i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};i[e]&&(e=i[e])}return function i(a,o){let c=new SyntaxError;return c.code=t,c.reasonCode=e,c.loc=a,c.pos=a.index,c.syntaxPlugin=s,n&&(c.missingPlugin=o.missingPlugin),kd(c,"clone",function(u={}){var p;let{line:h,column:d,index:f}=(p=u.loc)!=null?p:a;return i(new mt(h,d,f),Object.assign({},o,u.details))}),kd(c,"details",o),Object.defineProperty(c,"message",{configurable:!0,get(){let l=`${r(o)} (${a.line}:${a.column})`;return this.message=l,l},set(l){Object.defineProperty(this,"message",{value:l,writable:!0})}}),c}}function Ot(r,t){if(Array.isArray(r))return s=>Ot(s,r[0]);let e={};for(let s of Object.keys(r)){let n=r[s],i=typeof n=="string"?{message:()=>n}:typeof n=="function"?{message:n}:n,{message:a}=i,o=w_(i,M_),c=typeof a=="string"?()=>a:a;e[s]=L_(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:c},t?{syntaxPlugin:t}:{},o))}return e}var g=Object.assign({},Ot(I_),Ot(N_),Ot(k_),Ot`pipelineOperator`(O_)),{defineProperty:R_}=Object,Dd=(r,t)=>{r&&R_(r,t,{enumerable:!1,value:r[t]})};function Wr(r){return Dd(r.loc.start,"index"),Dd(r.loc.end,"index"),r}var F_=r=>class extends r{parse(){let e=Wr(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(Wr)),e}parseRegExpLiteral({pattern:e,flags:s}){let n=null;try{n=new RegExp(e,s)}catch{}let i=this.estreeParseLiteral(n);return i.regex={pattern:e,flags:s},i}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let n=this.estreeParseLiteral(s);return n.bigint=String(n.value||e),n}parseDecimalLiteral(e){let n=this.estreeParseLiteral(null);return n.decimal=String(n.value||e),n}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 s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let n=e;return n.type="ExpressionStatement",n.expression=s,n.directive=s.extra.rawValue,delete s.extra,n}initFunction(e,s){super.initFunction(e,s),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 s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,n,i,a){super.parseBlockBody(e,s,n,i,a);let o=e.directives.map(c=>this.directiveToStmt(c));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,n,i,a,o){this.parseMethod(s,n,i,a,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,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,s){let n=super.parseLiteral(e,s);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(e,s,n=!1){super.parseFunctionBody(e,s,n),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,n,i,a,o,c=!1){let l=this.startNode();return l.kind=e.kind,l=super.parseMethod(l,s,n,i,a,o,c),l.type="FunctionExpression",delete l.kind,e.value=l,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,n,i,a){let o=super.parseObjectMethod(e,s,n,i,a);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,n,i){let a=super.parseObjectProperty(e,s,n,i);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,s,n){return e==="Property"?"value":super.isValidLVal(e,s,n)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:n,value:i}=e;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(i,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,n){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(g.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(g.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,n)}finishCallExpression(e,s){let n=super.finishCallExpression(e,s);if(n.callee.type==="Import"){if(n.type="ImportExpression",n.source=n.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var i,a;n.options=(i=n.arguments[1])!=null?i:null,n.attributes=(a=n.arguments[1])!=null?a:null}delete n.arguments,delete n.callee}return n}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let n=this.state.lastTokStartLoc,i=super.parseExport(e,s);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(i.type="ExportAllDeclaration",i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var a;let{declaration:o}=i;o?.type==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===i.start&&this.resetStartLocation(i,n)}break}return i}parseSubscript(e,s,n,i){let a=super.parseSubscript(e,s,n,i);if(i.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),i.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,s,n){return Wr(super.finishNodeAt(e,s,n))}resetStartLocation(e,s){super.resetStartLocation(e,s),Wr(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Wr(e)}},ys=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},K={brace:new ys("{"),j_oTag:new ys("<tag"),j_cTag:new ys("</tag"),j_expr:new ys("<tag>...</tag>",!0)};K.template=new ys("`",!0);var G=!0,I=!0,sc=!0,zr=!0,Jt=!0,B_=!0,Ii=class{constructor(t,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=t,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}},wc=new Map;function V(r,t={}){t.keyword=r;let e=R(r,t);return wc.set(r,e),e}function ke(r,t){return R(r,{beforeExpr:G,binop:t})}var Qr=-1,kt=[],Ic=[],Nc=[],kc=[],Dc=[],Oc=[];function R(r,t={}){var e,s,n,i;return++Qr,Ic.push(r),Nc.push((e=t.binop)!=null?e:-1),kc.push((s=t.beforeExpr)!=null?s:!1),Dc.push((n=t.startsExpr)!=null?n:!1),Oc.push((i=t.prefix)!=null?i:!1),kt.push(new Ii(r,t)),Qr}function q(r,t={}){var e,s,n,i;return++Qr,wc.set(r,Qr),Ic.push(r),Nc.push((e=t.binop)!=null?e:-1),kc.push((s=t.beforeExpr)!=null?s:!1),Dc.push((n=t.startsExpr)!=null?n:!1),Oc.push((i=t.prefix)!=null?i:!1),kt.push(new Ii("name",t)),Qr}var j_={bracketL:R("[",{beforeExpr:G,startsExpr:I}),bracketHashL:R("#[",{beforeExpr:G,startsExpr:I}),bracketBarL:R("[|",{beforeExpr:G,startsExpr:I}),bracketR:R("]"),bracketBarR:R("|]"),braceL:R("{",{beforeExpr:G,startsExpr:I}),braceBarL:R("{|",{beforeExpr:G,startsExpr:I}),braceHashL:R("#{",{beforeExpr:G,startsExpr:I}),braceR:R("}"),braceBarR:R("|}"),parenL:R("(",{beforeExpr:G,startsExpr:I}),parenR:R(")"),comma:R(",",{beforeExpr:G}),semi:R(";",{beforeExpr:G}),colon:R(":",{beforeExpr:G}),doubleColon:R("::",{beforeExpr:G}),dot:R("."),question:R("?",{beforeExpr:G}),questionDot:R("?."),arrow:R("=>",{beforeExpr:G}),template:R("template"),ellipsis:R("...",{beforeExpr:G}),backQuote:R("`",{startsExpr:I}),dollarBraceL:R("${",{beforeExpr:G,startsExpr:I}),templateTail:R("...`",{startsExpr:I}),templateNonTail:R("...${",{beforeExpr:G,startsExpr:I}),at:R("@"),hash:R("#",{startsExpr:I}),interpreterDirective:R("#!..."),eq:R("=",{beforeExpr:G,isAssign:zr}),assign:R("_=",{beforeExpr:G,isAssign:zr}),slashAssign:R("_=",{beforeExpr:G,isAssign:zr}),xorAssign:R("_=",{beforeExpr:G,isAssign:zr}),moduloAssign:R("_=",{beforeExpr:G,isAssign:zr}),incDec:R("++/--",{prefix:Jt,postfix:B_,startsExpr:I}),bang:R("!",{beforeExpr:G,prefix:Jt,startsExpr:I}),tilde:R("~",{beforeExpr:G,prefix:Jt,startsExpr:I}),doubleCaret:R("^^",{startsExpr:I}),doubleAt:R("@@",{startsExpr:I}),pipeline:ke("|>",0),nullishCoalescing:ke("??",1),logicalOR:ke("||",1),logicalAND:ke("&&",2),bitwiseOR:ke("|",3),bitwiseXOR:ke("^",4),bitwiseAND:ke("&",5),equality:ke("==/!=/===/!==",6),lt:ke("</>/<=/>=",7),gt:ke("</>/<=/>=",7),relational:ke("</>/<=/>=",7),bitShift:ke("<</>>/>>>",8),bitShiftL:ke("<</>>/>>>",8),bitShiftR:ke("<</>>/>>>",8),plusMin:R("+/-",{beforeExpr:G,binop:9,prefix:Jt,startsExpr:I}),modulo:R("%",{binop:10,startsExpr:I}),star:R("*",{binop:10}),slash:ke("/",10),exponent:R("**",{beforeExpr:G,binop:11,rightAssociative:!0}),_in:V("in",{beforeExpr:G,binop:7}),_instanceof:V("instanceof",{beforeExpr:G,binop:7}),_break:V("break"),_case:V("case",{beforeExpr:G}),_catch:V("catch"),_continue:V("continue"),_debugger:V("debugger"),_default:V("default",{beforeExpr:G}),_else:V("else",{beforeExpr:G}),_finally:V("finally"),_function:V("function",{startsExpr:I}),_if:V("if"),_return:V("return",{beforeExpr:G}),_switch:V("switch"),_throw:V("throw",{beforeExpr:G,prefix:Jt,startsExpr:I}),_try:V("try"),_var:V("var"),_const:V("const"),_with:V("with"),_new:V("new",{beforeExpr:G,startsExpr:I}),_this:V("this",{startsExpr:I}),_super:V("super",{startsExpr:I}),_class:V("class",{startsExpr:I}),_extends:V("extends",{beforeExpr:G}),_export:V("export"),_import:V("import",{startsExpr:I}),_null:V("null",{startsExpr:I}),_true:V("true",{startsExpr:I}),_false:V("false",{startsExpr:I}),_typeof:V("typeof",{beforeExpr:G,prefix:Jt,startsExpr:I}),_void:V("void",{beforeExpr:G,prefix:Jt,startsExpr:I}),_delete:V("delete",{beforeExpr:G,prefix:Jt,startsExpr:I}),_do:V("do",{isLoop:sc,beforeExpr:G}),_for:V("for",{isLoop:sc}),_while:V("while",{isLoop:sc}),_as:q("as",{startsExpr:I}),_assert:q("assert",{startsExpr:I}),_async:q("async",{startsExpr:I}),_await:q("await",{startsExpr:I}),_defer:q("defer",{startsExpr:I}),_from:q("from",{startsExpr:I}),_get:q("get",{startsExpr:I}),_let:q("let",{startsExpr:I}),_meta:q("meta",{startsExpr:I}),_of:q("of",{startsExpr:I}),_sent:q("sent",{startsExpr:I}),_set:q("set",{startsExpr:I}),_source:q("source",{startsExpr:I}),_static:q("static",{startsExpr:I}),_using:q("using",{startsExpr:I}),_yield:q("yield",{startsExpr:I}),_asserts:q("asserts",{startsExpr:I}),_checks:q("checks",{startsExpr:I}),_exports:q("exports",{startsExpr:I}),_global:q("global",{startsExpr:I}),_implements:q("implements",{startsExpr:I}),_intrinsic:q("intrinsic",{startsExpr:I}),_infer:q("infer",{startsExpr:I}),_is:q("is",{startsExpr:I}),_mixins:q("mixins",{startsExpr:I}),_proto:q("proto",{startsExpr:I}),_require:q("require",{startsExpr:I}),_satisfies:q("satisfies",{startsExpr:I}),_keyof:q("keyof",{startsExpr:I}),_readonly:q("readonly",{startsExpr:I}),_unique:q("unique",{startsExpr:I}),_abstract:q("abstract",{startsExpr:I}),_declare:q("declare",{startsExpr:I}),_enum:q("enum",{startsExpr:I}),_module:q("module",{startsExpr:I}),_namespace:q("namespace",{startsExpr:I}),_interface:q("interface",{startsExpr:I}),_type:q("type",{startsExpr:I}),_opaque:q("opaque",{startsExpr:I}),name:R("name",{startsExpr:I}),string:R("string",{startsExpr:I}),num:R("num",{startsExpr:I}),bigint:R("bigint",{startsExpr:I}),decimal:R("decimal",{startsExpr:I}),regexp:R("regexp",{startsExpr:I}),privateName:R("#name",{startsExpr:I}),eof:R("eof"),jsxName:R("jsxName"),jsxText:R("jsxText",{beforeExpr:!0}),jsxTagStart:R("jsxTagStart",{startsExpr:!0}),jsxTagEnd:R("jsxTagEnd"),placeholder:R("%%",{startsExpr:!0})};function W(r){return r>=93&&r<=132}function U_(r){return r<=92}function it(r){return r>=58&&r<=132}function Hd(r){return r>=58&&r<=136}function q_(r){return kc[r]}function cc(r){return Dc[r]}function G_(r){return r>=29&&r<=33}function Od(r){return r>=129&&r<=131}function $_(r){return r>=90&&r<=92}function Mc(r){return r>=58&&r<=92}function H_(r){return r>=39&&r<=59}function V_(r){return r===34}function Y_(r){return Oc[r]}function W_(r){return r>=121&&r<=123}function z_(r){return r>=124&&r<=130}function Xt(r){return Ic[r]}function Ci(r){return Nc[r]}function J_(r){return r===57}function Ni(r){return r>=24&&r<=25}function Nt(r){return kt[r]}kt[8].updateContext=r=>{r.pop()},kt[5].updateContext=kt[7].updateContext=kt[23].updateContext=r=>{r.push(K.brace)},kt[22].updateContext=r=>{r[r.length-1]===K.template?r.pop():r.push(K.template)},kt[142].updateContext=r=>{r.push(K.j_expr,K.j_oTag)};var Lc="\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-\u1C8A\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\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",Vd="\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\u0897-\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",K_=new RegExp("["+Lc+"]"),X_=new RegExp("["+Lc+Vd+"]");Lc=Vd=null;var Yd=[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,4,51,13,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,39,27,10,22,251,41,7,1,17,2,60,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,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,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,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,229,29,3,0,496,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],Q_=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,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,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,343,9,54,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,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function lc(r,t){let e=65536;for(let s=0,n=t.length;s<n;s+=2){if(e+=t[s],e>r)return!1;if(e+=t[s+1],e>=r)return!0}return!1}function Dt(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&K_.test(String.fromCharCode(r)):lc(r,Yd)}function Js(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&X_.test(String.fromCharCode(r)):lc(r,Yd)||lc(r,Q_)}var Rc={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"]},Z_=new Set(Rc.keyword),ex=new Set(Rc.strict),tx=new Set(Rc.strictBind);function Wd(r,t){return t&&r==="await"||r==="enum"}function zd(r,t){return Wd(r,t)||ex.has(r)}function Jd(r){return tx.has(r)}function Kd(r,t){return zd(r,t)||Jd(r)}function sx(r){return Z_.has(r)}function rx(r,t,e){return r===64&&t===64&&Dt(e)}var nx=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 ix(r){return nx.has(r)}var Zr=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},en=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,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 t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];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(t){return new Zr(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let n=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(n,t,e,s);let i=n.names.get(t)||0;e&16?i=i|4:(n.firstLexicalName||(n.firstLexicalName=t),i=i|2),n.names.set(t,i),e&8&&this.maybeExportDefined(n,t)}else if(e&4)for(let i=this.scopeStack.length-1;i>=0&&(n=this.scopeStack[i],this.checkRedeclarationInScope(n,t,e,s),n.names.set(t,(n.names.get(t)||0)|1),this.maybeExportDefined(n,t),!(n.flags&387));--i);this.parser.inModule&&n.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,n){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(g.VarRedeclaration,n,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);let n=t.names.get(e);return s&16?(n&2)>0||!this.treatFunctionsAsVarInScope(t)&&(n&1)>0:(n&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(n&4)>0}checkLocalExport(t){let{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},uc=class extends Zr{constructor(...t){super(...t),this.declareFunctions=new Set}},pc=class extends en{createScope(t){return new uc(t)}declareName(t,e,s){let n=this.currentScope();if(e&2048){this.checkRedeclarationInScope(n,t,e,s),this.maybeExportDefined(n,t),n.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){let n=t.names.get(e);return(n&4)>0||(n&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},hc=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let n=this.plugins.get(e);for(let i of Object.keys(s))if(n?.[i]!==s[i])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function Xd(r,t){r.trailingComments===void 0?r.trailingComments=t:r.trailingComments.unshift(...t)}function ax(r,t){r.leadingComments===void 0?r.leadingComments=t:r.leadingComments.unshift(...t)}function tn(r,t){r.innerComments===void 0?r.innerComments=t:r.innerComments.unshift(...t)}function Jr(r,t,e){let s=null,n=t.length;for(;s===null&&n>0;)s=t[--n];s===null||s.start>e.start?tn(r,e.comments):Xd(s,e.comments)}var dc=class extends hc{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let n=s-1,i=e[n];i.start===t.end&&(i.leadingNode=t,n--);let{start:a}=t;for(;n>=0;n--){let o=e[n],c=o.end;if(c>a)o.containingNode=t,this.finalizeComment(o),e.splice(n,1);else{c===a&&(o.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&Xd(t.leadingNode,e),t.trailingNode!==null&&ax(t.trailingNode,e);else{let{containingNode:s,start:n}=t;if(this.input.charCodeAt(n-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Jr(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":Jr(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Jr(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Jr(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Jr(s,s.specifiers,t);break;default:tn(s,e)}else tn(s,e)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let n=e[s-1];n.leadingNode===t&&(n.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:n}=this.state,i=n.length;if(i===0)return;let a=i-1;for(;a>=0;a--){let o=n[a],c=o.end;if(o.start===s)o.leadingNode=t;else if(c===e)o.trailingNode=t;else if(c<e)break}}},ox=/\r\n|[\r\n\u2028\u2029]/,Pi=new RegExp(ox.source,"g");function Ks(r){switch(r){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Md(r,t,e){for(let s=t;s<e;s++)if(Ks(r.charCodeAt(s)))return!0;return!1}var rc=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,nc=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function cx(r){switch(r){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 fc=class r{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=[K.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:n}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-n,this.startLoc=this.endLoc=new mt(s,n,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new mt(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let t=new r;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},lx=function(t){return t>=48&&t<=57},Ld={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},vi={bin:r=>r===48||r===49,oct:r=>r>=48&&r<=55,dec:r=>r>=48&&r<=57,hex:r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102};function Rd(r,t,e,s,n,i){let a=e,o=s,c=n,l="",u=null,p=e,{length:h}=t;for(;;){if(e>=h){i.unterminated(a,o,c),l+=t.slice(p,e);break}let d=t.charCodeAt(e);if(ux(r,d,t,e)){l+=t.slice(p,e);break}if(d===92){l+=t.slice(p,e);let f=px(t,e,s,n,r==="template",i);f.ch===null&&!u?u={pos:e,lineStart:s,curLine:n}:l+=f.ch,{pos:e,lineStart:s,curLine:n}=f,p=e}else d===8232||d===8233?(++e,++n,s=e):d===10||d===13?r==="template"?(l+=t.slice(p,e)+`
4
- `,++e,d===13&&t.charCodeAt(e)===10&&++e,++n,p=s=e):i.unterminated(a,o,c):++e}return{pos:e,str:l,firstInvalidLoc:u,lineStart:s,curLine:n,containsInvalid:!!u}}function ux(r,t,e,s){return r==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(r==="double"?34:39)}function px(r,t,e,s,n,i){let a=!n;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),c=r.charCodeAt(t++);switch(c){case 110:return o(`
5
- `);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=mc(r,t,e,s,2,!1,a,i),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=Zd(r,t,e,s,a,i),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:r.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(n)return o(null);i.strictNumericEscape(t-1,e,s);default:if(c>=48&&c<=55){let l=t-1,p=/^[0-7]+/.exec(r.slice(l,t+2))[0],h=parseInt(p,8);h>255&&(p=p.slice(0,-1),h=parseInt(p,8)),t+=p.length-1;let d=r.charCodeAt(t);if(p!=="0"||d===56||d===57){if(n)return o(null);i.strictNumericEscape(l,e,s)}return o(String.fromCharCode(h))}return o(String.fromCharCode(c))}}function mc(r,t,e,s,n,i,a,o){let c=t,l;return{n:l,pos:t}=Qd(r,t,e,s,16,n,i,!1,o,!a),l===null&&(a?o.invalidEscapeSequence(c,e,s):t=c-1),{code:l,pos:t}}function Qd(r,t,e,s,n,i,a,o,c,l){let u=t,p=n===16?Ld.hex:Ld.decBinOct,h=n===16?vi.hex:n===10?vi.dec:n===8?vi.oct:vi.bin,d=!1,f=0;for(let m=0,y=i??1/0;m<y;++m){let b=r.charCodeAt(t),x;if(b===95&&o!=="bail"){let N=r.charCodeAt(t-1),T=r.charCodeAt(t+1);if(o){if(Number.isNaN(T)||!h(T)||p.has(N)||p.has(T)){if(l)return{n:null,pos:t};c.unexpectedNumericSeparator(t,e,s)}}else{if(l)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(b>=97?x=b-97+10:b>=65?x=b-65+10:lx(b)?x=b-48:x=1/0,x>=n){if(x<=9&&l)return{n:null,pos:t};if(x<=9&&c.invalidDigit(t,e,s,n))x=0;else if(a)x=0,d=!0;else break}++t,f=f*n+x}return t===u||i!=null&&t-u!==i||d?{n:null,pos:t}:{n:f,pos:t}}function Zd(r,t,e,s,n,i){let a=r.charCodeAt(t),o;if(a===123){if(++t,{code:o,pos:t}=mc(r,t,e,s,r.indexOf("}",t)-t,!0,n,i),++t,o!==null&&o>1114111)if(n)i.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=mc(r,t,e,s,4,!1,n,i));return{code:o,pos:t}}function Kr(r,t,e){return new mt(e,r-t,r)}var hx=new Set([103,109,115,105,121,117,100,118]),ft=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new Qs(t.startLoc,t.endLoc)}},yc=class extends dc{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,n,i,a)=>this.options.errorRecovery?(this.raise(g.InvalidDigit,Kr(s,n,i),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(g.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(g.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(g.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(g.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,n,i)=>{this.recordStrictModeErrors(g.StrictNumericEscape,Kr(s,n,i))},unterminated:(s,n,i)=>{throw this.raise(g.UnterminatedString,Kr(s-1,n,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(g.StrictNumericEscape),unterminated:(s,n,i)=>{throw this.raise(g.UnterminatedTemplate,Kr(s,n,i))}}),this.state=new fc,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new ft(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return rc.lastIndex=t,rc.test(this.input)?rc.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return nc.lastIndex=t,nc.test(this.input)?nc.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,n=this.input.indexOf(t,s+2);if(n===-1)throw this.raise(g.UnterminatedComment,this.state.curPosition());for(this.state.pos=n+t.length,Pi.lastIndex=s+2;Pi.test(this.input)&&Pi.lastIndex<=n;)++this.state.curLine,this.state.lineStart=Pi.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(s+2,n),start:s,end:n+t.length,loc:new Qs(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(i),i}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let n=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!Ks(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+t,i),start:e,end:i,loc:new Qs(s,this.state.curPosition())};return this.options.tokens&&this.pushToken(o),o}skipSpace(){let t=this.state.pos,e=[];e:for(;this.state.pos<this.length;){let s=this.input.charCodeAt(this.state.pos);switch(s){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let n=this.skipBlockComment("*/");n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n));break}case 47:{let n=this.skipLineComment(2);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n));break}default:break e}break;default:if(cx(s))++this.state.pos;else if(s===45&&!this.inModule&&this.options.annexB){let n=this.state.pos;if(this.input.charCodeAt(n+1)===45&&this.input.charCodeAt(n+2)===62&&(t===0||this.state.lineStart>t)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){let n=this.state.pos;if(this.input.charCodeAt(n+1)===33&&this.input.charCodeAt(n+2)===45&&this.input.charCodeAt(n+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else break e}}if(e.length>0){let s=this.state.pos,n={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(g.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?g.RecordExpressionHashIncorrectStartSyntaxType:g.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else Dt(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!Ks(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let s=this.input.slice(e+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(t){let e=t===42?55:54,s=1,n=this.input.charCodeAt(this.state.pos+1);t===42&&n===42&&(s++,n=this.input.charCodeAt(this.state.pos+2),e=57),n===61&&!this.state.inType&&(s++,e=t===37?33:30),this.finishOp(e,s)}readToken_pipe_amp(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(g.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(g.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===t){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(e===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(e===62){let s=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+s)===61){this.finishOp(30,s+1);return}this.finishOp(52,s);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);t===63?e===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(g.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(g.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Dt(t)){this.readWord(t);return}}throw this.raise(g.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,n,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(g.UnterminatedRegExp,De(t,1));let l=this.input.charCodeAt(i);if(Ks(l))throw this.raise(g.UnterminatedRegExp,De(t,1));if(s)s=!1;else{if(l===91)n=!0;else if(l===93&&n)n=!1;else if(l===47&&!n)break;s=l===92}}let a=this.input.slice(e,i);++i;let o="",c=()=>De(t,i+2-e);for(;i<this.length;){let l=this.codePointAtPos(i),u=String.fromCharCode(l);if(hx.has(l))l===118?o.includes("u")&&this.raise(g.IncompatibleRegExpUVFlags,c()):l===117&&o.includes("v")&&this.raise(g.IncompatibleRegExpUVFlags,c()),o.includes(u)&&this.raise(g.DuplicateRegExpFlags,c());else if(Js(l)||l===92)this.raise(g.MalformedRegExpFlags,c());else break;++i,o+=u}this.state.pos=i,this.finishToken(137,{pattern:a,flags:o})}readInt(t,e,s=!1,n=!0){let{n:i,pos:a}=Qd(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,e,s,n,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(t){let e=this.state.curPosition(),s=!1;this.state.pos+=2;let n=this.readInt(t);n==null&&this.raise(g.InvalidDigit,De(e,2),{radix:t});let i=this.input.charCodeAt(this.state.pos);if(i===110)++this.state.pos,s=!0;else if(i===109)throw this.raise(g.InvalidDecimal,e);if(Dt(this.codePointAtPos(this.state.pos)))throw this.raise(g.NumberIdentifier,this.state.curPosition());if(s){let a=this.input.slice(e.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,a);return}this.finishToken(134,n)}readNumber(t){let e=this.state.pos,s=this.state.curPosition(),n=!1,i=!1,a=!1,o=!1;!t&&this.readInt(10)===null&&this.raise(g.InvalidNumber,this.state.curPosition());let c=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(c){let d=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(g.StrictOctalLiteral,s),!this.state.strict){let f=d.indexOf("_");f>0&&this.raise(g.ZeroDigitNumericSeparator,De(s,f))}o=c&&!/[89]/.test(d)}let l=this.input.charCodeAt(this.state.pos);if(l===46&&!o&&(++this.state.pos,this.readInt(10),n=!0,l=this.input.charCodeAt(this.state.pos)),(l===69||l===101)&&!o&&(l=this.input.charCodeAt(++this.state.pos),(l===43||l===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(g.InvalidOrMissingExponent,s),n=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),l===110&&((n||c)&&this.raise(g.InvalidBigIntLiteral,s),++this.state.pos,i=!0),l===109){this.expectPlugin("decimal",this.state.curPosition()),(a||c)&&this.raise(g.InvalidDecimal,s),++this.state.pos;var u=!0}if(Dt(this.codePointAtPos(this.state.pos)))throw this.raise(g.NumberIdentifier,this.state.curPosition());let p=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(135,p);return}if(u){this.finishToken(136,p);return}let h=o?parseInt(p,8):parseFloat(p);this.finishToken(134,h)}readCodePoint(t){let{code:e,pos:s}=Zd(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:n,lineStart:i}=Rd(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=i,this.state.curLine=n,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:n,curLine:i,lineStart:a}=Rd("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=n+1,this.state.lineStart=a,this.state.curLine=i,s&&(this.state.firstInvalidTemplateEscapePos=new mt(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(n)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,n=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(Js(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(n,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===s?Dt:Js;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(g.MissingUnicodeEscape,this.state.curPosition()),n=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(o(c)||this.raise(g.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(c)),n=this.state.pos}else break}return e+this.input.slice(n,this.state.pos)}readWord(t){let e=this.readWord1(t),s=wc.get(e);s!==void 0?this.finishToken(s,Xt(s)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:t}=this.state;Mc(t)&&this.state.containsEsc&&this.raise(g.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Xt(t)})}raise(t,e,s={}){let n=e instanceof mt?e:e.loc.start,i=t(n,s);if(!this.options.errorRecovery)throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(t,e,s={}){let n=e instanceof mt?e:e.loc.start,i=n.index,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let c=a[o];if(c.loc.index===i)return a[o]=t(n,s);if(c.loc.index<i)break}return this.raise(t,e,s)}updateContext(t){}unexpected(t,e){throw this.raise(g.UnexpectedToken,t??this.state.startLoc,{expected:e?Xt(e):null})}expectPlugin(t,e){if(this.hasPlugin(t))return!0;throw this.raise(g.MissingPlugin,e??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(e=>this.hasPlugin(e)))throw this.raise(g.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,n)=>{this.raise(t,Kr(e,s,n))}}},gc=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},bc=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new gc)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,n]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,n):this.parser.raise(g.InvalidPrivateFieldResolution,n,{identifierName:s})}declarePrivateName(t,e,s){let{privateNames:n,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=n.has(t);if(e&3){let c=o&&i.get(t);if(c){let l=c&4,u=e&4,p=c&3,h=e&3;o=p===h||l!==u,o||i.delete(t)}else o||i.set(t,e)}o&&this.parser.raise(g.PrivateNameRedeclaration,s,{identifierName:t}),n.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(g.InvalidPrivateFieldResolution,e,{identifierName:t})}},Zs=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},ki=class extends Zs{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},Sc=class{constructor(t){this.parser=void 0,this.stack=[new Zs],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){let s=e.loc.start,{stack:n}=this,i=n.length-1,a=n[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=n[--i]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){let{stack:s}=this,n=s[s.length-1],i=e.loc.start;if(n.isCertainlyParameterDeclaration())this.parser.raise(t,i);else if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,i);else return}recordAsyncArrowParametersError(t){let{stack:e}=this,s=e.length-1,n=e[s];for(;n.canBeArrowParameterDeclaration();)n.type===2&&n.recordDeclarationError(g.AwaitBindingIdentifier,t),n=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,n])=>{this.parser.raise(s,n);let i=t.length-2,a=t[i];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(n.index),a=t[--i]})}};function dx(){return new Zs(3)}function fx(){return new ki(1)}function mx(){return new ki(2)}function ef(){return new Zs}var _c=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function wi(r,t){return(r?2:0)|(t?1:0)}var xc=class extends yc{addExtra(t,e,s,n=!0){if(!t)return;let{extra:i}=t;i==null&&(i={},t.extra=i),n?i[e]=s:Object.defineProperty(i,e,{enumerable:n,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let n=this.input.charCodeAt(s);return!(Js(n)||(n&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Md(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return Md(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(g.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let n=t((i=null)=>{throw s.node=i,s});if(this.state.errors.length>e.errors.length){let i=this.state;return this.state=e,this.state.tokensLength=i.tokensLength,{node:n,error:i.errors[e.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(n){let i=this.state;if(this.state=e,n instanceof SyntaxError)return{node:null,error:n,thrown:!0,aborted:!1,failState:i};if(n===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:i};throw n}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:n,privateKeyLoc:i,optionalParametersLoc:a}=t,o=!!s||!!n||!!a||!!i;if(!e)return o;s!=null&&this.raise(g.InvalidCoverInitializedName,s),n!=null&&this.raise(g.DuplicateProto,n),i!=null&&this.raise(g.UnexpectedPrivateField,i),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return Hd(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=t;let i=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);let o=this.prodParam;this.prodParam=new _c;let c=this.classScope;this.classScope=new bc(this);let l=this.expressionScope;return this.expressionScope=new Sc(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=n,this.scope=i,this.prodParam=o,this.classScope=c,this.expressionScope=l}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},Xs=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},er=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new Qs(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},Fc=er.prototype;Fc.__clone=function(){let r=new er(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e<s;e++){let n=t[e];n!=="leadingComments"&&n!=="trailingComments"&&n!=="innerComments"&&(r[n]=this[n])}return r};function yx(r){return Mt(r)}function Mt(r){let{type:t,start:e,end:s,loc:n,range:i,extra:a,name:o}=r,c=Object.create(Fc);return c.type=t,c.start=e,c.end=s,c.loc=n,c.range=i,c.extra=a,c.name=o,t==="Placeholder"&&(c.expectedNode=r.expectedNode),c}function gx(r){let{type:t,start:e,end:s,loc:n,range:i,extra:a}=r;if(t==="Placeholder")return yx(r);let o=Object.create(Fc);return o.type=t,o.start=e,o.end=s,o.loc=n,o.range=i,r.raw!==void 0?o.raw=r.raw:o.extra=a,o.value=r.value,o}var Ec=class extends xc{startNode(){let t=this.state.startLoc;return new er(this,t.index,t)}startNodeAt(t){return new er(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEndLoc)}finishNodeAt(t,e,s){return t.type=e,t.end=s.index,t.loc.end=s,this.options.ranges&&(t.range[1]=s.index),this.options.attachComment&&this.processComment(t),t}resetStartLocation(t,e){t.start=e.index,t.loc.start=e,this.options.ranges&&(t.range[0]=e.index)}resetEndLocation(t,e=this.state.lastTokEndLoc){t.end=e.index,t.loc.end=e,this.options.ranges&&(t.range[1]=e.index)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.loc.start)}},bx=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),F=Ot`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:r})=>`Cannot overwrite reserved type ${r}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:r,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:r,enumName:t})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:r,enumName:t})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:r,memberName:t,explicitType:e})=>`Enum \`${r}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:r,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${r}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:r,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,EnumInvalidMemberName:({enumName:r,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${r}\`.`,EnumNumberMemberNotInitialized:({enumName:r,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${r}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:r})=>`Unexpected reserved type ${r}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:r,suggestion:t})=>`\`declare export ${r}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Sx(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}function Fd(r){return r.importKind==="type"||r.importKind==="typeof"}var _x={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function xx(r,t){let e=[],s=[];for(let n=0;n<r.length;n++)(t(r[n],n,r)?e:s).push(r[n]);return[e,s]}var Ex=/\*?\s*@((?:no)?flow)\b/,Tx=r=>class extends r{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return pc}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Ex.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let n=this.flowParseType();return this.state.inType=s,n}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(F.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,n=null;return this.match(54)?(this.state.inType=e,n=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(n=this.flowParsePredicate())),[s,n]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),n=this.startNode(),i=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return n.params=a.params,n.rest=a.rest,n.this=a._this,this.expect(11),[n.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(F.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),n=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(F.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,F.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),n.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let i=null,a=!1;return n.forEach(o=>{Sx(o)?(i==="CommonJS"&&this.raise(F.AmbiguousDeclareModuleKind,o),i="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(F.DuplicateDeclareModuleExports,o),i==="ES"&&this.raise(F.AmbiguousDeclareModuleKind,o),i="CommonJS",a=!0)}),e.kind=i||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let n=this.state.value;throw this.raise(F.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:n,suggestion:_x[n]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(F.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,n){bx.has(e)&&this.raise(n?F.AssignReservedType:F.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,n=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return n.name=a.name,n.variance=i,n.bound=a.typeAnnotation,this.match(29)?(this.eat(29),n.default=this.flowParseType()):e&&this.raise(F.MissingTypeParamDefault,s),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let n=!1;do{let i=this.flowParseTypeParameter(n);s.params.push(i),i.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let n=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=n,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,n){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=n,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let n=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(n),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:n,allowProto:i,allowInexact:a}){let o=this.state.inType;this.state.inType=!0;let c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];let l,u,p=!1;for(s&&this.match(6)?(this.expect(6),l=9,u=!0):(this.expect(5),l=8,u=!1),c.exact=u;!this.match(l);){let d=!1,f=null,m=null,y=this.startNode();if(i&&this.isContextual(118)){let x=this.lookahead();x.type!==14&&x.type!==17&&(this.next(),f=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let x=this.lookahead();x.type!==14&&x.type!==17&&(this.next(),d=!0)}let b=this.flowParseVariance();if(this.eat(0))f!=null&&this.unexpected(f),this.eat(0)?(b&&this.unexpected(b.loc.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(y,d))):c.indexers.push(this.flowParseObjectTypeIndexer(y,d,b));else if(this.match(10)||this.match(47))f!=null&&this.unexpected(f),b&&this.unexpected(b.loc.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(y,d));else{let x="init";if(this.isContextual(99)||this.isContextual(104)){let T=this.lookahead();Hd(T.type)&&(x=this.state.value,this.next())}let N=this.flowParseObjectTypeProperty(y,d,f,b,x,n,a??!u);N===null?(p=!0,m=this.state.lastTokStartLoc):c.properties.push(N)}this.flowObjectTypeSemicolon(),m&&!this.match(8)&&!this.match(9)&&this.raise(F.UnexpectedExplicitInexactInObject,m)}this.expect(l),n&&(c.inexact=p);let h=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=o,h}flowParseObjectTypeProperty(e,s,n,i,a,o,c){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?c||this.raise(F.InexactInsideExact,this.state.lastTokStartLoc):this.raise(F.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(F.InexactVariance,i),null):(o||this.raise(F.UnexpectedSpreadType,this.state.lastTokStartLoc),n!=null&&this.unexpected(n),i&&this.raise(F.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=n!=null,e.kind=a;let l=!1;return this.match(47)||this.match(10)?(e.method=!0,n!=null&&this.unexpected(n),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(F.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(l=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=l,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,n=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?F.GetterMayNotHaveThisParam:F.SetterMayNotHaveThisParam,e.value.this),n!==s&&this.raise(e.kind==="get"?g.BadGetterArity:g.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(g.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var n;(n=e)!=null||(e=this.state.startLoc);let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let a=this.startNodeAt(e);a.qualification=i,a.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(a,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,s){let n=this.startNodeAt(e);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let s=null,n=!1,i=null,a=this.startNode(),o=this.lookahead(),c=this.state.type===78;return o.type===14||o.type===17?(c&&!e&&this.raise(F.ThisParamMustBeFirst,a),s=this.parseIdentifier(c),this.eat(17)&&(n=!0,c&&this.raise(F.ThisParamMayNotBeOptional,a)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),a.name=s,a.optional=n,a.typeAnnotation=i,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let s=this.startNodeAt(e.loc.start);return s.name=null,s.optional=!1,s.typeAnnotation=e,this.finishNode(s,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let s=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:e,rest:s,_this:n}}flowIdentToTypeAnnotation(e,s,n){switch(n.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(e,n)}}flowParsePrimaryType(){let e=this.state.startLoc,s=this.startNode(),n,i,a=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=o,i;case 47:{let c=this.startNode();return c.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),c.params=n.params,c.rest=n.rest,c.this=n._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),this.finishNode(c,"FunctionTypeAnnotation")}case 10:{let c=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(W(this.state.type)||this.match(78)){let l=this.lookahead().type;a=l!==17&&l!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?n=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):n=this.flowParseFunctionTypeParams(),c.params=n.params,c.rest=n.rest,c.this=n._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),c.typeParameters=null,this.finishNode(c,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return s.value=this.match(85),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(F.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Mc(this.state.type)){let c=Xt(this.state.type);return this.next(),super.createIdentifier(s,c)}else if(W(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,s,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,s=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(e),a=this.eat(18);n=n||a,this.expect(0),!a&&this.match(3)?(i.elementType=s,this.next(),s=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=s,i.indexType=this.flowParseType(),this.expect(3),n?(i.optional=a,s=this.finishNode(i,"OptionalIndexedAccessType")):s=this.finishNode(i,"IndexedAccessType"))}return s}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let s=this.startNodeAt(e.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(e)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let s=this.flowParseAnonFunctionWithoutParens();for(e.types=[s];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?s:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let s=this.flowParseIntersectionType();for(e.types=[s];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?s:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let s=this.flowParseUnionType();return this.state.inType=e,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(e,s)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let s=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),s}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,s,n=!1){if(s){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,n));return}super.parseFunctionBody(e,!1,n)}parseFunctionBodyAndFinish(e,s,n=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,n)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let n=this.lookahead();if(it(n.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.plugins.get("flow").enums&&this.isContextual(126)){let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,n){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||W(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(W(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,n)}shouldParseExportDeclaration(){let{type:e}=this.state;return Od(e)||this.plugins.get("flow").enums&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Od(e)||this.plugins.get("flow").enums&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.plugins.get("flow").enums&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,n){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let h=this.lookaheadCharCode();if(h===44||h===61||h===58||h===41)return this.setOptionalParametersError(n),e}this.expect(17);let i=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:c,failed:l}=this.tryParseConditionalConsequent(),[u,p]=this.getArrowLikeExpressions(c);if(l||p.length>0){let h=[...a];if(p.length>0){this.state=i,this.state.noArrowAt=h;for(let d=0;d<p.length;d++)h.push(p[d].start);({consequent:c,failed:l}=this.tryParseConditionalConsequent()),[u,p]=this.getArrowLikeExpressions(c)}l&&u.length>1&&this.raise(F.AmbiguousConditionalArrow,i.startLoc),l&&u.length===1&&(this.state=i,h.push(u[0].start),this.state.noArrowAt=h,{consequent:c,failed:l}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=c,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let n=[e],i=[];for(;n.length!==0;){let a=n.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):i.push(a),n.push(a.body)):a.type==="ConditionalExpression"&&(n.push(a.consequent),n.push(a.alternate))}return s?(i.forEach(a=>this.finishArrowValidation(a)),[i,[]]):xx(i,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let n;return this.state.noArrowParamsConversionAt.includes(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),n=s(),this.state.noArrowParamsConversionAt.pop()):n=s(),n}parseParenItem(e,s){let n=super.parseParenItem(e,s);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=n,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return n}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.plugins.get("flow").enums&&this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,n=super.maybeParseExportNamespaceSpecifier(e);return n&&e.exportKind==="type"&&this.unexpected(s),n}parseClassId(e,s,n){super.parseClassId(e,s,n),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,n){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,n),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(F.DeclareClassElement,i):s.value&&this.raise(F.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(g.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):rx(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,n){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,s,n)}toReferencedList(e,s){for(let i=0;i<e.length;i++){var n;let a=e[i];a&&a.type==="TypeCastExpression"&&!((n=a.extra)!=null&&n.parenthesized)&&(e.length>1||!s)&&this.raise(F.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,n,i){let a=super.parseArrayLike(e,s,n,i);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,n){return e==="TypeCastExpression"||super.isValidLVal(e,s,n)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,n,i,a,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,n,i,a,o),s.params&&a){let c=s.params;c.length>0&&this.isThisParam(c[0])&&this.raise(F.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){let c=s.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(F.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,n,i){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,n,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let s=e.implements=[];do{let n=this.startNode();n.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,s.push(this.finishNode(n,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let n=s[0];this.isThisParam(n)&&e.kind==="get"?this.raise(F.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(F.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,n,i,a,o,c){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let l;this.match(47)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,s,n,i,a,o,c);return l&&((u.value||u).typeParameters=l),u}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(F.PatternIsOptional,e),this.isThisParam(e)&&this.raise(F.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(F.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(F.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let n=super.parseMaybeDefault(e,s);return n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(F.TypeBeforeInitializer,n.typeAnnotation),n}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(F.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,s,n){s.local=Fd(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(s,n))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let s=this.lookaheadCharCode();return s===123||s===42}return!e&&this.isContextual(87)}applyImportPhase(e,s,n,i){if(super.applyImportPhase(e,s,n,i),s){if(!n&&this.match(65))return;e.exportKind=n==="type"?n:"value"}else n==="type"&&this.match(55)&&this.unexpected(),e.importKind=n==="type"||n==="typeof"?n:"value"}parseImportSpecifier(e,s,n,i,a){let o=e.imported,c=null;o.type==="Identifier"&&(o.name==="type"?c="type":o.name==="typeof"&&(c="typeof"));let l=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);c!==null&&!it(this.state.type)?(e.imported=p,e.importKind=c,e.local=Mt(p)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(c!==null&&it(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=c;else{if(s)throw this.raise(g.ImportBindingIsString,e,{importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(l=!0,e.local=Mt(e.imported))}let u=Fd(e);return n&&u&&this.raise(F.ImportTypeShorthandOnlyInPureImport,e),(n||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),l&&!n&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,s){let n=e.kind;n!=="get"&&n!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){if(this.match(14)){let n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return super.parseAsyncArrowFromCallExpression(e,s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,s){var n;let i=null,a;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(i=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,s),i),!a.error)return a.node;let{context:l}=this.state,u=l[l.length-1];(u===K.j_oTag||u===K.j_expr)&&l.pop()}if((n=a)!=null&&n.error||this.match(47)){var o,c;i=i||this.state.clone();let l,u=this.tryParse(h=>{var d;l=this.flowParseTypeParameterDeclaration();let f=this.forwardNoArrowParamsConversionAt(l,()=>{let y=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(y,l),y});(d=f.extra)!=null&&d.parenthesized&&h();let m=this.maybeUnwrapTypeCastExpression(f);return m.type!=="ArrowFunctionExpression"&&h(),m.typeParameters=l,this.resetStartLocationFromNode(m,l),f},i),p=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(F.UnexpectedTypeParameterBeforeAsyncArrowFunction,l),u.node;p=u.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(p)return this.state=u.failState,p;throw(c=a)!=null&&c.thrown?a.error:u.thrown?u.error:this.raise(F.UnexpectedTokenAfterTypeParameter,l)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.includes(e.start)?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,n,i=!0){if(!(n&&this.state.noArrowParamsConversionAt.includes(e.start))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(F.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,n,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(e,s,n){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();let i=this.startNodeAt(s);i.callee=e,i.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(i,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let i=this.state.clone(),a=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(s)||c(),i);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,n),i);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,s,n)}parseSubscript(e,s,n,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,n)return i.stop=!0,e;this.next();let a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!n&&this.shouldParseTypes()&&this.match(47)){let a=this.startNodeAt(s);a.callee=e;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),i.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,i.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,n,i)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let n=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(F.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(F.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let n=this.input.charCodeAt(s+e),i=this.input.charCodeAt(s+e+1);return n===58&&i===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:n===58&&i!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(g.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:n}){this.raise(F.EnumBooleanMemberNotInitialized,e,{memberName:n,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?F.EnumInvalidMemberInitializerSymbolType:F.EnumInvalidMemberInitializerPrimaryType:F.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(F.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(F.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let n=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:n.loc.start,value:n}:{type:"invalid",loc:e}}case 133:{let n=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:n.loc.start,value:n}:{type:"invalid",loc:e}}case 85:case 86:{let n=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:n.loc.start,value:n}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),n=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:n}}flowEnumCheckExplicitTypeMismatch(e,s,n){let{explicitType:i}=s;i!==null&&i!==n&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let n=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let o=this.startNode(),{id:c,init:l}=this.flowEnumMemberRaw(),u=c.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(F.EnumInvalidMemberName,c,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),n.has(u)&&this.raise(F.EnumDuplicateMemberName,c,{memberName:u,enumName:e}),n.add(u);let p={enumName:e,explicitType:s,memberName:u};switch(o.id=c,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"boolean"),o.init=l.value,i.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"number"),o.init=l.value,i.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"string"),o.init=l.value,i.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,p);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,p);break;default:i.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:n}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let i of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:n});return s}else{for(let i of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:n});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!W(this.state.type))throw this.raise(F.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(F.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let n=s.name,i=s.loc.start,a=this.flowEnumParseExplicitType({enumName:n});this.expect(5);let{members:o,hasUnknownMembers:c}=this.flowEnumMembers({enumName:n,explicitType:a});switch(e.hasUnknownMembers=c,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let l=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let u=o.booleanMembers.length,p=o.numberMembers.length,h=o.stringMembers.length,d=o.defaultedMembers.length;if(!u&&!p&&!h&&!d)return l();if(!u&&!p)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!p&&!h&&u>=d){for(let f of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(f.loc.start,{enumName:n,memberName:f.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!u&&!h&&p>=d){for(let f of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(f.loc.start,{enumName:n,memberName:f.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(F.EnumInconsistentMemberValues,i,{enumName:n}),l()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},Px={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ms=Ot`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:r,HTMLEntity:t})=>`Unexpected token \`${r}\`. Did you mean \`${t}\` or \`{'${r}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Kt(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}function zs(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return zs(r.object)+"."+zs(r.property);throw new Error("Node had unexpected type: "+r.type)}var vx=r=>class extends r{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ms.UnterminatedJsxContent,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:if(this.state.pos===this.state.start){n===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(n);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Ks(n)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),n;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,n=e?`
1
+ "use strict";var ga=Object.create;var Jt=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var ba=Object.getOwnPropertyNames;var Ta=Object.getPrototypeOf,Pa=Object.prototype.hasOwnProperty;var pe=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports),Hr=(i,s)=>{for(var e in s)Jt(i,e,{get:s[e],enumerable:!0})},Xr=(i,s,e,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of ba(s))!Pa.call(i,r)&&r!==e&&Jt(i,r,{get:()=>s[r],enumerable:!(t=xa(s,r))||t.enumerable});return i};var je=(i,s,e)=>(e=i!=null?ga(Ta(i)):{},Xr(s||!i||!i.__esModule?Jt(e,"default",{value:i,enumerable:!0}):e,i)),Sa=i=>Xr(Jt({},"__esModule",{value:!0}),i);var Yr=pe((tu,Qr)=>{"use strict";Qr.exports=function(){if(process.env.npm_config_user_agent)return Aa(process.env.npm_config_user_agent)};function Aa(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 ii=pe(Os=>{var ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Os.encode=function(i){if(0<=i&&i<ri.length)return ri[i];throw new TypeError("Must be between 0 and 63: "+i)};Os.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 Bs=pe(Fs=>{var ni=ii(),Ms=5,ai=1<<Ms,oi=ai-1,li=ai;function va(i){return i<0?(-i<<1)+1:(i<<1)+0}function Ca(i){var s=(i&1)===1,e=i>>1;return s?-e:e}Fs.encode=function(s){var e="",t,r=va(s);do t=r&oi,r>>>=Ms,r>0&&(t|=li),e+=ni.encode(t);while(r>0);return e};Fs.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=ni.decode(s.charCodeAt(e++)),l===-1)throw new Error("Invalid base64 digit: "+s.charAt(e-1));o=!!(l&li),l&=oi,n=n+(l<<a),a+=Ms}while(o);t.value=Ca(n),t.rest=e}});var Ze=pe(te=>{function Ia(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=Ia;var ci=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Na=/^data:.+\,.+$/;function bt(i){var s=i.match(ci);return s?{scheme:s[1],auth:s[2],host:s[3],port:s[4],path:s[5]}:null}te.urlParse=bt;function Ye(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=Ye;var ka=32;function La(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>ka&&s.pop(),n}}var _s=La(function(s){var e=s,t=bt(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,Ye(t)):e});te.normalize=_s;function ui(i,s){i===""&&(i="."),s===""&&(s=".");var e=bt(s),t=bt(i);if(t&&(i=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),Ye(e);if(e||s.match(Na))return s;if(t&&!t.host&&!t.path)return t.host=s,Ye(t);var r=s.charAt(0)==="/"?s:_s(i.replace(/\/+$/,"")+"/"+s);return t?(t.path=r,Ye(t)):r}te.join=ui;te.isAbsolute=function(i){return i.charAt(0)==="/"||ci.test(i)};function Da(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=Da;var hi=function(){var i=Object.create(null);return!("__proto__"in i)}();function pi(i){return i}function Oa(i){return fi(i)?"$"+i:i}te.toSetString=hi?pi:Oa;function Ma(i){return fi(i)?i.slice(1):i}te.fromSetString=hi?pi:Ma;function fi(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 Fa(i,s,e){var t=ke(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:ke(i.name,s.name)}te.compareByOriginalPositions=Fa;function Ba(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:ke(i.name,s.name)}te.compareByOriginalPositionsNoSource=Ba;function _a(i,s,e){var t=i.generatedLine-s.generatedLine;return t!==0||(t=i.generatedColumn-s.generatedColumn,t!==0||e)||(t=ke(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:ke(i.name,s.name)}te.compareByGeneratedPositionsDeflated=_a;function ja(i,s,e){var t=i.generatedColumn-s.generatedColumn;return t!==0||e||(t=ke(i.source,s.source),t!==0)||(t=i.originalLine-s.originalLine,t!==0)||(t=i.originalColumn-s.originalColumn,t!==0)?t:ke(i.name,s.name)}te.compareByGeneratedPositionsDeflatedNoLine=ja;function ke(i,s){return i===s?0:i===null?1:s===null?-1:i>s?1:-1}function Ra(i,s){var e=i.generatedLine-s.generatedLine;return e!==0||(e=i.generatedColumn-s.generatedColumn,e!==0)||(e=ke(i.source,s.source),e!==0)||(e=i.originalLine-s.originalLine,e!==0)||(e=i.originalColumn-s.originalColumn,e!==0)?e:ke(i.name,s.name)}te.compareByGeneratedPositionsInflated=Ra;function Ua(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}te.parseSourceMapInput=Ua;function Va(i,s,e){if(s=s||"",i&&(i[i.length-1]!=="/"&&s[0]!=="/"&&(i+="/"),s=i+s),e){var t=bt(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=ui(Ye(t),s)}return _s(s)}te.computeSourceURL=Va});var Us=pe(di=>{var js=Ze(),Rs=Object.prototype.hasOwnProperty,ze=typeof Map<"u";function Le(){this._array=[],this._set=ze?new Map:Object.create(null)}Le.fromArray=function(s,e){for(var t=new Le,r=0,n=s.length;r<n;r++)t.add(s[r],e);return t};Le.prototype.size=function(){return ze?this._set.size:Object.getOwnPropertyNames(this._set).length};Le.prototype.add=function(s,e){var t=ze?s:js.toSetString(s),r=ze?this.has(s):Rs.call(this._set,t),n=this._array.length;(!r||e)&&this._array.push(s),r||(ze?this._set.set(s,n):this._set[t]=n)};Le.prototype.has=function(s){if(ze)return this._set.has(s);var e=js.toSetString(s);return Rs.call(this._set,e)};Le.prototype.indexOf=function(s){if(ze){var e=this._set.get(s);if(e>=0)return e}else{var t=js.toSetString(s);if(Rs.call(this._set,t))return this._set[t]}throw new Error('"'+s+'" is not in the set.')};Le.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)};Le.prototype.toArray=function(){return this._array.slice()};di.ArraySet=Le});var gi=pe(yi=>{var mi=Ze();function $a(i,s){var e=i.generatedLine,t=s.generatedLine,r=i.generatedColumn,n=s.generatedColumn;return t>e||t==e&&n>=r||mi.compareByGeneratedPositionsInflated(i,s)<=0}function Kt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Kt.prototype.unsortedForEach=function(s,e){this._array.forEach(s,e)};Kt.prototype.add=function(s){$a(this._last,s)?(this._last=s,this._array.push(s)):(this._sorted=!1,this._array.push(s))};Kt.prototype.toArray=function(){return this._sorted||(this._array.sort(mi.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};yi.MappingList=Kt});var Vs=pe(xi=>{var Tt=Bs(),Y=Ze(),Ht=Us().ArraySet,qa=gi().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 Ht,this._names=new Ht,this._mappings=new qa,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 Ht,o=new Ht;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+=Tt.encode(c.generatedColumn-s),s=c.generatedColumn,c.source!=null&&(h=this._sources.indexOf(c.source),l+=Tt.encode(h-a),a=h,l+=Tt.encode(c.originalLine-1-r),r=c.originalLine-1,l+=Tt.encode(c.originalColumn-t),t=c.originalColumn,c.name!=null&&(u=this._names.indexOf(c.name),l+=Tt.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())};xi.SourceMapGenerator=ge});var bi=pe(We=>{We.GREATEST_LOWER_BOUND=1;We.LEAST_UPPER_BOUND=2;function $s(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?$s(a,s,e,t,r,n):n==We.LEAST_UPPER_BOUND?s<t.length?s:-1:a:a-i>1?$s(i,a,e,t,r,n):n==We.LEAST_UPPER_BOUND?a:i<0?-1:i}We.search=function(s,e,t,r){if(e.length===0)return-1;var n=$s(-1,e.length,s,e,t,r||We.GREATEST_LOWER_BOUND);if(n<0)return-1;for(;n-1>=0&&t(e[n],e[n-1],!0)===0;)--n;return n}});var Si=pe(Pi=>{function za(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 Wa(i){let s=za.toString();return new Function(`return ${s}`)()(i)}var Ti=new WeakMap;Pi.quickSort=function(i,s,e=0){let t=Ti.get(s);t===void 0&&(t=Wa(s),Ti.set(s,t)),t(i,s,e,i.length-1)}});var wi=pe(Xt=>{var N=Ze(),zs=bi(),et=Us().ArraySet,Ja=Bs(),Pt=Si().quickSort;function K(i,s){var e=i;return typeof i=="string"&&(e=N.parseSourceMapInput(i)),e.sections!=null?new Te(e,s):new se(e,s)}K.fromSourceMap=function(i,s){return se.fromSourceMap(i,s)};K.prototype._version=3;K.prototype.__generatedMappings=null;Object.defineProperty(K.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});K.prototype.__originalMappings=null;Object.defineProperty(K.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});K.prototype._charIsMappingSeparator=function(s,e){var t=s.charAt(e);return t===";"||t===","};K.prototype._parseMappings=function(s,e){throw new Error("Subclasses must implement _parseMappings")};K.GENERATED_ORDER=1;K.ORIGINAL_ORDER=2;K.GREATEST_LOWER_BOUND=1;K.LEAST_UPPER_BOUND=2;K.prototype.eachMapping=function(s,e,t){var r=e||null,n=t||K.GENERATED_ORDER,a;switch(n){case K.GENERATED_ORDER:a=this._generatedMappings;break;case K.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)})}};K.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,zs.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};Xt.SourceMapConsumer=K;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=et.fromArray(n.map(String),!0),this._sources=et.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(K.prototype);se.prototype.consumer=K;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=et.fromArray(s._names.toArray(),!0),n=t._sources=et.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 Ei;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 Pt(t.__originalMappings,N.compareByOriginalPositions),t};se.prototype._version=3;Object.defineProperty(se.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Ei(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var qs=N.compareByGeneratedPositionsDeflatedNoLine;function Ai(i,s){let e=i.length,t=i.length-s;if(!(t<=1))if(t==2){let r=i[s],n=i[s+1];qs(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(qs(a,o)<=0)break;i[n-1]=o,i[n]=a}else Pt(i,qs,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,Ai(p,T),T=p.length;else if(s.charAt(u)===",")u++;else{for(g=new Ei,g.generatedLine=t,P=u;P<c&&!this._charIsMappingSeparator(s,P);P++);for(y=s.slice(u,P),b=[];u<P;)Ja.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 E=g.source;for(;d.length<=E;)d.push(null);d[E]===null&&(d[E]=[]),d[E].push(g)}}Ai(p,T),this.__generatedMappings=p;for(var A=0;A<d.length;A++)d[A]!=null&&Pt(d[A],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 zs.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",K.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",K.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}};Xt.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 et,this._names=new et;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 K(N.getArg(a,"map"),s)}})}Te.prototype=Object.create(K.prototype);Te.prototype.constructor=K;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=zs.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)}Pt(this.__generatedMappings,N.compareByGeneratedPositionsDeflated),Pt(this.__originalMappings,N.compareByOriginalPositions)};Xt.IndexedSourceMapConsumer=Te});var Ci=pe(vi=>{var Ka=Vs().SourceMapGenerator,Gt=Ze(),Ha=/(\r?\n)/,Xa=10,tt="$$$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[tt]=!0,t!=null&&this.add(t)}fe.fromStringWithSourceMap=function(s,e,t){var r=new fe,n=s.split(Ha),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=Gt.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?Gt.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[tt]||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[tt]||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[tt]?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[tt]?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[Gt.toSetString(s)]=e};fe.prototype.walkSourceContents=function(s){for(var e=0,t=this.children.length;e<t;e++)this.children[e][tt]&&this.children[e].walkSourceContents(s);for(var r=Object.keys(this.sourceContents),e=0,t=r.length;e<t;e++)s(Gt.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 Ka(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)===Xa?(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}};vi.SourceNode=fe});var Ii=pe(Qt=>{Qt.SourceMapGenerator=Vs().SourceMapGenerator;Qt.SourceMapConsumer=wi().SourceMapConsumer;Qt.SourceNode=Ci().SourceNode});var an=pe(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});function Ga(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}},at=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 Ni="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Qa={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Ni},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Ni}},ki={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"},es=i=>i.type==="UpdateExpression"?ki.UpdateExpression[`${i.prefix}`]:ki[i.type],Ya={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
+ - 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
+ - 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 ${es(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${es(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${es(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."},Za={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."},eo=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),to={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 ${es({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.'},so=["message"];function Li(i,s,e){Object.defineProperty(i,s,{enumerable:!1,configurable:!0,value:e})}function ro({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),Li(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))}),Li(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 Fe(i,s){if(Array.isArray(i))return t=>Fe(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=Ga(n,so),l=typeof a=="string"?()=>a:a;e[t]=ro(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:t,toMessage:l},s?{syntaxPlugin:s}:{},o))}return e}var m=Object.assign({},Fe(Qa),Fe(Ya),Fe(Za),Fe`pipelineOperator`(to)),{defineProperty:io}=Object,Di=(i,s)=>{i&&io(i,s,{enumerable:!1,value:i[s]})};function St(i){return Di(i.loc.start,"index"),Di(i.loc.end,"index"),i}var no=i=>class extends i{parse(){let e=St(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(St)),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 St(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),St(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),St(e)}},Ke=class{constructor(s,e){this.token=void 0,this.preserveSpace=void 0,this.token=s,this.preserveSpace=!!e}},$={brace:new Ke("{"),j_oTag:new Ke("<tag"),j_cTag:new Ke("</tag"),j_expr:new Ke("<tag>...</tag>",!0)};$.template=new Ke("`",!0);var _=!0,C=!0,Ws=!0,At=!0,Re=!0,ao=!0,rs=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}},gr=new Map;function j(i,s={}){s.keyword=i;let e=D(i,s);return gr.set(i,e),e}function ne(i,s){return D(i,{beforeExpr:_,binop:s})}var Ct=-1,Oe=[],xr=[],br=[],Tr=[],Pr=[],Sr=[];function D(i,s={}){var e,t,r,n;return++Ct,xr.push(i),br.push((e=s.binop)!=null?e:-1),Tr.push((t=s.beforeExpr)!=null?t:!1),Pr.push((r=s.startsExpr)!=null?r:!1),Sr.push((n=s.prefix)!=null?n:!1),Oe.push(new rs(i,s)),Ct}function B(i,s={}){var e,t,r,n;return++Ct,gr.set(i,Ct),xr.push(i),br.push((e=s.binop)!=null?e:-1),Tr.push((t=s.beforeExpr)!=null?t:!1),Pr.push((r=s.startsExpr)!=null?r:!1),Sr.push((n=s.prefix)!=null?n:!1),Oe.push(new rs("name",s)),Ct}var oo={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:At}),assign:D("_=",{beforeExpr:_,isAssign:At}),slashAssign:D("_=",{beforeExpr:_,isAssign:At}),xorAssign:D("_=",{beforeExpr:_,isAssign:At}),moduloAssign:D("_=",{beforeExpr:_,isAssign:At}),incDec:D("++/--",{prefix:Re,postfix:ao,startsExpr:C}),bang:D("!",{beforeExpr:_,prefix:Re,startsExpr:C}),tilde:D("~",{beforeExpr:_,prefix:Re,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:Re,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:Re,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:Re,startsExpr:C}),_void:j("void",{beforeExpr:_,prefix:Re,startsExpr:C}),_delete:j("delete",{beforeExpr:_,prefix:Re,startsExpr:C}),_do:j("do",{isLoop:Ws,beforeExpr:_}),_for:j("for",{isLoop:Ws}),_while:j("while",{isLoop:Ws}),_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 R(i){return i>=93&&i<=132}function lo(i){return i<=92}function Pe(i){return i>=58&&i<=132}function zi(i){return i>=58&&i<=136}function co(i){return Tr[i]}function Qs(i){return Pr[i]}function uo(i){return i>=29&&i<=33}function Oi(i){return i>=129&&i<=131}function ho(i){return i>=90&&i<=92}function Ar(i){return i>=58&&i<=92}function po(i){return i>=39&&i<=59}function fo(i){return i===34}function mo(i){return Sr[i]}function yo(i){return i>=121&&i<=123}function go(i){return i>=124&&i<=130}function Ve(i){return xr[i]}function ts(i){return br[i]}function xo(i){return i===57}function is(i){return i>=24&&i<=25}function De(i){return Oe[i]}Oe[8].updateContext=i=>{i.pop()},Oe[5].updateContext=Oe[7].updateContext=Oe[23].updateContext=i=>{i.push($.brace)},Oe[22].updateContext=i=>{i[i.length-1]===$.template?i.pop():i.push($.template)},Oe[142].updateContext=i=>{i.push($.j_expr,$.j_oTag)};var Er="\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-\u1C8A\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-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\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",Wi="\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\u0897-\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",bo=new RegExp("["+Er+"]"),To=new RegExp("["+Er+Wi+"]");Er=Wi=null;var Ji=[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,4,51,13,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,39,27,10,22,251,41,7,1,17,2,60,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,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,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,200,32,32,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,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,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,229,29,3,0,496,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],Po=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,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,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,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,343,9,54,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,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,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,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function Ys(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 Me(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&bo.test(String.fromCharCode(i)):Ys(i,Ji)}function rt(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&&To.test(String.fromCharCode(i)):Ys(i,Ji)||Ys(i,Po)}var wr={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"]},So=new Set(wr.keyword),Ao=new Set(wr.strict),Eo=new Set(wr.strictBind);function Ki(i,s){return s&&i==="await"||i==="enum"}function Hi(i,s){return Ki(i,s)||Ao.has(i)}function Xi(i){return Eo.has(i)}function Gi(i,s){return Hi(i,s)||Xi(i)}function wo(i){return So.has(i)}function vo(i,s,e){return i===64&&s===64&&Me(e)}var Co=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 Io(i){return Co.has(i)}var It=class{constructor(s){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=s}},Nt=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 It(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}}},Zs=class extends It{constructor(...s){super(...s),this.declareFunctions=new Set}},er=class extends Nt{createScope(s){return new Zs(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)}},tr=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 Qi(i,s){i.trailingComments===void 0?i.trailingComments=s:i.trailingComments.unshift(...s)}function No(i,s){i.leadingComments===void 0?i.leadingComments=s:i.leadingComments.unshift(...s)}function kt(i,s){i.innerComments===void 0?i.innerComments=s:i.innerComments.unshift(...s)}function Et(i,s,e){let t=null,r=s.length;for(;t===null&&r>0;)t=s[--r];t===null||t.start>e.start?kt(i,e.comments):Qi(t,e.comments)}var sr=class extends tr{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&&Qi(s.leadingNode,e),s.trailingNode!==null&&No(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":Et(t,t.properties,s);break;case"CallExpression":case"OptionalCallExpression":Et(t,t.arguments,s);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Et(t,t.params,s);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Et(t,t.elements,s);break;case"ExportNamedDeclaration":case"ImportDeclaration":Et(t,t.specifiers,s);break;default:kt(t,e)}else kt(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}}},ko=/\r\n|[\r\n\u2028\u2029]/,Yt=new RegExp(ko.source,"g");function it(i){switch(i){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Mi(i,s,e){for(let t=s;t<e;t++)if(it(i.charCodeAt(t)))return!0;return!1}var Js=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ks=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Lo(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 rr=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}},Do=function(s){return s>=48&&s<=57},Fi={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Zt={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 Bi(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(Oo(i,d,s,e)){c+=s.slice(h,e);break}if(d===92){c+=s.slice(h,e);let p=Mo(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
+ `,++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 Oo(i,s,e,t){return i==="template"?s===96||s===36&&e.charCodeAt(t+1)===123:s===(i==="double"?34:39)}function Mo(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(`
5
+ `);case 114:return o("\r");case 120:{let c;return{code:c,pos:s}=ir(i,s,e,t,2,!1,a,n),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:s}=Zi(i,s,e,t,a,n),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:i.charCodeAt(s)===10&&++s;case 10:e=s,++t;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);n.strictNumericEscape(s-1,e,t);default:if(l>=48&&l<=55){let c=s-1,h=/^[0-7]+/.exec(i.slice(c,s+2))[0],f=parseInt(h,8);f>255&&(h=h.slice(0,-1),f=parseInt(h,8)),s+=h.length-1;let d=i.charCodeAt(s);if(h!=="0"||d===56||d===57){if(r)return o(null);n.strictNumericEscape(c,e,t)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function ir(i,s,e,t,r,n,a,o){let l=s,c;return{n:c,pos:s}=Yi(i,s,e,t,16,r,n,!1,o,!a),c===null&&(a?o.invalidEscapeSequence(l,e,t):s=l-1),{code:c,pos:s}}function Yi(i,s,e,t,r,n,a,o,l,c){let u=s,h=r===16?Fi.hex:Fi.decBinOct,f=r===16?Zt.hex:r===10?Zt.dec:r===8?Zt.oct:Zt.bin,d=!1,p=0;for(let g=0,y=n??1/0;g<y;++g){let b=i.charCodeAt(s),P;if(b===95&&o!=="bail"){let k=i.charCodeAt(s-1),T=i.charCodeAt(s+1);if(o){if(Number.isNaN(T)||!f(T)||h.has(k)||h.has(T)){if(c)return{n:null,pos:s};l.unexpectedNumericSeparator(s,e,t)}}else{if(c)return{n:null,pos:s};l.numericSeparatorInEscapeSequence(s,e,t)}++s;continue}if(b>=97?P=b-97+10:b>=65?P=b-65+10:Do(b)?P=b-48:P=1/0,P>=r){if(P<=9&&c)return{n:null,pos:s};if(P<=9&&l.invalidDigit(s,e,t,r))P=0;else if(a)P=0,d=!0;else break}++s,p=p*r+P}return s===u||n!=null&&s-u!==n||d?{n:null,pos:s}:{n:p,pos:s}}function Zi(i,s,e,t,r,n){let a=i.charCodeAt(s),o;if(a===123){if(++s,{code:o,pos:s}=ir(i,s,e,t,i.indexOf("}",s)-s,!0,r,n),++s,o!==null&&o>1114111)if(r)n.invalidCodePoint(s,e,t);else return{code:null,pos:s}}else({code:o,pos:s}=ir(i,s,e,t,4,!1,r,n));return{code:o,pos:s}}function wt(i,s,e){return new Ce(e,i-s,i)}var Fo=new Set([103,109,115,105,121,117,100,118]),ve=class{constructor(s){this.type=s.type,this.value=s.value,this.start=s.start,this.end=s.end,this.loc=new at(s.startLoc,s.endLoc)}},nr=class extends sr{constructor(s,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,r,n,a)=>this.options.errorRecovery?(this.raise(m.InvalidDigit,wt(t,r,n),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(m.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(m.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(m.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(m.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,r,n)=>{this.recordStrictModeErrors(m.StrictNumericEscape,wt(t,r,n))},unterminated:(t,r,n)=>{throw this.raise(m.UnterminatedString,wt(t-1,r,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(m.StrictNumericEscape),unterminated:(t,r,n)=>{throw this.raise(m.UnterminatedTemplate,wt(t,r,n))}}),this.state=new rr,this.state.init(s),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(s){this.tokens.length=this.state.tokensLength,this.tokens.push(s),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new ve(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(s){return this.match(s)?(this.next(),!0):!1}match(s){return this.state.type===s}createLookaheadState(s){return{pos:s.pos,value:null,type:s.type,start:s.start,end:s.end,context:[this.curContext()],inType:s.inType,startLoc:s.startLoc,lastTokEndLoc:s.lastTokEndLoc,curLine:s.curLine,lineStart:s.lineStart,curPosition:s.curPosition}}lookahead(){let s=this.state;this.state=this.createLookaheadState(s),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=s,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(s){return Js.lastIndex=s,Js.test(this.input)?Js.lastIndex:s}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(s){return Ks.lastIndex=s,Ks.test(this.input)?Ks.lastIndex:s}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(s){let e=this.input.charCodeAt(s);if((e&64512)===55296&&++s<this.input.length){let t=this.input.charCodeAt(s);(t&64512)===56320&&(e=65536+((e&1023)<<10)+(t&1023))}return e}setStrict(s){this.state.strict=s,s&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,t)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(s){let e;this.isLookahead||(e=this.state.curPosition());let t=this.state.pos,r=this.input.indexOf(s,t+2);if(r===-1)throw this.raise(m.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+s.length,Yt.lastIndex=t+2;Yt.test(this.input)&&Yt.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Yt.lastIndex;if(this.isLookahead)return;let n={type:"CommentBlock",value:this.input.slice(t+2,r),start:t,end:r+s.length,loc:new at(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipLineComment(s){let e=this.state.pos,t;this.isLookahead||(t=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=s);if(this.state.pos<this.length)for(;!it(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let n=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+s,n),start:e,end:n,loc:new at(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(o),o}skipSpace(){let s=this.state.pos,e=[];e:for(;this.state.pos<this.length;){let t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let r=this.skipBlockComment("*/");r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r));break}case 47:{let r=this.skipLineComment(2);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r));break}default:break e}break;default:if(Lo(t))++this.state.pos;else if(t===45&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(this.input.charCodeAt(r+1)===45&&this.input.charCodeAt(r+2)===62&&(s===0||this.state.lineStart>s)){let n=this.skipLineComment(3);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else if(t===60&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){let n=this.skipLineComment(4);n!==void 0&&(this.addComment(n),this.options.attachComment&&e.push(n))}else break e}else break e}}if(e.length>0){let t=this.state.pos,r={start:s,end:t,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(s,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let t=this.state.type;this.state.type=s,this.state.value=e,this.isLookahead||this.updateContext(t)}replaceToken(s){this.state.type=s,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let s=this.state.pos+1,e=this.codePointAtPos(s);if(e>=48&&e<=57)throw this.raise(m.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?m.RecordExpressionHashIncorrectStartSyntaxType:m.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else Me(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let s=this.input.charCodeAt(this.state.pos+1);if(s>=48&&s<=57){this.readNumber(!0);return}s===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let s=this.input.charCodeAt(this.state.pos+1);if(s!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!it(s)&&++this.state.pos<this.length;)s=this.input.charCodeAt(this.state.pos);let t=this.input.slice(e+2,this.state.pos);return this.finishToken(28,t),!0}readToken_mult_modulo(s){let e=s===42?55:54,t=1,r=this.input.charCodeAt(this.state.pos+1);s===42&&r===42&&(t++,r=this.input.charCodeAt(this.state.pos+2),e=57),r===61&&!this.state.inType&&(t++,e=s===37?33:30),this.finishOp(e,t)}readToken_pipe_amp(s){let e=this.input.charCodeAt(this.state.pos+1);if(e===s){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(s===124?41:42,2);return}if(s===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(m.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(m.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(s===124?43:45,1)}readToken_caret(){let s=this.input.charCodeAt(this.state.pos+1);s===61&&!this.state.inType?this.finishOp(32,2):s===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(s){let e=this.input.charCodeAt(this.state.pos+1);if(e===s){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:s}=this.state,e=this.input.charCodeAt(s+1);if(e===60){if(this.input.charCodeAt(s+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:s}=this.state,e=this.input.charCodeAt(s+1);if(e===62){let t=this.input.charCodeAt(s+2)===62?3:2;if(this.input.charCodeAt(s+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(s){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(s===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(s===61?29:35,1)}readToken_question(){let s=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);s===63?e===61?this.finishOp(30,3):this.finishOp(40,2):s===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(s){switch(s){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(m.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(m.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(s);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(s);return;case 124:case 38:this.readToken_pipe_amp(s);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(s);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(s);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Me(s)){this.readWord(s);return}}throw this.raise(m.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(s)})}finishOp(s,e){let t=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(s,t)}readRegexp(){let s=this.state.startLoc,e=this.state.start+1,t,r,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(m.UnterminatedRegExp,ae(s,1));let c=this.input.charCodeAt(n);if(it(c))throw this.raise(m.UnterminatedRegExp,ae(s,1));if(t)t=!1;else{if(c===91)r=!0;else if(c===93&&r)r=!1;else if(c===47&&!r)break;t=c===92}}let a=this.input.slice(e,n);++n;let o="",l=()=>ae(s,n+2-e);for(;n<this.length;){let c=this.codePointAtPos(n),u=String.fromCharCode(c);if(Fo.has(c))c===118?o.includes("u")&&this.raise(m.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(m.IncompatibleRegExpUVFlags,l()),o.includes(u)&&this.raise(m.DuplicateRegExpFlags,l());else if(rt(c)||c===92)this.raise(m.MalformedRegExpFlags,l());else break;++n,o+=u}this.state.pos=n,this.finishToken(137,{pattern:a,flags:o})}readInt(s,e,t=!1,r=!0){let{n,pos:a}=Yi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,s,e,t,r,this.errorHandlers_readInt,!1);return this.state.pos=a,n}readRadixNumber(s){let e=this.state.curPosition(),t=!1;this.state.pos+=2;let r=this.readInt(s);r==null&&this.raise(m.InvalidDigit,ae(e,2),{radix:s});let n=this.input.charCodeAt(this.state.pos);if(n===110)++this.state.pos,t=!0;else if(n===109)throw this.raise(m.InvalidDecimal,e);if(Me(this.codePointAtPos(this.state.pos)))throw this.raise(m.NumberIdentifier,this.state.curPosition());if(t){let a=this.input.slice(e.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,a);return}this.finishToken(134,r)}readNumber(s){let e=this.state.pos,t=this.state.curPosition(),r=!1,n=!1,a=!1,o=!1;!s&&this.readInt(10)===null&&this.raise(m.InvalidNumber,this.state.curPosition());let l=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(l){let d=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(m.StrictOctalLiteral,t),!this.state.strict){let p=d.indexOf("_");p>0&&this.raise(m.ZeroDigitNumericSeparator,ae(t,p))}o=l&&!/[89]/.test(d)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!o&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!o&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(m.InvalidOrMissingExponent,t),r=!0,a=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((r||l)&&this.raise(m.InvalidBigIntLiteral,t),++this.state.pos,n=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(a||l)&&this.raise(m.InvalidDecimal,t),++this.state.pos;var u=!0}if(Me(this.codePointAtPos(this.state.pos)))throw this.raise(m.NumberIdentifier,this.state.curPosition());let h=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(n){this.finishToken(135,h);return}if(u){this.finishToken(136,h);return}let f=o?parseInt(h,8):parseFloat(h);this.finishToken(134,f)}readCodePoint(s){let{code:e,pos:t}=Zi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,s,this.errorHandlers_readCodePoint);return this.state.pos=t,e}readString(s){let{str:e,pos:t,curLine:r,lineStart:n}=Bi(s===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=t+1,this.state.lineStart=n,this.state.curLine=r,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let s=this.input[this.state.pos],{str:e,firstInvalidLoc:t,pos:r,curLine:n,lineStart:a}=Bi("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=a,this.state.curLine=n,t&&(this.state.firstInvalidTemplateEscapePos=new Ce(t.curLine,t.pos-t.lineStart,t.pos)),this.input.codePointAt(r)===96?this.finishToken(24,t?null:s+e+"`"):(this.state.pos++,this.finishToken(25,t?null:s+e+"${"))}recordStrictModeErrors(s,e){let t=e.index;this.state.strict&&!this.state.strictErrors.has(t)?this.raise(s,e):this.state.strictErrors.set(t,[s,e])}readWord1(s){this.state.containsEsc=!1;let e="",t=this.state.pos,r=this.state.pos;for(s!==void 0&&(this.state.pos+=s<=65535?1:2);this.state.pos<this.length;){let n=this.codePointAtPos(this.state.pos);if(rt(n))this.state.pos+=n<=65535?1:2;else if(n===92){this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===t?Me:rt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(m.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(m.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(l)),r=this.state.pos}else break}return e+this.input.slice(r,this.state.pos)}readWord(s){let e=this.readWord1(s),t=gr.get(e);t!==void 0?this.finishToken(t,Ve(t)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:s}=this.state;Ar(s)&&this.state.containsEsc&&this.raise(m.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Ve(s)})}raise(s,e,t={}){let r=e instanceof Ce?e:e.loc.start,n=s(r,t);if(!this.options.errorRecovery)throw n;return this.isLookahead||this.state.errors.push(n),n}raiseOverwrite(s,e,t={}){let r=e instanceof Ce?e:e.loc.start,n=r.index,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let l=a[o];if(l.loc.index===n)return a[o]=s(r,t);if(l.loc.index<n)break}return this.raise(s,e,t)}updateContext(s){}unexpected(s,e){throw this.raise(m.UnexpectedToken,s??this.state.startLoc,{expected:e?Ve(e):null})}expectPlugin(s,e){if(this.hasPlugin(s))return!0;throw this.raise(m.MissingPlugin,e??this.state.startLoc,{missingPlugin:[s]})}expectOnePlugin(s){if(!s.some(e=>this.hasPlugin(e)))throw this.raise(m.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:s})}errorBuilder(s){return(e,t,r)=>{this.raise(s,wt(e,t,r))}}},ar=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},or=class{constructor(s){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=s}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new ar)}exit(){let s=this.stack.pop(),e=this.current();for(let[t,r]of Array.from(s.undefinedPrivateNames))e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,r):this.parser.raise(m.InvalidPrivateFieldResolution,r,{identifierName:t})}declarePrivateName(s,e,t){let{privateNames:r,loneAccessors:n,undefinedPrivateNames:a}=this.current(),o=r.has(s);if(e&3){let l=o&&n.get(s);if(l){let c=l&4,u=e&4,h=l&3,f=e&3;o=h===f||c!==u,o||n.delete(s)}else o||n.set(s,e)}o&&this.parser.raise(m.PrivateNameRedeclaration,t,{identifierName:s}),r.add(s),a.delete(s)}usePrivateName(s,e){let t;for(t of this.stack)if(t.privateNames.has(s))return;t?t.undefinedPrivateNames.set(s,e):this.parser.raise(m.InvalidPrivateFieldResolution,e,{identifierName:s})}},ot=class{constructor(s=0){this.type=s}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},ns=class extends ot{constructor(s){super(s),this.declarationErrors=new Map}recordDeclarationError(s,e){let t=e.index;this.declarationErrors.set(t,[s,e])}clearDeclarationError(s){this.declarationErrors.delete(s)}iterateErrors(s){this.declarationErrors.forEach(s)}},lr=class{constructor(s){this.parser=void 0,this.stack=[new ot],this.parser=s}enter(s){this.stack.push(s)}exit(){this.stack.pop()}recordParameterInitializerError(s,e){let t=e.loc.start,{stack:r}=this,n=r.length-1,a=r[n];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(s,t);else return;a=r[--n]}this.parser.raise(s,t)}recordArrowParameterBindingError(s,e){let{stack:t}=this,r=t[t.length-1],n=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(s,n);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(s,n);else return}recordAsyncArrowParametersError(s){let{stack:e}=this,t=e.length-1,r=e[t];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(m.AwaitBindingIdentifier,s),r=e[--t]}validateAsPattern(){let{stack:s}=this,e=s[s.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([t,r])=>{this.parser.raise(t,r);let n=s.length-2,a=s[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(r.index),a=s[--n]})}};function Bo(){return new ot(3)}function _o(){return new ns(1)}function jo(){return new ns(2)}function en(){return new ot}var cr=class{constructor(){this.stacks=[]}enter(s){this.stacks.push(s)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ss(i,s){return(i?2:0)|(s?1:0)}var ur=class extends nr{addExtra(s,e,t,r=!0){if(!s)return;let{extra:n}=s;n==null&&(n={},s.extra=n),r?n[e]=t:Object.defineProperty(n,e,{enumerable:r,value:t})}isContextual(s){return this.state.type===s&&!this.state.containsEsc}isUnparsedContextual(s,e){let t=s+e.length;if(this.input.slice(s,t)===e){let r=this.input.charCodeAt(t);return!(rt(r)||(r&64512)===55296)}return!1}isLookaheadContextual(s){let e=this.nextTokenStart();return this.isUnparsedContextual(e,s)}eatContextual(s){return this.isContextual(s)?(this.next(),!0):!1}expectContextual(s,e){if(!this.eatContextual(s)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,s)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Mi(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return Mi(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(s=!0){(s?this.isLineTerminator():this.eat(13))||this.raise(m.MissingSemicolon,this.state.lastTokEndLoc)}expect(s,e){this.eat(s)||this.unexpected(e,s)}tryParse(s,e=this.state.clone()){let t={node:null};try{let r=s((n=null)=>{throw t.node=n,t});if(this.state.errors.length>e.errors.length){let n=this.state;return this.state=e,this.state.tokensLength=n.tokensLength,{node:r,error:n.errors[e.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){let n=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:n};if(r===t)return{node:t.node,error:null,thrown:!1,aborted:!0,failState:n};throw r}}checkExpressionErrors(s,e){if(!s)return!1;let{shorthandAssignLoc:t,doubleProtoLoc:r,privateKeyLoc:n,optionalParametersLoc:a}=s,o=!!t||!!r||!!a||!!n;if(!e)return o;t!=null&&this.raise(m.InvalidCoverInitializedName,t),r!=null&&this.raise(m.DuplicateProto,r),n!=null&&this.raise(m.UnexpectedPrivateField,n),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return zi(this.state.type)}isPrivateName(s){return s.type==="PrivateName"}getPrivateNameSV(s){return s.id.name}hasPropertyAsPrivateName(s){return(s.type==="MemberExpression"||s.type==="OptionalMemberExpression")&&this.isPrivateName(s.property)}isObjectProperty(s){return s.type==="ObjectProperty"}isObjectMethod(s){return s.type==="ObjectMethod"}initializeScopes(s=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let t=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=s;let n=this.scope,a=this.getScopeHandler();this.scope=new a(this,s);let o=this.prodParam;this.prodParam=new cr;let l=this.classScope;this.classScope=new or(this);let c=this.expressionScope;return this.expressionScope=new lr(this),()=>{this.state.labels=e,this.exportedIdentifiers=t,this.inModule=r,this.scope=n,this.prodParam=o,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let s=0;this.inModule&&(s|=2),this.scope.enter(1),this.prodParam.enter(s)}checkDestructuringPrivate(s){let{privateKeyLoc:e}=s;e!==null&&this.expectPlugin("destructuringPrivate",e)}},nt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},lt=class{constructor(s,e,t){this.type="",this.start=e,this.end=0,this.loc=new at(t),s!=null&&s.options.ranges&&(this.range=[e,0]),s!=null&&s.filename&&(this.loc.filename=s.filename)}},vr=lt.prototype;vr.__clone=function(){let i=new lt(void 0,this.start,this.loc.start),s=Object.keys(this);for(let e=0,t=s.length;e<t;e++){let r=s[e];r!=="leadingComments"&&r!=="trailingComments"&&r!=="innerComments"&&(i[r]=this[r])}return i};function Ro(i){return Be(i)}function Be(i){let{type:s,start:e,end:t,loc:r,range:n,extra:a,name:o}=i,l=Object.create(vr);return l.type=s,l.start=e,l.end=t,l.loc=r,l.range=n,l.extra=a,l.name=o,s==="Placeholder"&&(l.expectedNode=i.expectedNode),l}function Uo(i){let{type:s,start:e,end:t,loc:r,range:n,extra:a}=i;if(s==="Placeholder")return Ro(i);let o=Object.create(vr);return o.type=s,o.start=e,o.end=t,o.loc=r,o.range=n,i.raw!==void 0?o.raw=i.raw:o.extra=a,o.value=i.value,o}var hr=class extends ur{startNode(){let s=this.state.startLoc;return new lt(this,s.index,s)}startNodeAt(s){return new lt(this,s.index,s)}startNodeAtNode(s){return this.startNodeAt(s.loc.start)}finishNode(s,e){return this.finishNodeAt(s,e,this.state.lastTokEndLoc)}finishNodeAt(s,e,t){return s.type=e,s.end=t.index,s.loc.end=t,this.options.ranges&&(s.range[1]=t.index),this.options.attachComment&&this.processComment(s),s}resetStartLocation(s,e){s.start=e.index,s.loc.start=e,this.options.ranges&&(s.range[0]=e.index)}resetEndLocation(s,e=this.state.lastTokEndLoc){s.end=e.index,s.loc.end=e,this.options.ranges&&(s.range[1]=e.index)}resetStartLocationFromNode(s,e){this.resetStartLocation(s,e.loc.start)}},Vo=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),O=Fe`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:i})=>`Cannot overwrite reserved type ${i}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:i,enumName:s})=>`Boolean enum members need to be initialized. Use either \`${i} = true,\` or \`${i} = false,\` in enum \`${s}\`.`,EnumDuplicateMemberName:({memberName:i,enumName:s})=>`Enum member names need to be unique, but the name \`${i}\` has already been used before in enum \`${s}\`.`,EnumInconsistentMemberValues:({enumName:i})=>`Enum \`${i}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:i,enumName:s})=>`Enum type \`${i}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${s}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:i})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${i}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:i,memberName:s,explicitType:e})=>`Enum \`${i}\` has type \`${e}\`, so the initializer of \`${s}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:i,memberName:s})=>`Symbol enum members cannot be initialized. Use \`${s},\` in enum \`${i}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:i,memberName:s})=>`The enum member initializer for \`${s}\` needs to be a literal (either a boolean, number, or string) in enum \`${i}\`.`,EnumInvalidMemberName:({enumName:i,memberName:s,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${s}\`, consider using \`${e}\`, in enum \`${i}\`.`,EnumNumberMemberNotInitialized:({enumName:i,memberName:s})=>`Number enum members need to be initialized, e.g. \`${s} = 1\` in enum \`${i}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:i})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${i}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:i})=>`Unexpected reserved type ${i}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:i,suggestion:s})=>`\`declare export ${i}\` is not supported. Use \`${s}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function $o(i){return i.type==="DeclareExportAllDeclaration"||i.type==="DeclareExportDeclaration"&&(!i.declaration||i.declaration.type!=="TypeAlias"&&i.declaration.type!=="InterfaceDeclaration")}function _i(i){return i.importKind==="type"||i.importKind==="typeof"}var qo={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function zo(i,s){let e=[],t=[];for(let r=0;r<i.length;r++)(s(i[r],r,i)?e:t).push(i[r]);return[e,t]}var Wo=/\*?\s*@((?:no)?flow)\b/,Jo=i=>class extends i{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return er}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,t){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=Wo.exec(e.value);if(t)if(t[1]==="flow")this.flowPragma="flow";else if(t[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(O.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return r.params=a.params,r.rest=a.rest,r.this=a._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(O.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(O.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,O.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,a=!1;return r.forEach(o=>{$o(o)?(n==="CommonJS"&&this.raise(O.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(O.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(O.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){let r=this.state.value;throw this.raise(O.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:r,suggestion:qo[r]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(O.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,r){Vo.has(e)&&this.raise(r?O.AssignReservedType:O.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return r.name=a.name,r.variance=n,r.bound=a.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(O.MissingTypeParamDefault,t),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let r=!1;do{let n=this.flowParseTypeParameter(r);t.params.push(n),n.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:a}){let o=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,u,h=!1;for(t&&this.match(6)?(this.expect(6),c=9,u=!0):(this.expect(5),c=8,u=!1),l.exact=u;!this.match(c);){let d=!1,p=null,g=null,y=this.startNode();if(n&&this.isContextual(118)){let P=this.lookahead();P.type!==14&&P.type!==17&&(this.next(),p=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let P=this.lookahead();P.type!==14&&P.type!==17&&(this.next(),d=!0)}let b=this.flowParseVariance();if(this.eat(0))p!=null&&this.unexpected(p),this.eat(0)?(b&&this.unexpected(b.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(y,d))):l.indexers.push(this.flowParseObjectTypeIndexer(y,d,b));else if(this.match(10)||this.match(47))p!=null&&this.unexpected(p),b&&this.unexpected(b.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(y,d));else{let P="init";if(this.isContextual(99)||this.isContextual(104)){let T=this.lookahead();zi(T.type)&&(P=this.state.value,this.next())}let k=this.flowParseObjectTypeProperty(y,d,p,b,P,r,a??!u);k===null?(h=!0,g=this.state.lastTokStartLoc):l.properties.push(k)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(O.UnexpectedExplicitInexactInObject,g)}this.expect(c),r&&(l.inexact=h);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,t,r,n,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(O.InexactInsideExact,this.state.lastTokStartLoc):this.raise(O.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(O.InexactVariance,n),null):(o||this.raise(O.UnexpectedSpreadType,this.state.lastTokStartLoc),r!=null&&this.unexpected(r),n&&this.raise(O.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=r!=null,e.kind=a;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(O.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(c=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=c,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t=e.kind==="get"?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?O.GetterMayNotHaveThisParam:O.SetterMayNotHaveThisParam,e.value.this),r!==t&&this.raise(e.kind==="get"?m.BadGetterArity:m.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(m.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){var r;(r=e)!=null||(e=this.state.startLoc);let n=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let a=this.startNodeAt(e);a.qualification=n,a.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(a,"QualifiedTypeIdentifier")}return n}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null,a=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!e&&this.raise(O.ThisParamMustBeFirst,a),t=this.parseIdentifier(l),this.eat(17)&&(r=!0,l&&this.raise(O.ThisParamMayNotBeOptional,a)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),a.name=t,a.optional=r,a.typeAnnotation=n,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),r,n,a=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=o,n;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),r=this.flowParseFunctionTypeParams(),l.params=r.params,l.rest=r.rest,l.this=r._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(R(this.state.type)||this.match(78)){let c=this.lookahead().type;a=c!==17&&c!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),n;this.eat(12)}return n?r=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):r=this.flowParseFunctionTypeParams(),l.params=r.params,l.rest=r.rest,l.this=r._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(O.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Ar(this.state.type)){let l=Ve(this.state.type);return this.next(),super.createIdentifier(t,l)}else if(R(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let n=this.startNodeAt(e),a=this.eat(18);r=r||a,this.expect(0),!a&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=a,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){let n=this.startNode();[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let r=this.lookahead();if(Pe(r.type)){let n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.plugins.get("flow").enums&&this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||R(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(R(this.state.type)){if(t.name==="interface")return this.flowParseInterface(e);if(t.name==="type")return this.flowParseTypeAlias(e);if(t.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return Oi(e)||this.plugins.get("flow").enums&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Oi(e)||this.plugins.get("flow").enums&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.plugins.get("flow").enums&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(r),e}this.expect(17);let n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(t),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[u,h]=this.getArrowLikeExpressions(l);if(c||h.length>0){let f=[...a];if(h.length>0){this.state=n,this.state.noArrowAt=f;for(let d=0;d<h.length;d++)f.push(h[d].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[u,h]=this.getArrowLikeExpressions(l)}c&&u.length>1&&this.raise(O.AmbiguousConditionalArrow,n.startLoc),c&&u.length===1&&(this.state=n,f.push(u[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let r=[e],n=[];for(;r.length!==0;){let a=r.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),r.push(a.body)):a.type==="ConditionalExpression"&&(r.push(a.consequent),r.push(a.alternate))}return t?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):zo(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var t;this.toAssignableList(e.params,(t=e.extra)==null?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return this.state.noArrowParamsConversionAt.includes(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}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=r,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return r}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(131)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.plugins.get("flow").enums&&this.isContextual(126)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"?this.raise(O.DeclareClassElement,n):t.value&&this.raise(O.DeclareClassFieldInitializer,t.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(m.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):vo(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let n=0;n<e.length;n++){let a=e[n];a?.type==="TypeCastExpression"&&(e[n]=this.typeCastToParameter(a))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;let a=e[n];a&&a.type==="TypeCastExpression"&&!((r=a.extra)!=null&&r.parenthesized)&&(e.length>1||!t)&&this.raise(O.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,t,r,n){let a=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,t,r){return e==="TypeCastExpression"||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,a,o){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,a,o),t.params&&a){let l=t.params;l.length>0&&this.isThisParam(l[0])&&this.raise(O.ThisParamBannedInConstructor,t)}else if(t.type==="MethodDefinition"&&a&&t.value.params){let l=t.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(O.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let t=e.implements=[];do{let r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,t.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&e.kind==="get"?this.raise(O.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(O.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,t,r,n,a,o,l);return c&&((u.value||u).typeParameters=c),u}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(O.PatternIsOptional,e),this.isThisParam(e)&&this.raise(O.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(O.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(O.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(O.TypeBeforeInitializer,r.typeAnnotation),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(O.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,r){t.local=_i(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind=r==="type"?r:"value"}else r==="type"&&this.match(55)&&this.unexpected(),e.importKind=r==="type"||r==="typeof"?r:"value"}parseImportSpecifier(e,t,r,n,a){let o=e.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let h=this.parseIdentifier(!0);l!==null&&!Pe(this.state.type)?(e.imported=h,e.importKind=l,e.local=Be(h)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&Pe(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(t)throw this.raise(m.ImportBindingIsString,e,{importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=Be(e.imported))}let u=_i(e);return r&&u&&this.raise(O.ImportTypeShorthandOnlyInPureImport,e),(r||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!r&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let r=e.kind;r!=="get"&&r!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=r}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n=null,a;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(n=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,t),n),!a.error)return a.node;let{context:c}=this.state,u=c[c.length-1];(u===$.j_oTag||u===$.j_expr)&&c.pop()}if((r=a)!=null&&r.error||this.match(47)){var o,l;n=n||this.state.clone();let c,u=this.tryParse(f=>{var d;c=this.flowParseTypeParameterDeclaration();let p=this.forwardNoArrowParamsConversionAt(c,()=>{let y=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(y,c),y});(d=p.extra)!=null&&d.parenthesized&&f();let g=this.maybeUnwrapTypeCastExpression(p);return g.type!=="ArrowFunctionExpression"&&f(),g.typeParameters=c,this.resetStartLocationFromNode(g,c),p},n),h=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(O.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),u.node;h=u.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(h)return this.state=u.failState,h;throw(l=a)!=null&&l.thrown?a.error:u.thrown?u.error:this.raise(O.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!(r&&this.state.noArrowParamsConversionAt.includes(e.start))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(O.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(e,t,r){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(t.index)){this.next();let n=this.startNodeAt(t);n.callee=e,n.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let n=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(t)||l(),n);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(e,t,r),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();let a=this.startNodeAt(t);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!r&&this.shouldParseTypes()&&this.match(47)){let a=this.startNodeAt(t);a.callee=e;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),!!this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(O.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(O.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return r===58&&n===58?t+2:this.input.slice(t+e,t+e+12)==="flow-include"?t+12:r===58&&n!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(m.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(O.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType==="symbol"?O.EnumInvalidMemberInitializerSymbolType:O.EnumInvalidMemberInitializerPrimaryType:O.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(O.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(O.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 133:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,t=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:r}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:n}=t;n!==null&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(O.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(O.EnumDuplicateMemberName,l,{memberName:u,enumName:e}),r.add(u);let h={enumName:e,explicitType:t,memberName:u};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,h,"boolean"),o.init=c.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,h,"number"),o.init=c.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,h,"string"),o.init=c.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,h);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,h);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,h);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(e,t,{enumName:r}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let n of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return t}else{for(let n of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!R(this.state.type))throw this.raise(O.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"&&this.raise(O.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,n=t.loc.start,a=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:r,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let c=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let u=o.booleanMembers.length,h=o.numberMembers.length,f=o.stringMembers.length,d=o.defaultedMembers.length;if(!u&&!h&&!f&&!d)return c();if(!u&&!h)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!h&&!f&&u>=d){for(let p of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(p.loc.start,{enumName:r,memberName:p.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!u&&!f&&h>=d){for(let p of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(p.loc.start,{enumName:r,memberName:p.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(O.EnumInconsistentMemberValues,n,{enumName:r}),c()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},Ko={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Je=Fe`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:i})=>`Expected corresponding JSX closing tag for <${i}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:i,HTMLEntity:s})=>`Unexpected token \`${i}\`. Did you mean \`${s}\` or \`{'${i}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Ue(i){return i?i.type==="JSXOpeningFragment"||i.type==="JSXClosingFragment":!1}function st(i){if(i.type==="JSXIdentifier")return i.name;if(i.type==="JSXNamespacedName")return i.namespace.name+":"+i.name.name;if(i.type==="JSXMemberExpression")return st(i.object)+"."+st(i.property);throw new Error("Node had unexpected type: "+i.type)}var Ho=i=>class extends i{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Je.UnterminatedJsxContent,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(r);return}e+=this.input.slice(t,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:it(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),r;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?`
6
6
  `:`\r
7
- `):n=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(e){let s="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(g.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(s+=this.input.slice(n,this.state.pos),s+=this.jsxReadEntity(),n=this.state.pos):Ks(i)?(s+=this.input.slice(n,this.state.pos),s+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}s+=this.input.slice(n,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let n=this.readInt(s,void 0,!1,"bail");if(n!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(n)}else{let s=0,n=!1;for(;s++<10&&this.state.pos<this.length&&!(n=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(n){let i=this.input.slice(e,this.state.pos),a=Px[i];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(Js(e)||e===45);this.finishToken(140,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(140)?e.name=this.state.value:Mc(this.state.type)?e.name=Xt(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let n=this.startNodeAt(e);return n.namespace=s,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let n=this.startNodeAt(e);n.object=s,n.property=this.jsxParseIdentifier(),s=this.finishNode(n,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(K.brace),this.next(),e=this.jsxParseExpressionContainer(e,K.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(ms.AttributeIsEmpty,e),e;case 142:case 133:return this.parseExprAtom();default:throw this.raise(ms.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(K.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let n=this.parseExpression();e.expression=n}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(K.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(K.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(143)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(143);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(143),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(143)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(143),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),n=[],i=this.jsxParseOpeningElementAt(e),a=null;if(!i.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}n.push(this.jsxParseElementAt(e));break;case 141:n.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(K.brace),this.next(),this.match(21)?n.push(this.jsxParseSpreadChild(o)):n.push(this.jsxParseExpressionContainer(o,K.j_expr));break}default:this.unexpected()}Kt(i)&&!Kt(a)&&a!==null?this.raise(ms.MissingClosingTagFragment,a):!Kt(i)&&Kt(a)?this.raise(ms.MissingClosingTagElement,a,{openingTagName:zs(i.name)}):!Kt(i)&&!Kt(a)&&zs(a.name)!==zs(i.name)&&this.raise(ms.MissingClosingTagElement,a,{openingTagName:zs(i.name)})}if(Kt(i)?(s.openingFragment=i,s.closingFragment=a):(s.openingElement=i,s.closingElement=a),s.children=n,this.match(47))throw this.raise(ms.UnwrappedAdjacentJSXElements,this.state.startLoc);return Kt(i)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:s}=this.state;s[s.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 s=this.curContext();if(s===K.j_expr){this.jsxReadToken();return}if(s===K.j_oTag||s===K.j_cTag){if(Dt(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(143);return}if((e===34||e===39)&&s===K.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:s,type:n}=this.state;if(n===56&&e===142)s.splice(-2,2,K.j_cTag),this.state.canStartJSXElement=!1;else if(n===142)s.push(K.j_oTag);else if(n===143){let i=s[s.length-1];i===K.j_oTag&&e===56||i===K.j_cTag?(s.pop(),this.state.canStartJSXElement=s[s.length-1]===K.j_expr):(this.setContext(K.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=q_(n)}},Tc=class extends Zr{constructor(...t){super(...t),this.tsNames=new Map}},Pc=class extends en{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new Tc(t)}enter(t){t===256&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===256&&this.importsStack.pop(),t}hasImport(t,e){let s=this.importsStack.length;if(this.importsStack[s-1].has(t))return!0;if(!e&&s>1){for(let n=0;n<s-1;n++)if(this.importsStack[n].has(t))return!0}return!1}declareName(t,e,s){if(e&4096){this.hasImport(t,!0)&&this.parser.raise(g.VarRedeclaration,s,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let n=this.currentScope(),i=n.tsNames.get(t)||0;if(e&1024){this.maybeExportDefined(n,t),n.tsNames.set(t,i|16);return}super.declareName(t,e,s),e&2&&(e&1||(this.checkRedeclarationInScope(n,t,e,s),this.maybeExportDefined(n,t)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&n.tsNames.set(t,i)}isRedeclaredInScope(t,e,s){let n=t.tsNames.get(e);if((n&2)>0){if(s&256){let i=!!(s&512),a=(n&4)>0;return i!==a}return!0}return s&128&&(n&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(n&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){let{name:e}=t;if(this.hasImport(e))return;let s=this.scopeStack.length;for(let n=s-1;n>=0;n--){let a=this.scopeStack[n].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(t)}},tf=r=>r.type==="ParenthesizedExpression"?tf(r.expression):r,vc=class extends Ec{toAssignable(t,e=!1){var s,n;let i;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(i=tf(t),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(g.InvalidParenthesizedAssignment,t):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(g.InvalidParenthesizedAssignment,t):this.raise(g.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,c=t.properties.length,l=c-1;o<c;o++){var a;let u=t.properties[o],p=o===l;this.toAssignableObjectExpressionProp(u,p,e),p&&u.type==="RestElement"&&(a=t.extra)!=null&&a.trailingCommaLoc&&this.raise(g.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:c}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(c,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":t.type="ArrayPattern",this.toAssignableList(t.elements,(n=t.extra)==null?void 0:n.trailingCommaLoc,e);break;case"AssignmentExpression":t.operator!=="="&&this.raise(g.MissingEqInAssignment,t.left.loc.end),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e);break}}toAssignableObjectExpressionProp(t,e,s){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?g.PatternHasAccessor:g.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){t.type="RestElement";let n=t.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,s),e||this.raise(g.RestTrailingComma,t)}else this.toAssignable(t,s)}toAssignableList(t,e,s){let n=t.length-1;for(let i=0;i<=n;i++){let a=t[i];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let o=a.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,s)}else this.toAssignable(a,s);a.type==="RestElement"&&(i<n?this.raise(g.RestTrailingComma,a):e&&this.raise(g.RestTrailingComma,e))}}}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let s=t.properties.length-1;return t.properties.every((n,i)=>n.type!=="ObjectMethod"&&(i===s||n.type!=="SpreadElement")&&this.isAssignable(n))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)s?.type==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){let n=s&1,i=[],a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),n&&this.match(12))i.push(null);else{if(this.eat(t))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(o=this.parseFunctionParamType(o)),i.push(o),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(g.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());i.push(this.parseAssignableListItem(s,o))}}return i}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let{type:t,startLoc:e}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());let s=this.startNode();return t===138?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,e,!1,!1,!0,!1)}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(s);let n=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),n}parseFunctionParamType(t){return t}parseMaybeDefault(t,e){var s,n;if((s=t)!=null||(t=this.state.startLoc),e=(n=e)!=null?n:this.parseBindingAtom(),!this.eat(29))return e;let i=this.startNodeAt(t);return i.left=e,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(t,e,s){switch(t){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(t){return t.type==="OptionalMemberExpression"}checkLVal(t,e,s=64,n=!1,i=!1,a=!1){var o;let c=t.type;if(this.isObjectMethod(t))return;let l=this.isOptionalMemberExpression(t);if(l||c==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(g.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(g.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,s,i);let{name:m}=t;n&&(n.has(m)?this.raise(g.ParamDupe,t):n.add(m));return}let u=this.isValidLVal(c,!(a||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(u===!0)return;if(u===!1){let m=s===64?g.InvalidLhs:g.InvalidLhsBinding;this.raise(m,t,{ancestor:e});return}let p,h;typeof u=="string"?(p=u,h=c==="ParenthesizedExpression"):[p,h]=u;let d=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:e,f=t[p];if(Array.isArray(f))for(let m of f)m&&this.checkLVal(m,d,s,n,i,h);else f&&this.checkLVal(f,d,s,n,i,h)}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Kd(t.name,this.inModule):Jd(t.name))&&(e===64?this.raise(g.StrictEvalArguments,t,{referenceName:t.name}):this.raise(g.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(g.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(g.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?g.RestTrailingComma:g.ElementAfterRest,this.state.startLoc),!0):!1}};function Ax(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function Bd(r){if(!r)throw new Error("Assert fail")}var O=Ot`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' 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:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' 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:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,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:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[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:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,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:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,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:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`});function Cx(r){switch(r){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 jd(r){return r==="private"||r==="public"||r==="protected"}function wx(r){return r==="in"||r==="out"}var Ix=r=>class extends r{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:O.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:O.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:O.InvalidModifierOnTypeParameter})}getScopeHandler(){return Pc}tsIsIdentifier(){return W(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,s){if(!W(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let n=this.state.value;if(e.includes(n)){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:n,errorTemplate:i=O.InvalidModifierOnTypeMember},a){let o=(l,u,p,h)=>{u===p&&a[h]&&this.raise(O.InvalidModifiersOrder,l,{orderedModifiers:[p,h]})},c=(l,u,p,h)=>{(a[p]&&u===h||a[h]&&u===p)&&this.raise(O.IncompatibleModifiers,l,{modifiers:[p,h]})};for(;;){let{startLoc:l}=this.state,u=this.tsParseModifier(e.concat(s??[]),n);if(!u)break;jd(u)?a.accessibility?this.raise(O.DuplicateAccessibilityModifier,l,{modifier:u}):(o(l,u,u,"override"),o(l,u,u,"static"),o(l,u,u,"readonly"),a.accessibility=u):wx(u)?(a[u]&&this.raise(O.DuplicateModifier,l,{modifier:u}),a[u]=!0,o(l,u,"in","out")):(hasOwnProperty.call(a,u)?this.raise(O.DuplicateModifier,l,{modifier:u}):(o(l,u,"static","readonly"),o(l,u,"static","override"),o(l,u,"override","readonly"),o(l,u,"abstract","override"),c(l,u,"declare","override"),c(l,u,"static","abstract")),a[u]=!0),s!=null&&s.includes(u)&&this.raise(i,l,{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,s){let n=[];for(;!this.tsIsListTerminator(e);)n.push(s());return n}tsParseDelimitedList(e,s,n){return Ax(this.tsParseDelimitedListWorker(e,s,!0,n))}tsParseDelimitedListWorker(e,s,n,i){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let c=s();if(c==null)return;if(a.push(c),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;n&&this.expect(12);return}return i&&(i.value=o),a}tsParseBracketedList(e,s,n,i,a){i||(n?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,a);return n?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(O.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),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 s=this.parseIdentifier(e);for(;this.eat(16);){let n=this.startNodeAtNode(s);n.left=s,n.right=this.parseIdentifier(e),s=this.finishNode(n,"TSQualifiedName")}return s}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 s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"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 s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let n={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,n),s.params.length===0&&this.raise(O.EmptyTypeParameters,s),n.value!==-1&&this.addExtra(s,"trailingComma",n.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let n=e===19,i="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[i]=this.tsParseBindingListForSignature(),n?s[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:n}=s;(n==="AssignmentPattern"||n==="TSParameterProperty")&&this.raise(O.UnsupportedSignatureParameterKind,s,{type:n})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),W(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 s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let n=e;if(this.match(10)||this.match(47)){s&&this.raise(O.ReadonlyForMethodSignature,e);let i=n;i.kind&&this.match(47)&&this.raise(O.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let a="parameters",o="typeAnnotation";if(i.kind==="get")i[a].length>0&&(this.raise(g.BadGetterArity,this.state.curPosition()),this.isThisParam(i[a][0])&&this.raise(O.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[a].length!==1)this.raise(g.BadSetterArity,this.state.curPosition());else{let c=i[a][0];this.isThisParam(c)&&this.raise(O.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(O.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(O.SetAccessorCannotHaveRestParameter,this.state.curPosition())}i[o]&&this.raise(O.SetAccessorCannotHaveReturnType,i[o])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=n;s&&(i.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let n=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(n,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(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 s=this.startNode();s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(s,"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 s=!1;return e.elementTypes.forEach(n=>{let{type:i}=n;s&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&n.optional)&&this.raise(O.OptionalTypeBeforeRequired,n),s||(s=i==="TSNamedTupleMember"&&n.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),n,i,a,o,l=it(this.state.type)?this.lookaheadCharCode():null;if(l===58)n=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(l===63){a=!0;let u=this.state.startLoc,p=this.state.value,h=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(n=!0,i=this.createIdentifier(this.startNodeAt(u),p),this.expect(17),this.expect(14),o=this.tsParseType()):(n=!1,o=h,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),n=this.eat(14);if(n){let u;i?(u=this.startNodeAtNode(i),u.optional=a,u.label=i,u.elementType=o,this.eat(17)&&(u.optional=!0,this.raise(O.TupleOptionalAfterType,this.state.lastTokStartLoc))):(u=this.startNodeAtNode(o),u.optional=a,this.raise(O.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(s){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,s){let n=this.startNode();return e==="TSConstructorType"&&(n.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,n)),this.finishNode(n,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(),s=this.lookahead();return s.type!==134&&s.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(W(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Cx(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(O.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"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 W_(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,n){let i=this.startNode(),a=this.eat(n),o=[];do o.push(s());while(this.eat(n));return o.length===1&&!a?o[0]:(i.types=o,this.finishNode(i,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(W(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}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 s=this.startNode();this.expect(e);let n=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(n.parameterName=c,n.asserts=!0,n.typeAnnotation=null,c=this.finishNode(n,"TSTypePredicate")):(this.resetStartLocationFromNode(c,n),c.asserts=!0),s.typeAnnotation=c,this.finishNode(s,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return i?(n.parameterName=this.parseIdentifier(),n.asserts=i,n.typeAnnotation=null,s.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return n.parameterName=a,n.typeAnnotation=o,n.asserts=i,s.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(s,"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(),!W(this.state.type)&&!this.match(78)?!1:(e&&this.raise(g.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){Bd(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"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(O.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 s=this.state.startLoc,n=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return n.length||this.raise(O.EmptyHeritageClauseType,s,{token:e}),n}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),W(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(O.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(n,"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 s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}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,s={}){return s.const&&(e.const=!0),s.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,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let n=this.startNode();this.tsParseModuleOrNamespaceDeclaration(n,!0),e.body=n}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,s,n){e.isExport=n||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(O.ImportAliasHasImportType,i),e.moduleReference=i,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 s=this.state.clone(),n=e();return this.state=s,n}tsTryParseAndCatch(e){let s=this.tryParse(n=>e()||n());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),n=e();if(n!==void 0&&n!==!1)return n;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,n;return this.isContextual(100)&&(s=74,n="let"),this.tsInAmbientContext(()=>{switch(s){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,n||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let i=this.tsParseInterfaceDeclaration(e,{declare:!0});if(i)return i}default:if(W(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,n){switch(s.name){case"declare":{let i=this.tsTryParseDeclare(e);return i&&(i.declare=!0),i}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let i=e;return i.global=!0,i.id=s,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,n)}}tsParseDeclaration(e,s,n,i){switch(s){case"abstract":if(this.tsCheckLineTerminator(n)&&(this.match(80)||W(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(n)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(W(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(n)&&W(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(n)&&W(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 s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let n=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(e);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=s,!!n)return super.parseArrowExpression(n,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(O.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===K.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return z_(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let n=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let a=i.accessibility,o=i.override,c=i.readonly;!(e&4)&&(a||c||o)&&this.raise(O.UnexpectedParameterModifier,n);let l=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(l);let u=this.parseMaybeDefault(l.loc.start,l);if(a||c||o){let p=this.startNodeAt(n);return s.length&&(p.decorators=s),a&&(p.accessibility=a),c&&(p.readonly=c),o&&(p.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(O.UnsupportedParameterPropertyKind,p),p.parameter=u,this.finishNode(p,"TSParameterProperty")}return s.length&&(l.decorators=s),u}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(O.PatternIsOptional,s)}setArrowFunctionParameters(e,s,n){super.setArrowFunctionParameters(e,s,n),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,n=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(O.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,i,n):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,n))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{s?.type==="TSTypeCastExpression"&&this.raise(O.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,n,i){let a=super.parseArrayLike(e,s,n,i);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,s,n,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(n)return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,c=this.tsTryParseAndCatch(()=>{if(!n&&this.atPossibleAsyncArrow(e)){let h=this.tsTryParseGenericAsyncArrowFunction(s);if(h)return h}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(Ni(this.state.type)){let h=super.parseTaggedTemplateExpression(e,s,i);return h.typeParameters=l,h}if(!n&&this.eat(10)){let h=this.startNodeAt(s);return h.callee=e,h.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(h.arguments),h.typeParameters=l,i.optionalChainMember&&(h.optional=a),this.finishCallExpression(h,i.optionalChainMember)}let u=this.state.type;if(u===48||u===52||u!==10&&cc(u)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(s);return p.expression=e,p.typeParameters=l,this.finishNode(p,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),c)return c.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(O.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),c}return super.parseSubscript(e,s,n,i)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:n}=e;n.type==="TSInstantiationExpression"&&!((s=n.extra)!=null&&s.parenthesized)&&(e.typeParameters=n.typeParameters,e.callee=n.expression)}parseExprOp(e,s,n){let i;if(Ci(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(g.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,n)}return super.parseExprOp(e,s,n)}checkReservedWord(e,s,n,i){this.state.isAmbientContext||super.checkReservedWord(e,s,n,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(O.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,n,i){super.applyImportPhase(e,s,n,i),s?e.exportKind=n==="type"?"type":"value":e.importKind=n==="type"||n==="typeof"?n:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(W(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let n=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,n);s=super.parseImportSpecifiersAndAfter(e,n)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(O.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();let n=e,i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(n,!1):n.importKind="value",this.tsParseImportEqualsDeclaration(n,i,!0)}else if(this.eat(29)){let n=e;return n.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(n,"TSExportAssignment")}else if(this.eatContextual(93)){let n=e;return this.expectContextual(128),n.id=this.parseIdentifier(),this.semicolon(),this.finishNode(n,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}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,s,n=!1){let{isAmbientContext:i}=this.state,a=super.parseVarStatement(e,s,n||i);if(!i)return a;for(let{id:o,init:c}of a.declarations)c&&(s!=="const"||o.typeAnnotation?this.raise(O.InitializerNotAllowedInAmbientContext,c):kx(c,this.hasPlugin("estree"))||this.raise(O.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,c));return a}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let n=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(n,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let n=this.tsParseInterfaceDeclaration(this.startNode());if(n)return n}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(n=>jd(n)?e.accessibility===n:!!e[n])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,n){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:O.InvalidModifierOnTypeParameterPositions},s);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,i)&&this.raise(O.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,n,!!s.static)};s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,n,i){let a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(O.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(O.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(O.IndexSignatureHasDeclare,s),s.override&&this.raise(O.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(O.NonAbstractClassHasAbstractMethod,s),s.override&&(n.hadSuperClass||this.raise(O.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,n,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(O.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(O.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,n){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,n):void 0)||super.parseExpressionStatement(e,s,n)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,n){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,n);let i=this.tryParse(()=>super.parseConditional(e,s));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(n,i.error),e)}parseParenItem(e,s){let n=super.parseParenItem(e,s);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(O.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=W(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||n)&&(e.exportKind="type"),n&&(this.resetStartLocation(a,s),a.declare=!0),a):null}parseClassId(e,s,n,i){if((!s||n)&&this.isContextual(113))return;super.parseClassId(e,s,n,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 s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(O.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:s}=e;this.raise(O.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(O.PrivateElementHasAbstract,e),e.accessibility&&this.raise(O.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(O.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,n,i,a,o){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&a&&this.raise(O.ConstructorHasTypeParameters,c);let{declare:l=!1,kind:u}=s;l&&(u==="get"||u==="set")&&this.raise(O.DeclareAccessor,s,{kind:u}),c&&(s.typeParameters=c),super.pushClassMethod(e,s,n,i,a,o)}pushClassPrivateMethod(e,s,n,i){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,n,i)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,s))}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,s,n,i,a,o,c){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(e.typeParameters=l),super.parseObjPropValue(e,s,n,i,a,o,c)}parseFunctionParams(e,s){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(e.typeParameters=n),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let n=this.tsTryParseTypeAnnotation();n&&(e.id.typeAnnotation=n,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var n,i,a,o,c;let l,u,p;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!u.error)return u.node;let{context:f}=this.state,m=f[f.length-1];(m===K.j_oTag||m===K.j_expr)&&f.pop()}if(!((n=u)!=null&&n.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!l||l===this.state)&&(l=this.state.clone());let h,d=this.tryParse(f=>{var m,y;h=this.tsParseTypeParameters(this.tsParseConstModifier);let b=super.parseMaybeAssign(e,s);return(b.type!=="ArrowFunctionExpression"||(m=b.extra)!=null&&m.parenthesized)&&f(),((y=h)==null?void 0:y.params.length)!==0&&this.resetStartLocationFromNode(b,h),b.typeParameters=h,b},l);if(!d.error&&!d.aborted)return h&&this.reportReservedArrowTypeParam(h),d.node;if(!u&&(Bd(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!p.error))return p.node;if((i=u)!=null&&i.node)return this.state=u.failState,u.node;if(d.node)return this.state=d.failState,h&&this.reportReservedArrowTypeParam(h),d.node;if((a=p)!=null&&a.node)return this.state=p.failState,p.node;throw((o=u)==null?void 0:o.error)||d.error||((c=p)==null?void 0:c.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(O.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(n=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&n(),i});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(O.UnexpectedTypeCastInParameter,e):this.raise(O.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,n){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(n!==64||!s)&&["expression",!0];default:return super.isValidLVal(e,s,n)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let n=super.parseMaybeDecoratorArguments(e);return n.typeParameters=s,n}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,s){let n=super.parseMaybeDefault(e,s);return n.type==="AssignmentPattern"&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(O.TypeAnnotationAfterAssign,n.typeAnnotation),n}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,s,n){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,s,n)}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(s=>this.isAssignable(s,!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 s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e)[0];return i&&this.isThisParam(i)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:s,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=s,this.state.strict=n}}parseClass(e,s,n){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,n)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(O.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,n,i,a,o,c){let l=super.parseMethod(e,s,n,i,a,o,c);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:p}=l;this.raise(O.AbstractMethodHasImplementation,l,{methodName:p.type==="Identifier"&&!l.computed?p.name:`[${this.input.slice(p.start,p.end)}]`})}return l}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,s,n,i){return!s&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,n),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,n,i))}parseImportSpecifier(e,s,n,i,a){return!s&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,n),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,n,i,n?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,n){let i=s?"imported":"local",a=s?"local":"exported",o=e[i],c,l=!1,u=!0,p=o.loc.start;if(this.isContextual(93)){let d=this.parseIdentifier();if(this.isContextual(93)){let f=this.parseIdentifier();it(this.state.type)?(l=!0,o=d,c=s?this.parseIdentifier():this.parseModuleExportName(),u=!1):(c=f,u=!1)}else it(this.state.type)?(u=!1,c=s?this.parseIdentifier():this.parseModuleExportName()):(l=!0,o=d)}else it(this.state.type)&&(l=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());l&&n&&this.raise(s?O.TypeModifierIsUsedInTypeImports:O.TypeModifierIsUsedInTypeExports,p),e[i]=o,e[a]=c;let h=s?"importKind":"exportKind";e[h]=l?"type":"value",u&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=Mt(e[i])),s&&this.checkIdentifier(e[a],l?4098:4096)}};function Nx(r){if(r.type!=="MemberExpression")return!1;let{computed:t,property:e}=r;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:rf(r.object)}function kx(r,t){var e;let{type:s}=r;if((e=r.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:n}=r;if(typeof n=="string"||typeof n=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(sf(r,t)||Dx(r,t)||s==="TemplateLiteral"&&r.expressions.length===0||Nx(r))}function sf(r,t){return t?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function Dx(r,t){if(r.type==="UnaryExpression"){let{operator:e,argument:s}=r;if(e==="-"&&sf(s,t))return!0}return!1}function rf(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:rf(r.object)}var Ud=Ot`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Ox=r=>class extends r{parsePlaceholder(e){if(this.match(144)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let n=e;return(!n.expectedNode||!n.type)&&(n=this.finishNode(n,"Placeholder")),n.expectedNode=s,n}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,s,n,i){e!==void 0&&super.checkReservedWord(e,s,n,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,n){return e==="Placeholder"||super.isValidLVal(e,s,n)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var n;if(s.type!=="Placeholder"||(n=s.extra)!=null&&n.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let a=e;return a.label=this.finishPlaceholder(s,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();let i=e;return i.name=s.name,this.finishPlaceholder(i,"Statement")}parseBlock(e,s,n){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,n)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,n){let i=s?"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(n||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,i);throw this.raise(Ud.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,n);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,i)}parseExport(e,s){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseExport(e,s);let i=e;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(n,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=n,i.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(i,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(Xt(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var n;return(n=e.specifiers)!=null&&n.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(n=>n.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let n=this.startNodeAtNode(s);return n.local=s,e.specifiers.push(this.finishNode(n,"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(Ud.UnexpectedSpace,this.state.lastTokEndLoc)}},Mx=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),W(this.state.type)){let n=this.parseIdentifierName(),i=this.createIdentifier(s,n);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},qd=["minimal","fsharp","hack","smart"],Gd=["^^","@@","^","%","#"];function Lx(r){if(r.has("decorators")){if(r.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=r.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let s=r.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(r.has("flow")&&r.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(r.has("placeholders")&&r.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(r.has("pipelineOperator")){var t;let e=r.get("pipelineOperator").proposal;if(!qd.includes(e)){let n=qd.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${n}.`)}let s=((t=r.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash";if(e==="hack"){if(r.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(r.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let n=r.get("pipelineOperator").topicToken;if(!Gd.includes(n)){let i=Gd.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(n==="#"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}else if(e==="smart"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}if(r.has("moduleAttributes")){if(r.has("importAttributes")||r.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(r.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(r.has("importAssertions")&&r.has("importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(r.has("recordAndTuple")){let e=r.get("recordAndTuple").syntaxType;if(e!=null){let s=["hash","bar"];if(!s.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+s.map(n=>`'${n}'`).join(", "))}}if(r.has("asyncDoExpressions")&&!r.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(r.has("optionalChainingAssign")&&r.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 nf={estree:F_,jsx:vx,flow:Tx,typescript:Ix,v8intrinsic:Mx,placeholders:Ox},Rx=Object.keys(nf),ic={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 Fx(r){if(r==null)return Object.assign({},ic);if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let s of Object.keys(ic)){var e;t[s]=(e=r[s])!=null?e:ic[s]}return t}var Ac=class extends vc{checkProto(t,e,s,n){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let i=t.key;if((i.type==="Identifier"?i.name:i.value)==="__proto__"){if(e){this.raise(g.RecordNoProto,i);return}s.used&&(n?n.doubleProtoLoc===null&&(n.doubleProtoLoc=i.loc.start):this.raise(g.DuplicateProto,i)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let n=this.startNodeAt(e);for(n.expressions=[s];this.eat(12);)n.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e?.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let n;t?n=!1:(t=new Xs,n=!0);let{type:i}=this.state;(i===10||W(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s)),G_(this.state.type)){let o=this.startNodeAt(s),c=this.state.value;if(o.operator=c,this.match(29)){this.toAssignable(a,!0),o.left=a;let l=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(o,"AssignmentExpression")),o}else n&&this.checkExpressionErrors(t,!0);return a}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,n=this.parseExprOps(t);return this.shouldExitDescending(n,s)?n:this.parseConditional(n,e,t)}parseConditional(t,e,s){if(this.eat(17)){let n=this.startNodeAt(e);return n.test=t,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(n,s)?n:this.parseExprOp(n,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let i=this.getPrivateNameSV(t);(s>=Ci(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(g.PrivateInExpectedIn,t,{identifierName:i}),this.classScope.usePrivateName(i,t.loc.start)}let n=this.state.type;if(H_(n)&&(this.prodParam.hasIn||!this.match(58))){let i=Ci(n);if(i>s){if(n===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let a=this.startNodeAt(e);a.left=t,a.operator=this.state.value;let o=n===41||n===42,c=n===40;if(c&&(i=Ci(42)),this.next(),n===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(g.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(n,i);let l=this.finishNode(a,o||c?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(c&&(u===41||u===42)||o&&u===40)throw this.raise(g.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){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(g.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,J_(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return D_.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(g.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(g.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(g.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){let s=this.state.startLoc,n=this.isContextual(96);if(n&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(s);return e||this.checkExponentialAfterUnary(c),c}let i=this.match(34),a=this.startNode();if(Y_(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let c=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&c){let l=a.argument;l.type==="Identifier"?this.raise(g.StrictDelete,a):this.hasPropertyAsPrivateName(l)&&this.raise(g.DeletePrivateField,a)}if(!i)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,i,t);if(n){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?cc(c):cc(c)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(g.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let a=t;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),t}let n=this.state.startLoc,i=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return i;for(;V_(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(n);a.operator=this.state.value,a.prefix=!1,a.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(a,"UpdateExpression"))}return i}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,n=this.parseExprAtom(t);return this.shouldExitDescending(n,s)?n:this.parseSubscripts(n,e)}parseSubscripts(t,e,s){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,n),n.maybeAsyncArrow=!1;while(!n.stop);return t}parseSubscript(t,e,s,n){let{type:i}=this.state;if(!s&&i===15)return this.parseBind(t,e,s,n);if(Ni(i))return this.parseTaggedTemplateExpression(t,e,n);let a=!1;if(i===18){if(s&&(this.raise(g.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return n.stop=!0,t;n.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,n,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(t,e,n,o,a):(n.stop=!0,t)}}parseMember(t,e,s,n,i){let a=this.startNodeAt(e);return a.object=t,a.computed=n,n?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(g.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,n){let i=this.startNodeAt(e);return i.object=t,this.next(),i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,n){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:c,optionalChainMember:l}=s;c&&(this.expressionScope.enter(mx()),a=new Xs),l&&(o.optional=n),n?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,a);let u=this.finishCallExpression(o,l);return c&&this.shouldParseAsyncArrow()&&!n?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),u)):(c&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=i,u}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let n=this.startNodeAt(e);return n.tag=t,n.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(g.OptionalChainingNoTemplate,e),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")),t.arguments.length===0||t.arguments.length>2)this.raise(g.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(g.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,n,i){let a=[],o=!0,c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(g.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),n&&this.addTrailingCommaExtraToNode(n),this.next();break}a.push(this.parseExprListItem(!1,i,s))}return this.state.inFSharpPipelineDirectBody=c,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&tn(t,e.innerComments),e.callee.trailingComments&&tn(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:n}=this.state;switch(n){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(g.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 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 i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,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 i=e.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(g.UnsupportedBind,i)}case 138:return this.raise(g.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 i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);this.unexpected();break}case 47:{let i=this.input.codePointAt(this.nextTokenStart());Dt(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(n===136)return this.parseDecimalLiteral(this.state.value);if(W(n)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(W(c))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(c===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=De(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(e,s,t,n)}finishTopicReference(t,e,s,n){if(this.testTopicReferenceConfiguration(s,e,n)){let i=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?g.PrimaryTopicNotAllowed:g.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,i)}else throw this.raise(g.PipeTopicUnconfiguredToken,e,{token:Xt(n)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Xt(s)}]);case"smart":return s===27;default:throw this.raise(g.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(wi(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(g.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(g.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(g.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(g.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(De(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let n=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||n)&&this.raise(g.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(g.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(g.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.startNode();return this.addExtra(e,"raw",this.input.slice(e.start,this.state.end)),e.pattern=t.pattern,e.flags=t.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter(fx());let n=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],c=new Xs,l=!0,u,p;for(;!this.match(11);){if(l)l=!1;else if(this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){let f=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),f)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}let h=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=i;let d=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(c),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,o,!1),d):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),u&&this.unexpected(u),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(a),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,h)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(g.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(g.ImportCallNotNewExpression,s)}parseTemplateElement(t){let{start:e,startLoc:s,end:n,value:i}=this.state,a=e+1,o=this.startNodeAt(De(s,1));i===null&&(t||this.raise(g.InvalidEscapeSequenceTemplate,De(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),l=c?-1:-2,u=n+l;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,`
8
- `),cooked:i===null?null:i.slice(1,l)},o.tail=c,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,De(this.state.lastTokEndLoc,l)),p}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),n=[s],i=[];for(;!s.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),n.push(s=this.parseTemplateElement(t));return e.expressions=i,e.quasis=n,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,n){s&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),o=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(c);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(n),this.checkProto(u,s,a,n)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(g.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),c.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=i;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(c,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(g.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),n=!1,i=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let c=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!c&&this.maybeAsyncOrAccessorProp(s)){let{key:l}=s,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(n=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(l),s.kind=u,this.match(55)&&(o=!0,this.raise(g.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,o,n,!1,i,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),n=this.getObjectOrClassMethodParams(t);n.length!==s&&this.raise(t.kind==="get"?g.BadGetterArity:g.BadSetterArity,t),t.kind==="set"&&((e=n[n.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(g.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,n,i){if(i){let a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(s||e||this.match(10))return n&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,n){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(n),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,Mt(t.key));else if(this.match(29)){let i=this.state.startLoc;n!=null?n.shorthandAssignLoc===null&&(n.shorthandAssignLoc=i):this.raise(g.InvalidCoverInitializedName,i),t.value=this.parseMaybeDefault(e,Mt(t.key))}else t.value=Mt(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,n,i,a,o){let c=this.parseObjectMethod(t,s,n,i,a)||this.parseObjectProperty(t,e,i,o);return c||this.unexpected(),c}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:n}=this.state,i;if(it(s))i=this.parseIdentifier(!0);else switch(s){case 134:i=this.parseNumericLiteral(n);break;case 133:i=this.parseStringLiteral(n);break;case 135:i=this.parseBigIntLiteral(n);break;case 138:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(g.UnexpectedPrivateField,a),i=this.parsePrivateName();break}default:if(s===136){i=this.parseDecimalLiteral(n);break}this.unexpected()}t.key=i,s!==138&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,n,i,a,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(i?32:0)),this.prodParam.enter(wi(s,t.generator)),this.parseFunctionParams(t,n);let c=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(t,e,s,n){s&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,n,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,n){this.scope.enter(6);let i=wi(s,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(t,s);let a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let n=e&&!this.match(5);if(this.expressionScope.enter(ef()),n)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let i=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let c=!this.isSimpleParamList(t.params);o&&c&&this.raise(g.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let l=!i&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!c,e,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if(!this.isSimpleParameter(t[e]))return!1;return!0}checkParams(t,e,s,n=!0){let i=!e&&new Set,a={type:"FormalParameters"};for(let o of t.params)this.checkLVal(o,a,5,i,n)}parseExprList(t,e,s,n){let i=[],a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}i.push(this.parseExprListItem(e,s))}return i}parseExprListItem(t,e,s){let n;if(this.match(12))t||this.raise(g.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(21)){let i=this.state.startLoc;n=this.parseParenItem(this.parseSpread(e),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(g.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),n=this.finishNode(i,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return n}parseIdentifier(t){let e=this.startNode(),s=this.parseIdentifierName(t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t){let e,{startLoc:s,type:n}=this.state;it(n)?e=this.state.value:this.unexpected();let i=U_(n);return t?i&&this.replaceToken(132):this.checkReservedWord(e,s,i,!1),this.next(),e}checkReservedWord(t,e,s,n){if(t.length>10||!ix(t))return;if(s&&sx(t)){this.raise(g.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?n?Kd:zd:Wd)(t,this.inModule)){this.raise(g.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(g.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(g.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(g.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(g.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(g.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(g.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:t}=this.state;return t===53||t===10||t===0||Ni(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(g.YieldInParameter,t),this.next();let e=!1,s=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:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(g.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(g.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(g.PipelineTopicUnused,t)}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}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(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},ac={kind:1},Bx={kind:2},jx=/[\uD800-\uDFFF]/u,oc=/in(?:stanceof)?/y;function Ux(r,t){for(let e=0;e<r.length;e++){let s=r[e],{type:n}=s;if(typeof n=="number"){{if(n===138){let{loc:i,start:a,value:o,end:c}=s,l=a+1,u=De(i.start,1);r.splice(e,1,new ft({type:Nt(27),value:"#",start:a,end:l,startLoc:i.start,endLoc:u}),new ft({type:Nt(132),value:o,start:l,end:c,startLoc:u,endLoc:i.end})),e++;continue}if(Ni(n)){let{loc:i,start:a,value:o,end:c}=s,l=a+1,u=De(i.start,1),p;t.charCodeAt(a)===96?p=new ft({type:Nt(22),value:"`",start:a,end:l,startLoc:i.start,endLoc:u}):p=new ft({type:Nt(8),value:"}",start:a,end:l,startLoc:i.start,endLoc:u});let h,d,f,m;n===24?(d=c-1,f=De(i.end,-1),h=o===null?null:o.slice(1,-1),m=new ft({type:Nt(22),value:"`",start:d,end:c,startLoc:f,endLoc:i.end})):(d=c-2,f=De(i.end,-2),h=o===null?null:o.slice(1,-2),m=new ft({type:Nt(23),value:"${",start:d,end:c,startLoc:f,endLoc:i.end})),r.splice(e,1,p,new ft({type:Nt(20),value:h,start:l,end:d,startLoc:u,endLoc:f}),m),e+=2;continue}}s.type=Nt(n)}}return r}var Cc=class extends Ac{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.comments,this.options.tokens&&(t.tokens=Ux(this.tokens,this.input)),this.finishNode(t,"File")}parseProgram(t,e=139,s=this.options.sourceType){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[i,a]of Array.from(this.scope.undefinedExports))this.raise(g.ModuleExportUndefined,a,{localName:i});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let n;return e===139?n=this.finishNode(t,"Program"):n=this.finishNodeAt(t,"Program",De(this.state.startLoc,-1)),n}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,n=s.value,i=this.input.slice(s.start,s.end),a=s.value=i.slice(1,-1);return this.addExtra(s,"raw",i),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",n),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(Dt(t)){if(oc.lastIndex=e,oc.test(this.input)){let s=this.codePointAtPos(oc.lastIndex);if(!Js(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return e===123||this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(W(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))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(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,n=this.startNode(),i=!!(t&2),a=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?g.StrictFunction:this.options.annexB?g.SloppyFunctionAnnexB:g.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(n,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?i||this.raise(g.UnexpectedLexicalDeclaration,n):this.raise(g.AwaitUsingNotInAsyncContext,n),this.next(),this.parseVarStatement(n,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(g.UnexpectedUsingDeclaration,this.state.startLoc):i||this.raise(g.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(n,"using");case 100:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),p=this.codePointAtPos(u);if(p!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,u)&&p!==123))break}case 75:i||this.raise(g.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let u=this.state.value;return this.parseVarStatement(n,u)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(g.UnexpectedImportExport,this.state.startLoc),this.next();let u;return s===83?(u=this.parseImport(n),u.type==="ImportDeclaration"&&(!u.importKind||u.importKind==="value")&&(this.sawUnambiguousESM=!0)):(u=this.parseExport(n,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 i||this.raise(g.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(n,!0,!i&&a)}let c=this.state.value,l=this.parseExpression();return W(s)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(n,c,l,t):this.parseExpressionStatement(n,l,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(g.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(g.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(g.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(g.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let n=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(n,s);let i=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(g.DecoratorArgumentsOutsideParentheses,i)}else{for(s=this.parseIdentifier(!1);this.eat(16);){let n=this.startNodeAt(e);n.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),n.computed=!1,s=this.finishNode(n,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;s<this.state.labels.length;++s){let n=this.state.labels[s];if((t.label==null||n.name===t.label.name)&&(n.kind!=null&&(e||n.kind===1)||t.label&&e))break}if(s===this.state.labels.length){let n=e?"BreakStatement":"ContinueStatement";this.raise(g.IllegalBreakContinue,t,{type:n})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(ac),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(ac);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(t,null);let s=this.isContextual(100);{let c=this.isContextual(96)&&this.startsAwaitUsing(),l=c||this.isContextual(107)&&this.startsUsingForOf(),u=s&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||u){let p=this.startNode(),h;c?(h="await using",this.recordAwaitIfAllowed()||this.raise(g.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):h=this.state.value,this.next(),this.parseVar(p,!0,h);let d=this.finishNode(p,"VariableDeclaration"),f=this.match(58);return f&&l&&this.raise(g.ForInUsing,d),(f||this.isContextual(102))&&d.declarations.length===1?this.parseForIn(t,d,e):(e!==null&&this.unexpected(e),this.parseFor(t,d))}}let n=this.isContextual(95),i=new Xs,a=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(s&&this.raise(g.ForOfLet,a),e===null&&n&&a.type==="Identifier"&&this.raise(g.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(a,!0);let c=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:c}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(i,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(g.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(Bx),this.scope.enter(0);let s;for(let n;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),i?s.test=this.parseExpression():(n&&this.raise(g.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),n=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(g.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.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(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(g.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(ac),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(g.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,n){for(let a of this.state.labels)a.name===e&&this.raise(g.LabelRedeclaration,s,{labelName:e});let i=$_(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===t.start)o.statementStart=this.state.start,o.kind=i;else break}return this.state.labels.push({name:e,kind:i,statementStart:this.state.start}),t.body=n&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let n=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(n,t,!1,8,s),e&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,n,i){let a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,s,n,i)}parseBlockOrModuleBlockBody(t,e,s,n,i){let a=this.state.strict,o=!1,c=!1;for(;!this.match(n);){let l=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!c){if(this.isValidDirective(l)){let u=this.stmtToDirective(l);e.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}t.push(l)}i?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let n=this.match(58);return this.next(),n?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!n||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(g.ForInOfLoopInitializer,e,{type:n?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(g.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,n?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,n=!1){let i=t.declarations=[];for(t.kind=s;;){let a=this.startNode();if(this.parseVarId(a,s),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!n&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(g.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(g.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),i.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();(e==="using"||e==="await using")&&(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(g.UsingDeclarationHasBindingPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},e==="var"?5:8201),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,n=!!(e&1),i=n&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(g.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),n&&(t.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(wi(a,t.generator)),n||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,n?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),n&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||W(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(dx()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,n),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},n=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(g.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){n.push(this.parseDecorator());continue}let a=this.startNode();n.length&&(a.decorators=n,this.resetStartLocationFromNode(a,n[0]),n=[]),this.parseClassMember(i,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(g.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),n.length)throw this.raise(g.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let n=e;return n.kind="method",n.computed=!1,n.key=s,n.static=!1,this.pushClassMethod(t,n,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let n=e;return n.computed=!1,n.key=s,n.static=!1,t.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let n=this.isContextual(106);if(n){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,n)}parseClassMemberWithIsStatic(t,e,s,n){let i=e,a=e,o=e,c=e,l=e,u=i,p=i;if(e.static=n,this.parsePropertyNamePrefixOperator(e),this.eat(55)){u.kind="method";let b=this.match(138);if(this.parseClassElementName(u),b){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsGenerator,i.key),this.pushClassMethod(t,i,!0,!1,!1,!1);return}let h=!this.state.containsEsc&&W(this.state.type),d=this.parseClassElementName(e),f=h?d.name:null,m=this.isPrivateName(d),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(u.kind="method",m){this.pushClassPrivateMethod(t,a,!1,!1);return}let b=this.isNonstaticConstructor(i),x=!1;b&&(i.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(g.DuplicateConstructor,d),b&&this.hasPlugin("typescript")&&e.override&&this.raise(g.OverrideOnConstructor,d),s.hadConstructor=!0,x=s.hadSuperClass),this.pushClassMethod(t,i,!1,!1,b,x)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,o);else if(f==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(d);let b=this.eat(55);p.optional&&this.unexpected(y),u.kind="method";let x=this.match(138);this.parseClassElementName(u),this.parsePostMemberNameModifiers(p),x?this.pushClassPrivateMethod(t,a,b,!0):(this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsAsync,i.key),this.pushClassMethod(t,i,b,!0,!1,!1))}else if((f==="get"||f==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(d),u.kind=f;let b=this.match(138);this.parseClassElementName(i),b?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(g.ConstructorIsAccessor,i.key),this.pushClassMethod(t,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(f==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(d);let b=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,b)}else this.isLineTerminator()?m?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(g.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(g.ConstructorClassPrivateField,this.state.startLoc);let n=this.parsePrivateName();return t.key=n,n}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var s;this.scope.enter(208);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=e.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(g.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(g.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){!s&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(g.ConstructorClassField,e.key);let n=this.parseClassAccessorProperty(e);t.body.push(n),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(t,e,s,n,i,a){t.body.push(this.parseMethod(e,s,n,i,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,n){let i=this.parseMethod(e,s,n,!1,!1,"ClassPrivateMethod",!0);t.body.push(i);let a=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(ef()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,n=8331){if(W(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,n);else if(s||!e)t.id=null;else throw this.raise(g.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),n=this.maybeParseExportDefaultSpecifier(t,s),i=!n||this.eat(12),a=i&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),c=i&&(!o||this.eat(12)),l=n||a;if(a&&!o){if(n&&this.unexpected(),e)throw this.raise(g.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(t);n&&i&&!a&&!u&&this.unexpected(null,5),o&&c&&this.unexpected(null,98);let p;if(l||u){if(p=!1,e)throw this.raise(g.UnsupportedDecoratorExport,t);this.parseExportFrom(t,l)}else p=this.maybeParseExportDeclaration(t);if(l||u||p){var h;let d=t;if(this.checkExport(d,!0,!1,!!d.source),((h=d.declaration)==null?void 0:h.type)==="ClassDeclaration")this.maybeTakeDecorators(e,d.declaration,d);else if(e)throw this.raise(g.UnsupportedDecoratorExport,t);return this.finishNode(d,"ExportNamedDeclaration")}if(this.eat(65)){let d=t,f=this.parseExportDefaultExpression();if(d.declaration=f,f.type==="ClassDeclaration")this.maybeTakeDecorators(e,f,d);else if(e)throw this.raise(g.UnsupportedDecoratorExport,t);return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);let s=e||this.parseIdentifier(!0),n=this.startNodeAtNode(s);return n.exported=s,t.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e,s;(s=(e=t).specifiers)!=null||(e.specifiers=[]);let n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){let e=t;e.specifiers||(e.specifiers=[]);let s=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(s)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(g.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(g.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(W(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:n}=this.lookahead();if(W(n)&&n!==98||n===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||W(this.state.type)&&s)return!0;if(this.match(65)&&s){let n=this.input.charCodeAt(this.nextTokenStartSince(e+4));return n===34||n===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(g.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(g.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(g.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,n){if(e){var i;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(g.ExportDefaultFromAsIdentifier,o)}}else if((i=t.specifiers)!=null&&i.length)for(let o of t.specifiers){let{exported:c}=o,l=c.type==="Identifier"?c.name:c.value;if(this.checkDuplicateExports(o,l),!n&&o.local){let{local:u}=o;u.type!=="Identifier"?this.raise(g.ExportBindingIsString,o,{localName:u.value,exportName:l}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){let o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:c}=o;if(!c)throw new Error("Assertion failure");this.checkDuplicateExports(t,c.name)}else if(o.type==="VariableDeclaration")for(let c of o.declarations)this.checkDeclaration(c.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(g.DuplicateDefaultExport,t):this.raise(g.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(130),i=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,i,t,n))}return e}parseExportSpecifier(t,e,s,n){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=gx(t.local):t.exported||(t.exported=Mt(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),e=jx.exec(t.value);return e&&this.raise(g.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(g.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(g.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var n;s!=="ImportDefaultSpecifier"&&this.raise(g.ImportReflectionNotBinding,e[0].loc.start),((n=t.assertions)==null?void 0:n.length)>0&&this.raise(g.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(n=>{let i;if(n.type==="ExportSpecifier"?i=n.local:n.type==="ImportSpecifier"&&(i=n.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});s!==void 0&&this.raise(g.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,n){e||(s==="module"?(this.expectPlugin("importReflection",n),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",n),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",n),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.parseIdentifier(!0),{type:n}=this.state;return(it(n)?n!==98||this.lookaheadCharCode()===102:n!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return W(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let n=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),i=n&&this.maybeParseStarImportSpecifier(t);return n&&!i&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{type:e},s),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),n=this.state.value;if(e.has(n)&&this.raise(g.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:n}),e.add(n),this.match(133)?s.key=this.parseStringLiteral(n):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(g.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(g.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(g.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(g.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(g.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"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;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(it(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(g.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let s=this.startNode(),n=this.match(133),i=this.isContextual(130);s.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(s,n,t.importKind==="type"||t.importKind==="typeof",i,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,n,i){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:a}=t;if(e)throw this.raise(g.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=Mt(a))}return this.finishImportSpecifier(t,"ImportSpecifier",i)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},Di=class extends Cc{constructor(t,e,s){t=Fx(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=s,this.filename=t.sourceFilename}getScopeHandler(){return en}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}};function qx(r,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=Xr(t,r),n=s.parse();if(s.sawUnambiguousESM)return n;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Xr(t,r).parse()}catch{}else n.program.sourceType="script";return n}catch(s){try{return t.sourceType="script",Xr(t,r).parse()}catch{}throw s}}else return Xr(t,r).parse()}function Gx(r,t){let e=Xr(t,r);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function $x(r){let t={};for(let e of Object.keys(r))t[e]=Nt(r[e]);return t}var Hx=$x(j_);function Xr(r,t){let e=Di,s=new Map;if(r!=null&&r.plugins){for(let n of r.plugins){let i,a;typeof n=="string"?i=n:[i,a]=n,s.has(i)||s.set(i,a||{})}Lx(s),e=Vx(s)}return new e(r,t,s)}var $d=new Map;function Vx(r){let t=[];for(let n of Rx)r.has(n)&&t.push(n);let e=t.join("|"),s=$d.get(e);if(!s){s=Di;for(let n of t)s=nf[n](s);$d.set(e,s)}return s}sn.parse=qx;sn.parseExpression=Gx;sn.tokTypes=Hx});var Ke=_(Te=>{Object.defineProperty(Te,"__esModule",{value:!0});var nm=Object.prototype.toString;function ET(r){switch(nm.call(r)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ea(r,Error)}}function lr(r,t){return nm.call(r)===`[object ${t}]`}function TT(r){return lr(r,"ErrorEvent")}function PT(r){return lr(r,"DOMError")}function vT(r){return lr(r,"DOMException")}function AT(r){return lr(r,"String")}function CT(r){return r===null||typeof r!="object"&&typeof r!="function"}function im(r){return lr(r,"Object")}function wT(r){return typeof Event<"u"&&ea(r,Event)}function IT(r){return typeof Element<"u"&&ea(r,Element)}function NT(r){return lr(r,"RegExp")}function kT(r){return!!(r&&r.then&&typeof r.then=="function")}function DT(r){return im(r)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r}function OT(r){return typeof r=="number"&&r!==r}function ea(r,t){try{return r instanceof t}catch{return!1}}function MT(r){return!!(typeof r=="object"&&r!==null&&(r.__isVue||r._isVue))}Te.isDOMError=PT;Te.isDOMException=vT;Te.isElement=IT;Te.isError=ET;Te.isErrorEvent=TT;Te.isEvent=wT;Te.isInstanceOf=ea;Te.isNaN=OT;Te.isPlainObject=im;Te.isPrimitive=CT;Te.isRegExp=NT;Te.isString=AT;Te.isSyntheticEvent=DT;Te.isThenable=kT;Te.isVueViewModel=MT});var gn=_(xs=>{Object.defineProperty(xs,"__esModule",{value:!0});var ta=Ke();function LT(r,t=0){return typeof r!="string"||t===0||r.length<=t?r:`${r.slice(0,t)}...`}function RT(r,t){let e=r,s=e.length;if(s<=150)return e;t>s&&(t=s);let n=Math.max(t-60,0);n<5&&(n=0);let i=Math.min(n+140,s);return i>s-5&&(i=s),i===s&&(n=Math.max(i-140,0)),e=e.slice(n,i),n>0&&(e=`'{snip} ${e}`),i<s&&(e+=" {snip}"),e}function FT(r,t){if(!Array.isArray(r))return"";let e=[];for(let s=0;s<r.length;s++){let n=r[s];try{ta.isVueViewModel(n)?e.push("[VueViewModel]"):e.push(String(n))}catch{e.push("[value cannot be serialized]")}}return e.join(t)}function am(r,t,e=!1){return ta.isString(r)?ta.isRegExp(t)?t.test(r):ta.isString(t)?e?r===t:r.includes(t):!1:!1}function BT(r,t=[],e=!1){return t.some(s=>am(r,s,e))}xs.isMatchingPattern=am;xs.safeJoin=FT;xs.snipLine=RT;xs.stringMatchesSomePattern=BT;xs.truncate=LT});var lm=_(il=>{Object.defineProperty(il,"__esModule",{value:!0});var rl=Ke(),jT=gn();function UT(r,t,e=250,s,n,i,a){if(!i.exception||!i.exception.values||!a||!rl.isInstanceOf(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=qT(nl(r,t,n,a.originalException,s,i.exception.values,o,0),e))}function nl(r,t,e,s,n,i,a,o){if(i.length>=e+1)return i;let c=[...i];if(rl.isInstanceOf(s[n],Error)){om(a,o);let l=r(t,s[n]),u=c.length;cm(l,n,u,o),c=nl(r,t,e,s[n],n,[l,...c],l,u)}return Array.isArray(s.errors)&&s.errors.forEach((l,u)=>{if(rl.isInstanceOf(l,Error)){om(a,o);let p=r(t,l),h=c.length;cm(p,`errors[${u}]`,h,o),c=nl(r,t,e,l,n,[p,...c],p,h)}}),c}function om(r,t){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,is_exception_group:!0,exception_id:t}}function cm(r,t,e,s){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,type:"chained",source:t,exception_id:e,parent_id:s}}function qT(r,t){return r.map(e=>(e.value&&(e.value=jT.truncate(e.value,t)),e))}il.applyAggregateErrorsToEvent=UT});var Rt=_(bn=>{Object.defineProperty(bn,"__esModule",{value:!0});function sa(r){return r&&r.Math==Math?r:void 0}var al=typeof globalThis=="object"&&sa(globalThis)||typeof window=="object"&&sa(window)||typeof self=="object"&&sa(self)||typeof global=="object"&&sa(global)||function(){return this}()||{};function GT(){return al}function $T(r,t,e){let s=e||al,n=s.__SENTRY__=s.__SENTRY__||{};return n[r]||(n[r]=t())}bn.GLOBAL_OBJ=al;bn.getGlobalObject=GT;bn.getGlobalSingleton=$T});var ol=_(Sn=>{Object.defineProperty(Sn,"__esModule",{value:!0});var HT=Ke(),VT=Rt(),ra=VT.getGlobalObject(),YT=80;function WT(r,t={}){try{let e=r,s=5,n=[],i=0,a=0,o=" > ",c=o.length,l,u=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||YT;for(;e&&i++<s&&(l=zT(e,u),!(l==="html"||i>1&&a+n.length*c+l.length>=p));)n.push(l),a+=l.length,e=e.parentNode;return n.reverse().join(o)}catch{return"<unknown>"}}function zT(r,t){let e=r,s=[],n,i,a,o,c;if(!e||!e.tagName)return"";s.push(e.tagName.toLowerCase());let l=t&&t.length?t.filter(p=>e.getAttribute(p)).map(p=>[p,e.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{s.push(`[${p[0]}="${p[1]}"]`)});else if(e.id&&s.push(`#${e.id}`),n=e.className,n&&HT.isString(n))for(i=n.split(/\s+/),c=0;c<i.length;c++)s.push(`.${i[c]}`);let u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=e.getAttribute(a),o&&s.push(`[${a}="${o}"]`);return s.join("")}function JT(){try{return ra.document.location.href}catch{return""}}function KT(r){return ra.document&&ra.document.querySelector?ra.document.querySelector(r):null}Sn.getDomElement=KT;Sn.getLocationHref=JT;Sn.htmlTreeAsString=WT});var pr=_(ur=>{Object.defineProperty(ur,"__esModule",{value:!0});var cl=Rt(),XT="Sentry Logger ",ll=["debug","info","warn","error","log","assert","trace"],ul={};function um(r){if(!("console"in cl.GLOBAL_OBJ))return r();let t=cl.GLOBAL_OBJ.console,e={},s=Object.keys(ul);s.forEach(n=>{let i=ul[n];e[n]=t[n],t[n]=i});try{return r()}finally{s.forEach(n=>{t[n]=e[n]})}}function QT(){let r=!1,t={enable:()=>{r=!0},disable:()=>{r=!1}};return typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?ll.forEach(e=>{t[e]=(...s)=>{r&&um(()=>{cl.GLOBAL_OBJ.console[e](`${XT}[${e}]:`,...s)})}}):ll.forEach(e=>{t[e]=()=>{}}),t}var ZT=QT();ur.CONSOLE_LEVELS=ll;ur.consoleSandbox=um;ur.logger=ZT;ur.originalConsoleMethods=ul});var pl=_(_n=>{Object.defineProperty(_n,"__esModule",{value:!0});var na=pr(),eP=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tP(r){return r==="http"||r==="https"}function sP(r,t=!1){let{host:e,path:s,pass:n,port:i,projectId:a,protocol:o,publicKey:c}=r;return`${o}://${c}${t&&n?`:${n}`:""}@${e}${i?`:${i}`:""}/${s&&`${s}/`}${a}`}function pm(r){let t=eP.exec(r);if(!t){console.error(`Invalid Sentry Dsn: ${r}`);return}let[e,s,n="",i,a="",o]=t.slice(1),c="",l=o,u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return hm({host:i,pass:n,path:c,projectId:l,port:a,protocol:e,publicKey:s})}function hm(r){return{protocol:r.protocol,publicKey:r.publicKey||"",pass:r.pass||"",host:r.host,port:r.port||"",path:r.path||"",projectId:r.projectId}}function rP(r){if(!(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__))return!0;let{port:t,projectId:e,protocol:s}=r;return["protocol","publicKey","host","projectId"].find(a=>r[a]?!1:(na.logger.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:e.match(/^\d+$/)?tP(s)?t&&isNaN(parseInt(t,10))?(na.logger.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(na.logger.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),!1):(na.logger.error(`Invalid Sentry Dsn: Invalid projectId ${e}`),!1)}function nP(r){let t=typeof r=="string"?pm(r):hm(r);if(!(!t||!rP(t)))return t}_n.dsnFromString=pm;_n.dsnToString=sP;_n.makeDsn=nP});var fl=_(dl=>{Object.defineProperty(dl,"__esModule",{value:!0});var hl=class extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}};dl.SentryError=hl});var Es=_(lt=>{Object.defineProperty(lt,"__esModule",{value:!0});var iP=ol(),hr=Ke(),dm=gn();function aP(r,t,e){if(!(t in r))return;let s=r[t],n=e(s);if(typeof n=="function")try{gm(n,s)}catch{}r[t]=n}function ym(r,t,e){Object.defineProperty(r,t,{value:e,writable:!0,configurable:!0})}function gm(r,t){let e=t.prototype||{};r.prototype=t.prototype=e,ym(r,"__sentry_original__",t)}function oP(r){return r.__sentry_original__}function cP(r){return Object.keys(r).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(r[t])}`).join("&")}function bm(r){if(hr.isError(r))return{message:r.message,name:r.name,stack:r.stack,...mm(r)};if(hr.isEvent(r)){let t={type:r.type,target:fm(r.target),currentTarget:fm(r.currentTarget),...mm(r)};return typeof CustomEvent<"u"&&hr.isInstanceOf(r,CustomEvent)&&(t.detail=r.detail),t}else return r}function fm(r){try{return hr.isElement(r)?iP.htmlTreeAsString(r):Object.prototype.toString.call(r)}catch{return"<unknown>"}}function mm(r){if(typeof r=="object"&&r!==null){let t={};for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t}else return{}}function lP(r,t=40){let e=Object.keys(bm(r));if(e.sort(),!e.length)return"[object has no keys]";if(e[0].length>=t)return dm.truncate(e[0],t);for(let s=e.length;s>0;s--){let n=e.slice(0,s).join(", ");if(!(n.length>t))return s===e.length?n:dm.truncate(n,t)}return""}function uP(r){return ml(r,new Map)}function ml(r,t){if(hr.isPlainObject(r)){let e=t.get(r);if(e!==void 0)return e;let s={};t.set(r,s);for(let n of Object.keys(r))typeof r[n]<"u"&&(s[n]=ml(r[n],t));return s}if(Array.isArray(r)){let e=t.get(r);if(e!==void 0)return e;let s=[];return t.set(r,s),r.forEach(n=>{s.push(ml(n,t))}),s}return r}function pP(r){let t;switch(!0){case r==null:t=new String(r);break;case(typeof r=="symbol"||typeof r=="bigint"):t=Object(r);break;case hr.isPrimitive(r):t=new r.constructor(r);break;default:t=r;break}return t}lt.addNonEnumerableProperty=ym;lt.convertToPlainObject=bm;lt.dropUndefinedKeys=uP;lt.extractExceptionKeysForMessage=lP;lt.fill=aP;lt.getOriginalFunction=oP;lt.markFunctionWrapped=gm;lt.objectify=pP;lt.urlEncode=cP});var Sm=_(yl=>{Object.defineProperty(yl,"__esModule",{value:!0});function hP(r){let t=/^\s*[-]{4,}$/,e=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return s=>{let n=s.match(e);if(n){let i,a,o,c,l;if(n[1]){o=n[1];let f=o.lastIndexOf(".");if(o[f-1]==="."&&f--,f>0){i=o.slice(0,f),a=o.slice(f+1);let m=i.indexOf(".Module");m>0&&(o=o.slice(m+1),i=i.slice(0,m))}c=void 0}a&&(c=i,l=a),a==="<anonymous>"&&(l=void 0,o=void 0),o===void 0&&(l=l||"<anonymous>",o=c?`${c}.${l}`:l);let u=n[2]&&n[2].startsWith("file://")?n[2].slice(7):n[2],p=n[5]==="native";!u&&n[5]&&!p&&(u=n[5]);let d=!(p||u&&!u.startsWith("/")&&!u.includes(":\\")&&!u.startsWith(".")&&!u.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&u!==void 0&&!u.includes("node_modules/");return{filename:u,module:r?r(u):void 0,function:o,lineno:parseInt(n[3],10)||void 0,colno:parseInt(n[4],10)||void 0,in_app:d}}if(s.match(t))return{filename:s}}}yl.node=hP});var ia=_(Ts=>{Object.defineProperty(Ts,"__esModule",{value:!0});var dP=Sm(),Em=50,_m=/\(error: (.*)\)/,xm=/captureMessage|captureException/;function Tm(...r){let t=r.sort((e,s)=>e[0]-s[0]).map(e=>e[1]);return(e,s=0)=>{let n=[],i=e.split(`
9
- `);for(let a=s;a<i.length;a++){let o=i[a];if(o.length>1024)continue;let c=_m.test(o)?o.replace(_m,"$1"):o;if(!c.match(/\S*Error: /)){for(let l of t){let u=l(c);if(u){n.push(u);break}}if(n.length>=Em)break}}return Pm(n)}}function fP(r){return Array.isArray(r)?Tm(...r):r}function Pm(r){if(!r.length)return[];let t=Array.from(r);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),xm.test(t[t.length-1].function||"")&&(t.pop(),xm.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,Em).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}var gl="<anonymous>";function mP(r){try{return!r||typeof r!="function"?gl:r.name||gl}catch{return gl}}function yP(r){return[90,dP.node(r)]}Ts.createStackParser=Tm;Ts.getFunctionName=mP;Ts.nodeStackLineParser=yP;Ts.stackParserFromStackParserOptions=fP;Ts.stripSentryFramesAndReverse=Pm});var _l=_(gt=>{Object.defineProperty(gt,"__esModule",{value:!0});var gP=pr(),bP=Rt(),aa=bP.getGlobalObject();function SP(){try{return new ErrorEvent(""),!0}catch{return!1}}function _P(){try{return new DOMError(""),!0}catch{return!1}}function xP(){try{return new DOMException(""),!0}catch{return!1}}function Sl(){if(!("fetch"in aa))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function bl(r){return r&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(r.toString())}function EP(){if(!Sl())return!1;if(bl(aa.fetch))return!0;let r=!1,t=aa.document;if(t&&typeof t.createElement=="function")try{let e=t.createElement("iframe");e.hidden=!0,t.head.appendChild(e),e.contentWindow&&e.contentWindow.fetch&&(r=bl(e.contentWindow.fetch)),t.head.removeChild(e)}catch(e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&gP.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return r}function TP(){return"ReportingObserver"in aa}function PP(){if(!Sl())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch{return!1}}gt.isNativeFetch=bl;gt.supportsDOMError=_P;gt.supportsDOMException=xP;gt.supportsErrorEvent=SP;gt.supportsFetch=Sl;gt.supportsNativeFetch=EP;gt.supportsReferrerPolicy=PP;gt.supportsReportingObserver=TP});var El=_(xl=>{Object.defineProperty(xl,"__esModule",{value:!0});var vP=Rt(),oa=vP.getGlobalObject();function AP(){let r=oa.chrome,t=r&&r.app&&r.app.runtime,e="history"in oa&&!!oa.history.pushState&&!!oa.history.replaceState;return!t&&e}xl.supportsHistory=AP});var Dm=_(es=>{Object.defineProperty(es,"__esModule",{value:!0});var vm=Ke(),En=pr(),bt=Es(),CP=ia(),wP=_l(),Ps=Rt(),IP=El(),ge=Ps.getGlobalObject(),xn="__sentry_xhr_v2__",vs={},Am={};function NP(r){if(!Am[r])switch(Am[r]=!0,r){case"console":OP();break;case"dom":km();break;case"xhr":Nm();break;case"fetch":MP();break;case"history":LP();break;case"error":jP();break;case"unhandledrejection":UP();break;default:(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&En.logger.warn("unknown instrumentation type:",r);return}}function kP(r,t){vs[r]=vs[r]||[],vs[r].push(t),NP(r)}function DP(){Object.keys(vs).forEach(r=>{vs[r]=void 0})}function ut(r,t){if(!(!r||!vs[r]))for(let e of vs[r]||[])try{e(t)}catch(s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&En.logger.error(`Error while triggering instrumentation handler.
10
- Type: ${r}
11
- Name: ${CP.getFunctionName(e)}
12
- Error:`,s)}}function OP(){"console"in Ps.GLOBAL_OBJ&&En.CONSOLE_LEVELS.forEach(function(r){r in Ps.GLOBAL_OBJ.console&&bt.fill(Ps.GLOBAL_OBJ.console,r,function(t){return En.originalConsoleMethods[r]=t,function(...e){ut("console",{args:e,level:r});let s=En.originalConsoleMethods[r];s&&s.apply(Ps.GLOBAL_OBJ.console,e)}})})}function MP(){wP.supportsNativeFetch()&&bt.fill(Ps.GLOBAL_OBJ,"fetch",function(r){return function(...t){let{method:e,url:s}=Im(t),n={args:t,fetchData:{method:e,url:s},startTimestamp:Date.now()};return ut("fetch",{...n}),r.apply(Ps.GLOBAL_OBJ,t).then(i=>(ut("fetch",{...n,endTimestamp:Date.now(),response:i}),i),i=>{throw ut("fetch",{...n,endTimestamp:Date.now(),error:i}),i})}})}function Tl(r,t){return!!r&&typeof r=="object"&&!!r[t]}function Cm(r){return typeof r=="string"?r:r?Tl(r,"url")?r.url:r.toString?r.toString():"":""}function Im(r){if(r.length===0)return{method:"GET",url:""};if(r.length===2){let[e,s]=r;return{url:Cm(e),method:Tl(s,"method")?String(s.method).toUpperCase():"GET"}}let t=r[0];return{url:Cm(t),method:Tl(t,"method")?String(t.method).toUpperCase():"GET"}}function Nm(){if(!ge.XMLHttpRequest)return;let r=XMLHttpRequest.prototype;bt.fill(r,"open",function(t){return function(...e){let s=e[1],n=this[xn]={method:vm.isString(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};vm.isString(s)&&n.method==="POST"&&s.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let i=()=>{let a=this[xn];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}ut("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?bt.fill(this,"onreadystatechange",function(a){return function(...o){return i(),a.apply(this,o)}}):this.addEventListener("readystatechange",i),bt.fill(this,"setRequestHeader",function(a){return function(...o){let[c,l]=o,u=this[xn];return u&&(u.request_headers[c.toLowerCase()]=l),a.apply(this,o)}}),t.apply(this,e)}}),bt.fill(r,"send",function(t){return function(...e){let s=this[xn];return s&&e[0]!==void 0&&(s.body=e[0]),ut("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}})}var ca;function LP(){if(!IP.supportsHistory())return;let r=ge.onpopstate;ge.onpopstate=function(...e){let s=ge.location.href,n=ca;if(ca=s,ut("history",{from:n,to:s}),r)try{return r.apply(this,e)}catch{}};function t(e){return function(...s){let n=s.length>2?s[2]:void 0;if(n){let i=ca,a=String(n);ca=a,ut("history",{from:i,to:a})}return e.apply(this,s)}}bt.fill(ge.history,"pushState",t),bt.fill(ge.history,"replaceState",t)}var RP=1e3,la,ua;function FP(r,t){if(!r||r.type!==t.type)return!0;try{if(r.target!==t.target)return!0}catch{}return!1}function BP(r){if(r.type!=="keypress")return!1;try{let t=r.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function wm(r,t=!1){return e=>{if(!e||ua===e||BP(e))return;let s=e.type==="keypress"?"input":e.type;la===void 0?(r({event:e,name:s,global:t}),ua=e):FP(ua,e)&&(r({event:e,name:s,global:t}),ua=e),clearTimeout(la),la=ge.setTimeout(()=>{la=void 0},RP)}}function km(){if(!ge.document)return;let r=ut.bind(null,"dom"),t=wm(r,!0);ge.document.addEventListener("click",t,!1),ge.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(e=>{let s=ge[e]&&ge[e].prototype;!s||!s.hasOwnProperty||!s.hasOwnProperty("addEventListener")||(bt.fill(s,"addEventListener",function(n){return function(i,a,o){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},u=l[i]=l[i]||{refCount:0};if(!u.handler){let p=wm(r);u.handler=p,n.call(this,i,p,o)}u.refCount++}catch{}return n.call(this,i,a,o)}}),bt.fill(s,"removeEventListener",function(n){return function(i,a,o){if(i==="click"||i=="keypress")try{let c=this,l=c.__sentry_instrumentation_handlers__||{},u=l[i];u&&(u.refCount--,u.refCount<=0&&(n.call(this,i,u.handler,o),u.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return n.call(this,i,a,o)}}))})}var pa=null;function jP(){pa=ge.onerror,ge.onerror=function(r,t,e,s,n){return ut("error",{column:s,error:n,line:e,msg:r,url:t}),pa&&!pa.__SENTRY_LOADER__?pa.apply(this,arguments):!1},ge.onerror.__SENTRY_INSTRUMENTED__=!0}var ha=null;function UP(){ha=ge.onunhandledrejection,ge.onunhandledrejection=function(r){return ut("unhandledrejection",r),ha&&!ha.__SENTRY_LOADER__?ha.apply(this,arguments):!0},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}es.SENTRY_XHR_DATA_KEY=xn;es.addInstrumentationHandler=kP;es.instrumentDOM=km;es.instrumentXHR=Nm;es.parseFetchArgs=Im;es.resetInstrumentationHandlers=DP});var vl=_(Pl=>{Object.defineProperty(Pl,"__esModule",{value:!0});function qP(){let r=typeof WeakSet=="function",t=r?new WeakSet:[];function e(n){if(r)return t.has(n)?!0:(t.add(n),!1);for(let i=0;i<t.length;i++)if(t[i]===n)return!0;return t.push(n),!1}function s(n){if(r)t.delete(n);else for(let i=0;i<t.length;i++)if(t[i]===n){t.splice(i,1);break}}return[e,s]}Pl.memoBuilder=qP});var da=_(St=>{Object.defineProperty(St,"__esModule",{value:!0});var GP=Es(),Al=gn(),$P=Rt();function HP(){let r=$P.GLOBAL_OBJ,t=r.crypto||r.msCrypto,e=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(e=()=>t.getRandomValues(new Uint8Array(1))[0])}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,s=>(s^(e()&15)>>s/4).toString(16))}function Om(r){return r.exception&&r.exception.values?r.exception.values[0]:void 0}function VP(r){let{message:t,event_id:e}=r;if(t)return t;let s=Om(r);return s?s.type&&s.value?`${s.type}: ${s.value}`:s.type||s.value||e||"<unknown>":e||"<unknown>"}function YP(r,t,e){let s=r.exception=r.exception||{},n=s.values=s.values||[],i=n[0]=n[0]||{};i.value||(i.value=t||""),i.type||(i.type=e||"Error")}function WP(r,t){let e=Om(r);if(!e)return;let s={type:"generic",handled:!0},n=e.mechanism;if(e.mechanism={...s,...n,...t},t&&"data"in t){let i={...n&&n.data,...t.data};e.mechanism.data=i}}var zP=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function JP(r){let t=r.match(zP)||[],e=parseInt(t[1],10),s=parseInt(t[2],10),n=parseInt(t[3],10);return{buildmetadata:t[5],major:isNaN(e)?void 0:e,minor:isNaN(s)?void 0:s,patch:isNaN(n)?void 0:n,prerelease:t[4]}}function KP(r,t,e=5){if(t.lineno===void 0)return;let s=r.length,n=Math.max(Math.min(s-1,t.lineno-1),0);t.pre_context=r.slice(Math.max(0,n-e),n).map(i=>Al.snipLine(i,0)),t.context_line=Al.snipLine(r[Math.min(s-1,n)],t.colno||0),t.post_context=r.slice(Math.min(n+1,s),n+1+e).map(i=>Al.snipLine(i,0))}function XP(r){if(r&&r.__sentry_captured__)return!0;try{GP.addNonEnumerableProperty(r,"__sentry_captured__",!0)}catch{}return!1}function QP(r){return Array.isArray(r)?r:[r]}St.addContextToFrame=KP;St.addExceptionMechanism=WP;St.addExceptionTypeValue=YP;St.arrayify=QP;St.checkOrSetAlreadyCaught=XP;St.getEventDescription=VP;St.parseSemver=JP;St.uuid4=HP});var Cl=_(fa=>{Object.defineProperty(fa,"__esModule",{value:!0});function ZP(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function ev(){return"npm"}fa.getSDKSource=ev;fa.isBrowserBundle=ZP});var wl=_((Tn,ya)=>{Object.defineProperty(Tn,"__esModule",{value:!0});var tv=Cl();function sv(){return!tv.isBrowserBundle()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ma(r,t){return r.require(t)}function rv(r){let t;try{t=ma(ya,r)}catch{}try{let{cwd:e}=ma(ya,"process");t=ma(ya,`${e()}/node_modules/${r}`)}catch{}return t}Tn.dynamicRequire=ma;Tn.isNodeEnv=sv;Tn.loadModule=rv});var vn=_(Pn=>{Object.defineProperty(Pn,"__esModule",{value:!0});var Il=Ke(),nv=vl(),iv=Es(),av=ia();function Mm(r,t=100,e=1/0){try{return ga("",r,t,e)}catch(s){return{ERROR:`**non-serializable** (${s})`}}}function Lm(r,t=3,e=100*1024){let s=Mm(r,t);return uv(s)>e?Lm(r,t-1,e):s}function ga(r,t,e=1/0,s=1/0,n=nv.memoBuilder()){let[i,a]=n;if(t==null||["number","boolean","string"].includes(typeof t)&&!Il.isNaN(t))return t;let o=ov(r,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:e;if(c===0)return o.replace("object ","");if(i(t))return"[Circular ~]";let l=t;if(l&&typeof l.toJSON=="function")try{let d=l.toJSON();return ga("",d,c-1,s,n)}catch{}let u=Array.isArray(t)?[]:{},p=0,h=iv.convertToPlainObject(t);for(let d in h){if(!Object.prototype.hasOwnProperty.call(h,d))continue;if(p>=s){u[d]="[MaxProperties ~]";break}let f=h[d];u[d]=ga(d,f,c-1,s,n),p++}return a(t),u}function ov(r,t){try{if(r==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(r==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Il.isVueViewModel(t))return"[VueViewModel]";if(Il.isSyntheticEvent(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${av.getFunctionName(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let e=cv(t);return/^HTML(\w*)Element$/.test(e)?`[HTMLElement: ${e}]`:`[object ${e}]`}catch(e){return`**non-serializable** (${e})`}}function cv(r){let t=Object.getPrototypeOf(r);return t?t.constructor.name:"null prototype"}function lv(r){return~-encodeURI(r).split(/%..|./).length}function uv(r){return lv(JSON.stringify(r))}Pn.normalize=Mm;Pn.normalizeToSize=Lm;Pn.walk=ga});var qm=_(Ft=>{Object.defineProperty(Ft,"__esModule",{value:!0});function Fm(r,t){let e=0;for(let s=r.length-1;s>=0;s--){let n=r[s];n==="."?r.splice(s,1):n===".."?(r.splice(s,1),e++):e&&(r.splice(s,1),e--)}if(t)for(;e--;e)r.unshift("..");return r}var pv=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Bm(r){let t=r.length>1024?`<truncated>${r.slice(-1024)}`:r,e=pv.exec(t);return e?e.slice(1):[]}function Nl(...r){let t="",e=!1;for(let s=r.length-1;s>=-1&&!e;s--){let n=s>=0?r[s]:"/";n&&(t=`${n}/${t}`,e=n.charAt(0)==="/")}return t=Fm(t.split("/").filter(s=>!!s),!e).join("/"),(e?"/":"")+t||"."}function Rm(r){let t=0;for(;t<r.length&&r[t]==="";t++);let e=r.length-1;for(;e>=0&&r[e]==="";e--);return t>e?[]:r.slice(t,e-t+1)}function hv(r,t){r=Nl(r).slice(1),t=Nl(t).slice(1);let e=Rm(r.split("/")),s=Rm(t.split("/")),n=Math.min(e.length,s.length),i=n;for(let o=0;o<n;o++)if(e[o]!==s[o]){i=o;break}let a=[];for(let o=i;o<e.length;o++)a.push("..");return a=a.concat(s.slice(i)),a.join("/")}function jm(r){let t=Um(r),e=r.slice(-1)==="/",s=Fm(r.split("/").filter(n=>!!n),!t).join("/");return!s&&!t&&(s="."),s&&e&&(s+="/"),(t?"/":"")+s}function Um(r){return r.charAt(0)==="/"}function dv(...r){return jm(r.join("/"))}function fv(r){let t=Bm(r),e=t[0],s=t[1];return!e&&!s?".":(s&&(s=s.slice(0,s.length-1)),e+s)}function mv(r,t){let e=Bm(r)[2];return t&&e.slice(t.length*-1)===t&&(e=e.slice(0,e.length-t.length)),e}Ft.basename=mv;Ft.dirname=fv;Ft.isAbsolute=Um;Ft.join=dv;Ft.normalizePath=jm;Ft.relative=hv;Ft.resolve=Nl});var kl=_(Cn=>{Object.defineProperty(Cn,"__esModule",{value:!0});var yv=Ke(),Bt;(function(r){r[r.PENDING=0]="PENDING";let e=1;r[r.RESOLVED=e]="RESOLVED";let s=2;r[r.REJECTED=s]="REJECTED"})(Bt||(Bt={}));function gv(r){return new An(t=>{t(r)})}function bv(r){return new An((t,e)=>{e(r)})}var An=class r{constructor(t){r.prototype.__init.call(this),r.prototype.__init2.call(this),r.prototype.__init3.call(this),r.prototype.__init4.call(this),this._state=Bt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,e){return new r((s,n)=>{this._handlers.push([!1,i=>{if(!t)s(i);else try{s(t(i))}catch(a){n(a)}},i=>{if(!e)n(i);else try{s(e(i))}catch(a){n(a)}}]),this._executeHandlers()})}catch(t){return this.then(e=>e,t)}finally(t){return new r((e,s)=>{let n,i;return this.then(a=>{i=!1,n=a,t&&t()},a=>{i=!0,n=a,t&&t()}).then(()=>{if(i){s(n);return}e(n)})})}__init(){this._resolve=t=>{this._setResult(Bt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Bt.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{if(this._state===Bt.PENDING){if(yv.isThenable(e)){e.then(this._resolve,this._reject);return}this._state=t,this._value=e,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Bt.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(e=>{e[0]||(this._state===Bt.RESOLVED&&e[1](this._value),this._state===Bt.REJECTED&&e[2](this._value),e[0]=!0)})}}};Cn.SyncPromise=An;Cn.rejectedSyncPromise=bv;Cn.resolvedSyncPromise=gv});var Gm=_(Ol=>{Object.defineProperty(Ol,"__esModule",{value:!0});var Sv=fl(),Dl=kl();function _v(r){let t=[];function e(){return r===void 0||t.length<r}function s(a){return t.splice(t.indexOf(a),1)[0]}function n(a){if(!e())return Dl.rejectedSyncPromise(new Sv.SentryError("Not adding Promise because buffer limit was reached."));let o=a();return t.indexOf(o)===-1&&t.push(o),o.then(()=>s(o)).then(null,()=>s(o).then(null,()=>{})),o}function i(a){return new Dl.SyncPromise((o,c)=>{let l=t.length;if(!l)return o(!0);let u=setTimeout(()=>{a&&a>0&&o(!1)},a);t.forEach(p=>{Dl.resolvedSyncPromise(p).then(()=>{--l||(clearTimeout(u),o(!0))},c)})})}return{$:t,add:n,drain:i}}Ol.makePromiseBuffer=_v});var Ml=_(dr=>{Object.defineProperty(dr,"__esModule",{value:!0});function xv(r){if(!r)return{};let t=r.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let e=t[6]||"",s=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:e,hash:s,relative:t[5]+e+s}}function Ev(r){return r.split(/[\?#]/,1)[0]}function Tv(r){return r.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function Pv(r){let{protocol:t,host:e,path:s}=r,n=e&&e.replace(/^.*@/,"[filtered]:[filtered]@").replace(":80","").replace(":443","")||"";return`${t?`${t}://`:""}${n}${s}`}dr.getNumberOfUrlSegments=Tv;dr.getSanitizedUrlString=Pv;dr.parseUrl=xv;dr.stripUrlQueryAndFragment=Ev});var Vm=_(fr=>{Object.defineProperty(fr,"__esModule",{value:!0});var $m=Ke(),vv=vn(),Av=Ml(),Cv={ip:!1,request:!0,transaction:!0,user:!0},wv=["cookies","data","headers","method","query_string","url"],Iv=["id","username","email"];function Nv(r,t,e){r&&((!r.metadata.source||r.metadata.source==="url")&&r.setName(...ba(t,{path:!0,method:!0})),r.setData("url",t.originalUrl||t.url),t.baseUrl&&r.setData("baseUrl",t.baseUrl),r.setData("query",Hm(t,e)))}function ba(r,t={}){let e=r.method&&r.method.toUpperCase(),s="",n="url";t.customRoute||r.route?(s=t.customRoute||`${r.baseUrl||""}${r.route&&r.route.path}`,n="route"):(r.originalUrl||r.url)&&(s=Av.stripUrlQueryAndFragment(r.originalUrl||r.url||""));let i="";return t.method&&e&&(i+=e),t.method&&t.path&&(i+=" "),t.path&&s&&(i+=s),[i,n]}function kv(r,t){switch(t){case"path":return ba(r,{path:!0})[0];case"handler":return r.route&&r.route.stack&&r.route.stack[0]&&r.route.stack[0].name||"<anonymous>";case"methodPath":default:return ba(r,{path:!0,method:!0})[0]}}function Dv(r,t){let e={};return(Array.isArray(t)?t:Iv).forEach(n=>{r&&n in r&&(e[n]=r[n])}),e}function Ll(r,t){let{include:e=wv,deps:s}=t||{},n={},i=r.headers||{},a=r.method,o=r.hostname||r.host||i.host||"<no host>",c=r.protocol==="https"||r.socket&&r.socket.encrypted?"https":"http",l=r.originalUrl||r.url||"",u=`${c}://${o}${l}`;return e.forEach(p=>{switch(p){case"headers":{n.headers=i;break}case"method":{n.method=a;break}case"url":{n.url=u;break}case"cookies":{n.cookies=r.cookies||i.cookie&&s&&s.cookie&&s.cookie.parse(i.cookie)||{};break}case"query_string":{n.query_string=Hm(r,s);break}case"data":{if(a==="GET"||a==="HEAD")break;r.body!==void 0&&(n.data=$m.isString(r.body)?r.body:JSON.stringify(vv.normalize(r.body)));break}default:({}).hasOwnProperty.call(r,p)&&(n[p]=r[p])}}),n}function Ov(r,t,e){let s={...Cv,...e&&e.include};if(s.request){let n=Array.isArray(s.request)?Ll(t,{include:s.request,deps:e&&e.deps}):Ll(t,{deps:e&&e.deps});r.request={...r.request,...n}}if(s.user){let n=t.user&&$m.isPlainObject(t.user)?Dv(t.user,s.user):{};Object.keys(n).length&&(r.user={...r.user,...n})}if(s.ip){let n=t.ip||t.socket&&t.socket.remoteAddress;n&&(r.user={...r.user,ip_address:n})}return s.transaction&&!r.transaction&&(r.transaction=kv(t,s.transaction)),r}function Hm(r,t){let e=r.originalUrl||r.url||"";if(e)return e.startsWith("/")&&(e=`http://dogs.are.great${e}`),r.query||typeof URL!==void 0&&new URL(e).search.replace("?","")||t&&t.url&&t.url.parse(e).query||void 0}fr.addRequestDataToEvent=Ov;fr.addRequestDataToTransaction=Nv;fr.extractPathForTransaction=ba;fr.extractRequestData=Ll});var zm=_(wn=>{Object.defineProperty(wn,"__esModule",{value:!0});var Ym=["fatal","error","warning","log","info","debug"];function Mv(r){return Wm(r)}function Wm(r){return r==="warn"?"warning":Ym.includes(r)?r:"log"}wn.severityFromString=Mv;wn.severityLevelFromString=Wm;wn.validSeverityLevels=Ym});var Fl=_((Xe,Zm)=>{Object.defineProperty(Xe,"__esModule",{value:!0});var Km=wl(),Lv=Rt(),Xm=Lv.getGlobalObject(),Rl={nowSeconds:()=>Date.now()/1e3};function Rv(){let{performance:r}=Xm;if(!r||!r.now)return;let t=Date.now()-r.now();return{now:()=>r.now(),timeOrigin:t}}function Fv(){try{return Km.dynamicRequire(Zm,"perf_hooks").performance}catch{return}}var Sa=Km.isNodeEnv()?Fv():Rv(),Jm=Sa===void 0?Rl:{nowSeconds:()=>(Sa.timeOrigin+Sa.now())/1e3},Bv=Rl.nowSeconds.bind(Rl),Qm=Jm.nowSeconds.bind(Jm),jv=Qm,Uv=Sa!==void 0;Xe._browserPerformanceTimeOriginMode=void 0;var qv=(()=>{let{performance:r}=Xm;if(!r||!r.now){Xe._browserPerformanceTimeOriginMode="none";return}let t=3600*1e3,e=r.now(),s=Date.now(),n=r.timeOrigin?Math.abs(r.timeOrigin+e-s):t,i=n<t,a=r.timing&&r.timing.navigationStart,c=typeof a=="number"?Math.abs(a+e-s):t,l=c<t;return i||l?n<=c?(Xe._browserPerformanceTimeOriginMode="timeOrigin",r.timeOrigin):(Xe._browserPerformanceTimeOriginMode="navigationStart",a):(Xe._browserPerformanceTimeOriginMode="dateNow",s)})();Xe.browserPerformanceTimeOrigin=qv;Xe.dateTimestampInSeconds=Bv;Xe.timestampInSeconds=Qm;Xe.timestampWithMs=jv;Xe.usingPerformanceAPI=Uv});var jl=_(ts=>{Object.defineProperty(ts,"__esModule",{value:!0});var Gv=Ke(),$v=pr(),Hv="baggage",Bl="sentry-",ty=/^sentry-/,sy=8192;function Vv(r){if(!Gv.isString(r)&&!Array.isArray(r))return;let t={};if(Array.isArray(r))t=r.reduce((s,n)=>{let i=ey(n);return{...s,...i}},{});else{if(!r)return;t=ey(r)}let e=Object.entries(t).reduce((s,[n,i])=>{if(n.match(ty)){let a=n.slice(Bl.length);s[a]=i}return s},{});if(Object.keys(e).length>0)return e}function Yv(r){if(!r)return;let t=Object.entries(r).reduce((e,[s,n])=>(n&&(e[`${Bl}${s}`]=n),e),{});return Wv(t)}function ey(r){return r.split(",").map(t=>t.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((t,[e,s])=>(t[e]=s,t),{})}function Wv(r){if(Object.keys(r).length!==0)return Object.entries(r).reduce((t,[e,s],n)=>{let i=`${encodeURIComponent(e)}=${encodeURIComponent(s)}`,a=n===0?i:`${t},${i}`;return a.length>sy?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&$v.logger.warn(`Not adding key: ${e} with val: ${s} to baggage header due to exceeding baggage size limits.`),t):a},"")}ts.BAGGAGE_HEADER_NAME=Hv;ts.MAX_BAGGAGE_STRING_LENGTH=sy;ts.SENTRY_BAGGAGE_KEY_PREFIX=Bl;ts.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=ty;ts.baggageHeaderToDynamicSamplingContext=Vv;ts.dynamicSamplingContextToSentryBaggageHeader=Yv});var iy=_(mr=>{Object.defineProperty(mr,"__esModule",{value:!0});var zv=jl(),_a=da(),ry=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ny(r){if(!r)return;let t=r.match(ry);if(!t)return;let e;return t[3]==="1"?e=!0:t[3]==="0"&&(e=!1),{traceId:t[1],parentSampled:e,parentSpanId:t[2]}}function Jv(r,t){let e=ny(r),s=zv.baggageHeaderToDynamicSamplingContext(t),{traceId:n,parentSpanId:i,parentSampled:a}=e||{},o={traceId:n||_a.uuid4(),spanId:_a.uuid4().substring(16),sampled:a};return i&&(o.parentSpanId=i),s&&(o.dsc=s),{traceparentData:e,dynamicSamplingContext:s,propagationContext:o}}function Kv(r=_a.uuid4(),t=_a.uuid4().substring(16),e){let s="";return e!==void 0&&(s=e?"-1":"-0"),`${r}-${t}${s}`}mr.TRACEPARENT_REGEXP=ry;mr.extractTraceparentData=ny;mr.generateSentryTraceHeader=Kv;mr.tracingContextFromHeaders=Jv});var ql=_(Qe=>{Object.defineProperty(Qe,"__esModule",{value:!0});var Xv=pl(),Qv=vn(),ay=Es();function Zv(r,t=[]){return[r,t]}function e0(r,t){let[e,s]=r;return[e,[...s,t]]}function oy(r,t){let e=r[1];for(let s of e){let n=s[0].type;if(t(s,n))return!0}return!1}function t0(r,t){return oy(r,(e,s)=>t.includes(s))}function Ul(r,t){return(t||new TextEncoder).encode(r)}function s0(r,t){let[e,s]=r,n=JSON.stringify(e);function i(a){typeof n=="string"?n=typeof a=="string"?n+a:[Ul(n,t),a]:n.push(typeof a=="string"?Ul(a,t):a)}for(let a of s){let[o,c]=a;if(i(`
13
- ${JSON.stringify(o)}
14
- `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let l;try{l=JSON.stringify(c)}catch{l=JSON.stringify(Qv.normalize(c))}i(l)}}return typeof n=="string"?n:r0(n)}function r0(r){let t=r.reduce((n,i)=>n+i.length,0),e=new Uint8Array(t),s=0;for(let n of r)e.set(n,s),s+=n.length;return e}function n0(r,t,e){let s=typeof r=="string"?t.encode(r):r;function n(c){let l=s.subarray(0,c);return s=s.subarray(c+1),l}function i(){let c=s.indexOf(10);return c<0&&(c=s.length),JSON.parse(e.decode(n(c)))}let a=i(),o=[];for(;s.length;){let c=i(),l=typeof c.length=="number"?c.length:void 0;o.push([c,l?n(l):i()])}return[a,o]}function i0(r,t){let e=typeof r.data=="string"?Ul(r.data,t):r.data;return[ay.dropUndefinedKeys({type:"attachment",length:e.length,filename:r.filename,content_type:r.contentType,attachment_type:r.attachmentType}),e]}var a0={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function o0(r){return a0[r]}function c0(r){if(!r||!r.sdk)return;let{name:t,version:e}=r.sdk;return{name:t,version:e}}function l0(r,t,e,s){let n=r.sdkProcessingMetadata&&r.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:r.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!e&&{dsn:Xv.dsnToString(s)},...n&&{trace:ay.dropUndefinedKeys({...n})}}}Qe.addItemToEnvelope=e0;Qe.createAttachmentEnvelopeItem=i0;Qe.createEnvelope=Zv;Qe.createEventEnvelopeHeaders=l0;Qe.envelopeContainsItemType=t0;Qe.envelopeItemTypeToDataCategory=o0;Qe.forEachEnvelopeItem=oy;Qe.getSdkMetadataForEnvelopeHeader=c0;Qe.parseEnvelope=n0;Qe.serializeEnvelope=s0});var cy=_(Gl=>{Object.defineProperty(Gl,"__esModule",{value:!0});var u0=ql(),p0=Fl();function h0(r,t,e){let s=[{type:"client_report"},{timestamp:e||p0.dateTimestampInSeconds(),discarded_events:r}];return u0.createEnvelope(t?{dsn:t}:{},[s])}Gl.createClientReportEnvelope=h0});var hy=_(As=>{Object.defineProperty(As,"__esModule",{value:!0});var ly=60*1e3;function uy(r,t=Date.now()){let e=parseInt(`${r}`,10);if(!isNaN(e))return e*1e3;let s=Date.parse(`${r}`);return isNaN(s)?ly:s-t}function py(r,t){return r[t]||r.all||0}function d0(r,t,e=Date.now()){return py(r,t)>e}function f0(r,{statusCode:t,headers:e},s=Date.now()){let n={...r},i=e&&e["x-sentry-rate-limits"],a=e&&e["retry-after"];if(i)for(let o of i.trim().split(",")){let[c,l]=o.split(":",2),u=parseInt(c,10),p=(isNaN(u)?60:u)*1e3;if(!l)n.all=s+p;else for(let h of l.split(";"))n[h]=s+p}else a?n.all=s+uy(a,s):t===429&&(n.all=s+60*1e3);return n}As.DEFAULT_RETRY_AFTER=ly;As.disabledUntil=py;As.isRateLimited=d0;As.parseRetryAfterHeader=uy;As.updateRateLimits=f0});var my=_($l=>{Object.defineProperty($l,"__esModule",{value:!0});function dy(r,t,e){let s=t.match(/([a-z_]+)\.(.*)/i);if(s===null)r[t]=e;else{let n=r[s[1]];dy(n,s[2],e)}}function m0(r,t,e={}){return Array.isArray(t)?fy(r,t,e):y0(r,t,e)}function fy(r,t,e){let s=t.find(n=>n.name===r.name);if(s){for(let[n,i]of Object.entries(e))dy(s,n,i);return t}return[...t,r]}function y0(r,t,e){return n=>{let i=t(n);return r.allowExclusionByUser&&!i.find(o=>o.name===r.name)?i:fy(r,i,e)}}$l.addOrUpdateIntegration=m0});var yy=_(Hl=>{Object.defineProperty(Hl,"__esModule",{value:!0});function g0(r){let t=[],e={};return{add(s,n){for(;t.length>=r;){let i=t.shift();i!==void 0&&delete e[i]}e[s]&&this.delete(s),t.push(s),e[s]=n},clear(){e={},t=[]},get(s){return e[s]},size(){return t.length},delete(s){if(!e[s])return!1;delete e[s];for(let n=0;n<t.length;n++)if(t[n]===s){t.splice(n,1);break}return!0}}}Hl.makeFifoCache=g0});var _y=_(yr=>{Object.defineProperty(yr,"__esModule",{value:!0});var gy=Ke(),by=da(),b0=vn(),S0=Es();function Vl(r,t){return r(t.stack||"",1)}function Sy(r,t){let e={type:t.name||t.constructor.name,value:t.message},s=Vl(r,t);return s.length&&(e.stacktrace={frames:s}),e}function _0(r,t,e,s){let n=e,a=s&&s.data&&s.data.mechanism||{handled:!0,type:"generic"};if(!gy.isError(e)){if(gy.isPlainObject(e)){let c=`Non-Error exception captured with keys: ${S0.extractExceptionKeysForMessage(e)}`,l=r(),u=l.getClient(),p=u&&u.getOptions().normalizeDepth;l.configureScope(h=>{h.setExtra("__serialized__",b0.normalizeToSize(e,p))}),n=s&&s.syntheticException||new Error(c),n.message=c}else n=s&&s.syntheticException||new Error(e),n.message=e;a.synthetic=!0}let o={exception:{values:[Sy(t,n)]}};return by.addExceptionTypeValue(o,void 0,void 0),by.addExceptionMechanism(o,a),{...o,event_id:s&&s.event_id}}function x0(r,t,e="info",s,n){let i={event_id:s&&s.event_id,level:e,message:t};if(n&&s&&s.syntheticException){let a=Vl(r,s.syntheticException);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}return i}yr.eventFromMessage=x0;yr.eventFromUnknownInput=_0;yr.exceptionFromError=Sy;yr.parseStackFrames=Vl});var xy=_(Yl=>{Object.defineProperty(Yl,"__esModule",{value:!0});function E0(r){return r.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Yl.escapeStringForRegex=E0});var L=_(E=>{Object.defineProperty(E,"__esModule",{value:!0});var T0=lm(),Wl=ol(),zl=pl(),P0=fl(),Jl=Rt(),gr=Dm(),Re=Ke(),xa=pr(),v0=vl(),ss=da(),Kl=wl(),Xl=vn(),jt=Es(),Cs=qm(),A0=Gm(),Ea=Vm(),Ql=zm(),In=ia(),Nn=gn(),rs=_l(),Zl=kl(),br=Fl(),Ta=iy(),Ey=Cl(),_t=ql(),C0=cy(),kn=hy(),Sr=jl(),Pa=Ml(),w0=my(),I0=yy(),va=_y(),N0=xy(),k0=El();E.applyAggregateErrorsToEvent=T0.applyAggregateErrorsToEvent;E.getDomElement=Wl.getDomElement;E.getLocationHref=Wl.getLocationHref;E.htmlTreeAsString=Wl.htmlTreeAsString;E.dsnFromString=zl.dsnFromString;E.dsnToString=zl.dsnToString;E.makeDsn=zl.makeDsn;E.SentryError=P0.SentryError;E.GLOBAL_OBJ=Jl.GLOBAL_OBJ;E.getGlobalObject=Jl.getGlobalObject;E.getGlobalSingleton=Jl.getGlobalSingleton;E.SENTRY_XHR_DATA_KEY=gr.SENTRY_XHR_DATA_KEY;E.addInstrumentationHandler=gr.addInstrumentationHandler;E.instrumentDOM=gr.instrumentDOM;E.instrumentXHR=gr.instrumentXHR;E.parseFetchArgs=gr.parseFetchArgs;E.resetInstrumentationHandlers=gr.resetInstrumentationHandlers;E.isDOMError=Re.isDOMError;E.isDOMException=Re.isDOMException;E.isElement=Re.isElement;E.isError=Re.isError;E.isErrorEvent=Re.isErrorEvent;E.isEvent=Re.isEvent;E.isInstanceOf=Re.isInstanceOf;E.isNaN=Re.isNaN;E.isPlainObject=Re.isPlainObject;E.isPrimitive=Re.isPrimitive;E.isRegExp=Re.isRegExp;E.isString=Re.isString;E.isSyntheticEvent=Re.isSyntheticEvent;E.isThenable=Re.isThenable;E.isVueViewModel=Re.isVueViewModel;E.CONSOLE_LEVELS=xa.CONSOLE_LEVELS;E.consoleSandbox=xa.consoleSandbox;E.logger=xa.logger;E.originalConsoleMethods=xa.originalConsoleMethods;E.memoBuilder=v0.memoBuilder;E.addContextToFrame=ss.addContextToFrame;E.addExceptionMechanism=ss.addExceptionMechanism;E.addExceptionTypeValue=ss.addExceptionTypeValue;E.arrayify=ss.arrayify;E.checkOrSetAlreadyCaught=ss.checkOrSetAlreadyCaught;E.getEventDescription=ss.getEventDescription;E.parseSemver=ss.parseSemver;E.uuid4=ss.uuid4;E.dynamicRequire=Kl.dynamicRequire;E.isNodeEnv=Kl.isNodeEnv;E.loadModule=Kl.loadModule;E.normalize=Xl.normalize;E.normalizeToSize=Xl.normalizeToSize;E.walk=Xl.walk;E.addNonEnumerableProperty=jt.addNonEnumerableProperty;E.convertToPlainObject=jt.convertToPlainObject;E.dropUndefinedKeys=jt.dropUndefinedKeys;E.extractExceptionKeysForMessage=jt.extractExceptionKeysForMessage;E.fill=jt.fill;E.getOriginalFunction=jt.getOriginalFunction;E.markFunctionWrapped=jt.markFunctionWrapped;E.objectify=jt.objectify;E.urlEncode=jt.urlEncode;E.basename=Cs.basename;E.dirname=Cs.dirname;E.isAbsolute=Cs.isAbsolute;E.join=Cs.join;E.normalizePath=Cs.normalizePath;E.relative=Cs.relative;E.resolve=Cs.resolve;E.makePromiseBuffer=A0.makePromiseBuffer;E.addRequestDataToEvent=Ea.addRequestDataToEvent;E.addRequestDataToTransaction=Ea.addRequestDataToTransaction;E.extractPathForTransaction=Ea.extractPathForTransaction;E.extractRequestData=Ea.extractRequestData;E.severityFromString=Ql.severityFromString;E.severityLevelFromString=Ql.severityLevelFromString;E.validSeverityLevels=Ql.validSeverityLevels;E.createStackParser=In.createStackParser;E.getFunctionName=In.getFunctionName;E.nodeStackLineParser=In.nodeStackLineParser;E.stackParserFromStackParserOptions=In.stackParserFromStackParserOptions;E.stripSentryFramesAndReverse=In.stripSentryFramesAndReverse;E.isMatchingPattern=Nn.isMatchingPattern;E.safeJoin=Nn.safeJoin;E.snipLine=Nn.snipLine;E.stringMatchesSomePattern=Nn.stringMatchesSomePattern;E.truncate=Nn.truncate;E.isNativeFetch=rs.isNativeFetch;E.supportsDOMError=rs.supportsDOMError;E.supportsDOMException=rs.supportsDOMException;E.supportsErrorEvent=rs.supportsErrorEvent;E.supportsFetch=rs.supportsFetch;E.supportsNativeFetch=rs.supportsNativeFetch;E.supportsReferrerPolicy=rs.supportsReferrerPolicy;E.supportsReportingObserver=rs.supportsReportingObserver;E.SyncPromise=Zl.SyncPromise;E.rejectedSyncPromise=Zl.rejectedSyncPromise;E.resolvedSyncPromise=Zl.resolvedSyncPromise;Object.defineProperty(E,"_browserPerformanceTimeOriginMode",{enumerable:!0,get:()=>br._browserPerformanceTimeOriginMode});E.browserPerformanceTimeOrigin=br.browserPerformanceTimeOrigin;E.dateTimestampInSeconds=br.dateTimestampInSeconds;E.timestampInSeconds=br.timestampInSeconds;E.timestampWithMs=br.timestampWithMs;E.usingPerformanceAPI=br.usingPerformanceAPI;E.TRACEPARENT_REGEXP=Ta.TRACEPARENT_REGEXP;E.extractTraceparentData=Ta.extractTraceparentData;E.generateSentryTraceHeader=Ta.generateSentryTraceHeader;E.tracingContextFromHeaders=Ta.tracingContextFromHeaders;E.getSDKSource=Ey.getSDKSource;E.isBrowserBundle=Ey.isBrowserBundle;E.addItemToEnvelope=_t.addItemToEnvelope;E.createAttachmentEnvelopeItem=_t.createAttachmentEnvelopeItem;E.createEnvelope=_t.createEnvelope;E.createEventEnvelopeHeaders=_t.createEventEnvelopeHeaders;E.envelopeContainsItemType=_t.envelopeContainsItemType;E.envelopeItemTypeToDataCategory=_t.envelopeItemTypeToDataCategory;E.forEachEnvelopeItem=_t.forEachEnvelopeItem;E.getSdkMetadataForEnvelopeHeader=_t.getSdkMetadataForEnvelopeHeader;E.parseEnvelope=_t.parseEnvelope;E.serializeEnvelope=_t.serializeEnvelope;E.createClientReportEnvelope=C0.createClientReportEnvelope;E.DEFAULT_RETRY_AFTER=kn.DEFAULT_RETRY_AFTER;E.disabledUntil=kn.disabledUntil;E.isRateLimited=kn.isRateLimited;E.parseRetryAfterHeader=kn.parseRetryAfterHeader;E.updateRateLimits=kn.updateRateLimits;E.BAGGAGE_HEADER_NAME=Sr.BAGGAGE_HEADER_NAME;E.MAX_BAGGAGE_STRING_LENGTH=Sr.MAX_BAGGAGE_STRING_LENGTH;E.SENTRY_BAGGAGE_KEY_PREFIX=Sr.SENTRY_BAGGAGE_KEY_PREFIX;E.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=Sr.SENTRY_BAGGAGE_KEY_PREFIX_REGEX;E.baggageHeaderToDynamicSamplingContext=Sr.baggageHeaderToDynamicSamplingContext;E.dynamicSamplingContextToSentryBaggageHeader=Sr.dynamicSamplingContextToSentryBaggageHeader;E.getNumberOfUrlSegments=Pa.getNumberOfUrlSegments;E.getSanitizedUrlString=Pa.getSanitizedUrlString;E.parseUrl=Pa.parseUrl;E.stripUrlQueryAndFragment=Pa.stripUrlQueryAndFragment;E.addOrUpdateIntegration=w0.addOrUpdateIntegration;E.makeFifoCache=I0.makeFifoCache;E.eventFromMessage=va.eventFromMessage;E.eventFromUnknownInput=va.eventFromUnknownInput;E.exceptionFromError=va.exceptionFromError;E.parseStackFrames=va.parseStackFrames;E.escapeStringForRegex=N0.escapeStringForRegex;E.supportsHistory=k0.supportsHistory});var Dn=_(eu=>{Object.defineProperty(eu,"__esModule",{value:!0});var D0="production";eu.DEFAULT_ENVIRONMENT=D0});var Ln=_(Mn=>{Object.defineProperty(Mn,"__esModule",{value:!0});var On=L();function O0(r){let t=On.timestampInSeconds(),e={sid:On.uuid4(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>L0(e)};return r&&tu(e,r),e}function tu(r,t={}){if(t.user&&(!r.ipAddress&&t.user.ip_address&&(r.ipAddress=t.user.ip_address),!r.did&&!t.did&&(r.did=t.user.id||t.user.email||t.user.username)),r.timestamp=t.timestamp||On.timestampInSeconds(),t.ignoreDuration&&(r.ignoreDuration=t.ignoreDuration),t.sid&&(r.sid=t.sid.length===32?t.sid:On.uuid4()),t.init!==void 0&&(r.init=t.init),!r.did&&t.did&&(r.did=`${t.did}`),typeof t.started=="number"&&(r.started=t.started),r.ignoreDuration)r.duration=void 0;else if(typeof t.duration=="number")r.duration=t.duration;else{let e=r.timestamp-r.started;r.duration=e>=0?e:0}t.release&&(r.release=t.release),t.environment&&(r.environment=t.environment),!r.ipAddress&&t.ipAddress&&(r.ipAddress=t.ipAddress),!r.userAgent&&t.userAgent&&(r.userAgent=t.userAgent),typeof t.errors=="number"&&(r.errors=t.errors),t.status&&(r.status=t.status)}function M0(r,t){let e={};t?e={status:t}:r.status==="ok"&&(e={status:"exited"}),tu(r,e)}function L0(r){return On.dropUndefinedKeys({sid:`${r.sid}`,init:r.init,started:new Date(r.started*1e3).toISOString(),timestamp:new Date(r.timestamp*1e3).toISOString(),status:r.status,errors:r.errors,did:typeof r.did=="number"||typeof r.did=="string"?`${r.did}`:void 0,duration:r.duration,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}})}Mn.closeSession=M0;Mn.makeSession=O0;Mn.updateSession=tu});var Rn=_(Aa=>{Object.defineProperty(Aa,"__esModule",{value:!0});var Ut=L(),R0=Ln(),F0=100,su=class r{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ty()}static clone(t){let e=new r;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata},e._propagationContext={...t._propagationContext}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&R0.updateSession(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return e===null?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let e=t(this);return e instanceof r?e:this}return t instanceof r?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):Ut.isPlainObject(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Ty(),this}addBreadcrumb(t,e){let s=typeof e=="number"?e:F0;if(s<=0)return this;let n={timestamp:Ut.dateTimestampInSeconds(),...t},i=this._breadcrumbs;return i.push(n),this._breadcrumbs=i.length>s?i.slice(-s):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let i=this._span.transaction;if(i){t.sdkProcessingMetadata={dynamicSamplingContext:i.getDynamicSamplingContext(),...t.sdkProcessingMetadata};let a=i.name;a&&(t.tags={transaction:a,...t.tags})}}this._applyFingerprint(t);let s=this._getBreadcrumbs(),n=[...t.breadcrumbs||[],...s];return t.breadcrumbs=n.length>0?n:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},this._notifyEventProcessors([...Py(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyEventProcessors(t,e,s,n=0){return new Ut.SyncPromise((i,a)=>{let o=t[n];if(e===null||typeof o!="function")i(e);else{let c=o({...e},s);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&o.id&&c===null&&Ut.logger.log(`Event processor "${o.id}" dropped event`),Ut.isThenable(c)?c.then(l=>this._notifyEventProcessors(t,l,s,n+1).then(i)).then(null,a):this._notifyEventProcessors(t,c,s,n+1).then(i).then(null,a)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Ut.arrayify(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function Py(){return Ut.getGlobalSingleton("globalEventProcessors",()=>[])}function B0(r){Py().push(r)}function Ty(){return{traceId:Ut.uuid4(),spanId:Ut.uuid4().substring(16)}}Aa.Scope=su;Aa.addGlobalEventProcessor=B0});var tt=_(et=>{Object.defineProperty(et,"__esModule",{value:!0});var Ze=L(),j0=Dn(),nu=Rn(),ru=Ln(),Ca=4,U0=100,_r=class{constructor(t,e=new nu.Scope,s=Ca){this._version=s,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){let e=this.getStackTop();e.client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){let t=nu.Scope.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){let e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){let s=this._lastEventId=e&&e.event_id?e.event_id:Ze.uuid4(),n=new Error("Sentry syntheticException");return this._withClient((i,a)=>{i.captureException(t,{originalException:t,syntheticException:n,...e,event_id:s},a)}),s}captureMessage(t,e,s){let n=this._lastEventId=s&&s.event_id?s.event_id:Ze.uuid4(),i=new Error(t);return this._withClient((a,o)=>{a.captureMessage(t,e,{originalException:t,syntheticException:i,...s,event_id:n},o)}),n}captureEvent(t,e){let s=e&&e.event_id?e.event_id:Ze.uuid4();return t.type||(this._lastEventId=s),this._withClient((n,i)=>{n.captureEvent(t,{...e,event_id:s},i)}),s}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){let{scope:s,client:n}=this.getStackTop();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=U0}=n.getOptions&&n.getOptions()||{};if(a<=0)return;let c={timestamp:Ze.dateTimestampInSeconds(),...t},l=i?Ze.consoleSandbox(()=>i(c,e)):c;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,e),s.addBreadcrumb(l,a))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){let{scope:e,client:s}=this.getStackTop();s&&t(e)}run(t){let e=iu(this);try{t(this)}finally{iu(e)}}getIntegration(t){let e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ze.logger.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){let s=this._callExtensionMethod("startTransaction",t,e);if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&!s){let n=this.getClient();console.warn(n?`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
15
- Sentry.addTracingExtensions();
16
- Sentry.init({...});
17
- `:"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return s}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,s=e.getSession();s&&ru.closeSession(s),this._sendSessionUpdate(),e.setSession()}startSession(t){let{scope:e,client:s}=this.getStackTop(),{release:n,environment:i=j0.DEFAULT_ENVIRONMENT}=s&&s.getOptions()||{},{userAgent:a}=Ze.GLOBAL_OBJ.navigator||{},o=ru.makeSession({release:n,environment:i,user:e.getUser(),...a&&{userAgent:a},...t}),c=e.getSession&&e.getSession();return c&&c.status==="ok"&&ru.updateSession(c,{status:"exited"}),this.endSession(),e.setSession(o),o}shouldSendDefaultPii(){let t=this.getClient(),e=t&&t.getOptions();return!!(e&&e.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:e}=this.getStackTop(),s=t.getSession();s&&e&&e.captureSession&&e.captureSession(s)}_withClient(t){let{scope:e,client:s}=this.getStackTop();s&&t(s,e)}_callExtensionMethod(t,...e){let n=ws().__SENTRY__;if(n&&n.extensions&&typeof n.extensions[t]=="function")return n.extensions[t].apply(this,e);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ze.logger.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function ws(){return Ze.GLOBAL_OBJ.__SENTRY__=Ze.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},Ze.GLOBAL_OBJ}function iu(r){let t=ws(),e=Fn(t);return wa(t,r),e}function q0(){let r=ws();if(r.__SENTRY__&&r.__SENTRY__.acs){let t=r.__SENTRY__.acs.getCurrentHub();if(t)return t}return vy(r)}function vy(r=ws()){return(!Ay(r)||Fn(r).isOlderThan(Ca))&&wa(r,new _r),Fn(r)}function G0(r,t=vy()){if(!Ay(r)||Fn(r).isOlderThan(Ca)){let e=t.getStackTop();wa(r,new _r(e.client,nu.Scope.clone(e.scope)))}}function $0(r){let t=ws();t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.acs=r}function H0(r,t={}){let e=ws();return e.__SENTRY__&&e.__SENTRY__.acs?e.__SENTRY__.acs.runWithAsyncContext(r,t):r()}function Ay(r){return!!(r&&r.__SENTRY__&&r.__SENTRY__.hub)}function Fn(r){return Ze.getGlobalSingleton("hub",()=>new _r,r)}function wa(r,t){if(!r)return!1;let e=r.__SENTRY__=r.__SENTRY__||{};return e.hub=t,!0}et.API_VERSION=Ca;et.Hub=_r;et.ensureHubOnCarrier=G0;et.getCurrentHub=q0;et.getHubFromCarrier=Fn;et.getMainCarrier=ws;et.makeMain=iu;et.runWithAsyncContext=H0;et.setAsyncContextStrategy=$0;et.setHubOnCarrier=wa});var Ia=_(au=>{Object.defineProperty(au,"__esModule",{value:!0});var V0=tt();function Y0(r){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=V0.getCurrentHub().getClient(),e=r||t&&t.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}au.hasTracingEnabled=Y0});var Na=_(xr=>{Object.defineProperty(xr,"__esModule",{value:!0});var W0=tt(),ou=L();function z0(r){return(r||W0.getCurrentHub()).getScope().getTransaction()}xr.TRACEPARENT_REGEXP=ou.TRACEPARENT_REGEXP;xr.extractTraceparentData=ou.extractTraceparentData;xr.stripUrlQueryAndFragment=ou.stripUrlQueryAndFragment;xr.getActiveTransaction=z0});var wy=_(uu=>{Object.defineProperty(uu,"__esModule",{value:!0});var cu=L(),J0=Na(),Cy=!1;function K0(){Cy||(Cy=!0,cu.addInstrumentationHandler("error",lu),cu.addInstrumentationHandler("unhandledrejection",lu))}function lu(){let r=J0.getActiveTransaction();if(r){let t="internal_error";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&cu.logger.log(`[Tracing] Transaction: ${t} -> Global error occured`),r.setStatus(t)}}lu.tag="sentry_tracingErrorCallback";uu.registerErrorInstrumentation=K0});var ka=_(Bn=>{Object.defineProperty(Bn,"__esModule",{value:!0});var xt=L(),pu=class{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}},hu=class r{constructor(t={}){this.traceId=t.traceId||xt.uuid4(),this.spanId=t.spanId||xt.uuid4().substring(16),this.startTimestamp=t.startTimestamp||xt.timestampInSeconds(),this.tags=t.tags||{},this.data=t.data||{},this.instrumenter=t.instrumenter||"sentry",this.origin=t.origin||"manual",t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.name&&(this.description=t.name),t.status&&(this.status=t.status),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}get name(){return this.description||""}set name(t){this.setName(t)}startChild(t){let e=new r({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&e.transaction){let s=t&&t.op||"< unknown op >",n=e.transaction.name||"< unknown name >",i=e.transaction.spanId,a=`[Tracing] Starting '${s}' span on transaction '${n}' (${i}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:a},xt.logger.log(a)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);let e=Iy(t);return e!=="unknown_error"&&this.setStatus(e),this}setName(t){this.description=t}isSuccess(){return this.status==="ok"}finish(t){if((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){let{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&xt.logger.log(e.replace("Starting","Finishing"))}this.endTimestamp=typeof t=="number"?t:xt.timestampInSeconds()}toTraceparent(){return xt.generateSentryTraceHeader(this.traceId,this.spanId,this.sampled)}toContext(){return xt.dropUndefinedKeys({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return xt.dropUndefinedKeys({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return xt.dropUndefinedKeys({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}};function Iy(r){if(r<400&&r>=100)return"ok";if(r>=400&&r<500)switch(r){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(r>=500&&r<600)switch(r){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}Bn.Span=hu;Bn.SpanRecorder=pu;Bn.spanStatusfromHttpCode=Iy});var jn=_(du=>{Object.defineProperty(du,"__esModule",{value:!0});var X0=L(),Q0=Dn();function Z0(r,t,e){let s=t.getOptions(),{publicKey:n}=t.getDsn()||{},{segment:i}=e&&e.getUser()||{},a=X0.dropUndefinedKeys({environment:s.environment||Q0.DEFAULT_ENVIRONMENT,release:s.release,user_segment:i,public_key:n,trace_id:r});return t.emit&&t.emit("createDsc",a),a}du.getDynamicSamplingContextFromClient=Z0});var Da=_(mu=>{Object.defineProperty(mu,"__esModule",{value:!0});var Un=L(),Ny=tt(),eA=jn(),ky=ka(),fu=class extends ky.Span{constructor(t,e){super(t),delete this.description,this._measurements={},this._contexts={},this._hub=e||Ny.getCurrentHub(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;let s=this.metadata.dynamicSamplingContext;s&&(this._frozenDynamicSamplingContext={...s})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new ky.SpanRecorder(t)),this.spanRecorder.add(this)}setContext(t,e){e===null?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,s=""){this._measurements[t]={value:e,unit:s}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(this.endTimestamp!==void 0)return;this.name||((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Un.logger.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t);let e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),this.sampled!==!0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Un.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","transaction");return}let s=this.spanRecorder?this.spanRecorder.spans.filter(o=>o!==this&&o.endTimestamp):[];this._trimEnd&&s.length>0&&(this.endTimestamp=s.reduce((o,c)=>o.endTimestamp&&c.endTimestamp?o.endTimestamp>c.endTimestamp?o:c:o).endTimestamp);let n=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:s,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source}}};return Object.keys(this._measurements).length>0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Un.logger.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Un.logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){let t=super.toContext();return Un.dropUndefinedKeys({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;let t=this._hub||Ny.getCurrentHub(),e=t.getClient();if(!e)return{};let s=t.getScope(),n=eA.getDynamicSamplingContextFromClient(this.traceId,e,s),i=this.metadata.sampleRate;i!==void 0&&(n.sample_rate=`${i}`);let a=this.metadata.source;return a&&a!=="url"&&(n.transaction=this.name),this.sampled!==void 0&&(n.sampled=String(this.sampled)),n}setHub(t){this._hub=t}};mu.Transaction=fu});var gu=_(qn=>{Object.defineProperty(qn,"__esModule",{value:!0});var Pe=L(),tA=ka(),sA=Da(),Oa={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},rA="finishReason",Er=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Ma=class extends tA.SpanRecorder{constructor(t,e,s,n){super(n),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=s}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp=typeof e=="number"?e:Pe.timestampInSeconds(),this._popActivity(t.spanId)},t.endTimestamp===void 0&&this._pushActivity(t.spanId)),super.add(t)}},yu=class extends sA.Transaction{constructor(t,e,s=Oa.idleTimeout,n=Oa.finalTimeout,i=Oa.heartbeatInterval,a=!1){super(t,e),this._idleHub=e,this._idleTimeout=s,this._finalTimeout=n,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Er[4],a&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope(o=>o.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Er[3],this.finish())},this._finalTimeout)}finish(t=Pe.timestampInSeconds()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(rA,this._finishReason),this.spanRecorder){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] finishing IdleTransaction",new Date(t*1e3).toISOString(),this.op);for(let e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));let s=e.startTimestamp<t,n=(this._finalTimeout+this._idleTimeout)/1e3,i=e.endTimestamp-this.startTimestamp<n;if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let a=JSON.stringify(e,void 0,2);s?i||Pe.logger.log("[Tracing] discarding Span since it finished after Transaction final timeout",a):Pe.logger.log("[Tracing] discarding Span since it happened after Transaction was finished",a)}return s&&i}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] flushing IdleTransaction")}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] No active IdleTransaction");if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){let e=n=>{this._finished||this._pushActivity(n)},s=n=>{this._finished||this._popActivity(n)};this.spanRecorder=new Ma(e,s,this.spanId,t),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=e===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Er[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Er[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log(`[Tracing] popActivity ${t}`),delete this.activities[t],(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let e=Pe.timestampInSeconds();this._idleTimeoutCanceledPermanently?(this._finishReason=Er[5],this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Er[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Pe.logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};qn.IdleTransaction=yu;qn.IdleTransactionSpanRecorder=Ma;qn.TRACING_DEFAULTS=Oa});var bu=_(La=>{Object.defineProperty(La,"__esModule",{value:!0});var ns=L(),nA=tt(),iA=Ia(),aA=wy(),oA=gu(),cA=Da();function lA(){let t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Dy(r,t,e){if(!iA.hasTracingEnabled(t))return r.sampled=!1,r;if(r.sampled!==void 0)return r.setMetadata({sampleRate:Number(r.sampled)}),r;let s;return typeof t.tracesSampler=="function"?(s=t.tracesSampler(e),r.setMetadata({sampleRate:Number(s)})):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"?(s=t.tracesSampleRate,r.setMetadata({sampleRate:Number(s)})):(s=1,r.setMetadata({sampleRate:s})),uA(s)?s?(r.sampled=Math.random()<s,r.sampled?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.log(`[Tracing] starting ${r.op} transaction - ${r.name}`),r):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),r)):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),r.sampled=!1,r):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."),r.sampled=!1,r)}function uA(r){return ns.isNaN(r)||!(typeof r=="number"||typeof r=="boolean")?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),!1):r<0||r>1?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${r}.`),!1):!0}function pA(r,t){let e=this.getClient(),s=e&&e.getOptions()||{},n=s.instrumenter||"sentry",i=r.instrumenter||"sentry";n!==i&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ns.logger.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${n}\` instrumenter.
18
- The transaction will not be sampled. Please use the ${n} instrumentation to start transactions.`),r.sampled=!1);let a=new cA.Transaction(r,this);return a=Dy(a,s,{parentSampled:r.parentSampled,transactionContext:r,...t}),a.sampled&&a.initSpanRecorder(s._experiments&&s._experiments.maxSpans),e&&e.emit&&e.emit("startTransaction",a),a}function hA(r,t,e,s,n,i,a){let o=r.getClient(),c=o&&o.getOptions()||{},l=new oA.IdleTransaction(t,r,e,s,a,n);return l=Dy(l,c,{parentSampled:t.parentSampled,transactionContext:t,...i}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function dA(){let r=nA.getMainCarrier();r.__SENTRY__&&(r.__SENTRY__.extensions=r.__SENTRY__.extensions||{},r.__SENTRY__.extensions.startTransaction||(r.__SENTRY__.extensions.startTransaction=pA),r.__SENTRY__.extensions.traceHeaders||(r.__SENTRY__.extensions.traceHeaders=lA),aA.registerErrorInstrumentation())}La.addTracingExtensions=dA;La.startIdleTransaction=hA});var Su=_(Gn=>{Object.defineProperty(Gn,"__esModule",{value:!0});Gn.SpanStatus=void 0;(function(r){let t="ok";r.Ok=t;let e="deadline_exceeded";r.DeadlineExceeded=e;let s="unauthenticated";r.Unauthenticated=s;let n="permission_denied";r.PermissionDenied=n;let i="not_found";r.NotFound=i;let a="resource_exhausted";r.ResourceExhausted=a;let o="invalid_argument";r.InvalidArgument=o;let c="unimplemented";r.Unimplemented=c;let l="unavailable";r.Unavailable=l;let u="internal_error";r.InternalError=u;let p="unknown_error";r.UnknownError=p;let h="cancelled";r.Cancelled=h;let d="already_exists";r.AlreadyExists=d;let f="failed_precondition";r.FailedPrecondition=f;let m="aborted";r.Aborted=m;let y="out_of_range";r.OutOfRange=y;let b="data_loss";r.DataLoss=b})(Gn.SpanStatus||(Gn.SpanStatus={}))});var Ry=_(is=>{Object.defineProperty(is,"__esModule",{value:!0});var _u=L(),$n=tt(),Oy=Ia();function fA(r,t,e=()=>{}){let s=Eu(r),n=$n.getCurrentHub(),i=n.getScope(),a=i.getSpan(),o=xu(n,a,s);i.setSpan(o);function c(){o&&o.finish(),n.getScope().setSpan(a)}let l;try{l=t(o)}catch(u){throw o&&o.setStatus("internal_error"),e(u),c(),u}return _u.isThenable(l)?Promise.resolve(l).then(()=>{c()},u=>{o&&o.setStatus("internal_error"),e(u),c()}):c(),l}function My(r,t){let e=Eu(r),s=$n.getCurrentHub(),n=s.getScope(),i=n.getSpan(),a=xu(s,i,e);n.setSpan(a);function o(){a&&a.finish(),s.getScope().setSpan(i)}let c;try{c=t(a)}catch(l){throw a&&a.setStatus("internal_error"),o(),l}return _u.isThenable(c)?Promise.resolve(c).then(()=>{o()},()=>{a&&a.setStatus("internal_error"),o()}):o(),c}var mA=My;function yA(r,t){let e=Eu(r),s=$n.getCurrentHub(),n=s.getScope(),i=n.getSpan(),a=xu(s,i,e);n.setSpan(a);function o(){a&&a.finish(),s.getScope().setSpan(i)}let c;try{c=t(a,o)}catch(l){throw a&&a.setStatus("internal_error"),l}return _u.isThenable(c)&&Promise.resolve(c).then(void 0,()=>{a&&a.setStatus("internal_error")}),c}function gA(r){if(!Oy.hasTracingEnabled())return;let t={...r};t.name!==void 0&&t.description===void 0&&(t.description=t.name);let e=$n.getCurrentHub(),s=Ly();return s?s.startChild(t):e.startTransaction(t)}function Ly(){return $n.getCurrentHub().getScope().getSpan()}function xu(r,t,e){if(Oy.hasTracingEnabled())return t?t.startChild(e):r.startTransaction(e)}function Eu(r){let t={...r};return t.name!==void 0&&t.description===void 0&&(t.description=t.name),t}is.getActiveSpan=Ly;is.startActiveSpan=mA;is.startInactiveSpan=gA;is.startSpan=My;is.startSpanManual=yA;is.trace=fA});var Fy=_(Tu=>{Object.defineProperty(Tu,"__esModule",{value:!0});var bA=Na();function SA(r,t,e){let s=bA.getActiveTransaction();s&&s.setMeasurement(r,t,e)}Tu.setMeasurement=SA});var By=_(de=>{Object.defineProperty(de,"__esModule",{value:!0});var Hn=L(),ve=tt();function _A(r,t){return ve.getCurrentHub().captureException(r,{captureContext:t})}function xA(r,t){let e=typeof t=="string"?t:void 0,s=typeof t!="string"?{captureContext:t}:void 0;return ve.getCurrentHub().captureMessage(r,e,s)}function EA(r,t){return ve.getCurrentHub().captureEvent(r,t)}function TA(r){ve.getCurrentHub().configureScope(r)}function PA(r){ve.getCurrentHub().addBreadcrumb(r)}function vA(r,t){ve.getCurrentHub().setContext(r,t)}function AA(r){ve.getCurrentHub().setExtras(r)}function CA(r,t){ve.getCurrentHub().setExtra(r,t)}function wA(r){ve.getCurrentHub().setTags(r)}function IA(r,t){ve.getCurrentHub().setTag(r,t)}function NA(r){ve.getCurrentHub().setUser(r)}function kA(r){ve.getCurrentHub().withScope(r)}function DA(r,t){return ve.getCurrentHub().startTransaction({...r},t)}function OA(r,t){let e=ve.getCurrentHub(),s=e.getScope(),n=e.getClient();if(!n)(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Hn.logger.warn("Cannot capture check-in. No client defined.");else if(!n.captureCheckIn)(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Hn.logger.warn("Cannot capture check-in. Client does not support sending check-ins.");else return n.captureCheckIn(r,t,s);return Hn.uuid4()}async function MA(r){let t=ve.getCurrentHub().getClient();return t?t.flush(r):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Hn.logger.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function LA(r){let t=ve.getCurrentHub().getClient();return t?t.close(r):((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Hn.logger.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function RA(){return ve.getCurrentHub().lastEventId()}de.addBreadcrumb=PA;de.captureCheckIn=OA;de.captureEvent=EA;de.captureException=_A;de.captureMessage=xA;de.close=LA;de.configureScope=TA;de.flush=MA;de.lastEventId=RA;de.setContext=vA;de.setExtra=CA;de.setExtras=AA;de.setTag=IA;de.setTags=wA;de.setUser=NA;de.startTransaction=DA;de.withScope=kA});var jy=_(vu=>{Object.defineProperty(vu,"__esModule",{value:!0});var FA=L(),BA=tt(),Pu=class{constructor(t,e){this._client=t,this.flushTimeout=60,this._pendingAggregates={},this._isEnabled=!0,this._intervalId=setInterval(()=>this.flush(),this.flushTimeout*1e3),this._sessionAttrs=e}flush(){let t=this.getSessionAggregates();t.aggregates.length!==0&&(this._pendingAggregates={},this._client.sendSession(t))}getSessionAggregates(){let t=Object.keys(this._pendingAggregates).map(s=>this._pendingAggregates[parseInt(s)]),e={attrs:this._sessionAttrs,aggregates:t};return FA.dropUndefinedKeys(e)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;let t=BA.getCurrentHub().getScope(),e=t.getRequestSession();e&&e.status&&(this._incrementSessionStatusCount(e.status,new Date),t.setRequestSession(void 0))}_incrementSessionStatusCount(t,e){let s=new Date(e).setSeconds(0,0);this._pendingAggregates[s]=this._pendingAggregates[s]||{};let n=this._pendingAggregates[s];switch(n.started||(n.started=new Date(s).toISOString()),t){case"errored":return n.errored=(n.errored||0)+1,n.errored;case"ok":return n.exited=(n.exited||0)+1,n.exited;default:return n.crashed=(n.crashed||0)+1,n.crashed}}};vu.SessionFlusher=Pu});var Fa=_(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});var Au=L(),jA="7";function Uy(r){let t=r.protocol?`${r.protocol}:`:"",e=r.port?`:${r.port}`:"";return`${t}//${r.host}${e}${r.path?`/${r.path}`:""}/api/`}function UA(r){return`${Uy(r)}${r.projectId}/envelope/`}function qA(r,t){return Au.urlEncode({sentry_key:r.publicKey,sentry_version:jA,...t&&{sentry_client:`${t.name}/${t.version}`}})}function GA(r,t={}){let e=typeof t=="string"?t:t.tunnel,s=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return e||`${UA(r)}?${qA(r,s)}`}function $A(r,t){let e=Au.makeDsn(r);if(!e)return"";let s=`${Uy(e)}embed/error-page/`,n=`dsn=${Au.dsnToString(e)}`;for(let i in t)if(i!=="dsn")if(i==="user"){let a=t.user;if(!a)continue;a.name&&(n+=`&name=${encodeURIComponent(a.name)}`),a.email&&(n+=`&email=${encodeURIComponent(a.email)}`)}else n+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${s}?${n}`}Ra.getEnvelopeEndpointWithUrlEncodedAuth=GA;Ra.getReportDialogEndpoint=$A});var qy=_(Ba=>{Object.defineProperty(Ba,"__esModule",{value:!0});var Tr=L();function HA(r,t){return t&&(r.sdk=r.sdk||{},r.sdk.name=r.sdk.name||t.name,r.sdk.version=r.sdk.version||t.version,r.sdk.integrations=[...r.sdk.integrations||[],...t.integrations||[]],r.sdk.packages=[...r.sdk.packages||[],...t.packages||[]]),r}function VA(r,t,e,s){let n=Tr.getSdkMetadataForEnvelopeHeader(e),i={sent_at:new Date().toISOString(),...n&&{sdk:n},...!!s&&{dsn:Tr.dsnToString(t)}},a="aggregates"in r?[{type:"sessions"},r]:[{type:"session"},r.toJSON()];return Tr.createEnvelope(i,[a])}function YA(r,t,e,s){let n=Tr.getSdkMetadataForEnvelopeHeader(e),i=r.type&&r.type!=="replay_event"?r.type:"event";HA(r,e&&e.sdk);let a=Tr.createEventEnvelopeHeaders(r,n,s,t);delete r.sdkProcessingMetadata;let o=[{type:i},r];return Tr.createEnvelope(a,[o])}Ba.createEventEnvelope=YA;Ba.createSessionEnvelope=VA});var wu=_(Pr=>{Object.defineProperty(Pr,"__esModule",{value:!0});var Gy=L(),WA=tt(),zA=Rn(),Cu=[];function JA(r){let t={};return r.forEach(e=>{let{name:s}=e,n=t[s];n&&!n.isDefaultInstance&&e.isDefaultInstance||(t[s]=e)}),Object.keys(t).map(e=>t[e])}function KA(r){let t=r.defaultIntegrations||[],e=r.integrations;t.forEach(a=>{a.isDefaultInstance=!0});let s;Array.isArray(e)?s=[...t,...e]:typeof e=="function"?s=Gy.arrayify(e(t)):s=t;let n=JA(s),i=QA(n,a=>a.name==="Debug");if(i!==-1){let[a]=n.splice(i,1);n.push(a)}return n}function XA(r,t){let e={};return t.forEach(s=>{s&&$y(r,s,e)}),e}function $y(r,t,e){if(e[t.name]=t,Cu.indexOf(t.name)===-1&&(t.setupOnce(zA.addGlobalEventProcessor,WA.getCurrentHub),Cu.push(t.name)),r.on&&typeof t.preprocessEvent=="function"){let s=t.preprocessEvent.bind(t);r.on("preprocessEvent",(n,i)=>s(n,i,r))}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Gy.logger.log(`Integration installed: ${t.name}`)}function QA(r,t){for(let e=0;e<r.length;e++)if(t(r[e])===!0)return e;return-1}Pr.getIntegrationsToSetup=KA;Pr.installedIntegrations=Cu;Pr.setupIntegration=$y;Pr.setupIntegrations=XA});var Iu=_(Vn=>{Object.defineProperty(Vn,"__esModule",{value:!0});var Ge=L(),ZA=Dn(),eC=Rn();function tC(r,t,e,s){let{normalizeDepth:n=3,normalizeMaxBreadth:i=1e3}=r,a={...t,event_id:t.event_id||e.event_id||Ge.uuid4(),timestamp:t.timestamp||Ge.dateTimestampInSeconds()},o=e.integrations||r.integrations.map(u=>u.name);sC(a,r),rC(a,o),t.type===void 0&&Vy(a,r.stackParser);let c=s;e.captureContext&&(c=eC.Scope.clone(c).update(e.captureContext));let l=Ge.resolvedSyncPromise(a);if(c){if(c.getAttachments){let u=[...e.attachments||[],...c.getAttachments()];u.length&&(e.attachments=u)}l=c.applyToEvent(a,e)}return l.then(u=>(u&&Yy(u),typeof n=="number"&&n>0?nC(u,n,i):u))}function sC(r,t){let{environment:e,release:s,dist:n,maxValueLength:i=250}=t;"environment"in r||(r.environment="environment"in t?e:ZA.DEFAULT_ENVIRONMENT),r.release===void 0&&s!==void 0&&(r.release=s),r.dist===void 0&&n!==void 0&&(r.dist=n),r.message&&(r.message=Ge.truncate(r.message,i));let a=r.exception&&r.exception.values&&r.exception.values[0];a&&a.value&&(a.value=Ge.truncate(a.value,i));let o=r.request;o&&o.url&&(o.url=Ge.truncate(o.url,i))}var Hy=new WeakMap;function Vy(r,t){let e=Ge.GLOBAL_OBJ._sentryDebugIds;if(!e)return;let s,n=Hy.get(t);n?s=n:(s=new Map,Hy.set(t,s));let i=Object.keys(e).reduce((a,o)=>{let c,l=s.get(o);l?c=l:(c=t(o),s.set(o,c));for(let u=c.length-1;u>=0;u--){let p=c[u];if(p.filename){a[p.filename]=e[o];break}}return a},{});try{r.exception.values.forEach(a=>{a.stacktrace.frames.forEach(o=>{o.filename&&(o.debug_id=i[o.filename])})})}catch{}}function Yy(r){let t={};try{r.exception.values.forEach(s=>{s.stacktrace.frames.forEach(n=>{n.debug_id&&(n.abs_path?t[n.abs_path]=n.debug_id:n.filename&&(t[n.filename]=n.debug_id),delete n.debug_id)})})}catch{}if(Object.keys(t).length===0)return;r.debug_meta=r.debug_meta||{},r.debug_meta.images=r.debug_meta.images||[];let e=r.debug_meta.images;Object.keys(t).forEach(s=>{e.push({type:"sourcemap",code_file:s,debug_id:t[s]})})}function rC(r,t){t.length>0&&(r.sdk=r.sdk||{},r.sdk.integrations=[...r.sdk.integrations||[],...t])}function nC(r,t,e){if(!r)return null;let s={...r,...r.breadcrumbs&&{breadcrumbs:r.breadcrumbs.map(n=>({...n,...n.data&&{data:Ge.normalize(n.data,t,e)}}))},...r.user&&{user:Ge.normalize(r.user,t,e)},...r.contexts&&{contexts:Ge.normalize(r.contexts,t,e)},...r.extra&&{extra:Ge.normalize(r.extra,t,e)}};return r.contexts&&r.contexts.trace&&s.contexts&&(s.contexts.trace=r.contexts.trace,r.contexts.trace.data&&(s.contexts.trace.data=Ge.normalize(r.contexts.trace.data,t,e))),r.spans&&(s.spans=r.spans.map(n=>(n.data&&(n.data=Ge.normalize(n.data,t,e)),n))),s}Vn.applyDebugIds=Vy;Vn.applyDebugMeta=Yy;Vn.prepareEvent=tC});var Du=_(ku=>{Object.defineProperty(ku,"__esModule",{value:!0});var Y=L(),iC=Fa(),Wy=qy(),zy=wu(),Jy=Ln(),aC=jn(),oC=Iu(),Ky="Not capturing exception because it's already been captured.",Nu=class{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},t.dsn?this._dsn=Y.makeDsn(t.dsn):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.warn("No DSN provided, client will not do anything."),this._dsn){let e=iC.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,s){if(Y.checkOrSetAlreadyCaught(t)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.log(Ky);return}let n=e&&e.event_id;return this._process(this.eventFromException(t,e).then(i=>this._captureEvent(i,e,s)).then(i=>{n=i})),n}captureMessage(t,e,s,n){let i=s&&s.event_id,a=Y.isPrimitive(t)?this.eventFromMessage(String(t),e,s):this.eventFromException(t,s);return this._process(a.then(o=>this._captureEvent(o,s,n)).then(o=>{i=o})),i}captureEvent(t,e,s){if(e&&e.originalException&&Y.checkOrSetAlreadyCaught(e.originalException)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.log(Ky);return}let n=e&&e.event_id;return this._process(this._captureEvent(t,e,s).then(i=>{n=i})),n}captureSession(t){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.warn("SDK not enabled, will not capture session.");return}typeof t.release!="string"?(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Jy.updateSession(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let e=this._transport;return e?this._isClientDoneProcessing(t).then(s=>e.flush(t).then(n=>s&&n)):Y.resolvedSyncPromise(!0)}close(t){return this.flush(t).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=zy.setupIntegrations(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){zy.setupIntegration(this,t,this._integrations)}sendEvent(t,e={}){if(this.emit("beforeSendEvent",t,e),this._dsn){let s=Wy.createEventEnvelope(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of e.attachments||[])s=Y.addItemToEnvelope(s,Y.createAttachmentEnvelopeItem(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));let n=this._sendEnvelope(s);n&&n.then(i=>this.emit("afterSendEvent",t,i),null)}}sendSession(t){if(this._dsn){let e=Wy.createSessionEnvelope(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,s){if(this._options.sendClientReports){let n=`${t}:${e}`;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(s=>s(...e))}_updateSessionFromEvent(t,e){let s=!1,n=!1,i=e.exception&&e.exception.values;if(i){n=!0;for(let c of i){let l=c.mechanism;if(l&&l.handled===!1){s=!0;break}}}let a=t.status==="ok";(a&&t.errors===0||a&&s)&&(Jy.updateSession(t,{...s&&{status:"crashed"},errors:t.errors||Number(n||s)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Y.SyncPromise(e=>{let s=0,n=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),e(!0)):(s+=n,t&&s>=t&&(clearInterval(i),e(!1)))},n)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(t,e,s){let n=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),this.emit("preprocessEvent",t,e),oC.prepareEvent(n,t,e,s).then(a=>{if(a===null)return a;let{propagationContext:o}=a.sdkProcessingMetadata||{};if(!(a.contexts&&a.contexts.trace)&&o){let{traceId:l,spanId:u,parentSpanId:p,dsc:h}=o;a.contexts={trace:{trace_id:l,span_id:u,parent_span_id:p},...a.contexts};let d=h||aC.getDynamicSamplingContextFromClient(l,this,s);a.sdkProcessingMetadata={dynamicSamplingContext:d,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,e={},s){return this._processEvent(t,e,s).then(n=>n.event_id,n=>{if(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__){let i=n;i.logLevel==="log"?Y.logger.log(i.message):Y.logger.warn(i)}})}_processEvent(t,e,s){let n=this.getOptions(),{sampleRate:i}=n;if(!this._isEnabled())return Y.rejectedSyncPromise(new Y.SentryError("SDK not enabled, will not capture event.","log"));let a=Qy(t),o=Xy(t),c=t.type||"error",l=`before send for type \`${c}\``;if(o&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Y.rejectedSyncPromise(new Y.SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let u=c==="replay_event"?"replay":c;return this._prepareEvent(t,e,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",u,t),new Y.SentryError("An event processor returned `null`, will not send event.","log");if(e.data&&e.data.__sentry__===!0)return p;let d=lC(n,p,e);return cC(d,l)}).then(p=>{if(p===null)throw this.recordDroppedEvent("before_send",u,t),new Y.SentryError(`${l} returned \`null\`, will not send event.`,"log");let h=s&&s.getSession();!a&&h&&this._updateSessionFromEvent(h,p);let d=p.transaction_info;if(a&&d&&p.transaction!==t.transaction){let f="custom";p.transaction_info={...d,source:f}}return this.sendEvent(p,e),p}).then(null,p=>{throw p instanceof Y.SentryError?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Y.SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
19
- Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,e=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.error("Error while sending event:",e)});(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Y.logger.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{let[s,n]=e.split(":");return{reason:s,category:n,quantity:t[e]}})}};function cC(r,t){let e=`${t} must return \`null\` or a valid event.`;if(Y.isThenable(r))return r.then(s=>{if(!Y.isPlainObject(s)&&s!==null)throw new Y.SentryError(e);return s},s=>{throw new Y.SentryError(`${t} rejected with ${s}`)});if(!Y.isPlainObject(r)&&r!==null)throw new Y.SentryError(e);return r}function lC(r,t,e){let{beforeSend:s,beforeSendTransaction:n}=r;return Xy(t)&&s?s(t,e):Qy(t)&&n?n(t,e):t}function Xy(r){return r.type===void 0}function Qy(r){return r.type==="transaction"}ku.BaseClient=Nu});var Lu=_(Mu=>{Object.defineProperty(Mu,"__esModule",{value:!0});var Ou=L();function uC(r,t,e,s,n){let i={sent_at:new Date().toISOString()};e&&e.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),s&&n&&(i.dsn=Ou.dsnToString(n)),t&&(i.trace=Ou.dropUndefinedKeys(t));let a=pC(r);return Ou.createEnvelope(i,[a])}function pC(r){return[{type:"check_in"},r]}Mu.createCheckInEnvelope=uC});var Zy=_(Fu=>{Object.defineProperty(Fu,"__esModule",{value:!0});var Yn=L(),hC=Du(),dC=Lu(),fC=tt(),mC=bu(),yC=jn();Su();var Ru=class extends hC.BaseClient{constructor(t){mC.addTracingExtensions(),super(t)}eventFromException(t,e){return Promise.resolve(Yn.eventFromUnknownInput(fC.getCurrentHub,this._options.stackParser,t,e))}eventFromMessage(t,e="info",s){return Promise.resolve(Yn.eventFromMessage(this._options.stackParser,t,e,s,this._options.attachStacktrace))}captureCheckIn(t,e,s){let n=t.status!=="in_progress"&&t.checkInId?t.checkInId:Yn.uuid4();if(!this._isEnabled())return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Yn.logger.warn("SDK not enabled, will not capture checkin."),n;let i=this.getOptions(),{release:a,environment:o,tunnel:c}=i,l={check_in_id:n,monitor_slug:t.monitorSlug,status:t.status,release:a,environment:o};t.status!=="in_progress"&&(l.duration=t.duration),e&&(l.monitor_config={schedule:e.schedule,checkin_margin:e.checkinMargin,max_runtime:e.maxRuntime,timezone:e.timezone});let[u,p]=this._getTraceInfoFromScope(s);p&&(l.contexts={trace:p});let h=dC.createCheckInEnvelope(l,u,this.getSdkMetadata(),c,this.getDsn());return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Yn.logger.info("Sending checkin:",t.monitorSlug,t.status),this._sendEnvelope(h),n}_prepareEvent(t,e,s){return this._options.platform&&(t.platform=t.platform||this._options.platform),this._options.runtime&&(t.contexts={...t.contexts,runtime:(t.contexts||{}).runtime||this._options.runtime}),this._options.serverName&&(t.server_name=t.server_name||this._options.serverName),super._prepareEvent(t,e,s)}_getTraceInfoFromScope(t){if(!t)return[void 0,void 0];let e=t.getSpan();if(e)return[e.transaction?e.transaction.getDynamicSamplingContext():void 0,e.getTraceContext()];let{traceId:s,spanId:n,parentSpanId:i,dsc:a}=t.getPropagationContext(),o={trace_id:s,span_id:n,parent_span_id:i};return a?[a,o]:[yC.getDynamicSamplingContextFromClient(s,this,t),o]}};Fu.ServerRuntimeClient=Ru});var eg=_(Bu=>{Object.defineProperty(Bu,"__esModule",{value:!0});var gC=L(),bC=tt();function SC(r,t){t.debug===!0&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__?gC.logger.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));let e=bC.getCurrentHub();e.getScope().update(t.initialScope);let n=new r(t);e.bindClient(n)}Bu.initAndBind=SC});var rg=_(ja=>{Object.defineProperty(ja,"__esModule",{value:!0});var Be=L(),sg=30;function _C(r,t,e=Be.makePromiseBuffer(r.bufferSize||sg)){let s={},n=a=>e.drain(a);function i(a){let o=[];if(Be.forEachEnvelopeItem(a,(p,h)=>{let d=Be.envelopeItemTypeToDataCategory(h);if(Be.isRateLimited(s,d)){let f=tg(p,h);r.recordDroppedEvent("ratelimit_backoff",d,f)}else o.push(p)}),o.length===0)return Be.resolvedSyncPromise();let c=Be.createEnvelope(a[0],o),l=p=>{Be.forEachEnvelopeItem(c,(h,d)=>{let f=tg(h,d);r.recordDroppedEvent(p,Be.envelopeItemTypeToDataCategory(d),f)})},u=()=>t({body:Be.serializeEnvelope(c,r.textEncoder)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Be.logger.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),s=Be.updateRateLimits(s,p),p),p=>{throw l("network_error"),p});return e.add(u).then(p=>p,p=>{if(p instanceof Be.SentryError)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Be.logger.error("Skipped sending event because buffer is full."),l("queue_overflow"),Be.resolvedSyncPromise();throw p})}return i.__sentry__baseTransport__=!0,{send:i,flush:n}}function tg(r,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(r)?r[1]:void 0}ja.DEFAULT_TRANSPORT_BUFFER_SIZE=sg;ja.createTransport=_C});var ig=_(Wn=>{Object.defineProperty(Wn,"__esModule",{value:!0});var Uu=L(),ng=100,qu=5e3,xC=36e5;function ju(r,t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Uu.logger.info(`[Offline]: ${r}`,t)}function EC(r){return t=>{let e=r(t),s=t.createStore?t.createStore(t):void 0,n=qu,i;function a(u,p,h){return Uu.envelopeContainsItemType(u,["replay_event","replay_recording","client_report"])?!1:t.shouldStore?t.shouldStore(u,p,h):!0}function o(u){s&&(i&&clearTimeout(i),i=setTimeout(async()=>{i=void 0;let p=await s.pop();p&&(ju("Attempting to send previously queued event"),l(p).catch(h=>{ju("Failed to retry sending",h)}))},u),typeof i!="number"&&i.unref&&i.unref())}function c(){i||(o(n),n=Math.min(n*2,xC))}async function l(u){try{let p=await e.send(u),h=ng;if(p){if(p.headers&&p.headers["retry-after"])h=Uu.parseRetryAfterHeader(p.headers["retry-after"]);else if((p.statusCode||0)>=400)return p}return o(h),n=qu,p}catch(p){if(s&&await a(u,p,n))return await s.insert(u),c(),ju("Error sending. Event queued",p),{};throw p}}return t.flushAtStartup&&c(),{send:l,flush:u=>e.flush(u)}}}Wn.MIN_DELAY=ng;Wn.START_DELAY=qu;Wn.makeOfflineTransport=EC});var og=_(Ua=>{Object.defineProperty(Ua,"__esModule",{value:!0});var ag=L(),TC=Fa();function Gu(r,t){let e;return ag.forEachEnvelopeItem(r,(s,n)=>(t.includes(n)&&(e=Array.isArray(s)?s[1]:void 0),!!e)),e}function PC(r,t){return e=>{let s=r(e);return{send:async n=>{let i=Gu(n,["event","transaction","profile","replay_event"]);return i&&(i.release=t),s.send(n)},flush:n=>s.flush(n)}}}function vC(r,t){return e=>{let s=r(e),n={};function i(c,l){let u=l?`${c}:${l}`:c;if(!n[u]){let p=ag.dsnFromString(c);if(!p)return;let h=TC.getEnvelopeEndpointWithUrlEncodedAuth(p);n[u]=l?PC(r,l)({...e,url:h}):r({...e,url:h})}return n[u]}async function a(c){function l(h){let d=h&&h.length?h:["event"];return Gu(c,d)}let u=t({envelope:c,getEvent:l}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h);return u.length===0&&u.push(s),(await Promise.all(u.map(h=>h.send(c))))[0]}async function o(c){let l=[...Object.keys(n).map(p=>n[p]),s];return(await Promise.all(l.map(p=>p.flush(c)))).every(p=>p)}return{send:a,flush:o}}}Ua.eventFromEnvelope=Gu;Ua.makeMultiplexedTransport=vC});var cg=_($u=>{Object.defineProperty($u,"__esModule",{value:!0});var AC="7.69.0";$u.SDK_VERSION=AC});var Vu=_(Hu=>{Object.defineProperty(Hu,"__esModule",{value:!0});var CC=L(),lg,qa=class r{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=r.id}setupOnce(){lg=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=CC.getOriginalFunction(this)||this;return lg.apply(e,t)}}catch{}}};qa.__initStatic();Hu.FunctionToString=qa});var Yu=_(zn=>{Object.defineProperty(zn,"__esModule",{value:!0});var be=L(),wC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],IC=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/],Ga=class r{static __initStatic(){this.id="InboundFilters"}constructor(t={}){this.name=r.id,this._options=t}setupOnce(t,e){let s=n=>{let i=e();if(i){let a=i.getIntegration(r);if(a){let o=i.getClient(),c=o?o.getOptions():{},l=ug(a._options,c);return pg(n,l)?null:n}}return n};s.id=this.name,t(s)}};Ga.__initStatic();function ug(r={},t={}){return{allowUrls:[...r.allowUrls||[],...t.allowUrls||[]],denyUrls:[...r.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...r.ignoreErrors||[],...t.ignoreErrors||[],...r.disableErrorDefaults?[]:wC],ignoreTransactions:[...r.ignoreTransactions||[],...t.ignoreTransactions||[],...r.disableTransactionDefaults?[]:IC],ignoreInternal:r.ignoreInternal!==void 0?r.ignoreInternal:!0}}function pg(r,t){return t.ignoreInternal&&LC(r)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&be.logger.warn(`Event dropped due to being internal Sentry Error.
20
- Event: ${be.getEventDescription(r)}`),!0):NC(r,t.ignoreErrors)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&be.logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
21
- Event: ${be.getEventDescription(r)}`),!0):kC(r,t.ignoreTransactions)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&be.logger.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
22
- Event: ${be.getEventDescription(r)}`),!0):DC(r,t.denyUrls)?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&be.logger.warn(`Event dropped due to being matched by \`denyUrls\` option.
23
- Event: ${be.getEventDescription(r)}.
24
- Url: ${$a(r)}`),!0):OC(r,t.allowUrls)?!1:((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&be.logger.warn(`Event dropped due to not being matched by \`allowUrls\` option.
25
- Event: ${be.getEventDescription(r)}.
26
- Url: ${$a(r)}`),!0)}function NC(r,t){return r.type||!t||!t.length?!1:MC(r).some(e=>be.stringMatchesSomePattern(e,t))}function kC(r,t){if(r.type!=="transaction"||!t||!t.length)return!1;let e=r.transaction;return e?be.stringMatchesSomePattern(e,t):!1}function DC(r,t){if(!t||!t.length)return!1;let e=$a(r);return e?be.stringMatchesSomePattern(e,t):!1}function OC(r,t){if(!t||!t.length)return!0;let e=$a(r);return e?be.stringMatchesSomePattern(e,t):!0}function MC(r){let t=[];r.message&&t.push(r.message);let e;try{e=r.exception.values[r.exception.values.length-1]}catch{}return e&&e.value&&(t.push(e.value),e.type&&t.push(`${e.type}: ${e.value}`)),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&t.length===0&&be.logger.error(`Could not extract message for event ${be.getEventDescription(r)}`),t}function LC(r){try{return r.exception.values[0].type==="SentryError"}catch{}return!1}function RC(r=[]){for(let t=r.length-1;t>=0;t--){let e=r[t];if(e&&e.filename!=="<anonymous>"&&e.filename!=="[native code]")return e.filename||null}return null}function $a(r){try{let t;try{t=r.exception.values[0].stacktrace.frames}catch{}return t?RC(t):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&be.logger.error(`Cannot extract url for event ${be.getEventDescription(r)}`),null}}zn.InboundFilters=Ga;zn._mergeOptions=ug;zn._shouldDropEvent=pg});var hg=_(Ha=>{Object.defineProperty(Ha,"__esModule",{value:!0});var FC=Vu(),BC=Yu();Ha.FunctionToString=FC.FunctionToString;Ha.InboundFilters=BC.InboundFilters});var yg=_(Jn=>{Object.defineProperty(Jn,"__esModule",{value:!0});var Wu=L(),fg=new Map,dg=new Set;function jC(r){if(Wu.GLOBAL_OBJ._sentryModuleMetadata)for(let t of Object.keys(Wu.GLOBAL_OBJ._sentryModuleMetadata)){let e=Wu.GLOBAL_OBJ._sentryModuleMetadata[t];if(dg.has(t))continue;dg.add(t);let s=r(t);for(let n of s.reverse())if(n.filename){fg.set(n.filename,e);break}}}function mg(r,t){return jC(r),fg.get(t)}function UC(r,t){try{t.exception.values.forEach(e=>{if(e.stacktrace)for(let s of e.stacktrace.frames||[]){if(!s.filename)continue;let n=mg(r,s.filename);n&&(s.module_metadata=n)}})}catch{}}function qC(r){try{r.exception.values.forEach(t=>{if(t.stacktrace)for(let e of t.stacktrace.frames||[])delete e.module_metadata})}catch{}}Jn.addMetadataToStackFrames=UC;Jn.getMetadataForUrl=mg;Jn.stripMetadataFromStackFrames=qC});var bg=_(zu=>{Object.defineProperty(zu,"__esModule",{value:!0});var GC=L(),gg=yg(),Va=class r{static __initStatic(){this.id="ModuleMetadata"}constructor(){this.name=r.id}setupOnce(t,e){let s=e().getClient();if(!s||typeof s.on!="function")return;s.on("beforeEnvelope",i=>{GC.forEachEnvelopeItem(i,(a,o)=>{if(o==="event"){let c=Array.isArray(a)?a[1]:void 0;c&&(gg.stripMetadataFromStackFrames(c),a[1]=c)}})});let n=s.getOptions().stackParser;t(i=>(gg.addMetadataToStackFrames(n,i),i))}};Va.__initStatic();zu.ModuleMetadata=Va});var ne=_(D=>{Object.defineProperty(D,"__esModule",{value:!0});var Sg=bu(),_g=gu(),xg=ka(),$C=Da(),HC=Na(),VC=Su(),vr=Ry(),YC=jn(),WC=Fy(),Ae=By(),qt=tt(),Ju=Ln(),zC=jy(),Eg=Rn(),Tg=Fa(),JC=Du(),KC=Zy(),XC=eg(),QC=rg(),ZC=ig(),ew=og(),tw=cg(),sw=wu(),rw=hg(),nw=Iu(),iw=Lu(),aw=Ia(),ow=Dn(),cw=bg(),lw=Vu(),uw=Yu(),pw=L();D.addTracingExtensions=Sg.addTracingExtensions;D.startIdleTransaction=Sg.startIdleTransaction;D.IdleTransaction=_g.IdleTransaction;D.TRACING_DEFAULTS=_g.TRACING_DEFAULTS;D.Span=xg.Span;D.spanStatusfromHttpCode=xg.spanStatusfromHttpCode;D.Transaction=$C.Transaction;D.getActiveTransaction=HC.getActiveTransaction;Object.defineProperty(D,"SpanStatus",{enumerable:!0,get:()=>VC.SpanStatus});D.getActiveSpan=vr.getActiveSpan;D.startActiveSpan=vr.startActiveSpan;D.startInactiveSpan=vr.startInactiveSpan;D.startSpan=vr.startSpan;D.startSpanManual=vr.startSpanManual;D.trace=vr.trace;D.getDynamicSamplingContextFromClient=YC.getDynamicSamplingContextFromClient;D.setMeasurement=WC.setMeasurement;D.addBreadcrumb=Ae.addBreadcrumb;D.captureCheckIn=Ae.captureCheckIn;D.captureEvent=Ae.captureEvent;D.captureException=Ae.captureException;D.captureMessage=Ae.captureMessage;D.close=Ae.close;D.configureScope=Ae.configureScope;D.flush=Ae.flush;D.lastEventId=Ae.lastEventId;D.setContext=Ae.setContext;D.setExtra=Ae.setExtra;D.setExtras=Ae.setExtras;D.setTag=Ae.setTag;D.setTags=Ae.setTags;D.setUser=Ae.setUser;D.startTransaction=Ae.startTransaction;D.withScope=Ae.withScope;D.Hub=qt.Hub;D.ensureHubOnCarrier=qt.ensureHubOnCarrier;D.getCurrentHub=qt.getCurrentHub;D.getHubFromCarrier=qt.getHubFromCarrier;D.getMainCarrier=qt.getMainCarrier;D.makeMain=qt.makeMain;D.runWithAsyncContext=qt.runWithAsyncContext;D.setAsyncContextStrategy=qt.setAsyncContextStrategy;D.setHubOnCarrier=qt.setHubOnCarrier;D.closeSession=Ju.closeSession;D.makeSession=Ju.makeSession;D.updateSession=Ju.updateSession;D.SessionFlusher=zC.SessionFlusher;D.Scope=Eg.Scope;D.addGlobalEventProcessor=Eg.addGlobalEventProcessor;D.getEnvelopeEndpointWithUrlEncodedAuth=Tg.getEnvelopeEndpointWithUrlEncodedAuth;D.getReportDialogEndpoint=Tg.getReportDialogEndpoint;D.BaseClient=JC.BaseClient;D.ServerRuntimeClient=KC.ServerRuntimeClient;D.initAndBind=XC.initAndBind;D.createTransport=QC.createTransport;D.makeOfflineTransport=ZC.makeOfflineTransport;D.makeMultiplexedTransport=ew.makeMultiplexedTransport;D.SDK_VERSION=tw.SDK_VERSION;D.getIntegrationsToSetup=sw.getIntegrationsToSetup;D.Integrations=rw;D.prepareEvent=nw.prepareEvent;D.createCheckInEnvelope=iw.createCheckInEnvelope;D.hasTracingEnabled=aw.hasTracingEnabled;D.DEFAULT_ENVIRONMENT=ow.DEFAULT_ENVIRONMENT;D.ModuleMetadata=cw.ModuleMetadata;D.FunctionToString=lw.FunctionToString;D.InboundFilters=uw.InboundFilters;D.extractTraceparentData=pw.extractTraceparentData});var Xu=_(Ku=>{Object.defineProperty(Ku,"__esModule",{value:!0});function hw(r,t){return r??t()}Ku._nullishCoalesce=hw});var Pg=_(Qu=>{Object.defineProperty(Qu,"__esModule",{value:!0});var dw=Xu();async function fw(r,t){return dw._nullishCoalesce(r,t)}Qu._asyncNullishCoalesce=fw});var ep=_(Zu=>{Object.defineProperty(Zu,"__esModule",{value:!0});async function mw(r){let t,e=r[0],s=1;for(;s<r.length;){let n=r[s],i=r[s+1];if(s+=2,(n==="optionalAccess"||n==="optionalCall")&&e==null)return;n==="access"||n==="optionalAccess"?(t=e,e=await i(e)):(n==="call"||n==="optionalCall")&&(e=await i((...a)=>e.call(t,...a)),t=void 0)}return e}Zu._asyncOptionalChain=mw});var vg=_(tp=>{Object.defineProperty(tp,"__esModule",{value:!0});var yw=ep();async function gw(r){let t=await yw._asyncOptionalChain(r);return t??!0}tp._asyncOptionalChainDelete=gw});var rp=_(sp=>{Object.defineProperty(sp,"__esModule",{value:!0});function bw(r){let t,e=r[0],s=1;for(;s<r.length;){let n=r[s],i=r[s+1];if(s+=2,(n==="optionalAccess"||n==="optionalCall")&&e==null)return;n==="access"||n==="optionalAccess"?(t=e,e=i(e)):(n==="call"||n==="optionalCall")&&(e=i((...a)=>e.call(t,...a)),t=void 0)}return e}sp._optionalChain=bw});var Ag=_(np=>{Object.defineProperty(np,"__esModule",{value:!0});var Sw=rp();function _w(r){let t=Sw._optionalChain(r);return t??!0}np._optionalChainDelete=_w});var ue=_(as=>{Object.defineProperty(as,"__esModule",{value:!0});var xw=Pg(),Ew=ep(),Tw=vg(),Pw=Xu(),vw=rp(),Aw=Ag();as._asyncNullishCoalesce=xw._asyncNullishCoalesce;as._asyncOptionalChain=Ew._asyncOptionalChain;as._asyncOptionalChainDelete=Tw._asyncOptionalChainDelete;as._nullishCoalesce=Pw._nullishCoalesce;as._optionalChain=vw._optionalChain;as._optionalChainDelete=Aw._optionalChainDelete});var os=_(ip=>{var{_optionalChain:Cg}=ue();Object.defineProperty(ip,"__esModule",{value:!0});function Cw(r){let t=Cg([r,"call",s=>s(),"access",s=>s.getClient,"call",s=>s(),"optionalAccess",s=>s.getOptions,"call",s=>s()]);return(Cg([t,"optionalAccess",s=>s.instrumenter])||"sentry")!=="sentry"}ip.shouldDisableAutoInstrumentation=Cw});var Ig=_(ap=>{var{_optionalChain:Kn}=ue();Object.defineProperty(ap,"__esModule",{value:!0});var pt=L(),ww=os(),Ya=class r{static __initStatic(){this.id="Express"}constructor(t={}){this.name=r.id,this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){if(!this._router){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&pt.logger.error("ExpressIntegration is missing an Express instance");return}if(ww.shouldDisableAutoInstrumentation(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&pt.logger.log("Express Integration is skipped because of instrumenter configuration.");return}kw(this._router,this._methods),Dw(this._router)}};Ya.__initStatic();function wg(r,t){let e=r.length;switch(e){case 2:return function(s,n){let i=n.__sentry_transaction;if(i){let a=i.startChild({description:r.name,op:`middleware.express.${t}`,origin:"auto.middleware.express"});n.once("finish",()=>{a.finish()})}return r.call(this,s,n)};case 3:return function(s,n,i){let a=n.__sentry_transaction,o=Kn([a,"optionalAccess",c=>c.startChild,"call",c=>c({description:r.name,op:`middleware.express.${t}`,origin:"auto.middleware.express"})]);r.call(this,s,n,function(...c){Kn([o,"optionalAccess",l=>l.finish,"call",l=>l()]),i.call(this,...c)})};case 4:return function(s,n,i,a){let o=i.__sentry_transaction,c=Kn([o,"optionalAccess",l=>l.startChild,"call",l=>l({description:r.name,op:`middleware.express.${t}`,origin:"auto.middleware.express"})]);r.call(this,s,n,i,function(...l){Kn([c,"optionalAccess",u=>u.finish,"call",u=>u()]),a.call(this,...l)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${e}`)}}function Iw(r,t){return r.map(e=>typeof e=="function"?wg(e,t):Array.isArray(e)?e.map(s=>typeof s=="function"?wg(s,t):s):e)}function Nw(r,t){let e=r[t];return r[t]=function(...s){return e.call(this,...Iw(s,t))},r}function kw(r,t=[]){t.forEach(e=>Nw(r,e))}function Dw(r){let t="settings"in r;t&&r._router===void 0&&r.lazyrouter&&r.lazyrouter();let e=t?r._router:r;if(!e){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&pt.logger.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&pt.logger.debug("Routing instrumentation is currently only supported in Express 4.");return}let s=Object.getPrototypeOf(e),n=s.process_params;s.process_params=function(a,o,c,l,u){c._reconstructedRoute||(c._reconstructedRoute="");let{layerRoutePath:p,isRegex:h,isArray:d,numExtraSegments:f}=Ow(a);(p||h||d)&&(c._hasParameters=!0);let y=(p||a.path||"").split("/").filter(N=>N.length>0&&(h||d||!N.includes("*"))).join("/");y&&y.length>0&&(c._reconstructedRoute+=`/${y}${h?"/":""}`);let b=pt.getNumberOfUrlSegments(c.originalUrl||"")+f,x=pt.getNumberOfUrlSegments(c._reconstructedRoute);if(b===x){c._hasParameters||c._reconstructedRoute!==c.originalUrl&&(c._reconstructedRoute=c.originalUrl?pt.stripUrlQueryAndFragment(c.originalUrl):c.originalUrl);let N=l.__sentry_transaction;if(N&&N.metadata.source!=="custom"){let T=c._reconstructedRoute||"/";N.setName(...pt.extractPathForTransaction(c,{path:!0,method:!0,customRoute:T}))}}return n.call(this,a,o,c,l,u)}}function Ow(r){let t=Kn([r,"access",a=>a.route,"optionalAccess",a=>a.path]),e=pt.isRegExp(t),s=Array.isArray(t);if(!t)return{isRegex:e,isArray:s,numExtraSegments:0};let n=s?Math.max(Mw(t)-pt.getNumberOfUrlSegments(r.path||""),0):0;return{layerRoutePath:Lw(s,t),isRegex:e,isArray:s,numExtraSegments:n}}function Mw(r){return r.reduce((t,e)=>t+pt.getNumberOfUrlSegments(e.toString()),0)}function Lw(r,t){return r?t.map(e=>e.toString()).join(","):t&&t.toString()}ap.Express=Ya});var Ng=_(op=>{var{_optionalChain:Ar}=ue();Object.defineProperty(op,"__esModule",{value:!0});var Cr=L(),Rw=os(),Wa=class r{static __initStatic(){this.id="Postgres"}constructor(t={}){this.name=r.id,this._usePgNative=!!t.usePgNative}loadDependency(){return this._module=this._module||Cr.loadModule("pg")}setupOnce(t,e){if(Rw.shouldDisableAutoInstrumentation(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Cr.logger.log("Postgres Integration is skipped because of instrumenter configuration.");return}let s=this.loadDependency();if(!s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Cr.logger.error("Postgres Integration was unable to require `pg` package.");return}if(this._usePgNative&&!Ar([s,"access",i=>i.native,"optionalAccess",i=>i.Client])){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Cr.logger.error("Postgres Integration was unable to access 'pg-native' bindings.");return}let{Client:n}=this._usePgNative?s.native:s;Cr.fill(n.prototype,"query",function(i){return function(a,o,c){let u=e().getScope().getSpan(),p={"db.system":"postgresql"};try{this.database&&(p["db.name"]=this.database),this.host&&(p["server.address"]=this.host),this.port&&(p["server.port"]=this.port),this.user&&(p["db.user"]=this.user)}catch{}let h=Ar([u,"optionalAccess",f=>f.startChild,"call",f=>f({description:typeof a=="string"?a:a.text,op:"db",origin:"auto.db.postgres",data:p})]);if(typeof c=="function")return i.call(this,a,o,function(f,m){Ar([h,"optionalAccess",y=>y.finish,"call",y=>y()]),c(f,m)});if(typeof o=="function")return i.call(this,a,function(f,m){Ar([h,"optionalAccess",y=>y.finish,"call",y=>y()]),o(f,m)});let d=typeof o<"u"?i.call(this,a,o):i.call(this,a);return Cr.isThenable(d)?d.then(f=>(Ar([h,"optionalAccess",m=>m.finish,"call",m=>m()]),f)):(Ar([h,"optionalAccess",f=>f.finish,"call",f=>f()]),d)}})}};Wa.__initStatic();op.Postgres=Wa});var kg=_(cp=>{var{_optionalChain:Fw}=ue();Object.defineProperty(cp,"__esModule",{value:!0});var Xn=L(),Bw=os(),za=class r{static __initStatic(){this.id="Mysql"}constructor(){this.name=r.id}loadDependency(){return this._module=this._module||Xn.loadModule("mysql/lib/Connection.js")}setupOnce(t,e){if(Bw.shouldDisableAutoInstrumentation(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Xn.logger.log("Mysql Integration is skipped because of instrumenter configuration.");return}let s=this.loadDependency();if(!s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Xn.logger.error("Mysql Integration was unable to require `mysql` package.");return}let n;try{s.prototype.connect=new Proxy(s.prototype.connect,{apply(o,c,l){return n||(n=c.config),o.apply(c,l)}})}catch{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Xn.logger.error("Mysql Integration was unable to instrument `mysql` config.")}function i(){return n?{"server.address":n.host,"server.port":n.port,"db.user":n.user}:{}}function a(o){if(!o)return;let c=i();Object.keys(c).forEach(l=>{o.setData(l,c[l])}),o.finish()}Xn.fill(s,"createQuery",function(o){return function(c,l,u){let h=e().getScope().getSpan(),d=Fw([h,"optionalAccess",f=>f.startChild,"call",f=>f({description:typeof c=="string"?c:c.sql,op:"db",origin:"auto.db.mysql",data:{"db.system":"mysql"}})]);return typeof u=="function"?o.call(this,c,l,function(f,m,y){a(d),u(f,m,y)}):typeof l=="function"?o.call(this,c,function(f,m,y){a(d),l(f,m,y)}):o.call(this,c,l,function(){a(d)})}})}};za.__initStatic();cp.Mysql=za});var Dg=_(lp=>{var{_optionalChain:Is}=ue();Object.defineProperty(lp,"__esModule",{value:!0});var Qn=L(),jw=os(),Uw=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],qw={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};function Gw(r){return r&&typeof r=="object"&&r.once&&typeof r.once=="function"}var Ja=class r{static __initStatic(){this.id="Mongo"}constructor(t={}){this.name=r.id,this._operations=Array.isArray(t.operations)?t.operations:Uw,this._describeOperations="describeOperations"in t?t.describeOperations:!0,this._useMongoose=!!t.useMongoose}loadDependency(){let t=this._useMongoose?"mongoose":"mongodb";return this._module=this._module||Qn.loadModule(t)}setupOnce(t,e){if(jw.shouldDisableAutoInstrumentation(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Qn.logger.log("Mongo Integration is skipped because of instrumenter configuration.");return}let s=this.loadDependency();if(!s){let n=this._useMongoose?"mongoose":"mongodb";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Qn.logger.error(`Mongo Integration was unable to require \`${n}\` package.`);return}this._instrumentOperations(s.Collection,this._operations,e)}_instrumentOperations(t,e,s){e.forEach(n=>this._patchOperation(t,n,s))}_patchOperation(t,e,s){if(!(e in t.prototype))return;let n=this._getSpanContextFromOperationArguments.bind(this);Qn.fill(t.prototype,e,function(i){return function(...a){let o=a[a.length-1],l=s().getScope().getSpan();if(typeof o!="function"||e==="mapReduce"&&a.length===2){let p=Is([l,"optionalAccess",d=>d.startChild,"call",d=>d(n(this,e,a))]),h=i.call(this,...a);if(Qn.isThenable(h))return h.then(d=>(Is([p,"optionalAccess",f=>f.finish,"call",f=>f()]),d));if(Gw(h)){let d=h;try{d.once("close",()=>{Is([p,"optionalAccess",f=>f.finish,"call",f=>f()])})}catch{Is([p,"optionalAccess",m=>m.finish,"call",m=>m()])}return d}else return Is([p,"optionalAccess",d=>d.finish,"call",d=>d()]),h}let u=Is([l,"optionalAccess",p=>p.startChild,"call",p=>p(n(this,e,a.slice(0,-1)))]);return i.call(this,...a.slice(0,-1),function(p,h){Is([u,"optionalAccess",d=>d.finish,"call",d=>d()]),o(p,h)})}})}_getSpanContextFromOperationArguments(t,e,s){let n={"db.system":"mongodb","db.name":t.dbName,"db.operation":e,"db.mongodb.collection":t.collectionName},i={op:"db",origin:"auto.db.mongo",description:e,data:n},a=qw[e],o=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!a||!o)return i;try{if(e==="mapReduce"){let[c,l]=s;n[a[0]]=typeof c=="string"?c:c.name||"<anonymous>",n[a[1]]=typeof l=="string"?l:l.name||"<anonymous>"}else for(let c=0;c<a.length;c++)n[`db.mongodb.${a[c]}`]=JSON.stringify(s[c])}catch{}return i}};Ja.__initStatic();lp.Mongo=Ja});var Lg=_(up=>{Object.defineProperty(up,"__esModule",{value:!0});var Og=ne(),Mg=L(),$w=os();function Hw(r){return!!r&&!!r.$use}var Ka=class r{static __initStatic(){this.id="Prisma"}constructor(t={}){if(this.name=r.id,Hw(t.client)&&!t.client._sentryInstrumented){Mg.addNonEnumerableProperty(t.client,"_sentryInstrumented",!0);let e={};try{let s=t.client._engineConfig;if(s){let{activeProvider:n,clientVersion:i}=s;n&&(e["db.system"]=n),i&&(e["db.prisma.version"]=i)}}catch{}t.client.$use((s,n)=>{if($w.shouldDisableAutoInstrumentation(Og.getCurrentHub))return n(s);let i=s.action,a=s.model;return Og.trace({name:a?`${a} ${i}`:i,op:"db.sql.prisma",origin:"auto.db.prisma",data:{...e,"db.operation":i}},()=>n(s))})}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Mg.logger.warn("Unsupported Prisma client provided to PrismaIntegration. Provided client:",t.client)}setupOnce(){}};Ka.__initStatic();up.Prisma=Ka});var Rg=_(pp=>{var{_optionalChain:wr}=ue();Object.defineProperty(pp,"__esModule",{value:!0});var Zn=L(),Vw=os(),Xa=class r{static __initStatic(){this.id="GraphQL"}constructor(){this.name=r.id}loadDependency(){return this._module=this._module||Zn.loadModule("graphql/execution/execute.js")}setupOnce(t,e){if(Vw.shouldDisableAutoInstrumentation(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Zn.logger.log("GraphQL Integration is skipped because of instrumenter configuration.");return}let s=this.loadDependency();if(!s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Zn.logger.error("GraphQL Integration was unable to require graphql/execution package.");return}Zn.fill(s,"execute",function(n){return function(...i){let a=e().getScope(),o=a.getSpan(),c=wr([o,"optionalAccess",u=>u.startChild,"call",u=>u({description:"execute",op:"graphql.execute",origin:"auto.graphql.graphql"})]);wr([a,"optionalAccess",u=>u.setSpan,"call",u=>u(c)]);let l=n.call(this,...i);return Zn.isThenable(l)?l.then(u=>(wr([c,"optionalAccess",p=>p.finish,"call",p=>p()]),wr([a,"optionalAccess",p=>p.setSpan,"call",p=>p(o)]),u)):(wr([c,"optionalAccess",u=>u.finish,"call",u=>u()]),wr([a,"optionalAccess",u=>u.setSpan,"call",u=>u(o)]),l)}})}};Xa.__initStatic();pp.GraphQL=Xa});var Bg=_(dp=>{var{_optionalChain:hp}=ue();Object.defineProperty(dp,"__esModule",{value:!0});var Ie=L(),Yw=os(),Qa=class r{static __initStatic(){this.id="Apollo"}constructor(t={useNestjs:!1}){this.name=r.id,this._useNest=!!t.useNestjs}loadDependency(){return this._useNest?this._module=this._module||Ie.loadModule("@nestjs/graphql"):this._module=this._module||Ie.loadModule("apollo-server-core"),this._module}setupOnce(t,e){if(Yw.shouldDisableAutoInstrumentation(e)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ie.logger.log("Apollo Integration is skipped because of instrumenter configuration.");return}if(this._useNest){let s=this.loadDependency();if(!s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ie.logger.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package.");return}Ie.fill(s.GraphQLFactory.prototype,"mergeWithSchema",function(n){return function(...i){return Ie.fill(this.resolversExplorerService,"explore",function(a){return function(){let o=Ie.arrayify(a.call(this));return Fg(o,e)}}),n.call(this,...i)}})}else{let s=this.loadDependency();if(!s){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ie.logger.error("Apollo Integration was unable to require apollo-server-core package.");return}Ie.fill(s.ApolloServerBase.prototype,"constructSchema",function(n){return function(){if(!this.config.resolvers)return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this.config.schema?(Ie.logger.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),Ie.logger.warn()):this.config.modules&&Ie.logger.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),Ie.logger.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),n.call(this);let i=Ie.arrayify(this.config.resolvers);return this.config.resolvers=Fg(i,e),n.call(this)}})}}};Qa.__initStatic();function Fg(r,t){return r.map(e=>(Object.keys(e).forEach(s=>{Object.keys(e[s]).forEach(n=>{typeof e[s][n]=="function"&&Ww(e,s,n,t)})}),e))}function Ww(r,t,e,s){Ie.fill(r[t],e,function(n){return function(...i){let o=s().getScope().getSpan(),c=hp([o,"optionalAccess",u=>u.startChild,"call",u=>u({description:`${t}.${e}`,op:"graphql.resolve",origin:"auto.graphql.apollo"})]),l=n.call(this,...i);return Ie.isThenable(l)?l.then(u=>(hp([c,"optionalAccess",p=>p.finish,"call",p=>p()]),u)):(hp([c,"optionalAccess",u=>u.finish,"call",u=>u()]),l)}})}dp.Apollo=Qa});var jg=_((fp,cs)=>{Object.defineProperty(fp,"__esModule",{value:!0});var Ns=L(),zw=[()=>{let r=Ns.dynamicRequire(cs,"./apollo");return new r.Apollo},()=>{let r=Ns.dynamicRequire(cs,"./apollo");return new r.Apollo({useNestjs:!0})},()=>{let r=Ns.dynamicRequire(cs,"./graphql");return new r.GraphQL},()=>{let r=Ns.dynamicRequire(cs,"./mongo");return new r.Mongo},()=>{let r=Ns.dynamicRequire(cs,"./mongo");return new r.Mongo({mongoose:!0})},()=>{let r=Ns.dynamicRequire(cs,"./mysql");return new r.Mysql},()=>{let r=Ns.dynamicRequire(cs,"./postgres");return new r.Postgres}];fp.lazyLoadedNodePerformanceMonitoringIntegrations=zw});var Gt=_(mp=>{Object.defineProperty(mp,"__esModule",{value:!0});var Jw=L(),Kw=Jw.GLOBAL_OBJ;mp.WINDOW=Kw});var qg=_(yp=>{Object.defineProperty(yp,"__esModule",{value:!0});var Xw=ne(),Ug=L(),Za=Gt();function Qw(){Za.WINDOW&&Za.WINDOW.document?Za.WINDOW.document.addEventListener("visibilitychange",()=>{let r=Xw.getActiveTransaction();if(Za.WINDOW.document.hidden&&r){let t="cancelled";(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ug.logger.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${r.op}`),r.status||r.setStatus(t),r.setTag("visibilitychange","document.hidden"),r.finish()}}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ug.logger.warn("[Tracing] Could not set up background tab detection due to lack of global document")}yp.registerBackgroundTabDetection=Qw});var eo=_(gp=>{Object.defineProperty(gp,"__esModule",{value:!0});var Zw=(r,t,e)=>{let s,n;return i=>{t.value>=0&&(i||e)&&(n=t.value-(s||0),(n||s===void 0)&&(s=t.value,t.delta=n,r(t)))}};gp.bindReporter=Zw});var Gg=_(bp=>{Object.defineProperty(bp,"__esModule",{value:!0});var eI=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`;bp.generateUniqueID=eI});var _p=_(Sp=>{Object.defineProperty(Sp,"__esModule",{value:!0});var ei=Gt(),tI=()=>{let r=ei.WINDOW.performance.timing,t=ei.WINDOW.performance.navigation.type,e={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(let s in r)s!=="navigationStart"&&s!=="toJSON"&&(e[s]=Math.max(r[s]-r.navigationStart,0));return e},sI=()=>ei.WINDOW.__WEB_VITALS_POLYFILL__?ei.WINDOW.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||tI()):ei.WINDOW.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];Sp.getNavigationEntry=sI});var Ep=_(xp=>{Object.defineProperty(xp,"__esModule",{value:!0});var rI=_p(),nI=()=>{let r=rI.getNavigationEntry();return r&&r.activationStart||0};xp.getActivationStart=nI});var to=_(Tp=>{Object.defineProperty(Tp,"__esModule",{value:!0});var iI=Gt(),aI=Gg(),oI=Ep(),cI=_p(),lI=(r,t)=>{let e=cI.getNavigationEntry(),s="navigate";return e&&(iI.WINDOW.document.prerendering||oI.getActivationStart()>0?s="prerender":s=e.type.replace(/_/g,"-")),{name:r,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:aI.generateUniqueID(),navigationType:s}};Tp.initMetric=lI});var ti=_(Pp=>{Object.defineProperty(Pp,"__esModule",{value:!0});var uI=(r,t,e)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(r)){let s=new PerformanceObserver(n=>{t(n.getEntries())});return s.observe(Object.assign({type:r,buffered:!0},e||{})),s}}catch{}};Pp.observe=uI});var si=_(vp=>{Object.defineProperty(vp,"__esModule",{value:!0});var pI=Gt(),hI=(r,t)=>{let e=s=>{(s.type==="pagehide"||pI.WINDOW.document.visibilityState==="hidden")&&(r(s),t&&(removeEventListener("visibilitychange",e,!0),removeEventListener("pagehide",e,!0)))};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)};vp.onHidden=hI});var $g=_(Ap=>{Object.defineProperty(Ap,"__esModule",{value:!0});var dI=eo(),fI=to(),mI=ti(),yI=si(),gI=r=>{let t=fI.initMetric("CLS",0),e,s=0,n=[],i=o=>{o.forEach(c=>{if(!c.hadRecentInput){let l=n[0],u=n[n.length-1];s&&n.length!==0&&c.startTime-u.startTime<1e3&&c.startTime-l.startTime<5e3?(s+=c.value,n.push(c)):(s=c.value,n=[c]),s>t.value&&(t.value=s,t.entries=n,e&&e())}})},a=mI.observe("layout-shift",i);if(a){e=dI.bindReporter(r,t);let o=()=>{i(a.takeRecords()),e(!0)};return yI.onHidden(o),o}};Ap.onCLS=gI});var ro=_(Cp=>{Object.defineProperty(Cp,"__esModule",{value:!0});var Hg=Gt(),bI=si(),so=-1,SI=()=>Hg.WINDOW.document.visibilityState==="hidden"&&!Hg.WINDOW.document.prerendering?0:1/0,_I=()=>{bI.onHidden(({timeStamp:r})=>{so=r},!0)},xI=()=>(so<0&&(so=SI(),_I()),{get firstHiddenTime(){return so}});Cp.getVisibilityWatcher=xI});var Vg=_(wp=>{Object.defineProperty(wp,"__esModule",{value:!0});var EI=eo(),TI=ro(),PI=to(),vI=ti(),AI=si(),CI=r=>{let t=TI.getVisibilityWatcher(),e=PI.initMetric("FID"),s,n=o=>{o.startTime<t.firstHiddenTime&&(e.value=o.processingStart-o.startTime,e.entries.push(o),s(!0))},i=o=>{o.forEach(n)},a=vI.observe("first-input",i);s=EI.bindReporter(r,e),a&&AI.onHidden(()=>{i(a.takeRecords()),a.disconnect()},!0)};wp.onFID=CI});var Wg=_(Ip=>{Object.defineProperty(Ip,"__esModule",{value:!0});var wI=eo(),II=Ep(),NI=ro(),kI=to(),DI=ti(),OI=si(),Yg={},MI=r=>{let t=NI.getVisibilityWatcher(),e=kI.initMetric("LCP"),s,n=a=>{let o=a[a.length-1];if(o){let c=Math.max(o.startTime-II.getActivationStart(),0);c<t.firstHiddenTime&&(e.value=c,e.entries=[o],s())}},i=DI.observe("largest-contentful-paint",n);if(i){s=wI.bindReporter(r,e);let a=()=>{Yg[e.id]||(n(i.takeRecords()),i.disconnect(),Yg[e.id]=!0,s(!0))};return["keydown","click"].forEach(o=>{addEventListener(o,a,{once:!0,capture:!0})}),OI.onHidden(a,!0),a}};Ip.onLCP=MI});var zg=_(no=>{Object.defineProperty(no,"__esModule",{value:!0});function LI(r){return typeof r=="number"&&isFinite(r)}function RI(r,{startTimestamp:t,...e}){return t&&r.startTimestamp>t&&(r.startTimestamp=t),r.startChild({startTimestamp:t,...e})}no._startChild=RI;no.isMeasurementValue=LI});var tb=_(ls=>{Object.defineProperty(ls,"__esModule",{value:!0});var Kg=ne(),fe=L(),ks=Gt(),FI=$g(),BI=Vg(),jI=Wg(),UI=ro(),Xg=ti(),$t=zg();function me(r){return r/1e3}function Qg(){return ks.WINDOW&&ks.WINDOW.addEventListener&&ks.WINDOW.performance}var Jg=0,oe={},Et,ri;function qI(){let r=Qg();if(r&&fe.browserPerformanceTimeOrigin){r.mark&&ks.WINDOW.performance.mark("sentry-tracing-init"),YI();let t=HI(),e=VI();return()=>{t&&t(),e&&e()}}return()=>{}}function GI(){let r=t=>{for(let e of t){let s=Kg.getActiveTransaction();if(!s)return;let n=me(fe.browserPerformanceTimeOrigin+e.startTime),i=me(e.duration);s.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}};Xg.observe("longtask",r)}function $I(){let r=t=>{for(let e of t){let s=Kg.getActiveTransaction();if(!s)return;if(e.name==="click"){let n=me(fe.browserPerformanceTimeOrigin+e.startTime),i=me(e.duration);s.startChild({description:fe.htmlTreeAsString(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}}};Xg.observe("event",r,{durationThreshold:0})}function HI(){return FI.onCLS(r=>{let t=r.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding CLS"),oe.cls={value:r.value,unit:""},ri=t)})}function VI(){return jI.onLCP(r=>{let t=r.entries.pop();t&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding LCP"),oe.lcp={value:r.value,unit:"millisecond"},Et=t)})}function YI(){BI.onFID(r=>{let t=r.entries.pop();if(!t)return;let e=me(fe.browserPerformanceTimeOrigin),s=me(t.startTime);(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding FID"),oe.fid={value:r.value,unit:"millisecond"},oe["mark.fid"]={value:e+s,unit:"second"}})}function WI(r){let t=Qg();if(!t||!ks.WINDOW.performance.getEntries||!fe.browserPerformanceTimeOrigin)return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Tracing] Adding & adjusting spans using Performance API");let e=me(fe.browserPerformanceTimeOrigin),s=t.getEntries(),n,i;if(s.slice(Jg).forEach(a=>{let o=me(a.startTime),c=me(a.duration);if(!(r.op==="navigation"&&e+o<r.startTimestamp))switch(a.entryType){case"navigation":{zI(r,a,e),n=e+me(a.responseStart),i=e+me(a.requestStart);break}case"mark":case"paint":case"measure":{Zg(r,a,o,c,e);let l=UI.getVisibilityWatcher(),u=a.startTime<l.firstHiddenTime;a.name==="first-paint"&&u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding FP"),oe.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&u&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding FCP"),oe.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{let l=a.name.replace(ks.WINDOW.location.origin,"");eb(r,a,l,o,c,e);break}}}),Jg=Math.max(s.length-1,0),KI(r),r.op==="pageload"){typeof n=="number"&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding TTFB"),oe.ttfb={value:(n-r.startTimestamp)*1e3,unit:"millisecond"},typeof i=="number"&&i<=n&&(oe["ttfb.requestTime"]={value:(n-i)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(o=>{if(!oe[o]||e>=r.startTimestamp)return;let c=oe[o].value,l=e+me(c),u=Math.abs((l-r.startTimestamp)*1e3),p=u-c;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log(`[Measurements] Normalized ${o} from ${c} to ${u} (${p})`),oe[o].value=u});let a=oe["mark.fid"];a&&oe.fid&&($t._startChild(r,{description:"first input delay",endTimestamp:a.value+me(oe.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete oe["mark.fid"]),"fcp"in oe||delete oe.cls,Object.keys(oe).forEach(o=>{r.setMeasurement(o,oe[o].value,oe[o].unit)}),XI(r)}Et=void 0,ri=void 0,oe={}}function Zg(r,t,e,s,n){let i=n+e,a=i+s;return $t._startChild(r,{description:t.name,endTimestamp:a,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function zI(r,t,e){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(s=>{io(r,t,s,e)}),io(r,t,"secureConnection",e,"TLS/SSL","connectEnd"),io(r,t,"fetch",e,"cache","domainLookupStart"),io(r,t,"domainLookup",e,"DNS"),JI(r,t,e)}function io(r,t,e,s,n,i){let a=i?t[i]:t[`${e}End`],o=t[`${e}Start`];!o||!a||$t._startChild(r,{op:"browser",origin:"auto.browser.browser.metrics",description:n||e,startTimestamp:s+me(o),endTimestamp:s+me(a)})}function JI(r,t,e){$t._startChild(r,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:e+me(t.requestStart),endTimestamp:e+me(t.responseEnd)}),$t._startChild(r,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:e+me(t.responseStart),endTimestamp:e+me(t.responseEnd)})}function eb(r,t,e,s,n,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a={};"transferSize"in t&&(a["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(a["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(a["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus);let o=i+s,c=o+n;$t._startChild(r,{description:e,endTimestamp:c,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:o,data:a})}function KI(r){let t=ks.WINDOW.navigator;if(!t)return;let e=t.connection;e&&(e.effectiveType&&r.setTag("effectiveConnectionType",e.effectiveType),e.type&&r.setTag("connectionType",e.type),$t.isMeasurementValue(e.rtt)&&(oe["connection.rtt"]={value:e.rtt,unit:"millisecond"})),$t.isMeasurementValue(t.deviceMemory)&&r.setTag("deviceMemory",`${t.deviceMemory} GB`),$t.isMeasurementValue(t.hardwareConcurrency)&&r.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function XI(r){Et&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding LCP Data"),Et.element&&r.setTag("lcp.element",fe.htmlTreeAsString(Et.element)),Et.id&&r.setTag("lcp.id",Et.id),Et.url&&r.setTag("lcp.url",Et.url.trim().slice(0,200)),r.setTag("lcp.size",Et.size)),ri&&ri.sources&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fe.logger.log("[Measurements] Adding CLS Data"),ri.sources.forEach((t,e)=>r.setTag(`cls.source.${e+1}`,fe.htmlTreeAsString(t.node))))}ls._addMeasureSpans=Zg;ls._addResourceSpans=eb;ls.addPerformanceEntries=WI;ls.startTrackingInteractions=$I;ls.startTrackingLongTasks=GI;ls.startTrackingWebVitals=qI});var kp=_(Pt=>{Object.defineProperty(Pt,"__esModule",{value:!0});var Ir=ne(),Ne=L(),ao=["localhost",/^\/(?!\/)/],Np={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:ao,tracePropagationTargets:ao};function QI(r){let{traceFetch:t,traceXHR:e,tracePropagationTargets:s,tracingOrigins:n,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:Np.traceFetch,traceXHR:Np.traceXHR,...r},o=typeof i=="function"?i:u=>!0,c=u=>ib(u,s||n),l={};t&&Ne.addInstrumentationHandler("fetch",u=>{let p=ab(u,o,c,l);a&&p&&sb(p)}),e&&Ne.addInstrumentationHandler("xhr",u=>{let p=cb(u,o,c,l);a&&p&&sb(p)})}function ZI(r){return r.entryType==="resource"&&"initiatorType"in r&&typeof r.nextHopProtocol=="string"&&(r.initiatorType==="fetch"||r.initiatorType==="xmlhttprequest")}function sb(r){let t=r.data.url,e=new PerformanceObserver(s=>{s.getEntries().forEach(i=>{ZI(i)&&i.name.endsWith(t)&&(e1(i).forEach(o=>r.setData(...o)),e.disconnect())})});e.observe({entryTypes:["resource"]})}function nb(r){let t="unknown",e="unknown",s="";for(let n of r){if(n==="/"){[t,e]=r.split("/");break}if(!isNaN(Number(n))){t=s==="h"?"http":s,e=r.split(s)[1];break}s+=n}return s===r&&(t=s),{name:t,version:e}}function Tt(r=0){return((Ne.browserPerformanceTimeOrigin||performance.timeOrigin)+r)/1e3}function e1(r){let{name:t,version:e}=nb(r.nextHopProtocol),s=[];return s.push(["network.protocol.version",e],["network.protocol.name",t]),Ne.browserPerformanceTimeOrigin?[...s,["http.request.redirect_start",Tt(r.redirectStart)],["http.request.fetch_start",Tt(r.fetchStart)],["http.request.domain_lookup_start",Tt(r.domainLookupStart)],["http.request.domain_lookup_end",Tt(r.domainLookupEnd)],["http.request.connect_start",Tt(r.connectStart)],["http.request.secure_connection_start",Tt(r.secureConnectionStart)],["http.request.connection_end",Tt(r.connectEnd)],["http.request.request_start",Tt(r.requestStart)],["http.request.response_start",Tt(r.responseStart)],["http.request.response_end",Tt(r.responseEnd)]]:s}function ib(r,t){return Ne.stringMatchesSomePattern(r,t||ao)}function ab(r,t,e,s){if(!Ir.hasTracingEnabled()||!r.fetchData)return;let n=t(r.fetchData.url);if(r.endTimestamp&&n){let h=r.fetchData.__span;if(!h)return;let d=s[h];if(d){if(r.response){d.setHttpStatus(r.response.status);let f=r.response&&r.response.headers&&r.response.headers.get("content-length"),m=parseInt(f);m>0&&d.setData("http.response_content_length",m)}else r.error&&d.setStatus("internal_error");d.finish(),delete s[h]}return}let i=Ir.getCurrentHub(),a=i.getScope(),o=i.getClient(),c=a.getSpan(),{method:l,url:u}=r.fetchData,p=n&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(p&&(r.fetchData.__span=p.spanId,s[p.spanId]=p),e(r.fetchData.url)&&o){let h=r.args[0];r.args[1]=r.args[1]||{};let d=r.args[1];d.headers=ob(h,o,a,d,p)}return p}function ob(r,t,e,s,n){let i=n||e.getSpan(),a=i&&i.transaction,{traceId:o,sampled:c,dsc:l}=e.getPropagationContext(),u=i?i.toTraceparent():Ne.generateSentryTraceHeader(o,void 0,c),p=a?a.getDynamicSamplingContext():l||Ir.getDynamicSamplingContextFromClient(o,t,e),h=Ne.dynamicSamplingContextToSentryBaggageHeader(p),d=typeof Request<"u"&&Ne.isInstanceOf(r,Request)?r.headers:s.headers;if(d)if(typeof Headers<"u"&&Ne.isInstanceOf(d,Headers)){let f=new Headers(d);return f.append("sentry-trace",u),h&&f.append(Ne.BAGGAGE_HEADER_NAME,h),f}else if(Array.isArray(d)){let f=[...d,["sentry-trace",u]];return h&&f.push([Ne.BAGGAGE_HEADER_NAME,h]),f}else{let f="baggage"in d?d.baggage:void 0,m=[];return Array.isArray(f)?m.push(...f):f&&m.push(f),h&&m.push(h),{...d,"sentry-trace":u,baggage:m.length>0?m.join(","):void 0}}else return{"sentry-trace":u,baggage:h}}function cb(r,t,e,s){let n=r.xhr,i=n&&n[Ne.SENTRY_XHR_DATA_KEY];if(!Ir.hasTracingEnabled()||n&&n.__sentry_own_request__||!n||!i)return;let a=t(i.url);if(r.endTimestamp&&a){let p=n.__sentry_xhr_span_id__;if(!p)return;let h=s[p];h&&(h.setHttpStatus(i.status_code),h.finish(),delete s[p]);return}let o=Ir.getCurrentHub(),c=o.getScope(),l=c.getSpan(),u=a&&l?l.startChild({data:{...i.data,type:"xhr","http.method":i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;if(u&&(n.__sentry_xhr_span_id__=u.spanId,s[n.__sentry_xhr_span_id__]=u),n.setRequestHeader&&e(i.url))if(u){let p=u&&u.transaction,h=p&&p.getDynamicSamplingContext(),d=Ne.dynamicSamplingContextToSentryBaggageHeader(h);rb(n,u.toTraceparent(),d)}else{let p=o.getClient(),{traceId:h,sampled:d,dsc:f}=c.getPropagationContext(),m=Ne.generateSentryTraceHeader(h,void 0,d),y=f||(p?Ir.getDynamicSamplingContextFromClient(h,p,c):void 0),b=Ne.dynamicSamplingContextToSentryBaggageHeader(y);rb(n,m,b)}return u}function rb(r,t,e){try{r.setRequestHeader("sentry-trace",t),e&&r.setRequestHeader(Ne.BAGGAGE_HEADER_NAME,e)}catch{}}Pt.DEFAULT_TRACE_PROPAGATION_TARGETS=ao;Pt.addTracingHeadersToFetchRequest=ob;Pt.defaultRequestInstrumentationOptions=Np;Pt.extractNetworkProtocol=nb;Pt.fetchCallback=ab;Pt.instrumentOutgoingRequests=QI;Pt.shouldAttachHeaders=ib;Pt.xhrCallback=cb});var lb=_(Dp=>{Object.defineProperty(Dp,"__esModule",{value:!0});var ni=L(),ii=Gt();function t1(r,t=!0,e=!0){if(!ii.WINDOW||!ii.WINDOW.location){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ni.logger.warn("Could not initialize routing instrumentation due to invalid location");return}let s=ii.WINDOW.location.href,n;t&&(n=r({name:ii.WINDOW.location.pathname,startTimestamp:ni.browserPerformanceTimeOrigin?ni.browserPerformanceTimeOrigin/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),e&&ni.addInstrumentationHandler("history",({to:i,from:a})=>{if(a===void 0&&s&&s.indexOf(i)!==-1){s=void 0;return}a!==i&&(s=void 0,n&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ni.logger.log(`[Tracing] Finishing current transaction with op: ${n.op}`),n.finish()),n=r({name:ii.WINDOW.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}Dp.instrumentRoutingWithDefaults=t1});var db=_(oi=>{Object.defineProperty(oi,"__esModule",{value:!0});var ai=ne(),Ht=L(),s1=qg(),oo=tb(),pb=kp(),r1=lb(),ub=Gt(),hb="BrowserTracing",n1={...ai.TRACING_DEFAULTS,markBackgroundTransactions:!0,routingInstrumentation:r1.instrumentRoutingWithDefaults,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...pb.defaultRequestInstrumentationOptions},Op=class{constructor(t){this.name=hb,this._hasSetTracePropagationTargets=!1,ai.addTracingExtensions(),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!!(t&&(t.tracePropagationTargets||t.tracingOrigins))),this.options={...n1,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=oo.startTrackingWebVitals(),this.options.enableLongTask&&oo.startTrackingLongTasks(),this.options._experiments.enableInteractions&&oo.startTrackingInteractions()}setupOnce(t,e){this._getCurrentHub=e;let n=e().getClient(),i=n&&n.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:o,startTransactionOnPageLoad:c,markBackgroundTransactions:l,traceFetch:u,traceXHR:p,shouldCreateSpanForRequest:h,enableHTTPTimings:d,_experiments:f}=this.options,m=i&&i.tracePropagationTargets,y=m||this.options.tracePropagationTargets;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&m&&Ht.logger.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(b=>{let x=this._createRouteTransaction(b);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(x,b,e),x},c,o),l&&s1.registerBackgroundTabDetection(),f.enableInteractions&&this._registerInteractionListener(),pb.instrumentOutgoingRequests({traceFetch:u,traceXHR:p,tracePropagationTargets:y,shouldCreateSpanForRequest:h,enableHTTPTimings:d})}_createRouteTransaction(t){if(!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ht.logger.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`);return}let e=this._getCurrentHub(),{beforeNavigate:s,idleTimeout:n,finalTimeout:i,heartbeatInterval:a}=this.options,o=t.op==="pageload",c=o?Mp("sentry-trace"):"",l=o?Mp("baggage"):"",{traceparentData:u,dynamicSamplingContext:p,propagationContext:h}=Ht.tracingContextFromHeaders(c,l),d={...t,...u,metadata:{...t.metadata,dynamicSamplingContext:u&&!p?{}:p},trimEnd:!0},f=typeof s=="function"?s(d):d,m=f===void 0?{...d,sampled:!1}:f;m.metadata=m.name!==d.name?{...m.metadata,source:"custom"}:m.metadata,this._latestRouteName=m.name,this._latestRouteSource=m.metadata&&m.metadata.source,m.sampled===!1&&(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ht.logger.log(`[Tracing] Will not send ${m.op} transaction because of beforeNavigate.`),(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ht.logger.log(`[Tracing] Starting ${m.op} transaction on scope`);let{location:y}=ub.WINDOW,b=ai.startIdleTransaction(e,m,n,i,!0,{location:y},a),x=e.getScope();return o&&u?x.setPropagationContext(h):x.setPropagationContext({traceId:b.traceId,spanId:b.spanId,parentSpanId:b.parentSpanId,sampled:b.sampled}),b.registerBeforeFinishCallback(N=>{this._collectWebVitals(),oo.addPerformanceEntries(N)}),b}_registerInteractionListener(){let t,e=()=>{let{idleTimeout:s,finalTimeout:n,heartbeatInterval:i}=this.options,a="ui.action.click",o=ai.getActiveTransaction();if(o&&o.op&&["navigation","pageload"].includes(o.op)){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ht.logger.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ht.logger.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRouteName){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Ht.logger.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}let c=this._getCurrentHub(),{location:l}=ub.WINDOW,u={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};t=ai.startIdleTransaction(c,u,s,n,!0,{location:l},i)};["click"].forEach(s=>{addEventListener(s,e,{once:!1,capture:!0})})}};function Mp(r){let t=Ht.getDomElement(`meta[name=${r}]`);return t?t.getAttribute("content"):void 0}oi.BROWSER_TRACING_INTEGRATION_ID=hb;oi.BrowserTracing=Op;oi.getMetaContent=Mp});var mb=_((Lp,ci)=>{Object.defineProperty(Lp,"__esModule",{value:!0});var fb=ne(),Nr=L();function i1(){let r=fb.getMainCarrier();if(!r.__SENTRY__)return;let t={mongodb(){let s=Nr.dynamicRequire(ci,"./node/integrations/mongo");return new s.Mongo},mongoose(){let s=Nr.dynamicRequire(ci,"./node/integrations/mongo");return new s.Mongo},mysql(){let s=Nr.dynamicRequire(ci,"./node/integrations/mysql");return new s.Mysql},pg(){let s=Nr.dynamicRequire(ci,"./node/integrations/postgres");return new s.Postgres}},e=Object.keys(t).filter(s=>!!Nr.loadModule(s)).map(s=>{try{return t[s]()}catch{return}}).filter(s=>s);e.length>0&&(r.__SENTRY__.integrations=[...r.__SENTRY__.integrations||[],...e])}function a1(){fb.addTracingExtensions(),Nr.isNodeEnv()&&i1()}Lp.addExtensionMethods=a1});var Fp=_(Z=>{Object.defineProperty(Z,"__esModule",{value:!0});var Vt=ne(),yb=L(),o1=Ig(),c1=Ng(),l1=kg(),u1=Dg(),p1=Lg(),h1=Rg(),d1=Bg(),f1=jg(),gb=db(),Rp=kp(),m1=mb();Z.IdleTransaction=Vt.IdleTransaction;Z.Span=Vt.Span;Z.SpanStatus=Vt.SpanStatus;Z.Transaction=Vt.Transaction;Z.extractTraceparentData=Vt.extractTraceparentData;Z.getActiveTransaction=Vt.getActiveTransaction;Z.hasTracingEnabled=Vt.hasTracingEnabled;Z.spanStatusfromHttpCode=Vt.spanStatusfromHttpCode;Z.startIdleTransaction=Vt.startIdleTransaction;Z.TRACEPARENT_REGEXP=yb.TRACEPARENT_REGEXP;Z.stripUrlQueryAndFragment=yb.stripUrlQueryAndFragment;Z.Express=o1.Express;Z.Postgres=c1.Postgres;Z.Mysql=l1.Mysql;Z.Mongo=u1.Mongo;Z.Prisma=p1.Prisma;Z.GraphQL=h1.GraphQL;Z.Apollo=d1.Apollo;Z.lazyLoadedNodePerformanceMonitoringIntegrations=f1.lazyLoadedNodePerformanceMonitoringIntegrations;Z.BROWSER_TRACING_INTEGRATION_ID=gb.BROWSER_TRACING_INTEGRATION_ID;Z.BrowserTracing=gb.BrowserTracing;Z.addTracingHeadersToFetchRequest=Rp.addTracingHeadersToFetchRequest;Z.defaultRequestInstrumentationOptions=Rp.defaultRequestInstrumentationOptions;Z.instrumentOutgoingRequests=Rp.instrumentOutgoingRequests;Z.addExtensionMethods=m1.addExtensionMethods});var bb=_(Bp=>{Object.defineProperty(Bp,"__esModule",{value:!0});var y1=Fp(),g1=L();function b1(){let r=y1.lazyLoadedNodePerformanceMonitoringIntegrations.map(t=>{try{return t()}catch{return}}).filter(t=>!!t);return r.length===0&&g1.logger.warn("Performance monitoring integrations could not be automatically loaded."),r.filter(t=>!!t.loadDependency())}Bp.autoDiscoverNodePerformanceMonitoringIntegrations=b1});var Up=_(Dr=>{Object.defineProperty(Dr,"__esModule",{value:!0});var S1=ne(),kr=L();function jp(r,t){return r(t.stack||"",1)}function Sb(r,t){let e={type:t.name||t.constructor.name,value:t.message},s=jp(r,t);return s.length&&(e.stacktrace={frames:s}),e}function _1(r,t,e){let s=t,i=e&&e.data&&e.data.mechanism||{handled:!0,type:"generic"};if(!kr.isError(t)){if(kr.isPlainObject(t)){let o=`Non-Error exception captured with keys: ${kr.extractExceptionKeysForMessage(t)}`,c=S1.getCurrentHub(),l=c.getClient(),u=l&&l.getOptions().normalizeDepth;c.configureScope(p=>{p.setExtra("__serialized__",kr.normalizeToSize(t,u))}),s=e&&e.syntheticException||new Error(o),s.message=o}else s=e&&e.syntheticException||new Error(t),s.message=t;i.synthetic=!0}let a={exception:{values:[Sb(r,s)]}};return kr.addExceptionTypeValue(a,void 0,void 0),kr.addExceptionMechanism(a,i),{...a,event_id:e&&e.event_id}}function x1(r,t,e="info",s,n){let i={event_id:s&&s.event_id,level:e,message:t};if(n&&s&&s.syntheticException){let a=jp(r,s.syntheticException);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]})}return i}Dr.eventFromMessage=x1;Dr.eventFromUnknownInput=_1;Dr.exceptionFromError=Sb;Dr.parseStackFrames=jp});var $p=_(Gp=>{var{_optionalChain:co}=ue();Object.defineProperty(Gp,"__esModule",{value:!0});var Ds=ne(),Os=L(),E1=require("os"),T1=require("util"),_b=Up(),qp=class extends Ds.BaseClient{constructor(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.node",packages:[{name:"npm:@sentry/node",version:Ds.SDK_VERSION}],version:Ds.SDK_VERSION},t.transportOptions={textEncoder:new T1.TextEncoder,...t.transportOptions},Ds.addTracingExtensions(),super(t)}captureException(t,e,s){if(this._options.autoSessionTracking&&this._sessionFlusher&&s){let n=s.getRequestSession();n&&n.status==="ok"&&(n.status="errored")}return super.captureException(t,e,s)}captureEvent(t,e,s){if(this._options.autoSessionTracking&&this._sessionFlusher&&s&&(t.type||"exception")==="exception"&&t.exception&&t.exception.values&&t.exception.values.length>0){let a=s.getRequestSession();a&&a.status==="ok"&&(a.status="errored")}return super.captureEvent(t,e,s)}close(t){return co([this,"access",e=>e._sessionFlusher,"optionalAccess",e=>e.close,"call",e=>e()]),super.close(t)}initSessionFlusher(){let{release:t,environment:e}=this._options;t?this._sessionFlusher=new Ds.SessionFlusher(this,{release:t,environment:e}):(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Os.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")}eventFromException(t,e){return Os.resolvedSyncPromise(_b.eventFromUnknownInput(this._options.stackParser,t,e))}eventFromMessage(t,e="info",s){return Os.resolvedSyncPromise(_b.eventFromMessage(this._options.stackParser,t,e,s,this._options.attachStacktrace))}captureCheckIn(t,e,s){let n=t.status!=="in_progress"&&t.checkInId?t.checkInId:Os.uuid4();if(!this._isEnabled())return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Os.logger.warn("SDK not enabled, will not capture checkin."),n;let i=this.getOptions(),{release:a,environment:o,tunnel:c}=i,l={check_in_id:n,monitor_slug:t.monitorSlug,status:t.status,release:a,environment:o};t.status!=="in_progress"&&(l.duration=t.duration),e&&(l.monitor_config={schedule:e.schedule,checkin_margin:e.checkinMargin,max_runtime:e.maxRuntime,timezone:e.timezone});let[u,p]=this._getTraceInfoFromScope(s);p&&(l.contexts={trace:p});let h=Ds.createCheckInEnvelope(l,u,this.getSdkMetadata(),c,this.getDsn());return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Os.logger.info("Sending checkin:",t.monitorSlug,t.status),this._sendEnvelope(h),n}_prepareEvent(t,e,s){return t.platform=t.platform||"node",t.contexts={...t.contexts,runtime:co([t,"access",n=>n.contexts,"optionalAccess",n=>n.runtime])||{name:"node",version:global.process.version}},t.server_name=t.server_name||this.getOptions().serverName||global.process.env.SENTRY_NAME||E1.hostname(),super._prepareEvent(t,e,s)}_captureRequestSession(){this._sessionFlusher?this._sessionFlusher.incrementSessionStatusCount():(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&Os.logger.warn("Discarded request mode session because autoSessionTracking option was disabled")}_getTraceInfoFromScope(t){if(!t)return[void 0,void 0];let e=t.getSpan();if(e)return[co([e,"optionalAccess",c=>c.transaction,"optionalAccess",c=>c.getDynamicSamplingContext,"call",c=>c()]),co([e,"optionalAccess",c=>c.getTraceContext,"call",c=>c()])];let{traceId:s,spanId:n,parentSpanId:i,dsc:a}=t.getPropagationContext(),o={trace_id:s,span_id:n,parent_span_id:i};return a?[a,o]:[Ds.getDynamicSamplingContextFromClient(s,this,t),o]}};Gp.NodeClient=qp});var Eb=_((ML,xb)=>{var Or=1e3,Mr=Or*60,Lr=Mr*60,Ms=Lr*24,P1=Ms*7,v1=Ms*365.25;xb.exports=function(r,t){t=t||{};var e=typeof r;if(e==="string"&&r.length>0)return A1(r);if(e==="number"&&isFinite(r))return t.long?w1(r):C1(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function A1(r){if(r=String(r),!(r.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(t){var e=parseFloat(t[1]),s=(t[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return e*v1;case"weeks":case"week":case"w":return e*P1;case"days":case"day":case"d":return e*Ms;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Lr;case"minutes":case"minute":case"mins":case"min":case"m":return e*Mr;case"seconds":case"second":case"secs":case"sec":case"s":return e*Or;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function C1(r){var t=Math.abs(r);return t>=Ms?Math.round(r/Ms)+"d":t>=Lr?Math.round(r/Lr)+"h":t>=Mr?Math.round(r/Mr)+"m":t>=Or?Math.round(r/Or)+"s":r+"ms"}function w1(r){var t=Math.abs(r);return t>=Ms?lo(r,t,Ms,"day"):t>=Lr?lo(r,t,Lr,"hour"):t>=Mr?lo(r,t,Mr,"minute"):t>=Or?lo(r,t,Or,"second"):r+" ms"}function lo(r,t,e,s){var n=t>=e*1.5;return Math.round(r/e)+" "+s+(n?"s":"")}});var Hp=_((LL,Tb)=>{function I1(r){e.debug=e,e.default=e,e.coerce=c,e.disable=a,e.enable=n,e.enabled=o,e.humanize=Eb(),e.destroy=l,Object.keys(r).forEach(u=>{e[u]=r[u]}),e.names=[],e.skips=[],e.formatters={};function t(u){let p=0;for(let h=0;h<u.length;h++)p=(p<<5)-p+u.charCodeAt(h),p|=0;return e.colors[Math.abs(p)%e.colors.length]}e.selectColor=t;function e(u){let p,h=null,d,f;function m(...y){if(!m.enabled)return;let b=m,x=Number(new Date),N=x-(p||x);b.diff=N,b.prev=p,b.curr=x,p=x,y[0]=e.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let T=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(A,k)=>{if(A==="%%")return"%";T++;let $=e.formatters[k];if(typeof $=="function"){let xe=y[T];A=$.call(b,xe),y.splice(T,1),T--}return A}),e.formatArgs.call(b,y),(b.log||e.log).apply(b,y)}return m.namespace=u,m.useColors=e.useColors(),m.color=e.selectColor(u),m.extend=s,m.destroy=e.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(d!==e.namespaces&&(d=e.namespaces,f=e.enabled(u)),f),set:y=>{h=y}}),typeof e.init=="function"&&e.init(m),m}function s(u,p){let h=e(this.namespace+(typeof p>"u"?":":p)+u);return h.log=this.log,h}function n(u){e.save(u),e.namespaces=u,e.names=[],e.skips=[];let p=(typeof u=="string"?u:"").trim().replace(" ",",").split(",").filter(Boolean);for(let h of p)h[0]==="-"?e.skips.push(h.slice(1)):e.names.push(h)}function i(u,p){let h=0,d=0,f=-1,m=0;for(;h<u.length;)if(d<p.length&&(p[d]===u[h]||p[d]==="*"))p[d]==="*"?(f=d,m=h,d++):(h++,d++);else if(f!==-1)d=f+1,m++,h=m;else return!1;for(;d<p.length&&p[d]==="*";)d++;return d===p.length}function a(){let u=[...e.names,...e.skips.map(p=>"-"+p)].join(",");return e.enable(""),u}function o(u){for(let p of e.skips)if(i(u,p))return!1;for(let p of e.names)if(i(u,p))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}Tb.exports=I1});var Pb=_(($e,uo)=>{$e.formatArgs=k1;$e.save=D1;$e.load=O1;$e.useColors=N1;$e.storage=M1();$e.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();$e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function N1(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function k1(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+uo.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;r.splice(1,0,t,"color: inherit");let e=0,s=0;r[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(e++,n==="%c"&&(s=e))}),r.splice(s,0,t)}$e.log=console.debug||console.log||(()=>{});function D1(r){try{r?$e.storage.setItem("debug",r):$e.storage.removeItem("debug")}catch{}}function O1(){let r;try{r=$e.storage.getItem("debug")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}function M1(){try{return localStorage}catch{}}uo.exports=Hp()($e);var{formatters:L1}=uo.exports;L1.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Ab=_((RL,vb)=>{"use strict";vb.exports=(r,t=process.argv)=>{let e=r.startsWith("-")?"":r.length===1?"-":"--",s=t.indexOf(e+r),n=t.indexOf("--");return s!==-1&&(n===-1||s<n)}});var Ib=_((FL,wb)=>{"use strict";var R1=require("os"),Cb=require("tty"),st=Ab(),{env:Se}=process,po;st("no-color")||st("no-colors")||st("color=false")||st("color=never")?po=0:(st("color")||st("colors")||st("color=true")||st("color=always"))&&(po=1);function F1(){if("FORCE_COLOR"in Se)return Se.FORCE_COLOR==="true"?1:Se.FORCE_COLOR==="false"?0:Se.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Se.FORCE_COLOR,10),3)}function B1(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function j1(r,{streamIsTTY:t,sniffFlags:e=!0}={}){let s=F1();s!==void 0&&(po=s);let n=e?po:s;if(n===0)return 0;if(e){if(st("color=16m")||st("color=full")||st("color=truecolor"))return 3;if(st("color=256"))return 2}if(r&&!t&&n===void 0)return 0;let i=n||0;if(Se.TERM==="dumb")return i;if(process.platform==="win32"){let a=R1.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Se)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in Se)||Se.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Se)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Se.TEAMCITY_VERSION)?1:0;if(Se.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Se){let a=Number.parseInt((Se.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Se.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Se.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Se.TERM)||"COLORTERM"in Se?1:i}function Vp(r,t={}){let e=j1(r,{streamIsTTY:r&&r.isTTY,...t});return B1(e)}wb.exports={supportsColor:Vp,stdout:Vp({isTTY:Cb.isatty(1)}),stderr:Vp({isTTY:Cb.isatty(2)})}});var kb=_((_e,fo)=>{var U1=require("tty"),ho=require("util");_e.init=W1;_e.log=H1;_e.formatArgs=G1;_e.save=V1;_e.load=Y1;_e.useColors=q1;_e.destroy=ho.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");_e.colors=[6,2,3,4,5,1];try{let r=Ib();r&&(r.stderr||r).level>=2&&(_e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}_e.inspectOpts=Object.keys(process.env).filter(r=>/^debug_/i.test(r)).reduce((r,t)=>{let e=t.substring(6).toLowerCase().replace(/_([a-z])/g,(n,i)=>i.toUpperCase()),s=process.env[t];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),r[e]=s,r},{});function q1(){return"colors"in _e.inspectOpts?!!_e.inspectOpts.colors:U1.isatty(process.stderr.fd)}function G1(r){let{namespace:t,useColors:e}=this;if(e){let s=this.color,n="\x1B[3"+(s<8?s:"8;5;"+s),i=` ${n};1m${t} \x1B[0m`;r[0]=i+r[0].split(`
27
- `).join(`
28
- `+i),r.push(n+"m+"+fo.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=$1()+t+" "+r[0]}function $1(){return _e.inspectOpts.hideDate?"":new Date().toISOString()+" "}function H1(...r){return process.stderr.write(ho.formatWithOptions(_e.inspectOpts,...r)+`
29
- `)}function V1(r){r?process.env.DEBUG=r:delete process.env.DEBUG}function Y1(){return process.env.DEBUG}function W1(r){r.inspectOpts={};let t=Object.keys(_e.inspectOpts);for(let e=0;e<t.length;e++)r.inspectOpts[t[e]]=_e.inspectOpts[t[e]]}fo.exports=Hp()(_e);var{formatters:Nb}=fo.exports;Nb.o=function(r){return this.inspectOpts.colors=this.useColors,ho.inspect(r,this.inspectOpts).split(`
30
- `).map(t=>t.trim()).join(" ")};Nb.O=function(r){return this.inspectOpts.colors=this.useColors,ho.inspect(r,this.inspectOpts)}});var mo=_((BL,Yp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Yp.exports=Pb():Yp.exports=kb()});var Db=_(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});function z1(r){return function(t,e){return new Promise((s,n)=>{r.call(this,t,e,(i,a)=>{i?n(i):s(a)})})}}Wp.default=z1});var Lb=_((Jp,Mb)=>{"use strict";var Ob=Jp&&Jp.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},J1=require("events"),K1=Ob(mo()),X1=Ob(Db()),li=K1.default("agent-base");function Q1(r){return!!r&&typeof r.addRequest=="function"}function zp(){let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
31
- `).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function yo(r,t){return new yo.Agent(r,t)}(function(r){class t extends J1.EventEmitter{constructor(s,n){super();let i=n;typeof s=="function"?this.callback=s:s&&(i=s),this.timeout=null,i&&typeof i.timeout=="number"&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:zp()?443:80}set defaultPort(s){this.explicitDefaultPort=s}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:zp()?"https:":"http:"}set protocol(s){this.explicitProtocol=s}callback(s,n,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(s,n){let i=Object.assign({},n);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=zp()),i.host==null&&(i.host="localhost"),i.port==null&&(i.port=i.secureEndpoint?443:80),i.protocol==null&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,s._last=!0,s.shouldKeepAlive=!1;let a=!1,o=null,c=i.timeout||this.timeout,l=d=>{s._hadError||(s.emit("error",d),s._hadError=!0)},u=()=>{o=null,a=!0;let d=new Error(`A "socket" was not created for HTTP request before ${c}ms`);d.code="ETIMEOUT",l(d)},p=d=>{a||(o!==null&&(clearTimeout(o),o=null),l(d))},h=d=>{if(a)return;if(o!=null&&(clearTimeout(o),o=null),Q1(d)){li("Callback returned another Agent instance %o",d.constructor.name),d.addRequest(s,i);return}if(d){d.once("free",()=>{this.freeSocket(d,i)}),s.onSocket(d);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${s.method} ${s.path}\``);l(f)};if(typeof this.callback!="function"){l(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(li("Converting legacy callback function to promise"),this.promisifiedCallback=X1.default(this.callback)):this.promisifiedCallback=this.callback),typeof c=="number"&&c>0&&(o=setTimeout(u,c)),"port"in i&&typeof i.port!="number"&&(i.port=Number(i.port));try{li("Resolving socket for %o request: %o",i.protocol,`${s.method} ${s.path}`),Promise.resolve(this.promisifiedCallback(s,i)).then(h,p)}catch(d){Promise.reject(d).catch(p)}}freeSocket(s,n){li("Freeing socket %o %o",s.constructor.name,n),s.destroy()}destroy(){li("Destroying agent %o",this.constructor.name)}}r.Agent=t,r.prototype=r.Agent.prototype})(yo||(yo={}));Mb.exports=yo});var Rb=_(pi=>{"use strict";var Z1=pi&&pi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pi,"__esModule",{value:!0});var eN=Z1(mo()),ui=eN.default("https-proxy-agent:parse-proxy-response");function tN(r){return new Promise((t,e)=>{let s=0,n=[];function i(){let p=r.read();p?u(p):r.once("readable",i)}function a(){r.removeListener("end",c),r.removeListener("error",l),r.removeListener("close",o),r.removeListener("readable",i)}function o(p){ui("onclose had error %o",p)}function c(){ui("onend")}function l(p){a(),ui("onerror %o",p),e(p)}function u(p){n.push(p),s+=p.length;let h=Buffer.concat(n,s);if(h.indexOf(`\r
32
- \r
33
- `)===-1){ui("have not received end of HTTP headers yet..."),i();return}let f=h.toString("ascii",0,h.indexOf(`\r
34
- `)),m=+f.split(" ")[1];ui("got proxy server response: %o",f),t({statusCode:m,buffered:h})}r.on("error",l),r.on("close",o),r.on("end",c),i()})}pi.default=tN});var jb=_(Ls=>{"use strict";var sN=Ls&&Ls.__awaiter||function(r,t,e,s){function n(i){return i instanceof e?i:new e(function(a){a(i)})}return new(e||(e=Promise))(function(i,a){function o(u){try{l(s.next(u))}catch(p){a(p)}}function c(u){try{l(s.throw(u))}catch(p){a(p)}}function l(u){u.done?i(u.value):n(u.value).then(o,c)}l((s=s.apply(r,t||[])).next())})},Rr=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var Fb=Rr(require("net")),Bb=Rr(require("tls")),rN=Rr(require("url")),nN=Rr(require("assert")),iN=Rr(mo()),aN=Lb(),oN=Rr(Rb()),hi=iN.default("https-proxy-agent:agent"),Kp=class extends aN.Agent{constructor(t){let e;if(typeof t=="string"?e=rN.default.parse(t):e=t,!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");hi("creating new HttpsProxyAgent instance: %o",e),super(e);let s=Object.assign({},e);this.secureProxy=e.secureProxy||uN(s.protocol),s.host=s.hostname||s.host,typeof s.port=="string"&&(s.port=parseInt(s.port,10)),!s.port&&s.host&&(s.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in s)&&(s.ALPNProtocols=["http 1.1"]),s.host&&s.path&&(delete s.path,delete s.pathname),this.proxy=s}callback(t,e){return sN(this,void 0,void 0,function*(){let{proxy:s,secureProxy:n}=this,i;n?(hi("Creating `tls.Socket`: %o",s),i=Bb.default.connect(s)):(hi("Creating `net.Socket`: %o",s),i=Fb.default.connect(s));let a=Object.assign({},s.headers),c=`CONNECT ${`${e.host}:${e.port}`} HTTP/1.1\r
35
- `;s.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(s.auth).toString("base64")}`);let{host:l,port:u,secureEndpoint:p}=e;lN(u,p)||(l+=`:${u}`),a.Host=l,a.Connection="close";for(let y of Object.keys(a))c+=`${y}: ${a[y]}\r
36
- `;let h=oN.default(i);i.write(`${c}\r
37
- `);let{statusCode:d,buffered:f}=yield h;if(d===200){if(t.once("socket",cN),e.secureEndpoint){hi("Upgrading socket connection to TLS");let y=e.servername||e.host;return Bb.default.connect(Object.assign(Object.assign({},pN(e,"host","hostname","path","port")),{socket:i,servername:y}))}return i}i.destroy();let m=new Fb.default.Socket({writable:!1});return m.readable=!0,t.once("socket",y=>{hi("replaying proxy buffer for failed request"),nN.default(y.listenerCount("data")>0),y.push(f),y.push(null)}),m})}};Ls.default=Kp;function cN(r){r.resume()}function lN(r,t){return!!(!t&&r===80||t&&r===443)}function uN(r){return typeof r=="string"?/^https:?$/i.test(r):!1}function pN(r,...t){let e={},s;for(s in r)t.includes(s)||(e[s]=r[s]);return e}});var qb=_((Zp,Ub)=>{"use strict";var hN=Zp&&Zp.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},Xp=hN(jb());function Qp(r){return new Xp.default(r)}(function(r){r.HttpsProxyAgent=Xp.default,r.prototype=Xp.default.prototype})(Qp||(Qp={}));Ub.exports=Qp});var sh=_(th=>{var{_nullishCoalesce:eh}=ue();Object.defineProperty(th,"__esModule",{value:!0});var Gb=ne(),dN=require("http"),fN=require("https"),mN=qb(),yN=require("stream"),$b=require("url"),gN=require("zlib"),bN=1024*32;function SN(r){return new yN.Readable({read(){this.push(r),this.push(null)}})}function _N(r){let t;try{t=new $b.URL(r.url)}catch{return console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used."),Gb.createTransport(r,()=>Promise.resolve({}))}let e=t.protocol==="https:",s=xN(t,r.proxy||(e?process.env.https_proxy:void 0)||process.env.http_proxy),n=e?fN:dN,i=r.keepAlive===void 0?!1:r.keepAlive,a=s?new mN.HttpsProxyAgent(s):new n.Agent({keepAlive:i,maxSockets:30,timeout:2e3}),o=EN(r,eh(r.httpModule,()=>n),a);return Gb.createTransport(r,o)}function xN(r,t){let{no_proxy:e}=process.env;if(!(e&&e.split(",").some(n=>r.host.endsWith(n)||r.hostname.endsWith(n))))return t}function EN(r,t,e){let{hostname:s,pathname:n,port:i,protocol:a,search:o}=new $b.URL(r.url);return function(l){return new Promise((u,p)=>{let h=SN(l.body),d={...r.headers};l.body.length>bN&&(d["content-encoding"]="gzip",h=h.pipe(gN.createGzip()));let f=t.request({method:"POST",agent:e,headers:d,hostname:s,path:`${n}${o}`,port:i,protocol:a,ca:r.caCerts},m=>{m.on("data",()=>{}),m.on("end",()=>{}),m.setEncoding("utf8");let y=eh(m.headers["retry-after"],()=>null),b=eh(m.headers["x-sentry-rate-limits"],()=>null);u({statusCode:m.statusCode,headers:{"retry-after":y,"x-sentry-rate-limits":Array.isArray(b)?b[0]:b}})});f.on("error",p),h.pipe(f)})}}th.makeNodeTransport=_N});var Fr=_(rh=>{Object.defineProperty(rh,"__esModule",{value:!0});var TN=L(),PN=TN.parseSemver(process.versions.node);rh.NODE_VERSION=PN});var Yb=_(nh=>{var{_optionalChain:vN}=ue();Object.defineProperty(nh,"__esModule",{value:!0});var Rs=ne(),Hb=require("domain");function Vb(){return Hb.active}function AN(){let r=Vb();if(r)return Rs.ensureHubOnCarrier(r),Rs.getHubFromCarrier(r)}function CN(r){let t={};return Rs.ensureHubOnCarrier(t,r),Rs.getHubFromCarrier(t)}function wN(r,t){let e=Vb();if(e&&vN([t,"optionalAccess",a=>a.reuseExisting]))return r();let s=Hb.create(),n=e?Rs.getHubFromCarrier(e):void 0,i=CN(n);return Rs.setHubOnCarrier(s,i),s.bind(()=>r())()}function IN(){Rs.setAsyncContextStrategy({getCurrentHub:AN,runWithAsyncContext:wN})}nh.setDomainAsyncContextStrategy=IN});var Wb=_(ah=>{var{_optionalChain:NN}=ue();Object.defineProperty(ah,"__esModule",{value:!0});var ih=ne(),kN=require("async_hooks"),go;function DN(){go||(go=new kN.AsyncLocalStorage);function r(){return go.getStore()}function t(s){let n={};return ih.ensureHubOnCarrier(n,s),ih.getHubFromCarrier(n)}function e(s,n){let i=r();if(i&&NN([n,"optionalAccess",o=>o.reuseExisting]))return s();let a=t(i);return go.run(a,()=>s())}ih.setAsyncContextStrategy({getCurrentHub:r,runWithAsyncContext:e})}ah.setHooksAsyncContextStrategy=DN});var Jb=_(oh=>{Object.defineProperty(oh,"__esModule",{value:!0});var zb=Fr(),ON=Yb(),MN=Wb();function LN(){zb.NODE_VERSION.major&&zb.NODE_VERSION.major>=14?MN.setHooksAsyncContextStrategy():ON.setDomainAsyncContextStrategy()}oh.setNodeAsyncContextStrategy=LN});var lh=_(ch=>{Object.defineProperty(ch,"__esModule",{value:!0});var RN=ne(),Kb=L(),FN=require("util"),bo=class r{constructor(){r.prototype.__init.call(this)}static __initStatic(){this.id="Console"}__init(){this.name=r.id}setupOnce(){Kb.addInstrumentationHandler("console",({args:t,level:e})=>{let s=RN.getCurrentHub();s.getIntegration(r)&&s.addBreadcrumb({category:"console",level:Kb.severityLevelFromString(e),message:FN.format.apply(void 0,t)},{input:[...t],level:e})})}};bo.__initStatic();ch.Console=bo});var di=_(So=>{(function(r,t){let e=typeof So=="object"?So:typeof r=="object"?r:{};t(e),typeof define=="function"&&define.amd&&define("lru",e)})(So,function(r){let t=Symbol("newer"),e=Symbol("older");function s(c,l){typeof c!="number"&&(l=c,c=0),this.size=0,this.limit=c,this.oldest=this.newest=void 0,this._keymap=new Map,l&&(this.assign(l),c<1&&(this.limit=this.size))}r.LRUMap=s;function n(c,l){this.key=c,this.value=l,this[t]=void 0,this[e]=void 0}s.prototype._markEntryAsUsed=function(c){c!==this.newest&&(c[t]&&(c===this.oldest&&(this.oldest=c[t]),c[t][e]=c[e]),c[e]&&(c[e][t]=c[t]),c[t]=void 0,c[e]=this.newest,this.newest&&(this.newest[t]=c),this.newest=c)},s.prototype.assign=function(c){let l,u=this.limit||Number.MAX_VALUE;this._keymap.clear();let p=c[Symbol.iterator]();for(let h=p.next();!h.done;h=p.next()){let d=new n(h.value[0],h.value[1]);if(this._keymap.set(d.key,d),l?(l[t]=d,d[e]=l):this.oldest=d,l=d,u--==0)throw new Error("overflow")}this.newest=l,this.size=this._keymap.size},s.prototype.get=function(c){var l=this._keymap.get(c);if(l)return this._markEntryAsUsed(l),l.value},s.prototype.set=function(c,l){var u=this._keymap.get(c);return u?(u.value=l,this._markEntryAsUsed(u),this):(this._keymap.set(c,u=new n(c,l)),this.newest?(this.newest[t]=u,u[e]=this.newest):this.oldest=u,this.newest=u,++this.size,this.size>this.limit&&this.shift(),this)},s.prototype.shift=function(){var c=this.oldest;if(c)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[e]=void 0):(this.oldest=void 0,this.newest=void 0),c[t]=c[e]=void 0,this._keymap.delete(c.key),--this.size,[c.key,c.value]},s.prototype.find=function(c){let l=this._keymap.get(c);return l?l.value:void 0},s.prototype.has=function(c){return this._keymap.has(c)},s.prototype.delete=function(c){var l=this._keymap.get(c);if(l)return this._keymap.delete(l.key),l[t]&&l[e]?(l[e][t]=l[t],l[t][e]=l[e]):l[t]?(l[t][e]=void 0,this.oldest=l[t]):l[e]?(l[e][t]=void 0,this.newest=l[e]):this.oldest=this.newest=void 0,this.size--,l.value},s.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()};function i(c){this.entry=c}i.prototype[Symbol.iterator]=function(){return this},i.prototype.next=function(){let c=this.entry;return c?(this.entry=c[t],{done:!1,value:[c.key,c.value]}):{done:!0,value:void 0}};function a(c){this.entry=c}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let c=this.entry;return c?(this.entry=c[t],{done:!1,value:c.key}):{done:!0,value:void 0}};function o(c){this.entry=c}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let c=this.entry;return c?(this.entry=c[t],{done:!1,value:c.value}):{done:!0,value:void 0}},s.prototype.keys=function(){return new a(this.oldest)},s.prototype.values=function(){return new o(this.oldest)},s.prototype.entries=function(){return this},s.prototype[Symbol.iterator]=function(){return new i(this.oldest)},s.prototype.forEach=function(c,l){typeof l!="object"&&(l=this);let u=this.oldest;for(;u;)c.call(l,u.value,u.key,this),u=u[t]},s.prototype.toJSON=function(){for(var c=new Array(this.size),l=0,u=this.oldest;u;)c[l++]={key:u.key,value:u.value},u=u[t];return c},s.prototype.toString=function(){for(var c="",l=this.oldest;l;)c+=String(l.key)+":"+l.value,l=l[t],l&&(c+=" < ");return c}})});var ph=_(us=>{var{_optionalChain:ht}=ue();Object.defineProperty(us,"__esModule",{value:!0});var BN=ne(),Xb=require("url"),Qb=Fr();function jN(r){let t=ht([BN.getCurrentHub,"call",e=>e(),"access",e=>e.getClient,"call",e=>e(),"optionalAccess",e=>e.getDsn,"call",e=>e()]);return t?r.includes(t.host):!1}function UN(r){let t=r.protocol||"",e=r.hostname||r.host||"",s=!r.port||r.port===80||r.port===443?"":`:${r.port}`,n=r.path?r.path:"/";return`${t}//${e}${s}${n}`}function Zb(r){let t=r.protocol||"",e=r.hostname||r.host||"",s=!r.port||r.port===80||r.port===443?"":`:${r.port}`,n=r.pathname||"/",i=r.auth?qN(r.auth):"";return`${t}//${i}${e}${s}${n}`}function qN(r){let[t,e]=r.split(":");return`${t?"[Filtered]":""}:${e?"[Filtered]":""}@`}function GN(r,t,e){if(!r)return r;let[s,n]=r.split(" ");return t.host&&!t.protocol&&(t.protocol=ht([e,"optionalAccess",i=>i.agent,"optionalAccess",i=>i.protocol]),n=Zb(t)),ht([n,"optionalAccess",i=>i.startsWith,"call",i=>i("///")])&&(n=n.slice(2)),`${s} ${n}`}function uh(r){let t={protocol:r.protocol,hostname:typeof r.hostname=="string"&&r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,hash:r.hash,search:r.search,pathname:r.pathname,path:`${r.pathname||""}${r.search||""}`,href:r.href};return r.port!==""&&(t.port=Number(r.port)),(r.username||r.password)&&(t.auth=`${r.username}:${r.password}`),t}function $N(r,t){let e,s;return typeof t[t.length-1]=="function"&&(e=t.pop()),typeof t[0]=="string"?s=uh(new Xb.URL(t[0])):t[0]instanceof Xb.URL?s=uh(t[0]):s=t[0],t.length===2&&(s={...s,...t[1]}),s.protocol===void 0&&(Qb.NODE_VERSION.major&&Qb.NODE_VERSION.major>8?s.protocol=ht([ht([r,"optionalAccess",n=>n.globalAgent]),"optionalAccess",n=>n.protocol])||ht([s.agent,"optionalAccess",n=>n.protocol])||ht([s._defaultAgent,"optionalAccess",n=>n.protocol]):s.protocol=ht([s.agent,"optionalAccess",n=>n.protocol])||ht([s._defaultAgent,"optionalAccess",n=>n.protocol])||ht([ht([r,"optionalAccess",n=>n.globalAgent]),"optionalAccess",n=>n.protocol])),e?[s,e]:[s]}us.cleanSpanDescription=GN;us.extractRawUrl=UN;us.extractUrl=Zb;us.isSentryRequest=jN;us.normalizeRequestArgs=$N;us.urlToOptions=uh});var dh=_(hh=>{var{_optionalChain:Fs}=ue();Object.defineProperty(hh,"__esModule",{value:!0});var _o=ne(),vt=L(),eS=di(),tS=Fr(),Br=ph(),fi=class r{static __initStatic(){this.id="Http"}__init(){this.name=r.id}constructor(t={}){r.prototype.__init.call(this),this._breadcrumbs=typeof t.breadcrumbs>"u"?!0:t.breadcrumbs,this._tracing=t.tracing?t.tracing===!0?{}:t.tracing:void 0}setupOnce(t,e){if(!this._breadcrumbs&&!this._tracing)return;let s=Fs([e,"call",c=>c(),"access",c=>c.getClient,"call",c=>c(),"optionalAccess",c=>c.getOptions,"call",c=>c()]);if(s&&s.instrumenter!=="sentry"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&vt.logger.log("HTTP Integration is skipped because of instrumenter configuration.");return}let n=Fs([this,"access",c=>c._tracing,"optionalAccess",c=>c.shouldCreateSpanForRequest])||Fs([s,"optionalAccess",c=>c.shouldCreateSpanForRequest]),i=Fs([s,"optionalAccess",c=>c.tracePropagationTargets])||Fs([this,"access",c=>c._tracing,"optionalAccess",c=>c.tracePropagationTargets]),a=require("http"),o=sS(a,this._breadcrumbs,n,i);if(vt.fill(a,"get",o),vt.fill(a,"request",o),tS.NODE_VERSION.major&&tS.NODE_VERSION.major>8){let c=require("https"),l=sS(c,this._breadcrumbs,n,i);vt.fill(c,"get",l),vt.fill(c,"request",l)}}};fi.__initStatic();function sS(r,t,e,s){let n=new eS.LRUMap(100),i=new eS.LRUMap(100),a=l=>{if(e===void 0)return!0;let u=n.get(l);if(u!==void 0)return u;let p=e(l);return n.set(l,p),p},o=l=>{if(s===void 0)return!0;let u=i.get(l);if(u!==void 0)return u;let p=vt.stringMatchesSomePattern(l,s);return i.set(l,p),p};function c(l,u,p,h){_o.getCurrentHub().getIntegration(fi)&&_o.getCurrentHub().addBreadcrumb({category:"http",data:{status_code:h&&h.statusCode,...u},type:"http"},{event:l,request:p,response:h})}return function(u){return function(...h){let d=Br.normalizeRequestArgs(r,h),f=d[0],m=Br.extractRawUrl(f),y=Br.extractUrl(f);if(Br.isSentryRequest(y))return u.apply(r,d);let b=_o.getCurrentHub(),x=b.getScope(),N=x.getSpan(),T=HN(y,f),P=a(m)?Fs([N,"optionalAccess",A=>A.startChild,"call",A=>A({op:"http.client",origin:"auto.http.node.http",description:`${T["http.method"]} ${T.url}`,data:T})]):void 0;if(o(m))if(P){let A=P.toTraceparent(),k=Fs([P,"optionalAccess",$=>$.transaction,"optionalAccess",$=>$.getDynamicSamplingContext,"call",$=>$()]);rS(f,y,A,k)}else{let A=b.getClient(),{traceId:k,sampled:$,dsc:xe}=x.getPropagationContext(),Ve=vt.generateSentryTraceHeader(k,void 0,$),yi=xe||(A?_o.getDynamicSamplingContextFromClient(k,A,x):void 0);rS(f,y,Ve,yi)}else(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&vt.logger.log(`[Tracing] Not adding sentry-trace header to outgoing request (${y}) due to mismatching tracePropagationTargets option.`);return u.apply(r,d).once("response",function(A){let k=this;t&&c("response",T,k,A),P&&(A.statusCode&&P.setHttpStatus(A.statusCode),P.description=Br.cleanSpanDescription(P.description,f,k),P.finish())}).once("error",function(){let A=this;t&&c("error",T,A),P&&(P.setHttpStatus(500),P.description=Br.cleanSpanDescription(P.description,f,A),P.finish())})}}}function rS(r,t,e,s){if((r.headers||{})["sentry-trace"])return;(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&vt.logger.log(`[Tracing] Adding sentry-trace header ${e} to outgoing request to "${t}": `);let i=vt.dynamicSamplingContextToSentryBaggageHeader(s),a=i&&i.length>0?VN(r,i):void 0;r.headers={...r.headers,"sentry-trace":e,...a&&{baggage:a}}}function HN(r,t){let e=t.method||"GET",s={url:r,"http.method":e};return t.hash&&(s["http.fragment"]=t.hash.substring(1)),t.search&&(s["http.query"]=t.search.substring(1)),s}function VN(r,t){if(!r.headers||!r.headers.baggage)return t;if(t){if(Array.isArray(r.headers.baggage))return[...r.headers.baggage,t]}else return r.headers.baggage;return[r.headers.baggage,t]}hh.Http=fi});var yh=_(mh=>{Object.defineProperty(mh,"__esModule",{value:!0});var YN=ne(),fh=L(),WN=2e3;function zN(r){console.error(r);let t=YN.getCurrentHub().getClient();t===void 0&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fh.logger.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1));let e=t.getOptions(),s=e&&e.shutdownTimeout&&e.shutdownTimeout>0&&e.shutdownTimeout||WN;t.close(s).then(n=>{n||(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fh.logger.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},n=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&fh.logger.error(n)})}mh.logAndExitProcess=zN});var bh=_(gh=>{Object.defineProperty(gh,"__esModule",{value:!0});var nS=ne(),JN=L(),iS=yh(),xo=class r{static __initStatic(){this.id="OnUncaughtException"}__init(){this.name=r.id}__init2(){this.handler=this._makeErrorHandler()}constructor(t={}){r.prototype.__init.call(this),r.prototype.__init2.call(this),this._options={exitEvenIfOtherHandlersAreRegistered:!0,...t}}setupOnce(){global.process.on("uncaughtException",this.handler)}_makeErrorHandler(){let e=!1,s=!1,n=!1,i;return a=>{let o=iS.logAndExitProcess,c=nS.getCurrentHub().getClient();this._options.onFatalError?o=this._options.onFatalError:c&&c.getOptions().onFatalError&&(o=c.getOptions().onFatalError);let u=global.process.listeners("uncaughtException").reduce((h,d)=>d.name==="domainUncaughtExceptionClear"||d.tag&&d.tag==="sentry_tracingErrorCallback"||d===this.handler?h:h+1,0)===0,p=this._options.exitEvenIfOtherHandlersAreRegistered||u;if(e)p&&(n?((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&JN.logger.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),iS.logAndExitProcess(a)):s||(s=!0,setTimeout(()=>{n||(n=!0,o(i,a))},2e3)));else{let h=nS.getCurrentHub();i=a,e=!0,h.getIntegration(r)?h.withScope(d=>{d.setLevel("fatal"),h.captureException(a,{originalException:a,data:{mechanism:{handled:!1,type:"onuncaughtexception"}}}),!n&&p&&(n=!0,o(a))}):!n&&p&&(n=!0,o(a))}}}};xo.__initStatic();gh.OnUncaughtException=xo});var _h=_(Sh=>{Object.defineProperty(Sh,"__esModule",{value:!0});var KN=ne(),aS=L(),XN=yh(),Eo=class r{static __initStatic(){this.id="OnUnhandledRejection"}__init(){this.name=r.id}constructor(t={mode:"warn"}){this._options=t,r.prototype.__init.call(this)}setupOnce(){global.process.on("unhandledRejection",this.sendUnhandledPromise.bind(this))}sendUnhandledPromise(t,e){let s=KN.getCurrentHub();s.getIntegration(r)&&s.withScope(n=>{n.setExtra("unhandledPromiseRejection",!0),s.captureException(t,{originalException:e,data:{mechanism:{handled:!1,type:"onunhandledrejection"}}})}),this._handleRejection(t)}_handleRejection(t){let e="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";this._options.mode==="warn"?aS.consoleSandbox(()=>{console.warn(e),console.error(t&&t.stack?t.stack:t)}):this._options.mode==="strict"&&(aS.consoleSandbox(()=>{console.warn(e)}),XN.logAndExitProcess(t))}};Eo.__initStatic();Sh.OnUnhandledRejection=Eo});var Eh=_(xh=>{Object.defineProperty(xh,"__esModule",{value:!0});var QN=L(),ZN=Up(),ek="cause",tk=5,To=class r{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=r.id}constructor(t={}){r.prototype.__init.call(this),this._key=t.key||ek,this._limit=t.limit||tk}setupOnce(){}preprocessEvent(t,e,s){let n=s.getOptions();QN.applyAggregateErrorsToEvent(ZN.exceptionFromError,n.stackParser,n.maxValueLength,this._key,this._limit,t,e)}};To.__initStatic();xh.LinkedErrors=To});var vh=_(Ph=>{Object.defineProperty(Ph,"__esModule",{value:!0});var oS=require("fs"),cS=require("path"),Th;function sk(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function rk(){let r=require.main&&require.main.paths||[],t=sk(),e={},s={};return t.forEach(n=>{let i=n,a=()=>{let o=i;if(i=cS.dirname(o),!i||o===i||s[o])return;if(r.indexOf(i)<0)return a();let c=cS.join(o,"package.json");if(s[o]=!0,!oS.existsSync(c))return a();try{let l=JSON.parse(oS.readFileSync(c,"utf8"));e[l.name]=l.version}catch{}};a()}),e}var Po=class r{constructor(){r.prototype.__init.call(this)}static __initStatic(){this.id="Modules"}__init(){this.name=r.id}setupOnce(t,e){t(s=>e().getIntegration(r)?{...s,modules:{...s.modules,...this._getModules()}}:s)}_getModules(){return Th||(Th=rk()),Th}};Po.__initStatic();Ph.Modules=Po});var wh=_(Ch=>{var{_optionalChain:Ah}=ue();Object.defineProperty(Ch,"__esModule",{value:!0});var nk=L(),ik=require("fs"),ak=di(),vo=new ak.LRUMap(100),ok=7;function ck(r){return new Promise((t,e)=>{ik.readFile(r,"utf8",(s,n)=>{s?e(s):t(n)})})}var Ao=class r{static __initStatic(){this.id="ContextLines"}__init(){this.name=r.id}constructor(t={}){this._options=t,r.prototype.__init.call(this)}get _contextLines(){return this._options.frameContextLines!==void 0?this._options.frameContextLines:ok}setupOnce(t,e){t(s=>e().getIntegration(r)?this.addSourceContext(s):s)}async addSourceContext(t){let e={},s=[];if(this._contextLines>0&&Ah([t,"access",n=>n.exception,"optionalAccess",n=>n.values])){for(let n of t.exception.values)if(Ah([n,"access",i=>i.stacktrace,"optionalAccess",i=>i.frames]))for(let i=n.stacktrace.frames.length-1;i>=0;i--){let a=n.stacktrace.frames[i];a.filename&&!e[a.filename]&&!vo.get(a.filename)&&(s.push(lk(a.filename)),e[a.filename]=1)}}if(s.length>0&&await Promise.all(s),this._contextLines>0&&Ah([t,"access",n=>n.exception,"optionalAccess",n=>n.values]))for(let n of t.exception.values)n.stacktrace&&n.stacktrace.frames&&await this.addSourceContextToFrames(n.stacktrace.frames);return t}addSourceContextToFrames(t){for(let e of t)if(e.filename&&e.context_line===void 0){let s=vo.get(e.filename);if(s)try{nk.addContextToFrame(s,e,this._contextLines)}catch{}}}};Ao.__initStatic();async function lk(r){let t=vo.get(r);if(t===null)return null;if(t!==void 0)return t;let e=null;try{e=(await ck(r)).split(`
38
- `)}catch{}return vo.set(r,e),e}Ch.ContextLines=Ao});var Ih=_(jr=>{var{_optionalChain:Bs}=ue();Object.defineProperty(jr,"__esModule",{value:!0});var uk=require("child_process"),uS=require("fs"),rt=require("os"),pk=require("path"),pS=require("util"),hS=pS.promisify(uS.readFile),dS=pS.promisify(uS.readdir),Co=class r{static __initStatic(){this.id="Context"}__init(){this.name=r.id}constructor(t={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0}){this._options=t,r.prototype.__init.call(this)}setupOnce(t){t(e=>this.addContext(e))}async addContext(t){this._cachedContext===void 0&&(this._cachedContext=this._getContexts());let e=this._updateContext(await this._cachedContext);return t.contexts={...t.contexts,app:{...e.app,...Bs([t,"access",s=>s.contexts,"optionalAccess",s=>s.app])},os:{...e.os,...Bs([t,"access",s=>s.contexts,"optionalAccess",s=>s.os])},device:{...e.device,...Bs([t,"access",s=>s.contexts,"optionalAccess",s=>s.device])},culture:{...e.culture,...Bs([t,"access",s=>s.contexts,"optionalAccess",s=>s.culture])},cloud_resource:{...e.cloud_resource,...Bs([t,"access",s=>s.contexts,"optionalAccess",s=>s.cloud_resource])}},t}_updateContext(t){return Bs([t,"optionalAccess",e=>e.app,"optionalAccess",e=>e.app_memory])&&(t.app.app_memory=process.memoryUsage().rss),Bs([t,"optionalAccess",e=>e.device,"optionalAccess",e=>e.free_memory])&&(t.device.free_memory=rt.freemem()),t}async _getContexts(){let t={};if(this._options.os&&(t.os=await hk()),this._options.app&&(t.app=fk()),this._options.device&&(t.device=fS(this._options.device)),this._options.culture){let e=dk();e&&(t.culture=e)}return this._options.cloudResource&&(t.cloud_resource=_k()),t}};Co.__initStatic();async function hk(){let r=rt.platform();switch(r){case"darwin":return bk();case"linux":return Sk();default:return{name:mk[r]||r,version:rt.release()}}}function dk(){try{if(typeof process.versions.icu!="string")return;let r=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(r)==="enero"){let e=Intl.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone}}}catch{}}function fk(){let r=process.memoryUsage().rss;return{app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:r}}function fS(r){let t={},e;try{e=rt.uptime&&rt.uptime()}catch{}if(typeof e=="number"&&(t.boot_time=new Date(Date.now()-e*1e3).toISOString()),t.arch=rt.arch(),(r===!0||r.memory)&&(t.memory_size=rt.totalmem(),t.free_memory=rt.freemem()),r===!0||r.cpu){let s=rt.cpus();if(s&&s.length){let n=s[0];t.processor_count=s.length,t.cpu_description=n.model,t.processor_frequency=n.speed}}return t}var mk={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},yk=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],gk={alpine:r=>r,arch:r=>At(/distrib_release=(.*)/,r),centos:r=>At(/release ([^ ]+)/,r),debian:r=>r,fedora:r=>At(/release (..)/,r),mint:r=>At(/distrib_release=(.*)/,r),red:r=>At(/release ([^ ]+)/,r),suse:r=>At(/VERSION = (.*)\n/,r),ubuntu:r=>At(/distrib_release=(.*)/,r)};function At(r,t){let e=r.exec(t);return e?e[1]:void 0}async function bk(){let r={kernel_version:rt.release(),name:"Mac OS X",version:`10.${Number(rt.release().split(".")[0])-4}`};try{let t=await new Promise((e,s)=>{uk.execFile("/usr/bin/sw_vers",(n,i)=>{if(n){s(n);return}e(i)})});r.name=At(/^ProductName:\s+(.*)$/m,t),r.version=At(/^ProductVersion:\s+(.*)$/m,t),r.build=At(/^BuildVersion:\s+(.*)$/m,t)}catch{}return r}function lS(r){return r.split(" ")[0].toLowerCase()}async function Sk(){let r={kernel_version:rt.release(),name:"Linux"};try{let t=await dS("/etc"),e=yk.find(o=>t.includes(o.name));if(!e)return r;let s=pk.join("/etc",e.name),n=(await hS(s,{encoding:"utf-8"})).toLowerCase(),{distros:i}=e;r.name=i.find(o=>n.indexOf(lS(o))>=0)||i[0];let a=lS(r.name);r.version=gk[a](n)}catch{}return r}function _k(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}jr.Context=Co;jr.getDeviceContext=fS;jr.readDirAsync=dS;jr.readFileAsync=hS});var mS=_(Nh=>{"use strict";Nh.parse=Tk;Nh.serialize=Pk;var xk=decodeURIComponent,Ek=encodeURIComponent,wo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Tk(r,t){if(typeof r!="string")throw new TypeError("argument str must be a string");for(var e={},s=t||{},n=r.split(";"),i=s.decode||xk,a=0;a<n.length;a++){var o=n[a],c=o.indexOf("=");if(!(c<0)){var l=o.substring(0,c).trim();if(e[l]==null){var u=o.substring(c+1,o.length).trim();u[0]==='"'&&(u=u.slice(1,-1)),e[l]=vk(u,i)}}}return e}function Pk(r,t,e){var s=e||{},n=s.encode||Ek;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!wo.test(r))throw new TypeError("argument name is invalid");var i=n(t);if(i&&!wo.test(i))throw new TypeError("argument val is invalid");var a=r+"="+i;if(s.maxAge!=null){var o=s.maxAge-0;if(isNaN(o)||!isFinite(o))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(o)}if(s.domain){if(!wo.test(s.domain))throw new TypeError("option domain is invalid");a+="; Domain="+s.domain}if(s.path){if(!wo.test(s.path))throw new TypeError("option path is invalid");a+="; Path="+s.path}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(a+="; HttpOnly"),s.secure&&(a+="; Secure"),s.sameSite){var c=typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite;switch(c){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function vk(r,t){try{return t(r)}catch{return r}}});var mi=_(Ur=>{var{_optionalChain:Ak}=ue();Object.defineProperty(Ur,"__esModule",{value:!0});var Io=L(),Ck=mS(),wk=require("url"),Ik={ip:!1,request:!0,transaction:!0,user:!0},Nk=["cookies","data","headers","method","query_string","url"],yS=["id","username","email"];function kh(r,t={}){let e=r.method&&r.method.toUpperCase(),s="",n="url";t.customRoute||r.route?(s=t.customRoute||`${r.baseUrl||""}${r.route&&r.route.path}`,n="route"):(r.originalUrl||r.url)&&(s=Io.stripUrlQueryAndFragment(r.originalUrl||r.url||""));let i="";return t.method&&e&&(i+=e),t.method&&t.path&&(i+=" "),t.path&&s&&(i+=s),[i,n]}function kk(r,t){switch(t){case"path":return kh(r,{path:!0})[0];case"handler":return r.route&&r.route.stack&&r.route.stack[0]&&r.route.stack[0].name||"<anonymous>";case"methodPath":default:return kh(r,{path:!0,method:!0})[0]}}function Dk(r,t){let e={};return(Array.isArray(t)?t:yS).forEach(n=>{r&&n in r&&(e[n]=r[n])}),e}function Dh(r,t){let{include:e=Nk}=t||{},s={},n=r.headers||{},i=r.method,a=r.hostname||r.host||n.host||"<no host>",o=r.protocol==="https"||r.socket&&r.socket.encrypted?"https":"http",c=r.originalUrl||r.url||"",l=c.startsWith(o)?c:`${o}://${a}${c}`;return e.forEach(u=>{switch(u){case"headers":{s.headers=n,e.includes("cookies")||delete s.headers.cookie;break}case"method":{s.method=i;break}case"url":{s.url=l;break}case"cookies":{s.cookies=r.cookies||n.cookie&&Ck.parse(n.cookie)||{};break}case"query_string":{s.query_string=Mk(r);break}case"data":{if(i==="GET"||i==="HEAD")break;r.body!==void 0&&(s.data=Io.isString(r.body)?r.body:JSON.stringify(Io.normalize(r.body)));break}default:({}).hasOwnProperty.call(r,u)&&(s[u]=r[u])}}),s}function Ok(r,t,e){let s={...Ik,...Ak([e,"optionalAccess",n=>n.include])};if(s.request){let n=Array.isArray(s.request)?Dh(t,{include:s.request}):Dh(t);r.request={...r.request,...n}}if(s.user){let n=t.user&&Io.isPlainObject(t.user)?Dk(t.user,s.user):{};Object.keys(n).length&&(r.user={...r.user,...n})}if(s.ip){let n=t.ip||t.socket&&t.socket.remoteAddress;n&&(r.user={...r.user,ip_address:n})}return s.transaction&&!r.transaction&&(r.transaction=kk(t,s.transaction)),r}function Mk(r){let t=r.originalUrl||r.url||"";if(t)return t.startsWith("/")&&(t=`http://dogs.are.great${t}`),r.query||typeof URL!==void 0&&new URL(t).search.replace("?","")||wk.parse(t).query||void 0}Ur.DEFAULT_USER_INCLUDES=yS;Ur.addRequestDataToEvent=Ok;Ur.extractPathForTransaction=kh;Ur.extractRequestData=Dh});var Lh=_(Mh=>{Object.defineProperty(Mh,"__esModule",{value:!0});var Lk=L(),Rk=mi(),Oh={include:{cookies:!0,data:!0,headers:!0,ip:!1,query_string:!0,url:!0,user:{id:!0,username:!0,email:!0}},transactionNamingScheme:"methodPath"},No=class r{static __initStatic(){this.id="RequestData"}__init(){this.name=r.id}constructor(t={}){r.prototype.__init.call(this),this._addRequestData=Rk.addRequestDataToEvent,this._options={...Oh,...t,include:{method:!0,...Oh.include,...t.include,user:t.include&&typeof t.include.user=="boolean"?t.include.user:{...Oh.include.user,...(t.include||{}).user}}}}setupOnce(t,e){let{transactionNamingScheme:s}=this._options;t(n=>{let i=e(),a=i.getIntegration(r),{sdkProcessingMetadata:o={}}=n,c=o.request;if(!a||!c)return n;let l=o.requestDataOptionsFromExpressHandler||o.requestDataOptionsFromGCPWrapper||Fk(this._options),u=this._addRequestData(n,c,l);if(n.type==="transaction"||s==="handler")return u;let h=c._sentryTransaction;if(h){let d=Bk(i)==="sentry.javascript.nextjs"?h.name.startsWith("/api"):s!=="path",[f]=Lk.extractPathForTransaction(c,{path:!0,method:d,customRoute:h.name});u.transaction=f}return u})}};No.__initStatic();function Fk(r){let{transactionNamingScheme:t,include:{ip:e,user:s,...n}}=r,i=[];for(let[o,c]of Object.entries(n))c&&i.push(o);let a;if(s===void 0)a=!0;else if(typeof s=="boolean")a=s;else{let o=[];for(let[c,l]of Object.entries(s))l&&o.push(c);a=o}return{include:{ip:e,user:a,request:i.length!==0?i:void 0,transaction:t}}}function Bk(r){try{return r.getClient().getOptions()._metadata.sdk.name}catch{return}}Mh.RequestData=No});var Bh=_(Do=>{var{_optionalChain:he}=ue();Object.defineProperty(Do,"__esModule",{value:!0});var jk=L(),Uk=di(),qk=Fr();function Fh(r){let t=[],e=!1;function s(a){t=[],!e&&(e=!0,r(a))}t.push(s);function n(a){t.push(a)}function i(a){let o=t.pop()||s;try{o(a)}catch{s(a)}}return{add:n,next:i}}var Rh=class{constructor(){let{Session:t}=require("inspector");this._session=new t}configureAndConnect(t,e){this._session.connect(),this._session.on("Debugger.paused",s=>{t(s,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(t,e){this._getProperties(t,s=>{let{add:n,next:i}=Fh(e);for(let a of s)if(he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.objectId])&&he([a,"optionalAccess",o=>o.value,"access",o=>o.className])==="Array"){let o=a.value.objectId;n(c=>this._unrollArray(o,a.name,c,i))}else if(he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.objectId])&&he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.className])==="Object"){let o=a.value.objectId;n(c=>this._unrollObject(o,a.name,c,i))}else(he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.value])||he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.description]))&&n(o=>this._unrollOther(a,o,i));i({})})}_getProperties(t,e){this._session.post("Runtime.getProperties",{objectId:t,ownProperties:!0},(s,n)=>{e(s?[]:n.result)})}_unrollArray(t,e,s,n){this._getProperties(t,i=>{s[e]=i.filter(a=>a.name!=="length"&&!isNaN(parseInt(a.name,10))).sort((a,o)=>parseInt(a.name,10)-parseInt(o.name,10)).map(a=>he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.value])),n(s)})}_unrollObject(t,e,s,n){this._getProperties(t,i=>{s[e]=i.map(a=>[a.name,he([a,"optionalAccess",o=>o.value,"optionalAccess",o=>o.value])]).reduce((a,[o,c])=>(a[o]=c,a),{}),n(s)})}_unrollOther(t,e,s){he([t,"optionalAccess",n=>n.value,"optionalAccess",n=>n.value])?e[t.name]=t.value.value:he([t,"optionalAccess",n=>n.value,"optionalAccess",n=>n.description])&&he([t,"optionalAccess",n=>n.value,"optionalAccess",n=>n.type])!=="function"&&(e[t.name]=`<${t.value.description}>`),s(e)}};function Gk(){try{return new Rh}catch{return}}function gS(r){return r!==void 0&&["","?","<anonymous>"].includes(r)}function $k(r,t){return r===t||gS(r)&&gS(t)}function bS(r){if(r!==void 0)return r.slice(-10).reduce((t,e)=>`${t},${e.function},${e.lineno},${e.colno}`,"")}function Hk(r,t){if(t!==void 0)return bS(r(t,1))}var ko=class r{static __initStatic(){this.id="LocalVariables"}__init(){this.name=r.id}__init2(){this._cachedFrames=new Uk.LRUMap(20)}constructor(t={},e=Gk()){this._options=t,this._session=e,r.prototype.__init.call(this),r.prototype.__init2.call(this)}setupOnce(t,e){this._setup(t,he([e,"call",s=>s(),"access",s=>s.getClient,"call",s=>s(),"optionalAccess",s=>s.getOptions,"call",s=>s()]))}_setup(t,e){if(this._session&&he([e,"optionalAccess",s=>s.includeLocalVariables])){if((qk.NODE_VERSION.major||0)<18){jk.logger.log("The `LocalVariables` integration is only supported on Node >= v18.");return}this._session.configureAndConnect((n,i)=>this._handlePaused(e.stackParser,n,i),!!this._options.captureAllExceptions),t(async n=>this._addLocalVariables(n))}}_handlePaused(t,{params:{reason:e,data:s,callFrames:n}},i){if(e!=="exception"&&e!=="promiseRejection"){i();return}let a=Hk(t,he([s,"optionalAccess",l=>l.description]));if(a==null){i();return}let{add:o,next:c}=Fh(l=>{this._cachedFrames.set(a,l),i()});for(let l=0;l<Math.min(n.length,5);l++){let{scopeChain:u,functionName:p,this:h}=n[l],d=u.find(m=>m.type==="local"),f=h.className==="global"||!h.className?p:`${h.className}.${p}`;if(he([d,"optionalAccess",m=>m.object,"access",m=>m.objectId])===void 0)o(m=>{m[l]={function:f},c(m)});else{let m=d.object.objectId;o(y=>he([this,"access",b=>b._session,"optionalAccess",b=>b.getLocalVariables,"call",b=>b(m,x=>{y[l]={function:f,vars:x},c(y)})]))}}c([])}_addLocalVariables(t){for(let e of he([t,"optionalAccess",s=>s.exception,"optionalAccess",s=>s.values])||[])this._addLocalVariablesToException(e);return t}_addLocalVariablesToException(t){let e=bS(he([t,"optionalAccess",i=>i.stacktrace,"optionalAccess",i=>i.frames]));if(e===void 0)return;let s=this._cachedFrames.delete(e);if(s===void 0)return;let n=he([t,"access",i=>i.stacktrace,"optionalAccess",i=>i.frames,"optionalAccess",i=>i.length])||0;for(let i=0;i<n;i++){let a=n-i-1;if(!he([t,"optionalAccess",o=>o.stacktrace,"optionalAccess",o=>o.frames,"optionalAccess",o=>o[a]])||!s[i])break;s[i].vars===void 0||t.stacktrace.frames[a].in_app===!1||!$k(t.stacktrace.frames[a].function,s[i].function)||(t.stacktrace.frames[a].vars=s[i].vars)}}};ko.__initStatic();Do.LocalVariables=ko;Do.createCallbackList=Fh});var Uh=_((Yt,TS)=>{var{_optionalChain:ES}=ue();Object.defineProperty(Yt,"__esModule",{value:!0});var Oo=ne(),js=L(),SS=di(),_S=Fr(),jh=ph();Yt.ChannelName=void 0;(function(r){let t="undici:request:create";r.RequestCreate=t;let e="undici:request:headers";r.RequestEnd=e;let s="undici:request:error";r.RequestError=s})(Yt.ChannelName||(Yt.ChannelName={}));var Mo=class r{static __initStatic(){this.id="Undici"}__init(){this.name=r.id}__init2(){this._createSpanUrlMap=new SS.LRUMap(100)}__init3(){this._headersUrlMap=new SS.LRUMap(100)}constructor(t={}){r.prototype.__init.call(this),r.prototype.__init2.call(this),r.prototype.__init3.call(this),r.prototype.__init4.call(this),r.prototype.__init5.call(this),r.prototype.__init6.call(this),this._options={breadcrumbs:t.breadcrumbs===void 0?!0:t.breadcrumbs,shouldCreateSpanForRequest:t.shouldCreateSpanForRequest}}setupOnce(t){if(_S.NODE_VERSION.major&&_S.NODE_VERSION.major<16)return;let e;try{e=js.dynamicRequire(TS,"diagnostics_channel")}catch{}!e||!e.subscribe||(e.subscribe(Yt.ChannelName.RequestCreate,this._onRequestCreate),e.subscribe(Yt.ChannelName.RequestEnd,this._onRequestEnd),e.subscribe(Yt.ChannelName.RequestError,this._onRequestError))}_shouldCreateSpan(t){if(this._options.shouldCreateSpanForRequest===void 0)return!0;let e=this._createSpanUrlMap.get(t);if(e!==void 0)return e;let s=this._options.shouldCreateSpanForRequest(t);return this._createSpanUrlMap.set(t,s),s}__init4(){this._onRequestCreate=t=>{let e=Oo.getCurrentHub();if(!e.getIntegration(r))return;let{request:s}=t,n=s.origin?s.origin.toString()+s.path:s.path;if(jh.isSentryRequest(n)||s.__sentry_span__!==void 0)return;let i=e.getClient();if(!i)return;let a=i.getOptions(),o=e.getScope(),c=o.getSpan(),l=this._shouldCreateSpan(n)?Vk(c,s,n):void 0;if(l&&(s.__sentry_span__=l),(p=>{if(a.tracePropagationTargets===void 0)return!0;let h=this._headersUrlMap.get(p);if(h!==void 0)return h;let d=js.stringMatchesSomePattern(p,a.tracePropagationTargets);return this._headersUrlMap.set(p,d),d})(n))if(l){let p=ES([l,"optionalAccess",d=>d.transaction,"optionalAccess",d=>d.getDynamicSamplingContext,"call",d=>d()]),h=js.dynamicSamplingContextToSentryBaggageHeader(p);xS(s,l.toTraceparent(),h)}else{let{traceId:p,sampled:h,dsc:d}=o.getPropagationContext(),f=js.generateSentryTraceHeader(p,void 0,h),m=d||Oo.getDynamicSamplingContextFromClient(p,i,o),y=js.dynamicSamplingContextToSentryBaggageHeader(m);xS(s,f,y)}}}__init5(){this._onRequestEnd=t=>{let e=Oo.getCurrentHub();if(!e.getIntegration(r))return;let{request:s,response:n}=t,i=s.origin?s.origin.toString()+s.path:s.path;if(jh.isSentryRequest(i))return;let a=s.__sentry_span__;a&&(a.setHttpStatus(n.statusCode),a.finish()),this._options.breadcrumbs&&e.addBreadcrumb({category:"http",data:{method:s.method,status_code:n.statusCode,url:i},type:"http"},{event:"response",request:s,response:n})}}__init6(){this._onRequestError=t=>{let e=Oo.getCurrentHub();if(!e.getIntegration(r))return;let{request:s}=t,n=s.origin?s.origin.toString()+s.path:s.path;if(jh.isSentryRequest(n))return;let i=s.__sentry_span__;i&&(i.setStatus("internal_error"),i.finish()),this._options.breadcrumbs&&e.addBreadcrumb({category:"http",data:{method:s.method,url:n},level:"error",type:"http"},{event:"error",request:s})}}};Mo.__initStatic();function xS(r,t,e){r.__sentry_has_headers__||(r.addHeader("sentry-trace",t),e&&r.addHeader("baggage",e),r.__sentry_has_headers__=!0)}function Vk(r,t,e){let s=js.parseUrl(e),n=t.method||"GET",i={"http.method":n};return s.search&&(i["http.query"]=s.search),s.hash&&(i["http.fragment"]=s.hash),ES([r,"optionalAccess",a=>a.startChild,"call",a=>a({op:"http.client",origin:"auto.http.node.undici",description:`${n} ${js.getSanitizedUrlString(s)}`,data:i})])}Yt.Undici=Mo});var Gh=_(qh=>{Object.defineProperty(qh,"__esModule",{value:!0});var PS=require("path"),Yk=PS.sep==="\\";function Wk(r){return r.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function zk(r,t=Yk){if(!r)return;let e=t?Wk(r):r,{root:s,dir:n,base:i,ext:a}=PS.posix.parse(e),c=`${require&&require.main&&require.main.filename&&n||global.process.cwd()}/`,l=i;a===".js"&&(l=l.slice(0,l.length-3)),!s&&!n&&(n=".");let u=n.lastIndexOf("/node_modules/");if(u>-1)return`${n.slice(u+14).replace(/\//g,".")}:${l}`;if(u=`${n}/`.lastIndexOf(c,0),u===0){let p=n.slice(c.length).replace(/\//g,".");return p&&(p+=":"),p+=l,p}return l}qh.getModuleFromFilename=zk});var $h=_(Gs=>{var{_optionalChain:Jk}=ue();Object.defineProperty(Gs,"__esModule",{value:!0});var Us=ne(),qs=L(),Kk=Jb(),Xk=$p(),Qk=lh(),Zk=dh(),eD=bh(),tD=_h(),sD=Eh(),rD=vh(),nD=wh(),iD=Ih(),aD=Lh(),oD=Bh(),cD=Uh(),lD=Gh(),uD=sh(),vS=[new Us.Integrations.InboundFilters,new Us.Integrations.FunctionToString,new Qk.Console,new Zk.Http,new cD.Undici,new eD.OnUncaughtException,new tD.OnUnhandledRejection,new nD.ContextLines,new oD.LocalVariables,new iD.Context,new rD.Modules,new aD.RequestData,new sD.LinkedErrors];function pD(r={}){let t=Us.getMainCarrier();Kk.setNodeAsyncContextStrategy();let e=Jk([t,"access",i=>i.__SENTRY__,"optionalAccess",i=>i.integrations])||[];r.defaultIntegrations=r.defaultIntegrations===!1?[]:[...Array.isArray(r.defaultIntegrations)?r.defaultIntegrations:vS,...e],r.dsn===void 0&&process.env.SENTRY_DSN&&(r.dsn=process.env.SENTRY_DSN);let s=process.env.SENTRY_TRACES_SAMPLE_RATE;if(r.tracesSampleRate===void 0&&s){let i=parseFloat(s);isFinite(i)&&(r.tracesSampleRate=i)}if(r.release===void 0){let i=AS();i!==void 0?r.release=i:r.autoSessionTracking=!1}r.environment===void 0&&process.env.SENTRY_ENVIRONMENT&&(r.environment=process.env.SENTRY_ENVIRONMENT),r.autoSessionTracking===void 0&&r.dsn!==void 0&&(r.autoSessionTracking=!0),r.instrumenter===void 0&&(r.instrumenter="sentry");let n={...r,stackParser:qs.stackParserFromStackParserOptions(r.stackParser||CS),integrations:Us.getIntegrationsToSetup(r),transport:r.transport||uD.makeNodeTransport};Us.initAndBind(r.clientClass||Xk.NodeClient,n),r.autoSessionTracking&&dD(),fD()}function hD(r){if(r===void 0)return!1;let t=r&&r.getOptions();return t&&t.autoSessionTracking!==void 0?t.autoSessionTracking:!1}function AS(r){return process.env.SENTRY_RELEASE?process.env.SENTRY_RELEASE:qs.GLOBAL_OBJ.SENTRY_RELEASE&&qs.GLOBAL_OBJ.SENTRY_RELEASE.id?qs.GLOBAL_OBJ.SENTRY_RELEASE.id:process.env.GITHUB_SHA||process.env.COMMIT_REF||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA||r}var CS=qs.createStackParser(qs.nodeStackLineParser(lD.getModuleFromFilename));function dD(){let r=Us.getCurrentHub();r.startSession(),process.on("beforeExit",()=>{let t=r.getScope().getSession();t&&!["exited","crashed"].includes(t.status)&&r.endSession()})}function fD(){let r=(process.env.SENTRY_USE_ENVIRONMENT||"").toLowerCase();if(!["false","n","no","off","0"].includes(r)){let t=process.env.SENTRY_TRACE,e=process.env.SENTRY_BAGGAGE,{propagationContext:s}=qs.tracingContextFromHeaders(t,e);Us.getCurrentHub().getScope().setPropagationContext(s)}}Gs.defaultIntegrations=vS;Gs.defaultStackParser=CS;Gs.getSentryRelease=AS;Gs.init=pD;Gs.isAutoSessionTrackingEnabled=hD});var wS=_(Vh=>{Object.defineProperty(Vh,"__esModule",{value:!0});var Lo=require("fs"),Hh=require("path");function mD(r){let t=Hh.resolve(r);if(!Lo.existsSync(t))throw new Error(`Cannot read contents of ${t}. Directory does not exist.`);if(!Lo.statSync(t).isDirectory())throw new Error(`Cannot read contents of ${t}, because it is not a directory.`);let e=s=>Lo.readdirSync(s).reduce((n,i)=>{let a=Hh.join(s,i);return Lo.statSync(a).isDirectory()?n.concat(e(a)):(n.push(a),n)},[]);return e(t).map(s=>Hh.relative(t,s))}Vh.deepReadDirSync=mD});var NS=_(Ro=>{Object.defineProperty(Ro,"__esModule",{value:!0});var IS=mi();function yD(r,t){return IS.extractRequestData(r,{include:t})}function gD(r,t,e={}){return IS.addRequestDataToEvent(r,t,{include:e})}Ro.extractRequestData=yD;Ro.parseRequest=gD});var DS=_(hs=>{var{_optionalChain:qr}=ue();Object.defineProperty(hs,"__esModule",{value:!0});var dt=ne(),ps=L(),bD=mi(),Fo=$h(),kS=NS();function SD(){return function(t,e,s){let n=dt.getCurrentHub(),i=qr([n,"access",f=>f.getClient,"call",f=>f(),"optionalAccess",f=>f.getOptions,"call",f=>f()]);if(!i||i.instrumenter!=="sentry"||qr([t,"access",f=>f.method,"optionalAccess",f=>f.toUpperCase,"call",f=>f()])==="OPTIONS"||qr([t,"access",f=>f.method,"optionalAccess",f=>f.toUpperCase,"call",f=>f()])==="HEAD")return s();let a=t.headers&&ps.isString(t.headers["sentry-trace"])?t.headers["sentry-trace"]:void 0,o=qr([t,"access",f=>f.headers,"optionalAccess",f=>f.baggage]),{traceparentData:c,dynamicSamplingContext:l,propagationContext:u}=ps.tracingContextFromHeaders(a,o);if(n.getScope().setPropagationContext(u),!dt.hasTracingEnabled(i))return s();let[p,h]=ps.extractPathForTransaction(t,{path:!0,method:!0}),d=dt.startTransaction({name:p,op:"http.server",origin:"auto.http.node.tracingHandler",...c,metadata:{dynamicSamplingContext:c&&!l?{}:l,request:t,source:h}},{request:bD.extractRequestData(t)});n.configureScope(f=>{f.setSpan(d)}),e.__sentry_transaction=d,e.once("finish",()=>{setImmediate(()=>{ps.addRequestDataToTransaction(d,t),d.setHttpStatus(e.statusCode),d.finish()})}),s()}}function _D(r={}){let t;if("include"in r)t={include:r.include};else{let{ip:e,request:s,transaction:n,user:i}=r;(e||s||n||i)&&(t={include:ps.dropUndefinedKeys({ip:e,request:s,transaction:n,user:i})})}return t}function xD(r){let t=_D(r),e=dt.getCurrentHub(),s=e.getClient();if(s&&Fo.isAutoSessionTrackingEnabled(s)){s.initSessionFlusher();let n=e.getScope();n.getSession()&&n.setSession()}return function(i,a,o){if(r&&r.flushTimeout&&r.flushTimeout>0){let c=a.end;a.end=function(l,u,p){dt.flush(r.flushTimeout).then(()=>{c.call(this,l,u,p)}).then(null,h=>{(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&ps.logger.error(h),c.call(this,l,u,p)})}}dt.runWithAsyncContext(()=>{let c=dt.getCurrentHub();c.configureScope(l=>{l.setSDKProcessingMetadata({request:i,requestDataOptionsFromExpressHandler:t});let u=c.getClient();Fo.isAutoSessionTrackingEnabled(u)&&c.getScope().setRequestSession({status:"ok"})}),a.once("finish",()=>{let l=c.getClient();Fo.isAutoSessionTrackingEnabled(l)&&setImmediate(()=>{l&&l._captureRequestSession&&l._captureRequestSession()})}),o()})}}function ED(r){let t=r.status||r.statusCode||r.status_code||r.output&&r.output.statusCode;return t?parseInt(t,10):500}function TD(r){return ED(r)>=500}function PD(r){return function(e,s,n,i){if((r&&r.shouldHandleError||TD)(e)){dt.withScope(o=>{o.setSDKProcessingMetadata({request:s});let c=n.__sentry_transaction;c&&o.getSpan()===void 0&&o.setSpan(c);let l=dt.getCurrentHub().getClient();if(l&&Fo.isAutoSessionTrackingEnabled(l)&&l._sessionFlusher!==void 0){let h=o.getRequestSession();h&&h.status!==void 0&&(h.status="crashed")}o.addEventProcessor(p=>(ps.addExceptionMechanism(p,{type:"middleware",handled:!1}),p));let u=dt.captureException(e);n.sentry=u,i(e)});return}i(e)}}function vD(r={}){return function({path:t,type:e,next:s,rawInput:n}){let i=dt.getCurrentHub(),a=qr([i,"access",c=>c.getClient,"call",c=>c(),"optionalAccess",c=>c.getOptions,"call",c=>c()]),o=i.getScope().getTransaction();if(o){o.setName(`trpc/${t}`,"route"),o.op="rpc.server";let c={procedure_type:e};(r.attachRpcInput!==void 0?r.attachRpcInput:qr([a,"optionalAccess",l=>l.sendDefaultPii]))&&(c.input=ps.normalize(n)),o.setContext("trpc",c)}return s()}}hs.extractRequestData=kS.extractRequestData;hs.parseRequest=kS.parseRequest;hs.errorHandler=PD;hs.requestHandler=xD;hs.tracingHandler=SD;hs.trpcMiddleware=vD});var OS=_(He=>{Object.defineProperty(He,"__esModule",{value:!0});var AD=lh(),CD=dh(),wD=bh(),ID=_h(),ND=Eh(),kD=vh(),DD=wh(),OD=Ih(),MD=Lh(),LD=Bh(),RD=Uh();He.Console=AD.Console;He.Http=CD.Http;He.OnUncaughtException=wD.OnUncaughtException;He.OnUnhandledRejection=ID.OnUnhandledRejection;He.LinkedErrors=ND.LinkedErrors;He.Modules=kD.Modules;He.ContextLines=DD.ContextLines;He.Context=OD.Context;He.RequestData=MD.RequestData;He.LocalVariables=LD.LocalVariables;He.Undici=RD.Undici});var MS=_(Wt=>{Object.defineProperty(Wt,"__esModule",{value:!0});var $s=Fp();Wt.Apollo=$s.Apollo;Wt.Express=$s.Express;Wt.GraphQL=$s.GraphQL;Wt.Mongo=$s.Mongo;Wt.Mysql=$s.Mysql;Wt.Postgres=$s.Postgres;Wt.Prisma=$s.Prisma});var LS=_(j=>{Object.defineProperty(j,"__esModule",{value:!0});var H=ne(),FD=bb(),BD=$p(),jD=sh(),Bo=$h(),Yh=mi(),UD=wS(),qD=Gh(),GD=DS(),$D=OS(),HD=MS(),VD={...H.Integrations,...$D,...HD};j.Hub=H.Hub;j.SDK_VERSION=H.SDK_VERSION;j.Scope=H.Scope;j.addBreadcrumb=H.addBreadcrumb;j.addGlobalEventProcessor=H.addGlobalEventProcessor;j.captureCheckIn=H.captureCheckIn;j.captureEvent=H.captureEvent;j.captureException=H.captureException;j.captureMessage=H.captureMessage;j.close=H.close;j.configureScope=H.configureScope;j.createTransport=H.createTransport;j.extractTraceparentData=H.extractTraceparentData;j.flush=H.flush;j.getActiveSpan=H.getActiveSpan;j.getActiveTransaction=H.getActiveTransaction;j.getCurrentHub=H.getCurrentHub;j.getHubFromCarrier=H.getHubFromCarrier;j.lastEventId=H.lastEventId;j.makeMain=H.makeMain;j.runWithAsyncContext=H.runWithAsyncContext;j.setContext=H.setContext;j.setExtra=H.setExtra;j.setExtras=H.setExtras;j.setMeasurement=H.setMeasurement;j.setTag=H.setTag;j.setTags=H.setTags;j.setUser=H.setUser;j.spanStatusfromHttpCode=H.spanStatusfromHttpCode;j.startActiveSpan=H.startActiveSpan;j.startInactiveSpan=H.startInactiveSpan;j.startSpan=H.startSpan;j.startSpanManual=H.startSpanManual;j.startTransaction=H.startTransaction;j.trace=H.trace;j.withScope=H.withScope;j.autoDiscoverNodePerformanceMonitoringIntegrations=FD.autoDiscoverNodePerformanceMonitoringIntegrations;j.NodeClient=BD.NodeClient;j.makeNodeTransport=jD.makeNodeTransport;j.defaultIntegrations=Bo.defaultIntegrations;j.defaultStackParser=Bo.defaultStackParser;j.getSentryRelease=Bo.getSentryRelease;j.init=Bo.init;j.DEFAULT_USER_INCLUDES=Yh.DEFAULT_USER_INCLUDES;j.addRequestDataToEvent=Yh.addRequestDataToEvent;j.extractRequestData=Yh.extractRequestData;j.deepReadDirSync=UD.deepReadDirSync;j.getModuleFromFilename=qD.getModuleFromFilename;j.Handlers=GD;j.Integrations=VD});var ZD={};zh(ZD,{createDevToolsNodeSys:()=>US});module.exports=e_(ZD);var Fe=require("node:fs/promises"),RS=require("node:crypto"),ie=require("node:fs"),jo=require("node:os"),J=zt(require("node:path"),1),Wh=zt(require("prettier"),1),FS=zt(require("typescript"),1),BS=zt(require("launch-editor"),1);async function Kh(r,t){let e=r.resolve("/");for(let s=0;s<20;s++){let n=r.join(t,"package.json"),i=await r.readFile(n);if(i)return JSON.parse(i);if(t===e)break;t=r.dirname(t)}return null}var Zh=zt(Qh(),1);function ed(){try{let r=(0,Zh.default)();if(r?.name)return r.name}catch{}return"npm"}async function sd(r){let t=[],e=await Kh(r,r.getRepoRootDir());if(e){let s=await s_(e,r);t.push(...s)}return t}async function s_(r,t){let e=[];if(r&&typeof r=="object"){let s=new Set(Object.keys({...r.dependencies,...r.devDependencies}));for(let n of r_)if(s.has(n)&&!e.some(i=>i.name===n)){let i={name:n};td.has(n)&&(i.version=await td.get(n)(t)),e.push(i)}}return e}function $o(r){let t=parseInt(r);return Number.isNaN(t)?void 0:t}var td=new Map([["next",async r=>{if(!r.spawnSync)return;let t=ed(),e=t==="npm"?"npx":t,{stdout:s}=r.spawnSync(e,["next","-v"],{encoding:"utf8"});if(!s)return;let n=s.match(/(Next.js v)([\d.]+)/g);if(!n)return;let i=n[0].split("Next.js v")[1],[a,o,c]=i.split(".");return{major:$o(a),minor:$o(o),patch:$o(c)}}]]),r_=["@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 Gr=require("node:child_process");var sl={};zh(sl,{MagicastError:()=>Ce,builders:()=>xT,detectCodeFormat:()=>tm,generateCode:()=>tl,loadFile:()=>ST,parseExpression:()=>rm,parseModule:()=>sm,writeFile:()=>_T});var Gi=require("node:fs");var Ki=zt(wd(),1),xf=zt(af(),1);function qe(r){var t=r.use(ae),e=t.Type,s=t.builtInTypes,n=s.number;function i(l){return e.from(u=>n.check(u)&&u>=l,n+" >= "+l)}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(s.string,s.number,s.boolean,s.null,s.undefined);let c=e.from(l=>{if(l===null)return!0;var u=typeof l;return!(u==="object"||u==="function")},o.toString());return{geq:i,defaults:a,isPrimitive:c}}function X(r){try{var t=r(),e=t.exports,s=e.default}catch{return}s&&s!==e&&typeof e=="object"&&(Object.assign(s,e,{default:s}),e.__esModule&&Object.defineProperty(s,"__esModule",{value:!0}),t.exports=s)}var Yx=Object.defineProperty,Wx=(r,t,e)=>t in r?Yx(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Oe=(r,t,e)=>(Wx(r,typeof t!="symbol"?t+"":t,e),e),Ef=Object.prototype,$i=Ef.toString,ze=Ef.hasOwnProperty,_s=class{assert(t,e){if(!this.check(t,e)){var s=Kc(t);throw new Error(s+" does not match type "+this)}return!0}arrayOf(){let t=this;return new hn(t)}},hn=class extends _s{constructor(t){super(),this.elemType=t,Oe(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,e){return Array.isArray(t)&&t.every(s=>this.elemType.check(s,e))}},Hi=class extends _s{constructor(t){super(),this.value=t,Oe(this,"kind","IdentityType")}toString(){return String(this.value)}check(t,e){let s=t===this.value;return!s&&typeof e=="function"&&e(this,t),s}},Vi=class extends _s{constructor(t){super(),this.fields=t,Oe(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,e){return $i.call(t)===$i.call({})&&this.fields.every(s=>s.type.check(t[s.name],e))}},Yi=class extends _s{constructor(t){super(),this.types=t,Oe(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(t,e){return this.types.some(s=>s.check(t,!!e))?!0:(typeof e=="function"&&e(this,t),!1)}},Ss=class extends _s{constructor(t,e){super(),this.name=t,this.predicate=e,Oe(this,"kind","PredicateType")}toString(){return this.name}check(t,e){let s=this.predicate(t,e);return!s&&typeof e=="function"&&e(this,t),s}},un=class r{constructor(t,e){this.type=t,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(t){if(t instanceof r){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return ze.call(t.allSupertypes,this.typeName)}else throw new Error(t+" is not a Def")}checkAllFields(t,e){var s=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function n(i){var a=s[i],o=a.type,c=a.getValue(t);return o.check(c,e)}return t!==null&&typeof t=="object"&&Object.keys(s).every(n)}bases(...t){var e=this.baseNames;if(this.finalized){if(t.length!==e.length)throw new Error("");for(var s=0;s<t.length;s++)if(t[s]!==e[s])throw new Error("");return this}return t.forEach(n=>{e.indexOf(n)<0&&e.push(n)}),this}},Wi=class{constructor(t,e,s,n){this.name=t,this.type=e,this.defaultFn=s,Oe(this,"hidden"),this.hidden=!!n}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(t){var e=t[this.name];return typeof e<"u"||typeof this.defaultFn=="function"&&(e=this.defaultFn.call(t)),e}};function Kc(r){return Array.isArray(r)?"["+r.map(Kc).join(", ")+"]":r&&typeof r=="object"?"{ "+Object.keys(r).map(function(t){return t+": "+r[t]}).join(", ")+" }":JSON.stringify(r)}function ae(r){let t={or(...C){return new Yi(C.map(w=>t.from(w)))},from(C,w){if(C instanceof hn||C instanceof Hi||C instanceof Vi||C instanceof Yi||C instanceof Ss)return C;if(C instanceof un)return C.type;if(o.check(C)){if(C.length!==1)throw new Error("only one element type is permitted for typed arrays");return new hn(t.from(C[0]))}if(c.check(C))return new Vi(Object.keys(C).map(U=>new Wi(U,t.from(C[U],U))));if(typeof C=="function"){var B=e.indexOf(C);if(B>=0)return s[B];if(typeof w!="string")throw new Error("missing name");return new Ss(w,C)}return new Hi(C)},def(C){return ze.call(b,C)?b[C]:b[C]=new N(C)},hasDef(C){return ze.call(b,C)}};var e=[],s=[];function n(C,w){let B=$i.call(w),U=new Ss(C,Q=>$i.call(Q)===B);return w&&typeof w.constructor=="function"&&(e.push(w.constructor),s.push(U)),U}let i=n("string","truthy"),a=n("function",function(){}),o=n("array",[]),c=n("object",{}),l=n("RegExp",/./),u=n("Date",new Date),p=n("number",3),h=n("boolean",!0),d=n("null",null),f=n("undefined",void 0),m=typeof BigInt=="function"?n("BigInt",BigInt(1234)):new Ss("BigInt",()=>!1),y={string:i,function:a,array:o,object:c,RegExp:l,Date:u,number:p,boolean:h,null:d,undefined:f,BigInt:m};var b=Object.create(null);function x(C){if(C&&typeof C=="object"){var w=C.type;if(typeof w=="string"&&ze.call(b,w)){var B=b[w];if(B.finalized)return B}}return null}class N extends un{constructor(w){super(new Ss(w,(B,U)=>this.check(B,U)),w)}check(w,B){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(w===null||typeof w!="object")return!1;var U=x(w);return U?B&&U===this?this.checkAllFields(w,B):this.isSupertypeOf(U)?B?U.checkAllFields(w,B)&&this.checkAllFields(w,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(w,B):!1}build(...w){if(this.buildParams=w,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let B=(Q,ee,re,Ye)=>{if(!ze.call(Q,ee)){var Ct=this.allFields;if(!ze.call(Ct,ee))throw new Error(""+ee);var gi=Ct[ee],YS=gi.type,$r;if(Ye)$r=re;else if(gi.defaultFn)$r=gi.defaultFn.call(Q);else{var WS="no value or default function given for field "+JSON.stringify(ee)+" of "+this.typeName+"("+this.buildParams.map(function(zS){return Ct[zS]}).join(", ")+")";throw new Error(WS)}if(!YS.check($r))throw new Error(Kc($r)+" does not match field "+gi+" of type "+this.typeName);Q[ee]=$r}},U=(...Q)=>{var ee=Q.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var re=Object.create(k);if(this.buildParams.forEach(function(Ye,Ct){Ct<ee?B(re,Ye,Q[Ct],!0):B(re,Ye,null,!1)}),Object.keys(this.allFields).forEach(function(Ye){B(re,Ye,null,!1)}),re.type!==this.typeName)throw new Error("");return re};return U.from=Q=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var ee=Object.create(k);if(Object.keys(this.allFields).forEach(function(re){ze.call(Q,re)?B(ee,re,Q[re],!0):B(ee,re,null,!1)}),ee.type!==this.typeName)throw new Error("");return ee},Object.defineProperty(A,xe(this.typeName),{enumerable:!0,value:U}),this}field(w,B,U,Q){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(w)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[w]=new Wi(w,t.from(B),U,Q),this)}finalize(){if(!this.finalized){var w=this.allFields,B=this.allSupertypes;this.baseNames.forEach(Q=>{var ee=b[Q];if(ee instanceof un)ee.finalize(),Go(w,ee.allFields),Go(B,ee.allSupertypes);else{var re="unknown supertype name "+JSON.stringify(Q)+" for subtype "+JSON.stringify(this.typeName);throw new Error(re)}}),Go(w,this.ownFields),B[this.typeName]=this,this.fieldNames.length=0;for(var U in w)ze.call(w,U)&&!w[U].hidden&&this.fieldNames.push(U);Object.defineProperty(yi,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,HS(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&$S(this.typeName)}}}function T(C){if(!ze.call(b,C))throw new Error("");var w=b[C];if(w.finalized!==!0)throw new Error("");return w.supertypeList.slice(1)}function P(C){for(var w={},B=Object.keys(b),U=B.length,Q=0;Q<U;++Q){var ee=B[Q],re=b[ee];if(re.finalized!==!0)throw new Error(""+ee);for(var Ye=0;Ye<re.supertypeList.length;++Ye){var Ct=re.supertypeList[Ye];if(ze.call(C,Ct)){w[ee]=Ct;break}}}return w}var A=Object.create(null),k={};function $(C,w){var B=k[C];return f.check(w)?delete k[C]:(a.assert(w),Object.defineProperty(k,C,{enumerable:!0,configurable:!0,value:w})),B}function xe(C){return C.replace(/^[A-Z]+/,function(w){var B=w.length;switch(B){case 0:return"";case 1:return w.toLowerCase();default:return w.slice(0,B-1).toLowerCase()+w.charAt(B-1)}})}function Ve(C){return C=xe(C),C.replace(/(Expression)?$/,"Statement")}var yi={};function Uo(C){var w=x(C);if(w)return w.fieldNames.slice(0);if("type"in C)throw new Error("did not recognize object of type "+JSON.stringify(C.type));return Object.keys(C)}function qo(C,w){var B=x(C);if(B){var U=B.allFields[w];if(U)return U.getValue(C)}return C&&C[w]}function qS(C,w,B){Uo(C).forEach(function(U){w.call(this,U,qo(C,U))},B)}function GS(C,w,B){return Uo(C).some(function(U){return w.call(this,U,qo(C,U))},B)}function $S(C){var w=Ve(C);if(A[w])return;var B=A[xe(C)];if(!B)return;let U=function(...Q){return A.expressionStatement(B.apply(A,Q))};U.from=function(...Q){return A.expressionStatement(B.from.apply(A,Q))},A[w]=U}function HS(C,w){w.length=0,w.push(C);for(var B=Object.create(null),U=0;U<w.length;++U){C=w[U];var Q=b[C];if(Q.finalized!==!0)throw new Error("");ze.call(B,C)&&delete w[B[C]],B[C]=U,w.push.apply(w,Q.baseNames)}for(var ee=0,re=ee,Ye=w.length;re<Ye;++re)ze.call(w,re)&&(w[ee++]=w[re]);w.length=ee}function Go(C,w){return Object.keys(w).forEach(function(B){C[B]=w[B]}),C}function VS(){Object.keys(b).forEach(function(C){b[C].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:T,computeSupertypeLookupTable:P,builders:A,defineMethod:$,getBuilderName:xe,getStatementBuilderName:Ve,namedTypes:yi,getFieldNames:Uo,getFieldValue:qo,eachField:qS,someField:GS,finalize:VS}}X(()=>module);var zx=Object.prototype,Oi=zx.hasOwnProperty;function Tf(r){var t=r.use(ae),e=t.builtInTypes.array,s=t.builtInTypes.number;let n=function p(h,d,f){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(d){if(!(d instanceof p))throw new Error("")}else d=null,f=null;this.value=h,this.parentPath=d,this.name=f,this.__childCache=null};var i=n.prototype;function a(p){return p.__childCache||(p.__childCache=Object.create(null))}function o(p,h){var d=a(p),f=p.getValueProperty(h),m=d[h];return(!Oi.call(d,h)||m.value!==f)&&(m=d[h]=new p.constructor(f,p,h)),m}i.getValueProperty=function(h){return this.value[h]},i.get=function(...h){for(var d=this,f=h.length,m=0;m<f;++m)d=o(d,h[m]);return d},i.each=function(h,d){for(var f=[],m=this.value.length,y=0,y=0;y<m;++y)Oi.call(this.value,y)&&(f[y]=this.get(y));for(d=d||this,y=0;y<m;++y)Oi.call(f,y)&&h.call(d,f[y])},i.map=function(h,d){var f=[];return this.each(function(m){f.push(h.call(this,m))},d),f},i.filter=function(h,d){var f=[];return this.each(function(m){h.call(this,m)&&f.push(m)},d),f};function c(){}function l(p,h,d,f){if(e.assert(p.value),h===0)return c;var m=p.value.length;if(m<1)return c;var y=arguments.length;y===2?(d=0,f=m):y===3?(d=Math.max(d,0),f=m):(d=Math.max(d,0),f=Math.min(f,m)),s.assert(d),s.assert(f);for(var b=Object.create(null),x=a(p),N=d;N<f;++N)if(Oi.call(p.value,N)){var T=p.get(N);if(T.name!==N)throw new Error("");var P=N+h;T.name=P,b[P]=T,delete x[N]}return delete x.length,function(){for(var A in b){var k=b[A];if(k.name!==+A)throw new Error("");x[A]=k,p.value[A]=k.value}}}i.shift=function(){var h=l(this,-1),d=this.value.shift();return h(),d},i.unshift=function(...h){var d=l(this,h.length),f=this.value.unshift.apply(this.value,h);return d(),f},i.push=function(...h){return e.assert(this.value),delete a(this).length,this.value.push.apply(this.value,h)},i.pop=function(){e.assert(this.value);var h=a(this);return delete h[this.value.length-1],delete h.length,this.value.pop()},i.insertAt=function(h){var d=arguments.length,f=l(this,d-1,h);if(f===c&&d<=1)return this;h=Math.max(h,0);for(var m=1;m<d;++m)this.value[h+m-1]=arguments[m];return f(),this},i.insertBefore=function(...h){for(var d=this.parentPath,f=h.length,m=[this.name],y=0;y<f;++y)m.push(h[y]);return d.insertAt.apply(d,m)},i.insertAfter=function(...h){for(var d=this.parentPath,f=h.length,m=[this.name+1],y=0;y<f;++y)m.push(h[y]);return d.insertAt.apply(d,m)};function u(p){if(!(p instanceof n))throw new Error("");var h=p.parentPath;if(!h)return p;var d=h.value,f=a(h);if(d[p.name]===p.value)f[p.name]=p;else if(e.check(d)){var m=d.indexOf(p.value);m>=0&&(f[p.name=m]=p)}else d[p.name]=p.value,f[p.name]=p;if(d[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return i.replace=function(h){var d=[],f=this.parentPath.value,m=a(this.parentPath),y=arguments.length;if(u(this),e.check(f)){for(var b=f.length,x=l(this.parentPath,y-1,this.name+1),N=[this.name,1],T=0;T<y;++T)N.push(arguments[T]);var P=f.splice.apply(f,N);if(P[0]!==this.value)throw new Error("");if(f.length!==b-1+y)throw new Error("");if(x(),y===0)delete this.value,delete m[this.name],this.__childCache=null;else{if(f[this.name]!==h)throw new Error("");for(this.value!==h&&(this.value=h,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!==h&&(this.__childCache=null),this.value=f[this.name]=h,d.push(this);else if(y===0)delete f[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return d},n}X(()=>module);var tr=Object.prototype.hasOwnProperty;function Jx(r){var t=r.use(ae),e=t.Type,s=t.namedTypes,n=s.Node,i=s.Expression,a=t.builtInTypes.array,o=t.builders;let c=function T(P,A){if(!(this instanceof T))throw new Error("Scope constructor cannot be invoked without 'new'");u.check(P.value)||l.assert(P.value);var k;if(A){if(!(A instanceof T))throw new Error("");k=A.depth+1}else A=null,k=0;Object.defineProperties(this,{path:{value:P},node:{value:P.value},isGlobal:{value:!A,enumerable:!0},depth:{value:k},parent:{value:A},bindings:{value:{}},types:{value:{}}})};var l=e.or(s.Program,s.Function,s.CatchClause),u=e.or(s.Function,s.ClassDeclaration,s.ClassExpression,s.InterfaceDeclaration,s.TSInterfaceDeclaration,s.TypeAlias,s.TSTypeAliasDeclaration),p=e.or(s.TypeParameter,s.TSTypeParameter);c.isEstablishedBy=function(T){return l.check(T)||u.check(T)};var h=c.prototype;h.didScan=!1,h.declares=function(T){return this.scan(),tr.call(this.bindings,T)},h.declaresType=function(T){return this.scan(),tr.call(this.types,T)},h.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 P=0;this.declares(T+P);)++P;var A=T+P;return this.bindings[A]=t.builders.identifier(A)},h.injectTemporary=function(T,P){T||(T=this.declareTemporary());var A=this.path.get("body");return s.BlockStatement.check(A.value)&&(A=A.get("body")),A.unshift(o.variableDeclaration("var",[o.variableDeclarator(T,P||null)])),T},h.scan=function(T){if(T||!this.didScan){for(var P in this.bindings)delete this.bindings[P];for(var P in this.types)delete this.types[P];d(this.path,this.bindings,this.types),this.didScan=!0}},h.getBindings=function(){return this.scan(),this.bindings},h.getTypes=function(){return this.scan(),this.types};function d(T,P,A){var k=T.value;if(u.check(k)){let $=T.get("typeParameters","params");a.check($.value)&&$.each(xe=>{N(xe,A)})}l.check(k)&&(s.CatchClause.check(k)?b(T.get("param"),P):f(T,P,A))}function f(T,P,A){var k=T.value;T.parent&&s.FunctionExpression.check(T.parent.node)&&T.parent.node.id&&b(T.parent.get("id"),P),k&&(a.check(k)?T.each($=>{y($,P,A)}):s.Function.check(k)?(T.get("params").each($=>{b($,P)}),y(T.get("body"),P,A),f(T.get("typeParameters"),P,A)):s.TypeAlias&&s.TypeAlias.check(k)||s.InterfaceDeclaration&&s.InterfaceDeclaration.check(k)||s.TSTypeAliasDeclaration&&s.TSTypeAliasDeclaration.check(k)||s.TSInterfaceDeclaration&&s.TSInterfaceDeclaration.check(k)?x(T.get("id"),A):s.VariableDeclarator.check(k)?(b(T.get("id"),P),y(T.get("init"),P,A)):k.type==="ImportSpecifier"||k.type==="ImportNamespaceSpecifier"||k.type==="ImportDefaultSpecifier"?b(T.get(k.local?"local":k.name?"name":"id"),P):n.check(k)&&!i.check(k)&&t.eachField(k,function($,xe){var Ve=T.get($);if(!m(Ve,xe))throw new Error("");y(Ve,P,A)}))}function m(T,P){return!!(T.value===P||Array.isArray(T.value)&&T.value.length===0&&Array.isArray(P)&&P.length===0)}function y(T,P,A){var k=T.value;if(!(!k||i.check(k)))if(s.FunctionDeclaration.check(k)&&k.id!==null)b(T.get("id"),P);else if(s.ClassDeclaration&&s.ClassDeclaration.check(k)&&k.id!==null)b(T.get("id"),P),f(T.get("typeParameters"),P,A);else if(s.InterfaceDeclaration&&s.InterfaceDeclaration.check(k)||s.TSInterfaceDeclaration&&s.TSInterfaceDeclaration.check(k))x(T.get("id"),A);else if(l.check(k)){if(s.CatchClause.check(k)&&s.Identifier.check(k.param)){var $=k.param.name,xe=tr.call(P,$);f(T.get("body"),P,A),xe||delete P[$]}}else f(T,P,A)}function b(T,P){var A=T.value;s.Pattern.assert(A),s.Identifier.check(A)?tr.call(P,A.name)?P[A.name].push(T):P[A.name]=[T]:s.AssignmentPattern&&s.AssignmentPattern.check(A)?b(T.get("left"),P):s.ObjectPattern&&s.ObjectPattern.check(A)?T.get("properties").each(function(k){var $=k.value;s.Pattern.check($)?b(k,P):s.Property.check($)||s.ObjectProperty&&s.ObjectProperty.check($)?b(k.get("value"),P):s.SpreadProperty&&s.SpreadProperty.check($)&&b(k.get("argument"),P)}):s.ArrayPattern&&s.ArrayPattern.check(A)?T.get("elements").each(function(k){var $=k.value;s.Pattern.check($)?b(k,P):s.SpreadElement&&s.SpreadElement.check($)&&b(k.get("argument"),P)}):s.PropertyPattern&&s.PropertyPattern.check(A)?b(T.get("pattern"),P):(s.SpreadElementPattern&&s.SpreadElementPattern.check(A)||s.RestElement&&s.RestElement.check(A)||s.SpreadPropertyPattern&&s.SpreadPropertyPattern.check(A))&&b(T.get("argument"),P)}function x(T,P){var A=T.value;s.Pattern.assert(A),s.Identifier.check(A)&&(tr.call(P,A.name)?P[A.name].push(T):P[A.name]=[T])}function N(T,P){var A=T.value;p.assert(A),tr.call(P,A.name)?P[A.name].push(T):P[A.name]=[T]}return h.lookup=function(T){for(var P=this;P&&!P.declares(T);P=P.parent);return P},h.lookupType=function(T){for(var P=this;P&&!P.declaresType(T);P=P.parent);return P},h.getGlobalScope=function(){for(var T=this;!T.isGlobal;)T=T.parent;return T},c}X(()=>module);function Pf(r){var t=r.use(ae),e=t.namedTypes,s=t.builders,n=t.builtInTypes.number,i=t.builtInTypes.array,a=r.use(Tf),o=r.use(Jx);let c=function y(b,x,N){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");a.call(this,b,x,N)};var l=c.prototype=Object.create(a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(l,{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}}}),l.replace=function(){return delete this.node,delete this.parent,delete this.scope,a.prototype.replace.apply(this,arguments)},l.prune=function(){var y=this.parent;return this.replace(),f(y)},l._computeNode=function(){var y=this.value;if(e.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},l._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},l._computeScope=function(){var y=this.value,b=this.parentPath,x=b&&b.scope;return e.Node.check(y)&&o.isEstablishedBy(y)&&(x=new o(this,x)),x||null},l.getValueProperty=function(y){return t.getFieldValue(this.value,y)},l.needsParens=function(y){var b=this.parentPath;if(!b)return!1;var x=this.value;if(!e.Expression.check(x)||x.type==="Identifier")return!1;for(;!e.Node.check(b.value);)if(b=b.parentPath,!b)return!1;var N=b.value;switch(x.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return N.type==="MemberExpression"&&this.name==="object"&&N.object===x;case"BinaryExpression":case"LogicalExpression":switch(N.type){case"CallExpression":return this.name==="callee"&&N.callee===x;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&N.object===x;case"BinaryExpression":case"LogicalExpression":{let T=x,P=N.operator,A=p[P],k=T.operator,$=p[k];if(A>$)return!0;if(A===$&&this.name==="right"){if(N.right!==T)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(N.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(N.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 N.type==="MemberExpression"&&n.check(x.value)&&this.name==="object"&&N.object===x;case"AssignmentExpression":case"ConditionalExpression":switch(N.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&N.callee===x;case"ConditionalExpression":return this.name==="test"&&N.test===x;case"MemberExpression":return this.name==="object"&&N.object===x;default:return!1}default:if(N.type==="NewExpression"&&this.name==="callee"&&N.callee===x)return h(x)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function u(y){return e.BinaryExpression.check(y)||e.LogicalExpression.check(y)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,b){y.forEach(function(x){p[x]=b})});function h(y){return e.CallExpression.check(y)?!0:i.check(y)?y.some(h):e.Node.check(y)?t.someField(y,function(b,x){return h(x)}):!1}l.canBeFirstInStatement=function(){var y=this.node;return!e.FunctionExpression.check(y)&&!e.ObjectExpression.check(y)},l.firstInStatement=function(){return d(this)};function d(y){for(var b,x;y.parent;y=y.parent){if(b=y.node,x=y.parent.node,e.BlockStatement.check(x)&&y.parent.name==="body"&&y.name===0){if(x.body[0]!==b)throw new Error("Nodes must be equal");return!0}if(e.ExpressionStatement.check(x)&&y.name==="expression"){if(x.expression!==b)throw new Error("Nodes must be equal");return!0}if(e.SequenceExpression.check(x)&&y.parent.name==="expressions"&&y.name===0){if(x.expressions[0]!==b)throw new Error("Nodes must be equal");continue}if(e.CallExpression.check(x)&&y.name==="callee"){if(x.callee!==b)throw new Error("Nodes must be equal");continue}if(e.MemberExpression.check(x)&&y.name==="object"){if(x.object!==b)throw new Error("Nodes must be equal");continue}if(e.ConditionalExpression.check(x)&&y.name==="test"){if(x.test!==b)throw new Error("Nodes must be equal");continue}if(u(x)&&y.name==="left"){if(x.left!==b)throw new Error("Nodes must be equal");continue}if(e.UnaryExpression.check(x)&&!x.prefix&&y.name==="argument"){if(x.argument!==b)throw new Error("Nodes must be equal");continue}return!1}return!0}function f(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)&&m(y);return y}function m(y){var b=y.get("test").value,x=y.get("alternate").value,N=y.get("consequent").value;if(!N&&!x){var T=s.expressionStatement(b);y.replace(T)}else if(!N&&x){var P=s.unaryExpression("!",b,!0);e.UnaryExpression.check(b)&&b.operator==="!"&&(P=b.argument),y.get("test").replace(P),y.get("consequent").replace(x),y.get("alternate").replace()}}return c}X(()=>module);var Mi=Object.prototype.hasOwnProperty;function Kx(r){var t=r.use(ae),e=r.use(Pf),s=t.builtInTypes.array,n=t.builtInTypes.object,i=t.builtInTypes.function,a;let o=function f(){if(!(this instanceof f))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=Mi.call(this._methodNameTable,"Block")||Mi.call(this._methodNameTable,"Line"),this.Context=h(this),this._visiting=!1,this._changeReported=!1};function c(f){var m=Object.create(null);for(var y in f)/^visit[A-Z]/.test(y)&&(m[y.slice(5)]=!0);for(var b=t.computeSupertypeLookupTable(m),x=Object.create(null),N=Object.keys(b),T=N.length,P=0;P<T;++P){var A=N[P];y="visit"+b[A],i.check(f[y])&&(x[A]=y)}return x}o.fromMethodsObject=function(m){if(m instanceof o)return m;if(!n.check(m))return new o;let y=function x(){if(!(this instanceof x))throw new Error("Visitor constructor cannot be invoked without 'new'");o.call(this)};var b=y.prototype=Object.create(u);return b.constructor=y,l(b,m),l(y,o),i.assert(y.fromMethodsObject),i.assert(y.visit),new y};function l(f,m){for(var y in m)Mi.call(m,y)&&(f[y]=m[y]);return f}o.visit=function(m,y){return o.fromMethodsObject(y).visit(m)};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 f=arguments.length,m=new Array(f),y=0;y<f;++y)m[y]=arguments[y];m[0]instanceof e||(m[0]=new e({root:m[0]}).get("root")),this.reset.apply(this,m);var b;try{var x=this.visitWithoutReset(m[0]);b=!0}finally{if(this._visiting=!1,!b&&this._abortRequested)return m[0].value}return x},u.AbortRequest=function(){},u.abort=function(){var f=this;f._abortRequested=!0;var m=new f.AbortRequest;throw m.cancel=function(){f._abortRequested=!1},m},u.reset=function(f){},u.visitWithoutReset=function(f){if(this instanceof this.Context)return this.visitor.visitWithoutReset(f);if(!(f instanceof e))throw new Error("");var m=f.value,y=m&&typeof m=="object"&&typeof m.type=="string"&&this._methodNameTable[m.type];if(y){var b=this.acquireContext(f);try{return b.invokeVisitorMethod(y)}finally{this.releaseContext(b)}}else return p(f,this)};function p(f,m){if(!(f instanceof e))throw new Error("");if(!(m instanceof o))throw new Error("");var y=f.value;if(s.check(y))f.each(m.visitWithoutReset,m);else if(n.check(y)){var b=t.getFieldNames(y);m._shouldVisitComments&&y.comments&&b.indexOf("comments")<0&&b.push("comments");for(var x=b.length,N=[],T=0;T<x;++T){var P=b[T];Mi.call(y,P)||(y[P]=t.getFieldValue(y,P)),N.push(f.get(P))}for(var T=0;T<x;++T)m.visitWithoutReset(N[T])}return f.value}u.acquireContext=function(f){return this._reusableContextStack.length===0?new this.Context(f):this._reusableContextStack.pop().reset(f)},u.releaseContext=function(f){if(!(f instanceof this.Context))throw new Error("");this._reusableContextStack.push(f),f.currentPath=null},u.reportChanged=function(){this._changeReported=!0},u.wasChangeReported=function(){return this._changeReported};function h(f){function m(b){if(!(this instanceof m))throw new Error("");if(!(this instanceof o))throw new Error("");if(!(b instanceof e))throw new Error("");Object.defineProperty(this,"visitor",{value:f,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=b,this.needToCallTraverse=!0,Object.seal(this)}if(!(f instanceof o))throw new Error("");var y=m.prototype=Object.create(f);return y.constructor=m,l(y,d),m}var d=Object.create(null);return d.reset=function(m){if(!(this instanceof this.Context))throw new Error("");if(!(m instanceof e))throw new Error("");return this.currentPath=m,this.needToCallTraverse=!0,this},d.invokeVisitorMethod=function(m){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");var y=this.visitor[m].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 "+m);var b=this.currentPath;return b&&b.value},d.traverse=function(m,y){if(!(this instanceof this.Context))throw new Error("");if(!(m instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,p(m,o.fromMethodsObject(y||this.visitor))},d.visit=function(m,y){if(!(this instanceof this.Context))throw new Error("");if(!(m instanceof e))throw new Error("");if(!(this.currentPath instanceof e))throw new Error("");return this.needToCallTraverse=!1,o.fromMethodsObject(y||this.visitor).visitWithoutReset(m)},d.reportChanged=function(){this.visitor.reportChanged()},d.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},o}X(()=>module);function Xx(r){var t=r.use(ae),e=t.getFieldNames,s=t.getFieldValue,n=t.builtInTypes.array,i=t.builtInTypes.object,a=t.builtInTypes.Date,o=t.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function l(f,m,y){return n.check(y)?y.length=0:y=null,p(f,m,y)}l.assert=function(f,m){var y=[];if(!l(f,m,y))if(y.length===0){if(f!==m)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(u).join(""))};function u(f){return/[_$a-z][_$a-z0-9]*/i.test(f)?"."+f:"["+JSON.stringify(f)+"]"}function p(f,m,y){return f===m?!0:n.check(f)?h(f,m,y):i.check(f)?d(f,m,y):a.check(f)?a.check(m)&&+f==+m:o.check(f)?o.check(m)&&f.source===m.source&&f.global===m.global&&f.multiline===m.multiline&&f.ignoreCase===m.ignoreCase:f==m}function h(f,m,y){n.assert(f);var b=f.length;if(!n.check(m)||m.length!==b)return y&&y.push("length"),!1;for(var x=0;x<b;++x){if(y&&y.push(x),x in f!=x in m||!p(f[x],m[x],y))return!1;if(y){var N=y.pop();if(N!==x)throw new Error(""+N)}}return!0}function d(f,m,y){if(i.assert(f),!i.check(m))return!1;if(f.type!==m.type)return y&&y.push("type"),!1;var b=e(f),x=b.length,N=e(m),T=N.length;if(x===T){for(var P=0;P<x;++P){var A=b[P],k=s(f,A),$=s(m,A);if(y&&y.push(A),!p(k,$,y))return!1;if(y){var xe=y.pop();if(xe!==A)throw new Error(""+xe)}}return!0}if(!y)return!1;var Ve=Object.create(null);for(P=0;P<x;++P)Ve[b[P]]=!0;for(P=0;P<T;++P){if(A=N[P],!c.call(Ve,A))return y.push(A),!1;delete Ve[A]}for(A in Ve){y.push(A);break}return!1}return l}X(()=>module);function Qx(r){let t=Zx(),e=t.use(ae);r.forEach(t.use),e.finalize();let s=t.use(Kx);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:t.use(Xx),finalize:e.finalize,Path:t.use(Tf),NodePath:t.use(Pf),PathVisitor:s,use:t.use,visit:s.visit}}function Zx(){let r=[],t=[];function e(n){var i=r.indexOf(n);return i===-1&&(i=r.length,r.push(n),t[i]=n(s)),t[i]}var s={use:e};return s}X(()=>module);function vf(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}X(()=>module);function Af(r){let t=r.use(vf);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}X(()=>module);function Cf(r){let t=r.use(Af);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}X(()=>module);function eE(r){let t=r.use(Cf);return t.LogicalOperators.forEach(e=>{let s=e+"=";t.AssignmentOperators.indexOf(s)<0&&t.AssignmentOperators.push(s)}),t}X(()=>module);function tE(r){var t=r.use(ae),e=t.Type,s=e.def,n=e.or,i=r.use(qe),a=i.defaults,o=i.geq;let{BinaryOperators:c,AssignmentOperators:l,LogicalOperators:u}=r.use(vf);s("Printable").field("loc",n(s("SourceLocation"),null),a.null,!0),s("Node").bases("Printable").field("type",String).field("comments",n([s("Comment")],null),a.null,!0),s("SourceLocation").field("start",s("Position")).field("end",s("Position")).field("source",n(String,null),a.null),s("Position").field("line",o(1)).field("column",o(0)),s("File").bases("Node").build("program","name").field("program",s("Program")).field("name",n(String,null),a.null),s("Program").bases("Node").build("body").field("body",[s("Statement")]),s("Function").bases("Node").field("id",n(s("Identifier"),null),a.null).field("params",[s("Pattern")]).field("body",s("BlockStatement")).field("generator",Boolean,a.false).field("async",Boolean,a.false),s("Statement").bases("Node"),s("EmptyStatement").bases("Statement").build(),s("BlockStatement").bases("Statement").build("body").field("body",[s("Statement")]),s("ExpressionStatement").bases("Statement").build("expression").field("expression",s("Expression")),s("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",s("Expression")).field("consequent",s("Statement")).field("alternate",n(s("Statement"),null),a.null),s("LabeledStatement").bases("Statement").build("label","body").field("label",s("Identifier")).field("body",s("Statement")),s("BreakStatement").bases("Statement").build("label").field("label",n(s("Identifier"),null),a.null),s("ContinueStatement").bases("Statement").build("label").field("label",n(s("Identifier"),null),a.null),s("WithStatement").bases("Statement").build("object","body").field("object",s("Expression")).field("body",s("Statement")),s("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",s("Expression")).field("cases",[s("SwitchCase")]).field("lexical",Boolean,a.false),s("ReturnStatement").bases("Statement").build("argument").field("argument",n(s("Expression"),null)),s("ThrowStatement").bases("Statement").build("argument").field("argument",s("Expression")),s("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",s("BlockStatement")).field("handler",n(s("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[s("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[s("CatchClause")],a.emptyArray).field("finalizer",n(s("BlockStatement"),null),a.null),s("CatchClause").bases("Node").build("param","guard","body").field("param",s("Pattern")).field("guard",n(s("Expression"),null),a.null).field("body",s("BlockStatement")),s("WhileStatement").bases("Statement").build("test","body").field("test",s("Expression")).field("body",s("Statement")),s("DoWhileStatement").bases("Statement").build("body","test").field("body",s("Statement")).field("test",s("Expression")),s("ForStatement").bases("Statement").build("init","test","update","body").field("init",n(s("VariableDeclaration"),s("Expression"),null)).field("test",n(s("Expression"),null)).field("update",n(s("Expression"),null)).field("body",s("Statement")),s("ForInStatement").bases("Statement").build("left","right","body").field("left",n(s("VariableDeclaration"),s("Expression"))).field("right",s("Expression")).field("body",s("Statement")),s("DebuggerStatement").bases("Statement").build(),s("Declaration").bases("Statement"),s("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",s("Identifier")),s("FunctionExpression").bases("Function","Expression").build("id","params","body"),s("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",n("var","let","const")).field("declarations",[s("VariableDeclarator")]),s("VariableDeclarator").bases("Node").build("id","init").field("id",s("Pattern")).field("init",n(s("Expression"),null),a.null),s("Expression").bases("Node"),s("ThisExpression").bases("Expression").build(),s("ArrayExpression").bases("Expression").build("elements").field("elements",[n(s("Expression"),null)]),s("ObjectExpression").bases("Expression").build("properties").field("properties",[s("Property")]),s("Property").bases("Node").build("kind","key","value").field("kind",n("init","get","set")).field("key",n(s("Literal"),s("Identifier"))).field("value",s("Expression")),s("SequenceExpression").bases("Expression").build("expressions").field("expressions",[s("Expression")]);var p=n("-","+","!","~","typeof","void","delete");s("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",s("Expression")).field("prefix",Boolean,a.true);let h=n(...c);s("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",s("Expression")).field("right",s("Expression"));let d=n(...l);s("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n(s("Pattern"),s("MemberExpression"))).field("right",s("Expression"));var f=n("++","--");s("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",s("Expression")).field("prefix",Boolean);var m=n(...u);s("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",s("Expression")).field("right",s("Expression")),s("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",s("Expression")).field("consequent",s("Expression")).field("alternate",s("Expression")),s("NewExpression").bases("Expression").build("callee","arguments").field("callee",s("Expression")).field("arguments",[s("Expression")]),s("CallExpression").bases("Expression").build("callee","arguments").field("callee",s("Expression")).field("arguments",[s("Expression")]),s("MemberExpression").bases("Expression").build("object","property","computed").field("object",s("Expression")).field("property",n(s("Identifier"),s("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),s("Pattern").bases("Node"),s("SwitchCase").bases("Node").build("test","consequent").field("test",n(s("Expression"),null)).field("consequent",[s("Statement")]),s("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,a.false),s("Literal").bases("Expression").build("value").field("value",n(String,Boolean,null,Number,RegExp,BigInt)),s("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}X(()=>module);function sE(r){r.use(tE);let t=r.use(ae),e=t.Type.def,s=t.Type.or,n=r.use(qe).defaults;e("Function").field("generator",Boolean,n.false).field("expression",Boolean,n.false).field("defaults",[s(e("Expression"),null)],n.emptyArray).field("rest",s(e("Identifier"),null),n.null),e("RestElement").bases("Pattern").build("argument").field("argument",e("Pattern")).field("typeAnnotation",s(e("TypeAnnotation"),e("TSTypeAnnotation"),null),n.null),e("SpreadElementPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("FunctionDeclaration").build("id","params","body","generator","expression").field("id",s(e("Identifier"),null)),e("FunctionExpression").build("id","params","body","generator","expression"),e("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,n.null).field("body",s(e("BlockStatement"),e("Expression"))).field("generator",!1,n.false),e("ForOfStatement").bases("Statement").build("left","right","body").field("left",s(e("VariableDeclaration"),e("Pattern"))).field("right",e("Expression")).field("body",e("Statement")),e("YieldExpression").bases("Expression").build("argument","delegate").field("argument",s(e("Expression"),null)).field("delegate",Boolean,n.false),e("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",s(e("Expression"),null)),e("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",e("Expression")).field("blocks",[e("ComprehensionBlock")]).field("filter",s(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",s(e("Literal"),e("Identifier"),e("Expression"))).field("value",s(e("Expression"),e("Pattern"))).field("method",Boolean,n.false).field("shorthand",Boolean,n.false).field("computed",Boolean,n.false),e("ObjectProperty").field("shorthand",Boolean,n.false),e("PropertyPattern").bases("Pattern").build("key","pattern").field("key",s(e("Literal"),e("Identifier"),e("Expression"))).field("pattern",e("Pattern")).field("computed",Boolean,n.false),e("ObjectPattern").bases("Pattern").build("properties").field("properties",[s(e("PropertyPattern"),e("Property"))]),e("ArrayPattern").bases("Pattern").build("elements").field("elements",[s(e("Pattern"),null)]),e("SpreadElement").bases("Node").build("argument").field("argument",e("Expression")),e("ArrayExpression").field("elements",[s(e("Expression"),e("SpreadElement"),e("RestElement"),null)]),e("NewExpression").field("arguments",[s(e("Expression"),e("SpreadElement"))]),e("CallExpression").field("arguments",[s(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",s("constructor","method","get","set")).field("key",e("Expression")).field("value",e("Function")).field("computed",Boolean,n.false).field("static",Boolean,n.false);let i=s(e("MethodDefinition"),e("VariableDeclarator"),e("ClassPropertyDefinition"),e("ClassProperty"),e("StaticBlock"));e("ClassProperty").bases("Declaration").build("key").field("key",s(e("Literal"),e("Identifier"),e("Expression"))).field("computed",Boolean,n.false),e("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",i),e("ClassBody").bases("Declaration").build("body").field("body",[i]),e("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",s(e("Identifier"),null)).field("body",e("ClassBody")).field("superClass",s(e("Expression"),null),n.null),e("ClassExpression").bases("Expression").build("id","body","superClass").field("id",s(e("Identifier"),null),n.null).field("body",e("ClassBody")).field("superClass",s(e("Expression"),null),n.null),e("Super").bases("Expression").build(),e("Specifier").bases("Node"),e("ModuleSpecifier").bases("Specifier").field("local",s(e("Identifier"),null),n.null).field("id",s(e("Identifier"),null),n.null).field("name",s(e("Identifier"),null),n.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",[s(e("ImportSpecifier"),e("ImportNamespaceSpecifier"),e("ImportDefaultSpecifier"))],n.emptyArray).field("source",e("Literal")).field("importKind",s("value","type"),function(){return"value"}),e("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(e("Declaration"),null)).field("specifiers",[e("ExportSpecifier")],n.emptyArray).field("source",s(e("Literal"),null),n.null),e("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",e("Identifier")),e("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(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"))}X(()=>module);function rE(r){r.use(Af),r.use(sE)}X(()=>module);function nE(r){r.use(rE);let e=r.use(ae).Type.def,s=r.use(qe).defaults;e("Function").field("async",Boolean,s.false),e("AwaitExpression").bases("Expression").build("argument").field("argument",e("Expression"))}X(()=>module);function iE(r){r.use(nE);let t=r.use(ae),e=t.Type.def,s=t.Type.or,n=r.use(qe).defaults;e("ForOfStatement").field("await",Boolean,n.false),e("SpreadProperty").bases("Node").build("argument").field("argument",e("Expression")),e("ObjectExpression").field("properties",[s(e("Property"),e("SpreadProperty"),e("SpreadElement"))]),e("TemplateElement").field("value",{cooked:s(String,null),raw:String}),e("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",e("Pattern")),e("ObjectPattern").field("properties",[s(e("PropertyPattern"),e("Property"),e("RestElement"),e("SpreadPropertyPattern"))])}X(()=>module);function aE(r){r.use(iE);let t=r.use(ae),e=t.Type.def,s=t.Type.or,n=r.use(qe).defaults;e("CatchClause").field("param",s(e("Pattern"),null),n.null)}X(()=>module);function oE(r){r.use(Cf),r.use(aE);let t=r.use(ae),e=t.Type.def,s=t.Type.or,i=r.use(qe).defaults;e("ImportExpression").bases("Expression").build("source").field("source",e("Expression")),e("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",e("Literal")).field("exported",s(e("Identifier"),null,void 0),i.null),e("ChainElement").bases("Node").field("optional",Boolean,i.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,i.true),e("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,i.true)}X(()=>module);function cE(r){r.use(eE),r.use(oE)}X(()=>module);function lE(r){r.use(cE);let e=r.use(ae).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}X(()=>module);function yn(r){r.use(lE);let t=r.use(ae),e=t.Type,s=t.Type.def,n=e.or,a=r.use(qe).defaults;s("AwaitExpression").build("argument","all").field("argument",n(s("Expression"),null)).field("all",Boolean,a.false),s("Decorator").bases("Node").build("expression").field("expression",s("Expression")),s("Property").field("decorators",n([s("Decorator")],null),a.null),s("MethodDefinition").field("decorators",n([s("Decorator")],null),a.null),s("PrivateName").bases("Expression","Pattern").build("id").field("id",s("Identifier")),s("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",s("PrivateName")).field("value",n(s("Expression"),null),a.null),s("ImportAttribute").bases("Node").build("key","value").field("key",n(s("Identifier"),s("Literal"))).field("value",s("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(o=>{s(o).field("assertions",[s("ImportAttribute")],a.emptyArray)}),s("RecordExpression").bases("Expression").build("properties").field("properties",[n(s("ObjectProperty"),s("ObjectMethod"),s("SpreadElement"))]),s("TupleExpression").bases("Expression").build("elements").field("elements",[n(s("Expression"),s("SpreadElement"),null)]),s("ModuleExpression").bases("Node").build("body").field("body",s("Program"))}X(()=>module);function uE(r){r.use(yn);let t=r.use(ae),e=t.Type.def,s=t.Type.or,n=r.use(qe).defaults;e("JSXAttribute").bases("Node").build("name","value").field("name",s(e("JSXIdentifier"),e("JSXNamespacedName"))).field("value",s(e("Literal"),e("JSXExpressionContainer"),e("JSXElement"),e("JSXFragment"),null),n.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",s(e("JSXIdentifier"),e("JSXMemberExpression"))).field("property",e("JSXIdentifier")).field("computed",Boolean,n.false);let i=s(e("JSXIdentifier"),e("JSXNamespacedName"),e("JSXMemberExpression"));e("JSXSpreadAttribute").bases("Node").build("argument").field("argument",e("Expression"));let a=[s(e("JSXAttribute"),e("JSXSpreadAttribute"))];e("JSXExpressionContainer").bases("Expression").build("expression").field("expression",s(e("Expression"),e("JSXEmptyExpression")));let o=[s(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",s(e("JSXClosingElement"),null),n.null).field("children",o,n.emptyArray).field("name",i,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",i).field("attributes",a,n.emptyArray).field("selfClosing",Boolean,n.false),e("JSXClosingElement").bases("Node").build("name").field("name",i),e("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",e("JSXOpeningFragment")).field("closingFragment",e("JSXClosingFragment")).field("children",o,n.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"))}X(()=>module);function wf(r){var t=r.use(ae),e=t.Type.def,s=t.Type.or,n=r.use(qe).defaults,i=s(e("TypeAnnotation"),e("TSTypeAnnotation"),null),a=s(e("TypeParameterDeclaration"),e("TSTypeParameterDeclaration"),null);e("Identifier").field("typeAnnotation",i,n.null),e("ObjectPattern").field("typeAnnotation",i,n.null),e("Function").field("returnType",i,n.null).field("typeParameters",a,n.null),e("ClassProperty").build("key","value","typeAnnotation","static").field("value",s(e("Expression"),null)).field("static",Boolean,n.false).field("typeAnnotation",i,n.null),["ClassDeclaration","ClassExpression"].forEach(o=>{e(o).field("typeParameters",a,n.null).field("superTypeParameters",s(e("TypeParameterInstantiation"),e("TSTypeParameterInstantiation"),null),n.null).field("implements",s([e("ClassImplements")],[e("TSExpressionWithTypeArguments")]),n.emptyArray)})}X(()=>module);function If(r){r.use(yn),r.use(wf);let t=r.use(ae),e=t.Type.def,s=t.Type.or,n=r.use(qe).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",s(e("FunctionTypeParam"),null)).field("typeParameters",s(e("TypeParameterDeclaration"),null)),e("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",s(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",[s(e("ObjectTypeProperty"),e("ObjectTypeSpreadProperty"))]).field("indexers",[e("ObjectTypeIndexer")],n.emptyArray).field("callProperties",[e("ObjectTypeCallProperty")],n.emptyArray).field("inexact",s(Boolean,void 0),n.undefined).field("exact",Boolean,n.false).field("internalSlots",[e("ObjectTypeInternalSlot")],n.emptyArray),e("Variance").bases("Node").build("kind").field("kind",s("plus","minus"));let i=s(e("Variance"),"plus","minus",null);e("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",s(e("Literal"),e("Identifier"))).field("value",e("FlowType")).field("optional",Boolean).field("variance",i,n.null),e("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",e("Identifier")).field("key",e("FlowType")).field("value",e("FlowType")).field("variance",i,n.null).field("static",Boolean,n.false),e("ObjectTypeCallProperty").bases("Node").build("value").field("value",e("FunctionTypeAnnotation")).field("static",Boolean,n.false),e("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",s(e("Identifier"),e("QualifiedTypeIdentifier"))).field("id",e("Identifier")),e("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",s(e("Identifier"),e("QualifiedTypeIdentifier"))).field("typeParameters",s(e("TypeParameterInstantiation"),null)),e("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",e("Identifier")).field("property",s(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",i,n.null).field("bound",s(e("TypeAnnotation"),null),n.null).field("default",s(e("FlowType"),null),n.null),e("ClassProperty").field("variance",i,n.null),e("ClassImplements").bases("Node").build("id").field("id",e("Identifier")).field("superClass",s(e("Expression"),null),n.null).field("typeParameters",s(e("TypeParameterInstantiation"),null),n.null),e("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",e("ObjectTypeAnnotation")).field("extends",s([e("InterfaceExtends")],null),n.null),e("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",e("Identifier")).field("typeParameters",s(e("TypeParameterDeclaration"),null),n.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",s(e("TypeParameterInstantiation"),null),n.null),e("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",e("Identifier")).field("typeParameters",s(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",s(e("TypeParameterDeclaration"),null)).field("impltype",e("FlowType")).field("supertype",s(e("FlowType"),null)),e("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",s(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",s(e("FlowPredicate"),null),n.null),e("DeclareClass").bases("InterfaceDeclaration").build("id"),e("DeclareModule").bases("Statement").build("id","body").field("id",s(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",s(e("DeclareVariable"),e("DeclareFunction"),e("DeclareClass"),e("FlowType"),e("TypeAlias"),e("DeclareOpaqueType"),e("InterfaceDeclaration"),null)).field("specifiers",[s(e("ExportSpecifier"),e("ExportBatchSpecifier"))],n.emptyArray).field("source",s(e("Literal"),null),n.null),e("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",s(e("Literal"),null),n.null),e("ImportDeclaration").field("importKind",s("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",s(e("FlowPredicate"),null),n.null),e("CallExpression").field("typeArguments",s(null,e("TypeParameterInstantiation")),n.null),e("NewExpression").field("typeArguments",s(null,e("TypeParameterInstantiation")),n.null),e("EnumDeclaration").bases("Declaration").build("id","body").field("id",e("Identifier")).field("body",s(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",s([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",s(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"))}X(()=>module);function pE(r){r.use(yn);var t=r.use(ae),e=r.use(qe).defaults,s=t.Type.def,n=t.Type.or;s("VariableDeclaration").field("declarations",[n(s("VariableDeclarator"),s("Identifier"))]),s("Property").field("value",n(s("Expression"),s("Pattern"))),s("ArrayPattern").field("elements",[n(s("Pattern"),s("SpreadElement"),null)]),s("ObjectPattern").field("properties",[n(s("Property"),s("PropertyPattern"),s("SpreadPropertyPattern"),s("SpreadProperty"))]),s("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),s("ExportBatchSpecifier").bases("Specifier").build(),s("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(s("Declaration"),s("Expression"),null)).field("specifiers",[n(s("ExportSpecifier"),s("ExportBatchSpecifier"))],e.emptyArray).field("source",n(s("Literal"),null),e.null),s("Block").bases("Comment").build("value","leading","trailing"),s("Line").bases("Comment").build("value","leading","trailing")}X(()=>module);function Nf(r){r.use(yn);let t=r.use(ae),e=r.use(qe).defaults,s=t.Type.def,n=t.Type.or,{undefined:i}=t.builtInTypes;s("Noop").bases("Statement").build(),s("DoExpression").bases("Expression").build("body").field("body",[s("Statement")]),s("BindExpression").bases("Expression").build("object","callee").field("object",n(s("Expression"),null)).field("callee",s("Expression")),s("ParenthesizedExpression").bases("Expression").build("expression").field("expression",s("Expression")),s("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",s("Identifier")),s("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",s("Identifier")),s("CommentBlock").bases("Comment").build("value","leading","trailing"),s("CommentLine").bases("Comment").build("value","leading","trailing"),s("Directive").bases("Node").build("value").field("value",s("DirectiveLiteral")),s("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,e["use strict"]),s("InterpreterDirective").bases("Node").build("value").field("value",String),s("BlockStatement").bases("Statement").build("body").field("body",[s("Statement")]).field("directives",[s("Directive")],e.emptyArray),s("Program").bases("Node").build("body").field("body",[s("Statement")]).field("directives",[s("Directive")],e.emptyArray).field("interpreter",n(s("InterpreterDirective"),null),e.null);function a(u=String,p){return["extra",{rawValue:u,raw:String},function(){let d=t.getFieldValue(this,"value");return{rawValue:d,raw:p?p(d):String(d)}}]}s("StringLiteral").bases("Literal").build("value").field("value",String).field(...a(String,u=>JSON.stringify(u))),s("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",n(String,null),e.null).field(...a(Number)),s("BigIntLiteral").bases("Literal").build("value").field("value",n(String,Number)).field(...a(String,u=>u+"n")),s("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...a(String,u=>u+"m")),s("NullLiteral").bases("Literal").build().field("value",null,e.null),s("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),s("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(n(RegExp,i),u=>`/${u.pattern}/${u.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var o=n(s("Property"),s("ObjectMethod"),s("ObjectProperty"),s("SpreadProperty"),s("SpreadElement"));s("ObjectExpression").bases("Expression").build("properties").field("properties",[o]),s("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",n("method","get","set")).field("key",n(s("Literal"),s("Identifier"),s("Expression"))).field("params",[s("Pattern")]).field("body",s("BlockStatement")).field("computed",Boolean,e.false).field("generator",Boolean,e.false).field("async",Boolean,e.false).field("accessibility",n(s("Literal"),null),e.null).field("decorators",n([s("Decorator")],null),e.null),s("ObjectProperty").bases("Node").build("key","value").field("key",n(s("Literal"),s("Identifier"),s("Expression"))).field("value",n(s("Expression"),s("Pattern"))).field("accessibility",n(s("Literal"),null),e.null).field("computed",Boolean,e.false);var c=n(s("MethodDefinition"),s("VariableDeclarator"),s("ClassPropertyDefinition"),s("ClassProperty"),s("ClassPrivateProperty"),s("ClassMethod"),s("ClassPrivateMethod"),s("ClassAccessorProperty"),s("StaticBlock"));s("ClassBody").bases("Declaration").build("body").field("body",[c]),s("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",n(s("Literal"),s("Identifier"),s("Expression"))),s("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",s("PrivateName")),s("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",n(s("Literal"),s("Identifier"),s("PrivateName"),s("Expression"))).field("value",n(s("Expression"),null),e.null),["ClassMethod","ClassPrivateMethod"].forEach(u=>{s(u).field("kind",n("get","set","method","constructor"),()=>"method").field("body",s("BlockStatement")).field("access",n("public","private","protected",null),e.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(u=>{s(u).field("computed",Boolean,e.false).field("static",Boolean,e.false).field("abstract",Boolean,e.false).field("accessibility",n("public","private","protected",null),e.null).field("decorators",n([s("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 l=n(s("Property"),s("PropertyPattern"),s("SpreadPropertyPattern"),s("SpreadProperty"),s("ObjectProperty"),s("RestProperty"),s("RestElement"));s("ObjectPattern").bases("Pattern").build("properties").field("properties",[l]).field("decorators",n([s("Decorator")],null),e.null),s("SpreadProperty").bases("Node").build("argument").field("argument",s("Expression")),s("RestProperty").bases("Node").build("argument").field("argument",s("Expression")),s("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",n(s("VariableDeclaration"),s("Expression"))).field("right",s("Expression")).field("body",s("Statement")),s("Import").bases("Expression").build()}X(()=>module);function hE(r){let e=r.use(ae).Type.def;r.use(Nf),r.use(If),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}X(()=>module);function dE(r){r.use(Nf),r.use(wf);var t=r.use(ae),e=t.namedTypes,s=t.Type.def,n=t.Type.or,i=r.use(qe).defaults,a=t.Type.from(function(u,p){return!!(e.StringLiteral&&e.StringLiteral.check(u,p)||e.Literal&&e.Literal.check(u,p)&&typeof u.value=="string")},"StringLiteral");s("TSType").bases("Node");var o=n(s("Identifier"),s("TSQualifiedName"));s("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",o),s("TSHasOptionalTypeParameterInstantiation").field("typeParameters",n(s("TSTypeParameterInstantiation"),null),i.null),s("TSHasOptionalTypeParameters").field("typeParameters",n(s("TSTypeParameterDeclaration"),null,void 0),i.null),s("TSHasOptionalTypeAnnotation").field("typeAnnotation",n(s("TSTypeAnnotation"),null),i.null),s("TSQualifiedName").bases("Node").build("left","right").field("left",o).field("right",o),s("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",s("Expression")).field("typeAnnotation",s("TSType")).field("extra",n({parenthesized:Boolean},null),i.null),s("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",s("Expression")).field("typeAnnotation",s("TSType")),s("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",s("Expression")).field("typeAnnotation",s("TSType")),s("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",s("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(u=>{s(u).bases("TSType").build()}),s("TSArrayType").bases("TSType").build("elementType").field("elementType",s("TSType")),s("TSLiteralType").bases("TSType").build("literal").field("literal",n(s("NumericLiteral"),s("StringLiteral"),s("BooleanLiteral"),s("TemplateLiteral"),s("UnaryExpression"),s("BigIntLiteral"))),s("TemplateLiteral").field("expressions",n([s("Expression")],[s("TSType")])),["TSUnionType","TSIntersectionType"].forEach(u=>{s(u).bases("TSType").build("types").field("types",[s("TSType")])}),s("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",s("TSType")).field("extendsType",s("TSType")).field("trueType",s("TSType")).field("falseType",s("TSType")),s("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",s("TSTypeParameter")),s("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",s("TSType"));var c=[n(s("Identifier"),s("RestElement"),s("ArrayPattern"),s("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(u=>{s(u).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",c)}),s("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,i.false).field("async",Boolean,i.false).field("generator",Boolean,i.false).field("id",n(s("Identifier"),null),i.null).field("params",[s("Pattern")]).field("returnType",n(s("TSTypeAnnotation"),s("Noop"),null),i.null),s("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,i.false).field("generator",Boolean,i.false).field("params",[s("Pattern")]).field("abstract",Boolean,i.false).field("accessibility",n("public","private","protected",void 0),i.undefined).field("static",Boolean,i.false).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("key",n(s("Identifier"),s("StringLiteral"),s("NumericLiteral"),s("Expression"))).field("kind",n("get","set","method","constructor"),function(){return"method"}).field("access",n("public","private","protected",void 0),i.undefined).field("decorators",n([s("Decorator")],null),i.null).field("returnType",n(s("TSTypeAnnotation"),s("Noop"),null),i.null),s("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",n(Boolean,"+","-"),i.false).field("typeParameter",s("TSTypeParameter")).field("optional",n(Boolean,"+","-"),i.false).field("typeAnnotation",n(s("TSType"),null),i.null),s("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[n(s("TSType"),s("TSNamedTupleMember"))]),s("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",s("Identifier")).field("optional",Boolean,i.false).field("elementType",s("TSType")),s("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",s("TSType")),s("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",s("TSType")),s("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",s("TSType")).field("indexType",s("TSType")),s("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",s("TSType")),s("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n(s("TSType"),s("TSTypeAnnotation"))),s("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[s("Identifier")]).field("readonly",Boolean,i.false),s("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",s("Expression")).field("computed",Boolean,i.false).field("readonly",Boolean,i.false).field("optional",Boolean,i.false).field("initializer",n(s("Expression"),null),i.null),s("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",s("Expression")).field("computed",Boolean,i.false).field("optional",Boolean,i.false).field("parameters",c),s("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",n(s("Identifier"),s("TSThisType"))).field("typeAnnotation",n(s("TSTypeAnnotation"),null),i.null).field("asserts",Boolean,i.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(u=>{s(u).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",c)}),s("TSEnumMember").bases("Node").build("id","initializer").field("id",n(s("Identifier"),a)).field("initializer",n(s("Expression"),null),i.null),s("TSTypeQuery").bases("TSType").build("exprName").field("exprName",n(o,s("TSImportType")));var l=n(s("TSCallSignatureDeclaration"),s("TSConstructSignatureDeclaration"),s("TSIndexSignature"),s("TSMethodSignature"),s("TSPropertySignature"));s("TSTypeLiteral").bases("TSType").build("members").field("members",[l]),s("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",n(s("Identifier"),String)).field("constraint",n(s("TSType"),void 0),i.undefined).field("default",n(s("TSType"),void 0),i.undefined),s("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",s("TSType")).field("expression",s("Expression")).field("extra",n({parenthesized:Boolean},null),i.null),s("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[s("TSTypeParameter")]),s("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",s("Expression")),s("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[s("TSType")]),s("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",s("Identifier")).field("const",Boolean,i.false).field("declare",Boolean,i.false).field("members",[s("TSEnumMember")]).field("initializer",n(s("Expression"),null),i.null),s("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",s("Identifier")).field("declare",Boolean,i.false).field("typeAnnotation",s("TSType")),s("TSModuleBlock").bases("Node").build("body").field("body",[s("Statement")]),s("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",n(a,o)).field("declare",Boolean,i.false).field("global",Boolean,i.false).field("body",n(s("TSModuleBlock"),s("TSModuleDeclaration"),null),i.null),s("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",a).field("qualifier",n(o,void 0),i.undefined),s("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",s("Identifier")).field("isExport",Boolean,i.false).field("moduleReference",n(o,s("TSExternalModuleReference"))),s("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",a),s("TSExportAssignment").bases("Statement").build("expression").field("expression",s("Expression")),s("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",s("Identifier")),s("TSInterfaceBody").bases("Node").build("body").field("body",[l]),s("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",o),s("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",o).field("declare",Boolean,i.false).field("extends",n([s("TSExpressionWithTypeArguments")],null),i.null).field("body",s("TSInterfaceBody")),s("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",n("public","private","protected",void 0),i.undefined).field("readonly",Boolean,i.false).field("parameter",n(s("Identifier"),s("AssignmentPattern"))),s("ClassProperty").field("access",n("public","private","protected",void 0),i.undefined),s("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),s("ClassBody").field("body",[n(s("MethodDefinition"),s("VariableDeclarator"),s("ClassPropertyDefinition"),s("ClassProperty"),s("ClassPrivateProperty"),s("ClassAccessorProperty"),s("ClassMethod"),s("ClassPrivateMethod"),s("StaticBlock"),s("TSDeclareMethod"),l)])}X(()=>module);var ot;ot||(ot={});var{astNodesAreEquivalent:vO,builders:cr,builtInTypes:ct,defineMethod:AO,eachField:CO,finalize:wO,getBuilderName:IO,getFieldNames:fE,getFieldValue:Lt,getSupertypeNames:NO,namedTypes:mE,NodePath:yE,Path:kO,PathVisitor:DO,someField:gE,Type:OO,use:MO,visit:LO}=Qx([yn,uE,If,pE,hE,dE]);Object.assign(ot,mE);var Li=ot,of=Ki.default.SourceMapConsumer,bE=Ki.default.SourceMapGenerator,kf=Object.prototype.hasOwnProperty;function SE(){return`
39
- `}function cf(r,t,e){return r&&kf.call(r,t)?r[t]:e}function _E(...r){let t={},e=r.length;for(let s=0;s<e;++s){let n=Object.keys(r[s]),i=n.length;for(let a=0;a<i;++a)t[n[a]]=!0}return t}function z(r,t){return r.line-t.line||r.column-t.column}function Zt(r){return{line:r.line,column:r.column}}function xE(r,t){if(r){if(!t)return r}else return t||null;let e=new of(r),s=new of(t),n=new bE({file:t.file,sourceRoot:t.sourceRoot}),i={};return s.eachMapping(function(a){let o=e.originalPositionFor({line:a.originalLine,column:a.originalColumn}),c=o.source;if(c===null)return;n.addMapping({source:c,original:Zt(o),generated:{line:a.generatedLine,column:a.generatedColumn},name:a.name});let l=e.sourceContentFor(c);l&&!kf.call(i,c)&&(i[c]=l,n.setSourceContent(c,l))}),n.toJSON()}function Df(r,t){if(!r.loc)return null;let e={start:r.loc.start,end:r.loc.end};function s(n){qc(e,n.loc)}return r.declaration&&r.declaration.decorators&&Xi(r)&&r.declaration.decorators.forEach(s),z(e.start,e.end)<0&&(e.start=Zt(e.start),t.skipSpaces(e.start,!1,!0),z(e.start,e.end)<0&&(e.end=Zt(e.end),t.skipSpaces(e.end,!0,!0))),r.comments&&r.comments.forEach(s),e}function qc(r,t){r&&t&&(z(t.start,r.start)<0&&(r.start=t.start),z(r.end,t.end)<0&&(r.end=t.end))}function Xc(r,t){let e=r.loc;if(e&&(e.start.line<1&&(e.start.line=1),e.end.line<1&&(e.end.line=1)),r.type==="File"&&(e.start=t.firstPos(),e.end=t.lastPos()),EE(r,t),TE(r,t),e&&r.decorators)r.decorators.forEach(function(s){qc(e,s.loc)});else if(r.declaration&&Xi(r)){r.declaration.loc=null;let s=r.declaration.decorators;s&&s.forEach(function(n){qc(e,n.loc)})}else if(Li.MethodDefinition&&Li.MethodDefinition.check(r)||Li.Property.check(r)&&(r.method||r.shorthand))r.value.loc=null,Li.FunctionExpression.check(r.value)&&(r.value.id=null);else if(r.type==="ObjectTypeProperty"){let s=r.loc,n=s&&s.end;n&&(n=Zt(n),t.prevPos(n)&&t.charAt(n)===","&&(n=t.skipSpaces(n,!0,!0))&&(s.end=n))}}function EE(r,t){if(r.type!=="ForStatement")return;function e(s){let n=s&&s.loc,i=n&&n.start,a=n&&Zt(n.end);for(;i&&a&&z(i,a)<0&&(t.prevPos(a),t.charAt(a)===";");)n.end.line=a.line,n.end.column=a.column}e(r.init),e(r.test),e(r.update)}function TE(r,t){if(r.type==="TemplateLiteral"&&r.quasis.length!==0){if(r.loc){let e=Zt(r.loc.start),s=r.quasis[0];z(s.loc.start,e)<0&&(s.loc.start=e);let n=Zt(r.loc.end),i=r.quasis[r.quasis.length-1];z(n,i.loc.end)<0&&(i.loc.end=n)}r.expressions.forEach(function(e,s){let n=t.skipSpaces(e.loc.start,!0,!1);if(t.prevPos(n)&&t.charAt(n)==="{"&&t.prevPos(n)&&t.charAt(n)==="$"){let a=r.quasis[s];z(n,a.loc.end)<0&&(a.loc.end=n)}let i=t.skipSpaces(e.loc.end,!1,!1);if(t.charAt(i)==="}"){let a=r.quasis[s+1];z(a.loc.start,i)<0&&(a.loc.start=i)}})}}function Xi(r){if(r)switch(r.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function Of(r){let t=r.getParentNode();return r.getName()==="declaration"&&Xi(t)?t:null}function pn(r,t){let e=r.trailingComma;return typeof e=="object"?!!e[t]:!!e}var Gc={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:SE(),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},PE=Gc.hasOwnProperty;function Qi(r){let t=r||Gc;function e(s){return PE.call(t,s)?t[s]:Gc[s]}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 $c=class r{constructor(t,e,s=e){this.sourceLines=t,this.sourceLoc=e,this.targetLoc=s}slice(t,e,s=t.lastPos()){let n=this.sourceLines,i=this.sourceLoc,a=this.targetLoc;function o(c){let l=i[c],u=a[c],p=e;return c==="end"&&(p=s),vE(n,l,t,u,p)}if(z(e,a.start)<=0)if(z(a.end,s)<=0)a={start:Qt(a.start,e.line,e.column),end:Qt(a.end,e.line,e.column)};else{if(z(s,a.start)<=0)return null;i={start:i.start,end:o("end")},a={start:Qt(a.start,e.line,e.column),end:Qt(s,e.line,e.column)}}else{if(z(a.end,e)<=0)return null;z(a.end,s)<=0?(i={start:o("start"),end:i.end},a={start:{line:1,column:0},end:Qt(a.end,e.line,e.column)}):(i={start:o("start"),end:o("end")},a={start:{line:1,column:0},end:Qt(s,e.line,e.column)})}return new r(this.sourceLines,i,a)}add(t,e){return new r(this.sourceLines,this.sourceLoc,{start:lf(this.targetLoc.start,t,e),end:lf(this.targetLoc.end,t,e)})}subtract(t,e){return new r(this.sourceLines,this.sourceLoc,{start:Qt(this.targetLoc.start,t,e),end:Qt(this.targetLoc.end,t,e)})}indent(t,e=!1,s=!1){if(t===0)return this;let n=this.targetLoc,i=n.start.line,a=n.end.line;if(e&&i===1&&a===1)return this;if(n={start:n.start,end:n.end},!e||i>1){let o=n.start.column+t;n.start={line:i,column:s?Math.max(0,o):o}}if(!e||a>1){let o=n.end.column+t;n.end={line:a,column:s?Math.max(0,o):o}}return new r(this.sourceLines,this.sourceLoc,n)}};function lf(r,t,e){return{line:r.line+t-1,column:r.line===1?r.column+e:r.column}}function Qt(r,t,e){return{line:r.line-t+1,column:r.line===t?r.column-e:r.column}}function vE(r,t,e,s,n){let i=z(s,n);if(i===0)return t;let a,o;if(i<0){a=r.skipSpaces(t)||r.lastPos(),o=e.skipSpaces(s)||e.lastPos();let c=n.line-o.line;for(a.line+=c,o.line+=c,c>0&&(a.column=0,o.column=0);z(o,n)<0&&e.nextPos(o,!0););}else{a=r.skipSpaces(t,!0)||r.firstPos(),o=e.skipSpaces(s,!0)||e.firstPos();let c=n.line-o.line;for(a.line+=c,o.line+=c,c<0&&(a.column=r.getLineLength(a.line),o.column=e.getLineLength(o.line));z(n,o)<0&&e.prevPos(o,!0););}return a}var AE=Object.defineProperty,CE=(r,t,e)=>t in r?AE(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,rn=(r,t,e)=>(CE(r,typeof t!="symbol"?t+"":t,e),e),ar=class r{constructor(t,e=null){this.infos=t,rn(this,"length"),rn(this,"name"),rn(this,"mappings",[]),rn(this,"cachedSourceMap",null),rn(this,"cachedTabWidth"),this.length=t.length,this.name=e||null,this.name&&this.mappings.push(new $c(this,{start:this.firstPos(),end:this.lastPos()}))}toString(t){return this.sliceString(this.firstPos(),this.lastPos(),t)}getSourceMap(t,e){if(!t)return null;let s=this;function n(o){return o=o||{},o.file=t,e&&(o.sourceRoot=e),o}if(s.cachedSourceMap)return n(s.cachedSourceMap.toJSON());let i=new Ki.default.SourceMapGenerator(n()),a={};return s.mappings.forEach(function(o){let c=o.sourceLines.skipSpaces(o.sourceLoc.start)||o.sourceLines.lastPos(),l=s.skipSpaces(o.targetLoc.start)||s.lastPos();for(;z(c,o.sourceLoc.end)<0&&z(l,o.targetLoc.end)<0;){o.sourceLines.charAt(c),s.charAt(l);let u=o.sourceLines.name;if(i.addMapping({source:u,original:{line:c.line,column:c.column},generated:{line:l.line,column:l.column}}),!Hc.call(a,u)){let p=o.sourceLines.toString();i.setSourceContent(u,p),a[u]=p}s.nextPos(l,!0),o.sourceLines.nextPos(c,!0)}}),s.cachedSourceMap=i,i.toJSON()}bootstrapCharAt(t){let e=t.line,s=t.column,n=this.toString().split(Vc),i=n[e-1];return typeof i>"u"?"":s===i.length&&e<n.length?`
40
- `:s>=i.length?"":i.charAt(s)}charAt(t){let e=t.line,s=t.column,n=this,i=n.infos,a=i[e-1],o=s;if(typeof a>"u"||o<0)return"";let c=this.getIndentAt(e);return o<c?" ":(o+=a.sliceStart-c,o===a.sliceEnd&&e<this.length?`
41
- `:o>=a.sliceEnd?"":a.line.charAt(o))}stripMargin(t,e){if(t===0)return this;if(e&&this.length===1)return this;let s=new r(this.infos.map(function(n,i){return n.line&&(i>0||!e)&&(n={...n,indent:Math.max(0,n.indent-t)}),n}));if(this.mappings.length>0){let n=s.mappings;this.mappings.forEach(function(i){n.push(i.indent(t,e,!0))})}return s}indent(t){if(t===0)return this;let e=new r(this.infos.map(function(s){return s.line&&!s.locked&&(s={...s,indent:s.indent+t}),s}));if(this.mappings.length>0){let s=e.mappings;this.mappings.forEach(function(n){s.push(n.indent(t))})}return e}indentTail(t){if(t===0)return this;if(this.length<2)return this;let e=new r(this.infos.map(function(s,n){return n>0&&s.line&&!s.locked&&(s={...s,indent:s.indent+t}),s}));if(this.mappings.length>0){let s=e.mappings;this.mappings.forEach(function(n){s.push(n.indent(t,!0))})}return e}lockIndentTail(){return this.length<2?this:new r(this.infos.map((t,e)=>({...t,locked:e>0})))}getIndentAt(t){return Math.max(this.infos[t-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let t=[],e=0;for(let i=1,a=this.length;i<=a;++i){let o=this.infos[i-1],c=o.line.slice(o.sliceStart,o.sliceEnd);if(sr(c))continue;let l=Math.abs(o.indent-e);t[l]=~~t[l]+1,e=o.indent}let s=-1,n=2;for(let i=1;i<t.length;i+=1)Hc.call(t,i)&&t[i]>s&&(s=t[i],n=i);return this.cachedTabWidth=n}startsWithComment(){if(this.infos.length===0)return!1;let t=this.infos[0],e=t.sliceStart,s=t.sliceEnd,n=t.line.slice(e,s).trim();return n.length===0||n.slice(0,2)==="//"||n.slice(0,2)==="/*"}isOnlyWhitespace(){return sr(this.toString())}isPrecededOnlyByWhitespace(t){let e=this.infos[t.line-1],s=Math.max(e.indent,0),n=t.column-s;if(n<=0)return!0;let i=e.sliceStart,a=Math.min(i+n,e.sliceEnd),o=e.line.slice(i,a);return sr(o)}getLineLength(t){let e=this.infos[t-1];return this.getIndentAt(t)+e.sliceEnd-e.sliceStart}nextPos(t,e=!1){let s=Math.max(t.line,0);return Math.max(t.column,0)<this.getLineLength(s)?(t.column+=1,e?!!this.skipSpaces(t,!1,!0):!0):s<this.length?(t.line+=1,t.column=0,e?!!this.skipSpaces(t,!1,!0):!0):!1}prevPos(t,e=!1){let s=t.line,n=t.column;if(n<1){if(s-=1,s<1)return!1;n=this.getLineLength(s)}else n=Math.min(n-1,this.getLineLength(s));return t.line=s,t.column=n,e?!!this.skipSpaces(t,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(t,e=!1,s=!1){if(t?t=s?t:{line:t.line,column:t.column}:e?t=this.lastPos():t=this.firstPos(),e){for(;this.prevPos(t);)if(!sr(this.charAt(t))&&this.nextPos(t))return t;return null}else{for(;sr(this.charAt(t));)if(!this.nextPos(t))return null;return t}}trimLeft(){let t=this.skipSpaces(this.firstPos(),!1,!0);return t?this.slice(t):bs}trimRight(){let t=this.skipSpaces(this.lastPos(),!0,!0);return t?this.slice(this.firstPos(),t):bs}trim(){let t=this.skipSpaces(this.firstPos(),!1,!0);if(t===null)return bs;let e=this.skipSpaces(this.lastPos(),!0,!0);return e===null?bs:this.slice(t,e)}eachPos(t,e=this.firstPos(),s=!1){let n=this.firstPos();if(e&&(n.line=e.line,n.column=e.column),!(s&&!this.skipSpaces(n,!1,!0)))do t.call(this,n);while(this.nextPos(n,s))}bootstrapSlice(t,e){let s=this.toString().split(Vc).slice(t.line-1,e.line);return s.length>0&&(s.push(s.pop().slice(0,e.column)),s[0]=s[0].slice(t.column)),v(s.join(`
42
- `))}slice(t,e){if(!e){if(!t)return this;e=this.lastPos()}if(!t)throw new Error("cannot slice with end but not start");let s=this.infos.slice(t.line-1,e.line);t.line===e.line?s[0]=rr(s[0],t.column,e.column):(s[0]=rr(s[0],t.column),s.push(rr(s.pop(),0,e.column)));let n=new r(s);if(this.mappings.length>0){let i=n.mappings;this.mappings.forEach(function(a){let o=a.slice(this,t,e);o&&i.push(o)},this)}return n}bootstrapSliceString(t,e,s){return this.slice(t,e).toString(s)}sliceString(t=this.firstPos(),e=this.lastPos(),s){let{tabWidth:n,useTabs:i,reuseWhitespace:a,lineTerminator:o}=Qi(s),c=[];for(let l=t.line;l<=e.line;++l){let u=this.infos[l-1];l===t.line?l===e.line?u=rr(u,t.column,e.column):u=rr(u,t.column):l===e.line&&(u=rr(u,0,e.column));let p=Math.max(u.indent,0),h=u.line.slice(0,u.sliceStart);if(a&&sr(h)&&Mf(h,n)===p){c.push(u.line.slice(0,u.sliceEnd));continue}let d=0,f=p;i&&(d=Math.floor(p/n),f-=d*n);let m="";d>0&&(m+=new Array(d+1).join(" ")),f>0&&(m+=new Array(f+1).join(" ")),m+=u.line.slice(u.sliceStart,u.sliceEnd),c.push(m)}return c.join(o)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(t){let e=this,s=[],n=[],i;function a(l){if(l!==null){if(i){let u=l.infos[0],p=new Array(u.indent+1).join(" "),h=s.length,d=Math.max(i.indent,0)+i.sliceEnd-i.sliceStart;i.line=i.line.slice(0,i.sliceEnd)+p+u.line.slice(u.sliceStart,u.sliceEnd),i.locked=i.locked||u.locked,i.sliceEnd=i.line.length,l.mappings.length>0&&l.mappings.forEach(function(f){n.push(f.add(h,d))})}else l.mappings.length>0&&n.push.apply(n,l.mappings);l.infos.forEach(function(u,p){(!i||p>0)&&(i={...u},s.push(i))})}}function o(l,u){u>0&&a(e),a(l)}if(t.map(function(l){let u=v(l);return u.isEmpty()?null:u}).forEach((l,u)=>{e.isEmpty()?a(l):o(l,u)}),s.length<1)return bs;let c=new r(s);return c.mappings=n,c}concat(...t){let e=[this];return e.push.apply(e,t),bs.join(e)}},Ui={},Hc=Ui.hasOwnProperty,wE=10;function Mf(r,t){let e=0,s=r.length;for(let n=0;n<s;++n)switch(r.charCodeAt(n)){case 9:{let i=Math.ceil(e/t)*t;i===e?e+=t:e=i;break}case 11:case 12:case 13:case 65279:break;case 32:default:e+=1;break}return e}var IE=/^\s*/,Vc=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function v(r,t){if(r instanceof ar)return r;r+="";let e=t&&t.tabWidth,s=r.indexOf(" ")<0,n=!t&&s&&r.length<=wE;if(n&&Hc.call(Ui,r))return Ui[r];let i=new ar(r.split(Vc).map(function(a){let o=IE.exec(a)[0];return{line:a,indent:Mf(o,e),locked:!1,sliceStart:o.length,sliceEnd:a.length}}),Qi(t).sourceFileName);return n&&(Ui[r]=i),i}function sr(r){return!/\S/.test(r)}function rr(r,t,e){let s=r.sliceStart,n=r.sliceEnd,i=Math.max(r.indent,0),a=i+n-s;return typeof e>"u"&&(e=a),t=Math.max(t,0),e=Math.min(e,a),e=Math.max(e,t),e<i?(i=e,n=s):n-=a-e,a=e,a-=t,t<i?i-=t:(t-=i,i=0,s+=t),r.indent===i&&r.sliceStart===s&&r.sliceEnd===n?r:{line:r.line,indent:i,locked:!1,sliceStart:s,sliceEnd:n}}function S(r){return bs.join(r)}var bs=v(""),or=ot,Lf=ct.array,NE=ct.object,uf=new WeakMap;function Rf(r,t,e){if(!r)return e;if(Xc(r,t),e){if(or.Node.check(r)&&or.SourceLocation.check(r.loc)){let n=e.length-1;for(;n>=0;--n){let i=e[n];if(i&&i.loc&&z(i.loc.end,r.loc.start)<=0)break}return e.splice(n+1,0,r),e}}else{let n=uf.get(r);if(n)return n}let s;if(Lf.check(r))s=Object.keys(r);else if(NE.check(r))s=fE(r);else return e;e||uf.set(r,e=[]);for(let n=0,i=s.length;n<i;++n)Rf(r[s[n]],t,e);return e}function Ff(r,t,e){let s=Rf(r,e),n=0,i=s&&s.length,a,o;for(;typeof i=="number"&&n<i;){let c=n+i>>1,l=s[c];if(z(l.loc.start,t.loc.start)<=0&&z(t.loc.end,l.loc.end)<=0){Ff(t.enclosingNode=l,t,e);return}if(z(l.loc.end,t.loc.start)<=0){a=l,n=c+1;continue}if(z(t.loc.end,l.loc.start)<=0){o=l,i=c;continue}throw new Error("Comment location overlaps with node location")}a&&(t.precedingNode=a),o&&(t.followingNode=o)}function kE(r,t,e){if(!Lf.check(r))return;let s=[];r.forEach(function(n){n.loc.lines=e,Ff(t,n,e);let i=n.precedingNode,a=n.enclosingNode,o=n.followingNode;if(i&&o){let c=s.length;c>0&&s[c-1].followingNode!==n.followingNode&&nn(s,e),s.push(n)}else if(i)nn(s,e),jf(i,n);else if(o)nn(s,e),Bf(o,n);else if(a)nn(s,e),DE(a,n);else throw new Error("AST contains no nodes at all?")}),nn(s,e),r.forEach(function(n){delete n.precedingNode,delete n.enclosingNode,delete n.followingNode})}function nn(r,t){let e=r.length;if(e===0)return;let s=r[0].precedingNode,n=r[0].followingNode,i=n.loc.start,a=e,o;for(;a>0;--a){o=r[a-1];let c=t.sliceString(o.loc.end,i);if(/\S/.test(c))break;i=o.loc.start}for(;a<=e&&(o=r[a])&&(o.type==="Line"||o.type==="CommentLine")&&o.loc.start.column>n.loc.start.column;)++a;if(a){let{enclosingNode:c}=r[a-1];c?.type==="CallExpression"&&--a}r.forEach(function(c,l){l<a?jf(s,c):Bf(n,c)}),r.length=0}function Qc(r,t){(r.comments||(r.comments=[])).push(t)}function Bf(r,t){t.leading=!0,t.trailing=!1,Qc(r,t)}function DE(r,t){t.leading=!1,t.trailing=!1,Qc(r,t)}function jf(r,t){t.leading=!1,t.trailing=!0,Qc(r,t)}function OE(r,t){let e=r.getValue();or.Comment.assert(e);let s=e.loc,n=s&&s.lines,i=[t(r)];if(e.trailing)i.push(`
43
- `);else if(n instanceof ar){let a=n.slice(s.end,n.skipSpaces(s.end)||n.lastPos());a.length===1?i.push(a):i.push(new Array(a.length).join(`
44
- `))}else i.push(`
45
- `);return S(i)}function ME(r,t){let e=r.getValue(r);or.Comment.assert(e);let s=e.loc,n=s&&s.lines,i=[];if(n instanceof ar){let a=n.skipSpaces(s.start,!0)||n.firstPos(),o=n.slice(a,s.start);o.length===1?i.push(o):i.push(new Array(o.length).join(`
46
- `))}return i.push(t(r)),S(i)}function pf(r,t){let e=r.getValue(),s=t(r),n=or.Node.check(e)&&Lt(e,"comments");if(!n||n.length===0)return s;let i=[],a=[s];return r.each(function(o){let c=o.getValue(),l=Lt(c,"leading"),u=Lt(c,"trailing");l||u&&!(or.Statement.check(e)||c.type==="Block"||c.type==="CommentBlock")?i.push(OE(o,t)):u&&a.push(ME(o,t))},"comments"),i.push.apply(i,a),S(i)}var LE=cr,RE=ct.object,FE=ct.array;function Uf(r,t){t=Qi(t);let e=v(r,t),s=e.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),n=[],i=t.parser.parse(s,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:n,tolerant:cf(t,"tolerant",!0),ecmaVersion:6,sourceType:cf(t,"sourceType","module")}),a=Array.isArray(i.tokens)?i.tokens:!1;delete i.tokens,a.forEach(function(u){typeof u.value!="string"&&(u.value=e.sliceString(u.loc.start,u.loc.end))}),Array.isArray(i.comments)&&(n=i.comments,delete i.comments),i.loc?Xc(i,e):i.loc={start:e.firstPos(),end:e.lastPos()},i.loc.lines=e,i.loc.indent=0;let o,c;i.type==="Program"?(c=i,o=LE.file(i,t.sourceFileName||null),o.loc={start:e.firstPos(),end:e.lastPos(),lines:e,indent:0}):i.type==="File"&&(o=i,c=o.program),t.tokens&&(o.tokens=a);let l=Df({type:c.type,loc:c.loc,body:[],comments:n},e);return c.loc.start=l.start,c.loc.end=l.end,kE(n,c.body.length?o.program:o,e),new qf(e,a).copy(o)}var qf=function(t,e){this.lines=t,this.tokens=e,this.startTokenIndex=0,this.endTokenIndex=e.length,this.indent=0,this.seen=new Map},Gf=qf.prototype;Gf.copy=function(r){if(this.seen.has(r))return this.seen.get(r);if(FE.check(r)){let l=new Array(r.length);return this.seen.set(r,l),r.forEach(function(u,p){l[p]=this.copy(u)},this),l}if(!RE.check(r))return r;Xc(r,this.lines);let t=Object.create(Object.getPrototypeOf(r),{original:{value:r,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(r,t);let e=r.loc,s=this.indent,n=s,i=this.startTokenIndex,a=this.endTokenIndex;e&&((r.type==="Block"||r.type==="Line"||r.type==="CommentBlock"||r.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(e.start))&&(n=this.indent=e.start.column),e.lines=this.lines,e.tokens=this.tokens,e.indent=n,this.findTokenRange(e));let o=Object.keys(r),c=o.length;for(let l=0;l<c;++l){let u=o[l];u==="loc"||u==="tokens"&&r.type==="File"?t[u]=r[u]:t[u]=this.copy(r[u])}return this.indent=s,this.startTokenIndex=i,this.endTokenIndex=a,t};Gf.findTokenRange=function(r){for(;this.startTokenIndex>0;){let t=r.tokens[this.startTokenIndex];if(z(r.start,t.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<r.tokens.length;){let t=r.tokens[this.endTokenIndex];if(z(t.loc.end,r.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let t=r.tokens[this.startTokenIndex];if(z(t.loc.start,r.start)<0)++this.startTokenIndex;else break}for(r.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let t=r.tokens[this.endTokenIndex-1];if(z(r.end,t.loc.end)<0)--this.endTokenIndex;else break}r.end.token=this.endTokenIndex};var se=ot,BE=ct.array,jE=ct.number,Yc={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(r,t){r.forEach(function(e){Yc[e]=t})});var at=function(t){this.stack=[t]},we=at.prototype;at.from=function(r){if(r instanceof at)return r.copy();if(r instanceof yE){let t=Object.create(at.prototype),e=[r.value];for(let s;s=r.parentPath;r=s)e.push(r.name,s.value);return t.stack=e.reverse(),t}return new at(r)};we.copy=function(){let t=Object.create(at.prototype);return t.stack=this.stack.slice(0),t};we.getName=function(){let t=this.stack,e=t.length;return e>1?t[e-2]:null};we.getValue=function(){let t=this.stack;return t[t.length-1]};we.valueIsDuplicate=function(){let r=this.stack,t=r.length-1;return r.lastIndexOf(r[t],t-1)>=0};function $f(r,t){let e=r.stack;for(let s=e.length-1;s>=0;s-=2){let n=e[s];if(se.Node.check(n)&&--t<0)return n}return null}we.getNode=function(t=0){return $f(this,~~t)};we.getParentNode=function(t=0){return $f(this,~~t+1)};we.getRootValue=function(){let t=this.stack;return t.length%2===0?t[1]:t[0]};we.call=function(t){let e=this.stack,s=e.length,n=e[s-1],i=arguments.length;for(let o=1;o<i;++o){let c=arguments[o];n=n[c],e.push(c,n)}let a=t(this);return e.length=s,a};we.each=function(t){let e=this.stack,s=e.length,n=e[s-1],i=arguments.length;for(let a=1;a<i;++a){let o=arguments[a];n=n[o],e.push(o,n)}for(let a=0;a<n.length;++a)a in n&&(e.push(a,n[a]),t(this),e.length-=2);e.length=s};we.map=function(t){let e=this.stack,s=e.length,n=e[s-1],i=arguments.length;for(let o=1;o<i;++o){let c=arguments[o];n=n[c],e.push(c,n)}let a=new Array(n.length);for(let o=0;o<n.length;++o)o in n&&(e.push(o,n[o]),a[o]=t(this,o),e.length-=2);return e.length=s,a};we.hasParens=function(){let r=this.getNode(),t=this.getPrevToken(r);if(!t)return!1;let e=this.getNextToken(r);return e?!!(t.value==="("&&(e.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};we.getPrevToken=function(r){r=r||this.getNode();let t=r&&r.loc,e=t&&t.tokens;if(e&&t.start.token>0){let s=e[t.start.token-1];if(s){let n=this.getRootValue().loc;if(z(n.start,s.loc.start)<=0)return s}}return null};we.getNextToken=function(r){r=r||this.getNode();let t=r&&r.loc,e=t&&t.tokens;if(e&&t.end.token<e.length){let s=e[t.end.token];if(s){let n=this.getRootValue().loc;if(z(s.loc.end,n.end)<=0)return s}}return null};we.needsParens=function(r){let t=this.getNode();if(t.type==="AssignmentExpression"&&t.left.type==="ObjectPattern")return!0;let e=this.getParentNode(),s=this.getName();if(this.getValue()!==t||se.Statement.check(t)||t.type==="Identifier"||e&&e.type==="ParenthesizedExpression")return!1;if(t.extra&&t.extra.parenthesized)return!0;if(!e)return!1;if(t.type==="UnaryExpression"&&e.type==="BinaryExpression"&&s==="left"&&e.left===t&&e.operator==="**")return!0;switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return e.type==="MemberExpression"&&s==="object"&&e.object===t;case"BinaryExpression":case"LogicalExpression":switch(e.type){case"CallExpression":return s==="callee"&&e.callee===t;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return s==="object"&&e.object===t;case"BinaryExpression":case"LogicalExpression":{let n=e.operator,i=Yc[n],a=t.operator,o=Yc[a];if(i>o||i===o&&s==="right")return!0;break}default:return!1}break;case"SequenceExpression":switch(e.type){case"ReturnStatement":return!1;case"ForStatement":return!1;case"ExpressionStatement":return s!=="expression";default:return!0}case"OptionalIndexedAccessType":return t.optional&&e.type==="IndexedAccessType";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return e.type==="NullableTypeAnnotation";case"Literal":return e.type==="MemberExpression"&&jE.check(t.value)&&s==="object"&&e.object===t;case"NumericLiteral":return e.type==="MemberExpression"&&s==="object"&&e.object===t;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(e.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return s==="callee"&&e.callee===t;case"ConditionalExpression":return s==="test"&&e.test===t;case"MemberExpression":return s==="object"&&e.object===t;default:return!1}case"ArrowFunctionExpression":return se.CallExpression.check(e)&&s==="callee"&&e.callee===t||se.MemberExpression.check(e)&&s==="object"&&e.object===t||se.TSAsExpression&&se.TSAsExpression.check(e)&&s==="expression"&&e.expression===t?!0:Hf(e);case"ObjectExpression":if(e.type==="ArrowFunctionExpression"&&s==="body"&&e.body===t)return!0;break;case"TSAsExpression":if(e.type==="ArrowFunctionExpression"&&s==="body"&&e.body===t&&t.expression.type==="ObjectExpression")return!0;break;case"CallExpression":if(s==="declaration"&&se.ExportDefaultDeclaration.check(e)&&se.FunctionExpression.check(t.callee))return!0}return e.type==="NewExpression"&&s==="callee"&&e.callee===t?Wc(t):!!(r!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function Hf(r){return se.BinaryExpression.check(r)||se.LogicalExpression.check(r)}function Wc(r){return se.CallExpression.check(r)?!0:BE.check(r)?r.some(Wc):se.Node.check(r)?gE(r,(t,e)=>Wc(e)):!1}we.canBeFirstInStatement=function(){let r=this.getNode();return!(se.FunctionExpression.check(r)||se.ObjectExpression.check(r)||se.ClassExpression.check(r))};we.firstInStatement=function(){let r=this.stack,t,e,s,n;for(let i=r.length-1;i>=0;i-=2)if(se.Node.check(r[i])&&(s=t,n=e,t=r[i-1],e=r[i]),!(!e||!n)){if(se.BlockStatement.check(e)&&t==="body"&&s===0||se.ExpressionStatement.check(e)&&s==="expression"||se.AssignmentExpression.check(e)&&s==="left"||se.ArrowFunctionExpression.check(e)&&s==="body")return!0;if(!(se.SequenceExpression.check(e)&&r[i+1]==="expressions"&&s===0)&&!(se.CallExpression.check(e)&&s==="callee")&&!(se.MemberExpression.check(e)&&s==="object")&&!(se.ConditionalExpression.check(e)&&s==="test")&&!(Hf(e)&&s==="left")&&!(se.UnaryExpression.check(e)&&!e.prefix&&s==="argument"))return!1}return!0};var dn=ot.Printable,hf=ot.Expression,UE=ot.ReturnStatement,qE=ot.SourceLocation,fn=ct.object,zc=ct.array,GE=ct.string,zi=/[0-9a-z_$]/i,Vf=function(t){let e=this,s=[];e.replace=function(n,i){GE.check(i)&&(i=v(i)),s.push({lines:i,start:n.start,end:n.end})},e.get=function(n){n=n||{start:{line:1,column:0},end:{line:t.length,column:t.getLineLength(t.length)}};let i=n.start,a=[];function o(c,l){a.push(t.slice(c,l))}return s.sort((c,l)=>z(c.start,l.start)).forEach(function(c){z(i,c.start)>0||(o(i,c.start),a.push(c.lines),i=c.end)}),o(i,n.end),S(a)}},Yf=Vf.prototype;Yf.tryToReprintComments=function(r,t,e){let s=this;if(!r.comments&&!t.comments)return!0;let n=at.from(r),i=at.from(t);n.stack.push("comments",df(r)),i.stack.push("comments",df(t));let a=[],o=zf(n,i,a);return o&&a.length>0&&a.forEach(function(c){let l=c.oldPath.getValue();s.replace(l.loc,e(c.newPath).indentTail(l.loc.indent))}),o};function df(r){let t=[];return r.comments&&r.comments.length>0&&r.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}Yf.deleteComments=function(r){if(!r.comments)return;let t=this;r.comments.forEach(function(e){e.leading?t.replace({start:e.loc.start,end:r.loc.lines.skipSpaces(e.loc.end,!1,!1)},""):e.trailing&&t.replace({start:r.loc.lines.skipSpaces(e.loc.start,!0,!1),end:e.loc.end},"")})};function $E(r){let t=r.getValue();if(!dn.check(t))return;let e=t.original,s=e&&e.loc,n=s&&s.lines,i=[];if(!(!n||!YE(r,i)))return function(a){let o=new Vf(n);i.forEach(function(l){let u=l.newPath.getValue(),p=l.oldPath.getValue();qE.assert(p.loc,!0);let h=!o.tryToReprintComments(u,p,a);h&&o.deleteComments(p);let d=a(l.newPath,{includeComments:h,avoidRootParens:p.type===u.type&&l.oldPath.hasParens()}).indentTail(p.loc.indent),f=HE(n,p.loc,d),m=VE(n,p.loc,d);if(f||m){let y=[];f&&y.push(" "),y.push(d),m&&y.push(" "),d=S(y)}o.replace(p.loc,d)});let c=o.get(s).indentTail(-e.loc.indent);return r.needsParens()?S(["(",c,")"]):c}}function HE(r,t,e){let s=Zt(t.start),n=r.prevPos(s)&&r.charAt(s),i=e.charAt(e.firstPos());return n&&zi.test(n)&&i&&zi.test(i)}function VE(r,t,e){let s=r.charAt(t.end),n=e.lastPos(),i=e.prevPos(n)&&e.charAt(n);return i&&zi.test(i)&&s&&zi.test(s)}function YE(r,t){let e=r.getValue();dn.assert(e);let s=e.original;if(dn.assert(s),e.type!==s.type)return!1;let n=new at(s),i=Jc(r,n,t);return i||(t.length=0),i}function Wf(r,t,e){let s=r.getValue(),n=t.getValue();return s===n?!0:zc.check(s)?zf(r,t,e):fn.check(s)?WE(r,t,e):!1}function zf(r,t,e){let s=r.getValue(),n=t.getValue();if(s===n||r.valueIsDuplicate()||t.valueIsDuplicate())return!0;zc.assert(s);let i=s.length;if(!(zc.check(n)&&n.length===i))return!1;for(let a=0;a<i;++a){r.stack.push(a,s[a]),t.stack.push(a,n[a]);let o=Wf(r,t,e);if(r.stack.length-=2,t.stack.length-=2,!o)return!1}return!0}function WE(r,t,e){let s=r.getValue();if(fn.assert(s),s.original===null)return!1;let n=t.getValue();if(!fn.check(n))return!1;if(s===n||r.valueIsDuplicate()||t.valueIsDuplicate())return!0;if(dn.check(s)){if(!dn.check(n))return!1;let i=r.getParentNode(),a=t.getParentNode();if(a!==null&&a.type==="FunctionTypeAnnotation"&&i!==null&&i.type==="FunctionTypeAnnotation"){let o=a.params.length!==1||!!a.params[0].name,c=i.params.length!==1||!!i.params[0].name;if(!o&&c)return!1}if(s.type===n.type){let o=[];if(Jc(r,t,o))e.push.apply(e,o);else if(n.loc)e.push({oldPath:t.copy(),newPath:r.copy()});else return!1;return!0}return hf.check(s)&&hf.check(n)&&n.loc?(e.push({oldPath:t.copy(),newPath:r.copy()}),!0):!1}return Jc(r,t,e)}function Jc(r,t,e){let s=r.getValue(),n=t.getValue();if(fn.assert(s),fn.assert(n),s.original===null||r.needsParens()&&!t.hasParens())return!1;let i=_E(n,s);(n.type==="File"||s.type==="File")&&delete i.tokens,delete i.loc;let a=e.length;for(let o in i){if(o.charAt(0)==="_")continue;r.stack.push(o,Lt(s,o)),t.stack.push(o,Lt(n,o));let c=Wf(r,t,e);if(r.stack.length-=2,t.stack.length-=2,!c)return!1}return!(UE.check(r.getNode())&&e.length>a)}var le=ot,Zc=ct.string,zE=ct.object,Ji=function(t,e){Zc.assert(t),this.code=t,e&&(zE.assert(e),this.map=e)},JE=Ji.prototype,ff=!1;JE.toString=function(){return ff||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),ff=!0),this.code};var mf=new Ji(""),KE=function(t){let e=t&&t.tabWidth;t=Qi(t),t.sourceFileName=null;function s(i,a){return i=Object.assign({},i,a),o=>n(o,i)}function n(i,a){if(a=a||{},a.includeComments)return pf(i,s(a,{includeComments:!1}));let o=t.tabWidth;if(!e){let u=i.getNode().loc;u&&u.lines&&u.lines.guessTabWidth&&(t.tabWidth=u.lines.guessTabWidth())}let c=$E(i),l=c?c(n):yf(i,t,a,s(a,{includeComments:!0,avoidRootParens:!1}));return t.tabWidth=o,l}this.print=function(i){if(!i)return mf;let a=n(at.from(i),{includeComments:!0,avoidRootParens:!1});return new Ji(a.toString(t),xE(t.inputSourceMap,a.getSourceMap(t.sourceMapName,t.sourceRoot)))},this.printGenerically=function(i){if(!i)return mf;function a(u){return pf(u,p=>yf(p,t,{includeComments:!0,avoidRootParens:!1},a))}let o=at.from(i),c=t.reuseWhitespace;t.reuseWhitespace=!1;let l=new Ji(a(o).toString(t));return t.reuseWhitespace=c,l}};function yf(r,t,e,s){let n=r.getValue(),i=[],a=XE(r,t,s);if(!n||a.isEmpty())return a;let o=!1,c=QE(r,s);return c.isEmpty()?e.avoidRootParens||(o=r.needsParens()):i.push(c),o&&i.unshift("("),i.push(a),o&&i.push(")"),S(i)}function XE(r,t,e){let s=r.getValue();if(!s)return v("");if(typeof s=="string")return v(s,t);le.Printable.assert(s);let n=[];switch(s.type){case"File":return r.call(e,"program");case"Program":return s.directives&&r.each(function(i){n.push(e(i),`;
47
- `)},"directives"),s.interpreter&&n.push(r.call(e,"interpreter")),n.push(r.call(i=>nr(i,t,e),"body")),S(n);case"Noop":case"EmptyStatement":return v("");case"ExpressionStatement":return S([r.call(e,"expression"),";"]);case"ParenthesizedExpression":return S(["(",r.call(e,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return v(" ").join([r.call(e,"left"),s.operator,r.call(e,"right")]);case"AssignmentPattern":return S([r.call(e,"left")," = ",r.call(e,"right")]);case"MemberExpression":case"OptionalMemberExpression":{n.push(r.call(e,"object"));let i=r.call(e,"property"),a=Lt(s,"optional");return s.computed?n.push(a?"?.[":"[",i,"]"):n.push(a?"?.":".",i),S(n)}case"ChainExpression":return r.call(e,"expression");case"MetaProperty":return S([r.call(e,"meta"),".",r.call(e,"property")]);case"BindExpression":return s.object&&n.push(r.call(e,"object")),n.push("::",r.call(e,"callee")),S(n);case"Path":return v(".").join(s.body);case"Identifier":return S([v(s.name,t),s.optional?"?":"",r.call(e,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return S(["...",r.call(e,"argument"),r.call(e,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return s.declare&&n.push("declare "),s.async&&n.push("async "),n.push("function"),s.generator&&n.push("*"),s.id?n.push(" ",r.call(e,"id"),r.call(e,"typeParameters")):s.typeParameters&&n.push(r.call(e,"typeParameters")),n.push("(",yt(r,t,e),")",r.call(e,"returnType")),s.body&&n.push(" ",r.call(e,"body")),S(n);case"ArrowFunctionExpression":return s.async&&n.push("async "),s.typeParameters&&n.push(r.call(e,"typeParameters")),!t.arrowParensAlways&&s.params.length===1&&!s.rest&&s.params[0].type==="Identifier"&&!s.params[0].typeAnnotation&&!s.returnType?n.push(r.call(e,"params",0)):n.push("(",yt(r,t,e),")",r.call(e,"returnType")),n.push(" => ",r.call(e,"body")),S(n);case"MethodDefinition":return Bc(r,t,e);case"YieldExpression":return n.push("yield"),s.delegate&&n.push("*"),s.argument&&n.push(" ",r.call(e,"argument")),S(n);case"AwaitExpression":return n.push("await"),s.all&&n.push("*"),s.argument&&n.push(" ",r.call(e,"argument")),S(n);case"ModuleExpression":return S([`module {
48
- `,r.call(e,"body").indent(t.tabWidth),`
49
- }`]);case"ModuleDeclaration":return n.push("module",r.call(e,"id")),s.source?n.push("from",r.call(e,"source")):n.push(r.call(e,"body")),v(" ").join(n);case"ImportSpecifier":return s.importKind&&s.importKind!=="value"&&n.push(s.importKind+" "),s.imported?(n.push(r.call(e,"imported")),s.local&&s.local.name!==s.imported.name&&n.push(" as ",r.call(e,"local"))):s.id&&(n.push(r.call(e,"id")),s.name&&n.push(" as ",r.call(e,"name"))),S(n);case"ExportSpecifier":return s.exportKind&&s.exportKind!=="value"&&n.push(s.exportKind+" "),s.local?(n.push(r.call(e,"local")),s.exported&&s.exported.name!==s.local.name&&n.push(" as ",r.call(e,"exported"))):s.id&&(n.push(r.call(e,"id")),s.name&&n.push(" as ",r.call(e,"name"))),S(n);case"ExportBatchSpecifier":return v("*");case"ImportNamespaceSpecifier":return n.push("* as "),s.local?n.push(r.call(e,"local")):s.id&&n.push(r.call(e,"id")),S(n);case"ImportDefaultSpecifier":return s.local?r.call(e,"local"):r.call(e,"id");case"TSExportAssignment":return S(["export = ",r.call(e,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return bf(r,t,e);case"ExportAllDeclaration":return n.push("export *"),s.exported&&n.push(" as ",r.call(e,"exported")),n.push(" from ",r.call(e,"source"),";"),S(n);case"TSNamespaceExportDeclaration":return n.push("export as namespace ",r.call(e,"id")),qi(S(n));case"ExportNamespaceSpecifier":return S(["* as ",r.call(e,"exported")]);case"ExportDefaultSpecifier":return r.call(e,"exported");case"Import":return v("import",t);case"ImportExpression":return S(["import(",r.call(e,"source"),")"]);case"ImportDeclaration":{if(n.push("import "),s.importKind&&s.importKind!=="value"&&n.push(s.importKind+" "),s.specifiers&&s.specifiers.length>0){let i=[],a=[];if(r.each(function(o){let c=o.getValue();c.type==="ImportSpecifier"?a.push(e(o)):(c.type==="ImportDefaultSpecifier"||c.type==="ImportNamespaceSpecifier")&&i.push(e(o))},"specifiers"),i.forEach((o,c)=>{c>0&&n.push(", "),n.push(o)}),a.length>0){let o=v(", ").join(a);o.getLineLength(1)>t.wrapColumn&&(o=S([v(`,
50
- `).join(a).indent(t.tabWidth),","])),i.length>0&&n.push(", "),o.length>1?n.push(`{
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):it(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=Ko[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(rt(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:Ar(this.state.type)?e.name=Ve(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(Je.AttributeIsEmpty,e),e;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Je.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()}Ue(n)&&!Ue(a)&&a!==null?this.raise(Je.MissingClosingTagFragment,a):!Ue(n)&&Ue(a)?this.raise(Je.MissingClosingTagElement,a,{openingTagName:st(n.name)}):!Ue(n)&&!Ue(a)&&st(a.name)!==st(n.name)&&this.raise(Je.MissingClosingTagElement,a,{openingTagName:st(n.name)})}if(Ue(n)?(t.openingFragment=n,t.closingFragment=a):(t.openingElement=n,t.closingElement=a),t.children=r,this.match(47))throw this.raise(Je.UnwrappedAdjacentJSXElements,this.state.startLoc);return Ue(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(Me(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=co(r)}},pr=class extends It{constructor(...s){super(...s),this.tsNames=new Map}},fr=class extends Nt{constructor(...s){super(...s),this.importsStack=[]}createScope(s){return this.importsStack.push(new Set),new pr(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)}},tn=i=>i.type==="ParenthesizedExpression"?tn(i.expression):i,dr=class extends hr{toAssignable(s,e=!1){var t,r;let n;switch((s.type==="ParenthesizedExpression"||(t=s.extra)!=null&&t.parenthesized)&&(n=tn(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)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||t&2)&&(o=this.parseFunctionParamType(o)),n.push(o),!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.hasPlugin("flow")||s&2)&&this.parseFunctionParamType(t);let r=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),r}parseFunctionParamType(s){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?Gi(s.name,this.inModule):Xi(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 Xo(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function ji(i){if(!i)throw new Error("Assert fail")}var I=Fe`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 Go(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 Ri(i){return i==="private"||i==="public"||i==="protected"}function Qo(i){return i==="in"||i==="out"}var Yo=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 fr}tsIsIdentifier(){return R(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(!R(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;Ri(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):Qo(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 Xo(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.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),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(),R(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(R(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Go(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 yo(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(R(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(),!R(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(){ji(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),R(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(R(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)||R(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(R(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&R(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&R(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 go(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();e&2&&this.parseFunctionParamType(c);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(is(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&&Qs(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(ts(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(R(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):el(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=>Ri(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=R(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&&(ji(!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)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),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]=Be(e[n])),t&&this.checkIdentifier(e[a],c?4098:4096)}};function Zo(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:rn(i.object)}function el(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!!(sn(i,s)||tl(i,s)||t==="TemplateLiteral"&&i.expressions.length===0||Zo(i))}function sn(i,s){return s?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function tl(i,s){if(i.type==="UnaryExpression"){let{operator:e,argument:t}=i;if(e==="-"&&sn(t,s))return!0}return!1}function rn(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:rn(i.object)}var Ui=Fe`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),sl=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(Ui.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(Ve(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(Ui.UnexpectedSpace,this.state.lastTokEndLoc)}},rl=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),R(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)}},Vi=["minimal","fsharp","hack","smart"],$i=["^^","@@","^","%","#"];function il(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(!Vi.includes(e)){let r=Vi.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(!$i.includes(r)){let n=$i.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("importAssertions")&&i.has("importAttributes"))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 nn={estree:no,jsx:Ho,flow:Jo,typescript:Yo,v8intrinsic:rl,placeholders:sl},nl=Object.keys(nn),Hs={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 al(i){if(i==null)return Object.assign({},Hs);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(Hs)){var e;s[t]=(e=i[t])!=null?e:Hs[t]}return s}var mr=class extends dr{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 nt,r=!0);let{type:n}=this.state;(n===10||R(n))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(s);if(e&&(a=e.call(this,a,t)),uo(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>=ts(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(po(r)&&(this.prodParam.hasIn||!this.match(58))){let n=ts(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=ts(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,xo(s)?e-1:e)}parseHackPipeBody(){var s;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return eo.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(mo(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")?Qs(l):Qs(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(;fo(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(is(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(jo()),a=new nt),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}finishCallExpression(s,e){if(s.callee.type==="Import")if(s.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")),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&&kt(s,e.innerComments),e.callee.trailingComments&&kt(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 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());Me(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(r===136)return this.parseDecimalLiteral(this.state.value);if(R(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(R(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:Ve(r)})}testTopicReferenceConfiguration(s,e,t){switch(s){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ve(t)}]);case"smart":return t===27;default:throw this.raise(m.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(s){this.prodParam.enter(ss(!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 nt,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
+ `),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,Be(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,Be(s.key))}else s.value=Be(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 138:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(m.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:if(t===136){n=this.parseDecimalLiteral(r);break}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(ss(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=ss(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(en()),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=lo(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||!Io(s))return;if(t&&wo(s)){this.raise(m.UnexpectedKeyword,e,{keyword:s});return}if((this.state.strict?r?Gi:Hi:Ki)(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||is(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.hasPlugin("moduleAttributes")||this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),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){}},Xs={kind:1},ol={kind:2},ll=/[\uD800-\uDFFF]/u,Gs=/in(?:stanceof)?/y;function cl(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:De(27),value:"#",start:a,end:c,startLoc:n.start,endLoc:u}),new ve({type:De(132),value:o,start:c,end:l,startLoc:u,endLoc:n.end})),e++;continue}if(is(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:De(22),value:"`",start:a,end:c,startLoc:n.start,endLoc:u}):h=new ve({type:De(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:De(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:De(23),value:"${",start:d,end:l,startLoc:p,endLoc:n.end})),i.splice(e,1,h,new ve({type:De(20),value:f,start:c,end:d,startLoc:u,endLoc:p}),g),e+=2;continue}}t.type=De(r)}}return i}var yr=class extends mr{parseTopLevel(s,e){return s.program=this.parseProgram(e),s.comments=this.comments,this.options.tokens&&(s.tokens=cl(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(Me(s)){if(Gs.lastIndex=e,Gs.test(this.input)){let t=this.codePointAtPos(Gs.lastIndex);if(!rt(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(R(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 R(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(Xs),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(Xs);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 nt,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(ol),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(Xs),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=ho(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(ss(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||R(this.state.type)?this.parseIdentifier():null}parseFunctionParams(s,e){this.expect(10),this.expressionScope.enter(Bo()),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&&R(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(en()),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(R(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(R(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(R(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||R(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=Uo(s.local):s.exported||(s.exported=Be(s.local)),this.finishNode(s,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let s=this.parseStringLiteral(this.state.value),e=ll.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 R(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;var t=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes"),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=Be(a))}return this.finishImportSpecifier(s,"ImportSpecifier",n)}isThisParam(s){return s.type==="Identifier"&&s.name==="this"}},as=class extends yr{constructor(s,e,t){s=al(s),super(s,e),this.options=s,this.initializeScopes(),this.plugins=t,this.filename=s.sourceFilename}getScopeHandler(){return Nt}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 ul(i,s){var e;if(((e=s)==null?void 0:e.sourceType)==="unambiguous"){s=Object.assign({},s);try{s.sourceType="module";let t=vt(s,i),r=t.parse();if(t.sawUnambiguousESM)return r;if(t.ambiguousScriptDifferentAst)try{return s.sourceType="script",vt(s,i).parse()}catch{}else r.program.sourceType="script";return r}catch(t){try{return s.sourceType="script",vt(s,i).parse()}catch{}throw t}}else return vt(s,i).parse()}function hl(i,s){let e=vt(s,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function pl(i){let s={};for(let e of Object.keys(i))s[e]=De(i[e]);return s}var fl=pl(oo);function vt(i,s){let e=as,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||{})}il(t),e=dl(t)}return new e(i,s,t)}var qi=new Map;function dl(i){let s=[];for(let r of nl)i.has(r)&&s.push(r);let e=s.join("|"),t=qi.get(e);if(!t){t=as;for(let r of s)t=nn[r](t);qi.set(e,t)}return t}Lt.parse=ul;Lt.parseExpression=hl;Lt.tokTypes=fl});var Yc={};Hr(Yc,{createDevToolsNodeSys:()=>la});module.exports=Sa(Yc);var ue=require("node:fs/promises"),ia=require("node:crypto"),G=require("node:fs"),Is=require("node:os"),V=je(require("node:path"),1),Jr=je(require("prettier"),1),na=je(require("typescript"),1),aa=je(require("launch-editor"),1);async function Gr(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 Zr=je(Yr(),1);function ei(){try{let i=(0,Zr.default)();if(i?.name)return i.name}catch{}return"npm"}async function si(i){let s=[],e=await Gr(i,i.getRepoRootDir());if(e){let t=await Ea(e,i);s.push(...t)}return s}async function Ea(i,s){let e=[];if(i&&typeof i=="object"){let t=new Set(Object.keys({...i.dependencies,...i.devDependencies}));for(let r of wa)if(t.has(r)&&!e.some(n=>n.name===r)){let n={name:r};ti.has(r)&&(n.version=await ti.get(r)(s)),e.push(n)}}return e}function Ds(i){let s=parseInt(i);return Number.isNaN(s)?void 0:s}var ti=new Map([["next",async i=>{if(!i.spawnSync)return;let s=ei(),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:Ds(a),minor:Ds(o),patch:Ds(l)}}]]),wa=["@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 gt=require("node:child_process");var Wr={};Hr(Wr,{MagicastError:()=>re,builders:()=>zc,detectCodeFormat:()=>ta,generateCode:()=>zr,loadFile:()=>$c,parseExpression:()=>ra,parseModule:()=>sa,writeFile:()=>qc});var ys=require("node:fs");var Es=je(Ii(),1),Pn=je(an(),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 ml=Object.defineProperty,yl=(i,s,e)=>s in i?ml(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,oe=(i,s,e)=>(yl(i,typeof s!="symbol"?s+"":s,e),e),Sn=Object.prototype,gs=Sn.toString,xe=Sn.hasOwnProperty,Qe=class{assert(s,e){if(!this.check(s,e)){var t=Rr(s);throw new Error(t+" does not match type "+this)}return!0}arrayOf(){let s=this;return new Ut(s)}},Ut=class extends Qe{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))}},xs=class extends Qe{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}},bs=class extends Qe{constructor(s){super(),this.fields=s,oe(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(s,e){return gs.call(s)===gs.call({})&&this.fields.every(t=>t.type.check(s[t.name],e))}},Ts=class extends Qe{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)}},Ge=class extends Qe{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}},jt=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}},Ps=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 Rr(i){return Array.isArray(i)?"["+i.map(Rr).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 Ts(w.map(v=>s.from(v)))},from(w,v){if(w instanceof Ut||w instanceof xs||w instanceof bs||w instanceof Ts||w instanceof Ge)return w;if(w instanceof jt)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 Ut(s.from(w[0]))}if(l.check(w))return new bs(Object.keys(w).map(F=>new Ps(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 Ge(v,w)}return new xs(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=gs.call(v),F=new Ge(w,z=>gs.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 Ge("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 jt{constructor(v){super(new Ge(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,X,ye)=>{if(!xe.call(z,J)){var Ne=this.allFields;if(!xe.call(Ne,J))throw new Error(""+J);var Wt=Ne[J],da=Wt.type,xt;if(ye)xt=X;else if(Wt.defaultFn)xt=Wt.defaultFn.call(z);else{var ma="no value or default function given for field "+JSON.stringify(J)+" of "+this.typeName+"("+this.buildParams.map(function(ya){return Ne[ya]}).join(", ")+")";throw new Error(ma)}if(!da.check(xt))throw new Error(Rr(xt)+" does not match field "+Wt+" of type "+this.typeName);z[J]=xt}},F=(...z)=>{var J=z.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var X=Object.create(L);if(this.buildParams.forEach(function(ye,Ne){Ne<J?M(X,ye,z[Ne],!0):M(X,ye,null,!1)}),Object.keys(this.allFields).forEach(function(ye){M(X,ye,null,!1)}),X.type!==this.typeName)throw new Error("");return X};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(X){xe.call(z,X)?M(J,X,z[X],!0):M(J,X,null,!1)}),J.type!==this.typeName)throw new Error("");return J},Object.defineProperty(E,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 Ps(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 jt)J.finalize(),Ls(v,J.allFields),Ls(M,J.allSupertypes);else{var X="unknown supertype name "+JSON.stringify(z)+" for subtype "+JSON.stringify(this.typeName);throw new Error(X)}}),Ls(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(Kr,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,pa(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&ha(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 A(w){for(var v={},M=Object.keys(b),F=M.length,z=0;z<F;++z){var J=M[z],X=b[J];if(X.finalized!==!0)throw new Error(""+J);for(var ye=0;ye<X.supertypeList.length;++ye){var Ne=X.supertypeList[ye];if(xe.call(w,Ne)){v[J]=Ne;break}}}return v}var E=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 Kr={};function Ns(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 ks(w,v){var M=P(w);if(M){var F=M.allFields[v];if(F)return F.getValue(w)}return w&&w[v]}function ca(w,v,M){Ns(w).forEach(function(F){v.call(this,F,ks(w,F))},M)}function ua(w,v,M){return Ns(w).some(function(F){return v.call(this,F,ks(w,F))},M)}function ha(w){var v=we(w);if(E[v])return;var M=E[he(w)];if(!M)return;let F=function(...z){return E.expressionStatement(M.apply(E,z))};F.from=function(...z){return E.expressionStatement(M.from.apply(E,z))},E[v]=F}function pa(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,X=J,ye=v.length;X<ye;++X)xe.call(v,X)&&(v[J++]=v[X]);v.length=J}function Ls(w,v){return Object.keys(v).forEach(function(M){w[M]=v[M]}),w}function fa(){Object.keys(b).forEach(function(w){b[w].finalize()})}return{Type:s,builtInTypes:y,getSupertypeNames:T,computeSupertypeLookupTable:A,builders:E,defineMethod:W,getBuilderName:he,getStatementBuilderName:we,namedTypes:Kr,getFieldNames:Ns,getFieldValue:ks,eachField:ca,someField:ua,finalize:fa}}q(()=>module);var gl=Object.prototype,os=gl.hasOwnProperty;function An(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(!os.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)os.call(this.value,y)&&(p[y]=this.get(y));for(d=d||this,y=0;y<g;++y)os.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(os.call(h.value,k)){var T=h.get(k);if(T.name!==k)throw new Error("");var A=k+f;T.name=A,b[A]=T,delete P[k]}return delete P.length,function(){for(var E in b){var L=b[E];if(L.name!==+E)throw new Error("");P[E]=L,h.value[E]=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 A=p.splice.apply(p,k);if(A[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 ct=Object.prototype.hasOwnProperty;function xl(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(A,E){if(!(this instanceof T))throw new Error("Scope constructor cannot be invoked without 'new'");u.check(A.value)||c.assert(A.value);var L;if(E){if(!(E instanceof T))throw new Error("");L=E.depth+1}else E=null,L=0;Object.defineProperties(this,{path:{value:A},node:{value:A.value},isGlobal:{value:!E,enumerable:!0},depth:{value:L},parent:{value:E},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(),ct.call(this.bindings,T)},f.declaresType=function(T){return this.scan(),ct.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 A=0;this.declares(T+A);)++A;var E=T+A;return this.bindings[E]=s.builders.identifier(E)},f.injectTemporary=function(T,A){T||(T=this.declareTemporary());var E=this.path.get("body");return t.BlockStatement.check(E.value)&&(E=E.get("body")),E.unshift(o.variableDeclaration("var",[o.variableDeclarator(T,A||null)])),T},f.scan=function(T){if(T||!this.didScan){for(var A in this.bindings)delete this.bindings[A];for(var A in this.types)delete this.types[A];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,A,E){var L=T.value;if(u.check(L)){let W=T.get("typeParameters","params");a.check(W.value)&&W.each(he=>{k(he,E)})}c.check(L)&&(t.CatchClause.check(L)?b(T.get("param"),A):p(T,A,E))}function p(T,A,E){var L=T.value;T.parent&&t.FunctionExpression.check(T.parent.node)&&T.parent.node.id&&b(T.parent.get("id"),A),L&&(a.check(L)?T.each(W=>{y(W,A,E)}):t.Function.check(L)?(T.get("params").each(W=>{b(W,A)}),y(T.get("body"),A,E),p(T.get("typeParameters"),A,E)):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"),E):t.VariableDeclarator.check(L)?(b(T.get("id"),A),y(T.get("init"),A,E)):L.type==="ImportSpecifier"||L.type==="ImportNamespaceSpecifier"||L.type==="ImportDefaultSpecifier"?b(T.get(L.local?"local":L.name?"name":"id"),A):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,A,E)}))}function g(T,A){return!!(T.value===A||Array.isArray(T.value)&&T.value.length===0&&Array.isArray(A)&&A.length===0)}function y(T,A,E){var L=T.value;if(!(!L||n.check(L)))if(t.FunctionDeclaration.check(L)&&L.id!==null)b(T.get("id"),A);else if(t.ClassDeclaration&&t.ClassDeclaration.check(L)&&L.id!==null)b(T.get("id"),A),p(T.get("typeParameters"),A,E);else if(t.InterfaceDeclaration&&t.InterfaceDeclaration.check(L)||t.TSInterfaceDeclaration&&t.TSInterfaceDeclaration.check(L))P(T.get("id"),E);else if(c.check(L)){if(t.CatchClause.check(L)&&t.Identifier.check(L.param)){var W=L.param.name,he=ct.call(A,W);p(T.get("body"),A,E),he||delete A[W]}}else p(T,A,E)}function b(T,A){var E=T.value;t.Pattern.assert(E),t.Identifier.check(E)?ct.call(A,E.name)?A[E.name].push(T):A[E.name]=[T]:t.AssignmentPattern&&t.AssignmentPattern.check(E)?b(T.get("left"),A):t.ObjectPattern&&t.ObjectPattern.check(E)?T.get("properties").each(function(L){var W=L.value;t.Pattern.check(W)?b(L,A):t.Property.check(W)||t.ObjectProperty&&t.ObjectProperty.check(W)?b(L.get("value"),A):t.SpreadProperty&&t.SpreadProperty.check(W)&&b(L.get("argument"),A)}):t.ArrayPattern&&t.ArrayPattern.check(E)?T.get("elements").each(function(L){var W=L.value;t.Pattern.check(W)?b(L,A):t.SpreadElement&&t.SpreadElement.check(W)&&b(L.get("argument"),A)}):t.PropertyPattern&&t.PropertyPattern.check(E)?b(T.get("pattern"),A):(t.SpreadElementPattern&&t.SpreadElementPattern.check(E)||t.RestElement&&t.RestElement.check(E)||t.SpreadPropertyPattern&&t.SpreadPropertyPattern.check(E))&&b(T.get("argument"),A)}function P(T,A){var E=T.value;t.Pattern.assert(E),t.Identifier.check(E)&&(ct.call(A,E.name)?A[E.name].push(T):A[E.name]=[T])}function k(T,A){var E=T.value;h.assert(E),ct.call(A,E.name)?A[E.name].push(T):A[E.name]=[T]}return f.lookup=function(T){for(var A=this;A&&!A.declares(T);A=A.parent);return A},f.lookupType=function(T){for(var A=this;A&&!A.declaresType(T);A=A.parent);return A},f.getGlobalScope=function(){for(var T=this;!T.isGlobal;)T=T.parent;return T},l}q(()=>module);function En(i){var s=i.use(Q),e=s.namedTypes,t=s.builders,r=s.builtInTypes.number,n=s.builtInTypes.array,a=i.use(An),o=i.use(xl);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,A=k.operator,E=h[A],L=T.operator,W=h[L];if(E>W)return!0;if(E===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 A=t.unaryExpression("!",b,!0);e.UnaryExpression.check(b)&&b.operator==="!"&&(A=b.argument),y.get("test").replace(A),y.get("consequent").replace(P),y.get("alternate").replace()}}return l}q(()=>module);var ls=Object.prototype.hasOwnProperty;function bl(i){var s=i.use(Q),e=i.use(En),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=ls.call(this._methodNameTable,"Block")||ls.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,A=0;A<T;++A){var E=k[A];y="visit"+b[E],n.check(p[y])&&(P[E]=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)ls.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 A=b[T];ls.call(y,A)||(y[A]=s.getFieldValue(y,A)),k.push(p.get(A))}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 Tl(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 A=0;A<P;++A){var E=b[A],L=t(p,E),W=t(g,E);if(y&&y.push(E),!h(L,W,y))return!1;if(y){var he=y.pop();if(he!==E)throw new Error(""+he)}}return!0}if(!y)return!1;var we=Object.create(null);for(A=0;A<P;++A)we[b[A]]=!0;for(A=0;A<T;++A){if(E=k[A],!l.call(we,E))return y.push(E),!1;delete we[E]}for(E in we){y.push(E);break}return!1}return c}q(()=>module);function Pl(i){let s=Sl(),e=s.use(Q);i.forEach(s.use),e.finalize();let t=s.use(bl);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(Tl),finalize:e.finalize,Path:s.use(An),NodePath:s.use(En),PathVisitor:t,use:s.use,visit:t.visit}}function Sl(){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 wn(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}q(()=>module);function vn(i){let s=i.use(wn);return s.BinaryOperators.indexOf("**")<0&&s.BinaryOperators.push("**"),s.AssignmentOperators.indexOf("**=")<0&&s.AssignmentOperators.push("**="),s}q(()=>module);function Cn(i){let s=i.use(vn);return s.LogicalOperators.indexOf("??")<0&&s.LogicalOperators.push("??"),s}q(()=>module);function Al(i){let s=i.use(Cn);return s.LogicalOperators.forEach(e=>{let t=e+"=";s.AssignmentOperators.indexOf(t)<0&&s.AssignmentOperators.push(t)}),s}q(()=>module);function El(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(wn);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 wl(i){i.use(El);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 vl(i){i.use(vn),i.use(wl)}q(()=>module);function Cl(i){i.use(vl);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 Il(i){i.use(Cl);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 Nl(i){i.use(Il);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 kl(i){i.use(Cn),i.use(Nl);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 Ll(i){i.use(Al),i.use(kl)}q(()=>module);function Dl(i){i.use(Ll);let e=i.use(Q).Type.def;e("StaticBlock").bases("Declaration").build("body").field("body",[e("Statement")])}q(()=>module);function zt(i){i.use(Dl);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 Ol(i){i.use(zt);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 In(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 Nn(i){i.use(zt),i.use(In);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 Ml(i){i.use(zt);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 kn(i){i.use(zt);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 Fl(i){let e=i.use(Q).Type.def;i.use(kn),i.use(Nn),e("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),e("TopicReference").bases("Expression").build()}q(()=>module);function Bl(i){i.use(kn),i.use(In);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 Ae;Ae||(Ae={});var{astNodesAreEquivalent:Eu,builders:yt,builtInTypes:Ee,defineMethod:wu,eachField:vu,finalize:Cu,getBuilderName:Iu,getFieldNames:_l,getFieldValue:_e,getSupertypeNames:Nu,namedTypes:jl,NodePath:Rl,Path:ku,PathVisitor:Lu,someField:Ul,Type:Du,use:Ou,visit:Mu}=Pl([zt,Ol,Nn,Ml,Fl,Bl]);Object.assign(Ae,jl);var cs=Ae,on=Es.default.SourceMapConsumer,Vl=Es.default.SourceMapGenerator,Ln=Object.prototype.hasOwnProperty;function $l(){return`
9
+ `}function ln(i,s,e){return i&&Ln.call(i,s)?i[s]:e}function ql(...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 U(i,s){return i.line-s.line||i.column-s.column}function qe(i){return{line:i.line,column:i.column}}function zl(i,s){if(i){if(!s)return i}else return s||null;let e=new on(i),t=new on(s),r=new Vl({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:qe(o),generated:{line:a.generatedLine,column:a.generatedColumn},name:a.name});let c=e.sourceContentFor(l);c&&!Ln.call(n,l)&&(n[l]=c,r.setSourceContent(l,c))}),r.toJSON()}function Dn(i,s){if(!i.loc)return null;let e={start:i.loc.start,end:i.loc.end};function t(r){kr(e,r.loc)}return i.declaration&&i.declaration.decorators&&ws(i)&&i.declaration.decorators.forEach(t),U(e.start,e.end)<0&&(e.start=qe(e.start),s.skipSpaces(e.start,!1,!0),U(e.start,e.end)<0&&(e.end=qe(e.end),s.skipSpaces(e.end,!0,!0))),i.comments&&i.comments.forEach(t),e}function kr(i,s){i&&s&&(U(s.start,i.start)<0&&(i.start=s.start),U(i.end,s.end)<0&&(i.end=s.end))}function Ur(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()),Wl(i,s),Jl(i,s),e&&i.decorators)i.decorators.forEach(function(t){kr(e,t.loc)});else if(i.declaration&&ws(i)){i.declaration.loc=null;let t=i.declaration.decorators;t&&t.forEach(function(r){kr(e,r.loc)})}else if(cs.MethodDefinition&&cs.MethodDefinition.check(i)||cs.Property.check(i)&&(i.method||i.shorthand))i.value.loc=null,cs.FunctionExpression.check(i.value)&&(i.value.id=null);else if(i.type==="ObjectTypeProperty"){let t=i.loc,r=t&&t.end;r&&(r=qe(r),s.prevPos(r)&&s.charAt(r)===","&&(r=s.skipSpaces(r,!0,!0))&&(t.end=r))}}function Wl(i,s){if(i.type!=="ForStatement")return;function e(t){let r=t&&t.loc,n=r&&r.start,a=r&&qe(r.end);for(;n&&a&&U(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 Jl(i,s){if(i.type==="TemplateLiteral"&&i.quasis.length!==0){if(i.loc){let e=qe(i.loc.start),t=i.quasis[0];U(t.loc.start,e)<0&&(t.loc.start=e);let r=qe(i.loc.end),n=i.quasis[i.quasis.length-1];U(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];U(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];U(a.loc.start,n)<0&&(a.loc.start=n)}})}}function ws(i){if(i)switch(i.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function On(i){let s=i.getParentNode();return i.getName()==="declaration"&&ws(s)?s:null}function Rt(i,s){let e=i.trailingComma;return typeof e=="object"?!!e[s]:!!e}var Lr={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:$l(),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},Kl=Lr.hasOwnProperty;function vs(i){let s=i||Lr;function e(t){return Kl.call(s,t)?s[t]:Lr[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 Dr=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),Hl(r,c,s,u,h)}if(U(e,a.start)<=0)if(U(a.end,t)<=0)a={start:$e(a.start,e.line,e.column),end:$e(a.end,e.line,e.column)};else{if(U(t,a.start)<=0)return null;n={start:n.start,end:o("end")},a={start:$e(a.start,e.line,e.column),end:$e(t,e.line,e.column)}}else{if(U(a.end,e)<=0)return null;U(a.end,t)<=0?(n={start:o("start"),end:n.end},a={start:{line:1,column:0},end:$e(a.end,e.line,e.column)}):(n={start:o("start"),end:o("end")},a={start:{line:1,column:0},end:$e(t,e.line,e.column)})}return new i(this.sourceLines,n,a)}add(s,e){return new i(this.sourceLines,this.sourceLoc,{start:cn(this.targetLoc.start,s,e),end:cn(this.targetLoc.end,s,e)})}subtract(s,e){return new i(this.sourceLines,this.sourceLoc,{start:$e(this.targetLoc.start,s,e),end:$e(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 cn(i,s,e){return{line:i.line+s-1,column:i.line===1?i.column+e:i.column}}function $e(i,s,e){return{line:i.line-s+1,column:i.line===s?i.column-e:i.column}}function Hl(i,s,e,t,r){let n=U(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);U(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));U(r,o)<0&&e.prevPos(o,!0););}return a}var Xl=Object.defineProperty,Gl=(i,s,e)=>s in i?Xl(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,Dt=(i,s,e)=>(Gl(i,typeof s!="symbol"?s+"":s,e),e),dt=class i{constructor(s,e=null){this.infos=s,Dt(this,"length"),Dt(this,"name"),Dt(this,"mappings",[]),Dt(this,"cachedSourceMap",null),Dt(this,"cachedTabWidth"),this.length=s.length,this.name=e||null,this.name&&this.mappings.push(new Dr(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 Es.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(;U(l,o.sourceLoc.end)<0&&U(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}}),!Or.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(Mr),n=r[e-1];return typeof n>"u"?"":t===n.length&&e<r.length?`
10
+ `: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?`
11
+ `: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(ut(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)Or.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 ut(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 ut(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(!ut(this.charAt(s))&&this.nextPos(s))return s;return null}else{for(;ut(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):Xe}trimRight(){let s=this.skipSpaces(this.lastPos(),!0,!0);return s?this.slice(this.firstPos(),s):Xe}trim(){let s=this.skipSpaces(this.firstPos(),!1,!0);if(s===null)return Xe;let e=this.skipSpaces(this.lastPos(),!0,!0);return e===null?Xe: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(Mr).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(`
12
+ `))}slice(s,e){if(!e){if(!s)return this;e=this.lastPos()}if(!s)throw new Error("cannot slice with end but not start");let t=this.infos.slice(s.line-1,e.line);s.line===e.line?t[0]=ht(t[0],s.column,e.column):(t[0]=ht(t[0],s.column),t.push(ht(t.pop(),0,e.column)));let r=new i(t);if(this.mappings.length>0){let n=r.mappings;this.mappings.forEach(function(a){let o=a.slice(this,s,e);o&&n.push(o)},this)}return r}bootstrapSliceString(s,e,t){return this.slice(s,e).toString(t)}sliceString(s=this.firstPos(),e=this.lastPos(),t){let{tabWidth:r,useTabs:n,reuseWhitespace:a,lineTerminator:o}=vs(t),l=[];for(let c=s.line;c<=e.line;++c){let u=this.infos[c-1];c===s.line?c===e.line?u=ht(u,s.column,e.column):u=ht(u,s.column):c===e.line&&(u=ht(u,0,e.column));let h=Math.max(u.indent,0),f=u.line.slice(0,u.sliceStart);if(a&&ut(f)&&Mn(f,r)===h){l.push(u.line.slice(0,u.sliceEnd));continue}let d=0,p=h;n&&(d=Math.floor(h/r),p-=d*r);let g="";d>0&&(g+=new Array(d+1).join(" ")),p>0&&(g+=new Array(p+1).join(" ")),g+=u.line.slice(u.sliceStart,u.sliceEnd),l.push(g)}return l.join(o)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(s){let e=this,t=[],r=[],n;function a(c){if(c!==null){if(n){let u=c.infos[0],h=new Array(u.indent+1).join(" "),f=t.length,d=Math.max(n.indent,0)+n.sliceEnd-n.sliceStart;n.line=n.line.slice(0,n.sliceEnd)+h+u.line.slice(u.sliceStart,u.sliceEnd),n.locked=n.locked||u.locked,n.sliceEnd=n.line.length,c.mappings.length>0&&c.mappings.forEach(function(p){r.push(p.add(f,d))})}else c.mappings.length>0&&r.push.apply(r,c.mappings);c.infos.forEach(function(u,h){(!n||h>0)&&(n={...u},t.push(n))})}}function o(c,u){u>0&&a(e),a(c)}if(s.map(function(c){let u=S(c);return u.isEmpty()?null:u}).forEach((c,u)=>{e.isEmpty()?a(c):o(c,u)}),t.length<1)return Xe;let l=new i(t);return l.mappings=r,l}concat(...s){let e=[this];return e.push.apply(e,s),Xe.join(e)}},ds={},Or=ds.hasOwnProperty,Ql=10;function Mn(i,s){let e=0,t=i.length;for(let r=0;r<t;++r)switch(i.charCodeAt(r)){case 9:{let n=Math.ceil(e/s)*s;n===e?e+=s:e=n;break}case 11:case 12:case 13:case 65279:break;case 32:default:e+=1;break}return e}var Yl=/^\s*/,Mr=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function S(i,s){if(i instanceof dt)return i;i+="";let e=s&&s.tabWidth,t=i.indexOf(" ")<0,r=!s&&t&&i.length<=Ql;if(r&&Or.call(ds,i))return ds[i];let n=new dt(i.split(Mr).map(function(a){let o=Yl.exec(a)[0];return{line:a,indent:Mn(o,e),locked:!1,sliceStart:o.length,sliceEnd:a.length}}),vs(s).sourceFileName);return r&&(ds[i]=n),n}function ut(i){return!/\S/.test(i)}function ht(i,s,e){let t=i.sliceStart,r=i.sliceEnd,n=Math.max(i.indent,0),a=n+r-t;return typeof e>"u"&&(e=a),s=Math.max(s,0),e=Math.min(e,a),e=Math.max(e,s),e<n?(n=e,r=t):r-=a-e,a=e,a-=s,s<n?n-=s:(s-=n,n=0,t+=s),i.indent===n&&i.sliceStart===t&&i.sliceEnd===r?i:{line:i.line,indent:n,locked:!1,sliceStart:t,sliceEnd:r}}function x(i){return Xe.join(i)}var Xe=S(""),mt=Ae,Fn=Ee.array,Zl=Ee.object,un=new WeakMap;function Bn(i,s,e){if(!i)return e;if(Ur(i,s),e){if(mt.Node.check(i)&&mt.SourceLocation.check(i.loc)){let r=e.length-1;for(;r>=0;--r){let n=e[r];if(n&&n.loc&&U(n.loc.end,i.loc.start)<=0)break}return e.splice(r+1,0,i),e}}else{let r=un.get(i);if(r)return r}let t;if(Fn.check(i))t=Object.keys(i);else if(Zl.check(i))t=_l(i);else return e;e||un.set(i,e=[]);for(let r=0,n=t.length;r<n;++r)Bn(i[t[r]],s,e);return e}function _n(i,s,e){let t=Bn(i,e),r=0,n=t&&t.length,a,o;for(;typeof n=="number"&&r<n;){let l=r+n>>1,c=t[l];if(U(c.loc.start,s.loc.start)<=0&&U(s.loc.end,c.loc.end)<=0){_n(s.enclosingNode=c,s,e);return}if(U(c.loc.end,s.loc.start)<=0){a=c,r=l+1;continue}if(U(s.loc.end,c.loc.start)<=0){o=c,n=l;continue}throw new Error("Comment location overlaps with node location")}a&&(s.precedingNode=a),o&&(s.followingNode=o)}function ec(i,s,e){if(!Fn.check(i))return;let t=[];i.forEach(function(r){r.loc.lines=e,_n(s,r,e);let n=r.precedingNode,a=r.enclosingNode,o=r.followingNode;if(n&&o){let l=t.length;l>0&&t[l-1].followingNode!==r.followingNode&&Ot(t,e),t.push(r)}else if(n)Ot(t,e),Rn(n,r);else if(o)Ot(t,e),jn(o,r);else if(a)Ot(t,e),tc(a,r);else throw new Error("AST contains no nodes at all?")}),Ot(t,e),i.forEach(function(r){delete r.precedingNode,delete r.enclosingNode,delete r.followingNode})}function Ot(i,s){let e=i.length;if(e===0)return;let t=i[0].precedingNode,r=i[0].followingNode,n=r.loc.start,a=e,o;for(;a>0;--a){o=i[a-1];let l=s.sliceString(o.loc.end,n);if(/\S/.test(l))break;n=o.loc.start}for(;a<=e&&(o=i[a])&&(o.type==="Line"||o.type==="CommentLine")&&o.loc.start.column>r.loc.start.column;)++a;if(a){let{enclosingNode:l}=i[a-1];l?.type==="CallExpression"&&--a}i.forEach(function(l,c){c<a?Rn(t,l):jn(r,l)}),i.length=0}function Vr(i,s){(i.comments||(i.comments=[])).push(s)}function jn(i,s){s.leading=!0,s.trailing=!1,Vr(i,s)}function tc(i,s){s.leading=!1,s.trailing=!1,Vr(i,s)}function Rn(i,s){s.leading=!1,s.trailing=!0,Vr(i,s)}function sc(i,s){let e=i.getValue();mt.Comment.assert(e);let t=e.loc,r=t&&t.lines,n=[s(i)];if(e.trailing)n.push(`
13
+ `);else if(r instanceof dt){let a=r.slice(t.end,r.skipSpaces(t.end)||r.lastPos());a.length===1?n.push(a):n.push(new Array(a.length).join(`
14
+ `))}else n.push(`
15
+ `);return x(n)}function rc(i,s){let e=i.getValue(i);mt.Comment.assert(e);let t=e.loc,r=t&&t.lines,n=[];if(r instanceof dt){let a=r.skipSpaces(t.start,!0)||r.firstPos(),o=r.slice(a,t.start);o.length===1?n.push(o):n.push(new Array(o.length).join(`
16
+ `))}return n.push(s(i)),x(n)}function hn(i,s){let e=i.getValue(),t=s(i),r=mt.Node.check(e)&&_e(e,"comments");if(!r||r.length===0)return t;let n=[],a=[t];return i.each(function(o){let l=o.getValue(),c=_e(l,"leading"),u=_e(l,"trailing");c||u&&!(mt.Statement.check(e)||l.type==="Block"||l.type==="CommentBlock")?n.push(sc(o,s)):u&&a.push(rc(o,s))},"comments"),n.push.apply(n,a),x(n)}var ic=yt,nc=Ee.object,ac=Ee.array;function Un(i,s){s=vs(s);let e=S(i,s),t=e.toString({tabWidth:s.tabWidth,reuseWhitespace:!1,useTabs:!1}),r=[],n=s.parser.parse(t,{jsx:!0,loc:!0,locations:!0,range:s.range,comment:!0,onComment:r,tolerant:ln(s,"tolerant",!0),ecmaVersion:6,sourceType:ln(s,"sourceType","module")}),a=Array.isArray(n.tokens)?n.tokens:!1;delete n.tokens,a.forEach(function(u){typeof u.value!="string"&&(u.value=e.sliceString(u.loc.start,u.loc.end))}),Array.isArray(n.comments)&&(r=n.comments,delete n.comments),n.loc?Ur(n,e):n.loc={start:e.firstPos(),end:e.lastPos()},n.loc.lines=e,n.loc.indent=0;let o,l;n.type==="Program"?(l=n,o=ic.file(n,s.sourceFileName||null),o.loc={start:e.firstPos(),end:e.lastPos(),lines:e,indent:0}):n.type==="File"&&(o=n,l=o.program),s.tokens&&(o.tokens=a);let c=Dn({type:l.type,loc:l.loc,body:[],comments:r},e);return l.loc.start=c.start,l.loc.end=c.end,ec(r,l.body.length?o.program:o,e),new Vn(e,a).copy(o)}var Vn=function(s,e){this.lines=s,this.tokens=e,this.startTokenIndex=0,this.endTokenIndex=e.length,this.indent=0,this.seen=new Map},$n=Vn.prototype;$n.copy=function(i){if(this.seen.has(i))return this.seen.get(i);if(ac.check(i)){let c=new Array(i.length);return this.seen.set(i,c),i.forEach(function(u,h){c[h]=this.copy(u)},this),c}if(!nc.check(i))return i;Ur(i,this.lines);let s=Object.create(Object.getPrototypeOf(i),{original:{value:i,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(i,s);let e=i.loc,t=this.indent,r=t,n=this.startTokenIndex,a=this.endTokenIndex;e&&((i.type==="Block"||i.type==="Line"||i.type==="CommentBlock"||i.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(e.start))&&(r=this.indent=e.start.column),e.lines=this.lines,e.tokens=this.tokens,e.indent=r,this.findTokenRange(e));let o=Object.keys(i),l=o.length;for(let c=0;c<l;++c){let u=o[c];u==="loc"||u==="tokens"&&i.type==="File"?s[u]=i[u]:s[u]=this.copy(i[u])}return this.indent=t,this.startTokenIndex=n,this.endTokenIndex=a,s};$n.findTokenRange=function(i){for(;this.startTokenIndex>0;){let s=i.tokens[this.startTokenIndex];if(U(i.start,s.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<i.tokens.length;){let s=i.tokens[this.endTokenIndex];if(U(s.loc.end,i.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let s=i.tokens[this.startTokenIndex];if(U(s.loc.start,i.start)<0)++this.startTokenIndex;else break}for(i.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let s=i.tokens[this.endTokenIndex-1];if(U(i.end,s.loc.end)<0)--this.endTokenIndex;else break}i.end.token=this.endTokenIndex};var H=Ae,oc=Ee.array,lc=Ee.number,Fr={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(i,s){i.forEach(function(e){Fr[e]=s})});var Se=function(s){this.stack=[s]},ie=Se.prototype;Se.from=function(i){if(i instanceof Se)return i.copy();if(i instanceof Rl){let s=Object.create(Se.prototype),e=[i.value];for(let t;t=i.parentPath;i=t)e.push(i.name,t.value);return s.stack=e.reverse(),s}return new Se(i)};ie.copy=function(){let s=Object.create(Se.prototype);return s.stack=this.stack.slice(0),s};ie.getName=function(){let s=this.stack,e=s.length;return e>1?s[e-2]:null};ie.getValue=function(){let s=this.stack;return s[s.length-1]};ie.valueIsDuplicate=function(){let i=this.stack,s=i.length-1;return i.lastIndexOf(i[s],s-1)>=0};function qn(i,s){let e=i.stack;for(let t=e.length-1;t>=0;t-=2){let r=e[t];if(H.Node.check(r)&&--s<0)return r}return null}ie.getNode=function(s=0){return qn(this,~~s)};ie.getParentNode=function(s=0){return qn(this,~~s+1)};ie.getRootValue=function(){let s=this.stack;return s.length%2===0?s[1]:s[0]};ie.call=function(s){let e=this.stack,t=e.length,r=e[t-1],n=arguments.length;for(let o=1;o<n;++o){let l=arguments[o];r=r[l],e.push(l,r)}let a=s(this);return e.length=t,a};ie.each=function(s){let e=this.stack,t=e.length,r=e[t-1],n=arguments.length;for(let a=1;a<n;++a){let o=arguments[a];r=r[o],e.push(o,r)}for(let a=0;a<r.length;++a)a in r&&(e.push(a,r[a]),s(this),e.length-=2);e.length=t};ie.map=function(s){let e=this.stack,t=e.length,r=e[t-1],n=arguments.length;for(let o=1;o<n;++o){let l=arguments[o];r=r[l],e.push(l,r)}let a=new Array(r.length);for(let o=0;o<r.length;++o)o in r&&(e.push(o,r[o]),a[o]=s(this,o),e.length-=2);return e.length=t,a};ie.hasParens=function(){let i=this.getNode(),s=this.getPrevToken(i);if(!s)return!1;let e=this.getNextToken(i);return e?!!(s.value==="("&&(e.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};ie.getPrevToken=function(i){i=i||this.getNode();let s=i&&i.loc,e=s&&s.tokens;if(e&&s.start.token>0){let t=e[s.start.token-1];if(t){let r=this.getRootValue().loc;if(U(r.start,t.loc.start)<=0)return t}}return null};ie.getNextToken=function(i){i=i||this.getNode();let s=i&&i.loc,e=s&&s.tokens;if(e&&s.end.token<e.length){let t=e[s.end.token];if(t){let r=this.getRootValue().loc;if(U(t.loc.end,r.end)<=0)return t}}return null};ie.needsParens=function(i){let s=this.getNode();if(s.type==="AssignmentExpression"&&s.left.type==="ObjectPattern")return!0;let e=this.getParentNode(),t=this.getName();if(this.getValue()!==s||H.Statement.check(s)||s.type==="Identifier"||e&&e.type==="ParenthesizedExpression")return!1;if(s.extra&&s.extra.parenthesized)return!0;if(!e)return!1;if(s.type==="UnaryExpression"&&e.type==="BinaryExpression"&&t==="left"&&e.left===s&&e.operator==="**")return!0;switch(s.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return e.type==="MemberExpression"&&t==="object"&&e.object===s;case"BinaryExpression":case"LogicalExpression":switch(e.type){case"CallExpression":return t==="callee"&&e.callee===s;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return t==="object"&&e.object===s;case"BinaryExpression":case"LogicalExpression":{let r=e.operator,n=Fr[r],a=s.operator,o=Fr[a];if(n>o||n===o&&t==="right")return!0;break}default:return!1}break;case"SequenceExpression":switch(e.type){case"ReturnStatement":return!1;case"ForStatement":return!1;case"ExpressionStatement":return t!=="expression";default:return!0}case"OptionalIndexedAccessType":return s.optional&&e.type==="IndexedAccessType";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return e.type==="NullableTypeAnnotation";case"Literal":return e.type==="MemberExpression"&&lc.check(s.value)&&t==="object"&&e.object===s;case"NumericLiteral":return e.type==="MemberExpression"&&t==="object"&&e.object===s;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(e.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return t==="callee"&&e.callee===s;case"ConditionalExpression":return t==="test"&&e.test===s;case"MemberExpression":return t==="object"&&e.object===s;default:return!1}case"ArrowFunctionExpression":return H.CallExpression.check(e)&&t==="callee"&&e.callee===s||H.MemberExpression.check(e)&&t==="object"&&e.object===s||H.TSAsExpression&&H.TSAsExpression.check(e)&&t==="expression"&&e.expression===s?!0:zn(e);case"ObjectExpression":if(e.type==="ArrowFunctionExpression"&&t==="body"&&e.body===s)return!0;break;case"TSAsExpression":if(e.type==="ArrowFunctionExpression"&&t==="body"&&e.body===s&&s.expression.type==="ObjectExpression")return!0;break;case"CallExpression":if(t==="declaration"&&H.ExportDefaultDeclaration.check(e)&&H.FunctionExpression.check(s.callee))return!0}return e.type==="NewExpression"&&t==="callee"&&e.callee===s?Br(s):!!(i!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function zn(i){return H.BinaryExpression.check(i)||H.LogicalExpression.check(i)}function Br(i){return H.CallExpression.check(i)?!0:oc.check(i)?i.some(Br):H.Node.check(i)?Ul(i,(s,e)=>Br(e)):!1}ie.canBeFirstInStatement=function(){let i=this.getNode();return!(H.FunctionExpression.check(i)||H.ObjectExpression.check(i)||H.ClassExpression.check(i))};ie.firstInStatement=function(){let i=this.stack,s,e,t,r;for(let n=i.length-1;n>=0;n-=2)if(H.Node.check(i[n])&&(t=s,r=e,s=i[n-1],e=i[n]),!(!e||!r)){if(H.BlockStatement.check(e)&&s==="body"&&t===0||H.ExpressionStatement.check(e)&&t==="expression"||H.AssignmentExpression.check(e)&&t==="left"||H.ArrowFunctionExpression.check(e)&&t==="body")return!0;if(!(H.SequenceExpression.check(e)&&i[n+1]==="expressions"&&t===0)&&!(H.CallExpression.check(e)&&t==="callee")&&!(H.MemberExpression.check(e)&&t==="object")&&!(H.ConditionalExpression.check(e)&&t==="test")&&!(zn(e)&&t==="left")&&!(H.UnaryExpression.check(e)&&!e.prefix&&t==="argument"))return!1}return!0};var Vt=Ae.Printable,pn=Ae.Expression,cc=Ae.ReturnStatement,uc=Ae.SourceLocation,$t=Ee.object,_r=Ee.array,hc=Ee.string,Ss=/[0-9a-z_$]/i,Wn=function(s){let e=this,t=[];e.replace=function(r,n){hc.check(n)&&(n=S(n)),t.push({lines:n,start:r.start,end:r.end})},e.get=function(r){r=r||{start:{line:1,column:0},end:{line:s.length,column:s.getLineLength(s.length)}};let n=r.start,a=[];function o(l,c){a.push(s.slice(l,c))}return t.sort((l,c)=>U(l.start,c.start)).forEach(function(l){U(n,l.start)>0||(o(n,l.start),a.push(l.lines),n=l.end)}),o(n,r.end),x(a)}},Jn=Wn.prototype;Jn.tryToReprintComments=function(i,s,e){let t=this;if(!i.comments&&!s.comments)return!0;let r=Se.from(i),n=Se.from(s);r.stack.push("comments",fn(i)),n.stack.push("comments",fn(s));let a=[],o=Hn(r,n,a);return o&&a.length>0&&a.forEach(function(l){let c=l.oldPath.getValue();t.replace(c.loc,e(l.newPath).indentTail(c.loc.indent))}),o};function fn(i){let s=[];return i.comments&&i.comments.length>0&&i.comments.forEach(function(e){(e.leading||e.trailing)&&s.push(e)}),s}Jn.deleteComments=function(i){if(!i.comments)return;let s=this;i.comments.forEach(function(e){e.leading?s.replace({start:e.loc.start,end:i.loc.lines.skipSpaces(e.loc.end,!1,!1)},""):e.trailing&&s.replace({start:i.loc.lines.skipSpaces(e.loc.start,!0,!1),end:e.loc.end},"")})};function pc(i){let s=i.getValue();if(!Vt.check(s))return;let e=s.original,t=e&&e.loc,r=t&&t.lines,n=[];if(!(!r||!mc(i,n)))return function(a){let o=new Wn(r);n.forEach(function(c){let u=c.newPath.getValue(),h=c.oldPath.getValue();uc.assert(h.loc,!0);let f=!o.tryToReprintComments(u,h,a);f&&o.deleteComments(h);let d=a(c.newPath,{includeComments:f,avoidRootParens:h.type===u.type&&c.oldPath.hasParens()}).indentTail(h.loc.indent),p=fc(r,h.loc,d),g=dc(r,h.loc,d);if(p||g){let y=[];p&&y.push(" "),y.push(d),g&&y.push(" "),d=x(y)}o.replace(h.loc,d)});let l=o.get(t).indentTail(-e.loc.indent);return i.needsParens()?x(["(",l,")"]):l}}function fc(i,s,e){let t=qe(s.start),r=i.prevPos(t)&&i.charAt(t),n=e.charAt(e.firstPos());return r&&Ss.test(r)&&n&&Ss.test(n)}function dc(i,s,e){let t=i.charAt(s.end),r=e.lastPos(),n=e.prevPos(r)&&e.charAt(r);return n&&Ss.test(n)&&t&&Ss.test(t)}function mc(i,s){let e=i.getValue();Vt.assert(e);let t=e.original;if(Vt.assert(t),e.type!==t.type)return!1;let r=new Se(t),n=jr(i,r,s);return n||(s.length=0),n}function Kn(i,s,e){let t=i.getValue(),r=s.getValue();return t===r?!0:_r.check(t)?Hn(i,s,e):$t.check(t)?yc(i,s,e):!1}function Hn(i,s,e){let t=i.getValue(),r=s.getValue();if(t===r||i.valueIsDuplicate()||s.valueIsDuplicate())return!0;_r.assert(t);let n=t.length;if(!(_r.check(r)&&r.length===n))return!1;for(let a=0;a<n;++a){i.stack.push(a,t[a]),s.stack.push(a,r[a]);let o=Kn(i,s,e);if(i.stack.length-=2,s.stack.length-=2,!o)return!1}return!0}function yc(i,s,e){let t=i.getValue();if($t.assert(t),t.original===null)return!1;let r=s.getValue();if(!$t.check(r))return!1;if(t===r||i.valueIsDuplicate()||s.valueIsDuplicate())return!0;if(Vt.check(t)){if(!Vt.check(r))return!1;let n=i.getParentNode(),a=s.getParentNode();if(a!==null&&a.type==="FunctionTypeAnnotation"&&n!==null&&n.type==="FunctionTypeAnnotation"){let o=a.params.length!==1||!!a.params[0].name,l=n.params.length!==1||!!n.params[0].name;if(!o&&l)return!1}if(t.type===r.type){let o=[];if(jr(i,s,o))e.push.apply(e,o);else if(r.loc)e.push({oldPath:s.copy(),newPath:i.copy()});else return!1;return!0}return pn.check(t)&&pn.check(r)&&r.loc?(e.push({oldPath:s.copy(),newPath:i.copy()}),!0):!1}return jr(i,s,e)}function jr(i,s,e){let t=i.getValue(),r=s.getValue();if($t.assert(t),$t.assert(r),t.original===null||i.needsParens()&&!s.hasParens())return!1;let n=ql(r,t);(r.type==="File"||t.type==="File")&&delete n.tokens,delete n.loc;let a=e.length;for(let o in n){if(o.charAt(0)==="_")continue;i.stack.push(o,_e(t,o)),s.stack.push(o,_e(r,o));let l=Kn(i,s,e);if(i.stack.length-=2,s.stack.length-=2,!l)return!1}return!(cc.check(i.getNode())&&e.length>a)}var Z=Ae,$r=Ee.string,gc=Ee.object,As=function(s,e){$r.assert(s),this.code=s,e&&(gc.assert(e),this.map=e)},xc=As.prototype,dn=!1;xc.toString=function(){return dn||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),dn=!0),this.code};var mn=new As(""),bc=function(s){let e=s&&s.tabWidth;s=vs(s),s.sourceFileName=null;function t(n,a){return n=Object.assign({},n,a),o=>r(o,n)}function r(n,a){if(a=a||{},a.includeComments)return hn(n,t(a,{includeComments:!1}));let o=s.tabWidth;if(!e){let u=n.getNode().loc;u&&u.lines&&u.lines.guessTabWidth&&(s.tabWidth=u.lines.guessTabWidth())}let l=pc(n),c=l?l(r):yn(n,s,a,t(a,{includeComments:!0,avoidRootParens:!1}));return s.tabWidth=o,c}this.print=function(n){if(!n)return mn;let a=r(Se.from(n),{includeComments:!0,avoidRootParens:!1});return new As(a.toString(s),zl(s.inputSourceMap,a.getSourceMap(s.sourceMapName,s.sourceRoot)))},this.printGenerically=function(n){if(!n)return mn;function a(u){return hn(u,h=>yn(h,s,{includeComments:!0,avoidRootParens:!1},a))}let o=Se.from(n),l=s.reuseWhitespace;s.reuseWhitespace=!1;let c=new As(a(o).toString(s));return s.reuseWhitespace=l,c}};function yn(i,s,e,t){let r=i.getValue(),n=[],a=Tc(i,s,t);if(!r||a.isEmpty())return a;let o=!1,l=Pc(i,t);return l.isEmpty()?e.avoidRootParens||(o=i.needsParens()):n.push(l),o&&n.unshift("("),n.push(a),o&&n.push(")"),x(n)}function Tc(i,s,e){let t=i.getValue();if(!t)return S("");if(typeof t=="string")return S(t,s);Z.Printable.assert(t);let r=[];switch(t.type){case"File":return i.call(e,"program");case"Program":return t.directives&&i.each(function(n){r.push(e(n),`;
17
+ `)},"directives"),t.interpreter&&r.push(i.call(e,"interpreter")),r.push(i.call(n=>pt(n,s,e),"body")),x(r);case"Noop":case"EmptyStatement":return S("");case"ExpressionStatement":return x([i.call(e,"expression"),";"]);case"ParenthesizedExpression":return x(["(",i.call(e,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return S(" ").join([i.call(e,"left"),t.operator,i.call(e,"right")]);case"AssignmentPattern":return x([i.call(e,"left")," = ",i.call(e,"right")]);case"MemberExpression":case"OptionalMemberExpression":{r.push(i.call(e,"object"));let n=i.call(e,"property"),a=_e(t,"optional");return t.computed?r.push(a?"?.[":"[",n,"]"):r.push(a?"?.":".",n),x(r)}case"ChainExpression":return i.call(e,"expression");case"MetaProperty":return x([i.call(e,"meta"),".",i.call(e,"property")]);case"BindExpression":return t.object&&r.push(i.call(e,"object")),r.push("::",i.call(e,"callee")),x(r);case"Path":return S(".").join(t.body);case"Identifier":return x([S(t.name,s),t.optional?"?":"",i.call(e,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return x(["...",i.call(e,"argument"),i.call(e,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return t.declare&&r.push("declare "),t.async&&r.push("async "),r.push("function"),t.generator&&r.push("*"),t.id?r.push(" ",i.call(e,"id"),i.call(e,"typeParameters")):t.typeParameters&&r.push(i.call(e,"typeParameters")),r.push("(",Ie(i,s,e),")",i.call(e,"returnType")),t.body&&r.push(" ",i.call(e,"body")),x(r);case"ArrowFunctionExpression":return t.async&&r.push("async "),t.typeParameters&&r.push(i.call(e,"typeParameters")),!s.arrowParensAlways&&t.params.length===1&&!t.rest&&t.params[0].type==="Identifier"&&!t.params[0].typeAnnotation&&!t.returnType?r.push(i.call(e,"params",0)):r.push("(",Ie(i,s,e),")",i.call(e,"returnType")),r.push(" => ",i.call(e,"body")),x(r);case"MethodDefinition":return Cr(i,s,e);case"YieldExpression":return r.push("yield"),t.delegate&&r.push("*"),t.argument&&r.push(" ",i.call(e,"argument")),x(r);case"AwaitExpression":return r.push("await"),t.all&&r.push("*"),t.argument&&r.push(" ",i.call(e,"argument")),x(r);case"ModuleExpression":return x([`module {
18
+ `,i.call(e,"body").indent(s.tabWidth),`
19
+ }`]);case"ModuleDeclaration":return r.push("module",i.call(e,"id")),t.source?r.push("from",i.call(e,"source")):r.push(i.call(e,"body")),S(" ").join(r);case"ImportSpecifier":return t.importKind&&t.importKind!=="value"&&r.push(t.importKind+" "),t.imported?(r.push(i.call(e,"imported")),t.local&&t.local.name!==t.imported.name&&r.push(" as ",i.call(e,"local"))):t.id&&(r.push(i.call(e,"id")),t.name&&r.push(" as ",i.call(e,"name"))),x(r);case"ExportSpecifier":return t.exportKind&&t.exportKind!=="value"&&r.push(t.exportKind+" "),t.local?(r.push(i.call(e,"local")),t.exported&&t.exported.name!==t.local.name&&r.push(" as ",i.call(e,"exported"))):t.id&&(r.push(i.call(e,"id")),t.name&&r.push(" as ",i.call(e,"name"))),x(r);case"ExportBatchSpecifier":return S("*");case"ImportNamespaceSpecifier":return r.push("* as "),t.local?r.push(i.call(e,"local")):t.id&&r.push(i.call(e,"id")),x(r);case"ImportDefaultSpecifier":return t.local?i.call(e,"local"):i.call(e,"id");case"TSExportAssignment":return x(["export = ",i.call(e,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return xn(i,s,e);case"ExportAllDeclaration":return r.push("export *"),t.exported&&r.push(" as ",i.call(e,"exported")),r.push(" from ",i.call(e,"source"),";"),x(r);case"TSNamespaceExportDeclaration":return r.push("export as namespace ",i.call(e,"id")),ms(x(r));case"ExportNamespaceSpecifier":return x(["* as ",i.call(e,"exported")]);case"ExportDefaultSpecifier":return i.call(e,"exported");case"Import":return S("import",s);case"ImportExpression":return x(["import(",i.call(e,"source"),")"]);case"ImportDeclaration":{if(r.push("import "),t.importKind&&t.importKind!=="value"&&r.push(t.importKind+" "),t.specifiers&&t.specifiers.length>0){let n=[],a=[];if(i.each(function(o){let l=o.getValue();l.type==="ImportSpecifier"?a.push(e(o)):(l.type==="ImportDefaultSpecifier"||l.type==="ImportNamespaceSpecifier")&&n.push(e(o))},"specifiers"),n.forEach((o,l)=>{l>0&&r.push(", "),r.push(o)}),a.length>0){let o=S(", ").join(a);o.getLineLength(1)>s.wrapColumn&&(o=x([S(`,
20
+ `).join(a).indent(s.tabWidth),","])),n.length>0&&r.push(", "),o.length>1?r.push(`{
51
21
  `,o,`
52
- }`):t.objectCurlySpacing?n.push("{ ",o," }"):n.push("{",o,"}")}n.push(" from ")}return n.push(r.call(e,"source"),Kf(r,t,e),";"),S(n)}case"ImportAttribute":return S([r.call(e,"key"),": ",r.call(e,"value")]);case"StaticBlock":n.push("static ");case"BlockStatement":{let i=r.call(a=>nr(a,t,e),"body");return i.isEmpty()&&(!s.directives||s.directives.length===0)?(n.push("{}"),S(n)):(n.push(`{
53
- `),s.directives&&r.each(function(a){n.push(qi(e(a).indent(t.tabWidth)),s.directives.length>1||!i.isEmpty()?`
54
- `:"")},"directives"),n.push(i.indent(t.tabWidth)),n.push(`
55
- }`),S(n))}case"ReturnStatement":{if(n.push("return"),s.argument){let i=r.call(e,"argument");i.startsWithComment()||i.length>1&&le.JSXElement&&le.JSXElement.check(s.argument)?n.push(` (
56
- `,i.indent(t.tabWidth),`
57
- )`):n.push(" ",i)}return n.push(";"),S(n)}case"CallExpression":case"OptionalCallExpression":return n.push(r.call(e,"callee")),s.typeParameters&&n.push(r.call(e,"typeParameters")),s.typeArguments&&n.push(r.call(e,"typeArguments")),Lt(s,"optional")&&n.push("?."),n.push(gf(r,t,e)),S(n);case"RecordExpression":n.push("#");case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":{let i=s.type==="ObjectTypeAnnotation",a=t.flowObjectCommas?",":i?";":",",o=[],c=!1;i&&(o.push("indexers","callProperties"),s.internalSlots!=null&&o.push("internalSlots")),o.push("properties");let l=0;o.forEach(function(m){l+=s[m].length});let u=i&&l===1||l===0,p=s.exact?"{|":"{",h=s.exact?"|}":"}";n.push(u?p:p+`
58
- `);let d=n.length-1,f=0;if(o.forEach(function(m){r.each(function(y){let b=e(y);u||(b=b.indent(t.tabWidth));let x=!i&&b.length>1;x&&c&&n.push(`
59
- `),n.push(b),f<l-1?(n.push(a+(x?`
22
+ }`):s.objectCurlySpacing?r.push("{ ",o," }"):r.push("{",o,"}")}r.push(" from ")}return r.push(i.call(e,"source"),Gn(i,s,e),";"),x(r)}case"ImportAttribute":return x([i.call(e,"key"),": ",i.call(e,"value")]);case"StaticBlock":r.push("static ");case"BlockStatement":{let n=i.call(a=>pt(a,s,e),"body");return n.isEmpty()&&(!t.directives||t.directives.length===0)?(r.push("{}"),x(r)):(r.push(`{
23
+ `),t.directives&&i.each(function(a){r.push(ms(e(a).indent(s.tabWidth)),t.directives.length>1||!n.isEmpty()?`
24
+ `:"")},"directives"),r.push(n.indent(s.tabWidth)),r.push(`
25
+ }`),x(r))}case"ReturnStatement":{if(r.push("return"),t.argument){let n=i.call(e,"argument");n.startsWithComment()||n.length>1&&Z.JSXElement&&Z.JSXElement.check(t.argument)?r.push(` (
26
+ `,n.indent(s.tabWidth),`
27
+ )`):r.push(" ",n)}return r.push(";"),x(r)}case"CallExpression":case"OptionalCallExpression":return r.push(i.call(e,"callee")),t.typeParameters&&r.push(i.call(e,"typeParameters")),t.typeArguments&&r.push(i.call(e,"typeArguments")),_e(t,"optional")&&r.push("?."),r.push(gn(i,s,e)),x(r);case"RecordExpression":r.push("#");case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":{let n=t.type==="ObjectTypeAnnotation",a=s.flowObjectCommas?",":n?";":",",o=[],l=!1;n&&(o.push("indexers","callProperties"),t.internalSlots!=null&&o.push("internalSlots")),o.push("properties");let c=0;o.forEach(function(g){c+=t[g].length});let u=n&&c===1||c===0,h=t.exact?"{|":"{",f=t.exact?"|}":"}";r.push(u?h:h+`
28
+ `);let d=r.length-1,p=0;if(o.forEach(function(g){i.each(function(y){let b=e(y);u||(b=b.indent(s.tabWidth));let P=!n&&b.length>1;P&&l&&r.push(`
29
+ `),r.push(b),p<c-1?(r.push(a+(P?`
60
30
 
61
31
  `:`
62
- `)),c=!x):(l!==1&&i||!u&&pn(t,"objects")&&y.getValue().type!=="RestElement")&&n.push(a),f++},m)}),s.inexact){let m=v("...",t);u?(l>0&&n.push(a," "),n.push(m)):n.push(`
63
- `,m.indent(t.tabWidth))}return n.push(u?h:`
64
- `+h),f!==0&&u&&t.objectCurlySpacing&&(n[d]=p+" ",n[n.length-1]=" "+h),s.typeAnnotation&&n.push(r.call(e,"typeAnnotation")),S(n)}case"PropertyPattern":return S([r.call(e,"key"),": ",r.call(e,"pattern")]);case"ObjectProperty":case"Property":{if(s.method||s.kind==="get"||s.kind==="set")return Bc(r,t,e);if(s.shorthand&&s.value.type==="AssignmentPattern")return r.call(e,"value");let i=r.call(e,"key");return s.computed?n.push("[",i,"]"):n.push(i),(!s.shorthand||s.key.name!==s.value.name)&&n.push(": ",r.call(e,"value")),S(n)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return Bc(r,t,e);case"PrivateName":return S(["#",r.call(e,"id")]);case"Decorator":return S(["@",r.call(e,"expression")]);case"TupleExpression":n.push("#");case"ArrayExpression":case"ArrayPattern":{let a=s.elements.length,o=r.map(e,"elements"),l=v(", ").join(o).getLineLength(1)<=t.wrapColumn;return l?t.arrayBracketSpacing?n.push("[ "):n.push("["):n.push(`[
65
- `),r.each(function(u){let p=u.getName();if(!u.getValue())n.push(",");else{let d=o[p];l?p>0&&n.push(" "):d=d.indent(t.tabWidth),n.push(d),(p<a-1||!l&&pn(t,"arrays"))&&n.push(","),l||n.push(`
66
- `)}},"elements"),l&&t.arrayBracketSpacing?n.push(" ]"):n.push("]"),s.typeAnnotation&&n.push(r.call(e,"typeAnnotation")),S(n)}case"SequenceExpression":return v(", ").join(r.map(e,"expressions"));case"ThisExpression":return v("this");case"Super":return v("super");case"NullLiteral":return v("null");case"RegExpLiteral":return v(ir(s)||`/${s.pattern}/${s.flags||""}`,t);case"BigIntLiteral":return v(ir(s)||s.value+"n",t);case"NumericLiteral":return v(ir(s)||s.value,t);case"DecimalLiteral":return v(ir(s)||s.value+"m",t);case"StringLiteral":return v(cn(s.value,t));case"BooleanLiteral":case"Literal":return v(ir(s)||(typeof s.value=="string"?cn(s.value,t):s.value),t);case"Directive":return r.call(e,"value");case"DirectiveLiteral":return v(ir(s)||cn(s.value,t),t);case"InterpreterDirective":return v(`#!${s.value}
67
- `,t);case"ModuleSpecifier":if(s.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return v(cn(s.value,t),t);case"UnaryExpression":return n.push(s.operator),/[a-z]$/.test(s.operator)&&n.push(" "),n.push(r.call(e,"argument")),S(n);case"UpdateExpression":return n.push(r.call(e,"argument"),s.operator),s.prefix&&n.reverse(),S(n);case"ConditionalExpression":return S([r.call(e,"test")," ? ",r.call(e,"consequent")," : ",r.call(e,"alternate")]);case"NewExpression":return n.push("new ",r.call(e,"callee")),s.typeParameters&&n.push(r.call(e,"typeParameters")),s.typeArguments&&n.push(r.call(e,"typeArguments")),s.arguments&&n.push(gf(r,t,e)),S(n);case"VariableDeclaration":{s.declare&&n.push("declare "),n.push(s.kind," ");let i=0,a=r.map(function(c){let l=e(c);return i=Math.max(l.length,i),l},"declarations");i===1?n.push(v(", ").join(a)):a.length>1?n.push(v(`,
68
- `).join(a).indentTail(s.kind.length+1)):n.push(a[0]);let o=r.getParentNode();return!le.ForStatement.check(o)&&!le.ForInStatement.check(o)&&!(le.ForOfStatement&&le.ForOfStatement.check(o))&&!(le.ForAwaitStatement&&le.ForAwaitStatement.check(o))&&n.push(";"),S(n)}case"VariableDeclarator":return s.init?v(" = ").join([r.call(e,"id"),r.call(e,"init")]):r.call(e,"id");case"WithStatement":return S(["with (",r.call(e,"object"),") ",r.call(e,"body")]);case"IfStatement":{let i=gs(r.call(e,"consequent"),t);return n.push("if (",r.call(e,"test"),")",i),s.alternate&&n.push(Sf(i)?" else":`
69
- else`,gs(r.call(e,"alternate"),t)),S(n)}case"ForStatement":{let i=r.call(e,"init"),a=i.length>1?`;
70
- `:"; ",o="for (",c=v(a).join([i,r.call(e,"test"),r.call(e,"update")]).indentTail(o.length),l=S([o,c,")"]),u=gs(r.call(e,"body"),t);return n.push(l),l.length>1&&(n.push(`
71
- `),u=u.trimLeft()),n.push(u),S(n)}case"WhileStatement":return S(["while (",r.call(e,"test"),")",gs(r.call(e,"body"),t)]);case"ForInStatement":return S([s.each?"for each (":"for (",r.call(e,"left")," in ",r.call(e,"right"),")",gs(r.call(e,"body"),t)]);case"ForOfStatement":case"ForAwaitStatement":return n.push("for "),(s.await||s.type==="ForAwaitStatement")&&n.push("await "),n.push("(",r.call(e,"left")," of ",r.call(e,"right"),")",gs(r.call(e,"body"),t)),S(n);case"DoWhileStatement":{let i=S(["do",gs(r.call(e,"body"),t)]);return n.push(i),Sf(i)?n.push(" while"):n.push(`
72
- while`),n.push(" (",r.call(e,"test"),");"),S(n)}case"DoExpression":{let i=r.call(a=>nr(a,t,e),"body");return S([`do {
73
- `,i.indent(t.tabWidth),`
74
- }`])}case"BreakStatement":return n.push("break"),s.label&&n.push(" ",r.call(e,"label")),n.push(";"),S(n);case"ContinueStatement":return n.push("continue"),s.label&&n.push(" ",r.call(e,"label")),n.push(";"),S(n);case"LabeledStatement":return S([r.call(e,"label"),`:
75
- `,r.call(e,"body")]);case"TryStatement":return n.push("try ",r.call(e,"block")),s.handler?n.push(" ",r.call(e,"handler")):s.handlers&&r.each(function(i){n.push(" ",e(i))},"handlers"),s.finalizer&&n.push(" finally ",r.call(e,"finalizer")),S(n);case"CatchClause":return n.push("catch "),s.param&&n.push("(",r.call(e,"param")),s.guard&&n.push(" if ",r.call(e,"guard")),s.param&&n.push(") "),n.push(r.call(e,"body")),S(n);case"ThrowStatement":return S(["throw ",r.call(e,"argument"),";"]);case"SwitchStatement":return S(["switch (",r.call(e,"discriminant"),`) {
76
- `,v(`
77
- `).join(r.map(e,"cases")),`
78
- }`]);case"SwitchCase":return s.test?n.push("case ",r.call(e,"test"),":"):n.push("default:"),s.consequent.length>0&&n.push(`
79
- `,r.call(i=>nr(i,t,e),"consequent").indent(t.tabWidth)),S(n);case"DebuggerStatement":return v("debugger;");case"JSXAttribute":return n.push(r.call(e,"name")),s.value&&n.push("=",r.call(e,"value")),S(n);case"JSXIdentifier":return v(s.name,t);case"JSXNamespacedName":return v(":").join([r.call(e,"namespace"),r.call(e,"name")]);case"JSXMemberExpression":return v(".").join([r.call(e,"object"),r.call(e,"property")]);case"JSXSpreadAttribute":return S(["{...",r.call(e,"argument"),"}"]);case"JSXSpreadChild":return S(["{...",r.call(e,"expression"),"}"]);case"JSXExpressionContainer":return S(["{",r.call(e,"expression"),"}"]);case"JSXElement":case"JSXFragment":{let i="opening"+(s.type==="JSXElement"?"Element":"Fragment"),a="closing"+(s.type==="JSXElement"?"Element":"Fragment"),o=r.call(e,i);if(s[i].selfClosing)return o;let c=S(r.map(function(u){let p=u.getValue();if(le.Literal.check(p)&&typeof p.value=="string"){if(/\S/.test(p.value))return p.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(p.value))return`
80
- `}return e(u)},"children")).indentTail(t.tabWidth),l=r.call(e,a);return S([o,c,l])}case"JSXOpeningElement":{n.push("<",r.call(e,"name"));let i=[];r.each(function(c){i.push(" ",e(c))},"attributes");let a=S(i);return(a.length>1||a.getLineLength(1)>t.wrapColumn)&&(i.forEach(function(c,l){c===" "&&(i[l]=`
81
- `)}),a=S(i).indentTail(t.tabWidth)),n.push(a,s.selfClosing?" />":">"),S(n)}case"JSXClosingElement":return S(["</",r.call(e,"name"),">"]);case"JSXOpeningFragment":return v("<>");case"JSXClosingFragment":return v("</>");case"JSXText":return v(s.value,t);case"JSXEmptyExpression":return v("");case"TypeAnnotatedIdentifier":return S([r.call(e,"annotation")," ",r.call(e,"identifier")]);case"ClassBody":return s.body.length===0?v("{}"):S([`{
82
- `,r.call(i=>nr(i,t,e),"body").indent(t.tabWidth),`
83
- }`]);case"ClassPropertyDefinition":return n.push("static ",r.call(e,"definition")),le.MethodDefinition.check(s.definition)||n.push(";"),S(n);case"ClassProperty":{s.declare&&n.push("declare ");let i=s.accessibility||s.access;typeof i=="string"&&n.push(i," "),s.static&&n.push("static "),s.abstract&&n.push("abstract "),s.readonly&&n.push("readonly ");let a=r.call(e,"key");return s.computed&&(a=S(["[",a,"]"])),s.variance&&(a=S([on(r,e),a])),n.push(a),s.optional&&n.push("?"),s.definite&&n.push("!"),s.typeAnnotation&&n.push(r.call(e,"typeAnnotation")),s.value&&n.push(" = ",r.call(e,"value")),n.push(";"),S(n)}case"ClassPrivateProperty":return s.static&&n.push("static "),n.push(r.call(e,"key")),s.typeAnnotation&&n.push(r.call(e,"typeAnnotation")),s.value&&n.push(" = ",r.call(e,"value")),n.push(";"),S(n);case"ClassAccessorProperty":return n.push(...Jf(s),"accessor "),s.computed?n.push("[",r.call(e,"key"),"]"):n.push(r.call(e,"key")),s.optional&&n.push("?"),s.definite&&n.push("!"),s.typeAnnotation&&n.push(r.call(e,"typeAnnotation")),s.value&&n.push(" = ",r.call(e,"value")),n.push(";"),S(n);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return s.declare&&n.push("declare "),s.abstract&&n.push("abstract "),n.push("class"),s.id&&n.push(" ",r.call(e,"id")),s.typeParameters&&n.push(r.call(e,"typeParameters")),s.superClass&&n.push(" extends ",r.call(e,"superClass"),r.call(e,"superTypeParameters")),s.extends&&s.extends.length>0&&n.push(" extends ",v(", ").join(r.map(e,"extends"))),s.implements&&s.implements.length>0&&n.push(" implements ",v(", ").join(r.map(e,"implements"))),n.push(" ",r.call(e,"body")),s.type==="DeclareClass"?an(r,n):S(n);case"TemplateElement":return v(s.value.raw,t).lockIndentTail();case"TemplateLiteral":{let i=r.map(e,"expressions");return n.push("`"),r.each(function(a){let o=a.getName();n.push(e(a)),o<i.length&&n.push("${",i[o],"}")},"quasis"),n.push("`"),S(n).lockIndentTail()}case"TaggedTemplateExpression":return S([r.call(e,"tag"),r.call(e,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"Flow":case"FlowType":case"FlowPredicate":case"MemberTypeAnnotation":case"Type":case"TSHasOptionalTypeParameterInstantiation":case"TSHasOptionalTypeParameters":case"TSHasOptionalTypeAnnotation":case"ChainElement":throw new Error("unprintable type: "+JSON.stringify(s.type));case"CommentBlock":case"Block":return S(["/*",v(s.value,t),"*/"]);case"CommentLine":case"Line":return S(["//",v(s.value,t)]);case"TypeAnnotation":return s.typeAnnotation?(s.typeAnnotation.type!=="FunctionTypeAnnotation"&&n.push(": "),n.push(r.call(e,"typeAnnotation")),S(n)):v("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return v("*",t);case"EmptyTypeAnnotation":return v("empty",t);case"AnyTypeAnnotation":return v("any",t);case"MixedTypeAnnotation":return v("mixed",t);case"ArrayTypeAnnotation":return S([r.call(e,"elementType"),"[]"]);case"TupleTypeAnnotation":{let i=r.map(e,"types"),o=v(", ").join(i).getLineLength(1)<=t.wrapColumn;return o?t.arrayBracketSpacing?n.push("[ "):n.push("["):n.push(`[
84
- `),r.each(function(c){let l=c.getName();if(!c.getValue())n.push(",");else{let p=i[l];o?l>0&&n.push(" "):p=p.indent(t.tabWidth),n.push(p),(l<s.types.length-1||!o&&pn(t,"arrays"))&&n.push(","),o||n.push(`
85
- `)}},"types"),o&&t.arrayBracketSpacing?n.push(" ]"):n.push("]"),S(n)}case"BooleanTypeAnnotation":return v("boolean",t);case"BooleanLiteralTypeAnnotation":return v(""+s.value,t);case"InterfaceTypeAnnotation":return n.push("interface"),s.extends&&s.extends.length>0&&n.push(" extends ",v(", ").join(r.map(e,"extends"))),n.push(" ",r.call(e,"body")),S(n);case"DeclareFunction":return an(r,["function ",r.call(e,"id"),";"]);case"DeclareModule":return an(r,["module ",r.call(e,"id")," ",r.call(e,"body")]);case"DeclareModuleExports":return an(r,["module.exports",r.call(e,"typeAnnotation")]);case"DeclareVariable":return an(r,["var ",r.call(e,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return S(["declare ",bf(r,t,e)]);case"EnumDeclaration":return S(["enum ",r.call(e,"id"),r.call(e,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(s.type==="EnumSymbolBody"||s.explicitType)&&n.push(" of ",s.type.slice(4,-4).toLowerCase()),n.push(` {
86
- `,v(`
87
- `).join(r.map(e,"members")).indent(t.tabWidth),`
88
- }`),S(n);case"EnumDefaultedMember":return S([r.call(e,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return S([r.call(e,"id")," = ",r.call(e,"init"),","]);case"InferredPredicate":return v("%checks",t);case"DeclaredPredicate":return S(["%checks(",r.call(e,"value"),")"]);case"FunctionTypeAnnotation":{let i=r.getParentNode(0),a=!(le.ObjectTypeCallProperty.check(i)||le.ObjectTypeInternalSlot.check(i)&&i.method||le.DeclareFunction.check(r.getParentNode(2)));a&&!le.FunctionTypeParam.check(i)&&!le.TypeAlias.check(i)&&n.push(": ");let c=!!s.typeParameters,l=c||s.params.length!==1||s.params[0].name;return n.push(c?r.call(e,"typeParameters"):"",l?"(":"",yt(r,t,e),l?")":""),s.returnType&&n.push(a?" => ":": ",r.call(e,"returnType")),S(n)}case"FunctionTypeParam":{let i=r.call(e,"name");return n.push(i),s.optional&&n.push("?"),i.infos[0].line&&n.push(": "),n.push(r.call(e,"typeAnnotation")),S(n)}case"GenericTypeAnnotation":return S([r.call(e,"id"),r.call(e,"typeParameters")]);case"DeclareInterface":n.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":return s.declare&&n.push("declare "),n.push("interface ",r.call(e,"id"),r.call(e,"typeParameters")," "),s.extends&&s.extends.length>0&&n.push("extends ",v(", ").join(r.map(e,"extends"))," "),s.body&&n.push(r.call(e,"body")),S(n);case"ClassImplements":case"InterfaceExtends":return S([r.call(e,"id"),r.call(e,"typeParameters")]);case"IntersectionTypeAnnotation":return v(" & ").join(r.map(e,"types"));case"NullableTypeAnnotation":return S(["?",r.call(e,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return v("null",t);case"ThisTypeAnnotation":return v("this",t);case"NumberTypeAnnotation":return v("number",t);case"ObjectTypeCallProperty":return r.call(e,"value");case"ObjectTypeIndexer":return s.static&&n.push("static "),n.push(on(r,e),"["),s.id&&n.push(r.call(e,"id"),": "),n.push(r.call(e,"key"),"]: ",r.call(e,"value")),S(n);case"ObjectTypeProperty":return S([on(r,e),r.call(e,"key"),s.optional?"?":"",": ",r.call(e,"value")]);case"ObjectTypeInternalSlot":return S([s.static?"static ":"","[[",r.call(e,"id"),"]]",s.optional?"?":"",s.value.type!=="FunctionTypeAnnotation"?": ":"",r.call(e,"value")]);case"QualifiedTypeIdentifier":return S([r.call(e,"qualification"),".",r.call(e,"id")]);case"StringLiteralTypeAnnotation":return v(cn(s.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return v(JSON.stringify(s.value),t);case"BigIntLiteralTypeAnnotation":return v(s.raw,t);case"StringTypeAnnotation":return v("string",t);case"DeclareTypeAlias":n.push("declare ");case"TypeAlias":return S(["type ",r.call(e,"id"),r.call(e,"typeParameters")," = ",r.call(e,"right"),";"]);case"DeclareOpaqueType":n.push("declare ");case"OpaqueType":return n.push("opaque type ",r.call(e,"id"),r.call(e,"typeParameters")),s.supertype&&n.push(": ",r.call(e,"supertype")),s.impltype&&n.push(" = ",r.call(e,"impltype")),n.push(";"),S(n);case"TypeCastExpression":return S(["(",r.call(e,"expression"),r.call(e,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return S(["<",v(", ").join(r.map(e,"params")),">"]);case"Variance":return s.kind==="plus"?v("+"):s.kind==="minus"?v("-"):v("");case"TypeParameter":return s.variance&&n.push(on(r,e)),n.push(r.call(e,"name")),s.bound&&n.push(r.call(e,"bound")),s.default&&n.push("=",r.call(e,"default")),S(n);case"TypeofTypeAnnotation":return S([v("typeof ",t),r.call(e,"argument")]);case"IndexedAccessType":case"OptionalIndexedAccessType":return S([r.call(e,"objectType"),s.optional?"?.":"","[",r.call(e,"indexType"),"]"]);case"UnionTypeAnnotation":return v(" | ").join(r.map(e,"types"));case"VoidTypeAnnotation":return v("void",t);case"NullTypeAnnotation":return v("null",t);case"SymbolTypeAnnotation":return v("symbol",t);case"BigIntTypeAnnotation":return v("bigint",t);case"TSType":throw new Error("unprintable type: "+JSON.stringify(s.type));case"TSNumberKeyword":return v("number",t);case"TSBigIntKeyword":return v("bigint",t);case"TSObjectKeyword":return v("object",t);case"TSBooleanKeyword":return v("boolean",t);case"TSStringKeyword":return v("string",t);case"TSSymbolKeyword":return v("symbol",t);case"TSAnyKeyword":return v("any",t);case"TSVoidKeyword":return v("void",t);case"TSIntrinsicKeyword":return v("intrinsic",t);case"TSThisType":return v("this",t);case"TSNullKeyword":return v("null",t);case"TSUndefinedKeyword":return v("undefined",t);case"TSUnknownKeyword":return v("unknown",t);case"TSNeverKeyword":return v("never",t);case"TSArrayType":return S([r.call(e,"elementType"),"[]"]);case"TSLiteralType":return r.call(e,"literal");case"TSUnionType":return v(" | ").join(r.map(e,"types"));case"TSIntersectionType":return v(" & ").join(r.map(e,"types"));case"TSConditionalType":return n.push(r.call(e,"checkType")," extends ",r.call(e,"extendsType")," ? ",r.call(e,"trueType")," : ",r.call(e,"falseType")),S(n);case"TSInferType":return n.push("infer ",r.call(e,"typeParameter")),S(n);case"TSParenthesizedType":return S(["(",r.call(e,"typeAnnotation"),")"]);case"TSFunctionType":return S([r.call(e,"typeParameters"),"(",yt(r,t,e),") => ",r.call(e,"typeAnnotation","typeAnnotation")]);case"TSConstructorType":return S(["new ",r.call(e,"typeParameters"),"(",yt(r,t,e),") => ",r.call(e,"typeAnnotation","typeAnnotation")]);case"TSMappedType":return n.push(s.readonly?"readonly ":"","[",r.call(e,"typeParameter"),"]",s.optional?"?":""),s.typeAnnotation&&n.push(": ",r.call(e,"typeAnnotation"),";"),S([`{
89
- `,S(n).indent(t.tabWidth),`
90
- }`]);case"TSTupleType":return S(["[",v(", ").join(r.map(e,"elementTypes")),"]"]);case"TSNamedTupleMember":return n.push(r.call(e,"label")),s.optional&&n.push("?"),n.push(": ",r.call(e,"elementType")),S(n);case"TSRestType":return S(["...",r.call(e,"typeAnnotation")]);case"TSOptionalType":return S([r.call(e,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return S([r.call(e,"objectType"),"[",r.call(e,"indexType"),"]"]);case"TSTypeOperator":return S([r.call(e,"operator")," ",r.call(e,"typeAnnotation")]);case"TSTypeLiteral":{let i=v(`
91
- `).join(r.map(e,"members").map(a=>mn(a)!==";"?a.concat(";"):a));return i.isEmpty()?v("{}",t):(n.push(`{
92
- `,i.indent(t.tabWidth),`
93
- }`),S(n))}case"TSEnumMember":return n.push(r.call(e,"id")),s.initializer&&n.push(" = ",r.call(e,"initializer")),S(n);case"TSTypeQuery":return S(["typeof ",r.call(e,"exprName")]);case"TSParameterProperty":return s.accessibility&&n.push(s.accessibility," "),s.export&&n.push("export "),s.static&&n.push("static "),s.readonly&&n.push("readonly "),n.push(r.call(e,"parameter")),S(n);case"TSTypeReference":return S([r.call(e,"typeName"),r.call(e,"typeParameters")]);case"TSQualifiedName":return S([r.call(e,"left"),".",r.call(e,"right")]);case"TSAsExpression":case"TSSatisfiesExpression":{let i=r.call(e,"expression");return n.push(i,s.type==="TSSatisfiesExpression"?" satisfies ":" as ",r.call(e,"typeAnnotation")),S(n)}case"TSTypeCastExpression":return S([r.call(e,"expression"),r.call(e,"typeAnnotation")]);case"TSNonNullExpression":return S([r.call(e,"expression"),"!"]);case"TSTypeAnnotation":return S([": ",r.call(e,"typeAnnotation")]);case"TSIndexSignature":return S([s.readonly?"readonly ":"","[",r.map(e,"parameters"),"]",r.call(e,"typeAnnotation")]);case"TSPropertySignature":return n.push(on(r,e),s.readonly?"readonly ":""),s.computed?n.push("[",r.call(e,"key"),"]"):n.push(r.call(e,"key")),n.push(s.optional?"?":"",r.call(e,"typeAnnotation")),S(n);case"TSMethodSignature":return s.computed?n.push("[",r.call(e,"key"),"]"):n.push(r.call(e,"key")),s.optional&&n.push("?"),n.push(r.call(e,"typeParameters"),"(",yt(r,t,e),")",r.call(e,"typeAnnotation")),S(n);case"TSTypePredicate":return s.asserts&&n.push("asserts "),n.push(r.call(e,"parameterName")),s.typeAnnotation&&n.push(" is ",r.call(e,"typeAnnotation","typeAnnotation")),S(n);case"TSCallSignatureDeclaration":return S([r.call(e,"typeParameters"),"(",yt(r,t,e),")",r.call(e,"typeAnnotation")]);case"TSConstructSignatureDeclaration":return s.typeParameters?n.push("new",r.call(e,"typeParameters")):n.push("new "),n.push("(",yt(r,t,e),")",r.call(e,"typeAnnotation")),S(n);case"TSTypeAliasDeclaration":return S([s.declare?"declare ":"","type ",r.call(e,"id"),r.call(e,"typeParameters")," = ",r.call(e,"typeAnnotation"),";"]);case"TSTypeParameter":{n.push(r.call(e,"name"));let i=r.getParentNode(0),a=le.TSMappedType.check(i);return s.constraint&&n.push(a?" in ":" extends ",r.call(e,"constraint")),s.default&&n.push(" = ",r.call(e,"default")),S(n)}case"TSTypeAssertion":return n.push("<",r.call(e,"typeAnnotation"),"> ",r.call(e,"expression")),S(n);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return S(["<",v(", ").join(r.map(e,"params")),">"]);case"TSEnumDeclaration":{n.push(s.declare?"declare ":"",s.const?"const ":"","enum ",r.call(e,"id"));let i=v(`,
94
- `).join(r.map(e,"members"));return i.isEmpty()?n.push(" {}"):n.push(` {
95
- `,i.indent(t.tabWidth),`
96
- }`),S(n)}case"TSExpressionWithTypeArguments":return S([r.call(e,"expression"),r.call(e,"typeParameters")]);case"TSInterfaceBody":{let i=v(`
97
- `).join(r.map(e,"body").map(a=>mn(a)!==";"?a.concat(";"):a));return i.isEmpty()?v("{}",t):S([`{
98
- `,i.indent(t.tabWidth),`
99
- }`])}case"TSImportType":return n.push("import(",r.call(e,"argument"),")"),s.qualifier&&n.push(".",r.call(e,"qualifier")),s.typeParameters&&n.push(r.call(e,"typeParameters")),S(n);case"TSImportEqualsDeclaration":return s.isExport&&n.push("export "),n.push("import ",r.call(e,"id")," = ",r.call(e,"moduleReference")),qi(S(n));case"TSExternalModuleReference":return S(["require(",r.call(e,"expression"),")"]);case"TSModuleDeclaration":return r.getParentNode().type==="TSModuleDeclaration"?n.push("."):(s.declare&&n.push("declare "),s.global||(s.id.type==="StringLiteral"||s.id.type==="Literal"&&typeof s.id.value=="string"||s.loc&&s.loc.lines&&s.id.loc&&s.loc.lines.sliceString(s.loc.start,s.id.loc.start).indexOf("module")>=0?n.push("module "):n.push("namespace "))),n.push(r.call(e,"id")),s.body&&(n.push(" "),n.push(r.call(e,"body"))),S(n);case"TSModuleBlock":{let i=r.call(a=>nr(a,t,e),"body");return i.isEmpty()?n.push("{}"):n.push(`{
100
- `,i.indent(t.tabWidth),`
101
- }`),S(n)}case"TSInstantiationExpression":return n.push(r.call(e,"expression"),r.call(e,"typeParameters")),S(n);case"V8IntrinsicIdentifier":return S(["%",r.call(e,"name")]);case"TopicReference":return v("#");case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(s.type))}}function QE(r,t){let e=[],s=r.getValue();return s.decorators&&s.decorators.length>0&&!Of(r)?r.each(function(n){e.push(t(n),`
102
- `)},"decorators"):Xi(s)&&s.declaration&&s.declaration.decorators&&r.each(function(n){e.push(t(n),`
103
- `)},"declaration","decorators"),S(e)}function nr(r,t,e){let s=[];r.each(function(o){let c=o.getValue();c&&(c.type==="EmptyStatement"&&!(c.comments&&c.comments.length>0)||(le.Comment.check(c)||le.Statement.check(c)||Zc.assert(c),s.push({node:c,printed:e(o)})))});let n=null,i=s.length,a=[];return s.forEach(function(o,c){let l=o.printed,u=o.node,p=l.length>1,h=c>0,d=c<i-1,f,m,y=u&&u.loc&&u.loc.lines,b=y&&t.reuseWhitespace&&Df(u,y);if(h)if(b){let x=y.skipSpaces(b.start,!0),N=x?x.line:1,T=b.start.line-N;f=Array(T+1).join(`
104
- `)}else f=p?`
32
+ `)),l=!P):(c!==1&&n||!u&&Rt(s,"objects")&&y.getValue().type!=="RestElement")&&r.push(a),p++},g)}),t.inexact){let g=S("...",s);u?(c>0&&r.push(a," "),r.push(g)):r.push(`
33
+ `,g.indent(s.tabWidth))}return r.push(u?f:`
34
+ `+f),p!==0&&u&&s.objectCurlySpacing&&(r[d]=h+" ",r[r.length-1]=" "+f),t.typeAnnotation&&r.push(i.call(e,"typeAnnotation")),x(r)}case"PropertyPattern":return x([i.call(e,"key"),": ",i.call(e,"pattern")]);case"ObjectProperty":case"Property":{if(t.method||t.kind==="get"||t.kind==="set")return Cr(i,s,e);if(t.shorthand&&t.value.type==="AssignmentPattern")return i.call(e,"value");let n=i.call(e,"key");return t.computed?r.push("[",n,"]"):r.push(n),(!t.shorthand||t.key.name!==t.value.name)&&r.push(": ",i.call(e,"value")),x(r)}case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return Cr(i,s,e);case"PrivateName":return x(["#",i.call(e,"id")]);case"Decorator":return x(["@",i.call(e,"expression")]);case"TupleExpression":r.push("#");case"ArrayExpression":case"ArrayPattern":{let a=t.elements.length,o=i.map(e,"elements"),c=S(", ").join(o).getLineLength(1)<=s.wrapColumn;return c?s.arrayBracketSpacing?r.push("[ "):r.push("["):r.push(`[
35
+ `),i.each(function(u){let h=u.getName();if(!u.getValue())r.push(",");else{let d=o[h];c?h>0&&r.push(" "):d=d.indent(s.tabWidth),r.push(d),(h<a-1||!c&&Rt(s,"arrays"))&&r.push(","),c||r.push(`
36
+ `)}},"elements"),c&&s.arrayBracketSpacing?r.push(" ]"):r.push("]"),t.typeAnnotation&&r.push(i.call(e,"typeAnnotation")),x(r)}case"SequenceExpression":return S(", ").join(i.map(e,"expressions"));case"ThisExpression":return S("this");case"Super":return S("super");case"NullLiteral":return S("null");case"RegExpLiteral":return S(ft(t)||`/${t.pattern}/${t.flags||""}`,s);case"BigIntLiteral":return S(ft(t)||t.value+"n",s);case"NumericLiteral":return S(ft(t)||t.value,s);case"DecimalLiteral":return S(ft(t)||t.value+"m",s);case"StringLiteral":return S(Bt(t.value,s));case"BooleanLiteral":case"Literal":return S(ft(t)||(typeof t.value=="string"?Bt(t.value,s):t.value),s);case"Directive":return i.call(e,"value");case"DirectiveLiteral":return S(ft(t)||Bt(t.value,s),s);case"InterpreterDirective":return S(`#!${t.value}
37
+ `,s);case"ModuleSpecifier":if(t.local)throw new Error("The ESTree ModuleSpecifier type should be abstract");return S(Bt(t.value,s),s);case"UnaryExpression":return r.push(t.operator),/[a-z]$/.test(t.operator)&&r.push(" "),r.push(i.call(e,"argument")),x(r);case"UpdateExpression":return r.push(i.call(e,"argument"),t.operator),t.prefix&&r.reverse(),x(r);case"ConditionalExpression":return x([i.call(e,"test")," ? ",i.call(e,"consequent")," : ",i.call(e,"alternate")]);case"NewExpression":return r.push("new ",i.call(e,"callee")),t.typeParameters&&r.push(i.call(e,"typeParameters")),t.typeArguments&&r.push(i.call(e,"typeArguments")),t.arguments&&r.push(gn(i,s,e)),x(r);case"VariableDeclaration":{t.declare&&r.push("declare "),r.push(t.kind," ");let n=0,a=i.map(function(l){let c=e(l);return n=Math.max(c.length,n),c},"declarations");n===1?r.push(S(", ").join(a)):a.length>1?r.push(S(`,
38
+ `).join(a).indentTail(t.kind.length+1)):r.push(a[0]);let o=i.getParentNode();return!Z.ForStatement.check(o)&&!Z.ForInStatement.check(o)&&!(Z.ForOfStatement&&Z.ForOfStatement.check(o))&&!(Z.ForAwaitStatement&&Z.ForAwaitStatement.check(o))&&r.push(";"),x(r)}case"VariableDeclarator":return t.init?S(" = ").join([i.call(e,"id"),i.call(e,"init")]):i.call(e,"id");case"WithStatement":return x(["with (",i.call(e,"object"),") ",i.call(e,"body")]);case"IfStatement":{let n=He(i.call(e,"consequent"),s);return r.push("if (",i.call(e,"test"),")",n),t.alternate&&r.push(bn(n)?" else":`
39
+ else`,He(i.call(e,"alternate"),s)),x(r)}case"ForStatement":{let n=i.call(e,"init"),a=n.length>1?`;
40
+ `:"; ",o="for (",l=S(a).join([n,i.call(e,"test"),i.call(e,"update")]).indentTail(o.length),c=x([o,l,")"]),u=He(i.call(e,"body"),s);return r.push(c),c.length>1&&(r.push(`
41
+ `),u=u.trimLeft()),r.push(u),x(r)}case"WhileStatement":return x(["while (",i.call(e,"test"),")",He(i.call(e,"body"),s)]);case"ForInStatement":return x([t.each?"for each (":"for (",i.call(e,"left")," in ",i.call(e,"right"),")",He(i.call(e,"body"),s)]);case"ForOfStatement":case"ForAwaitStatement":return r.push("for "),(t.await||t.type==="ForAwaitStatement")&&r.push("await "),r.push("(",i.call(e,"left")," of ",i.call(e,"right"),")",He(i.call(e,"body"),s)),x(r);case"DoWhileStatement":{let n=x(["do",He(i.call(e,"body"),s)]);return r.push(n),bn(n)?r.push(" while"):r.push(`
42
+ while`),r.push(" (",i.call(e,"test"),");"),x(r)}case"DoExpression":{let n=i.call(a=>pt(a,s,e),"body");return x([`do {
43
+ `,n.indent(s.tabWidth),`
44
+ }`])}case"BreakStatement":return r.push("break"),t.label&&r.push(" ",i.call(e,"label")),r.push(";"),x(r);case"ContinueStatement":return r.push("continue"),t.label&&r.push(" ",i.call(e,"label")),r.push(";"),x(r);case"LabeledStatement":return x([i.call(e,"label"),`:
45
+ `,i.call(e,"body")]);case"TryStatement":return r.push("try ",i.call(e,"block")),t.handler?r.push(" ",i.call(e,"handler")):t.handlers&&i.each(function(n){r.push(" ",e(n))},"handlers"),t.finalizer&&r.push(" finally ",i.call(e,"finalizer")),x(r);case"CatchClause":return r.push("catch "),t.param&&r.push("(",i.call(e,"param")),t.guard&&r.push(" if ",i.call(e,"guard")),t.param&&r.push(") "),r.push(i.call(e,"body")),x(r);case"ThrowStatement":return x(["throw ",i.call(e,"argument"),";"]);case"SwitchStatement":return x(["switch (",i.call(e,"discriminant"),`) {
46
+ `,S(`
47
+ `).join(i.map(e,"cases")),`
48
+ }`]);case"SwitchCase":return t.test?r.push("case ",i.call(e,"test"),":"):r.push("default:"),t.consequent.length>0&&r.push(`
49
+ `,i.call(n=>pt(n,s,e),"consequent").indent(s.tabWidth)),x(r);case"DebuggerStatement":return S("debugger;");case"JSXAttribute":return r.push(i.call(e,"name")),t.value&&r.push("=",i.call(e,"value")),x(r);case"JSXIdentifier":return S(t.name,s);case"JSXNamespacedName":return S(":").join([i.call(e,"namespace"),i.call(e,"name")]);case"JSXMemberExpression":return S(".").join([i.call(e,"object"),i.call(e,"property")]);case"JSXSpreadAttribute":return x(["{...",i.call(e,"argument"),"}"]);case"JSXSpreadChild":return x(["{...",i.call(e,"expression"),"}"]);case"JSXExpressionContainer":return x(["{",i.call(e,"expression"),"}"]);case"JSXElement":case"JSXFragment":{let n="opening"+(t.type==="JSXElement"?"Element":"Fragment"),a="closing"+(t.type==="JSXElement"?"Element":"Fragment"),o=i.call(e,n);if(t[n].selfClosing)return o;let l=x(i.map(function(u){let h=u.getValue();if(Z.Literal.check(h)&&typeof h.value=="string"){if(/\S/.test(h.value))return h.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(h.value))return`
50
+ `}return e(u)},"children")).indentTail(s.tabWidth),c=i.call(e,a);return x([o,l,c])}case"JSXOpeningElement":{r.push("<",i.call(e,"name"));let n=[];i.each(function(l){n.push(" ",e(l))},"attributes");let a=x(n);return(a.length>1||a.getLineLength(1)>s.wrapColumn)&&(n.forEach(function(l,c){l===" "&&(n[c]=`
51
+ `)}),a=x(n).indentTail(s.tabWidth)),r.push(a,t.selfClosing?" />":">"),x(r)}case"JSXClosingElement":return x(["</",i.call(e,"name"),">"]);case"JSXOpeningFragment":return S("<>");case"JSXClosingFragment":return S("</>");case"JSXText":return S(t.value,s);case"JSXEmptyExpression":return S("");case"TypeAnnotatedIdentifier":return x([i.call(e,"annotation")," ",i.call(e,"identifier")]);case"ClassBody":return t.body.length===0?S("{}"):x([`{
52
+ `,i.call(n=>pt(n,s,e),"body").indent(s.tabWidth),`
53
+ }`]);case"ClassPropertyDefinition":return r.push("static ",i.call(e,"definition")),Z.MethodDefinition.check(t.definition)||r.push(";"),x(r);case"ClassProperty":{t.declare&&r.push("declare ");let n=t.accessibility||t.access;typeof n=="string"&&r.push(n," "),t.static&&r.push("static "),t.abstract&&r.push("abstract "),t.readonly&&r.push("readonly ");let a=i.call(e,"key");return t.computed&&(a=x(["[",a,"]"])),t.variance&&(a=x([Ft(i,e),a])),r.push(a),t.optional&&r.push("?"),t.definite&&r.push("!"),t.typeAnnotation&&r.push(i.call(e,"typeAnnotation")),t.value&&r.push(" = ",i.call(e,"value")),r.push(";"),x(r)}case"ClassPrivateProperty":return t.static&&r.push("static "),r.push(i.call(e,"key")),t.typeAnnotation&&r.push(i.call(e,"typeAnnotation")),t.value&&r.push(" = ",i.call(e,"value")),r.push(";"),x(r);case"ClassAccessorProperty":return r.push(...Xn(t),"accessor "),t.computed?r.push("[",i.call(e,"key"),"]"):r.push(i.call(e,"key")),t.optional&&r.push("?"),t.definite&&r.push("!"),t.typeAnnotation&&r.push(i.call(e,"typeAnnotation")),t.value&&r.push(" = ",i.call(e,"value")),r.push(";"),x(r);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return t.declare&&r.push("declare "),t.abstract&&r.push("abstract "),r.push("class"),t.id&&r.push(" ",i.call(e,"id")),t.typeParameters&&r.push(i.call(e,"typeParameters")),t.superClass&&r.push(" extends ",i.call(e,"superClass"),i.call(e,"superTypeParameters")),t.extends&&t.extends.length>0&&r.push(" extends ",S(", ").join(i.map(e,"extends"))),t.implements&&t.implements.length>0&&r.push(" implements ",S(", ").join(i.map(e,"implements"))),r.push(" ",i.call(e,"body")),t.type==="DeclareClass"?Mt(i,r):x(r);case"TemplateElement":return S(t.value.raw,s).lockIndentTail();case"TemplateLiteral":{let n=i.map(e,"expressions");return r.push("`"),i.each(function(a){let o=a.getName();r.push(e(a)),o<n.length&&r.push("${",n[o],"}")},"quasis"),r.push("`"),x(r).lockIndentTail()}case"TaggedTemplateExpression":return x([i.call(e,"tag"),i.call(e,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"Flow":case"FlowType":case"FlowPredicate":case"MemberTypeAnnotation":case"Type":case"TSHasOptionalTypeParameterInstantiation":case"TSHasOptionalTypeParameters":case"TSHasOptionalTypeAnnotation":case"ChainElement":throw new Error("unprintable type: "+JSON.stringify(t.type));case"CommentBlock":case"Block":return x(["/*",S(t.value,s),"*/"]);case"CommentLine":case"Line":return x(["//",S(t.value,s)]);case"TypeAnnotation":return t.typeAnnotation?(t.typeAnnotation.type!=="FunctionTypeAnnotation"&&r.push(": "),r.push(i.call(e,"typeAnnotation")),x(r)):S("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return S("*",s);case"EmptyTypeAnnotation":return S("empty",s);case"AnyTypeAnnotation":return S("any",s);case"MixedTypeAnnotation":return S("mixed",s);case"ArrayTypeAnnotation":return x([i.call(e,"elementType"),"[]"]);case"TupleTypeAnnotation":{let n=i.map(e,"types"),o=S(", ").join(n).getLineLength(1)<=s.wrapColumn;return o?s.arrayBracketSpacing?r.push("[ "):r.push("["):r.push(`[
54
+ `),i.each(function(l){let c=l.getName();if(!l.getValue())r.push(",");else{let h=n[c];o?c>0&&r.push(" "):h=h.indent(s.tabWidth),r.push(h),(c<t.types.length-1||!o&&Rt(s,"arrays"))&&r.push(","),o||r.push(`
55
+ `)}},"types"),o&&s.arrayBracketSpacing?r.push(" ]"):r.push("]"),x(r)}case"BooleanTypeAnnotation":return S("boolean",s);case"BooleanLiteralTypeAnnotation":return S(""+t.value,s);case"InterfaceTypeAnnotation":return r.push("interface"),t.extends&&t.extends.length>0&&r.push(" extends ",S(", ").join(i.map(e,"extends"))),r.push(" ",i.call(e,"body")),x(r);case"DeclareFunction":return Mt(i,["function ",i.call(e,"id"),";"]);case"DeclareModule":return Mt(i,["module ",i.call(e,"id")," ",i.call(e,"body")]);case"DeclareModuleExports":return Mt(i,["module.exports",i.call(e,"typeAnnotation")]);case"DeclareVariable":return Mt(i,["var ",i.call(e,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return x(["declare ",xn(i,s,e)]);case"EnumDeclaration":return x(["enum ",i.call(e,"id"),i.call(e,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(t.type==="EnumSymbolBody"||t.explicitType)&&r.push(" of ",t.type.slice(4,-4).toLowerCase()),r.push(` {
56
+ `,S(`
57
+ `).join(i.map(e,"members")).indent(s.tabWidth),`
58
+ }`),x(r);case"EnumDefaultedMember":return x([i.call(e,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return x([i.call(e,"id")," = ",i.call(e,"init"),","]);case"InferredPredicate":return S("%checks",s);case"DeclaredPredicate":return x(["%checks(",i.call(e,"value"),")"]);case"FunctionTypeAnnotation":{let n=i.getParentNode(0),a=!(Z.ObjectTypeCallProperty.check(n)||Z.ObjectTypeInternalSlot.check(n)&&n.method||Z.DeclareFunction.check(i.getParentNode(2)));a&&!Z.FunctionTypeParam.check(n)&&!Z.TypeAlias.check(n)&&r.push(": ");let l=!!t.typeParameters,c=l||t.params.length!==1||t.params[0].name;return r.push(l?i.call(e,"typeParameters"):"",c?"(":"",Ie(i,s,e),c?")":""),t.returnType&&r.push(a?" => ":": ",i.call(e,"returnType")),x(r)}case"FunctionTypeParam":{let n=i.call(e,"name");return r.push(n),t.optional&&r.push("?"),n.infos[0].line&&r.push(": "),r.push(i.call(e,"typeAnnotation")),x(r)}case"GenericTypeAnnotation":return x([i.call(e,"id"),i.call(e,"typeParameters")]);case"DeclareInterface":r.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":return t.declare&&r.push("declare "),r.push("interface ",i.call(e,"id"),i.call(e,"typeParameters")," "),t.extends&&t.extends.length>0&&r.push("extends ",S(", ").join(i.map(e,"extends"))," "),t.body&&r.push(i.call(e,"body")),x(r);case"ClassImplements":case"InterfaceExtends":return x([i.call(e,"id"),i.call(e,"typeParameters")]);case"IntersectionTypeAnnotation":return S(" & ").join(i.map(e,"types"));case"NullableTypeAnnotation":return x(["?",i.call(e,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return S("null",s);case"ThisTypeAnnotation":return S("this",s);case"NumberTypeAnnotation":return S("number",s);case"ObjectTypeCallProperty":return i.call(e,"value");case"ObjectTypeIndexer":return t.static&&r.push("static "),r.push(Ft(i,e),"["),t.id&&r.push(i.call(e,"id"),": "),r.push(i.call(e,"key"),"]: ",i.call(e,"value")),x(r);case"ObjectTypeProperty":return x([Ft(i,e),i.call(e,"key"),t.optional?"?":"",": ",i.call(e,"value")]);case"ObjectTypeInternalSlot":return x([t.static?"static ":"","[[",i.call(e,"id"),"]]",t.optional?"?":"",t.value.type!=="FunctionTypeAnnotation"?": ":"",i.call(e,"value")]);case"QualifiedTypeIdentifier":return x([i.call(e,"qualification"),".",i.call(e,"id")]);case"StringLiteralTypeAnnotation":return S(Bt(t.value,s),s);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return S(JSON.stringify(t.value),s);case"BigIntLiteralTypeAnnotation":return S(t.raw,s);case"StringTypeAnnotation":return S("string",s);case"DeclareTypeAlias":r.push("declare ");case"TypeAlias":return x(["type ",i.call(e,"id"),i.call(e,"typeParameters")," = ",i.call(e,"right"),";"]);case"DeclareOpaqueType":r.push("declare ");case"OpaqueType":return r.push("opaque type ",i.call(e,"id"),i.call(e,"typeParameters")),t.supertype&&r.push(": ",i.call(e,"supertype")),t.impltype&&r.push(" = ",i.call(e,"impltype")),r.push(";"),x(r);case"TypeCastExpression":return x(["(",i.call(e,"expression"),i.call(e,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return x(["<",S(", ").join(i.map(e,"params")),">"]);case"Variance":return t.kind==="plus"?S("+"):t.kind==="minus"?S("-"):S("");case"TypeParameter":return t.variance&&r.push(Ft(i,e)),r.push(i.call(e,"name")),t.bound&&r.push(i.call(e,"bound")),t.default&&r.push("=",i.call(e,"default")),x(r);case"TypeofTypeAnnotation":return x([S("typeof ",s),i.call(e,"argument")]);case"IndexedAccessType":case"OptionalIndexedAccessType":return x([i.call(e,"objectType"),t.optional?"?.":"","[",i.call(e,"indexType"),"]"]);case"UnionTypeAnnotation":return S(" | ").join(i.map(e,"types"));case"VoidTypeAnnotation":return S("void",s);case"NullTypeAnnotation":return S("null",s);case"SymbolTypeAnnotation":return S("symbol",s);case"BigIntTypeAnnotation":return S("bigint",s);case"TSType":throw new Error("unprintable type: "+JSON.stringify(t.type));case"TSNumberKeyword":return S("number",s);case"TSBigIntKeyword":return S("bigint",s);case"TSObjectKeyword":return S("object",s);case"TSBooleanKeyword":return S("boolean",s);case"TSStringKeyword":return S("string",s);case"TSSymbolKeyword":return S("symbol",s);case"TSAnyKeyword":return S("any",s);case"TSVoidKeyword":return S("void",s);case"TSIntrinsicKeyword":return S("intrinsic",s);case"TSThisType":return S("this",s);case"TSNullKeyword":return S("null",s);case"TSUndefinedKeyword":return S("undefined",s);case"TSUnknownKeyword":return S("unknown",s);case"TSNeverKeyword":return S("never",s);case"TSArrayType":return x([i.call(e,"elementType"),"[]"]);case"TSLiteralType":return i.call(e,"literal");case"TSUnionType":return S(" | ").join(i.map(e,"types"));case"TSIntersectionType":return S(" & ").join(i.map(e,"types"));case"TSConditionalType":return r.push(i.call(e,"checkType")," extends ",i.call(e,"extendsType")," ? ",i.call(e,"trueType")," : ",i.call(e,"falseType")),x(r);case"TSInferType":return r.push("infer ",i.call(e,"typeParameter")),x(r);case"TSParenthesizedType":return x(["(",i.call(e,"typeAnnotation"),")"]);case"TSFunctionType":return x([i.call(e,"typeParameters"),"(",Ie(i,s,e),") => ",i.call(e,"typeAnnotation","typeAnnotation")]);case"TSConstructorType":return x(["new ",i.call(e,"typeParameters"),"(",Ie(i,s,e),") => ",i.call(e,"typeAnnotation","typeAnnotation")]);case"TSMappedType":return r.push(t.readonly?"readonly ":"","[",i.call(e,"typeParameter"),"]",t.optional?"?":""),t.typeAnnotation&&r.push(": ",i.call(e,"typeAnnotation"),";"),x([`{
59
+ `,x(r).indent(s.tabWidth),`
60
+ }`]);case"TSTupleType":return x(["[",S(", ").join(i.map(e,"elementTypes")),"]"]);case"TSNamedTupleMember":return r.push(i.call(e,"label")),t.optional&&r.push("?"),r.push(": ",i.call(e,"elementType")),x(r);case"TSRestType":return x(["...",i.call(e,"typeAnnotation")]);case"TSOptionalType":return x([i.call(e,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return x([i.call(e,"objectType"),"[",i.call(e,"indexType"),"]"]);case"TSTypeOperator":return x([i.call(e,"operator")," ",i.call(e,"typeAnnotation")]);case"TSTypeLiteral":{let n=S(`
61
+ `).join(i.map(e,"members").map(a=>qt(a)!==";"?a.concat(";"):a));return n.isEmpty()?S("{}",s):(r.push(`{
62
+ `,n.indent(s.tabWidth),`
63
+ }`),x(r))}case"TSEnumMember":return r.push(i.call(e,"id")),t.initializer&&r.push(" = ",i.call(e,"initializer")),x(r);case"TSTypeQuery":return x(["typeof ",i.call(e,"exprName")]);case"TSParameterProperty":return t.accessibility&&r.push(t.accessibility," "),t.export&&r.push("export "),t.static&&r.push("static "),t.readonly&&r.push("readonly "),r.push(i.call(e,"parameter")),x(r);case"TSTypeReference":return x([i.call(e,"typeName"),i.call(e,"typeParameters")]);case"TSQualifiedName":return x([i.call(e,"left"),".",i.call(e,"right")]);case"TSAsExpression":case"TSSatisfiesExpression":{let n=i.call(e,"expression");return r.push(n,t.type==="TSSatisfiesExpression"?" satisfies ":" as ",i.call(e,"typeAnnotation")),x(r)}case"TSTypeCastExpression":return x([i.call(e,"expression"),i.call(e,"typeAnnotation")]);case"TSNonNullExpression":return x([i.call(e,"expression"),"!"]);case"TSTypeAnnotation":return x([": ",i.call(e,"typeAnnotation")]);case"TSIndexSignature":return x([t.readonly?"readonly ":"","[",i.map(e,"parameters"),"]",i.call(e,"typeAnnotation")]);case"TSPropertySignature":return r.push(Ft(i,e),t.readonly?"readonly ":""),t.computed?r.push("[",i.call(e,"key"),"]"):r.push(i.call(e,"key")),r.push(t.optional?"?":"",i.call(e,"typeAnnotation")),x(r);case"TSMethodSignature":return t.computed?r.push("[",i.call(e,"key"),"]"):r.push(i.call(e,"key")),t.optional&&r.push("?"),r.push(i.call(e,"typeParameters"),"(",Ie(i,s,e),")",i.call(e,"typeAnnotation")),x(r);case"TSTypePredicate":return t.asserts&&r.push("asserts "),r.push(i.call(e,"parameterName")),t.typeAnnotation&&r.push(" is ",i.call(e,"typeAnnotation","typeAnnotation")),x(r);case"TSCallSignatureDeclaration":return x([i.call(e,"typeParameters"),"(",Ie(i,s,e),")",i.call(e,"typeAnnotation")]);case"TSConstructSignatureDeclaration":return t.typeParameters?r.push("new",i.call(e,"typeParameters")):r.push("new "),r.push("(",Ie(i,s,e),")",i.call(e,"typeAnnotation")),x(r);case"TSTypeAliasDeclaration":return x([t.declare?"declare ":"","type ",i.call(e,"id"),i.call(e,"typeParameters")," = ",i.call(e,"typeAnnotation"),";"]);case"TSTypeParameter":{r.push(i.call(e,"name"));let n=i.getParentNode(0),a=Z.TSMappedType.check(n);return t.constraint&&r.push(a?" in ":" extends ",i.call(e,"constraint")),t.default&&r.push(" = ",i.call(e,"default")),x(r)}case"TSTypeAssertion":return r.push("<",i.call(e,"typeAnnotation"),"> ",i.call(e,"expression")),x(r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return x(["<",S(", ").join(i.map(e,"params")),">"]);case"TSEnumDeclaration":{r.push(t.declare?"declare ":"",t.const?"const ":"","enum ",i.call(e,"id"));let n=S(`,
64
+ `).join(i.map(e,"members"));return n.isEmpty()?r.push(" {}"):r.push(` {
65
+ `,n.indent(s.tabWidth),`
66
+ }`),x(r)}case"TSExpressionWithTypeArguments":return x([i.call(e,"expression"),i.call(e,"typeParameters")]);case"TSInterfaceBody":{let n=S(`
67
+ `).join(i.map(e,"body").map(a=>qt(a)!==";"?a.concat(";"):a));return n.isEmpty()?S("{}",s):x([`{
68
+ `,n.indent(s.tabWidth),`
69
+ }`])}case"TSImportType":return r.push("import(",i.call(e,"argument"),")"),t.qualifier&&r.push(".",i.call(e,"qualifier")),t.typeParameters&&r.push(i.call(e,"typeParameters")),x(r);case"TSImportEqualsDeclaration":return t.isExport&&r.push("export "),r.push("import ",i.call(e,"id")," = ",i.call(e,"moduleReference")),ms(x(r));case"TSExternalModuleReference":return x(["require(",i.call(e,"expression"),")"]);case"TSModuleDeclaration":return i.getParentNode().type==="TSModuleDeclaration"?r.push("."):(t.declare&&r.push("declare "),t.global||(t.id.type==="StringLiteral"||t.id.type==="Literal"&&typeof t.id.value=="string"||t.loc&&t.loc.lines&&t.id.loc&&t.loc.lines.sliceString(t.loc.start,t.id.loc.start).indexOf("module")>=0?r.push("module "):r.push("namespace "))),r.push(i.call(e,"id")),t.body&&(r.push(" "),r.push(i.call(e,"body"))),x(r);case"TSModuleBlock":{let n=i.call(a=>pt(a,s,e),"body");return n.isEmpty()?r.push("{}"):r.push(`{
70
+ `,n.indent(s.tabWidth),`
71
+ }`),x(r)}case"TSInstantiationExpression":return r.push(i.call(e,"expression"),i.call(e,"typeParameters")),x(r);case"V8IntrinsicIdentifier":return x(["%",i.call(e,"name")]);case"TopicReference":return S("#");case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(t.type))}}function Pc(i,s){let e=[],t=i.getValue();return t.decorators&&t.decorators.length>0&&!On(i)?i.each(function(r){e.push(s(r),`
72
+ `)},"decorators"):ws(t)&&t.declaration&&t.declaration.decorators&&i.each(function(r){e.push(s(r),`
73
+ `)},"declaration","decorators"),x(e)}function pt(i,s,e){let t=[];i.each(function(o){let l=o.getValue();l&&(l.type==="EmptyStatement"&&!(l.comments&&l.comments.length>0)||(Z.Comment.check(l)||Z.Statement.check(l)||$r.assert(l),t.push({node:l,printed:e(o)})))});let r=null,n=t.length,a=[];return t.forEach(function(o,l){let c=o.printed,u=o.node,h=c.length>1,f=l>0,d=l<n-1,p,g,y=u&&u.loc&&u.loc.lines,b=y&&s.reuseWhitespace&&Dn(u,y);if(f)if(b){let P=y.skipSpaces(b.start,!0),k=P?P.line:1,T=b.start.line-k;p=Array(T+1).join(`
74
+ `)}else p=h?`
105
75
 
106
76
  `:`
107
- `;else f="";if(d)if(b){let x=y.skipSpaces(b.end),T=(x?x.line:y.length)-b.end.line;m=Array(T+1).join(`
108
- `)}else m=p?`
77
+ `;else p="";if(d)if(b){let P=y.skipSpaces(b.end),T=(P?P.line:y.length)-b.end.line;g=Array(T+1).join(`
78
+ `)}else g=h?`
109
79
 
110
80
  `:`
111
- `;else m="";a.push(ZE(n,f),l),d?n=m:m&&a.push(m)}),S(a)}function ZE(r,t){if(!r&&!t)return v("");if(!r)return v(t);if(!t)return v(r);let e=v(r),s=v(t);return s.length>e.length?s:e}function Jf(r){let t=[];r.declare&&t.push("declare ");let e=r.accessibility||r.access;return typeof e=="string"&&t.push(e," "),r.static&&t.push("static "),r.override&&t.push("override "),r.abstract&&t.push("abstract "),r.readonly&&t.push("readonly "),t}function Bc(r,t,e){let s=r.getNode(),n=s.kind,i=[],a=s.value;le.FunctionExpression.check(a)||(a=s),i.push(...Jf(s)),a.async&&i.push("async "),a.generator&&i.push("*"),(n==="get"||n==="set")&&i.push(n," ");let o=r.call(e,"key");return s.computed&&(o=S(["[",o,"]"])),i.push(o),s.optional&&i.push("?"),s===a?(i.push(r.call(e,"typeParameters"),"(",yt(r,t,e),")",r.call(e,"returnType")),s.body?i.push(" ",r.call(e,"body")):i.push(";")):(i.push(r.call(e,"value","typeParameters"),"(",r.call(c=>yt(c,t,e),"value"),")",r.call(e,"value","returnType")),a.body?i.push(" ",r.call(e,"value","body")):i.push(";")),S(i)}function gf(r,t,e){let s=r.map(e,"arguments"),n=pn(t,"parameters"),i=v(", ").join(s);return i.getLineLength(1)>t.wrapColumn?(i=v(`,
112
- `).join(s),S([`(
113
- `,i.indent(t.tabWidth),n?`,
81
+ `;else g="";a.push(Sc(r,p),c),d?r=g:g&&a.push(g)}),x(a)}function Sc(i,s){if(!i&&!s)return S("");if(!i)return S(s);if(!s)return S(i);let e=S(i),t=S(s);return t.length>e.length?t:e}function Xn(i){let s=[];i.declare&&s.push("declare ");let e=i.accessibility||i.access;return typeof e=="string"&&s.push(e," "),i.static&&s.push("static "),i.override&&s.push("override "),i.abstract&&s.push("abstract "),i.readonly&&s.push("readonly "),s}function Cr(i,s,e){let t=i.getNode(),r=t.kind,n=[],a=t.value;Z.FunctionExpression.check(a)||(a=t),n.push(...Xn(t)),a.async&&n.push("async "),a.generator&&n.push("*"),(r==="get"||r==="set")&&n.push(r," ");let o=i.call(e,"key");return t.computed&&(o=x(["[",o,"]"])),n.push(o),t.optional&&n.push("?"),t===a?(n.push(i.call(e,"typeParameters"),"(",Ie(i,s,e),")",i.call(e,"returnType")),t.body?n.push(" ",i.call(e,"body")):n.push(";")):(n.push(i.call(e,"value","typeParameters"),"(",i.call(l=>Ie(l,s,e),"value"),")",i.call(e,"value","returnType")),a.body?n.push(" ",i.call(e,"value","body")):n.push(";")),x(n)}function gn(i,s,e){let t=i.map(e,"arguments"),r=Rt(s,"parameters"),n=S(", ").join(t);return n.getLineLength(1)>s.wrapColumn?(n=S(`,
82
+ `).join(t),x([`(
83
+ `,n.indent(s.tabWidth),r?`,
114
84
  )`:`
115
- )`])):S(["(",i,")"])}function yt(r,t,e){let s=r.getValue(),n,i=[];s.params?(n=s.params,i=r.map(e,"params")):s.parameters&&(n=s.parameters,i=r.map(e,"parameters")),s.defaults&&r.each(function(o){let c=o.getName(),l=i[c];l&&o.getValue()&&(i[c]=S([l," = ",e(o)]))},"defaults"),s.rest&&i.push(S(["...",r.call(e,"rest")]));let a=v(", ").join(i);return a.length>1||a.getLineLength(1)>t.wrapColumn?(a=v(`,
116
- `).join(i),pn(t,"parameters")&&!s.rest&&n[n.length-1].type!=="RestElement"?a=S([a,`,
117
- `]):a=S([a,`
118
- `]),S([`
119
- `,a.indent(t.tabWidth)])):a}function Kf(r,t,e){let s=r.getValue();if(s.assertions&&s.assertions.length>0){let n=[" assert {"],i=r.map(e,"assertions"),a=v(", ").join(i);return a.length>1||a.getLineLength(1)>t.wrapColumn?n.push(`
120
- `,v(`,
121
- `).join(i).indent(t.tabWidth),`
122
- }`):n.push(" ",a," }"),S(n)}return v("")}function bf(r,t,e){let s=r.getValue(),n=["export "];s.exportKind&&s.exportKind==="type"&&(s.declaration||n.push("type "));let i=t.objectCurlySpacing;if(le.Declaration.assert(s),(s.default||s.type==="ExportDefaultDeclaration")&&n.push("default "),s.declaration)n.push(r.call(e,"declaration"));else if(s.specifiers){if(s.specifiers.length===1&&s.specifiers[0].type==="ExportBatchSpecifier")n.push("*");else if(s.specifiers.length===0)n.push("{}");else if(s.specifiers[0].type==="ExportDefaultSpecifier"){let o=[],c=[];if(r.each(function(l){l.getValue().type==="ExportDefaultSpecifier"?o.push(e(l)):c.push(e(l))},"specifiers"),o.forEach((l,u)=>{u>0&&n.push(", "),n.push(l)}),c.length>0){let l=v(", ").join(c);l.getLineLength(1)>t.wrapColumn&&(l=S([v(`,
123
- `).join(c).indent(t.tabWidth),","])),o.length>0&&n.push(", "),l.length>1?n.push(`{
124
- `,l,`
125
- }`):t.objectCurlySpacing?n.push("{ ",l," }"):n.push("{",l,"}")}}else n.push(i?"{ ":"{",v(", ").join(r.map(e,"specifiers")),i?" }":"}");s.source&&n.push(" from ",r.call(e,"source"),Kf(r,t,e))}let a=S(n);return mn(a)!==";"&&!(s.declaration&&(s.declaration.type==="FunctionDeclaration"||s.declaration.type==="ClassDeclaration"||s.declaration.type==="TSModuleDeclaration"||s.declaration.type==="TSInterfaceDeclaration"||s.declaration.type==="TSEnumDeclaration"))&&(a=S([a,";"])),a}function an(r,t){return Of(r)||t.unshift("declare "),S(t)}function on(r,t){return r.call(function(e){let s=e.getValue();return s?s==="plus"?v("+"):s==="minus"?v("-"):t(e):v("")},"variance")}function gs(r,t){return r.length>1?S([" ",r]):S([`
126
- `,qi(r).indent(t.tabWidth)])}function mn(r){let t=r.lastPos();do{let e=r.charAt(t);if(/\S/.test(e))return e}while(r.prevPos(t))}function Sf(r){return mn(r)==="}"}function Ri(r){return r.replace(/['"]/g,t=>t==='"'?"'":'"')}function ir(r){let t=Lt(r,"value"),e=Lt(r,"extra");if(e&&typeof e.raw=="string"&&t==e.rawValue)return e.raw;if(r.type==="Literal"){let s=r.raw;if(typeof s=="string"&&t==s)return s}}function Fi(r){return JSON.stringify(r).replace(/[\u2028\u2029]/g,function(t){return"\\u"+t.charCodeAt(0).toString(16)})}function cn(r,t){switch(Zc.assert(r),t.quote){case"auto":{let e=Fi(r),s=Ri(Fi(Ri(r)));return e.length>s.length?s:e}case"single":return Ri(Fi(Ri(r)));case"double":default:return Fi(r)}}function qi(r){let t=mn(r);return!t||`
127
- };`.indexOf(t)<0?S([r,";"]):r}function eT(r,t){return new KE(t).print(r)}var Bi;function Xf(){if(Bi)return Bi;let r=tT();return Bi={parse(t,e){return xf.parse(t,{...r,...e})}},Bi}function tT(){return{sourceType:"module",strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic","jsx","typescript"]}}var sT=Object.defineProperty,rT=(r,t,e)=>t in r?sT(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,_f=(r,t,e)=>(rT(r,typeof t!="symbol"?t+"":t,e),e),Ce=class extends Error{constructor(t,e){if(super(""),_f(this,"rawMessage"),_f(this,"options"),this.name="MagicastError",this.rawMessage=t,this.options=e,e?.ast&&e?.code&&e.ast.loc){let{line:s,column:n}=e.ast.loc.start,i=e.code.split(`
128
- `),a=Math.max(0,s-3),o=Math.min(i.length,s+3),c=i.slice(a,o).map((l,u)=>(l=`${(a+u+1).toString().padStart(3," ")} | ${l}`,a+u===s-1&&(l+=`
129
- ${" ".repeat(6+n)}^`),l));t+=`
85
+ )`])):x(["(",n,")"])}function Ie(i,s,e){let t=i.getValue(),r,n=[];t.params?(r=t.params,n=i.map(e,"params")):t.parameters&&(r=t.parameters,n=i.map(e,"parameters")),t.defaults&&i.each(function(o){let l=o.getName(),c=n[l];c&&o.getValue()&&(n[l]=x([c," = ",e(o)]))},"defaults"),t.rest&&n.push(x(["...",i.call(e,"rest")]));let a=S(", ").join(n);return a.length>1||a.getLineLength(1)>s.wrapColumn?(a=S(`,
86
+ `).join(n),Rt(s,"parameters")&&!t.rest&&r[r.length-1].type!=="RestElement"?a=x([a,`,
87
+ `]):a=x([a,`
88
+ `]),x([`
89
+ `,a.indent(s.tabWidth)])):a}function Gn(i,s,e){let t=i.getValue();if(t.assertions&&t.assertions.length>0){let r=[" assert {"],n=i.map(e,"assertions"),a=S(", ").join(n);return a.length>1||a.getLineLength(1)>s.wrapColumn?r.push(`
90
+ `,S(`,
91
+ `).join(n).indent(s.tabWidth),`
92
+ }`):r.push(" ",a," }"),x(r)}return S("")}function xn(i,s,e){let t=i.getValue(),r=["export "];t.exportKind&&t.exportKind==="type"&&(t.declaration||r.push("type "));let n=s.objectCurlySpacing;if(Z.Declaration.assert(t),(t.default||t.type==="ExportDefaultDeclaration")&&r.push("default "),t.declaration)r.push(i.call(e,"declaration"));else if(t.specifiers){if(t.specifiers.length===1&&t.specifiers[0].type==="ExportBatchSpecifier")r.push("*");else if(t.specifiers.length===0)r.push("{}");else if(t.specifiers[0].type==="ExportDefaultSpecifier"){let o=[],l=[];if(i.each(function(c){c.getValue().type==="ExportDefaultSpecifier"?o.push(e(c)):l.push(e(c))},"specifiers"),o.forEach((c,u)=>{u>0&&r.push(", "),r.push(c)}),l.length>0){let c=S(", ").join(l);c.getLineLength(1)>s.wrapColumn&&(c=x([S(`,
93
+ `).join(l).indent(s.tabWidth),","])),o.length>0&&r.push(", "),c.length>1?r.push(`{
94
+ `,c,`
95
+ }`):s.objectCurlySpacing?r.push("{ ",c," }"):r.push("{",c,"}")}}else r.push(n?"{ ":"{",S(", ").join(i.map(e,"specifiers")),n?" }":"}");t.source&&r.push(" from ",i.call(e,"source"),Gn(i,s,e))}let a=x(r);return qt(a)!==";"&&!(t.declaration&&(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"||t.declaration.type==="TSModuleDeclaration"||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSEnumDeclaration"))&&(a=x([a,";"])),a}function Mt(i,s){return On(i)||s.unshift("declare "),x(s)}function Ft(i,s){return i.call(function(e){let t=e.getValue();return t?t==="plus"?S("+"):t==="minus"?S("-"):s(e):S("")},"variance")}function He(i,s){return i.length>1?x([" ",i]):x([`
96
+ `,ms(i).indent(s.tabWidth)])}function qt(i){let s=i.lastPos();do{let e=i.charAt(s);if(/\S/.test(e))return e}while(i.prevPos(s))}function bn(i){return qt(i)==="}"}function us(i){return i.replace(/['"]/g,s=>s==='"'?"'":'"')}function ft(i){let s=_e(i,"value"),e=_e(i,"extra");if(e&&typeof e.raw=="string"&&s==e.rawValue)return e.raw;if(i.type==="Literal"){let t=i.raw;if(typeof t=="string"&&s==t)return t}}function hs(i){return JSON.stringify(i).replace(/[\u2028\u2029]/g,function(s){return"\\u"+s.charCodeAt(0).toString(16)})}function Bt(i,s){switch($r.assert(i),s.quote){case"auto":{let e=hs(i),t=us(hs(us(i)));return e.length>t.length?t:e}case"single":return us(hs(us(i)));case"double":default:return hs(i)}}function ms(i){let s=qt(i);return!s||`
97
+ };`.indexOf(s)<0?x([i,";"]):i}function Ac(i,s){return new bc(s).print(i)}var ps;function Qn(){if(ps)return ps;let i=Ec();return ps={parse(s,e){return Pn.parse(s,{...i,...e})}},ps}function Ec(){return{sourceType:"module",strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic","jsx","typescript"]}}var wc=Object.defineProperty,vc=(i,s,e)=>s in i?wc(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,Tn=(i,s,e)=>(vc(i,typeof s!="symbol"?s+"":s,e),e),re=class extends Error{constructor(s,e){if(super(""),Tn(this,"rawMessage"),Tn(this,"options"),this.name="MagicastError",this.rawMessage=s,this.options=e,e?.ast&&e?.code&&e.ast.loc){let{line:t,column:r}=e.ast.loc.start,n=e.code.split(`
98
+ `),a=Math.max(0,t-3),o=Math.min(n.length,t+3),l=n.slice(a,o).map((c,u)=>(c=`${(a+u+1).toString().padStart(3," ")} | ${c}`,a+u===t-1&&(c+=`
99
+ ${" ".repeat(6+r)}^`),c));s+=`
130
100
 
131
- ${c.join(`
101
+ ${l.join(`
132
102
  `)}
133
- `}this.message=t}},nT=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Qf=new Set(["string","number","boolean","bigint","symbol","undefined"]),pe=cr;function iT(r){return/^[$A-Z_a-z][\w$]*$/.test(r)}var el="__magicast_proxy";function Le(r,t=new Set){if(r===void 0)return pe.identifier("undefined");if(r===null)return pe.literal(null);if(Qf.has(typeof r))return pe.literal(r);if(t.has(r))throw new Ce("Can not serialize circular reference");if(t.add(r),r[el])return r.$ast;if(r instanceof RegExp){let e=pe.regExpLiteral(r.source,r.flags);return delete e.extra.raw,e}return r instanceof Set?pe.newExpression(pe.identifier("Set"),[pe.arrayExpression([...r].map(e=>Le(e,t)))]):r instanceof Date?pe.newExpression(pe.identifier("Date"),[pe.literal(r.toISOString())]):r instanceof Map?pe.newExpression(pe.identifier("Map"),[pe.arrayExpression([...r].map(([e,s])=>pe.arrayExpression([Le(e,t),Le(s,t)])))]):Array.isArray(r)?pe.arrayExpression(r.map(e=>Le(e,t))):typeof r=="object"?pe.objectExpression(Object.entries(r).map(([e,s])=>pe.property("init",/^[$A-Z_a-z][\w$]*$/g.test(e)?pe.identifier(e):pe.literal(e),Le(s,t)))):pe.literal(r)}function aT(r,t={}){let e=t;return e[el]=!0,e.$ast=r,e.$type||(e.$type="object"),e}var oT={enumerable:!0,configurable:!0};function Je(r,t,e){let s=aT(r,t);return new Proxy({},{ownKeys(){return Object.keys(s).filter(n=>n!==el&&!n.startsWith("$"))},getOwnPropertyDescriptor(){return oT},has(n,i){return i in s},...e,get(n,i,a){if(i in s)return s[i];if(e.get)return e.get(n,i,a)},set(n,i,a,o){return i in s?(s[i]=a,!0):e.set?e.set(n,i,a,o):!1}})}var Ue=cr,jc=new WeakMap;function cT(r,t,e){if(jc.has(t))return jc.get(t);let s=Je(t,{get $declaration(){return r},get imported(){return t.type==="ImportDefaultSpecifier"?"default":t.type==="ImportNamespaceSpecifier"?"*":t.imported.type==="Identifier"?t.imported.name:t.imported.value},set imported(n){if(t.type!=="ImportSpecifier")throw new Ce("Changing import name is not yet implemented");t.imported.type==="Identifier"?t.imported.name=n:t.imported.value=n},get local(){return t.local.name},set local(n){t.local.name=n},get from(){return r.source.value},set from(n){if(n===r.source.value)return;r.specifiers=r.specifiers.filter(a=>a!==t),r.specifiers.length===0&&(e.body=e.body.filter(a=>a!==r));let i=e.body.find(a=>a.type==="ImportDeclaration"&&a.source.value===n);i?i.specifiers.push(t):e.body.unshift(Ue.importDeclaration([t],Ue.stringLiteral(n)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return jc.set(t,s),s}function lT(r,t){let e=()=>{let a=[];for(let o of r.body)if(o.type==="ImportDeclaration")for(let c of o.specifiers)a.push(cT(o,c,r));return a},s=(a,o,c)=>{let l=e(),u=l.find(f=>f.local===a),p=o.local||a;if(u)return u.imported=o.imported,u.local=p,u.from=o.from,!0;let h=o.imported==="default"?Ue.importDefaultSpecifier(Ue.identifier(p)):o.imported==="*"?Ue.importNamespaceSpecifier(Ue.identifier(p)):Ue.importSpecifier(Ue.identifier(o.imported),Ue.identifier(p)),d=l.find(f=>f.from===o.from)?.$declaration;if(d)d.specifiers.push(h);else if(c==="prepend"||l.length===0)r.body.unshift(Ue.importDeclaration([h],Ue.stringLiteral(o.from)));else{let f=l.at(-1).$declaration,m=r.body.indexOf(f);r.body.splice(m+1,0,Ue.importDeclaration([h],Ue.stringLiteral(o.from)))}return!0},n=a=>{let o=e().find(u=>u.local===a);if(!o)return!1;let c=o.$declaration,l=o.$ast;return c.specifiers=c.specifiers.filter(u=>u!==l),c.specifiers.length===0&&(r.body=r.body.filter(u=>u!==c)),!0};return Je(r,{$type:"imports",$add(a){s(a.local||a.imported,a,"prepend")},$prepend(a){s(a.local||a.imported,a,"prepend")},$append(a){s(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(c=>c.local===o)},set(a,o,c){return s(o,c,"prepend")},deleteProperty(a,o){return n(o)},ownKeys(){return e().map(a=>a.local)},has(a,o){return e().some(c=>c.local===o)}})}function Zi(r,t,e){let s=i=>t[i],n=(i,a)=>{t[i]=a};return Je(r,{$type:"array",push(i){t.push(Le(i))},pop(){return Me(t.pop(),e)},unshift(i){t.unshift(Le(i))},shift(){return Me(t.shift(),e)},splice(i,a,...o){return t.splice(i,a,...o.map(l=>Le(l))).map(l=>Me(l,e))},find(i){return t.map(a=>Me(a,e)).find(i)},findIndex(i){return t.map(a=>Me(a,e)).findIndex(i)},includes(i){return t.map(a=>Me(a,e)).includes(i)},toJSON(){return t.map(i=>Me(i,e))}},{get(i,a){if(a==="length")return t.length;if(a===Symbol.iterator)return function*(){for(let l of t)yield Me(l,e)};if(typeof a=="symbol")return;let o=+a;if(Number.isNaN(o))return;let c=s(o);if(c)return Me(c,e)},set(i,a,o){if(typeof a=="symbol")return!1;let c=+a;return Number.isNaN(c)?!1:(n(c,Le(o)),!0)},deleteProperty(i,a){if(typeof a=="symbol")return!1;let o=+a;return Number.isNaN(o)?!1:(t[o]=Le(void 0),!0)},ownKeys(){return["length",...t.map((i,a)=>a.toString())]}})}function uT(r,t){if("elements"in r)return Zi(r,r.elements,t)}function Zf(r,t){if(r.type!=="CallExpression")throw new Ce("Not a function call");function e(n){if(n.type==="Identifier")return n.name;if(n.type==="MemberExpression")return`${e(n.object)}.${e(n.property)}`;throw new Ce("Not implemented")}let s=Zi(r,r.arguments,t);return Je(r,{$type:"function-call",$callee:e(r.callee),$args:s},{})}function pT(r,t){if(r.type!=="ArrowFunctionExpression")throw new Ce("Not an arrow function expression");let e=Zi(r,r.params,t);return Je(r,{$type:"arrow-function-expression",$params:e,$body:Me(r.body,t)},{})}var hT=cr;function dT(r,t){if(!("properties"in r))return;let e=i=>{for(let a of r.properties){if("key"in a&&"name"in a.key&&a.key.name===i)return a.value;if(a.type==="ObjectProperty"&&(a.key.type==="StringLiteral"||a.key.type==="NumericLiteral"||a.key.type==="BooleanLiteral")&&a.key.value.toString()===i)return a.value.value??a.value}},s=(i,a=!1)=>{if("key"in i&&"name"in i.key)return i.key.name;if(i.type==="ObjectProperty"&&(i.key.type==="StringLiteral"||i.key.type==="NumericLiteral"||i.key.type==="BooleanLiteral"))return i.key.value.toString();if(a)throw new Ce(`Casting "${i.type}" is not supported`,{ast:i,code:t?.$code})},n=(i,a)=>{let o=r.properties.find(c=>s(c)===i);o?o.value=a:iT(i)?r.properties.push({type:"Property",key:{type:"Identifier",name:i},value:a}):r.properties.push({type:"ObjectProperty",key:hT.stringLiteral(i),value:a})};return Je(r,{$type:"object",toJSON(){return r.properties.reduce((i,a)=>("key"in a&&"name"in a.key&&(i[a.key.name]=Me(a.value,t)),i),{})}},{get(i,a){let o=e(a);if(o)return Me(o,t)},set(i,a,o){return typeof a!="string"&&(a=String(a)),n(a,Le(o)),!0},deleteProperty(i,a){typeof a!="string"&&(a=String(a));let o=r.properties.findIndex(c=>"key"in c&&"name"in c.key&&c.key.name===a);return o!==-1&&r.properties.splice(o,1),!0},ownKeys(){return r.properties.map(i=>s(i,!0)).filter(Boolean)}})}function em(r,t){if(r.type!=="NewExpression")throw new Ce("Not a new expression");function e(n){if(n.type==="Identifier")return n.name;if(n.type==="MemberExpression")return`${e(n.object)}.${e(n.property)}`;throw new Ce("Not implemented")}let s=Zi(r,r.arguments,t);return Je(r,{$type:"new-expression",$callee:e(r.callee),$args:s},{})}function fT(r){if(r.type!=="Identifier")throw new Ce("Not an identifier");return Je(r,{$type:"identifier",$name:r.name},{})}function mT(r){if(r.type!=="LogicalExpression")throw new Ce("Not a logical expression");return Je(r,{$type:"logicalExpression"},{})}function yT(r){if(r.type!=="MemberExpression")throw new Ce("Not a member expression");return Je(r,{$type:"memberExpression"},{})}var Uc=new WeakMap;function Me(r,t){if(Qf.has(typeof r))return r;if(nT.has(r.type))return r.value;if(Uc.has(r))return Uc.get(r);let e;switch(r.type){case"ObjectExpression":{e=dT(r,t);break}case"ArrayExpression":{e=uT(r,t);break}case"CallExpression":{e=Zf(r,t);break}case"ArrowFunctionExpression":{e=pT(r,t);break}case"NewExpression":{e=em(r,t);break}case"Identifier":{e=fT(r);break}case"LogicalExpression":{e=mT(r);break}case"MemberExpression":{e=yT(r);break}case"TSAsExpression":case"TSSatisfiesExpression":{e=Me(r.expression,t);break}default:throw new Ce(`Casting "${r.type}" is not supported`,{ast:r,code:t?.$code})}return Uc.set(r,e),e}var ln=cr;function gT(r,t){let e=n=>{let i=n==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a of r.body)if(a.type===i){if(n==="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===n)return o.init}}},s=(n,i)=>{let a=n==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",o=Le(i);for(let c of r.body)if(c.type===a){if(n==="default"){c.declaration=o;return}if(c.declaration&&"declarations"in c.declaration){let l=c.declaration.declarations[0];if("name"in l.id&&l.id.name===n){l.init=o;return}}}r.body.push(n==="default"?ln.exportDefaultDeclaration(o):ln.exportNamedDeclaration(ln.variableDeclaration("const",[ln.variableDeclarator(ln.identifier(n),o)])))};return Je(r,{$type:"exports"},{get(n,i){let a=e(i);if(a)return Me(a,t)},set(n,i,a){return s(i,a),!0},ownKeys(){return r.body.flatMap(n=>n.type==="ExportDefaultDeclaration"?["default"]:n.type==="ExportNamedDeclaration"&&n.declaration&&"declarations"in n.declaration?n.declaration.declarations.map(i=>"name"in i.id?i.id.name:""):[]).filter(Boolean)},deleteProperty(n,i){let a=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o=0;o<r.body.length;o++){let c=r.body[o];if(c.type===a){if(i==="default")return r.body.splice(o,1),!0;if(c.declaration&&"declarations"in c.declaration){let l=c.declaration.declarations[0];if("name"in l.id&&l.id.name===i)return r.body.splice(o,1),!0}}}return!1}})}function bT(r,t){let e=r.program;if(e.type!=="Program")throw new Ce(`Cannot proxify ${r.type} as module`);let s={$code:t,$type:"module"},n=Je(e,s,{ownKeys(){return["imports","exports","generate"]}});return s.exports=gT(e,n),s.imports=lT(e),s.generate=i=>tl(n,i),n}function tm(r,t={}){let e={wrapColumn:t.wrapColumn===void 0,indent:t.tabWidth===void 0||t.useTabs===void 0,quote:t.quote===void 0,arrowParens:t.arrowParensAlways===void 0,trailingComma:t.trailingComma===void 0},s=2,n=0,i=0,a=0,o=0,c=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,l={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},u=(r||"").split(`
134
- `),p=!1;for(let h of u){let d=h.trim();if(d.length!==0){if(e.wrapColumn&&h.length>a&&(a=h.length),e.indent){let f=h.match(/^\s+/)?.[0]||"";f.length>0&&(f.length>0&&f.length<s&&(s=f.length),f[0]===" "?n++:f.length>0&&n--)}if(d.at(-1)===";"?i++:d.length>0&&i--,e.quote||e.arrowParens){let f=d.matchAll(c);for(let m of f)if(m.groups)for(let y in l)m.groups[y]&&l[y]++}e.trailingComma&&((h.startsWith("}")||h.startsWith("]"))&&(p?o++:o--),p=d.endsWith(","))}}return{wrapColumn:a,useTabs:n>0,tabWidth:s,quote:l.singleQuote>l.doubleQuote?"single":"double",arrowParensAlways:l.singleParam>0,trailingComma:o>0||l.trailingComma>0,useSemi:i>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...t}}function sm(r,t){let e=Uf(r,{parser:t?.parser||Xf(),...t});return bT(e,r)}function rm(r,t){let e=Uf("("+r+")",{parser:t?.parser||Xf(),...t}),s=e.program.body[0];s.type==="ExpressionStatement"&&(s=s.expression),s.extra?.parenthesized&&(s.extra.parenthesized=!1);let n={$ast:e,$code:" "+r+" ",$type:"module"};return Me(s,n)}function tl(r,t={}){let e=r.$ast||r,s=t.format===!1||!("$code"in r)?{}:tm(r.$code,t.format),{code:n,map:i}=eT(e,{...t,...s});return{code:n,map:i}}async function ST(r,t={}){let e=await Gi.promises.readFile(r,"utf8");return t.sourceFileName=t.sourceFileName??r,sm(e,t)}async function _T(r,t,e){let s="$ast"in r?r.$ast:r,{code:n,map:i}=tl(s,e);await Gi.promises.writeFile(t,n),i&&await Gi.promises.writeFile(t+".map",i)}var ji=cr,xT={functionCall(r,...t){let e=ji.callExpression(ji.identifier(r),t.map(s=>Le(s)));return Zf(e)},newExpression(r,...t){let e=ji.newExpression(ji.identifier(r),t.map(s=>Le(s)));return em(e)},literal(r){return Le(r)},raw(r){return rm(r)}};var YD=zt(LS(),1);async function jS(r,t){let e=await(0,Fe.readdir)(r,{withFileTypes:!0}),s=[];for(let n of e){let i=J.default.join(r,n.name);if(n.isDirectory()){if(!t.has(n.name)){let a=await jS(i,t);s.push(...a)}}else s.push(i)}return s}async function US(r){let t=new Set,e=(...l)=>{if(process.env.DEBUG){let u=new Date,p=`${String(u.getMinutes()).padStart(2,"0")}:${String(u.getSeconds()).padStart(2,"0")}.${String(u.getMilliseconds()).padStart(3,"0")}`;console.debug(p,"[builder-dev-tools]",...l)}},s=async l=>{let u=(0,RS.createHash)("md5");return u.update(l),u.digest("hex")},n=J.default.normalize(r.cwd),i=XD(J.default.normalize(r.cwd))??n,a=QD(J.default.normalize(r.cwd))??i,o={...J.default,getCwdDir:()=>n,getRepoRootDir:()=>i,getAppRootDir:()=>a,cwd:()=>process.cwd(),exists:async l=>{try{return await(0,Fe.access)(l),!0}catch{return!1}},magicast:sl,existsSync:l=>(0,ie.existsSync)(l),readdir:async(l,u)=>{let p=await(0,Fe.readdir)(l);return u?p.map(h=>J.default.join(l,h)):p},readdirRecursive:async(l,u)=>jS(l,new Set(u)),readdirSync:l=>(0,ie.readdirSync)(l),readFile:async l=>{try{return await(0,Fe.readFile)(l,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,l),u}},readFileSync(l){try{return(0,ie.readFileSync)(l,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,l),u}},spawnSync:Gr.spawnSync,stat:async l=>await(0,Fe.stat)(l),statSync:l=>(0,ie.statSync)(l),unlinkSync:l=>{(0,ie.unlinkSync)(l)},unlink:async l=>{await(0,Fe.unlink)(l)},writeFile:async(l,u)=>{l=J.default.normalize(l);let p={path:l,basename:J.default.basename(l),dirname:J.default.dirname(l),extname:J.default.extname(l)};await(0,Fe.mkdir)(J.default.dirname(l),{recursive:!0}),await(0,Fe.writeFile)(l,u);for(let h of t)await h(p)},hash:s,getDeviceId:()=>s(`${(0,jo.hostname)()}:${(0,jo.homedir)()}`),formatCode:async(l,u)=>{let p=null;try{p=await Wh.default.resolveConfig(l)}catch{}try{return Wh.default.format(u,{...p,filepath:l})}catch{}return u},on:(l,u)=>{l==="change"&&t.add(u)},off:(l,u)=>{l==="change"&&t.delete(u)},debug:e,launchEditor:async l=>{try{let u=l.filePath;typeof l.line=="number"&&(u+=`:${l.line}`,typeof l.column=="number"&&(u+=`:${l.column}`)),(0,BS.default)(u,"code",(p,h)=>{console.error(`Failed to launch editor for ${p}`),h&&console.error(h)})}catch(u){console.error(`Failed to launch editor for ${String(u.message||u)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let l=J.default.normalize(r.cwd);return{remoteUrl:WD(l),defaultBranch:zD(l),commit:JD(l),currentBranch:KD(l)}},getFrameworks:()=>[],ts:FS.default,Sentry:YD,version:"1.3.4",sdkVersion:null,ignoreMissingConfig:r.ignoreMissingConfig,kind:null},c=await sd(o);return o.getFrameworks=()=>c,o}function WD(r){try{return((0,Gr.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:r}).stdout||"").toString().trim()}catch(t){return console.error("Error getting git remote URL:",t),""}}function zD(r){let t="master";try{let e=(0,Gr.spawnSync)("git",["branch","-r"],{cwd:r});return e.stdout&&e.stdout.toString().trim().split(`
135
- `).map(n=>n.trim()).includes("origin/main")?"main":t}catch(e){return console.error("Error getting git default branch name:",e.toString().split(`
136
- `)[0]),t}}function JD(r){try{return((0,Gr.spawnSync)("git",["rev-parse","HEAD"],{cwd:r}).stdout||"").toString().trim()}catch(t){return console.error("Error getting git commit:",t),""}}function KD(r){try{return((0,Gr.spawnSync)("git",["branch","--show-current"],{cwd:r}).stdout||"").toString().trim()}catch(t){return console.error("Error getting current branch name:",t),""}}function XD(r){let t=J.default.resolve("/");for(let e=0;e<20;e++){let s=J.default.join(r,"package.json");if((0,ie.existsSync)(s))return r;if(r===t)break;r=J.default.dirname(r)}return null}function QD(r){let t=J.default.resolve("/");for(let e=0;e<20;e++){if((0,ie.existsSync)(J.default.join(r,"package.json"))||(0,ie.existsSync)(J.default.join(r,"remix.config.js"))||(0,ie.existsSync)(J.default.join(r,"remix.config.mjs"))||(0,ie.existsSync)(J.default.join(r,"remix.config.ts"))||(0,ie.existsSync)(J.default.join(r,"vite.config.js"))||(0,ie.existsSync)(J.default.join(r,"vite.config.ts"))||(0,ie.existsSync)(J.default.join(r,"vite.config.mjs"))||(0,ie.existsSync)(J.default.join(r,"next.config.js"))||(0,ie.existsSync)(J.default.join(r,"next.config.ts"))||(0,ie.existsSync)(J.default.join(r,"angular.json"))||(0,ie.existsSync)(J.default.join(r,"project.json"))||(0,ie.existsSync)(J.default.join(r,"tsconfig.json")))return r;if(r===t)break;r=J.default.dirname(r)}return null}0&&(module.exports={createDevToolsNodeSys});
137
- /*! Bundled license information:
138
-
139
- cookie/index.js:
140
- (*!
141
- * cookie
142
- * Copyright(c) 2012-2014 Roman Shtylman
143
- * Copyright(c) 2015 Douglas Christopher Wilson
144
- * MIT Licensed
145
- *)
146
- */
103
+ `}this.message=s}},Cc=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Yn=new Set(["string","number","boolean","bigint","symbol","undefined"]),ee=yt;function Ic(i){return/^[$A-Z_a-z][\w$]*$/.test(i)}var qr="__magicast_proxy";function ce(i,s=new Set){if(i===void 0)return ee.identifier("undefined");if(i===null)return ee.literal(null);if(Yn.has(typeof i))return ee.literal(i);if(s.has(i))throw new re("Can not serialize circular reference");if(s.add(i),i[qr])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 Nc(i,s={}){let e=s;return e[qr]=!0,e.$ast=i,e.$type||(e.$type="object"),e}var kc={enumerable:!0,configurable:!0};function be(i,s,e){let t=Nc(i,s);return new Proxy({},{ownKeys(){return Object.keys(t).filter(r=>r!==qr&&!r.startsWith("$"))},getOwnPropertyDescriptor(){return kc},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=yt,Ir=new WeakMap;function Lc(i,s,e){if(Ir.has(s))return Ir.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 Ir.set(s,t),t}function Dc(i,s){let e=()=>{let a=[];for(let o of i.body)if(o.type==="ImportDeclaration")for(let l of o.specifiers)a.push(Lc(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 Cs(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 Oc(i,s){if("elements"in i)return Cs(i,i.elements,s)}function Zn(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=Cs(i,i.arguments,s);return be(i,{$type:"function-call",$callee:e(i.callee),$args:t},{})}function Mc(i,s){if(i.type!=="ArrowFunctionExpression")throw new re("Not an arrow function expression");let e=Cs(i,i.params,s);return be(i,{$type:"arrow-function-expression",$params:e,$body:le(i.body,s)},{})}var Fc=yt;function Bc(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:Ic(n)?i.properties.push({type:"Property",key:{type:"Identifier",name:n},value:a}):i.properties.push({type:"ObjectProperty",key:Fc.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 ea(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=Cs(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 jc(i){if(i.type!=="LogicalExpression")throw new re("Not a logical expression");return be(i,{$type:"logicalExpression"},{})}function Rc(i){if(i.type!=="MemberExpression")throw new re("Not a member expression");return be(i,{$type:"memberExpression"},{})}var Nr=new WeakMap;function le(i,s){if(Yn.has(typeof i))return i;if(Cc.has(i.type))return i.value;if(Nr.has(i))return Nr.get(i);let e;switch(i.type){case"ObjectExpression":{e=Bc(i,s);break}case"ArrayExpression":{e=Oc(i,s);break}case"CallExpression":{e=Zn(i,s);break}case"ArrowFunctionExpression":{e=Mc(i,s);break}case"NewExpression":{e=ea(i,s);break}case"Identifier":{e=_c(i);break}case"LogicalExpression":{e=jc(i);break}case"MemberExpression":{e=Rc(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 Nr.set(i,e),e}var _t=yt;function Uc(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"?_t.exportDefaultDeclaration(o):_t.exportNamedDeclaration(_t.variableDeclaration("const",[_t.variableDeclarator(_t.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 Vc(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=Uc(e,r),t.imports=Dc(e),t.generate=n=>zr(r,n),r}function ta(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(`
104
+ `),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 sa(i,s){let e=Un(i,{parser:s?.parser||Qn(),...s});return Vc(e,i)}function ra(i,s){let e=Un("("+i+")",{parser:s?.parser||Qn(),...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 zr(i,s={}){let e=i.$ast||i,t=s.format===!1||!("$code"in i)?{}:ta(i.$code,s.format),{code:r,map:n}=Ac(e,{...s,...t});return{code:r,map:n}}async function $c(i,s={}){let e=await ys.promises.readFile(i,"utf8");return s.sourceFileName=s.sourceFileName??i,sa(e,s)}async function qc(i,s,e){let t="$ast"in i?i.$ast:i,{code:r,map:n}=zr(t,e);await ys.promises.writeFile(s,r),n&&await ys.promises.writeFile(s+".map",n)}var fs=yt,zc={functionCall(i,...s){let e=fs.callExpression(fs.identifier(i),s.map(t=>ce(t)));return Zn(e)},newExpression(i,...s){let e=fs.newExpression(fs.identifier(i),s.map(t=>ce(t)));return ea(e)},literal(i){return ce(i)},raw(i){return ra(i)}};var Wc=je(require("@sentry/node"),1);async function oa(i,s){let e=await(0,ue.readdir)(i,{withFileTypes:!0}),t=[];for(let r of e){let n=V.default.join(i,r.name);if(r.isDirectory()){if(!s.has(r.name)){let a=await oa(n,s);t.push(...a)}}else t.push(n)}return t}async function la(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,ia.createHash)("md5");return u.update(c),u.digest("hex")},r=V.default.normalize(i.cwd),n=Gc(V.default.normalize(i.cwd))??r,a=Qc(V.default.normalize(i.cwd))??n,o={...V.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:Wr,existsSync:c=>(0,G.existsSync)(c),readdir:async(c,u)=>{let h=await(0,ue.readdir)(c);return u?h.map(f=>V.default.join(c,f)):h},readdirRecursive:async(c,u)=>oa(c,new Set(u)),readdirSync:c=>(0,G.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,G.readFileSync)(c,"utf-8")}catch(u){if(u.code==="ENOENT")return null;throw e(u,c),u}},spawnSync:gt.spawnSync,stat:async c=>await(0,ue.stat)(c),statSync:c=>(0,G.statSync)(c),unlinkSync:c=>{(0,G.unlinkSync)(c)},unlink:async c=>{await(0,ue.unlink)(c)},writeFile:async(c,u)=>{c=V.default.normalize(c);let h={path:c,basename:V.default.basename(c),dirname:V.default.dirname(c),extname:V.default.extname(c)};await(0,ue.mkdir)(V.default.dirname(c),{recursive:!0}),await(0,ue.writeFile)(c,u);for(let f of s)await f(h)},hash:t,getDeviceId:()=>t(`${(0,Is.hostname)()}:${(0,Is.homedir)()}`),formatCode:async(c,u)=>{let h=null;try{h=await Jr.default.resolveConfig(c)}catch{}try{return Jr.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,aa.default)(u,"code",(h,f)=>{console.error(`Failed to launch editor for ${h}`),f&&console.error(f)})}catch(u){console.error(`Failed to launch editor for ${String(u.message||u)}`)}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async()=>{let c=V.default.normalize(i.cwd);return{remoteUrl:Jc(c),defaultBranch:Kc(c),commit:Hc(c),currentBranch:Xc(c)}},getFrameworks:()=>[],ts:na.default,Sentry:Wc,version:"1.3.5",sdkVersion:null,ignoreMissingConfig:i.ignoreMissingConfig,kind:null},l=await si(o);return o.getFrameworks=()=>l,o}function Jc(i){try{return((0,gt.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git remote URL:",s),""}}function Kc(i){let s="master";try{let e=(0,gt.spawnSync)("git",["branch","-r"],{cwd:i});return e.stdout&&e.stdout.toString().trim().split(`
105
+ `).map(r=>r.trim()).includes("origin/main")?"main":s}catch(e){return console.error("Error getting git default branch name:",e.toString().split(`
106
+ `)[0]),s}}function Hc(i){try{return((0,gt.spawnSync)("git",["rev-parse","HEAD"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting git commit:",s),""}}function Xc(i){try{return((0,gt.spawnSync)("git",["branch","--show-current"],{cwd:i}).stdout||"").toString().trim()}catch(s){return console.error("Error getting current branch name:",s),""}}function Gc(i){let s=V.default.resolve("/");for(let e=0;e<20;e++){let t=V.default.join(i,"package.json");if((0,G.existsSync)(t))return i;if(i===s)break;i=V.default.dirname(i)}return null}function Qc(i){let s=V.default.resolve("/");for(let e=0;e<20;e++){if((0,G.existsSync)(V.default.join(i,"package.json"))||(0,G.existsSync)(V.default.join(i,"remix.config.js"))||(0,G.existsSync)(V.default.join(i,"remix.config.mjs"))||(0,G.existsSync)(V.default.join(i,"remix.config.ts"))||(0,G.existsSync)(V.default.join(i,"vite.config.js"))||(0,G.existsSync)(V.default.join(i,"vite.config.ts"))||(0,G.existsSync)(V.default.join(i,"vite.config.mjs"))||(0,G.existsSync)(V.default.join(i,"next.config.js"))||(0,G.existsSync)(V.default.join(i,"next.config.ts"))||(0,G.existsSync)(V.default.join(i,"angular.json"))||(0,G.existsSync)(V.default.join(i,"project.json"))||(0,G.existsSync)(V.default.join(i,"tsconfig.json")))return i;if(i===s)break;i=V.default.dirname(i)}return null}0&&(module.exports={createDevToolsNodeSys});