@lithent/hmr-parser 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lithentHmrParser.mjs +3166 -2956
- package/dist/lithentHmrParser.mjs.map +1 -1
- package/dist/lithentHmrParser.umd.js +81 -37
- package/dist/lithentHmrParser.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/strings.ts +50 -10
- package/src/tests/mark.test.ts +30 -0
- package/src/transform/componentRegister.ts +266 -2
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
(function(le,qe){typeof exports=="object"&&typeof module<"u"?qe(exports):typeof define=="function"&&define.amd?define(["exports"],qe):(le=typeof globalThis<"u"?globalThis:le||self,qe(le.lithentHmrParser={}))})(this,function(le){"use strict";var qe=44,
|
|
2
|
-
`),r=e.filter(a=>/^\t+/.test(a)),s=e.filter(a=>/^ {2,}/.test(a));if(r.length===0&&s.length===0)return null;if(r.length>=s.length)return" ";const i=s.reduce((a,n)=>{const o=/^ +/.exec(n)[0].length;return Math.min(o,a)},1/0);return new Array(i+1).join(" ")}function Ya(t,e){const r=t.split(/[/\\]/),s=e.split(/[/\\]/);for(r.pop();r[0]===s[0];)r.shift(),s.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(s).join("/")}const
|
|
3
|
-
`),r=[];for(let s=0,i=0;s<e.length;s++)r.push(i),i+=e[s].length+1;return function(i){let a=0,n=r.length;for(;a<n;){const p=a+n>>1;i<r[p]?n=p:a=p+1}const o=a-1,u=i-r[o];return{line:o,column:u}}}const
|
|
1
|
+
(function(le,qe){typeof exports=="object"&&typeof module<"u"?qe(exports):typeof define=="function"&&define.amd?define(["exports"],qe):(le=typeof globalThis<"u"?globalThis:le||self,qe(le.lithentHmrParser={}))})(this,function(le){"use strict";var qe=44,Fa=59,Bs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fs=new Uint8Array(64),Ra=new Uint8Array(128);for(let t=0;t<Bs.length;t++){const e=Bs.charCodeAt(t);Fs[t]=e,Ra[e]=t}function We(t,e,r){let s=e-r;s=s<0?-s<<1|1:s<<1;do{let i=s&31;s>>>=5,s>0&&(i|=32),t.write(Fs[i])}while(s>0);return e}var Rs=1024*16,js=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},ja=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Rs)}write(t){const{buffer:e}=this;e[this.pos++]=t,this.pos===Rs&&(this.out+=js.decode(e),this.pos=0)}flush(){const{buffer:t,out:e,pos:r}=this;return r>0?e+js.decode(t.subarray(0,r)):e}};function Ka(t){const e=new ja;let r=0,s=0,i=0,a=0;for(let n=0;n<t.length;n++){const o=t[n];if(n>0&&e.write(Fa),o.length===0)continue;let u=0;for(let p=0;p<o.length;p++){const y=o[p];p>0&&e.write(qe),u=We(e,y[0],u),y.length!==1&&(r=We(e,y[1],r),s=We(e,y[2],s),i=We(e,y[3],i),y.length!==4&&(a=We(e,y[4],a)))}}return e.flush()}class Tt{constructor(e){this.bits=e instanceof Tt?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class He{constructor(e,r,s){this.start=e,this.end=r,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new He(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,s){return this.content=e,s||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const r=e-this.start,s=this.original.slice(0,r),i=this.original.slice(r);this.original=s;const a=new He(e,this.end,i);return a.outro=this.outro,this.outro="",this.end=e,this.edited?(a.edit("",!1),this.content=""):this.content=s,a.next=this.next,a.next&&(a.next.previous=a),a.previous=this,this.next=a,a}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const r=this.content.replace(e,"");if(r.length){if(r!==this.content){const s=this.split(this.end-r.length);this.edited&&s.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}}function Ua(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const Va=Ua();class $a{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Ka(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Va(this.toString())}}function Xa(t){const e=t.split(`
|
|
2
|
+
`),r=e.filter(a=>/^\t+/.test(a)),s=e.filter(a=>/^ {2,}/.test(a));if(r.length===0&&s.length===0)return null;if(r.length>=s.length)return" ";const i=s.reduce((a,n)=>{const o=/^ +/.exec(n)[0].length;return Math.min(o,a)},1/0);return new Array(i+1).join(" ")}function Ya(t,e){const r=t.split(/[/\\]/),s=e.split(/[/\\]/);for(r.pop();r[0]===s[0];)r.shift(),s.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(s).join("/")}const Ja=Object.prototype.toString;function qa(t){return Ja.call(t)==="[object Object]"}function Ks(t){const e=t.split(`
|
|
3
|
+
`),r=[];for(let s=0,i=0;s<e.length;s++)r.push(i),i+=e[s].length+1;return function(i){let a=0,n=r.length;for(;a<n;){const p=a+n>>1;i<r[p]?n=p:a=p+1}const o=a-1,u=i-r[o];return{line:o,column:u}}}const Wa=/\w/;class Ha{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,s,i){if(r.length){const a=r.length-1;let n=r.indexOf(`
|
|
4
4
|
`,0),o=-1;for(;n>=0&&a>n;){const p=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&p.push(i),this.rawSegments.push(p),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=n,n=r.indexOf(`
|
|
5
5
|
`,n+1)}const u=[this.generatedCodeColumn,e,s.line,s.column];i>=0&&u.push(i),this.rawSegments.push(u),this.advance(r.slice(o+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(r));this.pending=null}addUneditedChunk(e,r,s,i,a){let n=r.start,o=!0,u=!1;for(;n<r.end;){if(s[n]===`
|
|
6
|
-
`)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0,u=!1;else{if(this.hires||o||a.has(n)){const p=[this.generatedCodeColumn,e,i.line,i.column];this.hires==="boundary"?
|
|
6
|
+
`)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0,u=!1;else{if(this.hires||o||a.has(n)){const p=[this.generatedCodeColumn,e,i.line,i.column];this.hires==="boundary"?Wa.test(s[n])?u||(this.rawSegments.push(p),u=!0):(this.rawSegments.push(p),u=!1):this.rawSegments.push(p)}i.column+=1,this.generatedCodeColumn+=1,o=!1}n+=1}this.pending=null}advance(e){if(!e)return;const r=e.split(`
|
|
7
7
|
`);if(r.length>1){for(let s=0;s<r.length-1;s++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=r[r.length-1].length}}const ze=`
|
|
8
|
-
`,je={insertLeft:!1,insertRight:!1,storeName:!1};class St{constructor(e,r={}){const s=new He(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:s},lastChunk:{writable:!0,value:s},lastSearchedChunk:{writable:!0,value:s},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:r.filename},indentExclusionRanges:{writable:!0,value:r.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Tt},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:r.ignoreList},offset:{writable:!0,value:r.offset||0}}),this.byStart[0]=s,this.byEnd[e.length]=s}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.appendLeft(r):this.intro+=r,this}appendRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.appendRight(r):this.outro+=r,this}clone(){const e=new St(this.original,{filename:this.filename,offset:this.offset});let r=this.firstChunk,s=e.firstChunk=e.lastSearchedChunk=r.clone();for(;r;){e.byStart[s.start]=s,e.byEnd[s.end]=s;const i=r.next,a=i&&i.clone();a&&(s.next=a,a.previous=s,s=a),r=i}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new Tt(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const r=0,s=Object.keys(this.storedNames),i=new
|
|
8
|
+
`,je={insertLeft:!1,insertRight:!1,storeName:!1};class St{constructor(e,r={}){const s=new He(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:s},lastChunk:{writable:!0,value:s},lastSearchedChunk:{writable:!0,value:s},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:r.filename},indentExclusionRanges:{writable:!0,value:r.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Tt},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:r.ignoreList},offset:{writable:!0,value:r.offset||0}}),this.byStart[0]=s,this.byEnd[e.length]=s}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.appendLeft(r):this.intro+=r,this}appendRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.appendRight(r):this.outro+=r,this}clone(){const e=new St(this.original,{filename:this.filename,offset:this.offset});let r=this.firstChunk,s=e.firstChunk=e.lastSearchedChunk=r.clone();for(;r;){e.byStart[s.start]=s,e.byEnd[s.end]=s;const i=r.next,a=i&&i.clone();a&&(s.next=a,a.previous=s,s=a),r=i}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new Tt(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const r=0,s=Object.keys(this.storedNames),i=new Ha(e.hires),a=Ks(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(n=>{const o=a(n.start);n.intro.length&&i.advance(n.intro),n.edited?i.addEdit(r,n.content,o,n.storeName?s.indexOf(n.original):-1):i.addUneditedChunk(r,n,this.original,o,this.sourcemapLocations),n.outro.length&&i.advance(n.outro)}),this.outro&&i.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?Ya(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:s,mappings:i.raw,x_google_ignoreList:this.ignoreList?[r]:void 0}}generateMap(e){return new $a(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Xa(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,r){const s=/^[^\r\n]/gm;if(qa(e)&&(r=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;r=r||{};const i={};r.exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(y=>{for(let E=y[0];E<y[1];E+=1)i[E]=!0});let a=r.indentStart!==!1;const n=p=>a?`${e}${p}`:(a=!0,p);this.intro=this.intro.replace(s,n);let o=0,u=this.firstChunk;for(;u;){const p=u.end;if(u.edited)i[o]||(u.content=u.content.replace(s,n),u.content.length&&(a=u.content[u.content.length-1]===`
|
|
9
9
|
`));else for(o=u.start;o<p;){if(!i[o]){const y=this.original[o];y===`
|
|
10
10
|
`?a=!0:y!=="\r"&&a&&(a=!1,o===u.start||(this._splitChunk(u,o),u=u.next),u.prependRight(e))}o+=1}o=u.end,u=u.next}return this.outro=this.outro.replace(s,n),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,r){return je.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),je.insertLeft=!0),this.appendLeft(e,r)}insertRight(e,r){return je.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),je.insertRight=!0),this.prependRight(e,r)}move(e,r,s){if(e=e+this.offset,r=r+this.offset,s=s+this.offset,s>=e&&s<=r)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(r),this._split(s);const i=this.byStart[e],a=this.byEnd[r],n=i.previous,o=a.next,u=this.byStart[s];if(!u&&a===this.lastChunk)return this;const p=u?u.previous:this.lastChunk;return n&&(n.next=o),o&&(o.previous=n),p&&(p.next=i),u&&(u.previous=a),i.previous||(this.firstChunk=a.next),a.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=p,a.next=u||null,p||(this.firstChunk=i),u||(this.lastChunk=a),this}overwrite(e,r,s,i){return i=i||{},this.update(e,r,s,{...i,overwrite:!i.contentOnly})}update(e,r,s,i){if(e=e+this.offset,r=r+this.offset,typeof s!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(r>this.original.length)throw new Error("end is out of bounds");if(e===r)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(r),i===!0&&(je.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),je.storeName=!0),i={storeName:!0});const a=i!==void 0?i.storeName:!1,n=i!==void 0?i.overwrite:!1;if(a){const p=this.original.slice(e,r);Object.defineProperty(this.storedNames,p,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[e],u=this.byEnd[r];if(o){let p=o;for(;p!==u;){if(p.next!==this.byStart[p.end])throw new Error("Cannot overwrite across a split point");p=p.next,p.edit("",!1)}o.edit(s,a,!n)}else{const p=new He(e,r,"").edit(s,a);u.next=p,p.previous=u}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(r):this.intro=r+this.intro,this}prependRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(r):this.outro=r+this.outro,this}remove(e,r){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=r>s.end?this.byStart[s.end]:null;return this}reset(e,r){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let s=this.byStart[e];for(;s;)s.reset(),s=r>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(ze);if(e!==-1)return this.outro.substr(e+1);let r=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(ze),e!==-1)return s.outro.substr(e+1)+r;r=s.outro+r}if(s.content.length>0){if(e=s.content.lastIndexOf(ze),e!==-1)return s.content.substr(e+1)+r;r=s.content+r}if(s.intro.length>0){if(e=s.intro.lastIndexOf(ze),e!==-1)return s.intro.substr(e+1)+r;r=s.intro+r}}while(s=s.previous);return e=this.intro.lastIndexOf(ze),e!==-1?this.intro.substr(e+1)+r:this.intro+r}slice(e=0,r=this.original.length-this.offset){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start<r&&i.end>=r)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const a=i;for(;i;){i.intro&&(a!==i||i.start===e)&&(s+=i.intro);const n=i.start<r&&i.end>=r;if(n&&i.edited&&i.end!==r)throw new Error(`Cannot use replaced character ${r} as slice end anchor.`);const o=a===i?e-i.start:0,u=n?i.content.length+r-i.end:i.content.length;if(s+=i.content.slice(o,u),i.outro&&(!n||i.end===r)&&(s+=i.outro),n)break;i=i.next}return s}snip(e,r){const s=this.clone();return s.remove(0,e),s.remove(r,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let r=this.lastSearchedChunk,s=r;const i=e>r.end;for(;r;){if(r.contains(e))return this._splitChunk(r,e);if(r=i?this.byStart[r.end]:this.byEnd[r.start],r===s)return;s=r}}_splitChunk(e,r){if(e.edited&&e.content.length){const i=Ks(this.original)(r);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${e.original}")`)}const s=e.split(r);return this.byEnd[r]=e,this.byStart[r]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,r=this.firstChunk;for(;r;)e+=r.toString(),r=r.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,r=0;do r+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return r}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const r=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(r,""),this.outro.length)return!0;let s=this.lastChunk;do{const i=s.end,a=s.trimEnd(r);if(s.end!==i&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),a)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const r=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(r,""),this.intro.length)return!0;let s=this.firstChunk;do{const i=s.end,a=s.trimStart(r);if(s.end!==i&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),a)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,r){function s(a,n){return typeof r=="string"?r.replace(/\$(\$|&|\d+)/g,(o,u)=>u==="$"?"$":u==="&"?a[0]:+u<a.length?a[+u]:`$${u}`):r(...a,a.index,n,a.groups)}function i(a,n){let o;const u=[];for(;o=a.exec(n);)u.push(o);return u}if(e.global)i(e,this.original).forEach(n=>{if(n.index!=null){const o=s(n,this.original);o!==n[0]&&this.overwrite(n.index,n.index+n[0].length,o)}});else{const a=this.original.match(e);if(a&&a.index!=null){const n=s(a,this.original);n!==a[0]&&this.overwrite(a.index,a.index+a[0].length,n)}}return this}_replaceString(e,r){const{original:s}=this,i=s.indexOf(e);return i!==-1&&(typeof r=="function"&&(r=r(e,i,s)),e!==r&&this.overwrite(i,i+e.length,r)),this}replace(e,r){return typeof e=="string"?this._replaceString(e,r):this._replaceRegexp(e,r)}_replaceAllString(e,r){const{original:s}=this,i=e.length;for(let a=s.indexOf(e);a!==-1;a=s.indexOf(e,a+i)){const n=s.slice(a,a+i);let o=r;typeof r=="function"&&(o=r(n,a,s)),n!==o&&this.overwrite(a,a+i,o)}return this}replaceAll(e,r){if(typeof e=="string")return this._replaceAllString(e,r);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,r)}}const Us=(t,e)=>{const r=new Set(e.length?e:t);return`
|
|
11
11
|
const __lithentModuleId = new URL(import.meta.url).pathname;
|
|
12
12
|
const __lithentBoundaryStoreKey = \`__lithent_hmr_boundary__\${__lithentModuleId}\`;
|
|
13
13
|
const __lithentDisposeStoreKey = \`__lithent_hmr_dispose__\${__lithentModuleId}\`;
|
|
14
|
+
const __lithentInvalidateCountKey = \`__lithent_hmr_invalidate_count__\${__lithentModuleId}\`;
|
|
14
15
|
const __lithentGlobalStore =
|
|
15
16
|
typeof globalThis === 'object'
|
|
16
17
|
? globalThis
|
|
@@ -84,6 +85,44 @@ const __lithentModuleHotStore =
|
|
|
84
85
|
|
|
85
86
|
const __lithentHmrTargets = ${JSON.stringify(Array.from(r))};
|
|
86
87
|
|
|
88
|
+
const __lithentGetInvalidateCount = () => {
|
|
89
|
+
return (__lithentGlobalStore && __lithentGlobalStore[__lithentInvalidateCountKey]) || 0;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const __lithentIncrementInvalidateCount = () => {
|
|
93
|
+
if (__lithentGlobalStore) {
|
|
94
|
+
const current = __lithentGetInvalidateCount();
|
|
95
|
+
__lithentGlobalStore[__lithentInvalidateCountKey] = current + 1;
|
|
96
|
+
return current + 1;
|
|
97
|
+
}
|
|
98
|
+
return 0;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const __lithentResetInvalidateCount = () => {
|
|
102
|
+
if (__lithentGlobalStore) {
|
|
103
|
+
__lithentGlobalStore[__lithentInvalidateCountKey] = 0;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const __lithentSafeInvalidate = (reason) => {
|
|
108
|
+
const MAX_INVALIDATE_ATTEMPTS = 3;
|
|
109
|
+
const count = __lithentIncrementInvalidateCount();
|
|
110
|
+
|
|
111
|
+
if (count >= MAX_INVALIDATE_ATTEMPTS) {
|
|
112
|
+
console.warn(
|
|
113
|
+
\`[Lithent HMR] 전체 리프레시를 \${count}번 시도했지만 계속 실패합니다. 컴포넌트가 마운트되지 않았거나 다른 문제가 있을 수 있습니다. 페이지를 수동으로 새로고침해주세요.\`,
|
|
114
|
+
reason
|
|
115
|
+
);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
console.warn(
|
|
120
|
+
\`[Lithent HMR] 변경된 경계를 적용하지 못해 전체 리프레시합니다. (시도 \${count}/\${MAX_INVALIDATE_ATTEMPTS})\`,
|
|
121
|
+
reason
|
|
122
|
+
);
|
|
123
|
+
import.meta.hot?.invalidate?.();
|
|
124
|
+
};
|
|
125
|
+
|
|
87
126
|
const __lithentSetupHmrHooks = () => {
|
|
88
127
|
if (!import.meta.hot) {
|
|
89
128
|
return;
|
|
@@ -115,7 +154,9 @@ const __lithentSetupHmrHooks = () => {
|
|
|
115
154
|
}
|
|
116
155
|
}
|
|
117
156
|
|
|
118
|
-
if (
|
|
157
|
+
if (applied) {
|
|
158
|
+
__lithentResetInvalidateCount();
|
|
159
|
+
} else {
|
|
119
160
|
if (missing.length && __lithentModuleHotStore) {
|
|
120
161
|
queueMicrotask(() => {
|
|
121
162
|
let retried = false;
|
|
@@ -125,19 +166,15 @@ const __lithentSetupHmrHooks = () => {
|
|
|
125
166
|
retried = true;
|
|
126
167
|
}
|
|
127
168
|
}
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
);
|
|
132
|
-
import.meta.hot?.invalidate?.();
|
|
169
|
+
if (retried) {
|
|
170
|
+
__lithentResetInvalidateCount();
|
|
171
|
+
} else {
|
|
172
|
+
__lithentSafeInvalidate(\`missing components: \${missing.join(', ')}\`);
|
|
133
173
|
}
|
|
134
174
|
});
|
|
135
175
|
return;
|
|
136
176
|
}
|
|
137
|
-
|
|
138
|
-
'[Lithent HMR] 변경된 경계를 적용하지 못해 전체 리프레시합니다.'
|
|
139
|
-
);
|
|
140
|
-
import.meta.hot?.invalidate?.();
|
|
177
|
+
__lithentSafeInvalidate('no components applied');
|
|
141
178
|
}
|
|
142
179
|
});
|
|
143
180
|
|
|
@@ -154,51 +191,58 @@ const __lithentSetupHmrHooks = () => {
|
|
|
154
191
|
if (disposeApp) {
|
|
155
192
|
__lithentGlobalStore[__lithentDisposeStoreKey] = disposeApp;
|
|
156
193
|
}
|
|
194
|
+
|
|
195
|
+
// Reset invalidate count on dispose to allow fresh attempts on next load
|
|
196
|
+
__lithentResetInvalidateCount();
|
|
157
197
|
}
|
|
158
198
|
});
|
|
159
199
|
};
|
|
160
200
|
|
|
161
201
|
__lithentSetupHmrHooks();
|
|
162
|
-
`};var xt={};Object.defineProperty(xt,"__esModule",{value:!0});function
|
|
202
|
+
`};var xt={};Object.defineProperty(xt,"__esModule",{value:!0});function za(t,e){if(t==null)return{};var r={};for(var s in t)if({}.hasOwnProperty.call(t,s)){if(e.includes(s))continue;r[s]=t[s]}return r}class ge{constructor(e,r,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=s}}class bt{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}}function se(t,e){const{line:r,column:s,index:i}=t;return new ge(r,s+e,i+e)}const Vs="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var Ga={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Vs},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Vs}};const $s={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"},Et=t=>t.type==="UpdateExpression"?$s.UpdateExpression[`${t.prefix}`]:$s[t.type];var Qa={AccessorIsGenerator:({kind:t})=>`A ${t}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:t})=>`Missing initializer in ${t} 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:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
163
203
|
- Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="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:t})=>`Unsyntactic ${t==="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 `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
|
|
164
|
-
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly 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:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${Et(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${Et(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${Et(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} 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:t})=>`Label '${t}' 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:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' 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:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,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:t})=>`Unexpected keyword '${t}'.`,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:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,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:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,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:t})=>`Identifier '${t}' 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."},Qa={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' 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."};const Za=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var en=Object.assign({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:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${Et({type:t})}; 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.'});const tn=["message"];function Ys(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function rn({toMessage:t,code:e,reasonCode:r,syntaxPlugin:s}){const i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{const a={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};a[r]&&(r=a[r])}return function a(n,o){const u=new SyntaxError;return u.code=e,u.reasonCode=r,u.loc=n,u.pos=n.index,u.syntaxPlugin=s,i&&(u.missingPlugin=o.missingPlugin),Ys(u,"clone",function(y={}){var E;const{line:P,column:g,index:C}=(E=y.loc)!=null?E:n;return a(new ge(P,g,C),Object.assign({},o,y.details))}),Ys(u,"details",o),Object.defineProperty(u,"message",{configurable:!0,get(){const p=`${t(o)} (${n.line}:${n.column})`;return this.message=p,p},set(p){Object.defineProperty(this,"message",{value:p,writable:!0})}}),u}}function de(t,e){if(Array.isArray(t))return s=>de(s,t[0]);const r={};for(const s of Object.keys(t)){const i=t[s],a=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=a,o=Ha(a,tn),u=typeof n=="string"?()=>n:n;r[s]=rn(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:u},e?{syntaxPlugin:e}:{},o))}return r}const x=Object.assign({},de(za),de(Ga),de(Qa),de`pipelineOperator`(en));function sn(){return{sourceType:"script",sourceFilename:void 0,startIndex: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 an(t){const e=sn();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(const r of Object.keys(e))t[r]!=null&&(e[r]=t[r]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((t.startColumn==null||t.startIndex==null)&&t.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return e}const{defineProperty:nn}=Object,Xs=(t,e)=>{t&&nn(t,e,{enumerable:!1,value:t[e]})};function Ge(t){return Xs(t.loc.start,"index"),Xs(t.loc.end,"index"),t}var on=t=>class extends t{parse(){const r=Ge(super.parse());return this.optionFlags&128&&(r.tokens=r.tokens.map(Ge)),r}parseRegExpLiteral({pattern:r,flags:s}){let i=null;try{i=new RegExp(r,s)}catch{}const a=this.estreeParseLiteral(i);return a.regex={pattern:r,flags:s},a}parseBigIntLiteral(r){let s;try{s=BigInt(r)}catch{s=null}const i=this.estreeParseLiteral(s);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){const i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){const s=r.value;delete r.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;const i=r;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(r,s){super.initFunction(r,s),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var s;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((s=r.expression.extra)!=null&&s.parenthesized)}parseBlockBody(r,s,i,a,n){super.parseBlockBody(r,s,i,a,n);const o=r.directives.map(u=>this.directiveToStmt(u));r.body=o.concat(r.body),delete r.directives}parsePrivateName(){const r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){const s=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=s,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,s){const i=super.parseLiteral(r,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,s,i=!1){super.parseFunctionBody(r,s,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,s,i,a,n,o,u=!1){let p=this.startNode();p.kind=r.kind,p=super.parseMethod(p,s,i,a,n,o,u),p.type="FunctionExpression",delete p.kind,r.value=p;const{typeParameters:y}=r;return y&&(delete r.typeParameters,p.typeParameters=y,this.resetStartLocationFromNode(p,y)),o==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){const s=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...r){const s=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(r,s,i,a,n){const o=super.parseObjectMethod(r,s,i,a,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(r,s,i,a){const n=super.parseObjectProperty(r,s,i,a);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(r,s,i){return r==="Property"?"value":super.isValidLVal(r,s,i)}isAssignable(r,s){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,s):super.isAssignable(r,s)}toAssignable(r,s=!1){if(r!=null&&this.isObjectProperty(r)){const{key:i,value:a}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(a,s)}else super.toAssignable(r,s)}toAssignableObjectExpressionProp(r,s,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(x.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(x.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,s,i)}finishCallExpression(r,s){const i=super.finishCallExpression(r,s);if(i.callee.type==="Import"){var a,n;i.type="ImportExpression",i.source=i.arguments[0],i.options=(a=i.arguments[1])!=null?a:null,i.attributes=(n=i.arguments[1])!=null?n:null,delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,s){const i=this.state.lastTokStartLoc,a=super.parseExport(r,s);switch(a.type){case"ExportAllDeclaration":a.exported=null;break;case"ExportNamedDeclaration":a.specifiers.length===1&&a.specifiers[0].type==="ExportNamespaceSpecifier"&&(a.type="ExportAllDeclaration",a.exported=a.specifiers[0].exported,delete a.specifiers);case"ExportDefaultDeclaration":{var n;const{declaration:o}=a;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===a.start&&this.resetStartLocation(a,i)}break}return a}parseSubscript(r,s,i,a){const n=super.parseSubscript(r,s,i,a);if(a.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),a.stop){const o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,s,i){return Ge(super.finishNodeAt(r,s,i))}resetStartLocation(r,s){super.resetStartLocation(r,s),Ge(r)}resetEndLocation(r,s=this.state.lastTokEndLoc){super.resetEndLocation(r,s),Ge(r)}};class Qe{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}}const q={brace:new Qe("{"),j_oTag:new Qe("<tag"),j_cTag:new Qe("</tag"),j_expr:new Qe("<tag>...</tag>",!0)};q.template=new Qe("`",!0);const V=!0,w=!0,mr=!0,Ze=!0,Ae=!0,ln=!0;class Js{constructor(e,r={}){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=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}}const Tr=new Map;function X(t,e={}){e.keyword=t;const r=M(t,e);return Tr.set(t,r),r}function ie(t,e){return M(t,{beforeExpr:V,binop:e})}let et=-1;const he=[],Sr=[],xr=[],br=[],Er=[],Pr=[];function M(t,e={}){var r,s,i,a;return++et,Sr.push(t),xr.push((r=e.binop)!=null?r:-1),br.push((s=e.beforeExpr)!=null?s:!1),Er.push((i=e.startsExpr)!=null?i:!1),Pr.push((a=e.prefix)!=null?a:!1),he.push(new Js(t,e)),et}function $(t,e={}){var r,s,i,a;return++et,Tr.set(t,et),Sr.push(t),xr.push((r=e.binop)!=null?r:-1),br.push((s=e.beforeExpr)!=null?s:!1),Er.push((i=e.startsExpr)!=null?i:!1),Pr.push((a=e.prefix)!=null?a:!1),he.push(new Js("name",e)),et}const un={bracketL:M("[",{beforeExpr:V,startsExpr:w}),bracketHashL:M("#[",{beforeExpr:V,startsExpr:w}),bracketBarL:M("[|",{beforeExpr:V,startsExpr:w}),bracketR:M("]"),bracketBarR:M("|]"),braceL:M("{",{beforeExpr:V,startsExpr:w}),braceBarL:M("{|",{beforeExpr:V,startsExpr:w}),braceHashL:M("#{",{beforeExpr:V,startsExpr:w}),braceR:M("}"),braceBarR:M("|}"),parenL:M("(",{beforeExpr:V,startsExpr:w}),parenR:M(")"),comma:M(",",{beforeExpr:V}),semi:M(";",{beforeExpr:V}),colon:M(":",{beforeExpr:V}),doubleColon:M("::",{beforeExpr:V}),dot:M("."),question:M("?",{beforeExpr:V}),questionDot:M("?."),arrow:M("=>",{beforeExpr:V}),template:M("template"),ellipsis:M("...",{beforeExpr:V}),backQuote:M("`",{startsExpr:w}),dollarBraceL:M("${",{beforeExpr:V,startsExpr:w}),templateTail:M("...`",{startsExpr:w}),templateNonTail:M("...${",{beforeExpr:V,startsExpr:w}),at:M("@"),hash:M("#",{startsExpr:w}),interpreterDirective:M("#!..."),eq:M("=",{beforeExpr:V,isAssign:Ze}),assign:M("_=",{beforeExpr:V,isAssign:Ze}),slashAssign:M("_=",{beforeExpr:V,isAssign:Ze}),xorAssign:M("_=",{beforeExpr:V,isAssign:Ze}),moduloAssign:M("_=",{beforeExpr:V,isAssign:Ze}),incDec:M("++/--",{prefix:Ae,postfix:ln,startsExpr:w}),bang:M("!",{beforeExpr:V,prefix:Ae,startsExpr:w}),tilde:M("~",{beforeExpr:V,prefix:Ae,startsExpr:w}),doubleCaret:M("^^",{startsExpr:w}),doubleAt:M("@@",{startsExpr:w}),pipeline:ie("|>",0),nullishCoalescing:ie("??",1),logicalOR:ie("||",1),logicalAND:ie("&&",2),bitwiseOR:ie("|",3),bitwiseXOR:ie("^",4),bitwiseAND:ie("&",5),equality:ie("==/!=/===/!==",6),lt:ie("</>/<=/>=",7),gt:ie("</>/<=/>=",7),relational:ie("</>/<=/>=",7),bitShift:ie("<</>>/>>>",8),bitShiftL:ie("<</>>/>>>",8),bitShiftR:ie("<</>>/>>>",8),plusMin:M("+/-",{beforeExpr:V,binop:9,prefix:Ae,startsExpr:w}),modulo:M("%",{binop:10,startsExpr:w}),star:M("*",{binop:10}),slash:ie("/",10),exponent:M("**",{beforeExpr:V,binop:11,rightAssociative:!0}),_in:X("in",{beforeExpr:V,binop:7}),_instanceof:X("instanceof",{beforeExpr:V,binop:7}),_break:X("break"),_case:X("case",{beforeExpr:V}),_catch:X("catch"),_continue:X("continue"),_debugger:X("debugger"),_default:X("default",{beforeExpr:V}),_else:X("else",{beforeExpr:V}),_finally:X("finally"),_function:X("function",{startsExpr:w}),_if:X("if"),_return:X("return",{beforeExpr:V}),_switch:X("switch"),_throw:X("throw",{beforeExpr:V,prefix:Ae,startsExpr:w}),_try:X("try"),_var:X("var"),_const:X("const"),_with:X("with"),_new:X("new",{beforeExpr:V,startsExpr:w}),_this:X("this",{startsExpr:w}),_super:X("super",{startsExpr:w}),_class:X("class",{startsExpr:w}),_extends:X("extends",{beforeExpr:V}),_export:X("export"),_import:X("import",{startsExpr:w}),_null:X("null",{startsExpr:w}),_true:X("true",{startsExpr:w}),_false:X("false",{startsExpr:w}),_typeof:X("typeof",{beforeExpr:V,prefix:Ae,startsExpr:w}),_void:X("void",{beforeExpr:V,prefix:Ae,startsExpr:w}),_delete:X("delete",{beforeExpr:V,prefix:Ae,startsExpr:w}),_do:X("do",{isLoop:mr,beforeExpr:V}),_for:X("for",{isLoop:mr}),_while:X("while",{isLoop:mr}),_as:$("as",{startsExpr:w}),_assert:$("assert",{startsExpr:w}),_async:$("async",{startsExpr:w}),_await:$("await",{startsExpr:w}),_defer:$("defer",{startsExpr:w}),_from:$("from",{startsExpr:w}),_get:$("get",{startsExpr:w}),_let:$("let",{startsExpr:w}),_meta:$("meta",{startsExpr:w}),_of:$("of",{startsExpr:w}),_sent:$("sent",{startsExpr:w}),_set:$("set",{startsExpr:w}),_source:$("source",{startsExpr:w}),_static:$("static",{startsExpr:w}),_using:$("using",{startsExpr:w}),_yield:$("yield",{startsExpr:w}),_asserts:$("asserts",{startsExpr:w}),_checks:$("checks",{startsExpr:w}),_exports:$("exports",{startsExpr:w}),_global:$("global",{startsExpr:w}),_implements:$("implements",{startsExpr:w}),_intrinsic:$("intrinsic",{startsExpr:w}),_infer:$("infer",{startsExpr:w}),_is:$("is",{startsExpr:w}),_mixins:$("mixins",{startsExpr:w}),_proto:$("proto",{startsExpr:w}),_require:$("require",{startsExpr:w}),_satisfies:$("satisfies",{startsExpr:w}),_keyof:$("keyof",{startsExpr:w}),_readonly:$("readonly",{startsExpr:w}),_unique:$("unique",{startsExpr:w}),_abstract:$("abstract",{startsExpr:w}),_declare:$("declare",{startsExpr:w}),_enum:$("enum",{startsExpr:w}),_module:$("module",{startsExpr:w}),_namespace:$("namespace",{startsExpr:w}),_interface:$("interface",{startsExpr:w}),_type:$("type",{startsExpr:w}),_opaque:$("opaque",{startsExpr:w}),name:M("name",{startsExpr:w}),placeholder:M("%%",{startsExpr:!0}),string:M("string",{startsExpr:w}),num:M("num",{startsExpr:w}),bigint:M("bigint",{startsExpr:w}),decimal:M("decimal",{startsExpr:w}),regexp:M("regexp",{startsExpr:w}),privateName:M("#name",{startsExpr:w}),eof:M("eof"),jsxName:M("jsxName"),jsxText:M("jsxText",{beforeExpr:!0}),jsxTagStart:M("jsxTagStart",{startsExpr:!0}),jsxTagEnd:M("jsxTagEnd")};function W(t){return t>=93&&t<=133}function cn(t){return t<=92}function ue(t){return t>=58&&t<=133}function qs(t){return t>=58&&t<=137}function pn(t){return br[t]}function gr(t){return Er[t]}function fn(t){return t>=29&&t<=33}function Ws(t){return t>=129&&t<=131}function dn(t){return t>=90&&t<=92}function Ar(t){return t>=58&&t<=92}function hn(t){return t>=39&&t<=59}function yn(t){return t===34}function mn(t){return Pr[t]}function Tn(t){return t>=121&&t<=123}function Sn(t){return t>=124&&t<=130}function Ie(t){return Sr[t]}function Pt(t){return xr[t]}function xn(t){return t===57}function gt(t){return t>=24&&t<=25}function ye(t){return he[t]}he[8].updateContext=t=>{t.pop()},he[5].updateContext=he[7].updateContext=he[23].updateContext=t=>{t.push(q.brace)},he[22].updateContext=t=>{t[t.length-1]===q.template?t.pop():t.push(q.template)},he[143].updateContext=t=>{t.push(q.j_expr,q.j_oTag)};let Ir="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Hs="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const bn=new RegExp("["+Ir+"]"),En=new RegExp("["+Ir+Hs+"]");Ir=Hs=null;const zs=[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],Pn=[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 vr(t,e){let r=65536;for(let s=0,i=e.length;s<i;s+=2){if(r+=e[s],r>t)return!1;if(r+=e[s+1],r>=t)return!0}return!1}function me(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&bn.test(String.fromCharCode(t)):vr(t,zs)}function Ke(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&En.test(String.fromCharCode(t)):vr(t,zs)||vr(t,Pn)}const Nr={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"]},gn=new Set(Nr.keyword),An=new Set(Nr.strict),In=new Set(Nr.strictBind);function Gs(t,e){return e&&t==="await"||t==="enum"}function Qs(t,e){return Gs(t,e)||An.has(t)}function Zs(t){return In.has(t)}function ei(t,e){return Qs(t,e)||Zs(t)}function vn(t){return gn.has(t)}function Nn(t,e,r){return t===64&&e===64&&me(r)}const Cn=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 wn(t){return Cn.has(t)}class Cr{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}}class wr{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}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(){const e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Cr(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,s){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,e,r,s);let a=i.names.get(e)||0;r&16?a=a|4:(i.firstLexicalName||(i.firstLexicalName=e),a=a|2),i.names.set(e,a),r&8&&this.maybeExportDefined(i,e)}else if(r&4)for(let a=this.scopeStack.length-1;a>=0&&(i=this.scopeStack[a],this.checkRedeclarationInScope(i,e,r,s),i.names.set(e,(i.names.get(e)||0)|1),this.maybeExportDefined(i,e),!(i.flags&387));--a);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,s,i){this.isRedeclaredInScope(e,r,s)&&this.parser.raise(x.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(e,r,s){if(!(s&1))return!1;if(s&8)return e.names.has(r);const i=e.names.get(r);return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(e)&&(i&1)>0:(i&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(i&4)>0}checkLocalExport(e){const{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:r}=this.scopeStack[e];if(r&387)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:r}=this.scopeStack[e];if(r&451&&!(r&4))return r}}}class On extends Cr{constructor(...e){super(...e),this.declareFunctions=new Set}}class Dn extends wr{createScope(e){return new On(e)}declareName(e,r,s){const i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,e,r,s),this.maybeExportDefined(i,e),i.declareFunctions.add(e);return}super.declareName(e,r,s)}isRedeclaredInScope(e,r,s){if(super.isRedeclaredInScope(e,r,s))return!0;if(s&2048&&!e.declareFunctions.has(r)){const i=e.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}class Ln{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{const[r,s]=e;if(!this.hasPlugin(r))return!1;const i=this.plugins.get(r);for(const a of Object.keys(s))if((i==null?void 0:i[a])!==s[a])return!1;return!0}}getPluginOption(e,r){var s;return(s=this.plugins.get(e))==null?void 0:s[r]}}function ti(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function kn(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function tt(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function Oe(t,e,r){let s=null,i=e.length;for(;s===null&&i>0;)s=e[--i];s===null||s.start>r.start?tt(t,r.comments):ti(s,r.comments)}class Mn extends Ln{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:r}=this.state,s=r.length;if(s===0)return;let i=s-1;const a=r[i];a.start===e.end&&(a.leadingNode=e,i--);const{start:n}=e;for(;i>=0;i--){const o=r[i],u=o.end;if(u>n)o.containingNode=e,this.finalizeComment(o),r.splice(i,1);else{u===n&&(o.trailingNode=e);break}}}finalizeComment(e){const{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&ti(e.leadingNode,r),e.trailingNode!==null&&kn(e.trailingNode,r);else{const{containingNode:s,start:i}=e;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Oe(s,s.properties,e);break;case"CallExpression":case"OptionalCallExpression":Oe(s,s.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Oe(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Oe(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Oe(s,s.specifiers,e);break;case"TSEnumDeclaration":Oe(s,s.members,e);break;case"TSEnumBody":Oe(s,s.members,e);break;default:tt(s,r)}else tt(s,r)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:r}=this.state,{length:s}=r;if(s===0)return;const i=r[s-1];i.leadingNode===e&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){const{commentStack:r}=this.state,{length:s}=r;s!==0&&(r[s-1].trailingNode===e?r[s-1].trailingNode=null:s>=2&&r[s-2].trailingNode===e&&(r[s-2].trailingNode=null))}takeSurroundingComments(e,r,s){const{commentStack:i}=this.state,a=i.length;if(a===0)return;let n=a-1;for(;n>=0;n--){const o=i[n],u=o.end;if(o.start===s)o.leadingNode=e;else if(u===r)o.trailingNode=e;else if(u<r)break}}}const _n=/\r\n|[\r\n\u2028\u2029]/,At=new RegExp(_n.source,"g");function Ue(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function ri(t,e,r){for(let s=e;s<r;s++)if(Ue(t.charCodeAt(s)))return!0;return!1}const Or=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Dr=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Bn(t){switch(t){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}}class Lr{constructor(){this.flags=1024,this.startIndex=void 0,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=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[q.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:r,startIndex:s,startLine:i,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.startIndex=s,this.curLine=i,this.lineStart=-a,this.startLoc=this.endLoc=new ge(i,a,s)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new ge(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const e=new Lr;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}}var Fn=function(e){return e>=48&&e<=57};const si={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},It={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function ii(t,e,r,s,i,a){const n=r,o=s,u=i;let p="",y=null,E=r;const{length:P}=e;for(;;){if(r>=P){a.unterminated(n,o,u),p+=e.slice(E,r);break}const g=e.charCodeAt(r);if(Rn(t,g,e,r)){p+=e.slice(E,r);break}if(g===92){p+=e.slice(E,r);const C=jn(e,r,s,i,t==="template",a);C.ch===null&&!y?y={pos:r,lineStart:s,curLine:i}:p+=C.ch,{pos:r,lineStart:s,curLine:i}=C,E=r}else g===8232||g===8233?(++r,++i,s=r):g===10||g===13?t==="template"?(p+=e.slice(E,r)+`
|
|
165
|
-
`,++r,g===13&&e.charCodeAt(r)===10&&++r,++i,E=s=r):a.unterminated(n,o,u):++r}return{pos:r,str:p,firstInvalidLoc:y,lineStart:s,curLine:i,containsInvalid:!!y}}function
|
|
166
|
-
`);case 114:return o("\r");case 120:{let p;return{code:p,pos:e}=kr(t,e,r,s,2,!1,n,a),o(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:e}=ni(t,e,r,s,n,a),o(p===null?null:String.fromCodePoint(p))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);a.strictNumericEscape(e-1,r,s);default:if(u>=48&&u<=55){const p=e-1;let E=/^[0-7]+/.exec(t.slice(p,e+2))[0],P=parseInt(E,8);P>255&&(E=E.slice(0,-1),P=parseInt(E,8)),e+=E.length-1;const g=t.charCodeAt(e);if(E!=="0"||g===56||g===57){if(i)return o(null);a.strictNumericEscape(p,r,s)}return o(String.fromCharCode(P))}return o(String.fromCharCode(u))}}function kr(t,e,r,s,i,a,n,o){const u=e;let p;return{n:p,pos:e}=ai(t,e,r,s,16,i,a,!1,o,!n),p===null&&(n?o.invalidEscapeSequence(u,r,s):e=u-1),{code:p,pos:e}}function ai(t,e,r,s,i,a,n,o,u,p){const y=e,E=i===16?si.hex:si.decBinOct,P=i===16?It.hex:i===10?It.dec:i===8?It.oct:It.bin;let g=!1,C=0;for(let A=0,O=a??1/0;A<O;++A){const I=t.charCodeAt(e);let N;if(I===95&&o!=="bail"){const B=t.charCodeAt(e-1),K=t.charCodeAt(e+1);if(o){if(Number.isNaN(K)||!P(K)||E.has(B)||E.has(K)){if(p)return{n:null,pos:e};u.unexpectedNumericSeparator(e,r,s)}}else{if(p)return{n:null,pos:e};u.numericSeparatorInEscapeSequence(e,r,s)}++e;continue}if(I>=97?N=I-97+10:I>=65?N=I-65+10:Fn(I)?N=I-48:N=1/0,N>=i){if(N<=9&&p)return{n:null,pos:e};if(N<=9&&u.invalidDigit(e,r,s,i))N=0;else if(n)N=0,g=!0;else break}++e,C=C*i+N}return e===y||a!=null&&e-y!==a||g?{n:null,pos:e}:{n:C,pos:e}}function ni(t,e,r,s,i,a){const n=t.charCodeAt(e);let o;if(n===123){if(++e,{code:o,pos:e}=kr(t,e,r,s,t.indexOf("}",e)-e,!0,i,a),++e,o!==null&&o>1114111)if(i)a.invalidCodePoint(e,r,s);else return{code:null,pos:e}}else({code:o,pos:e}=kr(t,e,r,s,4,!1,i,a));return{code:o,pos:e}}function rt(t,e,r){return new ge(r,t-e,t)}const Kn=new Set([103,109,115,105,121,117,100,118]);class ve{constructor(e){const r=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=r+e.start,this.end=r+e.end,this.loc=new bt(e.startLoc,e.endLoc)}}class Un extends Mn{constructor(e,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,a,n)=>this.optionFlags&1024?(this.raise(x.InvalidDigit,rt(s,i,a),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(x.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(x.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(x.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(x.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,a)=>{this.recordStrictModeErrors(x.StrictNumericEscape,rt(s,i,a))},unterminated:(s,i,a)=>{throw this.raise(x.UnterminatedString,rt(s-1,i,a))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(x.StrictNumericEscape),unterminated:(s,i,a)=>{throw this.raise(x.UnterminatedTemplate,rt(s,i,a))}}),this.state=new Lr,this.state.init(e),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&128&&this.pushToken(new ve(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const r=this.state;return this.state=e,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Or.lastIndex=e,Or.test(this.input)?Or.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Dr.lastIndex=e,Dr.test(this.input)?Dr.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let r=this.input.charCodeAt(e);if((r&64512)===55296&&++e<this.input.length){const s=this.input.charCodeAt(e);(s&64512)===56320&&(r=65536+((r&1023)<<10)+(s&1023))}return r}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([r,s])=>this.raise(r,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(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let r;this.isLookahead||(r=this.state.curPosition());const s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(x.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,At.lastIndex=s+2;At.test(this.input)&&At.lastIndex<=i;)++this.state.curLine,this.state.lineStart=At.lastIndex;if(this.isLookahead)return;const a={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+e.length),loc:new bt(r,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(a),a}skipLineComment(e){const r=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ue(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const a=this.state.pos,o={type:"CommentLine",value:this.input.slice(r+e,a),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(a),loc:new bt(s,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(o),o}skipSpace(){const e=this.state.pos,r=this.optionFlags&2048?[]:null;e:for(;this.state.pos<this.length;){const 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:{const i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),r==null||r.push(i));break}case 47:{const i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),r==null||r.push(i));break}default:break e}break;default:if(Bn(s))++this.state.pos;else if(s===45&&!this.inModule&&this.optionFlags&4096){const i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(e===0||this.state.lineStart>e)){const a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),r==null||r.push(a))}else break e}else if(s===60&&!this.inModule&&this.optionFlags&4096){const i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){const a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),r==null||r.push(a))}else break e}else break e}}if((r==null?void 0:r.length)>0){const s=this.state.pos,i={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(s),comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(e,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=e,this.state.value=r,this.isLookahead||this.updateContext(s)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const e=this.state.pos+1,r=this.codePointAtPos(e);if(r>=48&&r<=57)throw this.raise(x.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?x.RecordExpressionHashIncorrectStartSyntaxType:x.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else me(r)?(++this.state.pos,this.finishToken(139,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===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 e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;const r=this.state.pos;for(this.state.pos+=1;!Ue(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const s=this.input.slice(r+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(e){let r=e===42?55:54,s=1,i=this.input.charCodeAt(this.state.pos+1);e===42&&i===42&&(s++,i=this.input.charCodeAt(this.state.pos+2),r=57),i===61&&!this.state.inType&&(s++,r=e===37?33:30),this.finishOp(r,s)}readToken_pipe_amp(e){const r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(x.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(x.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===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(e){const r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){const{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){const{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===62){const s=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+s)===61){this.finishOp(30,s+1);return}this.finishOp(52,s);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){const r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);e===63?r===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){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(x.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(x.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:{const r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===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(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);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(e)){this.readWord(e);return}}throw this.raise(x.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,r){const s=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(e,s)}readRegexp(){const e=this.state.startLoc,r=this.state.start+1;let s,i,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(x.UnterminatedRegExp,se(e,1));const p=this.input.charCodeAt(a);if(Ue(p))throw this.raise(x.UnterminatedRegExp,se(e,1));if(s)s=!1;else{if(p===91)i=!0;else if(p===93&&i)i=!1;else if(p===47&&!i)break;s=p===92}}const n=this.input.slice(r,a);++a;let o="";const u=()=>se(e,a+2-r);for(;a<this.length;){const p=this.codePointAtPos(a),y=String.fromCharCode(p);if(Kn.has(p))p===118?o.includes("u")&&this.raise(x.IncompatibleRegExpUVFlags,u()):p===117&&o.includes("v")&&this.raise(x.IncompatibleRegExpUVFlags,u()),o.includes(y)&&this.raise(x.DuplicateRegExpFlags,u());else if(Ke(p)||p===92)this.raise(x.MalformedRegExpFlags,u());else break;++a,o+=y}this.state.pos=a,this.finishToken(138,{pattern:n,flags:o})}readInt(e,r,s=!1,i=!0){const{n:a,pos:n}=ai(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,r,s,i,this.errorHandlers_readInt,!1);return this.state.pos=n,a}readRadixNumber(e){const r=this.state.pos,s=this.state.curPosition();let i=!1;this.state.pos+=2;const a=this.readInt(e);a==null&&this.raise(x.InvalidDigit,se(s,2),{radix:e});const n=this.input.charCodeAt(this.state.pos);if(n===110)++this.state.pos,i=!0;else if(n===109)throw this.raise(x.InvalidDecimal,s);if(me(this.codePointAtPos(this.state.pos)))throw this.raise(x.NumberIdentifier,this.state.curPosition());if(i){const o=this.input.slice(r,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,a)}readNumber(e){const r=this.state.pos,s=this.state.curPosition();let i=!1,a=!1,n=!1,o=!1;!e&&this.readInt(10)===null&&this.raise(x.InvalidNumber,this.state.curPosition());const u=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(u){const g=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(x.StrictOctalLiteral,s),!this.state.strict){const C=g.indexOf("_");C>0&&this.raise(x.ZeroDigitNumericSeparator,se(s,C))}o=u&&!/[89]/.test(g)}let p=this.input.charCodeAt(this.state.pos);if(p===46&&!o&&(++this.state.pos,this.readInt(10),i=!0,p=this.input.charCodeAt(this.state.pos)),(p===69||p===101)&&!o&&(p=this.input.charCodeAt(++this.state.pos),(p===43||p===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(x.InvalidOrMissingExponent,s),i=!0,n=!0,p=this.input.charCodeAt(this.state.pos)),p===110&&((i||u)&&this.raise(x.InvalidBigIntLiteral,s),++this.state.pos,a=!0),p===109){this.expectPlugin("decimal",this.state.curPosition()),(n||u)&&this.raise(x.InvalidDecimal,s),++this.state.pos;var y=!0}if(me(this.codePointAtPos(this.state.pos)))throw this.raise(x.NumberIdentifier,this.state.curPosition());const E=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(a){this.finishToken(136,E);return}if(y){this.finishToken(137,E);return}const P=o?parseInt(E,8):parseFloat(E);this.finishToken(135,P)}readCodePoint(e){const{code:r,pos:s}=ni(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=s,r}readString(e){const{str:r,pos:s,curLine:i,lineStart:a}=ii(e===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=a,this.state.curLine=i,this.finishToken(134,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:r,firstInvalidLoc:s,pos:i,curLine:a,lineStart:n}=ii("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=a,s&&(this.state.firstInvalidTemplateEscapePos=new ge(s.curLine,s.pos-s.lineStart,this.sourceToOffsetPos(s.pos))),this.input.codePointAt(i)===96?this.finishToken(24,s?null:e+r+"`"):(this.state.pos++,this.finishToken(25,s?null:e+r+"${"))}recordStrictModeErrors(e,r){const s=r.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,r):this.state.strictErrors.set(s,[e,r])}readWord1(e){this.state.containsEsc=!1;let r="";const s=this.state.pos;let i=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const a=this.codePointAtPos(this.state.pos);if(Ke(a))this.state.pos+=a<=65535?1:2;else if(a===92){this.state.containsEsc=!0,r+=this.input.slice(i,this.state.pos);const n=this.state.curPosition(),o=this.state.pos===s?me:Ke;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(x.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;const u=this.readCodePoint(!0);u!==null&&(o(u)||this.raise(x.EscapedCharNotAnIdentifier,n),r+=String.fromCodePoint(u)),i=this.state.pos}else break}return r+this.input.slice(i,this.state.pos)}readWord(e){const r=this.readWord1(e),s=Tr.get(r);s!==void 0?this.finishToken(s,Ie(s)):this.finishToken(132,r)}checkKeywordEscapes(){const{type:e}=this.state;Ar(e)&&this.state.containsEsc&&this.raise(x.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Ie(e)})}raise(e,r,s={}){const i=r instanceof ge?r:r.loc.start,a=e(i,s);if(!(this.optionFlags&1024))throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,r,s={}){const i=r instanceof ge?r:r.loc.start,a=i.index,n=this.state.errors;for(let o=n.length-1;o>=0;o--){const u=n[o];if(u.loc.index===a)return n[o]=e(i,s);if(u.loc.index<a)break}return this.raise(e,r,s)}updateContext(e){}unexpected(e,r){throw this.raise(x.UnexpectedToken,e??this.state.startLoc,{expected:r?Ie(r):null})}expectPlugin(e,r){if(this.hasPlugin(e))return!0;throw this.raise(x.MissingPlugin,r??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(r=>this.hasPlugin(r)))throw this.raise(x.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(r,s,i)=>{this.raise(e,rt(r,s,i))}}}class Vn{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class $n{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Vn)}exit(){const e=this.stack.pop(),r=this.current();for(const[s,i]of Array.from(e.undefinedPrivateNames))r?r.undefinedPrivateNames.has(s)||r.undefinedPrivateNames.set(s,i):this.parser.raise(x.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(e,r,s){const{privateNames:i,loneAccessors:a,undefinedPrivateNames:n}=this.current();let o=i.has(e);if(r&3){const u=o&&a.get(e);if(u){const p=u&4,y=r&4,E=u&3,P=r&3;o=E===P||p!==y,o||a.delete(e)}else o||a.set(e,r)}o&&this.parser.raise(x.PrivateNameRedeclaration,s,{identifierName:e}),i.add(e),n.delete(e)}usePrivateName(e,r){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,r):this.parser.raise(x.InvalidPrivateFieldResolution,r,{identifierName:e})}}class vt{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class oi extends vt{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,r){const s=r.index;this.declarationErrors.set(s,[e,r])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class Yn{constructor(e){this.parser=void 0,this.stack=[new vt],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,r){const s=r.loc.start,{stack:i}=this;let a=i.length-1,n=i[a];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(e,s);else return;n=i[--a]}this.parser.raise(e,s)}recordArrowParameterBindingError(e,r){const{stack:s}=this,i=s[s.length-1],a=r.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(e,a);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,a);else return}recordAsyncArrowParametersError(e){const{stack:r}=this;let s=r.length-1,i=r[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(x.AwaitBindingIdentifier,e),i=r[--s]}validateAsPattern(){const{stack:e}=this,r=e[e.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([s,i])=>{this.parser.raise(s,i);let a=e.length-2,n=e[a];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=e[--a]})}}function Xn(){return new vt(3)}function Jn(){return new oi(1)}function qn(){return new oi(2)}function li(){return new vt}class Wn{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}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 Nt(t,e){return(t?2:0)|(e?1:0)}class Hn extends Un{addExtra(e,r,s,i=!0){if(!e)return;let{extra:a}=e;a==null&&(a={},e.extra=a),i?a[r]=s:Object.defineProperty(a,r,{enumerable:i,value:s})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,r){const s=e+r.length;if(this.input.slice(e,s)===r){const i=this.input.charCodeAt(s);return!(Ke(i)||(i&64512)===55296)}return!1}isLookaheadContextual(e){const r=this.nextTokenStart();return this.isUnparsedContextual(r,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,r){if(!this.eatContextual(e)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return ri(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return ri(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(x.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,r){this.eat(e)||this.unexpected(r,e)}tryParse(e,r=this.state.clone()){const s={node:null};try{const i=e((a=null)=>{throw s.node=a,s});if(this.state.errors.length>r.errors.length){const a=this.state;return this.state=r,this.state.tokensLength=a.tokensLength,{node:i,error:a.errors[r.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){const a=this.state;if(this.state=r,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:a};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:a};throw i}}checkExpressionErrors(e,r){if(!e)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:a,optionalParametersLoc:n}=e,o=!!s||!!i||!!n||!!a;if(!r)return o;s!=null&&this.raise(x.InvalidCoverInitializedName,s),i!=null&&this.raise(x.DuplicateProto,i),a!=null&&this.raise(x.UnexpectedPrivateField,a),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return qs(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){const r=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=e;const a=this.scope,n=this.getScopeHandler();this.scope=new n(this,e);const o=this.prodParam;this.prodParam=new Wn;const u=this.classScope;this.classScope=new $n(this);const p=this.expressionScope;return this.expressionScope=new Yn(this),()=>{this.state.labels=r,this.exportedIdentifiers=s,this.inModule=i,this.scope=a,this.prodParam=o,this.classScope=u,this.expressionScope=p}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){const{privateKeyLoc:r}=e;r!==null&&this.expectPlugin("destructuringPrivate",r)}}class Ct{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class wt{constructor(e,r,s){this.type="",this.start=r,this.end=0,this.loc=new bt(s),(e==null?void 0:e.optionFlags)&64&&(this.range=[r,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}}const Mr=wt.prototype;Mr.__clone=function(){const t=new wt(void 0,this.start,this.loc.start),e=Object.keys(this);for(let r=0,s=e.length;r<s;r++){const i=e[r];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(t[i]=this[i])}return t};function zn(t){return Te(t)}function Te(t){const{type:e,start:r,end:s,loc:i,range:a,extra:n,name:o}=t,u=Object.create(Mr);return u.type=e,u.start=r,u.end=s,u.loc=i,u.range=a,u.extra=n,u.name=o,e==="Placeholder"&&(u.expectedNode=t.expectedNode),u}function Gn(t){const{type:e,start:r,end:s,loc:i,range:a,extra:n}=t;if(e==="Placeholder")return zn(t);const o=Object.create(Mr);return o.type=e,o.start=r,o.end=s,o.loc=i,o.range=a,t.raw!==void 0?o.raw=t.raw:o.extra=n,o.value=t.value,o}class Qn extends Hn{startNode(){const e=this.state.startLoc;return new wt(this,e.index,e)}startNodeAt(e){return new wt(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,r){return this.finishNodeAt(e,r,this.state.lastTokEndLoc)}finishNodeAt(e,r,s){return e.type=r,e.end=s.index,e.loc.end=s,this.optionFlags&64&&(e.range[1]=s.index),this.optionFlags&2048&&this.processComment(e),e}resetStartLocation(e,r){e.start=r.index,e.loc.start=r,this.optionFlags&64&&(e.range[0]=r.index)}resetEndLocation(e,r=this.state.lastTokEndLoc){e.end=r.index,e.loc.end=r,this.optionFlags&64&&(e.range[1]=r.index)}resetStartLocationFromNode(e,r){this.resetStartLocation(e,r.loc.start)}}const Zn=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),_=de`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:t})=>`Cannot overwrite reserved type ${t}.`,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:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:r})=>`Enum \`${t}\` has type \`${r}\`, so the initializer of \`${e}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${r}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,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:t})=>`Unexpected reserved type ${t}.`,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:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function eo(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function ui(t){return t.importKind==="type"||t.importKind==="typeof"}const to={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ro(t,e){const r=[],s=[];for(let i=0;i<t.length;i++)(e(t[i],i,t)?r:s).push(t[i]);return[r,s]}const so=/\*?\s*@((?:no)?flow)\b/;var io=t=>class extends t{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return Dn}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(r,s){r!==134&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,s)}addComment(r){if(this.flowPragma===void 0){const s=so.exec(r.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(r)}flowParseTypeInitialiser(r){const s=this.state.inType;this.state.inType=!0,this.expect(r||14);const i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){const r=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(_.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const r=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=r,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=r,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();const s=r.id=this.parseIdentifier(),i=this.startNode(),a=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);const n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),a.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(a,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,s){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(s&&this.raise(_.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,s);this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(134)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();const s=r.body=this.startNode(),i=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(_.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,_.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let a=null,n=!1;return i.forEach(o=>{eo(o)?(a==="CommonJS"&&this.raise(_.AmbiguousDeclareModuleKind,o),a="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(_.DuplicateDeclareModuleExports,o),a==="ES"&&this.raise(_.AmbiguousDeclareModuleKind,o),a="CommonJS",n=!0)}),r.kind=a||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){const i=this.state.value;throw this.raise(_.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:to[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"&&(r.type="ExportDeclaration",r.default=!1,delete r.exportKind),r.type="Declare"+r.type,r;this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();const s=this.flowParseTypeAlias(r);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(r){this.next();const s=this.flowParseOpaqueType(r,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,s){if(r.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(r.id.name,s?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){const r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(_.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,s,i){Zn.has(r)&&this.raise(i?_.AssignReservedType:_.UnexpectedReservedType,s,{reservedType:r})}flowParseRestrictedIdentifier(r,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,s){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,s||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){const s=this.state.startLoc,i=this.startNode(),a=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=a,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):r&&this.raise(_.MissingTypeParamDefault,s),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){const r=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let i=!1;do{const a=this.flowParseTypeParameter(i);s.params.push(a),a.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(s,"TypeParameterDeclaration")}flowInTopLevelContext(r){if(this.curContext()!==q.brace){const s=this.state.context;this.state.context=[s[0]];try{return r()}finally{this.state.context=s}}else return r()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const r=this.startNode(),s=this.state.inType;return this.state.inType=!0,r.params=[],this.flowInTopLevelContext(()=>{this.expect(47);const i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=i}),this.state.inType=s,!this.state.inType&&this.curContext()===q.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;const r=this.startNode(),s=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){const r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,s,i){return r.static=s,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=i,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,s){return r.static=s,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,s){const i=this.startNode();return r.static=s,r.value=this.flowParseObjectTypeMethodish(i),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:s,allowSpread:i,allowProto:a,allowInexact:n}){const o=this.state.inType;this.state.inType=!0;const u=this.startNode();u.callProperties=[],u.properties=[],u.indexers=[],u.internalSlots=[];let p,y,E=!1;for(s&&this.match(6)?(this.expect(6),p=9,y=!0):(this.expect(5),p=8,y=!1),u.exact=y;!this.match(p);){let g=!1,C=null,A=null;const O=this.startNode();if(a&&this.isContextual(118)){const N=this.lookahead();N.type!==14&&N.type!==17&&(this.next(),C=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){const N=this.lookahead();N.type!==14&&N.type!==17&&(this.next(),g=!0)}const I=this.flowParseVariance();if(this.eat(0))C!=null&&this.unexpected(C),this.eat(0)?(I&&this.unexpected(I.loc.start),u.internalSlots.push(this.flowParseObjectTypeInternalSlot(O,g))):u.indexers.push(this.flowParseObjectTypeIndexer(O,g,I));else if(this.match(10)||this.match(47))C!=null&&this.unexpected(C),I&&this.unexpected(I.loc.start),u.callProperties.push(this.flowParseObjectTypeCallProperty(O,g));else{let N="init";if(this.isContextual(99)||this.isContextual(104)){const K=this.lookahead();qs(K.type)&&(N=this.state.value,this.next())}const B=this.flowParseObjectTypeProperty(O,g,C,I,N,i,n??!y);B===null?(E=!0,A=this.state.lastTokStartLoc):u.properties.push(B)}this.flowObjectTypeSemicolon(),A&&!this.match(8)&&!this.match(9)&&this.raise(_.UnexpectedExplicitInexactInObject,A)}this.expect(p),i&&(u.inexact=E);const P=this.finishNode(u,"ObjectTypeAnnotation");return this.state.inType=o,P}flowParseObjectTypeProperty(r,s,i,a,n,o,u){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?u||this.raise(_.InexactInsideExact,this.state.lastTokStartLoc):this.raise(_.InexactInsideNonObject,this.state.lastTokStartLoc),a&&this.raise(_.InexactVariance,a),null):(o||this.raise(_.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),a&&this.raise(_.SpreadVariance,a),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=s,r.proto=i!=null,r.kind=n;let p=!1;return this.match(47)||this.match(10)?(r.method=!0,i!=null&&this.unexpected(i),a&&this.unexpected(a.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(r),!o&&r.key.name==="constructor"&&r.value.this&&this.raise(_.ThisParamBannedInConstructor,r.value.this)):(n!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(p=!0),r.value=this.flowParseTypeInitialiser(),r.variance=a),r.optional=p,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){const s=r.kind==="get"?0:1,i=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?_.GetterMayNotHaveThisParam:_.SetterMayNotHaveThisParam,r.value.this),i!==s&&this.raise(r.kind==="get"?x.BadGetterArity:x.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(x.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,s){var i;(i=r)!=null||(r=this.state.startLoc);let a=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const n=this.startNodeAt(r);n.qualification=a,n.id=this.flowParseRestrictedIdentifier(!0),a=this.finishNode(n,"QualifiedTypeIdentifier")}return a}flowParseGenericType(r,s){const i=this.startNodeAt(r);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(r,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){const r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){const r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let s=null,i=!1,a=null;const n=this.startNode(),o=this.lookahead(),u=this.state.type===78;return o.type===14||o.type===17?(u&&!r&&this.raise(_.ThisParamMustBeFirst,n),s=this.parseIdentifier(u),this.eat(17)&&(i=!0,u&&this.raise(_.ThisParamMayNotBeOptional,n)),a=this.flowParseTypeInitialiser()):a=this.flowParseType(),n.name=s,n.optional=i,n.typeAnnotation=a,this.finishNode(n,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){const s=this.startNodeAt(r.loc.start);return s.name=null,s.optional=!1,s.typeAnnotation=r,this.finishNode(s,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let s=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:r,rest:s,_this:i}}flowIdentToTypeAnnotation(r,s,i){switch(i.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(i.name),this.flowParseGenericType(r,i)}}flowParsePrimaryType(){const r=this.state.startLoc,s=this.startNode();let i,a,n=!1;const 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,a=this.flowParseTupleType(),this.state.noAnonFunctionType=o,a;case 47:{const u=this.startNode();return u.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),u.params=i.params,u.rest=i.rest,u.this=i._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),this.finishNode(u,"FunctionTypeAnnotation")}case 10:{const u=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(W(this.state.type)||this.match(78)){const p=this.lookahead().type;n=p!==17&&p!==14}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,a=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),a;this.eat(12)}return a?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(a)]):i=this.flowParseFunctionTypeParams(),u.params=i.params,u.rest=i.rest,u.this=i._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),u.typeParameters=null,this.finishNode(u,"FunctionTypeAnnotation")}case 134: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(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(_.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136: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(Ar(this.state.type)){const u=Ie(this.state.type);return this.next(),super.createIdentifier(s,u)}else if(W(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,s,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const r=this.state.startLoc;let s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const a=this.startNodeAt(r),n=this.eat(18);i=i||n,this.expect(0),!n&&this.match(3)?(a.elementType=s,this.next(),s=this.finishNode(a,"ArrayTypeAnnotation")):(a.objectType=s,a.indexType=this.flowParseType(),this.expect(3),i?(a.optional=n,s=this.finishNode(a,"OptionalIndexedAccessType")):s=this.finishNode(a,"IndexedAccessType"))}return s}flowParsePrefixType(){const r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const s=this.startNodeAt(r.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(r)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){const r=this.startNode();this.eat(45);const s=this.flowParseAnonFunctionWithoutParens();for(r.types=[s];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?s:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){const r=this.startNode();this.eat(43);const s=this.flowParseIntersectionType();for(r.types=[s];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?s:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){const r=this.state.inType;this.state.inType=!0;const s=this.flowParseUnionType();return this.state.inType=r,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){const r=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(r,s)}else return this.flowParseType()}flowParseTypeAnnotation(){const r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){const s=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),s}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,s,i=!1){if(s){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,i));return}super.parseFunctionBody(r,!1,i)}parseFunctionBodyAndFinish(r,s,i=!1){if(this.match(14)){const a=this.startNode();[a.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,s,i)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){const i=this.lookahead();if(ue(i.type)){const a=this.startNode();return this.next(),this.flowParseInterface(a)}}else if(this.isContextual(126)){const i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}const s=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(r,s,i){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(r)}else if(W(this.state.type)){if(s.name==="interface")return this.flowParseInterface(r);if(s.name==="type")return this.flowParseTypeAlias(r);if(s.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,s,i)}shouldParseExportDeclaration(){const{type:r}=this.state;return r===126||Ws(r)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:r}=this.state;return r===126||Ws(r)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,s,i){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){const P=this.lookaheadCharCode();if(P===44||P===61||P===58||P===41)return this.setOptionalParametersError(i),r}this.expect(17);const a=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s);let{consequent:u,failed:p}=this.tryParseConditionalConsequent(),[y,E]=this.getArrowLikeExpressions(u);if(p||E.length>0){const P=[...n];if(E.length>0){this.state=a,this.state.noArrowAt=P;for(let g=0;g<E.length;g++)P.push(E[g].start);({consequent:u,failed:p}=this.tryParseConditionalConsequent()),[y,E]=this.getArrowLikeExpressions(u)}p&&y.length>1&&this.raise(_.AmbiguousConditionalArrow,a.startLoc),p&&y.length===1&&(this.state=a,P.push(y[0].start),this.state.noArrowAt=P,{consequent:u,failed:p}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(u,!0),this.state.noArrowAt=n,this.expect(14),o.test=r,o.consequent=u,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const r=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:s}}getArrowLikeExpressions(r,s){const i=[r],a=[];for(;i.length!==0;){const n=i.pop();n.type==="ArrowFunctionExpression"&&n.body.type!=="BlockStatement"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):a.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(a.forEach(n=>this.finishArrowValidation(n)),[a,[]]):ro(a,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(r){var s;this.toAssignableList(r.params,(s=r.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,s){let i;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(r,s){const i=super.parseParenItem(r,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){const a=this.startNodeAt(s);return a.expression=i,a.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(a,"TypeCastExpression")}return i}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";const s=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){r.exportKind="type";const s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){r.exportKind="type";const s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.isContextual(126)){r.exportKind="value";const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){const{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(r);return i&&r.exportKind==="type"&&this.unexpected(s),i}parseClassId(r,s,i){super.parseClassId(r,s,i),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,s,i){const{startLoc:a}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,s))return;s.declare=!0}super.parseClassMember(r,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(_.DeclareClassElement,a):s.value&&this.raise(_.DeclareClassFieldInitializer,s.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){const r=super.readWord1(),s="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(x.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(r){const s=this.input.charCodeAt(this.state.pos+1);r===123&&s===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?s===46?this.finishOp(18,2):this.finishOp(17,1):Nn(r,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,s){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,s):super.isAssignable(r,s)}toAssignable(r,s=!1){!s&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,s)}toAssignableList(r,s,i){for(let a=0;a<r.length;a++){const n=r[a];(n==null?void 0:n.type)==="TypeCastExpression"&&(r[a]=this.typeCastToParameter(n))}super.toAssignableList(r,s,i)}toReferencedList(r,s){for(let a=0;a<r.length;a++){var i;const n=r[a];n&&n.type==="TypeCastExpression"&&!((i=n.extra)!=null&&i.parenthesized)&&(r.length>1||!s)&&this.raise(_.TypeCastInPattern,n.typeAnnotation)}return r}parseArrayLike(r,s,i,a){const n=super.parseArrayLike(r,s,i,a);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(r,s,i){return r==="TypeCastExpression"||super.isValidLVal(r,s,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,s,i,a,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,s,i,a,n,o),s.params&&n){const u=s.params;u.length>0&&this.isThisParam(u[0])&&this.raise(_.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&n&&s.value.params){const u=s.value.params;u.length>0&&this.isThisParam(u[0])&&this.raise(_.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(r,s,i,a){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,s,i,a)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const s=r.implements=[];do{const i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);const s=this.getObjectOrClassMethodParams(r);if(s.length>0){const i=s[0];this.isThisParam(i)&&r.kind==="get"?this.raise(_.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(_.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,s,i,a,n,o,u){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let p;this.match(47)&&!o&&(p=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const y=super.parseObjPropValue(r,s,i,a,n,o,u);return p&&((y.value||y).typeParameters=p),y}parseFunctionParamType(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(_.PatternIsOptional,r),this.isThisParam(r)&&this.raise(_.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(_.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(_.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,s){const i=super.parseMaybeDefault(r,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(_.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(_.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,s,i){s.local=ui(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(s,i))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;const s=this.lookaheadCharCode();return s===123||s===42}return!r&&this.isContextual(87)}applyImportPhase(r,s,i,a){if(super.applyImportPhase(r,s,i,a),s){if(!i&&this.match(65))return;r.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),r.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(r,s,i,a,n){const o=r.imported;let u=null;o.type==="Identifier"&&(o.name==="type"?u="type":o.name==="typeof"&&(u="typeof"));let p=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const E=this.parseIdentifier(!0);u!==null&&!ue(this.state.type)?(r.imported=E,r.importKind=u,r.local=Te(E)):(r.imported=o,r.importKind=null,r.local=this.parseIdentifier())}else{if(u!==null&&ue(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=u;else{if(s)throw this.raise(x.ImportBindingIsString,r,{importName:o.value});r.imported=o,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(p=!0,r.local=Te(r.imported))}const y=ui(r);return i&&y&&this.raise(_.ImportTypeShorthandOnlyInPureImport,r),(i||y)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),p&&!i&&!y&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,s){const i=r.kind;i!=="get"&&i!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,s)}parseVarId(r,s){super.parseVarId(r,s),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,s){if(this.match(14)){const i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(r,s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,s){var i;let a=null,n;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(a=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(r,s),a),!n.error)return n.node;const{context:p}=this.state,y=p[p.length-1];(y===q.j_oTag||y===q.j_expr)&&p.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,u;a=a||this.state.clone();let p;const y=this.tryParse(P=>{var g;p=this.flowParseTypeParameterDeclaration();const C=this.forwardNoArrowParamsConversionAt(p,()=>{const O=super.parseMaybeAssign(r,s);return this.resetStartLocationFromNode(O,p),O});(g=C.extra)!=null&&g.parenthesized&&P();const A=this.maybeUnwrapTypeCastExpression(C);return A.type!=="ArrowFunctionExpression"&&P(),A.typeParameters=p,this.resetStartLocationFromNode(A,p),C},a);let E=null;if(y.node&&this.maybeUnwrapTypeCastExpression(y.node).type==="ArrowFunctionExpression"){if(!y.error&&!y.aborted)return y.node.async&&this.raise(_.UnexpectedTypeParameterBeforeAsyncArrowFunction,p),y.node;E=y.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(E)return this.state=y.failState,E;throw(u=n)!=null&&u.thrown?n.error:y.thrown?y.error:this.raise(_.UnexpectedTokenAfterTypeParameter,p)}return super.parseMaybeAssign(r,s)}parseArrow(r){if(this.match(14)){const s=this.tryParse(()=>{const i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const a=this.startNode();return[a.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),a});if(s.thrown)return null;s.error&&(this.state=s.failState),r.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,s){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?r.params=s:super.setArrowFunctionParameters(r,s)}checkParams(r,s,i,a=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))){for(let n=0;n<r.params.length;n++)this.isThisParam(r.params[n])&&n>0&&this.raise(_.ThisParamMustBeFirst,r.params[n]);super.checkParams(r,s,i,a)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(r,s,i){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();const a=this.startNodeAt(s);a.callee=r,a.arguments=super.parseCallExpressionArguments(11),r=this.finishNode(a,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){const a=this.state.clone(),n=this.tryParse(u=>this.parseAsyncArrowWithTypeParameters(s)||u(),a);if(!n.error&&!n.aborted)return n.node;const o=this.tryParse(()=>super.parseSubscripts(r,s,i),a);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(r,s,i)}parseSubscript(r,s,i,a){if(this.match(18)&&this.isLookaheadToken_lt()){if(a.optionalChainMember=!0,i)return a.stop=!0,r;this.next();const n=this.startNodeAt(s);return n.callee=r,n.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const n=this.startNodeAt(s);n.callee=r;const o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11),a.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,a.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(r,s,i,a)}parseNewCallee(r){super.parseNewCallee(r);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=s}parseAsyncArrowWithTypeParameters(r){const s=this.startNodeAt(r);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(r){const s=this.input.charCodeAt(this.state.pos+1);if(r===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){const s=this.input.charCodeAt(this.state.pos+1);if(r===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,s){const i=super.parseTopLevel(r,s);return this.state.hasFlowComment&&this.raise(_.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(_.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:r}=this.state;let s=2;for(;[32,9].includes(this.input.charCodeAt(r+s));)s++;const i=this.input.charCodeAt(s+r),a=this.input.charCodeAt(s+r+1);return i===58&&a===58?s+2:this.input.slice(s+r,s+r+12)==="flow-include"?s+12:i===58&&a!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(x.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:s,memberName:i}){this.raise(_.EnumBooleanMemberNotInitialized,r,{memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(r,s){return this.raise(s.explicitType?s.explicitType==="symbol"?_.EnumInvalidMemberInitializerSymbolType:_.EnumInvalidMemberInitializerPrimaryType:_.EnumInvalidMemberInitializerUnknownType,r,s)}flowEnumErrorNumberMemberNotInitialized(r,s){this.raise(_.EnumNumberMemberNotInitialized,r,s)}flowEnumErrorStringMemberInconsistentlyInitialized(r,s){this.raise(_.EnumStringMemberInconsistentlyInitialized,r,s)}flowEnumMemberInit(){const r=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 134:{const i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 85:case 86:{const i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){const r=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(r,s,i){const{explicitType:a}=s;a!==null&&a!==i&&this.flowEnumErrorInvalidMemberInitializer(r,s)}flowEnumMembers({enumName:r,explicitType:s}){const i=new Set,a={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}const o=this.startNode(),{id:u,init:p}=this.flowEnumMemberRaw(),y=u.name;if(y==="")continue;/^[a-z]/.test(y)&&this.raise(_.EnumInvalidMemberName,u,{memberName:y,suggestion:y[0].toUpperCase()+y.slice(1),enumName:r}),i.has(y)&&this.raise(_.EnumDuplicateMemberName,u,{memberName:y,enumName:r}),i.add(y);const E={enumName:r,explicitType:s,memberName:y};switch(o.id=u,p.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(p.loc,E,"boolean"),o.init=p.value,a.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(p.loc,E,"number"),o.init=p.value,a.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(p.loc,E,"string"),o.init=p.value,a.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(p.loc,E);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(p.loc,E);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(p.loc,E);break;default:a.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:a,hasUnknownMembers:n}}flowEnumStringMembers(r,s,{enumName:i}){if(r.length===0)return s;if(s.length===0)return r;if(s.length>r.length){for(const a of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:i});return s}else{for(const a of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:i});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!W(this.state.type))throw this.raise(_.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});const{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(_.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:s}),s}flowEnumBody(r,s){const i=s.name,a=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);const{members:o,hasUnknownMembers:u}=this.flowEnumMembers({enumName:i,explicitType:n});switch(r.hasUnknownMembers=u,n){case"boolean":return r.explicitType=!0,r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=o.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{const p=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;const y=o.booleanMembers.length,E=o.numberMembers.length,P=o.stringMembers.length,g=o.defaultedMembers.length;if(!y&&!E&&!P&&!g)return p();if(!y&&!E)return r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!E&&!P&&y>=g){for(const C of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(C.loc.start,{enumName:i,memberName:C.id.name});return r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!y&&!P&&E>=g){for(const C of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(C.loc.start,{enumName:i,memberName:C.id.name});return r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(_.EnumInconsistentMemberValues,a,{enumName:i}),p()}}}flowParseEnumDeclaration(r){const s=this.parseIdentifier();return r.id=s,r.body=this.flowEnumBody(this.startNode(),s),this.finishNode(r,"EnumDeclaration")}jsxParseOpeningElementAfterName(r){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(r.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(r)}isLookaheadToken_lt(){const r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){const s=this.input.charCodeAt(r+1);return s!==60&&s!==61}return!1}reScan_lt_gt(){const{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}};const ao={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},De=de`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,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:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,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 Ne(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function Ve(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return Ve(t.object)+"."+Ve(t.property);throw new Error("Node had unexpected type: "+t.type)}var no=t=>class extends t{jsxReadToken(){let r="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(De.UnterminatedJsxContent,this.state.startLoc);const i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(i);return}r+=this.input.slice(s,this.state.pos),this.finishToken(142,r);return;case 38:r+=this.input.slice(s,this.state.pos),r+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Ue(i)?(r+=this.input.slice(s,this.state.pos),r+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){const s=this.input.charCodeAt(this.state.pos);let i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=r?`
|
|
204
|
+
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly 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:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${Et(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${Et(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${Et(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} 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:t})=>`Label '${t}' 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:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' 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:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,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:t})=>`Unexpected keyword '${t}'.`,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:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,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:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,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:t})=>`Identifier '${t}' 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:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' 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."};const en=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var tn=Object.assign({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:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${Et({type:t})}; 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.'});const rn=["message"];function Xs(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function sn({toMessage:t,code:e,reasonCode:r,syntaxPlugin:s}){const i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{const a={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};a[r]&&(r=a[r])}return function a(n,o){const u=new SyntaxError;return u.code=e,u.reasonCode=r,u.loc=n,u.pos=n.index,u.syntaxPlugin=s,i&&(u.missingPlugin=o.missingPlugin),Xs(u,"clone",function(y={}){var E;const{line:P,column:g,index:N}=(E=y.loc)!=null?E:n;return a(new ge(P,g,N),Object.assign({},o,y.details))}),Xs(u,"details",o),Object.defineProperty(u,"message",{configurable:!0,get(){const p=`${t(o)} (${n.line}:${n.column})`;return this.message=p,p},set(p){Object.defineProperty(this,"message",{value:p,writable:!0})}}),u}}function de(t,e){if(Array.isArray(t))return s=>de(s,t[0]);const r={};for(const s of Object.keys(t)){const i=t[s],a=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=a,o=za(a,rn),u=typeof n=="string"?()=>n:n;r[s]=sn(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:u},e?{syntaxPlugin:e}:{},o))}return r}const x=Object.assign({},de(Ga),de(Qa),de(Za),de`pipelineOperator`(tn));function an(){return{sourceType:"script",sourceFilename:void 0,startIndex: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 nn(t){const e=an();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(const r of Object.keys(e))t[r]!=null&&(e[r]=t[r]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((t.startColumn==null||t.startIndex==null)&&t.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return e}const{defineProperty:on}=Object,Ys=(t,e)=>{t&&on(t,e,{enumerable:!1,value:t[e]})};function Ge(t){return Ys(t.loc.start,"index"),Ys(t.loc.end,"index"),t}var ln=t=>class extends t{parse(){const r=Ge(super.parse());return this.optionFlags&128&&(r.tokens=r.tokens.map(Ge)),r}parseRegExpLiteral({pattern:r,flags:s}){let i=null;try{i=new RegExp(r,s)}catch{}const a=this.estreeParseLiteral(i);return a.regex={pattern:r,flags:s},a}parseBigIntLiteral(r){let s;try{s=BigInt(r)}catch{s=null}const i=this.estreeParseLiteral(s);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){const i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){const s=r.value;delete r.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;const i=r;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(r,s){super.initFunction(r,s),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var s;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((s=r.expression.extra)!=null&&s.parenthesized)}parseBlockBody(r,s,i,a,n){super.parseBlockBody(r,s,i,a,n);const o=r.directives.map(u=>this.directiveToStmt(u));r.body=o.concat(r.body),delete r.directives}parsePrivateName(){const r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){const s=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=s,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,s){const i=super.parseLiteral(r,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,s,i=!1){super.parseFunctionBody(r,s,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,s,i,a,n,o,u=!1){let p=this.startNode();p.kind=r.kind,p=super.parseMethod(p,s,i,a,n,o,u),p.type="FunctionExpression",delete p.kind,r.value=p;const{typeParameters:y}=r;return y&&(delete r.typeParameters,p.typeParameters=y,this.resetStartLocationFromNode(p,y)),o==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){const s=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...r){const s=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(r,s,i,a,n){const o=super.parseObjectMethod(r,s,i,a,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(r,s,i,a){const n=super.parseObjectProperty(r,s,i,a);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(r,s,i){return r==="Property"?"value":super.isValidLVal(r,s,i)}isAssignable(r,s){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,s):super.isAssignable(r,s)}toAssignable(r,s=!1){if(r!=null&&this.isObjectProperty(r)){const{key:i,value:a}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(a,s)}else super.toAssignable(r,s)}toAssignableObjectExpressionProp(r,s,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(x.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(x.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,s,i)}finishCallExpression(r,s){const i=super.finishCallExpression(r,s);if(i.callee.type==="Import"){var a,n;i.type="ImportExpression",i.source=i.arguments[0],i.options=(a=i.arguments[1])!=null?a:null,i.attributes=(n=i.arguments[1])!=null?n:null,delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,s){const i=this.state.lastTokStartLoc,a=super.parseExport(r,s);switch(a.type){case"ExportAllDeclaration":a.exported=null;break;case"ExportNamedDeclaration":a.specifiers.length===1&&a.specifiers[0].type==="ExportNamespaceSpecifier"&&(a.type="ExportAllDeclaration",a.exported=a.specifiers[0].exported,delete a.specifiers);case"ExportDefaultDeclaration":{var n;const{declaration:o}=a;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===a.start&&this.resetStartLocation(a,i)}break}return a}parseSubscript(r,s,i,a){const n=super.parseSubscript(r,s,i,a);if(a.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),a.stop){const o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,s,i){return Ge(super.finishNodeAt(r,s,i))}resetStartLocation(r,s){super.resetStartLocation(r,s),Ge(r)}resetEndLocation(r,s=this.state.lastTokEndLoc){super.resetEndLocation(r,s),Ge(r)}};class Qe{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}}const q={brace:new Qe("{"),j_oTag:new Qe("<tag"),j_cTag:new Qe("</tag"),j_expr:new Qe("<tag>...</tag>",!0)};q.template=new Qe("`",!0);const V=!0,w=!0,mr=!0,Ze=!0,Ae=!0,un=!0;class Js{constructor(e,r={}){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=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}}const Tr=new Map;function Y(t,e={}){e.keyword=t;const r=_(t,e);return Tr.set(t,r),r}function ie(t,e){return _(t,{beforeExpr:V,binop:e})}let et=-1;const he=[],Sr=[],xr=[],br=[],Er=[],Pr=[];function _(t,e={}){var r,s,i,a;return++et,Sr.push(t),xr.push((r=e.binop)!=null?r:-1),br.push((s=e.beforeExpr)!=null?s:!1),Er.push((i=e.startsExpr)!=null?i:!1),Pr.push((a=e.prefix)!=null?a:!1),he.push(new Js(t,e)),et}function $(t,e={}){var r,s,i,a;return++et,Tr.set(t,et),Sr.push(t),xr.push((r=e.binop)!=null?r:-1),br.push((s=e.beforeExpr)!=null?s:!1),Er.push((i=e.startsExpr)!=null?i:!1),Pr.push((a=e.prefix)!=null?a:!1),he.push(new Js("name",e)),et}const cn={bracketL:_("[",{beforeExpr:V,startsExpr:w}),bracketHashL:_("#[",{beforeExpr:V,startsExpr:w}),bracketBarL:_("[|",{beforeExpr:V,startsExpr:w}),bracketR:_("]"),bracketBarR:_("|]"),braceL:_("{",{beforeExpr:V,startsExpr:w}),braceBarL:_("{|",{beforeExpr:V,startsExpr:w}),braceHashL:_("#{",{beforeExpr:V,startsExpr:w}),braceR:_("}"),braceBarR:_("|}"),parenL:_("(",{beforeExpr:V,startsExpr:w}),parenR:_(")"),comma:_(",",{beforeExpr:V}),semi:_(";",{beforeExpr:V}),colon:_(":",{beforeExpr:V}),doubleColon:_("::",{beforeExpr:V}),dot:_("."),question:_("?",{beforeExpr:V}),questionDot:_("?."),arrow:_("=>",{beforeExpr:V}),template:_("template"),ellipsis:_("...",{beforeExpr:V}),backQuote:_("`",{startsExpr:w}),dollarBraceL:_("${",{beforeExpr:V,startsExpr:w}),templateTail:_("...`",{startsExpr:w}),templateNonTail:_("...${",{beforeExpr:V,startsExpr:w}),at:_("@"),hash:_("#",{startsExpr:w}),interpreterDirective:_("#!..."),eq:_("=",{beforeExpr:V,isAssign:Ze}),assign:_("_=",{beforeExpr:V,isAssign:Ze}),slashAssign:_("_=",{beforeExpr:V,isAssign:Ze}),xorAssign:_("_=",{beforeExpr:V,isAssign:Ze}),moduloAssign:_("_=",{beforeExpr:V,isAssign:Ze}),incDec:_("++/--",{prefix:Ae,postfix:un,startsExpr:w}),bang:_("!",{beforeExpr:V,prefix:Ae,startsExpr:w}),tilde:_("~",{beforeExpr:V,prefix:Ae,startsExpr:w}),doubleCaret:_("^^",{startsExpr:w}),doubleAt:_("@@",{startsExpr:w}),pipeline:ie("|>",0),nullishCoalescing:ie("??",1),logicalOR:ie("||",1),logicalAND:ie("&&",2),bitwiseOR:ie("|",3),bitwiseXOR:ie("^",4),bitwiseAND:ie("&",5),equality:ie("==/!=/===/!==",6),lt:ie("</>/<=/>=",7),gt:ie("</>/<=/>=",7),relational:ie("</>/<=/>=",7),bitShift:ie("<</>>/>>>",8),bitShiftL:ie("<</>>/>>>",8),bitShiftR:ie("<</>>/>>>",8),plusMin:_("+/-",{beforeExpr:V,binop:9,prefix:Ae,startsExpr:w}),modulo:_("%",{binop:10,startsExpr:w}),star:_("*",{binop:10}),slash:ie("/",10),exponent:_("**",{beforeExpr:V,binop:11,rightAssociative:!0}),_in:Y("in",{beforeExpr:V,binop:7}),_instanceof:Y("instanceof",{beforeExpr:V,binop:7}),_break:Y("break"),_case:Y("case",{beforeExpr:V}),_catch:Y("catch"),_continue:Y("continue"),_debugger:Y("debugger"),_default:Y("default",{beforeExpr:V}),_else:Y("else",{beforeExpr:V}),_finally:Y("finally"),_function:Y("function",{startsExpr:w}),_if:Y("if"),_return:Y("return",{beforeExpr:V}),_switch:Y("switch"),_throw:Y("throw",{beforeExpr:V,prefix:Ae,startsExpr:w}),_try:Y("try"),_var:Y("var"),_const:Y("const"),_with:Y("with"),_new:Y("new",{beforeExpr:V,startsExpr:w}),_this:Y("this",{startsExpr:w}),_super:Y("super",{startsExpr:w}),_class:Y("class",{startsExpr:w}),_extends:Y("extends",{beforeExpr:V}),_export:Y("export"),_import:Y("import",{startsExpr:w}),_null:Y("null",{startsExpr:w}),_true:Y("true",{startsExpr:w}),_false:Y("false",{startsExpr:w}),_typeof:Y("typeof",{beforeExpr:V,prefix:Ae,startsExpr:w}),_void:Y("void",{beforeExpr:V,prefix:Ae,startsExpr:w}),_delete:Y("delete",{beforeExpr:V,prefix:Ae,startsExpr:w}),_do:Y("do",{isLoop:mr,beforeExpr:V}),_for:Y("for",{isLoop:mr}),_while:Y("while",{isLoop:mr}),_as:$("as",{startsExpr:w}),_assert:$("assert",{startsExpr:w}),_async:$("async",{startsExpr:w}),_await:$("await",{startsExpr:w}),_defer:$("defer",{startsExpr:w}),_from:$("from",{startsExpr:w}),_get:$("get",{startsExpr:w}),_let:$("let",{startsExpr:w}),_meta:$("meta",{startsExpr:w}),_of:$("of",{startsExpr:w}),_sent:$("sent",{startsExpr:w}),_set:$("set",{startsExpr:w}),_source:$("source",{startsExpr:w}),_static:$("static",{startsExpr:w}),_using:$("using",{startsExpr:w}),_yield:$("yield",{startsExpr:w}),_asserts:$("asserts",{startsExpr:w}),_checks:$("checks",{startsExpr:w}),_exports:$("exports",{startsExpr:w}),_global:$("global",{startsExpr:w}),_implements:$("implements",{startsExpr:w}),_intrinsic:$("intrinsic",{startsExpr:w}),_infer:$("infer",{startsExpr:w}),_is:$("is",{startsExpr:w}),_mixins:$("mixins",{startsExpr:w}),_proto:$("proto",{startsExpr:w}),_require:$("require",{startsExpr:w}),_satisfies:$("satisfies",{startsExpr:w}),_keyof:$("keyof",{startsExpr:w}),_readonly:$("readonly",{startsExpr:w}),_unique:$("unique",{startsExpr:w}),_abstract:$("abstract",{startsExpr:w}),_declare:$("declare",{startsExpr:w}),_enum:$("enum",{startsExpr:w}),_module:$("module",{startsExpr:w}),_namespace:$("namespace",{startsExpr:w}),_interface:$("interface",{startsExpr:w}),_type:$("type",{startsExpr:w}),_opaque:$("opaque",{startsExpr:w}),name:_("name",{startsExpr:w}),placeholder:_("%%",{startsExpr:!0}),string:_("string",{startsExpr:w}),num:_("num",{startsExpr:w}),bigint:_("bigint",{startsExpr:w}),decimal:_("decimal",{startsExpr:w}),regexp:_("regexp",{startsExpr:w}),privateName:_("#name",{startsExpr:w}),eof:_("eof"),jsxName:_("jsxName"),jsxText:_("jsxText",{beforeExpr:!0}),jsxTagStart:_("jsxTagStart",{startsExpr:!0}),jsxTagEnd:_("jsxTagEnd")};function W(t){return t>=93&&t<=133}function pn(t){return t<=92}function ue(t){return t>=58&&t<=133}function qs(t){return t>=58&&t<=137}function fn(t){return br[t]}function gr(t){return Er[t]}function dn(t){return t>=29&&t<=33}function Ws(t){return t>=129&&t<=131}function hn(t){return t>=90&&t<=92}function Ar(t){return t>=58&&t<=92}function yn(t){return t>=39&&t<=59}function mn(t){return t===34}function Tn(t){return Pr[t]}function Sn(t){return t>=121&&t<=123}function xn(t){return t>=124&&t<=130}function Ie(t){return Sr[t]}function Pt(t){return xr[t]}function bn(t){return t===57}function gt(t){return t>=24&&t<=25}function ye(t){return he[t]}he[8].updateContext=t=>{t.pop()},he[5].updateContext=he[7].updateContext=he[23].updateContext=t=>{t.push(q.brace)},he[22].updateContext=t=>{t[t.length-1]===q.template?t.pop():t.push(q.template)},he[143].updateContext=t=>{t.push(q.j_expr,q.j_oTag)};let Ir="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Hs="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const En=new RegExp("["+Ir+"]"),Pn=new RegExp("["+Ir+Hs+"]");Ir=Hs=null;const zs=[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],gn=[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 vr(t,e){let r=65536;for(let s=0,i=e.length;s<i;s+=2){if(r+=e[s],r>t)return!1;if(r+=e[s+1],r>=t)return!0}return!1}function me(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&En.test(String.fromCharCode(t)):vr(t,zs)}function Ke(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Pn.test(String.fromCharCode(t)):vr(t,zs)||vr(t,gn)}const Cr={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"]},An=new Set(Cr.keyword),In=new Set(Cr.strict),vn=new Set(Cr.strictBind);function Gs(t,e){return e&&t==="await"||t==="enum"}function Qs(t,e){return Gs(t,e)||In.has(t)}function Zs(t){return vn.has(t)}function ei(t,e){return Qs(t,e)||Zs(t)}function Cn(t){return An.has(t)}function Nn(t,e,r){return t===64&&e===64&&me(r)}const wn=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 On(t){return wn.has(t)}class Nr{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}}class wr{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}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(){const e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Nr(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,s){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,e,r,s);let a=i.names.get(e)||0;r&16?a=a|4:(i.firstLexicalName||(i.firstLexicalName=e),a=a|2),i.names.set(e,a),r&8&&this.maybeExportDefined(i,e)}else if(r&4)for(let a=this.scopeStack.length-1;a>=0&&(i=this.scopeStack[a],this.checkRedeclarationInScope(i,e,r,s),i.names.set(e,(i.names.get(e)||0)|1),this.maybeExportDefined(i,e),!(i.flags&387));--a);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,s,i){this.isRedeclaredInScope(e,r,s)&&this.parser.raise(x.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(e,r,s){if(!(s&1))return!1;if(s&8)return e.names.has(r);const i=e.names.get(r);return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(e)&&(i&1)>0:(i&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(i&4)>0}checkLocalExport(e){const{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:r}=this.scopeStack[e];if(r&387)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:r}=this.scopeStack[e];if(r&451&&!(r&4))return r}}}class Dn extends Nr{constructor(...e){super(...e),this.declareFunctions=new Set}}class Ln extends wr{createScope(e){return new Dn(e)}declareName(e,r,s){const i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,e,r,s),this.maybeExportDefined(i,e),i.declareFunctions.add(e);return}super.declareName(e,r,s)}isRedeclaredInScope(e,r,s){if(super.isRedeclaredInScope(e,r,s))return!0;if(s&2048&&!e.declareFunctions.has(r)){const i=e.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}class kn{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{const[r,s]=e;if(!this.hasPlugin(r))return!1;const i=this.plugins.get(r);for(const a of Object.keys(s))if((i==null?void 0:i[a])!==s[a])return!1;return!0}}getPluginOption(e,r){var s;return(s=this.plugins.get(e))==null?void 0:s[r]}}function ti(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function _n(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function tt(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function Oe(t,e,r){let s=null,i=e.length;for(;s===null&&i>0;)s=e[--i];s===null||s.start>r.start?tt(t,r.comments):ti(s,r.comments)}class Mn extends kn{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:r}=this.state,s=r.length;if(s===0)return;let i=s-1;const a=r[i];a.start===e.end&&(a.leadingNode=e,i--);const{start:n}=e;for(;i>=0;i--){const o=r[i],u=o.end;if(u>n)o.containingNode=e,this.finalizeComment(o),r.splice(i,1);else{u===n&&(o.trailingNode=e);break}}}finalizeComment(e){const{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&ti(e.leadingNode,r),e.trailingNode!==null&&_n(e.trailingNode,r);else{const{containingNode:s,start:i}=e;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Oe(s,s.properties,e);break;case"CallExpression":case"OptionalCallExpression":Oe(s,s.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Oe(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Oe(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Oe(s,s.specifiers,e);break;case"TSEnumDeclaration":Oe(s,s.members,e);break;case"TSEnumBody":Oe(s,s.members,e);break;default:tt(s,r)}else tt(s,r)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:r}=this.state,{length:s}=r;if(s===0)return;const i=r[s-1];i.leadingNode===e&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){const{commentStack:r}=this.state,{length:s}=r;s!==0&&(r[s-1].trailingNode===e?r[s-1].trailingNode=null:s>=2&&r[s-2].trailingNode===e&&(r[s-2].trailingNode=null))}takeSurroundingComments(e,r,s){const{commentStack:i}=this.state,a=i.length;if(a===0)return;let n=a-1;for(;n>=0;n--){const o=i[n],u=o.end;if(o.start===s)o.leadingNode=e;else if(u===r)o.trailingNode=e;else if(u<r)break}}}const Bn=/\r\n|[\r\n\u2028\u2029]/,At=new RegExp(Bn.source,"g");function Ue(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function ri(t,e,r){for(let s=e;s<r;s++)if(Ue(t.charCodeAt(s)))return!0;return!1}const Or=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Dr=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Fn(t){switch(t){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}}class Lr{constructor(){this.flags=1024,this.startIndex=void 0,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=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[q.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:r,startIndex:s,startLine:i,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.startIndex=s,this.curLine=i,this.lineStart=-a,this.startLoc=this.endLoc=new ge(i,a,s)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new ge(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const e=new Lr;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}}var Rn=function(e){return e>=48&&e<=57};const si={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},It={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function ii(t,e,r,s,i,a){const n=r,o=s,u=i;let p="",y=null,E=r;const{length:P}=e;for(;;){if(r>=P){a.unterminated(n,o,u),p+=e.slice(E,r);break}const g=e.charCodeAt(r);if(jn(t,g,e,r)){p+=e.slice(E,r);break}if(g===92){p+=e.slice(E,r);const N=Kn(e,r,s,i,t==="template",a);N.ch===null&&!y?y={pos:r,lineStart:s,curLine:i}:p+=N.ch,{pos:r,lineStart:s,curLine:i}=N,E=r}else g===8232||g===8233?(++r,++i,s=r):g===10||g===13?t==="template"?(p+=e.slice(E,r)+`
|
|
205
|
+
`,++r,g===13&&e.charCodeAt(r)===10&&++r,++i,E=s=r):a.unterminated(n,o,u):++r}return{pos:r,str:p,firstInvalidLoc:y,lineStart:s,curLine:i,containsInvalid:!!y}}function jn(t,e,r,s){return t==="template"?e===96||e===36&&r.charCodeAt(s+1)===123:e===(t==="double"?34:39)}function Kn(t,e,r,s,i,a){const n=!i;e++;const o=p=>({pos:e,ch:p,lineStart:r,curLine:s}),u=t.charCodeAt(e++);switch(u){case 110:return o(`
|
|
206
|
+
`);case 114:return o("\r");case 120:{let p;return{code:p,pos:e}=kr(t,e,r,s,2,!1,n,a),o(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:e}=ni(t,e,r,s,n,a),o(p===null?null:String.fromCodePoint(p))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);a.strictNumericEscape(e-1,r,s);default:if(u>=48&&u<=55){const p=e-1;let E=/^[0-7]+/.exec(t.slice(p,e+2))[0],P=parseInt(E,8);P>255&&(E=E.slice(0,-1),P=parseInt(E,8)),e+=E.length-1;const g=t.charCodeAt(e);if(E!=="0"||g===56||g===57){if(i)return o(null);a.strictNumericEscape(p,r,s)}return o(String.fromCharCode(P))}return o(String.fromCharCode(u))}}function kr(t,e,r,s,i,a,n,o){const u=e;let p;return{n:p,pos:e}=ai(t,e,r,s,16,i,a,!1,o,!n),p===null&&(n?o.invalidEscapeSequence(u,r,s):e=u-1),{code:p,pos:e}}function ai(t,e,r,s,i,a,n,o,u,p){const y=e,E=i===16?si.hex:si.decBinOct,P=i===16?It.hex:i===10?It.dec:i===8?It.oct:It.bin;let g=!1,N=0;for(let A=0,O=a??1/0;A<O;++A){const I=t.charCodeAt(e);let C;if(I===95&&o!=="bail"){const B=t.charCodeAt(e-1),K=t.charCodeAt(e+1);if(o){if(Number.isNaN(K)||!P(K)||E.has(B)||E.has(K)){if(p)return{n:null,pos:e};u.unexpectedNumericSeparator(e,r,s)}}else{if(p)return{n:null,pos:e};u.numericSeparatorInEscapeSequence(e,r,s)}++e;continue}if(I>=97?C=I-97+10:I>=65?C=I-65+10:Rn(I)?C=I-48:C=1/0,C>=i){if(C<=9&&p)return{n:null,pos:e};if(C<=9&&u.invalidDigit(e,r,s,i))C=0;else if(n)C=0,g=!0;else break}++e,N=N*i+C}return e===y||a!=null&&e-y!==a||g?{n:null,pos:e}:{n:N,pos:e}}function ni(t,e,r,s,i,a){const n=t.charCodeAt(e);let o;if(n===123){if(++e,{code:o,pos:e}=kr(t,e,r,s,t.indexOf("}",e)-e,!0,i,a),++e,o!==null&&o>1114111)if(i)a.invalidCodePoint(e,r,s);else return{code:null,pos:e}}else({code:o,pos:e}=kr(t,e,r,s,4,!1,i,a));return{code:o,pos:e}}function rt(t,e,r){return new ge(r,t-e,t)}const Un=new Set([103,109,115,105,121,117,100,118]);class ve{constructor(e){const r=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=r+e.start,this.end=r+e.end,this.loc=new bt(e.startLoc,e.endLoc)}}class Vn extends Mn{constructor(e,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,a,n)=>this.optionFlags&1024?(this.raise(x.InvalidDigit,rt(s,i,a),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(x.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(x.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(x.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(x.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,a)=>{this.recordStrictModeErrors(x.StrictNumericEscape,rt(s,i,a))},unterminated:(s,i,a)=>{throw this.raise(x.UnterminatedString,rt(s-1,i,a))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(x.StrictNumericEscape),unterminated:(s,i,a)=>{throw this.raise(x.UnterminatedTemplate,rt(s,i,a))}}),this.state=new Lr,this.state.init(e),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&128&&this.pushToken(new ve(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const r=this.state;return this.state=e,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Or.lastIndex=e,Or.test(this.input)?Or.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Dr.lastIndex=e,Dr.test(this.input)?Dr.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let r=this.input.charCodeAt(e);if((r&64512)===55296&&++e<this.input.length){const s=this.input.charCodeAt(e);(s&64512)===56320&&(r=65536+((r&1023)<<10)+(s&1023))}return r}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([r,s])=>this.raise(r,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(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let r;this.isLookahead||(r=this.state.curPosition());const s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(x.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,At.lastIndex=s+2;At.test(this.input)&&At.lastIndex<=i;)++this.state.curLine,this.state.lineStart=At.lastIndex;if(this.isLookahead)return;const a={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+e.length),loc:new bt(r,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(a),a}skipLineComment(e){const r=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ue(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const a=this.state.pos,o={type:"CommentLine",value:this.input.slice(r+e,a),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(a),loc:new bt(s,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(o),o}skipSpace(){const e=this.state.pos,r=this.optionFlags&2048?[]:null;e:for(;this.state.pos<this.length;){const 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:{const i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),r==null||r.push(i));break}case 47:{const i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),r==null||r.push(i));break}default:break e}break;default:if(Fn(s))++this.state.pos;else if(s===45&&!this.inModule&&this.optionFlags&4096){const i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(e===0||this.state.lineStart>e)){const a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),r==null||r.push(a))}else break e}else if(s===60&&!this.inModule&&this.optionFlags&4096){const i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){const a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),r==null||r.push(a))}else break e}else break e}}if((r==null?void 0:r.length)>0){const s=this.state.pos,i={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(s),comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(e,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=e,this.state.value=r,this.isLookahead||this.updateContext(s)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;const e=this.state.pos+1,r=this.codePointAtPos(e);if(r>=48&&r<=57)throw this.raise(x.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?x.RecordExpressionHashIncorrectStartSyntaxType:x.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else me(r)?(++this.state.pos,this.finishToken(139,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===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 e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;const r=this.state.pos;for(this.state.pos+=1;!Ue(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const s=this.input.slice(r+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(e){let r=e===42?55:54,s=1,i=this.input.charCodeAt(this.state.pos+1);e===42&&i===42&&(s++,i=this.input.charCodeAt(this.state.pos+2),r=57),i===61&&!this.state.inType&&(s++,r=e===37?33:30),this.finishOp(r,s)}readToken_pipe_amp(e){const r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(x.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(x.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===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(e){const r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){const{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){const{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===62){const s=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+s)===61){this.finishOp(30,s+1);return}this.finishOp(52,s);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){const r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);e===63?r===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){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(x.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(x.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:{const r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===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(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);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(e)){this.readWord(e);return}}throw this.raise(x.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,r){const s=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(e,s)}readRegexp(){const e=this.state.startLoc,r=this.state.start+1;let s,i,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(x.UnterminatedRegExp,se(e,1));const p=this.input.charCodeAt(a);if(Ue(p))throw this.raise(x.UnterminatedRegExp,se(e,1));if(s)s=!1;else{if(p===91)i=!0;else if(p===93&&i)i=!1;else if(p===47&&!i)break;s=p===92}}const n=this.input.slice(r,a);++a;let o="";const u=()=>se(e,a+2-r);for(;a<this.length;){const p=this.codePointAtPos(a),y=String.fromCharCode(p);if(Un.has(p))p===118?o.includes("u")&&this.raise(x.IncompatibleRegExpUVFlags,u()):p===117&&o.includes("v")&&this.raise(x.IncompatibleRegExpUVFlags,u()),o.includes(y)&&this.raise(x.DuplicateRegExpFlags,u());else if(Ke(p)||p===92)this.raise(x.MalformedRegExpFlags,u());else break;++a,o+=y}this.state.pos=a,this.finishToken(138,{pattern:n,flags:o})}readInt(e,r,s=!1,i=!0){const{n:a,pos:n}=ai(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,r,s,i,this.errorHandlers_readInt,!1);return this.state.pos=n,a}readRadixNumber(e){const r=this.state.pos,s=this.state.curPosition();let i=!1;this.state.pos+=2;const a=this.readInt(e);a==null&&this.raise(x.InvalidDigit,se(s,2),{radix:e});const n=this.input.charCodeAt(this.state.pos);if(n===110)++this.state.pos,i=!0;else if(n===109)throw this.raise(x.InvalidDecimal,s);if(me(this.codePointAtPos(this.state.pos)))throw this.raise(x.NumberIdentifier,this.state.curPosition());if(i){const o=this.input.slice(r,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,a)}readNumber(e){const r=this.state.pos,s=this.state.curPosition();let i=!1,a=!1,n=!1,o=!1;!e&&this.readInt(10)===null&&this.raise(x.InvalidNumber,this.state.curPosition());const u=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(u){const g=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(x.StrictOctalLiteral,s),!this.state.strict){const N=g.indexOf("_");N>0&&this.raise(x.ZeroDigitNumericSeparator,se(s,N))}o=u&&!/[89]/.test(g)}let p=this.input.charCodeAt(this.state.pos);if(p===46&&!o&&(++this.state.pos,this.readInt(10),i=!0,p=this.input.charCodeAt(this.state.pos)),(p===69||p===101)&&!o&&(p=this.input.charCodeAt(++this.state.pos),(p===43||p===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(x.InvalidOrMissingExponent,s),i=!0,n=!0,p=this.input.charCodeAt(this.state.pos)),p===110&&((i||u)&&this.raise(x.InvalidBigIntLiteral,s),++this.state.pos,a=!0),p===109){this.expectPlugin("decimal",this.state.curPosition()),(n||u)&&this.raise(x.InvalidDecimal,s),++this.state.pos;var y=!0}if(me(this.codePointAtPos(this.state.pos)))throw this.raise(x.NumberIdentifier,this.state.curPosition());const E=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(a){this.finishToken(136,E);return}if(y){this.finishToken(137,E);return}const P=o?parseInt(E,8):parseFloat(E);this.finishToken(135,P)}readCodePoint(e){const{code:r,pos:s}=ni(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=s,r}readString(e){const{str:r,pos:s,curLine:i,lineStart:a}=ii(e===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=a,this.state.curLine=i,this.finishToken(134,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:r,firstInvalidLoc:s,pos:i,curLine:a,lineStart:n}=ii("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=a,s&&(this.state.firstInvalidTemplateEscapePos=new ge(s.curLine,s.pos-s.lineStart,this.sourceToOffsetPos(s.pos))),this.input.codePointAt(i)===96?this.finishToken(24,s?null:e+r+"`"):(this.state.pos++,this.finishToken(25,s?null:e+r+"${"))}recordStrictModeErrors(e,r){const s=r.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,r):this.state.strictErrors.set(s,[e,r])}readWord1(e){this.state.containsEsc=!1;let r="";const s=this.state.pos;let i=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const a=this.codePointAtPos(this.state.pos);if(Ke(a))this.state.pos+=a<=65535?1:2;else if(a===92){this.state.containsEsc=!0,r+=this.input.slice(i,this.state.pos);const n=this.state.curPosition(),o=this.state.pos===s?me:Ke;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(x.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;const u=this.readCodePoint(!0);u!==null&&(o(u)||this.raise(x.EscapedCharNotAnIdentifier,n),r+=String.fromCodePoint(u)),i=this.state.pos}else break}return r+this.input.slice(i,this.state.pos)}readWord(e){const r=this.readWord1(e),s=Tr.get(r);s!==void 0?this.finishToken(s,Ie(s)):this.finishToken(132,r)}checkKeywordEscapes(){const{type:e}=this.state;Ar(e)&&this.state.containsEsc&&this.raise(x.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Ie(e)})}raise(e,r,s={}){const i=r instanceof ge?r:r.loc.start,a=e(i,s);if(!(this.optionFlags&1024))throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,r,s={}){const i=r instanceof ge?r:r.loc.start,a=i.index,n=this.state.errors;for(let o=n.length-1;o>=0;o--){const u=n[o];if(u.loc.index===a)return n[o]=e(i,s);if(u.loc.index<a)break}return this.raise(e,r,s)}updateContext(e){}unexpected(e,r){throw this.raise(x.UnexpectedToken,e??this.state.startLoc,{expected:r?Ie(r):null})}expectPlugin(e,r){if(this.hasPlugin(e))return!0;throw this.raise(x.MissingPlugin,r??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(r=>this.hasPlugin(r)))throw this.raise(x.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(r,s,i)=>{this.raise(e,rt(r,s,i))}}}class $n{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class Xn{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new $n)}exit(){const e=this.stack.pop(),r=this.current();for(const[s,i]of Array.from(e.undefinedPrivateNames))r?r.undefinedPrivateNames.has(s)||r.undefinedPrivateNames.set(s,i):this.parser.raise(x.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(e,r,s){const{privateNames:i,loneAccessors:a,undefinedPrivateNames:n}=this.current();let o=i.has(e);if(r&3){const u=o&&a.get(e);if(u){const p=u&4,y=r&4,E=u&3,P=r&3;o=E===P||p!==y,o||a.delete(e)}else o||a.set(e,r)}o&&this.parser.raise(x.PrivateNameRedeclaration,s,{identifierName:e}),i.add(e),n.delete(e)}usePrivateName(e,r){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,r):this.parser.raise(x.InvalidPrivateFieldResolution,r,{identifierName:e})}}class vt{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}}class oi extends vt{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,r){const s=r.index;this.declarationErrors.set(s,[e,r])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class Yn{constructor(e){this.parser=void 0,this.stack=[new vt],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,r){const s=r.loc.start,{stack:i}=this;let a=i.length-1,n=i[a];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(e,s);else return;n=i[--a]}this.parser.raise(e,s)}recordArrowParameterBindingError(e,r){const{stack:s}=this,i=s[s.length-1],a=r.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(e,a);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,a);else return}recordAsyncArrowParametersError(e){const{stack:r}=this;let s=r.length-1,i=r[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(x.AwaitBindingIdentifier,e),i=r[--s]}validateAsPattern(){const{stack:e}=this,r=e[e.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([s,i])=>{this.parser.raise(s,i);let a=e.length-2,n=e[a];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=e[--a]})}}function Jn(){return new vt(3)}function qn(){return new oi(1)}function Wn(){return new oi(2)}function li(){return new vt}class Hn{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}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 Ct(t,e){return(t?2:0)|(e?1:0)}class zn extends Vn{addExtra(e,r,s,i=!0){if(!e)return;let{extra:a}=e;a==null&&(a={},e.extra=a),i?a[r]=s:Object.defineProperty(a,r,{enumerable:i,value:s})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,r){const s=e+r.length;if(this.input.slice(e,s)===r){const i=this.input.charCodeAt(s);return!(Ke(i)||(i&64512)===55296)}return!1}isLookaheadContextual(e){const r=this.nextTokenStart();return this.isUnparsedContextual(r,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,r){if(!this.eatContextual(e)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return ri(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return ri(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(x.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,r){this.eat(e)||this.unexpected(r,e)}tryParse(e,r=this.state.clone()){const s={node:null};try{const i=e((a=null)=>{throw s.node=a,s});if(this.state.errors.length>r.errors.length){const a=this.state;return this.state=r,this.state.tokensLength=a.tokensLength,{node:i,error:a.errors[r.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){const a=this.state;if(this.state=r,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:a};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:a};throw i}}checkExpressionErrors(e,r){if(!e)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:a,optionalParametersLoc:n}=e,o=!!s||!!i||!!n||!!a;if(!r)return o;s!=null&&this.raise(x.InvalidCoverInitializedName,s),i!=null&&this.raise(x.DuplicateProto,i),a!=null&&this.raise(x.UnexpectedPrivateField,a),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return qs(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){const r=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=e;const a=this.scope,n=this.getScopeHandler();this.scope=new n(this,e);const o=this.prodParam;this.prodParam=new Hn;const u=this.classScope;this.classScope=new Xn(this);const p=this.expressionScope;return this.expressionScope=new Yn(this),()=>{this.state.labels=r,this.exportedIdentifiers=s,this.inModule=i,this.scope=a,this.prodParam=o,this.classScope=u,this.expressionScope=p}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){const{privateKeyLoc:r}=e;r!==null&&this.expectPlugin("destructuringPrivate",r)}}class Nt{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class wt{constructor(e,r,s){this.type="",this.start=r,this.end=0,this.loc=new bt(s),(e==null?void 0:e.optionFlags)&64&&(this.range=[r,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}}const _r=wt.prototype;_r.__clone=function(){const t=new wt(void 0,this.start,this.loc.start),e=Object.keys(this);for(let r=0,s=e.length;r<s;r++){const i=e[r];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(t[i]=this[i])}return t};function Gn(t){return Te(t)}function Te(t){const{type:e,start:r,end:s,loc:i,range:a,extra:n,name:o}=t,u=Object.create(_r);return u.type=e,u.start=r,u.end=s,u.loc=i,u.range=a,u.extra=n,u.name=o,e==="Placeholder"&&(u.expectedNode=t.expectedNode),u}function Qn(t){const{type:e,start:r,end:s,loc:i,range:a,extra:n}=t;if(e==="Placeholder")return Gn(t);const o=Object.create(_r);return o.type=e,o.start=r,o.end=s,o.loc=i,o.range=a,t.raw!==void 0?o.raw=t.raw:o.extra=n,o.value=t.value,o}class Zn extends zn{startNode(){const e=this.state.startLoc;return new wt(this,e.index,e)}startNodeAt(e){return new wt(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,r){return this.finishNodeAt(e,r,this.state.lastTokEndLoc)}finishNodeAt(e,r,s){return e.type=r,e.end=s.index,e.loc.end=s,this.optionFlags&64&&(e.range[1]=s.index),this.optionFlags&2048&&this.processComment(e),e}resetStartLocation(e,r){e.start=r.index,e.loc.start=r,this.optionFlags&64&&(e.range[0]=r.index)}resetEndLocation(e,r=this.state.lastTokEndLoc){e.end=r.index,e.loc.end=r,this.optionFlags&64&&(e.range[1]=r.index)}resetStartLocationFromNode(e,r){this.resetStartLocation(e,r.loc.start)}}const eo=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),M=de`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:t})=>`Cannot overwrite reserved type ${t}.`,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:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:r})=>`Enum \`${t}\` has type \`${r}\`, so the initializer of \`${e}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${r}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,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:t})=>`Unexpected reserved type ${t}.`,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:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function to(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function ui(t){return t.importKind==="type"||t.importKind==="typeof"}const ro={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function so(t,e){const r=[],s=[];for(let i=0;i<t.length;i++)(e(t[i],i,t)?r:s).push(t[i]);return[r,s]}const io=/\*?\s*@((?:no)?flow)\b/;var ao=t=>class extends t{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return Ln}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(r,s){r!==134&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,s)}addComment(r){if(this.flowPragma===void 0){const s=io.exec(r.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(r)}flowParseTypeInitialiser(r){const s=this.state.inType;this.state.inType=!0,this.expect(r||14);const i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){const r=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(M.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const r=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=r,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=r,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();const s=r.id=this.parseIdentifier(),i=this.startNode(),a=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);const n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),a.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(a,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,s){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(s&&this.raise(M.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,s);this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(134)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();const s=r.body=this.startNode(),i=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(M.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,M.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let a=null,n=!1;return i.forEach(o=>{to(o)?(a==="CommonJS"&&this.raise(M.AmbiguousDeclareModuleKind,o),a="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(M.DuplicateDeclareModuleExports,o),a==="ES"&&this.raise(M.AmbiguousDeclareModuleKind,o),a="CommonJS",n=!0)}),r.kind=a||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){const i=this.state.value;throw this.raise(M.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:ro[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"&&(r.type="ExportDeclaration",r.default=!1,delete r.exportKind),r.type="Declare"+r.type,r;this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();const s=this.flowParseTypeAlias(r);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(r){this.next();const s=this.flowParseOpaqueType(r,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,s){if(r.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(r.id.name,s?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){const r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(M.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,s,i){eo.has(r)&&this.raise(i?M.AssignReservedType:M.UnexpectedReservedType,s,{reservedType:r})}flowParseRestrictedIdentifier(r,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,s){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,s||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){const s=this.state.startLoc,i=this.startNode(),a=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=a,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):r&&this.raise(M.MissingTypeParamDefault,s),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){const r=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let i=!1;do{const a=this.flowParseTypeParameter(i);s.params.push(a),a.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(s,"TypeParameterDeclaration")}flowInTopLevelContext(r){if(this.curContext()!==q.brace){const s=this.state.context;this.state.context=[s[0]];try{return r()}finally{this.state.context=s}}else return r()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const r=this.startNode(),s=this.state.inType;return this.state.inType=!0,r.params=[],this.flowInTopLevelContext(()=>{this.expect(47);const i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=i}),this.state.inType=s,!this.state.inType&&this.curContext()===q.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;const r=this.startNode(),s=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){const r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,s,i){return r.static=s,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=i,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,s){return r.static=s,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,s){const i=this.startNode();return r.static=s,r.value=this.flowParseObjectTypeMethodish(i),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:s,allowSpread:i,allowProto:a,allowInexact:n}){const o=this.state.inType;this.state.inType=!0;const u=this.startNode();u.callProperties=[],u.properties=[],u.indexers=[],u.internalSlots=[];let p,y,E=!1;for(s&&this.match(6)?(this.expect(6),p=9,y=!0):(this.expect(5),p=8,y=!1),u.exact=y;!this.match(p);){let g=!1,N=null,A=null;const O=this.startNode();if(a&&this.isContextual(118)){const C=this.lookahead();C.type!==14&&C.type!==17&&(this.next(),N=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){const C=this.lookahead();C.type!==14&&C.type!==17&&(this.next(),g=!0)}const I=this.flowParseVariance();if(this.eat(0))N!=null&&this.unexpected(N),this.eat(0)?(I&&this.unexpected(I.loc.start),u.internalSlots.push(this.flowParseObjectTypeInternalSlot(O,g))):u.indexers.push(this.flowParseObjectTypeIndexer(O,g,I));else if(this.match(10)||this.match(47))N!=null&&this.unexpected(N),I&&this.unexpected(I.loc.start),u.callProperties.push(this.flowParseObjectTypeCallProperty(O,g));else{let C="init";if(this.isContextual(99)||this.isContextual(104)){const K=this.lookahead();qs(K.type)&&(C=this.state.value,this.next())}const B=this.flowParseObjectTypeProperty(O,g,N,I,C,i,n??!y);B===null?(E=!0,A=this.state.lastTokStartLoc):u.properties.push(B)}this.flowObjectTypeSemicolon(),A&&!this.match(8)&&!this.match(9)&&this.raise(M.UnexpectedExplicitInexactInObject,A)}this.expect(p),i&&(u.inexact=E);const P=this.finishNode(u,"ObjectTypeAnnotation");return this.state.inType=o,P}flowParseObjectTypeProperty(r,s,i,a,n,o,u){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?u||this.raise(M.InexactInsideExact,this.state.lastTokStartLoc):this.raise(M.InexactInsideNonObject,this.state.lastTokStartLoc),a&&this.raise(M.InexactVariance,a),null):(o||this.raise(M.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),a&&this.raise(M.SpreadVariance,a),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=s,r.proto=i!=null,r.kind=n;let p=!1;return this.match(47)||this.match(10)?(r.method=!0,i!=null&&this.unexpected(i),a&&this.unexpected(a.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(r),!o&&r.key.name==="constructor"&&r.value.this&&this.raise(M.ThisParamBannedInConstructor,r.value.this)):(n!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(p=!0),r.value=this.flowParseTypeInitialiser(),r.variance=a),r.optional=p,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){const s=r.kind==="get"?0:1,i=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?M.GetterMayNotHaveThisParam:M.SetterMayNotHaveThisParam,r.value.this),i!==s&&this.raise(r.kind==="get"?x.BadGetterArity:x.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(x.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,s){var i;(i=r)!=null||(r=this.state.startLoc);let a=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const n=this.startNodeAt(r);n.qualification=a,n.id=this.flowParseRestrictedIdentifier(!0),a=this.finishNode(n,"QualifiedTypeIdentifier")}return a}flowParseGenericType(r,s){const i=this.startNodeAt(r);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(r,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){const r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){const r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let s=null,i=!1,a=null;const n=this.startNode(),o=this.lookahead(),u=this.state.type===78;return o.type===14||o.type===17?(u&&!r&&this.raise(M.ThisParamMustBeFirst,n),s=this.parseIdentifier(u),this.eat(17)&&(i=!0,u&&this.raise(M.ThisParamMayNotBeOptional,n)),a=this.flowParseTypeInitialiser()):a=this.flowParseType(),n.name=s,n.optional=i,n.typeAnnotation=a,this.finishNode(n,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){const s=this.startNodeAt(r.loc.start);return s.name=null,s.optional=!1,s.typeAnnotation=r,this.finishNode(s,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let s=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:r,rest:s,_this:i}}flowIdentToTypeAnnotation(r,s,i){switch(i.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(i.name),this.flowParseGenericType(r,i)}}flowParsePrimaryType(){const r=this.state.startLoc,s=this.startNode();let i,a,n=!1;const 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,a=this.flowParseTupleType(),this.state.noAnonFunctionType=o,a;case 47:{const u=this.startNode();return u.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),u.params=i.params,u.rest=i.rest,u.this=i._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),this.finishNode(u,"FunctionTypeAnnotation")}case 10:{const u=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(W(this.state.type)||this.match(78)){const p=this.lookahead().type;n=p!==17&&p!==14}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,a=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),a;this.eat(12)}return a?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(a)]):i=this.flowParseFunctionTypeParams(),u.params=i.params,u.rest=i.rest,u.this=i._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),u.typeParameters=null,this.finishNode(u,"FunctionTypeAnnotation")}case 134: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(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(M.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136: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(Ar(this.state.type)){const u=Ie(this.state.type);return this.next(),super.createIdentifier(s,u)}else if(W(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,s,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const r=this.state.startLoc;let s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const a=this.startNodeAt(r),n=this.eat(18);i=i||n,this.expect(0),!n&&this.match(3)?(a.elementType=s,this.next(),s=this.finishNode(a,"ArrayTypeAnnotation")):(a.objectType=s,a.indexType=this.flowParseType(),this.expect(3),i?(a.optional=n,s=this.finishNode(a,"OptionalIndexedAccessType")):s=this.finishNode(a,"IndexedAccessType"))}return s}flowParsePrefixType(){const r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const s=this.startNodeAt(r.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(r)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){const r=this.startNode();this.eat(45);const s=this.flowParseAnonFunctionWithoutParens();for(r.types=[s];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?s:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){const r=this.startNode();this.eat(43);const s=this.flowParseIntersectionType();for(r.types=[s];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?s:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){const r=this.state.inType;this.state.inType=!0;const s=this.flowParseUnionType();return this.state.inType=r,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){const r=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(r,s)}else return this.flowParseType()}flowParseTypeAnnotation(){const r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){const s=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),s}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,s,i=!1){if(s){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,i));return}super.parseFunctionBody(r,!1,i)}parseFunctionBodyAndFinish(r,s,i=!1){if(this.match(14)){const a=this.startNode();[a.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,s,i)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){const i=this.lookahead();if(ue(i.type)){const a=this.startNode();return this.next(),this.flowParseInterface(a)}}else if(this.isContextual(126)){const i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}const s=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(r,s,i){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(r)}else if(W(this.state.type)){if(s.name==="interface")return this.flowParseInterface(r);if(s.name==="type")return this.flowParseTypeAlias(r);if(s.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,s,i)}shouldParseExportDeclaration(){const{type:r}=this.state;return r===126||Ws(r)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:r}=this.state;return r===126||Ws(r)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,s,i){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){const P=this.lookaheadCharCode();if(P===44||P===61||P===58||P===41)return this.setOptionalParametersError(i),r}this.expect(17);const a=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s);let{consequent:u,failed:p}=this.tryParseConditionalConsequent(),[y,E]=this.getArrowLikeExpressions(u);if(p||E.length>0){const P=[...n];if(E.length>0){this.state=a,this.state.noArrowAt=P;for(let g=0;g<E.length;g++)P.push(E[g].start);({consequent:u,failed:p}=this.tryParseConditionalConsequent()),[y,E]=this.getArrowLikeExpressions(u)}p&&y.length>1&&this.raise(M.AmbiguousConditionalArrow,a.startLoc),p&&y.length===1&&(this.state=a,P.push(y[0].start),this.state.noArrowAt=P,{consequent:u,failed:p}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(u,!0),this.state.noArrowAt=n,this.expect(14),o.test=r,o.consequent=u,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const r=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:s}}getArrowLikeExpressions(r,s){const i=[r],a=[];for(;i.length!==0;){const n=i.pop();n.type==="ArrowFunctionExpression"&&n.body.type!=="BlockStatement"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):a.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(a.forEach(n=>this.finishArrowValidation(n)),[a,[]]):so(a,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(r){var s;this.toAssignableList(r.params,(s=r.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,s){let i;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(r,s){const i=super.parseParenItem(r,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){const a=this.startNodeAt(s);return a.expression=i,a.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(a,"TypeCastExpression")}return i}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";const s=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){r.exportKind="type";const s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){r.exportKind="type";const s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.isContextual(126)){r.exportKind="value";const s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){const{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(r);return i&&r.exportKind==="type"&&this.unexpected(s),i}parseClassId(r,s,i){super.parseClassId(r,s,i),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,s,i){const{startLoc:a}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,s))return;s.declare=!0}super.parseClassMember(r,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(M.DeclareClassElement,a):s.value&&this.raise(M.DeclareClassFieldInitializer,s.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){const r=super.readWord1(),s="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(x.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(r){const s=this.input.charCodeAt(this.state.pos+1);r===123&&s===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?s===46?this.finishOp(18,2):this.finishOp(17,1):Nn(r,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,s){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,s):super.isAssignable(r,s)}toAssignable(r,s=!1){!s&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,s)}toAssignableList(r,s,i){for(let a=0;a<r.length;a++){const n=r[a];(n==null?void 0:n.type)==="TypeCastExpression"&&(r[a]=this.typeCastToParameter(n))}super.toAssignableList(r,s,i)}toReferencedList(r,s){for(let a=0;a<r.length;a++){var i;const n=r[a];n&&n.type==="TypeCastExpression"&&!((i=n.extra)!=null&&i.parenthesized)&&(r.length>1||!s)&&this.raise(M.TypeCastInPattern,n.typeAnnotation)}return r}parseArrayLike(r,s,i,a){const n=super.parseArrayLike(r,s,i,a);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(r,s,i){return r==="TypeCastExpression"||super.isValidLVal(r,s,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,s,i,a,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,s,i,a,n,o),s.params&&n){const u=s.params;u.length>0&&this.isThisParam(u[0])&&this.raise(M.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&n&&s.value.params){const u=s.value.params;u.length>0&&this.isThisParam(u[0])&&this.raise(M.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(r,s,i,a){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,s,i,a)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const s=r.implements=[];do{const i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);const s=this.getObjectOrClassMethodParams(r);if(s.length>0){const i=s[0];this.isThisParam(i)&&r.kind==="get"?this.raise(M.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(M.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,s,i,a,n,o,u){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let p;this.match(47)&&!o&&(p=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const y=super.parseObjPropValue(r,s,i,a,n,o,u);return p&&((y.value||y).typeParameters=p),y}parseFunctionParamType(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(M.PatternIsOptional,r),this.isThisParam(r)&&this.raise(M.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(M.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(M.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,s){const i=super.parseMaybeDefault(r,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(M.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(M.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,s,i){s.local=ui(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(s,i))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;const s=this.lookaheadCharCode();return s===123||s===42}return!r&&this.isContextual(87)}applyImportPhase(r,s,i,a){if(super.applyImportPhase(r,s,i,a),s){if(!i&&this.match(65))return;r.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),r.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(r,s,i,a,n){const o=r.imported;let u=null;o.type==="Identifier"&&(o.name==="type"?u="type":o.name==="typeof"&&(u="typeof"));let p=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const E=this.parseIdentifier(!0);u!==null&&!ue(this.state.type)?(r.imported=E,r.importKind=u,r.local=Te(E)):(r.imported=o,r.importKind=null,r.local=this.parseIdentifier())}else{if(u!==null&&ue(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=u;else{if(s)throw this.raise(x.ImportBindingIsString,r,{importName:o.value});r.imported=o,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(p=!0,r.local=Te(r.imported))}const y=ui(r);return i&&y&&this.raise(M.ImportTypeShorthandOnlyInPureImport,r),(i||y)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),p&&!i&&!y&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,s){const i=r.kind;i!=="get"&&i!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,s)}parseVarId(r,s){super.parseVarId(r,s),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,s){if(this.match(14)){const i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(r,s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,s){var i;let a=null,n;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(a=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(r,s),a),!n.error)return n.node;const{context:p}=this.state,y=p[p.length-1];(y===q.j_oTag||y===q.j_expr)&&p.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,u;a=a||this.state.clone();let p;const y=this.tryParse(P=>{var g;p=this.flowParseTypeParameterDeclaration();const N=this.forwardNoArrowParamsConversionAt(p,()=>{const O=super.parseMaybeAssign(r,s);return this.resetStartLocationFromNode(O,p),O});(g=N.extra)!=null&&g.parenthesized&&P();const A=this.maybeUnwrapTypeCastExpression(N);return A.type!=="ArrowFunctionExpression"&&P(),A.typeParameters=p,this.resetStartLocationFromNode(A,p),N},a);let E=null;if(y.node&&this.maybeUnwrapTypeCastExpression(y.node).type==="ArrowFunctionExpression"){if(!y.error&&!y.aborted)return y.node.async&&this.raise(M.UnexpectedTypeParameterBeforeAsyncArrowFunction,p),y.node;E=y.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(E)return this.state=y.failState,E;throw(u=n)!=null&&u.thrown?n.error:y.thrown?y.error:this.raise(M.UnexpectedTokenAfterTypeParameter,p)}return super.parseMaybeAssign(r,s)}parseArrow(r){if(this.match(14)){const s=this.tryParse(()=>{const i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const a=this.startNode();return[a.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),a});if(s.thrown)return null;s.error&&(this.state=s.failState),r.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,s){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?r.params=s:super.setArrowFunctionParameters(r,s)}checkParams(r,s,i,a=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))){for(let n=0;n<r.params.length;n++)this.isThisParam(r.params[n])&&n>0&&this.raise(M.ThisParamMustBeFirst,r.params[n]);super.checkParams(r,s,i,a)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(r,s,i){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();const a=this.startNodeAt(s);a.callee=r,a.arguments=super.parseCallExpressionArguments(11),r=this.finishNode(a,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){const a=this.state.clone(),n=this.tryParse(u=>this.parseAsyncArrowWithTypeParameters(s)||u(),a);if(!n.error&&!n.aborted)return n.node;const o=this.tryParse(()=>super.parseSubscripts(r,s,i),a);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(r,s,i)}parseSubscript(r,s,i,a){if(this.match(18)&&this.isLookaheadToken_lt()){if(a.optionalChainMember=!0,i)return a.stop=!0,r;this.next();const n=this.startNodeAt(s);return n.callee=r,n.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const n=this.startNodeAt(s);n.callee=r;const o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11),a.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,a.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(r,s,i,a)}parseNewCallee(r){super.parseNewCallee(r);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=s}parseAsyncArrowWithTypeParameters(r){const s=this.startNodeAt(r);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(r){const s=this.input.charCodeAt(this.state.pos+1);if(r===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){const s=this.input.charCodeAt(this.state.pos+1);if(r===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,s){const i=super.parseTopLevel(r,s);return this.state.hasFlowComment&&this.raise(M.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(M.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos:r}=this.state;let s=2;for(;[32,9].includes(this.input.charCodeAt(r+s));)s++;const i=this.input.charCodeAt(s+r),a=this.input.charCodeAt(s+r+1);return i===58&&a===58?s+2:this.input.slice(s+r,s+r+12)==="flow-include"?s+12:i===58&&a!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(x.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:s,memberName:i}){this.raise(M.EnumBooleanMemberNotInitialized,r,{memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(r,s){return this.raise(s.explicitType?s.explicitType==="symbol"?M.EnumInvalidMemberInitializerSymbolType:M.EnumInvalidMemberInitializerPrimaryType:M.EnumInvalidMemberInitializerUnknownType,r,s)}flowEnumErrorNumberMemberNotInitialized(r,s){this.raise(M.EnumNumberMemberNotInitialized,r,s)}flowEnumErrorStringMemberInconsistentlyInitialized(r,s){this.raise(M.EnumStringMemberInconsistentlyInitialized,r,s)}flowEnumMemberInit(){const r=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 134:{const i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 85:case 86:{const i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){const r=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(r,s,i){const{explicitType:a}=s;a!==null&&a!==i&&this.flowEnumErrorInvalidMemberInitializer(r,s)}flowEnumMembers({enumName:r,explicitType:s}){const i=new Set,a={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}const o=this.startNode(),{id:u,init:p}=this.flowEnumMemberRaw(),y=u.name;if(y==="")continue;/^[a-z]/.test(y)&&this.raise(M.EnumInvalidMemberName,u,{memberName:y,suggestion:y[0].toUpperCase()+y.slice(1),enumName:r}),i.has(y)&&this.raise(M.EnumDuplicateMemberName,u,{memberName:y,enumName:r}),i.add(y);const E={enumName:r,explicitType:s,memberName:y};switch(o.id=u,p.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(p.loc,E,"boolean"),o.init=p.value,a.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(p.loc,E,"number"),o.init=p.value,a.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(p.loc,E,"string"),o.init=p.value,a.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(p.loc,E);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(p.loc,E);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(p.loc,E);break;default:a.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:a,hasUnknownMembers:n}}flowEnumStringMembers(r,s,{enumName:i}){if(r.length===0)return s;if(s.length===0)return r;if(s.length>r.length){for(const a of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:i});return s}else{for(const a of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:i});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!W(this.state.type))throw this.raise(M.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});const{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(M.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:s}),s}flowEnumBody(r,s){const i=s.name,a=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);const{members:o,hasUnknownMembers:u}=this.flowEnumMembers({enumName:i,explicitType:n});switch(r.hasUnknownMembers=u,n){case"boolean":return r.explicitType=!0,r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=o.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{const p=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;const y=o.booleanMembers.length,E=o.numberMembers.length,P=o.stringMembers.length,g=o.defaultedMembers.length;if(!y&&!E&&!P&&!g)return p();if(!y&&!E)return r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!E&&!P&&y>=g){for(const N of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(N.loc.start,{enumName:i,memberName:N.id.name});return r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!y&&!P&&E>=g){for(const N of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(N.loc.start,{enumName:i,memberName:N.id.name});return r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(M.EnumInconsistentMemberValues,a,{enumName:i}),p()}}}flowParseEnumDeclaration(r){const s=this.parseIdentifier();return r.id=s,r.body=this.flowEnumBody(this.startNode(),s),this.finishNode(r,"EnumDeclaration")}jsxParseOpeningElementAfterName(r){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(r.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(r)}isLookaheadToken_lt(){const r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){const s=this.input.charCodeAt(r+1);return s!==60&&s!==61}return!1}reScan_lt_gt(){const{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}};const no={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},De=de`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,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:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,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 Ce(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function Ve(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return Ve(t.object)+"."+Ve(t.property);throw new Error("Node had unexpected type: "+t.type)}var oo=t=>class extends t{jsxReadToken(){let r="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(De.UnterminatedJsxContent,this.state.startLoc);const i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(i);return}r+=this.input.slice(s,this.state.pos),this.finishToken(142,r);return;case 38:r+=this.input.slice(s,this.state.pos),r+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:Ue(i)?(r+=this.input.slice(s,this.state.pos),r+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){const s=this.input.charCodeAt(this.state.pos);let i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=r?`
|
|
167
207
|
`:`\r
|
|
168
|
-
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(r){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(x.UnterminatedString,this.state.startLoc);const a=this.input.charCodeAt(this.state.pos);if(a===r)break;a===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):Ue(a)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){const r=++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);const i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){const a=this.input.slice(r,this.state.pos),n=ao[a];if(++this.state.pos,n)return n}}return this.state.pos=r,"&"}jsxReadWord(){let r;const s=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(Ke(r)||r===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){const r=this.startNode();return this.match(141)?r.name=this.state.value:Ar(this.state.type)?r.name=Ie(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){const r=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;const i=this.startNodeAt(r);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){const r=this.state.startLoc;let s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){const i=this.startNodeAt(r);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(q.brace),this.next(),r=this.jsxParseExpressionContainer(r,q.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(De.AttributeIsEmpty,r),r;case 143:case 134:return this.parseExprAtom();default:throw this.raise(De.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(q.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,s){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{const i=this.parseExpression();r.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){const r=this.startNode();return this.match(5)?(this.setContext(q.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(q.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){const s=this.startNodeAt(r);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(r){const s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return r.attributes=s,r.selfClosing=this.eat(56),this.expect(144),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){const s=this.startNodeAt(r);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(r){const s=this.startNodeAt(r),i=[],a=this.jsxParseOpeningElementAt(r);let n=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case 143:if(r=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(r);break e}i.push(this.jsxParseElementAt(r));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const o=this.startNode();this.setContext(q.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,q.j_expr));break}default:this.unexpected()}Ne(a)&&!Ne(n)&&n!==null?this.raise(De.MissingClosingTagFragment,n):!Ne(a)&&Ne(n)?this.raise(De.MissingClosingTagElement,n,{openingTagName:Ve(a.name)}):!Ne(a)&&!Ne(n)&&Ve(n.name)!==Ve(a.name)&&this.raise(De.MissingClosingTagElement,n,{openingTagName:Ve(a.name)})}if(Ne(a)?(s.openingFragment=a,s.closingFragment=n):(s.openingElement=a,s.closingElement=n),s.children=i,this.match(47))throw this.raise(De.UnwrappedAdjacentJSXElements,this.state.startLoc);return Ne(a)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){const{context:s}=this.state;s[s.length-1]=r}parseExprAtom(r){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){const s=this.curContext();if(s===q.j_expr){this.jsxReadToken();return}if(s===q.j_oTag||s===q.j_cTag){if(me(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(144);return}if((r===34||r===39)&&s===q.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(r)}updateContext(r){const{context:s,type:i}=this.state;if(i===56&&r===143)s.splice(-2,2,q.j_cTag),this.state.canStartJSXElement=!1;else if(i===143)s.push(q.j_oTag);else if(i===144){const a=s[s.length-1];a===q.j_oTag&&r===56||a===q.j_cTag?(s.pop(),this.state.canStartJSXElement=s[s.length-1]===q.j_expr):(this.setContext(q.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=pn(i)}};class oo extends Cr{constructor(...e){super(...e),this.tsNames=new Map}}class lo extends wr{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new oo(e)}enter(e){e===256&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return e===256&&this.importsStack.pop(),e}hasImport(e,r){const s=this.importsStack.length;if(this.importsStack[s-1].has(e))return!0;if(!r&&s>1){for(let i=0;i<s-1;i++)if(this.importsStack[i].has(e))return!0}return!1}declareName(e,r,s){if(r&4096){this.hasImport(e,!0)&&this.parser.raise(x.VarRedeclaration,s,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}const i=this.currentScope();let a=i.tsNames.get(e)||0;if(r&1024){this.maybeExportDefined(i,e),i.tsNames.set(e,a|16);return}super.declareName(e,r,s),r&2&&(r&1||(this.checkRedeclarationInScope(i,e,r,s),this.maybeExportDefined(i,e)),a=a|1),r&256&&(a=a|2),r&512&&(a=a|4),r&128&&(a=a|8),a&&i.tsNames.set(e,a)}isRedeclaredInScope(e,r,s){const i=e.tsNames.get(r);if((i&2)>0){if(s&256){const a=!!(s&512),n=(i&4)>0;return a!==n}return!0}return s&128&&(i&8)>0?e.names.get(r)&2?!!(s&1):!1:s&2&&(i&1)>0?!0:super.isRedeclaredInScope(e,r,s)}checkLocalExport(e){const{name:r}=e;if(this.hasImport(r))return;const s=this.scopeStack.length;for(let i=s-1;i>=0;i--){const n=this.scopeStack[i].tsNames.get(r);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(e)}}const ci=t=>t.type==="ParenthesizedExpression"?ci(t.expression):t;class uo extends Qn{toAssignable(e,r=!1){var s,i;let a;switch((e.type==="ParenthesizedExpression"||(s=e.extra)!=null&&s.parenthesized)&&(a=ci(e),r?a.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(x.InvalidParenthesizedAssignment,e):a.type!=="MemberExpression"&&!this.isOptionalMemberExpression(a)&&this.raise(x.InvalidParenthesizedAssignment,e):this.raise(x.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let o=0,u=e.properties.length,p=u-1;o<u;o++){var n;const y=e.properties[o],E=o===p;this.toAssignableObjectExpressionProp(y,E,r),E&&y.type==="RestElement"&&(n=e.extra)!=null&&n.trailingCommaLoc&&this.raise(x.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:o,value:u}=e;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(u,r);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":e.type="ArrayPattern",this.toAssignableList(e.elements,(i=e.extra)==null?void 0:i.trailingCommaLoc,r);break;case"AssignmentExpression":e.operator!=="="&&this.raise(x.MissingEqInAssignment,e.left.loc.end),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,r);break;case"ParenthesizedExpression":this.toAssignable(a,r);break}}toAssignableObjectExpressionProp(e,r,s){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?x.PatternHasAccessor:x.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){e.type="RestElement";const i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),r||this.raise(x.RestTrailingComma,e)}else this.toAssignable(e,s)}toAssignableList(e,r,s){const i=e.length-1;for(let a=0;a<=i;a++){const n=e[a];if(n){if(n.type==="SpreadElement"){n.type="RestElement";const o=n.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,s)}else this.toAssignable(n,s);n.type==="RestElement"&&(a<i?this.raise(x.RestTrailingComma,n):r&&this.raise(x.RestTrailingComma,r))}}}isAssignable(e,r){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const s=e.properties.length-1;return e.properties.every((i,a)=>i.type!=="ObjectMethod"&&(a===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(e,r){return e}toReferencedListDeep(e,r){this.toReferencedList(e,r);for(const s of e)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(e){const r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,r,s){const i=s&1,a=[];let n=!0;for(;!this.eat(e);)if(n?n=!1:this.expect(12),i&&this.match(12))a.push(null);else{if(this.eat(e))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(o=this.parseFunctionParamType(o)),a.push(o),!this.checkCommaAfterRest(r)){this.expect(e);break}}else{const o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(x.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());a.push(this.parseAssignableListItem(s,o))}}return a}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:r}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());const s=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,r,!1,!1,!0,!1)}parseAssignableListItem(e,r){const s=this.parseMaybeDefault();(this.hasPlugin("flow")||e&2)&&this.parseFunctionParamType(s);const i=this.parseMaybeDefault(s.loc.start,s);return r.length&&(s.decorators=r),i}parseFunctionParamType(e){return e}parseMaybeDefault(e,r){var s,i;if((s=e)!=null||(e=this.state.startLoc),r=(i=r)!=null?i:this.parseBindingAtom(),!this.eat(29))return r;const a=this.startNodeAt(e);return a.left=r,a.right=this.parseMaybeAssignAllowIn(),this.finishNode(a,"AssignmentPattern")}isValidLVal(e,r,s){switch(e){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(e){return e.type==="OptionalMemberExpression"}checkLVal(e,r,s=64,i=!1,a=!1,n=!1){var o;const u=e.type;if(this.isObjectMethod(e))return;const p=this.isOptionalMemberExpression(e);if(p||u==="MemberExpression"){p&&(this.expectPlugin("optionalChainingAssign",e.loc.start),r.type!=="AssignmentExpression"&&this.raise(x.InvalidLhsOptionalChaining,e,{ancestor:r})),s!==64&&this.raise(x.InvalidPropertyBindingPattern,e);return}if(u==="Identifier"){this.checkIdentifier(e,s,a);const{name:A}=e;i&&(i.has(A)?this.raise(x.ParamDupe,e):i.add(A));return}const y=this.isValidLVal(u,!(n||(o=e.extra)!=null&&o.parenthesized)&&r.type==="AssignmentExpression",s);if(y===!0)return;if(y===!1){const A=s===64?x.InvalidLhs:x.InvalidLhsBinding;this.raise(A,e,{ancestor:r});return}let E,P;typeof y=="string"?(E=y,P=u==="ParenthesizedExpression"):[E,P]=y;const g=u==="ArrayPattern"||u==="ObjectPattern"?{type:u}:r,C=e[E];if(Array.isArray(C))for(const A of C)A&&this.checkLVal(A,g,s,i,a,P);else C&&this.checkLVal(C,g,s,i,a,P)}checkIdentifier(e,r,s=!1){this.state.strict&&(s?ei(e.name,this.inModule):Zs(e.name))&&(r===64?this.raise(x.StrictEvalArguments,e,{referenceName:e.name}):this.raise(x.StrictEvalArgumentsBinding,e,{bindingName:e.name})),r&8192&&e.name==="let"&&this.raise(x.LetInLexicalBinding,e),r&64||this.declareNameFromIdentifier(e,r)}declareNameFromIdentifier(e,r){this.scope.declareName(e.name,r,e.loc.start)}checkToRestConversion(e,r){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(x.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?x.RestTrailingComma:x.ElementAfterRest,this.state.startLoc),!0):!1}}function co(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function pi(t){if(!t)throw new Error("Assert fail")}const k=de`typescript`({AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' 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:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:t})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' 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:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,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:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[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:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,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:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,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:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`});function po(t){switch(t){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 fi(t){return t==="private"||t==="public"||t==="protected"}function fo(t){return t==="in"||t==="out"}var ho=t=>class extends t{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:k.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter})}getScopeHandler(){return lo}tsIsIdentifier(){return W(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,s){if(!W(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const i=this.state.value;if(r.includes(i)){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:a=k.InvalidModifierOnTypeMember},n){const o=(p,y,E,P)=>{y===E&&n[P]&&this.raise(k.InvalidModifiersOrder,p,{orderedModifiers:[E,P]})},u=(p,y,E,P)=>{(n[E]&&y===P||n[P]&&y===E)&&this.raise(k.IncompatibleModifiers,p,{modifiers:[E,P]})};for(;;){const{startLoc:p}=this.state,y=this.tsParseModifier(r.concat(s??[]),i);if(!y)break;fi(y)?n.accessibility?this.raise(k.DuplicateAccessibilityModifier,p,{modifier:y}):(o(p,y,y,"override"),o(p,y,y,"static"),o(p,y,y,"readonly"),n.accessibility=y):fo(y)?(n[y]&&this.raise(k.DuplicateModifier,p,{modifier:y}),n[y]=!0,o(p,y,"in","out")):(hasOwnProperty.call(n,y)?this.raise(k.DuplicateModifier,p,{modifier:y}):(o(p,y,"static","readonly"),o(p,y,"static","override"),o(p,y,"override","readonly"),o(p,y,"abstract","override"),u(p,y,"declare","override"),u(p,y,"static","abstract")),n[y]=!0),s!=null&&s.includes(y)&&this.raise(a,p,{modifier:y})}}tsIsListTerminator(r){switch(r){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(r,s){const i=[];for(;!this.tsIsListTerminator(r);)i.push(s());return i}tsParseDelimitedList(r,s,i){return co(this.tsParseDelimitedListWorker(r,s,!0,i))}tsParseDelimitedListWorker(r,s,i,a){const n=[];let o=-1;for(;!this.tsIsListTerminator(r);){o=-1;const u=s();if(u==null)return;if(n.push(u),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;i&&this.expect(12);return}return a&&(a.value=o),n}tsParseBracketedList(r,s,i,a,n){a||(i?this.expect(0):this.expect(47));const o=this.tsParseDelimitedList(r,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){const r=this.startNode();return this.expect(83),this.expect(10),this.match(134)?r.argument=this.parseStringLiteral(this.state.value):(this.raise(k.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom()),this.eat(12)&&!this.match(11)?(r.options=super.parseMaybeAssignAllowIn(),this.eat(12)):r.options=null,this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName(3)),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseEntityName(r){let s;if(r&1&&this.match(78))if(r&2)s=this.parseIdentifier(!0);else{const i=this.startNode();this.next(),s=this.finishNode(i,"ThisExpression")}else s=this.parseIdentifier(!!(r&1));for(;this.eat(16);){const i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(!!(r&1)),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){const r=this.startNode();return r.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();const s=this.startNodeAtNode(r);return s.parameterName=r,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){const r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){const r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){const s=this.startNode();return r(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){const s=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,i),s.params.length===0&&this.raise(k.EmptyTypeParameters,s),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(r,s){const i=r===19,a="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[a]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){const r=super.parseBindingList(11,41,2);for(const s of r){const{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(k.UnsupportedSignatureParameterKind,s,{type:i})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),W(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),r.parameters=[s];const i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,s){this.eat(17)&&(r.optional=!0);const i=r;if(this.match(10)||this.match(47)){s&&this.raise(k.ReadonlyForMethodSignature,r);const a=i;a.kind&&this.match(47)&&this.raise(k.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,a),this.tsParseTypeMemberSemicolon();const n="parameters",o="typeAnnotation";if(a.kind==="get")a[n].length>0&&(this.raise(x.BadGetterArity,this.state.curPosition()),this.isThisParam(a[n][0])&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(a.kind==="set"){if(a[n].length!==1)this.raise(x.BadSetterArity,this.state.curPosition());else{const u=a[n][0];this.isThisParam(u)&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()),u.type==="Identifier"&&u.optional&&this.raise(k.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),u.type==="RestElement"&&this.raise(k.SetAccessorCannotHaveRestParameter,this.state.curPosition())}a[o]&&this.raise(k.SetAccessorCannotHaveReturnType,a[o])}else a.kind="method";return this.finishNode(a,"TSMethodSignature")}else{const a=i;s&&(a.readonly=!0);const n=this.tsTryParseTypeAnnotation();return n&&(a.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSPropertySignature")}}tsParseTypeMember(){const r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){const i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);const s=this.tsTryParseIndexSignature(r);return s||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){const r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}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(){const r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{const s=this.startNode();s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(s,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){const r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return r.elementTypes.forEach(i=>{const{type:a}=i;s&&a!=="TSRestType"&&a!=="TSOptionalType"&&!(a==="TSNamedTupleMember"&&i.optional)&&this.raise(k.OptionalTypeBeforeRequired,i),s||(s=a==="TSNamedTupleMember"&&i.optional||a==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){const r=this.state.startLoc,s=this.eat(21),{startLoc:i}=this.state;let a,n,o,u;const y=ue(this.state.type)?this.lookaheadCharCode():null;if(y===58)a=!0,o=!1,n=this.parseIdentifier(!0),this.expect(14),u=this.tsParseType();else if(y===63){o=!0;const E=this.state.value,P=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(a=!0,n=this.createIdentifier(this.startNodeAt(i),E),this.expect(17),this.expect(14),u=this.tsParseType()):(a=!1,u=P,this.expect(17))}else u=this.tsParseType(),o=this.eat(17),a=this.eat(14);if(a){let E;n?(E=this.startNodeAt(i),E.optional=o,E.label=n,E.elementType=u,this.eat(17)&&(E.optional=!0,this.raise(k.TupleOptionalAfterType,this.state.lastTokStartLoc))):(E=this.startNodeAt(i),E.optional=o,this.raise(k.InvalidTupleMemberLabel,u),E.label=u,E.elementType=this.tsParseType()),u=this.finishNode(E,"TSNamedTupleMember")}else if(o){const E=this.startNodeAt(i);E.typeAnnotation=u,u=this.finishNode(E,"TSOptionalType")}if(s){const E=this.startNodeAt(r);E.typeAnnotation=u,u=this.finishNode(E,"TSRestType")}return u}tsParseParenthesizedType(){const r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,s){const i=this.startNode();return r==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,r)}tsParseLiteralTypeNode(){const r=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){{const r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const r=this.startNode(),s=this.lookahead();return s.type!==135&&s.type!==136&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"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:{const{type:r}=this.state;if(W(r)||r===88||r===84){const s=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":po(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){const i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:r}=this.state;let s=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const i=this.startNodeAt(r);i.elementType=s,this.expect(3),s=this.finishNode(i,"TSArrayType")}else{const i=this.startNodeAt(r);i.objectType=s,i.indexType=this.tsParseType(),this.expect(3),s=this.finishNode(i,"TSIndexedAccessType")}return s}tsParseTypeOperator(){const r=this.startNode(),s=this.state.value;return this.next(),r.operator=s,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(k.UnexpectedReadonly,r)}}tsParseInferType(){const r=this.startNode();this.expectContextual(115);const s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return Tn(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,s,i){const a=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(a.types=o,this.finishNode(a,r))}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)){const{errors:r}=this.state,s=r.length;try{return this.parseObjectLike(8,!0),r.length===s}catch{return!1}}if(this.match(0)){this.next();const{errors:r}=this.state,s=r.length;try{return super.parseBindingList(3,93,1),r.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(r){return this.tsInType(()=>{const s=this.startNode();this.expect(r);const i=this.startNode(),a=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(a&&this.match(78)){let u=this.tsParseThisTypeOrThisTypePredicate();return u.type==="TSThisType"?(i.parameterName=u,i.asserts=!0,i.typeAnnotation=null,u=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(u,i),u.asserts=!0),s.typeAnnotation=u,this.finishNode(s,"TSTypeAnnotation")}const n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return a?(i.parameterName=this.parseIdentifier(),i.asserts=a,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);const o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=a,s.typeAnnotation=this.finishNode(i,"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(){const r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const r=this.state.containsEsc;return this.next(),!W(this.state.type)&&!this.match(78)?!1:(r&&this.raise(x.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,s=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){pi(this.state.inType);const r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;const s=this.startNodeAtNode(r);return s.checkType=r,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(k.ReservedTypeAssertion,this.state.startLoc);const r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){const s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{const a=this.startNode();return a.expression=this.tsParseEntityName(3),this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSExpressionWithTypeArguments")});return i.length||this.raise(k.EmptyHeritageClauseType,s,{token:r}),i}tsParseInterfaceDeclaration(r,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(r.declare=!0),W(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(k.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));const i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInTopLevelContext(r){if(this.curContext()!==q.brace){const s=this.state.context;this.state.context=[s[0]];try{return r()}finally{this.state.context=s}}else return r()}tsInType(r){const s=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(r){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(r){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const r=this.startNode();return r.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,s={}){return s.const&&(r.const=!0),s.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseEnumBody(){const r=this.startNode();return this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumBody")}tsParseModuleBlock(){const r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,s=!1){if(r.id=this.parseIdentifier(),s||this.checkIdentifier(r.id,1024),this.eat(16)){const i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),r.body=i}else this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.kind="global",r.global=!0,r.id=this.parseIdentifier()):this.match(134)?(r.kind="module",r.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,s,i){r.isExport=i||!1,r.id=s||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);const a=this.tsParseModuleReference();return r.importKind==="type"&&a.type!=="TSExternalModuleReference"&&this.raise(k.ImportAliasHasImportType,a),r.moduleReference=a,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){const s=this.state.clone(),i=r();return this.state=s,i}tsTryParseAndCatch(r){const s=this.tryParse(i=>r()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(r){const s=this.state.clone(),i=r();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(r){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(100)&&(s=74,i="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 129:{const a=this.tsParseInterfaceDeclaration(r,{declare:!0});if(a)return a}default:if(W(s))return this.tsParseDeclaration(r,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(r,s,i){switch(s.name){case"declare":{const a=this.tsTryParseDeclare(r);return a&&(a.declare=!0),a}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const a=r;return a.kind="global",r.global=!0,a.id=s,a.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(a,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(r,s.name,!1,i)}}tsParseDeclaration(r,s,i,a){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||W(this.state.type)))return this.tsParseAbstractDeclaration(r,a);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(r);if(W(this.state.type))return r.kind="module",this.tsParseModuleOrNamespaceDeclaration(r)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&W(this.state.type))return r.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(r);break;case"type":if(this.tsCheckLineTerminator(i)&&W(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const i=this.tsTryParseAndCatch(()=>{const a=this.startNodeAt(r);return a.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(a),a.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),a});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const r=this.startNode();return r.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(k.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===q.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Sn(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(r,s){const i=this.state.startLoc,a={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},a);const n=a.accessibility,o=a.override,u=a.readonly;!(r&4)&&(n||u||o)&&this.raise(k.UnexpectedParameterModifier,i);const p=this.parseMaybeDefault();r&2&&this.parseFunctionParamType(p);const y=this.parseMaybeDefault(p.loc.start,p);if(n||u||o){const E=this.startNodeAt(i);return s.length&&(E.decorators=s),n&&(E.accessibility=n),u&&(E.readonly=u),o&&(E.override=o),y.type!=="Identifier"&&y.type!=="AssignmentPattern"&&this.raise(k.UnsupportedParameterPropertyKind,E),E.parameter=y,this.finishNode(E,"TSParameterProperty")}return s.length&&(p.decorators=s),y}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(const s of r.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(k.PatternIsOptional,s)}setArrowFunctionParameters(r,s,i){super.setArrowFunctionParameters(r,s,i),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,s,i=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const a=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return a&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,a):a==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(k.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,a,i):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,s,i))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(k.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(r,s){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,s,i,a){const n=super.parseArrayLike(r,s,i,a);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(r,s,i,a){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const o=this.startNodeAt(s);return o.expression=r,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return a.stop=!0,r;a.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o;const u=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(r)){const P=this.tsTryParseGenericAsyncArrowFunction(s);if(P)return P}const p=this.tsParseTypeArgumentsInExpression();if(!p)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(gt(this.state.type)){const P=super.parseTaggedTemplateExpression(r,s,a);return P.typeParameters=p,P}if(!i&&this.eat(10)){const P=this.startNodeAt(s);return P.callee=r,P.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(P.arguments),P.typeParameters=p,a.optionalChainMember&&(P.optional=n),this.finishCallExpression(P,a.optionalChainMember)}const y=this.state.type;if(y===48||y===52||y!==10&&gr(y)&&!this.hasPrecedingLineBreak())return;const E=this.startNodeAt(s);return E.expression=r,E.typeParameters=p,this.finishNode(E,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),u)return u.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(k.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),u}return super.parseSubscript(r,s,i,a)}parseNewCallee(r){var s;super.parseNewCallee(r);const{callee:i}=r;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(r.typeParameters=i.typeParameters,r.callee=i.expression)}parseExprOp(r,s,i){let a;if(Pt(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(a=this.isContextual(120)))){const n=this.startNodeAt(s);return n.expression=r,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(a&&this.raise(x.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,a?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(r,s,i)}checkReservedWord(r,s,i,a){this.state.isAmbientContext||super.checkReservedWord(r,s,i,a)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(k.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){const s=this.lookaheadCharCode();return r?s===123||s===42:s!==61}return!r&&this.isContextual(87)}applyImportPhase(r,s,i,a){super.applyImportPhase(r,s,i,a),s?r.exportKind=i==="type"?"type":"value":r.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(r){if(this.match(134))return r.importKind="value",super.parseImport(r);let s;if(W(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){const i=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,i);s=super.parseImportSpecifiersAndAfter(r,i)}else s=super.parseImport(r);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(k.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(r,s){if(this.match(83)){const i=r;this.next();let a=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?a=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,a,!0)}else if(this.eat(29)){const i=r;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){const i=r;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(r,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){const r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,s,i=!1){const{isAmbientContext:a}=this.state,n=super.parseVarStatement(r,s,i||a);if(!a)return n;for(const{id:o,init:u}of n.declarations)u&&(s!=="const"||o.typeAnnotation?this.raise(k.InitializerNotAllowedInAmbientContext,u):mo(u,this.hasPlugin("estree"))||this.raise(k.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,u));return n}parseStatementContent(r,s){if(this.match(75)&&this.isLookaheadContextual("enum")){const i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(r,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,s){return s.some(i=>fi(i)?r.accessibility===i:!!r[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,s,i){const a=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:a,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:k.InvalidModifierOnTypeParameterPositions},s);const n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,a)&&this.raise(k.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,s)):this.parseClassMemberWithIsStatic(r,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(r,s,i,a){const n=this.tsTryParseIndexSignature(s);if(n){r.body.push(n),s.abstract&&this.raise(k.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(k.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(k.IndexSignatureHasDeclare,s),s.override&&this.raise(k.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(k.NonAbstractClassHasAbstractMethod,s),s.override&&(i.hadSuperClass||this.raise(k.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(r,s,i,a)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(k.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(k.ClassMethodHasDeclare,r)}parseExpressionStatement(r,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(r,s,i):void 0)||super.parseExpressionStatement(r,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(r,s,i);const a=this.tryParse(()=>super.parseConditional(r,s));return a.node?(a.error&&(this.state=a.failState),a.node):(a.error&&super.setOptionalParametersError(i,a.error),r)}parseParenItem(r,s){const i=super.parseParenItem(r,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){const a=this.startNodeAt(s);return a.expression=r,a.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(a,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));const s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(k.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const n=W(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(r.exportKind="type"),i&&n.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(r,s,i,a){if((!s||i)&&this.isContextual(113))return;super.parseClassId(r,s,i,r.declare?1024:8331);const n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(r.typeParameters=n)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));const s=this.tsTryParseTypeAnnotation();s&&(r.typeAnnotation=s)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(k.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){const{key:s}=r;this.raise(k.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!r.computed?s.name:`[${this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end))}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(k.PrivateElementHasAbstract,r),r.accessibility&&this.raise(k.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(k.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,s,i,a,n,o){const u=this.tsTryParseTypeParameters(this.tsParseConstModifier);u&&n&&this.raise(k.ConstructorHasTypeParameters,u);const{declare:p=!1,kind:y}=s;p&&(y==="get"||y==="set")&&this.raise(k.DeclareAccessor,s,{kind:y}),u&&(s.typeParameters=u),super.pushClassMethod(r,s,i,a,n,o)}pushClassPrivateMethod(r,s,i,a){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(r,s,i,a)}declareClassPrivateMethodInScope(r,s){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&!hasOwnProperty.call(r.value,"body")||super.declareClassPrivateMethodInScope(r,s))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,s,i,a,n,o,u){const p=this.tsTryParseTypeParameters(this.tsParseConstModifier);return p&&(r.typeParameters=p),super.parseObjPropValue(r,s,i,a,n,o,u)}parseFunctionParams(r,s){const i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(r.typeParameters=i),super.parseFunctionParams(r,s)}parseVarId(r,s){super.parseVarId(r,s),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);const i=this.tsTryParseTypeAnnotation();i&&(r.id.typeAnnotation=i,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,s){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,s)}parseMaybeAssign(r,s){var i,a,n,o,u;let p,y,E;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(p=this.state.clone(),y=this.tryParse(()=>super.parseMaybeAssign(r,s),p),!y.error)return y.node;const{context:C}=this.state,A=C[C.length-1];(A===q.j_oTag||A===q.j_expr)&&C.pop()}if(!((i=y)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(r,s);(!p||p===this.state)&&(p=this.state.clone());let P;const g=this.tryParse(C=>{var A,O;P=this.tsParseTypeParameters(this.tsParseConstModifier);const I=super.parseMaybeAssign(r,s);return(I.type!=="ArrowFunctionExpression"||(A=I.extra)!=null&&A.parenthesized)&&C(),((O=P)==null?void 0:O.params.length)!==0&&this.resetStartLocationFromNode(I,P),I.typeParameters=P,I},p);if(!g.error&&!g.aborted)return P&&this.reportReservedArrowTypeParam(P),g.node;if(!y&&(pi(!this.hasPlugin("jsx")),E=this.tryParse(()=>super.parseMaybeAssign(r,s),p),!E.error))return E.node;if((a=y)!=null&&a.node)return this.state=y.failState,y.node;if(g.node)return this.state=g.failState,P&&this.reportReservedArrowTypeParam(P),g.node;if((n=E)!=null&&n.node)return this.state=E.failState,E.node;throw((o=y)==null?void 0:o.error)||g.error||((u=E)==null?void 0:u.error)}reportReservedArrowTypeParam(r){var s;r.params.length===1&&!r.params[0].constraint&&!((s=r.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedArrowTypeParam,r)}parseMaybeUnary(r,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,s)}parseArrow(r){if(this.match(14)){const s=this.tryParse(i=>{const a=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),a});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),r.returnType=s.node)}return super.parseArrow(r)}parseFunctionParamType(r){this.eat(17)&&(r.optional=!0);const s=this.tsTryParseTypeAnnotation();return s&&(r.typeAnnotation=s),this.resetEndLocation(r),r}isAssignable(r,s){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(r,s)}}toAssignable(r,s=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(k.UnexpectedTypeCastInParameter,r):this.raise(k.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,s);break;case"AssignmentExpression":!s&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,s)}}toAssignableParenthesizedExpression(r,s){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,s);break;default:super.toAssignable(r,s)}}checkToRestConversion(r,s){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,s)}}isValidLVal(r,s,i){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!s)&&["expression",!0];default:return super.isValidLVal(r,s,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r,s){if(this.match(47)||this.match(51)){const i=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const a=super.parseMaybeDecoratorArguments(r,s);return a.typeParameters=i,a}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r,s)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,s){const i=super.parseMaybeDefault(r,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(k.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){const{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableList(r,s,i){for(let a=0;a<r.length;a++){const n=r[a];(n==null?void 0:n.type)==="TSTypeCastExpression"&&(r[a]=this.typeCastToParameter(n))}super.toAssignableList(r,s,i)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(s=>this.isAssignable(s,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){const s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(r.typeParameters=s)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){const s=super.getGetterSetterExpectedParamCount(r),a=this.getObjectOrClassMethodParams(r)[0];return a&&this.isThisParam(a)?s+1:s}parseCatchClauseParam(){const r=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(r.typeAnnotation=s,this.resetEndLocation(r)),r}tsInAmbientContext(r){const{isAmbientContext:s,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=s,this.state.strict=i}}parseClass(r,s,i){const a=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,s,i)}finally{this.state.inAbstractClass=a}}tsParseAbstractDeclaration(r,s){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(r,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return r.abstract=!0,this.raise(k.NonClassMethodPropertyHasAbstractModifer,r),this.tsParseInterfaceDeclaration(r)}else this.unexpected(null,80)}parseMethod(r,s,i,a,n,o,u){const p=super.parseMethod(r,s,i,a,n,o,u);if(p.abstract&&(this.hasPlugin("estree")?p.value:p).body){const{key:P}=p;this.raise(k.AbstractMethodHasImplementation,p,{methodName:P.type==="Identifier"&&!p.computed?P.name:`[${this.input.slice(this.offsetToSourcePos(P.start),this.offsetToSourcePos(P.end))}]`})}return p}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(r,s,i,a){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(r,!1,i),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,s,i,a))}parseImportSpecifier(r,s,i,a,n){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(r,!0,i),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,s,i,a,i?4098:4096))}parseTypeOnlyImportExportSpecifier(r,s,i){const a=s?"imported":"local",n=s?"local":"exported";let o=r[a],u,p=!1,y=!0;const E=o.loc.start;if(this.isContextual(93)){const g=this.parseIdentifier();if(this.isContextual(93)){const C=this.parseIdentifier();ue(this.state.type)?(p=!0,o=g,u=s?this.parseIdentifier():this.parseModuleExportName(),y=!1):(u=C,y=!1)}else ue(this.state.type)?(y=!1,u=s?this.parseIdentifier():this.parseModuleExportName()):(p=!0,o=g)}else ue(this.state.type)&&(p=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());p&&i&&this.raise(s?k.TypeModifierIsUsedInTypeImports:k.TypeModifierIsUsedInTypeExports,E),r[a]=o,r[n]=u;const P=s?"importKind":"exportKind";r[P]=p?"type":"value",y&&this.eatContextual(93)&&(r[n]=s?this.parseIdentifier():this.parseModuleExportName()),r[n]||(r[n]=Te(r[a])),s&&this.checkIdentifier(r[n],p?4098:4096)}};function yo(t){if(t.type!=="MemberExpression")return!1;const{computed:e,property:r}=t;return e&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:hi(t.object)}function mo(t,e){var r;const{type:s}=t;if((r=t.extra)!=null&&r.parenthesized)return!1;if(e){if(s==="Literal"){const{value:i}=t;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(di(t,e)||To(t,e)||s==="TemplateLiteral"&&t.expressions.length===0||yo(t))}function di(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function To(t,e){if(t.type==="UnaryExpression"){const{operator:r,argument:s}=t;if(r==="-"&&di(s,e))return!0}return!1}function hi(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:hi(t.object)}const yi=de`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var So=t=>class extends t{parsePlaceholder(r){if(this.match(133)){const s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(s,r)}}finishPlaceholder(r,s){let i=r;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=s,i}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,s,i,a){r!==void 0&&super.checkReservedWord(r,s,i,a)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,s,i){return r==="Placeholder"||super.isValidLVal(r,s,i)}toAssignable(r,s){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,s)}chStartsBindingIdentifier(r,s){return!!(super.chStartsBindingIdentifier(r,s)||this.lookahead().type===133)}verifyBreakContinue(r,s){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,s)}parseExpressionStatement(r,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(r,s);if(this.match(14)){const n=r;return n.label=this.finishPlaceholder(s,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}this.semicolon();const a=r;return a.name=s.name,this.finishPlaceholder(a,"Statement")}parseBlock(r,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,s,i)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,s,i){const a=s?"ClassDeclaration":"ClassExpression";this.next();const n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))r.id=o;else{if(i||!s)return r.id=null,r.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(r,a);throw this.raise(yi.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,s,i);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,n),this.finishNode(r,a)}parseExport(r,s){const i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(r,s);const a=r;if(!this.isContextual(98)&&!this.match(12))return a.specifiers=[],a.source=null,a.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(a,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=i,a.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(a,s)}isExportDefaultSpecifier(){if(this.match(65)){const r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(Ie(133),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,s){var i;return(i=r.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(r,s)}checkExport(r){const{specifiers:s}=r;s!=null&&s.length&&(r.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=s}parseImport(r){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");const i=this.startNodeAtNode(s);return i.local=s,r.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(yi.UnexpectedSpace,this.state.lastTokEndLoc)}},xo=t=>class extends t{parseV8Intrinsic(){if(this.match(54)){const r=this.state.startLoc,s=this.startNode();if(this.next(),W(this.state.type)){const i=this.parseIdentifierName(),a=this.createIdentifier(s,i);if(a.type="V8IntrinsicIdentifier",this.match(10))return a}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}};const mi=["minimal","fsharp","hack","smart"],Ti=["^^","@@","^","%","#"];function bo(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const r=t.get("decorators").decoratorsBeforeExport;if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const s=t.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){var e;const r=t.get("pipelineOperator").proposal;if(!mi.includes(r)){const i=mi.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}const s=((e=t.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash";if(r==="hack"){if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const i=t.get("pipelineOperator").topicToken;if(!Ti.includes(i)){const a=Ti.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${a}.`)}if(i==="#"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}else if(r==="smart"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}if(t.has("moduleAttributes")){if(t.has("deprecatedImportAssert")||t.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(t.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(t.has("importAssertions")&&t.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!t.has("deprecatedImportAssert")&&t.has("importAttributes")&&t.get("importAttributes").deprecatedAssertSyntax&&t.set("deprecatedImportAssert",{}),t.has("recordAndTuple")){const r=t.get("recordAndTuple").syntaxType;if(r!=null){const s=["hash","bar"];if(!s.includes(r))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+s.map(i=>`'${i}'`).join(", "))}}if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){const r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}if(t.has("optionalChainingAssign")&&t.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'.")}const Si={estree:on,jsx:no,flow:io,typescript:ho,v8intrinsic:xo,placeholders:So},Eo=Object.keys(Si);class Po extends uo{checkProto(e,r,s,i){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return;const a=e.key;if((a.type==="Identifier"?a.name:a.value)==="__proto__"){if(r){this.raise(x.RecordNoProto,a);return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=a.loc.start):this.raise(x.DuplicateProto,a)),s.used=!0}}shouldExitDescending(e,r){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===r}getExpression(){this.enterInitialScopes(),this.nextToken();const e=this.parseExpression();return this.match(140)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&128&&(e.tokens=this.tokens),e}parseExpression(e,r){return e?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(e){const r=this.state.startLoc,s=this.parseMaybeAssign(e);if(this.match(12)){const i=this.startNodeAt(r);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e,r){return this.disallowInAnd(()=>this.parseMaybeAssign(e,r))}parseMaybeAssignAllowIn(e,r){return this.allowInAnd(()=>this.parseMaybeAssign(e,r))}setOptionalParametersError(e,r){var s;e.optionalParametersLoc=(s=r==null?void 0:r.loc)!=null?s:this.state.startLoc}parseMaybeAssign(e,r){const s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return r&&(o=r.call(this,o,s)),o}let i;e?i=!1:(e=new Ct,i=!0);const{type:a}=this.state;(a===10||W(a))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(e);if(r&&(n=r.call(this,n,s)),fn(this.state.type)){const o=this.startNodeAt(s),u=this.state.value;if(o.operator=u,this.match(29)){this.toAssignable(n,!0),o.left=n;const p=s.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=p&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=p&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=p&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,this.finishNode(o,"AssignmentExpression")),o}else i&&this.checkExpressionErrors(e,!0);return n}parseMaybeConditional(e){const r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(e);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,r,e)}parseConditional(e,r,s){if(this.eat(17)){const i=this.startNodeAt(r);return i.test=e,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,r,-1)}parseExprOp(e,r,s){if(this.isPrivateName(e)){const a=this.getPrivateNameSV(e);(s>=Pt(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(x.PrivateInExpectedIn,e,{identifierName:a}),this.classScope.usePrivateName(a,e.loc.start)}const i=this.state.type;if(hn(i)&&(this.prodParam.hasIn||!this.match(58))){let a=Pt(i);if(a>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,r)}const n=this.startNodeAt(r);n.left=e,n.operator=this.state.value;const o=i===41||i===42,u=i===40;if(u&&(a=Pt(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(x.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);n.right=this.parseExprOpRightExpr(i,a);const p=this.finishNode(n,o||u?"LogicalExpression":"BinaryExpression"),y=this.state.type;if(u&&(y===41||y===42)||o&&y===40)throw this.raise(x.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(p,r,s)}}return e}parseExprOpRightExpr(e,r){const s=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(x.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,r),s)});default:return this.parseExprOpBaseRightExpr(e,r)}}parseExprOpBaseRightExpr(e,r){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,xn(e)?r-1:r)}parseHackPipeBody(){var e;const{startLoc:r}=this.state,s=this.parseMaybeAssign();return Za.has(s.type)&&!((e=s.extra)!=null&&e.parenthesized)&&this.raise(x.PipeUnparenthesizedBody,r,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(x.PipeTopicUnused,r),s}checkExponentialAfterUnary(e){this.match(57)&&this.raise(x.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,r){const s=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();const u=this.parseAwait(s);return r||this.checkExponentialAfterUnary(u),u}const a=this.match(34),n=this.startNode();if(mn(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const u=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&u){const p=n.argument;p.type==="Identifier"?this.raise(x.StrictDelete,n):this.hasPropertyAsPrivateName(p)&&this.raise(x.DeletePrivateField,n)}if(!a)return r||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}const o=this.parseUpdate(n,a,e);if(i){const{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?gr(u):gr(u)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(x.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(e,r,s){if(r){const n=e;return this.checkLVal(n.argument,this.finishNode(n,"UpdateExpression")),e}const i=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;yn(this.state.type)&&!this.canInsertSemicolon();){const n=this.startNodeAt(i);n.operator=this.state.value,n.prefix=!1,n.argument=a,this.next(),this.checkLVal(a,a=this.finishNode(n,"UpdateExpression"))}return a}parseExprSubscripts(e){const r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,r)}parseSubscripts(e,r,s){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,r,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return e}parseSubscript(e,r,s,i){const{type:a}=this.state;if(!s&&a===15)return this.parseBind(e,r,s,i);if(gt(a))return this.parseTaggedTemplateExpression(e,r,i);let n=!1;if(a===18){if(s&&(this.raise(x.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,e;i.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,r,i,n);{const o=this.eat(0);return o||n||this.eat(16)?this.parseMember(e,r,i,o,n):(i.stop=!0,e)}}parseMember(e,r,s,i,a){const n=this.startNodeAt(r);return n.object=e,n.computed=i,i?(n.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise(x.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=a,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(e,r,s,i){const a=this.startNodeAt(r);return a.object=e,this.next(),a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),r,s)}parseCoverCallAndAsyncArrowHead(e,r,s,i){const a=this.state.maybeInArrowParameters;let n=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(r);o.callee=e;const{maybeAsyncArrow:u,optionalChainMember:p}=s;u&&(this.expressionScope.enter(qn()),n=new Ct),p&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,e.type!=="Super",o,n);let y=this.finishCallExpression(o,p);return u&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),y=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),y)):(u&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(y)),this.state.maybeInArrowParameters=a,y}toReferencedArguments(e,r){this.toReferencedListDeep(e.arguments,r)}parseTaggedTemplateExpression(e,r,s){const i=this.startNodeAt(r);return i.tag=e,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(x.OptionalChainingNoTemplate,r),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,r){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(x.ImportCallArity,e);else for(const s of e.arguments)s.type==="SpreadElement"&&this.raise(x.ImportCallSpreadArgument,s);return this.finishNode(e,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,r,s,i){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(n)n=!1;else if(this.expect(12),this.match(e)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(!1,i,r))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,r){var s;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(e,r.arguments,!0,(s=r.extra)==null?void 0:s.trailingCommaLoc),r.innerComments&&tt(e,r.innerComments),r.callee.trailingComments&&tt(e,r.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let r,s=null;const{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(r):this.match(10)?this.optionFlags&256?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(x.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134: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:{const a=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(a)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);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:{r=this.startNode(),this.next(),r.object=null;const a=r.callee=this.parseNoCallExpr();if(a.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(x.UnsupportedBind,a)}case 139:return this.raise(x.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:{const a=this.getPluginOption("pipelineOperator","proposal");if(a)return this.parseTopicReference(a);this.unexpected();break}case 47:{const a=this.input.codePointAt(this.nextTokenStart());me(a)||a===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(i===137)return this.parseDecimalLiteral(this.state.value);if(W(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const a=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){const{type:u}=this.state;if(u===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(W(u))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(u===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return a&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(e,r){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=e,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=se(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(e){const r=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(r,s,e,i)}finishTopicReference(e,r,s,i){if(this.testTopicReferenceConfiguration(s,r,i))return s==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(x.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(x.PrimaryTopicNotAllowed,r),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(x.PipeTopicUnconfiguredToken,r,{token:Ie(i)})}testTopicReferenceConfiguration(e,r,s){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ie(s)}]);case"smart":return s===27;default:throw this.raise(x.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Nt(!0,this.prodParam.hasYield));const r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(x.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,r,!0)}parseDo(e,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),e.async=r,this.next();const s=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=s,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!(this.optionFlags&16)?this.raise(x.SuperNotAllowed,e):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(x.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(x.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),r=this.startNodeAt(se(this.state.startLoc,1)),s=this.state.value;return this.next(),e.id=this.createIdentifier(r,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const r=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,r,"sent")}return this.parseFunction(e)}parseMetaProperty(e,r,s){e.meta=r;const i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||i)&&this.raise(x.UnsupportedMetaProperty,e.property,{target:r.name,onlyValidPropertyName:s}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const r=this.createIdentifier(this.startNodeAtNode(e),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(x.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);if(this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!(this.optionFlags&256))throw this.raise(x.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),e.phase=s?"source":"defer",this.parseImportCall(e)}return this.parseMetaProperty(e,r,"meta")}parseLiteralAtNode(e,r,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.value=e,this.next(),this.finishNode(s,r)}parseLiteral(e,r){const s=this.startNode();return this.parseLiteralAtNode(e,r,s)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const r=this.startNode();return this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.pattern=e.pattern,r.flags=e.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(e){const r=this.startNode();return r.value=e,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const r=this.state.startLoc;let s;this.next(),this.expressionScope.enter(Jn());const i=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const n=this.state.startLoc,o=[],u=new Ct;let p=!0,y,E;for(;!this.match(11);){if(p)p=!1;else if(this.expect(12,u.optionalParametersLoc===null?null:u.optionalParametersLoc),this.match(11)){E=this.state.startLoc;break}if(this.match(21)){const C=this.state.startLoc;if(y=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),C)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(u,this.parseParenItem))}const P=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=a;let g=this.startNodeAt(r);return e&&this.shouldParseArrow(o)&&(g=this.parseArrow(g))?(this.checkDestructuringPrivate(u),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(g,o,!1),g):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),E&&this.unexpected(E),y&&this.unexpected(y),this.checkExpressionErrors(u,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,P)):s=o[0],this.wrapParenthesis(r,s))}wrapParenthesis(e,r){if(!(this.optionFlags&512))return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e.index),this.takeSurroundingComments(r,e.index,this.state.lastTokEndLoc.index),r;const s=this.startNodeAt(e);return s.expression=r,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,r){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(16)){const r=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const s=this.parseMetaProperty(e,r,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!(this.optionFlags&4)&&this.raise(x.UnexpectedNewTarget,s),s}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){const r=this.parseExprList(11);this.toReferencedList(r),e.arguments=r}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const r=this.match(83),s=this.parseNoCallExpr();e.callee=s,r&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(x.ImportCallNotNewExpression,s)}parseTemplateElement(e){const{start:r,startLoc:s,end:i,value:a}=this.state,n=r+1,o=this.startNodeAt(se(s,1));a===null&&(e||this.raise(x.InvalidEscapeSequenceTemplate,se(this.state.firstInvalidTemplateEscapePos,1)));const u=this.match(24),p=u?-1:-2,y=i+p;o.value={raw:this.input.slice(n,y).replace(/\r\n?/g,`
|
|
169
|
-
`),cooked:a===null?null:a.slice(1,p)},o.tail=u,this.next();const E=this.finishNode(o,"TemplateElement");return this.resetEndLocation(E,se(this.state.lastTokEndLoc,p)),E}parseTemplate(e){const r=this.startNode();let s=this.parseTemplateElement(e);const i=[s],a=[];for(;!s.tail;)a.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return r.expressions=a,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,r,s,i){s&&this.expectPlugin("recordAndTuple");const a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=Object.create(null);let o=!0;const u=this.startNode();for(u.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(u);break}let y;r?y=this.parseBindingProperty():(y=this.parsePropertyDefinition(i),this.checkProto(y,s,n,i)),s&&!this.isObjectProperty(y)&&y.type!=="SpreadElement"&&this.raise(x.InvalidRecordProperty,y),y.shorthand&&this.addExtra(y,"shorthand",!0),u.properties.push(y)}this.next(),this.state.inFSharpPipelineDirectBody=a;let p="ObjectExpression";return r?p="ObjectPattern":s&&(p="RecordExpression"),this.finishNode(u,p)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(x.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());const s=this.startNode();let i=!1,a=!1,n;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(s.decorators=r,r=[]),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);const u=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!u&&this.maybeAsyncOrAccessorProp(s)){const{key:p}=s,y=p.name;y==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(p),o=this.eat(55),this.parsePropertyName(s)),(y==="get"||y==="set")&&(a=!0,this.resetPreviousNodeTrailingComments(p),s.kind=y,this.match(55)&&(o=!0,this.raise(x.AccessorIsGenerator,this.state.curPosition(),{kind:y}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,a,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var r;const s=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==s&&this.raise(e.kind==="get"?x.BadGetterArity:x.BadSetterArity,e),e.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(x.BadSetterRestParameter,e)}parseObjectMethod(e,r,s,i,a){if(a){const n=this.parseMethod(e,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||r||this.match(10))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,r,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,r,s,i){if(e.shorthand=!1,this.eat(14))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty");if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),s)e.value=this.parseMaybeDefault(r,Te(e.key));else if(this.match(29)){const a=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=a):this.raise(x.InvalidCoverInitializedName,a),e.value=this.parseMaybeDefault(r,Te(e.key))}else e.value=Te(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,r,s,i,a,n,o){const u=this.parseObjectMethod(e,s,i,a,n)||this.parseObjectProperty(e,r,a,o);return u||this.unexpected(),u}parsePropertyName(e,r){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:i}=this.state;let a;if(ue(s))a=this.parseIdentifier(!0);else switch(s){case 135:a=this.parseNumericLiteral(i);break;case 134:a=this.parseStringLiteral(i);break;case 136:a=this.parseBigIntLiteral(i);break;case 139:{const n=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=n):this.raise(x.UnexpectedPrivateField,n),a=this.parsePrivateName();break}default:if(s===137){a=this.parseDecimalLiteral(i);break}this.unexpected()}e.key=a,s!==139&&(e.computed=!1)}}initFunction(e,r){e.id=null,e.generator=!1,e.async=r}parseMethod(e,r,s,i,a,n,o=!1){this.initFunction(e,s),e.generator=r,this.scope.enter(18|(o?64:0)|(a?32:0)),this.prodParam.enter(Nt(s,e.generator)),this.parseFunctionParams(e,i);const u=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),u}parseArrayLike(e,r,s,i){s&&this.expectPlugin("recordAndTuple");const a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=this.startNode();return this.next(),n.elements=this.parseExprList(e,!s,i,n),this.state.inFSharpPipelineDirectBody=a,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,r,s,i){this.scope.enter(6);let a=Nt(s,!1);!this.match(5)&&this.prodParam.hasIn&&(a|=8),this.prodParam.enter(a),this.initFunction(e,s);const n=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,r,s){this.toAssignableList(r,s,!1),e.params=r}parseFunctionBodyAndFinish(e,r,s=!1){return this.parseFunctionBody(e,!1,s),this.finishNode(e,r)}parseFunctionBody(e,r,s=!1){const i=r&&!this.match(5);if(this.expressionScope.enter(li()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,r,!1);else{const a=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,o=>{const u=!this.isSimpleParamList(e.params);o&&u&&this.raise(x.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);const p=!a&&this.state.strict;this.checkParams(e,!this.state.strict&&!r&&!s&&!u,r,p),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,p)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let r=0,s=e.length;r<s;r++)if(!this.isSimpleParameter(e[r]))return!1;return!0}checkParams(e,r,s,i=!0){const a=!r&&new Set,n={type:"FormalParameters"};for(const o of e.params)this.checkLVal(o,n,5,a,i)}parseExprList(e,r,s,i){const a=[];let n=!0;for(;!this.eat(e);){if(n)n=!1;else if(this.expect(12),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}a.push(this.parseExprListItem(r,s))}return a}parseExprListItem(e,r,s){let i;if(this.match(12))e||this.raise(x.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){const a=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),a)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(x.UnexpectedArgumentPlaceholder,this.state.startLoc);const a=this.startNode();this.next(),i=this.finishNode(a,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return i}parseIdentifier(e){const r=this.startNode(),s=this.parseIdentifierName(e);return this.createIdentifier(r,s)}createIdentifier(e,r){return e.name=r,e.loc.identifierName=r,this.finishNode(e,"Identifier")}parseIdentifierName(e){let r;const{startLoc:s,type:i}=this.state;ue(i)?r=this.state.value:this.unexpected();const a=cn(i);return e?a&&this.replaceToken(132):this.checkReservedWord(r,s,a,!1),this.next(),r}checkReservedWord(e,r,s,i){if(e.length>10||!wn(e))return;if(s&&vn(e)){this.raise(x.UnexpectedKeyword,r,{keyword:e});return}if((this.state.strict?i?ei:Qs:Gs)(e,this.inModule)){this.raise(x.UnexpectedReservedWord,r,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(x.YieldBindingIdentifier,r);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(x.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(x.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(x.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){const r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(x.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(x.ObsoleteAwaitStar,r),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return e===53||e===10||e===0||gt(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(){const e=this.startNode();this.expressionScope.recordParameterInitializerError(x.YieldInParameter,e),this.next();let r=!1,s=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:s=this.parseMaybeAssign()}return e.delegate=r,e.argument=s,this.finishNode(e,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)&&!this.match(11)&&(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(x.ImportCallArity,e)}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(x.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(e,r){if(this.isSimpleReference(e)){const s=this.startNodeAt(r);return s.callee=e,this.finishNode(s,"PipelineBareFunction")}else{const s=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),s.expression=e,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(x.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(x.PipelineTopicUnused,e)}withTopicBindingContext(e){const r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}else return e()}withSoloAwaitPermittingContext(e){const r=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=r}}allowInAnd(e){const r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return e()}finally{this.prodParam.exit()}}return e()}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(e){const r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,e);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const r=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(r,8,"module")}finally{s()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}}const _r={kind:1},go={kind:2},Ao=/[\uD800-\uDFFF]/u,Br=/in(?:stanceof)?/y;function Io(t,e,r){for(let s=0;s<t.length;s++){const i=t[s],{type:a}=i;if(typeof a=="number"){{if(a===139){const{loc:n,start:o,value:u,end:p}=i,y=o+1,E=se(n.start,1);t.splice(s,1,new ve({type:ye(27),value:"#",start:o,end:y,startLoc:n.start,endLoc:E}),new ve({type:ye(132),value:u,start:y,end:p,startLoc:E,endLoc:n.end})),s++;continue}if(gt(a)){const{loc:n,start:o,value:u,end:p}=i,y=o+1,E=se(n.start,1);let P;e.charCodeAt(o-r)===96?P=new ve({type:ye(22),value:"`",start:o,end:y,startLoc:n.start,endLoc:E}):P=new ve({type:ye(8),value:"}",start:o,end:y,startLoc:n.start,endLoc:E});let g,C,A,O;a===24?(C=p-1,A=se(n.end,-1),g=u===null?null:u.slice(1,-1),O=new ve({type:ye(22),value:"`",start:C,end:p,startLoc:A,endLoc:n.end})):(C=p-2,A=se(n.end,-2),g=u===null?null:u.slice(1,-2),O=new ve({type:ye(23),value:"${",start:C,end:p,startLoc:A,endLoc:n.end})),t.splice(s,1,P,new ve({type:ye(20),value:g,start:y,end:C,startLoc:E,endLoc:A}),O),s+=2;continue}}i.type=ye(a)}}return t}class vo extends Po{parseTopLevel(e,r){return e.program=this.parseProgram(r),e.comments=this.comments,this.optionFlags&128&&(e.tokens=Io(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,r=140,s=this.options.sourceType){if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,r),this.inModule){if(!(this.optionFlags&32)&&this.scope.undefinedExports.size>0)for(const[a,n]of Array.from(this.scope.undefinedExports))this.raise(x.ModuleExportUndefined,n,{localName:a});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===140?i=this.finishNode(e,"Program"):i=this.finishNodeAt(e,"Program",se(this.state.startLoc,-1)),i}stmtToDirective(e){const r=e;r.type="Directive",r.value=r.expression,delete r.expression;const s=r.value,i=s.value,a=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),n=s.value=a.slice(1,-1);return this.addExtra(s,"raw",a),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(e,r){if(me(e)){if(Br.lastIndex=r,Br.test(this.input)){const s=this.codePointAtPos(Br.lastIndex);if(!Ke(s)&&s!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){const e=this.nextTokenStart(),r=this.codePointAtPos(e);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return r===123||this.chStartsBindingIdentifier(r,e)}startsUsingForOf(){const{type:e,containsEsc:r}=this.lookahead();if(e===102&&!r)return!1;if(W(e)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);const r=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(r,e))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(e=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,e&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(e,r)}parseStatementContent(e,r){const s=this.state.type,i=this.startNode(),a=!!(e&2),n=!!(e&4),o=e&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?x.StrictFunction:this.options.annexB?x.SloppyFunctionAnnexB:x.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!a&&n);case 80:return a||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?a||this.raise(x.UnexpectedLexicalDeclaration,i):this.raise(x.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(x.UnexpectedUsingDeclaration,this.state.startLoc):a||this.raise(x.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;const y=this.nextTokenStart(),E=this.codePointAtPos(y);if(E!==91&&(!a&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(E,y)&&E!==123))break}case 75:a||this.raise(x.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const y=this.state.value;return this.parseVarStatement(i,y)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{const y=this.lookaheadCharCode();if(y===40||y===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(x.UnexpectedImportExport,this.state.startLoc),this.next();let y;return s===83?(y=this.parseImport(i),y.type==="ImportDeclaration"&&(!y.importKind||y.importKind==="value")&&(this.sawUnambiguousESM=!0)):(y=this.parseExport(i,r),(y.type==="ExportNamedDeclaration"&&(!y.exportKind||y.exportKind==="value")||y.type==="ExportAllDeclaration"&&(!y.exportKind||y.exportKind==="value")||y.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(y),y}default:if(this.isAsyncFunction())return a||this.raise(x.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!a&&n)}const u=this.state.value,p=this.parseExpression();return W(s)&&p.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,u,p,e):this.parseExpressionStatement(i,p,r)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(x.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,r,s){if(e){var i;(i=r.decorators)!=null&&i.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(x.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...e)):r.decorators=e,this.resetStartLocationFromNode(r,e[0]),s&&this.resetStartLocationFromNode(s,r)}return r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(x.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(x.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const r=this.state.startLoc;let s;if(this.match(10)){const i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);const a=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(s,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==s&&this.raise(x.DecoratorArgumentsOutsideParentheses,a)}else{for(s=this.parseIdentifier(!1);this.eat(16);){const i=this.startNodeAt(r);i.object=s,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(s,r)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,r){if(this.eat(10)){const s=this.startNodeAt(r);return s.callee=e,s.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(s.arguments),this.finishNode(s,"CallExpression")}return e}parseBreakContinueStatement(e,r){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,r),this.finishNode(e,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,r){let s;for(s=0;s<this.state.labels.length;++s){const i=this.state.labels[s];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind===1)||e.label&&r))break}if(s===this.state.labels.length){const i=r?"BreakStatement":"ContinueStatement";this.raise(x.IllegalBreakContinue,e,{type:i})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(_r),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(_r);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(e,null);const s=this.isContextual(100);{const u=this.isContextual(96)&&this.startsAwaitUsing(),p=u||this.isContextual(107)&&this.startsUsingForOf(),y=s&&this.hasFollowingBindingAtom()||p;if(this.match(74)||this.match(75)||y){const E=this.startNode();let P;u?(P="await using",this.recordAwaitIfAllowed()||this.raise(x.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):P=this.state.value,this.next(),this.parseVar(E,!0,P);const g=this.finishNode(E,"VariableDeclaration"),C=this.match(58);return C&&p&&this.raise(x.ForInUsing,g),(C||this.isContextual(102))&&g.declarations.length===1?this.parseForIn(e,g,r):(r!==null&&this.unexpected(r),this.parseFor(e,g))}}const i=this.isContextual(95),a=new Ct,n=this.parseExpression(!0,a),o=this.isContextual(102);if(o&&(s&&this.raise(x.ForOfLet,n),r===null&&i&&n.type==="Identifier"&&this.raise(x.ForOfAsync,n)),o||this.match(58)){this.checkDestructuringPrivate(a),this.toAssignable(n,!0);const u=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{type:u}),this.parseForIn(e,n,r)}else this.checkExpressionErrors(a,!0);return r!==null&&this.unexpected(r),this.parseFor(e,n)}parseFunctionStatement(e,r,s){return this.next(),this.parseFunction(e,1|(s?2:0)|(r?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!(this.optionFlags&2)&&this.raise(x.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const r=e.cases=[];this.expect(5),this.state.labels.push(go),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){const a=this.match(61);s&&this.finishNode(s,"SwitchCase"),r.push(s=this.startNode()),s.consequent=[],this.next(),a?s.test=this.parseExpression():(i&&this.raise(x.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!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(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(x.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){const r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(x.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,r,s=!1){return this.next(),this.parseVar(e,!1,r,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(_r),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(x.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,r,s,i){for(const n of this.state.labels)n.name===r&&this.raise(x.LabelRedeclaration,s,{labelName:r});const a=dn(this.state.type)?1:this.match(71)?2:null;for(let n=this.state.labels.length-1;n>=0;n--){const o=this.state.labels[n];if(o.statementStart===e.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=a;else break}return this.state.labels.push({name:r,kind:a,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,r,s){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,r=!0,s){const i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,e,!1,8,s),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,r,s,i,a){const n=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(n,r?o:void 0,s,i,a)}parseBlockOrModuleBlockBody(e,r,s,i,a){const n=this.state.strict;let o=!1,u=!1;for(;!this.match(i);){const p=s?this.parseModuleItem():this.parseStatementListItem();if(r&&!u){if(this.isValidDirective(p)){const y=this.stmtToDirective(p);r.push(y),!o&&y.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}u=!0,this.state.strictErrors.clear()}e.push(p)}a==null||a.call(this,o),n||this.setStrict(!1),this.next()}parseFor(e,r){return e.init=r,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,r,s){const i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):e.await=s!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(x.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(x.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),e.left=r,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,r,s,i=!1){const a=e.declarations=[];for(e.kind=s;;){const n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!i&&(n.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(x.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(x.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),a.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,r){const s=this.parseBindingAtom();(r==="using"||r==="await using")&&(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(x.UsingDeclarationHasBindingPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},r==="var"?5:8201),e.id=s}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,r=0){const s=r&2,i=!!(r&1),a=i&&!(r&4),n=!!(r&8);this.initFunction(e,n),this.match(55)&&(s&&this.raise(x.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(a));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Nt(n,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||W(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,r){this.expect(10),this.expressionScope.enter(Xn()),e.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,r,s){this.next();const i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,r,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,r){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:e};let i=[];const a=this.startNode();if(a.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(x.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}const n=this.startNode();i.length&&(n.decorators=i,this.resetStartLocationFromNode(n,i[0]),i=[]),this.parseClassMember(a,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(x.DecoratorConstructor,n)}}),this.state.strict=r,this.next(),i.length)throw this.raise(x.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(a,"ClassBody")}parseClassMemberFromModifier(e,r){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=r;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const i=r;return i.computed=!1,i.key=s,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,r,s){const i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(e,r))return;if(this.eat(5)){this.parseClassStaticBlock(e,r);return}}this.parseClassMemberWithIsStatic(e,r,s,i)}parseClassMemberWithIsStatic(e,r,s,i){const a=r,n=r,o=r,u=r,p=r,y=a,E=a;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){y.kind="method";const I=this.match(139);if(this.parseClassElementName(y),I){this.pushClassPrivateMethod(e,n,!0,!1);return}this.isNonstaticConstructor(a)&&this.raise(x.ConstructorIsGenerator,a.key),this.pushClassMethod(e,a,!0,!1,!1,!1);return}const P=!this.state.containsEsc&&W(this.state.type),g=this.parseClassElementName(r),C=P?g.name:null,A=this.isPrivateName(g),O=this.state.startLoc;if(this.parsePostMemberNameModifiers(E),this.isClassMethod()){if(y.kind="method",A){this.pushClassPrivateMethod(e,n,!1,!1);return}const I=this.isNonstaticConstructor(a);let N=!1;I&&(a.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(x.DuplicateConstructor,g),I&&this.hasPlugin("typescript")&&r.override&&this.raise(x.OverrideOnConstructor,g),s.hadConstructor=!0,N=s.hadSuperClass),this.pushClassMethod(e,a,!1,!1,I,N)}else if(this.isClassProperty())A?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,o);else if(C==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(g);const I=this.eat(55);E.optional&&this.unexpected(O),y.kind="method";const N=this.match(139);this.parseClassElementName(y),this.parsePostMemberNameModifiers(E),N?this.pushClassPrivateMethod(e,n,I,!0):(this.isNonstaticConstructor(a)&&this.raise(x.ConstructorIsAsync,a.key),this.pushClassMethod(e,a,I,!0,!1,!1))}else if((C==="get"||C==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(g),y.kind=C;const I=this.match(139);this.parseClassElementName(a),I?this.pushClassPrivateMethod(e,n,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(x.ConstructorIsAccessor,a.key),this.pushClassMethod(e,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a)}else if(C==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(g);const I=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(e,p,I)}else this.isLineTerminator()?A?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,o):this.unexpected()}parseClassElementName(e){const{type:r,value:s}=this.state;if((r===132||r===134)&&e.static&&s==="prototype"&&this.raise(x.StaticPrototype,this.state.startLoc),r===139){s==="constructor"&&this.raise(x.ConstructorClassPrivateField,this.state.startLoc);const i=this.parsePrivateName();return e.key=i,i}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,r){var s;this.scope.enter(208);const i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const a=r.body=[];this.parseBlockOrModuleBlockBody(a,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(r,"StaticBlock")),(s=r.decorators)!=null&&s.length&&this.raise(x.DecoratorStaticBlock,r)}pushClassProperty(e,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(x.ConstructorClassField,r.key),e.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(e,r){const s=this.parseClassPrivateProperty(r);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(e,r,s){!s&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(x.ConstructorClassField,r.key);const i=this.parseClassAccessorProperty(r);e.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(e,r,s,i,a,n){e.body.push(this.parseMethod(r,s,i,a,n,"ClassMethod",!0))}pushClassPrivateMethod(e,r,s,i){const a=this.parseMethod(r,s,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(a);const n=a.kind==="get"?a.static?6:2:a.kind==="set"?a.static?5:1:0;this.declareClassPrivateMethodInScope(a,n)}declareClassPrivateMethodInScope(e,r){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),r,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(li()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,r,s,i=8331){if(W(this.state.type))e.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(e.id,i);else if(s||!r)e.id=null;else throw this.raise(x.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,r){const s=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,s),a=!i||this.eat(12),n=a&&this.eatExportStar(e),o=n&&this.maybeParseExportNamespaceSpecifier(e),u=a&&(!o||this.eat(12)),p=i||n;if(n&&!o){if(i&&this.unexpected(),r)throw this.raise(x.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}const y=this.maybeParseExportNamedSpecifiers(e);i&&a&&!n&&!y&&this.unexpected(null,5),o&&u&&this.unexpected(null,98);let E;if(p||y){if(E=!1,r)throw this.raise(x.UnsupportedDecoratorExport,e);this.parseExportFrom(e,p)}else E=this.maybeParseExportDeclaration(e);if(p||y||E){var P;const g=e;if(this.checkExport(g,!0,!1,!!g.source),((P=g.declaration)==null?void 0:P.type)==="ClassDeclaration")this.maybeTakeDecorators(r,g.declaration,g);else if(r)throw this.raise(x.UnsupportedDecoratorExport,e);return this.finishNode(g,"ExportNamedDeclaration")}if(this.eat(65)){const g=e,C=this.parseExportDefaultExpression();if(g.declaration=C,C.type==="ClassDeclaration")this.maybeTakeDecorators(r,C,g);else if(r)throw this.raise(x.UnsupportedDecoratorExport,e);return this.checkExport(g,!0,!0),this.finishNode(g,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r==null?void 0:r.loc.start);const s=r||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var r,s;(s=(r=e).specifiers)!=null||(r.specifiers=[]);const i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){const r=e;r.specifiers||(r.specifiers=[]);const s=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(s)),r.source=null,r.declaration=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(x.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(x.UnsupportedDefaultExport,this.state.startLoc);const r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(W(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){const{type:i}=this.lookahead();if(W(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const r=this.nextTokenStart(),s=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||W(this.state.type)&&s)return!0;if(this.match(65)&&s){const i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(e,r){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(x.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(x.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(x.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,r,s,i){if(r){var a;if(s){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var n;const o=e.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(x.ExportDefaultFromAsIdentifier,o)}}else if((a=e.specifiers)!=null&&a.length)for(const o of e.specifiers){const{exported:u}=o,p=u.type==="Identifier"?u.name:u.value;if(this.checkDuplicateExports(o,p),!i&&o.local){const{local:y}=o;y.type!=="Identifier"?this.raise(x.ExportBindingIsString,o,{localName:y.value,exportName:p}):(this.checkReservedWord(y.name,y.loc.start,!0,!1),this.scope.checkLocalExport(y))}}else if(e.declaration){const o=e.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){const{id:u}=o;if(!u)throw new Error("Assertion failure");this.checkDuplicateExports(e,u.name)}else if(o.type==="VariableDeclaration")for(const u of o.declarations)this.checkDeclaration(u.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(const r of e.properties)this.checkDeclaration(r);else if(e.type==="ArrayPattern")for(const r of e.elements)r&&this.checkDeclaration(r);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(x.DuplicateDefaultExport,e):this.raise(x.DuplicateExport,e,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(e){const r=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const i=this.isContextual(130),a=this.match(134),n=this.startNode();n.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(n,a,e,i))}return r}parseExportSpecifier(e,r,s,i){return this.eatContextual(93)?e.exported=this.parseModuleExportName():r?e.exported=Gn(e.local):e.exported||(e.exported=Te(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const e=this.parseStringLiteral(this.state.value),r=Ao.exec(e.value);return r&&this.raise(x.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:r[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:r,value:s})=>s.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(e){const{specifiers:r}=e,s=r.length===1?r[0].type:null;if(e.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(x.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(e.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(x.DeferImportRequiresNamespace,r[0].loc.start);else if(e.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(x.ImportReflectionNotBinding,r[0].loc.start),((i=e.assertions)==null?void 0:i.length)>0&&this.raise(x.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){const{specifiers:r}=e;if(r!=null){const s=r.find(i=>{let a;if(i.type==="ExportSpecifier"?a=i.local:i.type==="ImportSpecifier"&&(a=i.imported),a!==void 0)return a.type==="Identifier"?a.name!=="default":a.value!=="default"});s!==void 0&&this.raise(x.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,r,s,i){r||(s==="module"?(this.expectPlugin("importReflection",i),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(e,r,null),null;const s=this.parseIdentifier(!0),{type:i}=this.state;return(ue(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(e,r,s.name,s.loc.start),null):(this.applyImportPhase(e,r,null),s)}isPrecedingIdImportPhase(e){const{type:r}=this.state;return W(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,r){e.specifiers=[];const i=!this.maybeParseDefaultImportSpecifier(e,r)||this.eat(12),a=i&&this.maybeParseStarImportSpecifier(e);return i&&!a&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var r;return(r=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,r,s){r.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(r,s))}finishImportSpecifier(e,r,s=8201){return this.checkLVal(e.local,{type:r},s),this.finishNode(e,r)}parseImportAttributes(){this.expect(5);const e=[],r=new Set;do{if(this.match(8))break;const s=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(x.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(134)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(x.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){const e=[],r=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(x.ModuleAttributeDifferentFromType,s.key),r.has(s.key.name)&&this.raise(x.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),r.add(s.key.name),this.expect(14),!this.match(134))throw this.raise(x.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let r;var s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?r=this.parseModuleAttributes():r=this.parseImportAttributes(),s=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(x.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),r=this.parseImportAttributes()):r=[];!s&&this.hasPlugin("importAssertions")?e.assertions=r:e.attributes=r}maybeParseDefaultImportSpecifier(e,r){if(r){const s=this.startNodeAtNode(r);return s.local=r,e.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(ue(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){const r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(x.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const s=this.startNode(),i=this.match(134),a=this.isContextual(130);s.imported=this.parseModuleExportName();const n=this.parseImportSpecifier(s,i,e.importKind==="type"||e.importKind==="typeof",a,void 0);e.specifiers.push(n)}}parseImportSpecifier(e,r,s,i,a){if(this.eatContextual(93))e.local=this.parseIdentifier();else{const{imported:n}=e;if(r)throw this.raise(x.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.loc.start,!0,!0),e.local||(e.local=Te(n))}return this.finishImportSpecifier(e,"ImportSpecifier",a)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}}class xi extends vo{constructor(e,r,s){e=an(e),super(e,r),this.options=e,this.initializeScopes(),this.plugins=s,this.filename=e.sourceFilename,this.startIndex=e.startIndex;let i=0;e.allowAwaitOutsideFunction&&(i|=1),e.allowReturnOutsideFunction&&(i|=2),e.allowImportExportEverywhere&&(i|=8),e.allowSuperOutsideMethod&&(i|=16),e.allowUndeclaredExports&&(i|=32),e.allowNewTargetOutsideFunction&&(i|=4),e.ranges&&(i|=64),e.tokens&&(i|=128),e.createImportExpressions&&(i|=256),e.createParenthesizedExpressions&&(i|=512),e.errorRecovery&&(i|=1024),e.attachComment&&(i|=2048),e.annexB&&(i|=4096),this.optionFlags=i}getScopeHandler(){return wr}parse(){this.enterInitialScopes();const e=this.startNode(),r=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,r),e.errors=this.state.errors,e.comments.length=this.state.commentsLen,e}}function No(t,e){var r;if(((r=e)==null?void 0:r.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";const s=st(e,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",st(e,t).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return e.sourceType="script",st(e,t).parse()}catch{}throw s}}else return st(e,t).parse()}function Co(t,e){const r=st(e,t);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function wo(t){const e={};for(const r of Object.keys(t))e[r]=ye(t[r]);return e}const Oo=wo(un);function st(t,e){let r=xi;const s=new Map;if(t!=null&&t.plugins){for(const i of t.plugins){let a,n;typeof i=="string"?a=i:[a,n]=i,s.has(a)||s.set(a,n||{})}bo(s),r=Do(s)}return new r(t,e,s)}const bi=new Map;function Do(t){const e=[];for(const i of Eo)t.has(i)&&e.push(i);const r=e.join("|");let s=bi.get(r);if(!s){s=xi;for(const i of e)s=Si[i](s);bi.set(r,s)}return s}var Lo=xt.parse=No;xt.parseExpression=Co,xt.tokTypes=Oo;const ko=t=>{const e=new Set;for(const r of t.program.body)if(r.type==="ExportDefaultDeclaration"&&e.add("default"),r.type==="ExportNamedDeclaration"){const{declaration:s,specifiers:i}=r;if(s)if(s.type==="FunctionDeclaration"&&s.id)e.add(s.id.name);else if(s.type==="VariableDeclaration"&&s.declarations.length)for(const a of s.declarations)a.id.type==="Identifier"&&e.add(a.id.name);else s.type==="ClassDeclaration"&&s.id&&e.add(s.id.name);i!=null&&i.length&&i.forEach(a=>{a.type==="ExportSpecifier"&&a.exported.type==="Identifier"&&e.add(a.exported.name)})}return Array.from(e)},Ei=t=>{const e=new Set(["render","mount","createApp","createRoot"]);for(const r of t.program.body){if(r.type!=="ImportDeclaration")continue;const s=r.source.value;if(typeof s=="string"){if(s==="lithent"&&r.specifiers.some(a=>{if(a.type==="ImportSpecifier"&&a.imported.type==="Identifier"){const n=a.imported.name;return e.has(n)}return!1}))return!0;if(s.startsWith("lithent/")){if(r.importKind==="type")continue;return!0}}}return!1},Mo=(t,e,r,s)=>{const i=[];let a=!1,n=0,o=0,u=null;for(const P of t.program.body){if(P.type==="ImportDeclaration"){n=P.end??n,u==null&&(u=P.start??null),P.source.value===r&&(a=!0);continue}if(P.type==="ExpressionStatement"&&P.expression.type==="StringLiteral"){const g=P;if(typeof g.directive=="string"){o=g.end??o;continue}}break}a||i.push(`import { createBoundary } from '${r}';`);const p=u??o??0,y=n||o||0;let E="";if(i.length){const P=p>0?e[p-1]:void 0,g=p>0&&P!==`
|
|
208
|
+
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(r){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(x.UnterminatedString,this.state.startLoc);const a=this.input.charCodeAt(this.state.pos);if(a===r)break;a===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):Ue(a)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){const r=++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);const i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){const a=this.input.slice(r,this.state.pos),n=no[a];if(++this.state.pos,n)return n}}return this.state.pos=r,"&"}jsxReadWord(){let r;const s=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(Ke(r)||r===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){const r=this.startNode();return this.match(141)?r.name=this.state.value:Ar(this.state.type)?r.name=Ie(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){const r=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;const i=this.startNodeAt(r);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){const r=this.state.startLoc;let s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){const i=this.startNodeAt(r);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(q.brace),this.next(),r=this.jsxParseExpressionContainer(r,q.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(De.AttributeIsEmpty,r),r;case 143:case 134:return this.parseExprAtom();default:throw this.raise(De.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(q.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,s){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{const i=this.parseExpression();r.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){const r=this.startNode();return this.match(5)?(this.setContext(q.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(q.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){const s=this.startNodeAt(r);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(r){const s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return r.attributes=s,r.selfClosing=this.eat(56),this.expect(144),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){const s=this.startNodeAt(r);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(r){const s=this.startNodeAt(r),i=[],a=this.jsxParseOpeningElementAt(r);let n=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case 143:if(r=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(r);break e}i.push(this.jsxParseElementAt(r));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const o=this.startNode();this.setContext(q.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,q.j_expr));break}default:this.unexpected()}Ce(a)&&!Ce(n)&&n!==null?this.raise(De.MissingClosingTagFragment,n):!Ce(a)&&Ce(n)?this.raise(De.MissingClosingTagElement,n,{openingTagName:Ve(a.name)}):!Ce(a)&&!Ce(n)&&Ve(n.name)!==Ve(a.name)&&this.raise(De.MissingClosingTagElement,n,{openingTagName:Ve(a.name)})}if(Ce(a)?(s.openingFragment=a,s.closingFragment=n):(s.openingElement=a,s.closingElement=n),s.children=i,this.match(47))throw this.raise(De.UnwrappedAdjacentJSXElements,this.state.startLoc);return Ce(a)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){const r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){const{context:s}=this.state;s[s.length-1]=r}parseExprAtom(r){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){const s=this.curContext();if(s===q.j_expr){this.jsxReadToken();return}if(s===q.j_oTag||s===q.j_cTag){if(me(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(144);return}if((r===34||r===39)&&s===q.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(r)}updateContext(r){const{context:s,type:i}=this.state;if(i===56&&r===143)s.splice(-2,2,q.j_cTag),this.state.canStartJSXElement=!1;else if(i===143)s.push(q.j_oTag);else if(i===144){const a=s[s.length-1];a===q.j_oTag&&r===56||a===q.j_cTag?(s.pop(),this.state.canStartJSXElement=s[s.length-1]===q.j_expr):(this.setContext(q.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=fn(i)}};class lo extends Nr{constructor(...e){super(...e),this.tsNames=new Map}}class uo extends wr{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new lo(e)}enter(e){e===256&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return e===256&&this.importsStack.pop(),e}hasImport(e,r){const s=this.importsStack.length;if(this.importsStack[s-1].has(e))return!0;if(!r&&s>1){for(let i=0;i<s-1;i++)if(this.importsStack[i].has(e))return!0}return!1}declareName(e,r,s){if(r&4096){this.hasImport(e,!0)&&this.parser.raise(x.VarRedeclaration,s,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}const i=this.currentScope();let a=i.tsNames.get(e)||0;if(r&1024){this.maybeExportDefined(i,e),i.tsNames.set(e,a|16);return}super.declareName(e,r,s),r&2&&(r&1||(this.checkRedeclarationInScope(i,e,r,s),this.maybeExportDefined(i,e)),a=a|1),r&256&&(a=a|2),r&512&&(a=a|4),r&128&&(a=a|8),a&&i.tsNames.set(e,a)}isRedeclaredInScope(e,r,s){const i=e.tsNames.get(r);if((i&2)>0){if(s&256){const a=!!(s&512),n=(i&4)>0;return a!==n}return!0}return s&128&&(i&8)>0?e.names.get(r)&2?!!(s&1):!1:s&2&&(i&1)>0?!0:super.isRedeclaredInScope(e,r,s)}checkLocalExport(e){const{name:r}=e;if(this.hasImport(r))return;const s=this.scopeStack.length;for(let i=s-1;i>=0;i--){const n=this.scopeStack[i].tsNames.get(r);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(e)}}const ci=t=>t.type==="ParenthesizedExpression"?ci(t.expression):t;class co extends Zn{toAssignable(e,r=!1){var s,i;let a;switch((e.type==="ParenthesizedExpression"||(s=e.extra)!=null&&s.parenthesized)&&(a=ci(e),r?a.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(x.InvalidParenthesizedAssignment,e):a.type!=="MemberExpression"&&!this.isOptionalMemberExpression(a)&&this.raise(x.InvalidParenthesizedAssignment,e):this.raise(x.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let o=0,u=e.properties.length,p=u-1;o<u;o++){var n;const y=e.properties[o],E=o===p;this.toAssignableObjectExpressionProp(y,E,r),E&&y.type==="RestElement"&&(n=e.extra)!=null&&n.trailingCommaLoc&&this.raise(x.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:o,value:u}=e;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(u,r);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":e.type="ArrayPattern",this.toAssignableList(e.elements,(i=e.extra)==null?void 0:i.trailingCommaLoc,r);break;case"AssignmentExpression":e.operator!=="="&&this.raise(x.MissingEqInAssignment,e.left.loc.end),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,r);break;case"ParenthesizedExpression":this.toAssignable(a,r);break}}toAssignableObjectExpressionProp(e,r,s){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?x.PatternHasAccessor:x.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){e.type="RestElement";const i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),r||this.raise(x.RestTrailingComma,e)}else this.toAssignable(e,s)}toAssignableList(e,r,s){const i=e.length-1;for(let a=0;a<=i;a++){const n=e[a];if(n){if(n.type==="SpreadElement"){n.type="RestElement";const o=n.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,s)}else this.toAssignable(n,s);n.type==="RestElement"&&(a<i?this.raise(x.RestTrailingComma,n):r&&this.raise(x.RestTrailingComma,r))}}}isAssignable(e,r){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const s=e.properties.length-1;return e.properties.every((i,a)=>i.type!=="ObjectMethod"&&(a===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(e,r){return e}toReferencedListDeep(e,r){this.toReferencedList(e,r);for(const s of e)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(e){const r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,r,s){const i=s&1,a=[];let n=!0;for(;!this.eat(e);)if(n?n=!1:this.expect(12),i&&this.match(12))a.push(null);else{if(this.eat(e))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(o=this.parseFunctionParamType(o)),a.push(o),!this.checkCommaAfterRest(r)){this.expect(e);break}}else{const o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(x.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());a.push(this.parseAssignableListItem(s,o))}}return a}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:r}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());const s=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,r,!1,!1,!0,!1)}parseAssignableListItem(e,r){const s=this.parseMaybeDefault();(this.hasPlugin("flow")||e&2)&&this.parseFunctionParamType(s);const i=this.parseMaybeDefault(s.loc.start,s);return r.length&&(s.decorators=r),i}parseFunctionParamType(e){return e}parseMaybeDefault(e,r){var s,i;if((s=e)!=null||(e=this.state.startLoc),r=(i=r)!=null?i:this.parseBindingAtom(),!this.eat(29))return r;const a=this.startNodeAt(e);return a.left=r,a.right=this.parseMaybeAssignAllowIn(),this.finishNode(a,"AssignmentPattern")}isValidLVal(e,r,s){switch(e){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(e){return e.type==="OptionalMemberExpression"}checkLVal(e,r,s=64,i=!1,a=!1,n=!1){var o;const u=e.type;if(this.isObjectMethod(e))return;const p=this.isOptionalMemberExpression(e);if(p||u==="MemberExpression"){p&&(this.expectPlugin("optionalChainingAssign",e.loc.start),r.type!=="AssignmentExpression"&&this.raise(x.InvalidLhsOptionalChaining,e,{ancestor:r})),s!==64&&this.raise(x.InvalidPropertyBindingPattern,e);return}if(u==="Identifier"){this.checkIdentifier(e,s,a);const{name:A}=e;i&&(i.has(A)?this.raise(x.ParamDupe,e):i.add(A));return}const y=this.isValidLVal(u,!(n||(o=e.extra)!=null&&o.parenthesized)&&r.type==="AssignmentExpression",s);if(y===!0)return;if(y===!1){const A=s===64?x.InvalidLhs:x.InvalidLhsBinding;this.raise(A,e,{ancestor:r});return}let E,P;typeof y=="string"?(E=y,P=u==="ParenthesizedExpression"):[E,P]=y;const g=u==="ArrayPattern"||u==="ObjectPattern"?{type:u}:r,N=e[E];if(Array.isArray(N))for(const A of N)A&&this.checkLVal(A,g,s,i,a,P);else N&&this.checkLVal(N,g,s,i,a,P)}checkIdentifier(e,r,s=!1){this.state.strict&&(s?ei(e.name,this.inModule):Zs(e.name))&&(r===64?this.raise(x.StrictEvalArguments,e,{referenceName:e.name}):this.raise(x.StrictEvalArgumentsBinding,e,{bindingName:e.name})),r&8192&&e.name==="let"&&this.raise(x.LetInLexicalBinding,e),r&64||this.declareNameFromIdentifier(e,r)}declareNameFromIdentifier(e,r){this.scope.declareName(e.name,r,e.loc.start)}checkToRestConversion(e,r){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(x.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?x.RestTrailingComma:x.ElementAfterRest,this.state.startLoc),!0):!1}}function po(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function pi(t){if(!t)throw new Error("Assert fail")}const k=de`typescript`({AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' 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:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:t})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' 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:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,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:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[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:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,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:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,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:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`});function fo(t){switch(t){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 fi(t){return t==="private"||t==="public"||t==="protected"}function ho(t){return t==="in"||t==="out"}var yo=t=>class extends t{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:k.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter})}getScopeHandler(){return uo}tsIsIdentifier(){return W(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,s){if(!W(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;const i=this.state.value;if(r.includes(i)){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:a=k.InvalidModifierOnTypeMember},n){const o=(p,y,E,P)=>{y===E&&n[P]&&this.raise(k.InvalidModifiersOrder,p,{orderedModifiers:[E,P]})},u=(p,y,E,P)=>{(n[E]&&y===P||n[P]&&y===E)&&this.raise(k.IncompatibleModifiers,p,{modifiers:[E,P]})};for(;;){const{startLoc:p}=this.state,y=this.tsParseModifier(r.concat(s??[]),i);if(!y)break;fi(y)?n.accessibility?this.raise(k.DuplicateAccessibilityModifier,p,{modifier:y}):(o(p,y,y,"override"),o(p,y,y,"static"),o(p,y,y,"readonly"),n.accessibility=y):ho(y)?(n[y]&&this.raise(k.DuplicateModifier,p,{modifier:y}),n[y]=!0,o(p,y,"in","out")):(hasOwnProperty.call(n,y)?this.raise(k.DuplicateModifier,p,{modifier:y}):(o(p,y,"static","readonly"),o(p,y,"static","override"),o(p,y,"override","readonly"),o(p,y,"abstract","override"),u(p,y,"declare","override"),u(p,y,"static","abstract")),n[y]=!0),s!=null&&s.includes(y)&&this.raise(a,p,{modifier:y})}}tsIsListTerminator(r){switch(r){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(r,s){const i=[];for(;!this.tsIsListTerminator(r);)i.push(s());return i}tsParseDelimitedList(r,s,i){return po(this.tsParseDelimitedListWorker(r,s,!0,i))}tsParseDelimitedListWorker(r,s,i,a){const n=[];let o=-1;for(;!this.tsIsListTerminator(r);){o=-1;const u=s();if(u==null)return;if(n.push(u),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;i&&this.expect(12);return}return a&&(a.value=o),n}tsParseBracketedList(r,s,i,a,n){a||(i?this.expect(0):this.expect(47));const o=this.tsParseDelimitedList(r,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){const r=this.startNode();return this.expect(83),this.expect(10),this.match(134)?r.argument=this.parseStringLiteral(this.state.value):(this.raise(k.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom()),this.eat(12)&&!this.match(11)?(r.options=super.parseMaybeAssignAllowIn(),this.eat(12)):r.options=null,this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName(3)),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseEntityName(r){let s;if(r&1&&this.match(78))if(r&2)s=this.parseIdentifier(!0);else{const i=this.startNode();this.next(),s=this.finishNode(i,"ThisExpression")}else s=this.parseIdentifier(!!(r&1));for(;this.eat(16);){const i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(!!(r&1)),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){const r=this.startNode();return r.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();const s=this.startNodeAtNode(r);return s.parameterName=r,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){const r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){const r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){const s=this.startNode();return r(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){const s=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,i),s.params.length===0&&this.raise(k.EmptyTypeParameters,s),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(r,s){const i=r===19,a="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[a]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){const r=super.parseBindingList(11,41,2);for(const s of r){const{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(k.UnsupportedSignatureParameterKind,s,{type:i})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),W(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);const s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),r.parameters=[s];const i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,s){this.eat(17)&&(r.optional=!0);const i=r;if(this.match(10)||this.match(47)){s&&this.raise(k.ReadonlyForMethodSignature,r);const a=i;a.kind&&this.match(47)&&this.raise(k.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,a),this.tsParseTypeMemberSemicolon();const n="parameters",o="typeAnnotation";if(a.kind==="get")a[n].length>0&&(this.raise(x.BadGetterArity,this.state.curPosition()),this.isThisParam(a[n][0])&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(a.kind==="set"){if(a[n].length!==1)this.raise(x.BadSetterArity,this.state.curPosition());else{const u=a[n][0];this.isThisParam(u)&&this.raise(k.AccessorCannotDeclareThisParameter,this.state.curPosition()),u.type==="Identifier"&&u.optional&&this.raise(k.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),u.type==="RestElement"&&this.raise(k.SetAccessorCannotHaveRestParameter,this.state.curPosition())}a[o]&&this.raise(k.SetAccessorCannotHaveReturnType,a[o])}else a.kind="method";return this.finishNode(a,"TSMethodSignature")}else{const a=i;s&&(a.readonly=!0);const n=this.tsTryParseTypeAnnotation();return n&&(a.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSPropertySignature")}}tsParseTypeMember(){const r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){const i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);const s=this.tsTryParseIndexSignature(r);return s||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){const r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}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(){const r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{const s=this.startNode();s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(s,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){const r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return r.elementTypes.forEach(i=>{const{type:a}=i;s&&a!=="TSRestType"&&a!=="TSOptionalType"&&!(a==="TSNamedTupleMember"&&i.optional)&&this.raise(k.OptionalTypeBeforeRequired,i),s||(s=a==="TSNamedTupleMember"&&i.optional||a==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){const r=this.state.startLoc,s=this.eat(21),{startLoc:i}=this.state;let a,n,o,u;const y=ue(this.state.type)?this.lookaheadCharCode():null;if(y===58)a=!0,o=!1,n=this.parseIdentifier(!0),this.expect(14),u=this.tsParseType();else if(y===63){o=!0;const E=this.state.value,P=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(a=!0,n=this.createIdentifier(this.startNodeAt(i),E),this.expect(17),this.expect(14),u=this.tsParseType()):(a=!1,u=P,this.expect(17))}else u=this.tsParseType(),o=this.eat(17),a=this.eat(14);if(a){let E;n?(E=this.startNodeAt(i),E.optional=o,E.label=n,E.elementType=u,this.eat(17)&&(E.optional=!0,this.raise(k.TupleOptionalAfterType,this.state.lastTokStartLoc))):(E=this.startNodeAt(i),E.optional=o,this.raise(k.InvalidTupleMemberLabel,u),E.label=u,E.elementType=this.tsParseType()),u=this.finishNode(E,"TSNamedTupleMember")}else if(o){const E=this.startNodeAt(i);E.typeAnnotation=u,u=this.finishNode(E,"TSOptionalType")}if(s){const E=this.startNodeAt(r);E.typeAnnotation=u,u=this.finishNode(E,"TSRestType")}return u}tsParseParenthesizedType(){const r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,s){const i=this.startNode();return r==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,r)}tsParseLiteralTypeNode(){const r=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){{const r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){const r=this.startNode(),s=this.lookahead();return s.type!==135&&s.type!==136&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"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:{const{type:r}=this.state;if(W(r)||r===88||r===84){const s=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":fo(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){const i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:r}=this.state;let s=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const i=this.startNodeAt(r);i.elementType=s,this.expect(3),s=this.finishNode(i,"TSArrayType")}else{const i=this.startNodeAt(r);i.objectType=s,i.indexType=this.tsParseType(),this.expect(3),s=this.finishNode(i,"TSIndexedAccessType")}return s}tsParseTypeOperator(){const r=this.startNode(),s=this.state.value;return this.next(),r.operator=s,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(k.UnexpectedReadonly,r)}}tsParseInferType(){const r=this.startNode();this.expectContextual(115);const s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return Sn(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,s,i){const a=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(a.types=o,this.finishNode(a,r))}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)){const{errors:r}=this.state,s=r.length;try{return this.parseObjectLike(8,!0),r.length===s}catch{return!1}}if(this.match(0)){this.next();const{errors:r}=this.state,s=r.length;try{return super.parseBindingList(3,93,1),r.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(r){return this.tsInType(()=>{const s=this.startNode();this.expect(r);const i=this.startNode(),a=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(a&&this.match(78)){let u=this.tsParseThisTypeOrThisTypePredicate();return u.type==="TSThisType"?(i.parameterName=u,i.asserts=!0,i.typeAnnotation=null,u=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(u,i),u.asserts=!0),s.typeAnnotation=u,this.finishNode(s,"TSTypeAnnotation")}const n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return a?(i.parameterName=this.parseIdentifier(),i.asserts=a,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);const o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=a,s.typeAnnotation=this.finishNode(i,"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(){const r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;const r=this.state.containsEsc;return this.next(),!W(this.state.type)&&!this.match(78)?!1:(r&&this.raise(x.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,s=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){pi(this.state.inType);const r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;const s=this.startNodeAtNode(r);return s.checkType=r,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(k.ReservedTypeAssertion,this.state.startLoc);const r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){const s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{const a=this.startNode();return a.expression=this.tsParseEntityName(3),this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSExpressionWithTypeArguments")});return i.length||this.raise(k.EmptyHeritageClauseType,s,{token:r}),i}tsParseInterfaceDeclaration(r,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(r.declare=!0),W(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(k.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));const i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){const s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInTopLevelContext(r){if(this.curContext()!==q.brace){const s=this.state.context;this.state.context=[s[0]];try{return r()}finally{this.state.context=s}}else return r()}tsInType(r){const s=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(r){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(r){const s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const r=this.startNode();return r.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,s={}){return s.const&&(r.const=!0),s.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseEnumBody(){const r=this.startNode();return this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumBody")}tsParseModuleBlock(){const r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,s=!1){if(r.id=this.parseIdentifier(),s||this.checkIdentifier(r.id,1024),this.eat(16)){const i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),r.body=i}else this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.kind="global",r.global=!0,r.id=this.parseIdentifier()):this.match(134)?(r.kind="module",r.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,s,i){r.isExport=i||!1,r.id=s||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);const a=this.tsParseModuleReference();return r.importKind==="type"&&a.type!=="TSExternalModuleReference"&&this.raise(k.ImportAliasHasImportType,a),r.moduleReference=a,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){const s=this.state.clone(),i=r();return this.state=s,i}tsTryParseAndCatch(r){const s=this.tryParse(i=>r()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(r){const s=this.state.clone(),i=r();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(r){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(100)&&(s=74,i="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 129:{const a=this.tsParseInterfaceDeclaration(r,{declare:!0});if(a)return a}default:if(W(s))return this.tsParseDeclaration(r,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(r,s,i){switch(s.name){case"declare":{const a=this.tsTryParseDeclare(r);return a&&(a.declare=!0),a}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);const a=r;return a.kind="global",r.global=!0,a.id=s,a.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(a,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(r,s.name,!1,i)}}tsParseDeclaration(r,s,i,a){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||W(this.state.type)))return this.tsParseAbstractDeclaration(r,a);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(r);if(W(this.state.type))return r.kind="module",this.tsParseModuleOrNamespaceDeclaration(r)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&W(this.state.type))return r.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(r);break;case"type":if(this.tsCheckLineTerminator(i)&&W(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;const s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const i=this.tsTryParseAndCatch(()=>{const a=this.startNodeAt(r);return a.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(a),a.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),a});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){const r=this.startNode();return r.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(k.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===q.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return xn(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(r,s){const i=this.state.startLoc,a={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},a);const n=a.accessibility,o=a.override,u=a.readonly;!(r&4)&&(n||u||o)&&this.raise(k.UnexpectedParameterModifier,i);const p=this.parseMaybeDefault();r&2&&this.parseFunctionParamType(p);const y=this.parseMaybeDefault(p.loc.start,p);if(n||u||o){const E=this.startNodeAt(i);return s.length&&(E.decorators=s),n&&(E.accessibility=n),u&&(E.readonly=u),o&&(E.override=o),y.type!=="Identifier"&&y.type!=="AssignmentPattern"&&this.raise(k.UnsupportedParameterPropertyKind,E),E.parameter=y,this.finishNode(E,"TSParameterProperty")}return s.length&&(p.decorators=s),y}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(const s of r.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(k.PatternIsOptional,s)}setArrowFunctionParameters(r,s,i){super.setArrowFunctionParameters(r,s,i),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,s,i=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const a=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return a&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,a):a==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(k.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,a,i):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,s,i))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(k.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(r,s){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,s,i,a){const n=super.parseArrayLike(r,s,i,a);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(r,s,i,a){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const o=this.startNodeAt(s);return o.expression=r,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return a.stop=!0,r;a.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o;const u=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(r)){const P=this.tsTryParseGenericAsyncArrowFunction(s);if(P)return P}const p=this.tsParseTypeArgumentsInExpression();if(!p)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(gt(this.state.type)){const P=super.parseTaggedTemplateExpression(r,s,a);return P.typeParameters=p,P}if(!i&&this.eat(10)){const P=this.startNodeAt(s);return P.callee=r,P.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(P.arguments),P.typeParameters=p,a.optionalChainMember&&(P.optional=n),this.finishCallExpression(P,a.optionalChainMember)}const y=this.state.type;if(y===48||y===52||y!==10&&gr(y)&&!this.hasPrecedingLineBreak())return;const E=this.startNodeAt(s);return E.expression=r,E.typeParameters=p,this.finishNode(E,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),u)return u.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(k.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),u}return super.parseSubscript(r,s,i,a)}parseNewCallee(r){var s;super.parseNewCallee(r);const{callee:i}=r;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(r.typeParameters=i.typeParameters,r.callee=i.expression)}parseExprOp(r,s,i){let a;if(Pt(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(a=this.isContextual(120)))){const n=this.startNodeAt(s);return n.expression=r,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(a&&this.raise(x.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,a?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(r,s,i)}checkReservedWord(r,s,i,a){this.state.isAmbientContext||super.checkReservedWord(r,s,i,a)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(k.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){const s=this.lookaheadCharCode();return r?s===123||s===42:s!==61}return!r&&this.isContextual(87)}applyImportPhase(r,s,i,a){super.applyImportPhase(r,s,i,a),s?r.exportKind=i==="type"?"type":"value":r.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(r){if(this.match(134))return r.importKind="value",super.parseImport(r);let s;if(W(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){const i=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,i);s=super.parseImportSpecifiersAndAfter(r,i)}else s=super.parseImport(r);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(k.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(r,s){if(this.match(83)){const i=r;this.next();let a=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?a=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,a,!0)}else if(this.eat(29)){const i=r;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){const i=r;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(r,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){const r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){const r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,s,i=!1){const{isAmbientContext:a}=this.state,n=super.parseVarStatement(r,s,i||a);if(!a)return n;for(const{id:o,init:u}of n.declarations)u&&(s!=="const"||o.typeAnnotation?this.raise(k.InitializerNotAllowedInAmbientContext,u):To(u,this.hasPlugin("estree"))||this.raise(k.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,u));return n}parseStatementContent(r,s){if(this.match(75)&&this.isLookaheadContextual("enum")){const i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(r,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,s){return s.some(i=>fi(i)?r.accessibility===i:!!r[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,s,i){const a=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:a,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:k.InvalidModifierOnTypeParameterPositions},s);const n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,a)&&this.raise(k.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,s)):this.parseClassMemberWithIsStatic(r,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(r,s,i,a){const n=this.tsTryParseIndexSignature(s);if(n){r.body.push(n),s.abstract&&this.raise(k.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(k.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(k.IndexSignatureHasDeclare,s),s.override&&this.raise(k.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(k.NonAbstractClassHasAbstractMethod,s),s.override&&(i.hadSuperClass||this.raise(k.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(r,s,i,a)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(k.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(k.ClassMethodHasDeclare,r)}parseExpressionStatement(r,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(r,s,i):void 0)||super.parseExpressionStatement(r,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(r,s,i);const a=this.tryParse(()=>super.parseConditional(r,s));return a.node?(a.error&&(this.state=a.failState),a.node):(a.error&&super.setOptionalParametersError(i,a.error),r)}parseParenItem(r,s){const i=super.parseParenItem(r,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){const a=this.startNodeAt(s);return a.expression=r,a.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(a,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));const s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(k.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const n=W(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(r.exportKind="type"),i&&n.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(r,s,i,a){if((!s||i)&&this.isContextual(113))return;super.parseClassId(r,s,i,r.declare?1024:8331);const n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(r.typeParameters=n)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));const s=this.tsTryParseTypeAnnotation();s&&(r.typeAnnotation=s)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(k.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){const{key:s}=r;this.raise(k.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!r.computed?s.name:`[${this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end))}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(k.PrivateElementHasAbstract,r),r.accessibility&&this.raise(k.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(k.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,s,i,a,n,o){const u=this.tsTryParseTypeParameters(this.tsParseConstModifier);u&&n&&this.raise(k.ConstructorHasTypeParameters,u);const{declare:p=!1,kind:y}=s;p&&(y==="get"||y==="set")&&this.raise(k.DeclareAccessor,s,{kind:y}),u&&(s.typeParameters=u),super.pushClassMethod(r,s,i,a,n,o)}pushClassPrivateMethod(r,s,i,a){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(r,s,i,a)}declareClassPrivateMethodInScope(r,s){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&!hasOwnProperty.call(r.value,"body")||super.declareClassPrivateMethodInScope(r,s))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,s,i,a,n,o,u){const p=this.tsTryParseTypeParameters(this.tsParseConstModifier);return p&&(r.typeParameters=p),super.parseObjPropValue(r,s,i,a,n,o,u)}parseFunctionParams(r,s){const i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(r.typeParameters=i),super.parseFunctionParams(r,s)}parseVarId(r,s){super.parseVarId(r,s),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);const i=this.tsTryParseTypeAnnotation();i&&(r.id.typeAnnotation=i,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,s){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,s)}parseMaybeAssign(r,s){var i,a,n,o,u;let p,y,E;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(p=this.state.clone(),y=this.tryParse(()=>super.parseMaybeAssign(r,s),p),!y.error)return y.node;const{context:N}=this.state,A=N[N.length-1];(A===q.j_oTag||A===q.j_expr)&&N.pop()}if(!((i=y)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(r,s);(!p||p===this.state)&&(p=this.state.clone());let P;const g=this.tryParse(N=>{var A,O;P=this.tsParseTypeParameters(this.tsParseConstModifier);const I=super.parseMaybeAssign(r,s);return(I.type!=="ArrowFunctionExpression"||(A=I.extra)!=null&&A.parenthesized)&&N(),((O=P)==null?void 0:O.params.length)!==0&&this.resetStartLocationFromNode(I,P),I.typeParameters=P,I},p);if(!g.error&&!g.aborted)return P&&this.reportReservedArrowTypeParam(P),g.node;if(!y&&(pi(!this.hasPlugin("jsx")),E=this.tryParse(()=>super.parseMaybeAssign(r,s),p),!E.error))return E.node;if((a=y)!=null&&a.node)return this.state=y.failState,y.node;if(g.node)return this.state=g.failState,P&&this.reportReservedArrowTypeParam(P),g.node;if((n=E)!=null&&n.node)return this.state=E.failState,E.node;throw((o=y)==null?void 0:o.error)||g.error||((u=E)==null?void 0:u.error)}reportReservedArrowTypeParam(r){var s;r.params.length===1&&!r.params[0].constraint&&!((s=r.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedArrowTypeParam,r)}parseMaybeUnary(r,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,s)}parseArrow(r){if(this.match(14)){const s=this.tryParse(i=>{const a=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),a});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),r.returnType=s.node)}return super.parseArrow(r)}parseFunctionParamType(r){this.eat(17)&&(r.optional=!0);const s=this.tsTryParseTypeAnnotation();return s&&(r.typeAnnotation=s),this.resetEndLocation(r),r}isAssignable(r,s){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(r,s)}}toAssignable(r,s=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(k.UnexpectedTypeCastInParameter,r):this.raise(k.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,s);break;case"AssignmentExpression":!s&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,s)}}toAssignableParenthesizedExpression(r,s){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,s);break;default:super.toAssignable(r,s)}}checkToRestConversion(r,s){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,s)}}isValidLVal(r,s,i){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!s)&&["expression",!0];default:return super.isValidLVal(r,s,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r,s){if(this.match(47)||this.match(51)){const i=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const a=super.parseMaybeDecoratorArguments(r,s);return a.typeParameters=i,a}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r,s)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,s){const i=super.parseMaybeDefault(r,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(k.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){const{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableList(r,s,i){for(let a=0;a<r.length;a++){const n=r[a];(n==null?void 0:n.type)==="TSTypeCastExpression"&&(r[a]=this.typeCastToParameter(n))}super.toAssignableList(r,s,i)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(s=>this.isAssignable(s,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){const s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(r.typeParameters=s)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){const s=super.getGetterSetterExpectedParamCount(r),a=this.getObjectOrClassMethodParams(r)[0];return a&&this.isThisParam(a)?s+1:s}parseCatchClauseParam(){const r=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(r.typeAnnotation=s,this.resetEndLocation(r)),r}tsInAmbientContext(r){const{isAmbientContext:s,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=s,this.state.strict=i}}parseClass(r,s,i){const a=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,s,i)}finally{this.state.inAbstractClass=a}}tsParseAbstractDeclaration(r,s){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(r,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return r.abstract=!0,this.raise(k.NonClassMethodPropertyHasAbstractModifer,r),this.tsParseInterfaceDeclaration(r)}else this.unexpected(null,80)}parseMethod(r,s,i,a,n,o,u){const p=super.parseMethod(r,s,i,a,n,o,u);if(p.abstract&&(this.hasPlugin("estree")?p.value:p).body){const{key:P}=p;this.raise(k.AbstractMethodHasImplementation,p,{methodName:P.type==="Identifier"&&!p.computed?P.name:`[${this.input.slice(this.offsetToSourcePos(P.start),this.offsetToSourcePos(P.end))}]`})}return p}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(r,s,i,a){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(r,!1,i),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,s,i,a))}parseImportSpecifier(r,s,i,a,n){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(r,!0,i),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,s,i,a,i?4098:4096))}parseTypeOnlyImportExportSpecifier(r,s,i){const a=s?"imported":"local",n=s?"local":"exported";let o=r[a],u,p=!1,y=!0;const E=o.loc.start;if(this.isContextual(93)){const g=this.parseIdentifier();if(this.isContextual(93)){const N=this.parseIdentifier();ue(this.state.type)?(p=!0,o=g,u=s?this.parseIdentifier():this.parseModuleExportName(),y=!1):(u=N,y=!1)}else ue(this.state.type)?(y=!1,u=s?this.parseIdentifier():this.parseModuleExportName()):(p=!0,o=g)}else ue(this.state.type)&&(p=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());p&&i&&this.raise(s?k.TypeModifierIsUsedInTypeImports:k.TypeModifierIsUsedInTypeExports,E),r[a]=o,r[n]=u;const P=s?"importKind":"exportKind";r[P]=p?"type":"value",y&&this.eatContextual(93)&&(r[n]=s?this.parseIdentifier():this.parseModuleExportName()),r[n]||(r[n]=Te(r[a])),s&&this.checkIdentifier(r[n],p?4098:4096)}};function mo(t){if(t.type!=="MemberExpression")return!1;const{computed:e,property:r}=t;return e&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:hi(t.object)}function To(t,e){var r;const{type:s}=t;if((r=t.extra)!=null&&r.parenthesized)return!1;if(e){if(s==="Literal"){const{value:i}=t;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(di(t,e)||So(t,e)||s==="TemplateLiteral"&&t.expressions.length===0||mo(t))}function di(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function So(t,e){if(t.type==="UnaryExpression"){const{operator:r,argument:s}=t;if(r==="-"&&di(s,e))return!0}return!1}function hi(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:hi(t.object)}const yi=de`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});var xo=t=>class extends t{parsePlaceholder(r){if(this.match(133)){const s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(s,r)}}finishPlaceholder(r,s){let i=r;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=s,i}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,s,i,a){r!==void 0&&super.checkReservedWord(r,s,i,a)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,s,i){return r==="Placeholder"||super.isValidLVal(r,s,i)}toAssignable(r,s){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,s)}chStartsBindingIdentifier(r,s){return!!(super.chStartsBindingIdentifier(r,s)||this.lookahead().type===133)}verifyBreakContinue(r,s){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,s)}parseExpressionStatement(r,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(r,s);if(this.match(14)){const n=r;return n.label=this.finishPlaceholder(s,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}this.semicolon();const a=r;return a.name=s.name,this.finishPlaceholder(a,"Statement")}parseBlock(r,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,s,i)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,s,i){const a=s?"ClassDeclaration":"ClassExpression";this.next();const n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))r.id=o;else{if(i||!s)return r.id=null,r.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(r,a);throw this.raise(yi.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,s,i);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,n),this.finishNode(r,a)}parseExport(r,s){const i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(r,s);const a=r;if(!this.isContextual(98)&&!this.match(12))return a.specifiers=[],a.source=null,a.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(a,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const n=this.startNode();return n.exported=i,a.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(a,s)}isExportDefaultSpecifier(){if(this.match(65)){const r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(Ie(133),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,s){var i;return(i=r.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(r,s)}checkExport(r){const{specifiers:s}=r;s!=null&&s.length&&(r.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=s}parseImport(r){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");const i=this.startNodeAtNode(s);return i.local=s,r.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(yi.UnexpectedSpace,this.state.lastTokEndLoc)}},bo=t=>class extends t{parseV8Intrinsic(){if(this.match(54)){const r=this.state.startLoc,s=this.startNode();if(this.next(),W(this.state.type)){const i=this.parseIdentifierName(),a=this.createIdentifier(s,i);if(a.type="V8IntrinsicIdentifier",this.match(10))return a}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}};const mi=["minimal","fsharp","hack","smart"],Ti=["^^","@@","^","%","#"];function Eo(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const r=t.get("decorators").decoratorsBeforeExport;if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const s=t.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){var e;const r=t.get("pipelineOperator").proposal;if(!mi.includes(r)){const i=mi.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}const s=((e=t.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash";if(r==="hack"){if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const i=t.get("pipelineOperator").topicToken;if(!Ti.includes(i)){const a=Ti.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${a}.`)}if(i==="#"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}else if(r==="smart"&&s)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}if(t.has("moduleAttributes")){if(t.has("deprecatedImportAssert")||t.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(t.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(t.has("importAssertions")&&t.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!t.has("deprecatedImportAssert")&&t.has("importAttributes")&&t.get("importAttributes").deprecatedAssertSyntax&&t.set("deprecatedImportAssert",{}),t.has("recordAndTuple")){const r=t.get("recordAndTuple").syntaxType;if(r!=null){const s=["hash","bar"];if(!s.includes(r))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+s.map(i=>`'${i}'`).join(", "))}}if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){const r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}if(t.has("optionalChainingAssign")&&t.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'.")}const Si={estree:ln,jsx:oo,flow:ao,typescript:yo,v8intrinsic:bo,placeholders:xo},Po=Object.keys(Si);class go extends co{checkProto(e,r,s,i){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return;const a=e.key;if((a.type==="Identifier"?a.name:a.value)==="__proto__"){if(r){this.raise(x.RecordNoProto,a);return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=a.loc.start):this.raise(x.DuplicateProto,a)),s.used=!0}}shouldExitDescending(e,r){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===r}getExpression(){this.enterInitialScopes(),this.nextToken();const e=this.parseExpression();return this.match(140)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&128&&(e.tokens=this.tokens),e}parseExpression(e,r){return e?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(e){const r=this.state.startLoc,s=this.parseMaybeAssign(e);if(this.match(12)){const i=this.startNodeAt(r);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e,r){return this.disallowInAnd(()=>this.parseMaybeAssign(e,r))}parseMaybeAssignAllowIn(e,r){return this.allowInAnd(()=>this.parseMaybeAssign(e,r))}setOptionalParametersError(e,r){var s;e.optionalParametersLoc=(s=r==null?void 0:r.loc)!=null?s:this.state.startLoc}parseMaybeAssign(e,r){const s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return r&&(o=r.call(this,o,s)),o}let i;e?i=!1:(e=new Nt,i=!0);const{type:a}=this.state;(a===10||W(a))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(e);if(r&&(n=r.call(this,n,s)),dn(this.state.type)){const o=this.startNodeAt(s),u=this.state.value;if(o.operator=u,this.match(29)){this.toAssignable(n,!0),o.left=n;const p=s.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=p&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=p&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=p&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,this.finishNode(o,"AssignmentExpression")),o}else i&&this.checkExpressionErrors(e,!0);return n}parseMaybeConditional(e){const r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(e);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,r,e)}parseConditional(e,r,s){if(this.eat(17)){const i=this.startNodeAt(r);return i.test=e,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,r,-1)}parseExprOp(e,r,s){if(this.isPrivateName(e)){const a=this.getPrivateNameSV(e);(s>=Pt(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(x.PrivateInExpectedIn,e,{identifierName:a}),this.classScope.usePrivateName(a,e.loc.start)}const i=this.state.type;if(yn(i)&&(this.prodParam.hasIn||!this.match(58))){let a=Pt(i);if(a>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,r)}const n=this.startNodeAt(r);n.left=e,n.operator=this.state.value;const o=i===41||i===42,u=i===40;if(u&&(a=Pt(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(x.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);n.right=this.parseExprOpRightExpr(i,a);const p=this.finishNode(n,o||u?"LogicalExpression":"BinaryExpression"),y=this.state.type;if(u&&(y===41||y===42)||o&&y===40)throw this.raise(x.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(p,r,s)}}return e}parseExprOpRightExpr(e,r){const s=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(x.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,r),s)});default:return this.parseExprOpBaseRightExpr(e,r)}}parseExprOpBaseRightExpr(e,r){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,bn(e)?r-1:r)}parseHackPipeBody(){var e;const{startLoc:r}=this.state,s=this.parseMaybeAssign();return en.has(s.type)&&!((e=s.extra)!=null&&e.parenthesized)&&this.raise(x.PipeUnparenthesizedBody,r,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(x.PipeTopicUnused,r),s}checkExponentialAfterUnary(e){this.match(57)&&this.raise(x.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,r){const s=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();const u=this.parseAwait(s);return r||this.checkExponentialAfterUnary(u),u}const a=this.match(34),n=this.startNode();if(Tn(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const u=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&u){const p=n.argument;p.type==="Identifier"?this.raise(x.StrictDelete,n):this.hasPropertyAsPrivateName(p)&&this.raise(x.DeletePrivateField,n)}if(!a)return r||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}const o=this.parseUpdate(n,a,e);if(i){const{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?gr(u):gr(u)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(x.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(e,r,s){if(r){const n=e;return this.checkLVal(n.argument,this.finishNode(n,"UpdateExpression")),e}const i=this.state.startLoc;let a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;mn(this.state.type)&&!this.canInsertSemicolon();){const n=this.startNodeAt(i);n.operator=this.state.value,n.prefix=!1,n.argument=a,this.next(),this.checkLVal(a,a=this.finishNode(n,"UpdateExpression"))}return a}parseExprSubscripts(e){const r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,r)}parseSubscripts(e,r,s){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,r,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return e}parseSubscript(e,r,s,i){const{type:a}=this.state;if(!s&&a===15)return this.parseBind(e,r,s,i);if(gt(a))return this.parseTaggedTemplateExpression(e,r,i);let n=!1;if(a===18){if(s&&(this.raise(x.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,e;i.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,r,i,n);{const o=this.eat(0);return o||n||this.eat(16)?this.parseMember(e,r,i,o,n):(i.stop=!0,e)}}parseMember(e,r,s,i,a){const n=this.startNodeAt(r);return n.object=e,n.computed=i,i?(n.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise(x.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=a,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(e,r,s,i){const a=this.startNodeAt(r);return a.object=e,this.next(),a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),r,s)}parseCoverCallAndAsyncArrowHead(e,r,s,i){const a=this.state.maybeInArrowParameters;let n=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(r);o.callee=e;const{maybeAsyncArrow:u,optionalChainMember:p}=s;u&&(this.expressionScope.enter(Wn()),n=new Nt),p&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,e.type!=="Super",o,n);let y=this.finishCallExpression(o,p);return u&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),y=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),y)):(u&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(y)),this.state.maybeInArrowParameters=a,y}toReferencedArguments(e,r){this.toReferencedListDeep(e.arguments,r)}parseTaggedTemplateExpression(e,r,s){const i=this.startNodeAt(r);return i.tag=e,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(x.OptionalChainingNoTemplate,r),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,r){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(x.ImportCallArity,e);else for(const s of e.arguments)s.type==="SpreadElement"&&this.raise(x.ImportCallSpreadArgument,s);return this.finishNode(e,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,r,s,i){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(n)n=!1;else if(this.expect(12),this.match(e)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(!1,i,r))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,r){var s;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(e,r.arguments,!0,(s=r.extra)==null?void 0:s.trailingCommaLoc),r.innerComments&&tt(e,r.innerComments),r.callee.trailingComments&&tt(e,r.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let r,s=null;const{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(r):this.match(10)?this.optionFlags&256?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(x.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134: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:{const a=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(a)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);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:{r=this.startNode(),this.next(),r.object=null;const a=r.callee=this.parseNoCallExpr();if(a.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(x.UnsupportedBind,a)}case 139:return this.raise(x.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:{const a=this.getPluginOption("pipelineOperator","proposal");if(a)return this.parseTopicReference(a);this.unexpected();break}case 47:{const a=this.input.codePointAt(this.nextTokenStart());me(a)||a===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(i===137)return this.parseDecimalLiteral(this.state.value);if(W(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();const a=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){const{type:u}=this.state;if(u===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(W(u))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(u===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return a&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(e,r){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=e,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=se(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(e){const r=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(r,s,e,i)}finishTopicReference(e,r,s,i){if(this.testTopicReferenceConfiguration(s,r,i))return s==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(x.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(x.PrimaryTopicNotAllowed,r),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(x.PipeTopicUnconfiguredToken,r,{token:Ie(i)})}testTopicReferenceConfiguration(e,r,s){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ie(s)}]);case"smart":return s===27;default:throw this.raise(x.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Ct(!0,this.prodParam.hasYield));const r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(x.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,r,!0)}parseDo(e,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),e.async=r,this.next();const s=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=s,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!(this.optionFlags&16)?this.raise(x.SuperNotAllowed,e):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(x.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(x.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),r=this.startNodeAt(se(this.state.startLoc,1)),s=this.state.value;return this.next(),e.id=this.createIdentifier(r,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const r=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,r,"sent")}return this.parseFunction(e)}parseMetaProperty(e,r,s){e.meta=r;const i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||i)&&this.raise(x.UnsupportedMetaProperty,e.property,{target:r.name,onlyValidPropertyName:s}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const r=this.createIdentifier(this.startNodeAtNode(e),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(x.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){const s=this.isContextual(105);if(this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!(this.optionFlags&256))throw this.raise(x.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),e.phase=s?"source":"defer",this.parseImportCall(e)}return this.parseMetaProperty(e,r,"meta")}parseLiteralAtNode(e,r,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.value=e,this.next(),this.finishNode(s,r)}parseLiteral(e,r){const s=this.startNode();return this.parseLiteralAtNode(e,r,s)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const r=this.startNode();return this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.pattern=e.pattern,r.flags=e.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(e){const r=this.startNode();return r.value=e,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const r=this.state.startLoc;let s;this.next(),this.expressionScope.enter(qn());const i=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const n=this.state.startLoc,o=[],u=new Nt;let p=!0,y,E;for(;!this.match(11);){if(p)p=!1;else if(this.expect(12,u.optionalParametersLoc===null?null:u.optionalParametersLoc),this.match(11)){E=this.state.startLoc;break}if(this.match(21)){const N=this.state.startLoc;if(y=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),N)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(u,this.parseParenItem))}const P=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=a;let g=this.startNodeAt(r);return e&&this.shouldParseArrow(o)&&(g=this.parseArrow(g))?(this.checkDestructuringPrivate(u),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(g,o,!1),g):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),E&&this.unexpected(E),y&&this.unexpected(y),this.checkExpressionErrors(u,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,P)):s=o[0],this.wrapParenthesis(r,s))}wrapParenthesis(e,r){if(!(this.optionFlags&512))return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e.index),this.takeSurroundingComments(r,e.index,this.state.lastTokEndLoc.index),r;const s=this.startNodeAt(e);return s.expression=r,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,r){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(16)){const r=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const s=this.parseMetaProperty(e,r,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!(this.optionFlags&4)&&this.raise(x.UnexpectedNewTarget,s),s}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){const r=this.parseExprList(11);this.toReferencedList(r),e.arguments=r}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const r=this.match(83),s=this.parseNoCallExpr();e.callee=s,r&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(x.ImportCallNotNewExpression,s)}parseTemplateElement(e){const{start:r,startLoc:s,end:i,value:a}=this.state,n=r+1,o=this.startNodeAt(se(s,1));a===null&&(e||this.raise(x.InvalidEscapeSequenceTemplate,se(this.state.firstInvalidTemplateEscapePos,1)));const u=this.match(24),p=u?-1:-2,y=i+p;o.value={raw:this.input.slice(n,y).replace(/\r\n?/g,`
|
|
209
|
+
`),cooked:a===null?null:a.slice(1,p)},o.tail=u,this.next();const E=this.finishNode(o,"TemplateElement");return this.resetEndLocation(E,se(this.state.lastTokEndLoc,p)),E}parseTemplate(e){const r=this.startNode();let s=this.parseTemplateElement(e);const i=[s],a=[];for(;!s.tail;)a.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return r.expressions=a,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,r,s,i){s&&this.expectPlugin("recordAndTuple");const a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=Object.create(null);let o=!0;const u=this.startNode();for(u.properties=[],this.next();!this.match(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(u);break}let y;r?y=this.parseBindingProperty():(y=this.parsePropertyDefinition(i),this.checkProto(y,s,n,i)),s&&!this.isObjectProperty(y)&&y.type!=="SpreadElement"&&this.raise(x.InvalidRecordProperty,y),y.shorthand&&this.addExtra(y,"shorthand",!0),u.properties.push(y)}this.next(),this.state.inFSharpPipelineDirectBody=a;let p="ObjectExpression";return r?p="ObjectPattern":s&&(p="RecordExpression"),this.finishNode(u,p)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(x.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());const s=this.startNode();let i=!1,a=!1,n;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(s.decorators=r,r=[]),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);const u=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!u&&this.maybeAsyncOrAccessorProp(s)){const{key:p}=s,y=p.name;y==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(p),o=this.eat(55),this.parsePropertyName(s)),(y==="get"||y==="set")&&(a=!0,this.resetPreviousNodeTrailingComments(p),s.kind=y,this.match(55)&&(o=!0,this.raise(x.AccessorIsGenerator,this.state.curPosition(),{kind:y}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,a,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var r;const s=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==s&&this.raise(e.kind==="get"?x.BadGetterArity:x.BadSetterArity,e),e.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(x.BadSetterRestParameter,e)}parseObjectMethod(e,r,s,i,a){if(a){const n=this.parseMethod(e,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||r||this.match(10))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,r,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,r,s,i){if(e.shorthand=!1,this.eat(14))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty");if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),s)e.value=this.parseMaybeDefault(r,Te(e.key));else if(this.match(29)){const a=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=a):this.raise(x.InvalidCoverInitializedName,a),e.value=this.parseMaybeDefault(r,Te(e.key))}else e.value=Te(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,r,s,i,a,n,o){const u=this.parseObjectMethod(e,s,i,a,n)||this.parseObjectProperty(e,r,a,o);return u||this.unexpected(),u}parsePropertyName(e,r){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:i}=this.state;let a;if(ue(s))a=this.parseIdentifier(!0);else switch(s){case 135:a=this.parseNumericLiteral(i);break;case 134:a=this.parseStringLiteral(i);break;case 136:a=this.parseBigIntLiteral(i);break;case 139:{const n=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=n):this.raise(x.UnexpectedPrivateField,n),a=this.parsePrivateName();break}default:if(s===137){a=this.parseDecimalLiteral(i);break}this.unexpected()}e.key=a,s!==139&&(e.computed=!1)}}initFunction(e,r){e.id=null,e.generator=!1,e.async=r}parseMethod(e,r,s,i,a,n,o=!1){this.initFunction(e,s),e.generator=r,this.scope.enter(18|(o?64:0)|(a?32:0)),this.prodParam.enter(Ct(s,e.generator)),this.parseFunctionParams(e,i);const u=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),u}parseArrayLike(e,r,s,i){s&&this.expectPlugin("recordAndTuple");const a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const n=this.startNode();return this.next(),n.elements=this.parseExprList(e,!s,i,n),this.state.inFSharpPipelineDirectBody=a,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,r,s,i){this.scope.enter(6);let a=Ct(s,!1);!this.match(5)&&this.prodParam.hasIn&&(a|=8),this.prodParam.enter(a),this.initFunction(e,s);const n=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,r,s){this.toAssignableList(r,s,!1),e.params=r}parseFunctionBodyAndFinish(e,r,s=!1){return this.parseFunctionBody(e,!1,s),this.finishNode(e,r)}parseFunctionBody(e,r,s=!1){const i=r&&!this.match(5);if(this.expressionScope.enter(li()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,r,!1);else{const a=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,o=>{const u=!this.isSimpleParamList(e.params);o&&u&&this.raise(x.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);const p=!a&&this.state.strict;this.checkParams(e,!this.state.strict&&!r&&!s&&!u,r,p),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,p)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let r=0,s=e.length;r<s;r++)if(!this.isSimpleParameter(e[r]))return!1;return!0}checkParams(e,r,s,i=!0){const a=!r&&new Set,n={type:"FormalParameters"};for(const o of e.params)this.checkLVal(o,n,5,a,i)}parseExprList(e,r,s,i){const a=[];let n=!0;for(;!this.eat(e);){if(n)n=!1;else if(this.expect(12),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}a.push(this.parseExprListItem(r,s))}return a}parseExprListItem(e,r,s){let i;if(this.match(12))e||this.raise(x.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){const a=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),a)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(x.UnexpectedArgumentPlaceholder,this.state.startLoc);const a=this.startNode();this.next(),i=this.finishNode(a,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return i}parseIdentifier(e){const r=this.startNode(),s=this.parseIdentifierName(e);return this.createIdentifier(r,s)}createIdentifier(e,r){return e.name=r,e.loc.identifierName=r,this.finishNode(e,"Identifier")}parseIdentifierName(e){let r;const{startLoc:s,type:i}=this.state;ue(i)?r=this.state.value:this.unexpected();const a=pn(i);return e?a&&this.replaceToken(132):this.checkReservedWord(r,s,a,!1),this.next(),r}checkReservedWord(e,r,s,i){if(e.length>10||!On(e))return;if(s&&Cn(e)){this.raise(x.UnexpectedKeyword,r,{keyword:e});return}if((this.state.strict?i?ei:Qs:Gs)(e,this.inModule)){this.raise(x.UnexpectedReservedWord,r,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(x.YieldBindingIdentifier,r);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(x.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(x.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(x.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){const r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(x.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(x.ObsoleteAwaitStar,r),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return e===53||e===10||e===0||gt(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(){const e=this.startNode();this.expressionScope.recordParameterInitializerError(x.YieldInParameter,e),this.next();let r=!1,s=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:s=this.parseMaybeAssign()}return e.delegate=r,e.argument=s,this.finishNode(e,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)&&!this.match(11)&&(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(x.ImportCallArity,e)}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(x.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(e,r){if(this.isSimpleReference(e)){const s=this.startNodeAt(r);return s.callee=e,this.finishNode(s,"PipelineBareFunction")}else{const s=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),s.expression=e,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(x.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(x.PipelineTopicUnused,e)}withTopicBindingContext(e){const r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){const r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}else return e()}withSoloAwaitPermittingContext(e){const r=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=r}}allowInAnd(e){const r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return e()}finally{this.prodParam.exit()}}return e()}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(e){const r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,e);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const r=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(r,8,"module")}finally{s()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}}const Mr={kind:1},Ao={kind:2},Io=/[\uD800-\uDFFF]/u,Br=/in(?:stanceof)?/y;function vo(t,e,r){for(let s=0;s<t.length;s++){const i=t[s],{type:a}=i;if(typeof a=="number"){{if(a===139){const{loc:n,start:o,value:u,end:p}=i,y=o+1,E=se(n.start,1);t.splice(s,1,new ve({type:ye(27),value:"#",start:o,end:y,startLoc:n.start,endLoc:E}),new ve({type:ye(132),value:u,start:y,end:p,startLoc:E,endLoc:n.end})),s++;continue}if(gt(a)){const{loc:n,start:o,value:u,end:p}=i,y=o+1,E=se(n.start,1);let P;e.charCodeAt(o-r)===96?P=new ve({type:ye(22),value:"`",start:o,end:y,startLoc:n.start,endLoc:E}):P=new ve({type:ye(8),value:"}",start:o,end:y,startLoc:n.start,endLoc:E});let g,N,A,O;a===24?(N=p-1,A=se(n.end,-1),g=u===null?null:u.slice(1,-1),O=new ve({type:ye(22),value:"`",start:N,end:p,startLoc:A,endLoc:n.end})):(N=p-2,A=se(n.end,-2),g=u===null?null:u.slice(1,-2),O=new ve({type:ye(23),value:"${",start:N,end:p,startLoc:A,endLoc:n.end})),t.splice(s,1,P,new ve({type:ye(20),value:g,start:y,end:N,startLoc:E,endLoc:A}),O),s+=2;continue}}i.type=ye(a)}}return t}class Co extends go{parseTopLevel(e,r){return e.program=this.parseProgram(r),e.comments=this.comments,this.optionFlags&128&&(e.tokens=vo(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,r=140,s=this.options.sourceType){if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,r),this.inModule){if(!(this.optionFlags&32)&&this.scope.undefinedExports.size>0)for(const[a,n]of Array.from(this.scope.undefinedExports))this.raise(x.ModuleExportUndefined,n,{localName:a});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===140?i=this.finishNode(e,"Program"):i=this.finishNodeAt(e,"Program",se(this.state.startLoc,-1)),i}stmtToDirective(e){const r=e;r.type="Directive",r.value=r.expression,delete r.expression;const s=r.value,i=s.value,a=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),n=s.value=a.slice(1,-1);return this.addExtra(s,"raw",a),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(e,r){if(me(e)){if(Br.lastIndex=r,Br.test(this.input)){const s=this.codePointAtPos(Br.lastIndex);if(!Ke(s)&&s!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){const e=this.nextTokenStart(),r=this.codePointAtPos(e);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return r===123||this.chStartsBindingIdentifier(r,e)}startsUsingForOf(){const{type:e,containsEsc:r}=this.lookahead();if(e===102&&!r)return!1;if(W(e)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);const r=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(r,e))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(e=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,e&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(e,r)}parseStatementContent(e,r){const s=this.state.type,i=this.startNode(),a=!!(e&2),n=!!(e&4),o=e&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?x.StrictFunction:this.options.annexB?x.SloppyFunctionAnnexB:x.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!a&&n);case 80:return a||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?a||this.raise(x.UnexpectedLexicalDeclaration,i):this.raise(x.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(x.UnexpectedUsingDeclaration,this.state.startLoc):a||this.raise(x.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;const y=this.nextTokenStart(),E=this.codePointAtPos(y);if(E!==91&&(!a&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(E,y)&&E!==123))break}case 75:a||this.raise(x.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const y=this.state.value;return this.parseVarStatement(i,y)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{const y=this.lookaheadCharCode();if(y===40||y===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(x.UnexpectedImportExport,this.state.startLoc),this.next();let y;return s===83?(y=this.parseImport(i),y.type==="ImportDeclaration"&&(!y.importKind||y.importKind==="value")&&(this.sawUnambiguousESM=!0)):(y=this.parseExport(i,r),(y.type==="ExportNamedDeclaration"&&(!y.exportKind||y.exportKind==="value")||y.type==="ExportAllDeclaration"&&(!y.exportKind||y.exportKind==="value")||y.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(y),y}default:if(this.isAsyncFunction())return a||this.raise(x.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!a&&n)}const u=this.state.value,p=this.parseExpression();return W(s)&&p.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,u,p,e):this.parseExpressionStatement(i,p,r)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(x.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,r,s){if(e){var i;(i=r.decorators)!=null&&i.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(x.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...e)):r.decorators=e,this.resetStartLocationFromNode(r,e[0]),s&&this.resetStartLocationFromNode(s,r)}return r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(x.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(x.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const r=this.state.startLoc;let s;if(this.match(10)){const i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);const a=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(s,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==s&&this.raise(x.DecoratorArgumentsOutsideParentheses,a)}else{for(s=this.parseIdentifier(!1);this.eat(16);){const i=this.startNodeAt(r);i.object=s,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(s,r)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,r){if(this.eat(10)){const s=this.startNodeAt(r);return s.callee=e,s.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(s.arguments),this.finishNode(s,"CallExpression")}return e}parseBreakContinueStatement(e,r){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,r),this.finishNode(e,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,r){let s;for(s=0;s<this.state.labels.length;++s){const i=this.state.labels[s];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind===1)||e.label&&r))break}if(s===this.state.labels.length){const i=r?"BreakStatement":"ContinueStatement";this.raise(x.IllegalBreakContinue,e,{type:i})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Mr),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Mr);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(e,null);const s=this.isContextual(100);{const u=this.isContextual(96)&&this.startsAwaitUsing(),p=u||this.isContextual(107)&&this.startsUsingForOf(),y=s&&this.hasFollowingBindingAtom()||p;if(this.match(74)||this.match(75)||y){const E=this.startNode();let P;u?(P="await using",this.recordAwaitIfAllowed()||this.raise(x.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):P=this.state.value,this.next(),this.parseVar(E,!0,P);const g=this.finishNode(E,"VariableDeclaration"),N=this.match(58);return N&&p&&this.raise(x.ForInUsing,g),(N||this.isContextual(102))&&g.declarations.length===1?this.parseForIn(e,g,r):(r!==null&&this.unexpected(r),this.parseFor(e,g))}}const i=this.isContextual(95),a=new Nt,n=this.parseExpression(!0,a),o=this.isContextual(102);if(o&&(s&&this.raise(x.ForOfLet,n),r===null&&i&&n.type==="Identifier"&&this.raise(x.ForOfAsync,n)),o||this.match(58)){this.checkDestructuringPrivate(a),this.toAssignable(n,!0);const u=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{type:u}),this.parseForIn(e,n,r)}else this.checkExpressionErrors(a,!0);return r!==null&&this.unexpected(r),this.parseFor(e,n)}parseFunctionStatement(e,r,s){return this.next(),this.parseFunction(e,1|(s?2:0)|(r?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!(this.optionFlags&2)&&this.raise(x.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const r=e.cases=[];this.expect(5),this.state.labels.push(Ao),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){const a=this.match(61);s&&this.finishNode(s,"SwitchCase"),r.push(s=this.startNode()),s.consequent=[],this.next(),a?s.test=this.parseExpression():(i&&this.raise(x.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!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(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(x.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){const r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(x.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,r,s=!1){return this.next(),this.parseVar(e,!1,r,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Mr),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(x.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,r,s,i){for(const n of this.state.labels)n.name===r&&this.raise(x.LabelRedeclaration,s,{labelName:r});const a=hn(this.state.type)?1:this.match(71)?2:null;for(let n=this.state.labels.length-1;n>=0;n--){const o=this.state.labels[n];if(o.statementStart===e.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=a;else break}return this.state.labels.push({name:r,kind:a,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,r,s){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,r=!0,s){const i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,e,!1,8,s),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,r,s,i,a){const n=e.body=[],o=e.directives=[];this.parseBlockOrModuleBlockBody(n,r?o:void 0,s,i,a)}parseBlockOrModuleBlockBody(e,r,s,i,a){const n=this.state.strict;let o=!1,u=!1;for(;!this.match(i);){const p=s?this.parseModuleItem():this.parseStatementListItem();if(r&&!u){if(this.isValidDirective(p)){const y=this.stmtToDirective(p);r.push(y),!o&&y.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}u=!0,this.state.strictErrors.clear()}e.push(p)}a==null||a.call(this,o),n||this.setStrict(!1),this.next()}parseFor(e,r){return e.init=r,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,r,s){const i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):e.await=s!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(x.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(x.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),e.left=r,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,r,s,i=!1){const a=e.declarations=[];for(e.kind=s;;){const n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!i&&(n.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(x.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(x.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),a.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,r){const s=this.parseBindingAtom();(r==="using"||r==="await using")&&(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(x.UsingDeclarationHasBindingPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},r==="var"?5:8201),e.id=s}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,r=0){const s=r&2,i=!!(r&1),a=i&&!(r&4),n=!!(r&8);this.initFunction(e,n),this.match(55)&&(s&&this.raise(x.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(a));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Ct(n,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=o,e}parseFunctionId(e){return e||W(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,r){this.expect(10),this.expressionScope.enter(Jn()),e.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,r,s){this.next();const i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,r,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,r){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:e};let i=[];const a=this.startNode();if(a.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(x.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}const n=this.startNode();i.length&&(n.decorators=i,this.resetStartLocationFromNode(n,i[0]),i=[]),this.parseClassMember(a,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(x.DecoratorConstructor,n)}}),this.state.strict=r,this.next(),i.length)throw this.raise(x.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(a,"ClassBody")}parseClassMemberFromModifier(e,r){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=r;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){const i=r;return i.computed=!1,i.key=s,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,r,s){const i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(e,r))return;if(this.eat(5)){this.parseClassStaticBlock(e,r);return}}this.parseClassMemberWithIsStatic(e,r,s,i)}parseClassMemberWithIsStatic(e,r,s,i){const a=r,n=r,o=r,u=r,p=r,y=a,E=a;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){y.kind="method";const I=this.match(139);if(this.parseClassElementName(y),I){this.pushClassPrivateMethod(e,n,!0,!1);return}this.isNonstaticConstructor(a)&&this.raise(x.ConstructorIsGenerator,a.key),this.pushClassMethod(e,a,!0,!1,!1,!1);return}const P=!this.state.containsEsc&&W(this.state.type),g=this.parseClassElementName(r),N=P?g.name:null,A=this.isPrivateName(g),O=this.state.startLoc;if(this.parsePostMemberNameModifiers(E),this.isClassMethod()){if(y.kind="method",A){this.pushClassPrivateMethod(e,n,!1,!1);return}const I=this.isNonstaticConstructor(a);let C=!1;I&&(a.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(x.DuplicateConstructor,g),I&&this.hasPlugin("typescript")&&r.override&&this.raise(x.OverrideOnConstructor,g),s.hadConstructor=!0,C=s.hadSuperClass),this.pushClassMethod(e,a,!1,!1,I,C)}else if(this.isClassProperty())A?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,o);else if(N==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(g);const I=this.eat(55);E.optional&&this.unexpected(O),y.kind="method";const C=this.match(139);this.parseClassElementName(y),this.parsePostMemberNameModifiers(E),C?this.pushClassPrivateMethod(e,n,I,!0):(this.isNonstaticConstructor(a)&&this.raise(x.ConstructorIsAsync,a.key),this.pushClassMethod(e,a,I,!0,!1,!1))}else if((N==="get"||N==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(g),y.kind=N;const I=this.match(139);this.parseClassElementName(a),I?this.pushClassPrivateMethod(e,n,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(x.ConstructorIsAccessor,a.key),this.pushClassMethod(e,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a)}else if(N==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(g);const I=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(e,p,I)}else this.isLineTerminator()?A?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,o):this.unexpected()}parseClassElementName(e){const{type:r,value:s}=this.state;if((r===132||r===134)&&e.static&&s==="prototype"&&this.raise(x.StaticPrototype,this.state.startLoc),r===139){s==="constructor"&&this.raise(x.ConstructorClassPrivateField,this.state.startLoc);const i=this.parsePrivateName();return e.key=i,i}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,r){var s;this.scope.enter(208);const i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const a=r.body=[];this.parseBlockOrModuleBlockBody(a,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(r,"StaticBlock")),(s=r.decorators)!=null&&s.length&&this.raise(x.DecoratorStaticBlock,r)}pushClassProperty(e,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(x.ConstructorClassField,r.key),e.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(e,r){const s=this.parseClassPrivateProperty(r);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(e,r,s){!s&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(x.ConstructorClassField,r.key);const i=this.parseClassAccessorProperty(r);e.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(e,r,s,i,a,n){e.body.push(this.parseMethod(r,s,i,a,n,"ClassMethod",!0))}pushClassPrivateMethod(e,r,s,i){const a=this.parseMethod(r,s,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(a);const n=a.kind==="get"?a.static?6:2:a.kind==="set"?a.static?5:1:0;this.declareClassPrivateMethodInScope(a,n)}declareClassPrivateMethodInScope(e,r){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),r,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(li()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,r,s,i=8331){if(W(this.state.type))e.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(e.id,i);else if(s||!r)e.id=null;else throw this.raise(x.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,r){const s=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,s),a=!i||this.eat(12),n=a&&this.eatExportStar(e),o=n&&this.maybeParseExportNamespaceSpecifier(e),u=a&&(!o||this.eat(12)),p=i||n;if(n&&!o){if(i&&this.unexpected(),r)throw this.raise(x.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}const y=this.maybeParseExportNamedSpecifiers(e);i&&a&&!n&&!y&&this.unexpected(null,5),o&&u&&this.unexpected(null,98);let E;if(p||y){if(E=!1,r)throw this.raise(x.UnsupportedDecoratorExport,e);this.parseExportFrom(e,p)}else E=this.maybeParseExportDeclaration(e);if(p||y||E){var P;const g=e;if(this.checkExport(g,!0,!1,!!g.source),((P=g.declaration)==null?void 0:P.type)==="ClassDeclaration")this.maybeTakeDecorators(r,g.declaration,g);else if(r)throw this.raise(x.UnsupportedDecoratorExport,e);return this.finishNode(g,"ExportNamedDeclaration")}if(this.eat(65)){const g=e,N=this.parseExportDefaultExpression();if(g.declaration=N,N.type==="ClassDeclaration")this.maybeTakeDecorators(r,N,g);else if(r)throw this.raise(x.UnsupportedDecoratorExport,e);return this.checkExport(g,!0,!0),this.finishNode(g,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r==null?void 0:r.loc.start);const s=r||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var r,s;(s=(r=e).specifiers)!=null||(r.specifiers=[]);const i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){const r=e;r.specifiers||(r.specifiers=[]);const s=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(s)),r.source=null,r.declaration=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(x.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(x.UnsupportedDefaultExport,this.state.startLoc);const r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(W(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){const{type:i}=this.lookahead();if(W(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const r=this.nextTokenStart(),s=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||W(this.state.type)&&s)return!0;if(this.match(65)&&s){const i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(e,r){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(x.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(x.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(x.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,r,s,i){if(r){var a;if(s){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var n;const o=e.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(x.ExportDefaultFromAsIdentifier,o)}}else if((a=e.specifiers)!=null&&a.length)for(const o of e.specifiers){const{exported:u}=o,p=u.type==="Identifier"?u.name:u.value;if(this.checkDuplicateExports(o,p),!i&&o.local){const{local:y}=o;y.type!=="Identifier"?this.raise(x.ExportBindingIsString,o,{localName:y.value,exportName:p}):(this.checkReservedWord(y.name,y.loc.start,!0,!1),this.scope.checkLocalExport(y))}}else if(e.declaration){const o=e.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){const{id:u}=o;if(!u)throw new Error("Assertion failure");this.checkDuplicateExports(e,u.name)}else if(o.type==="VariableDeclaration")for(const u of o.declarations)this.checkDeclaration(u.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(const r of e.properties)this.checkDeclaration(r);else if(e.type==="ArrayPattern")for(const r of e.elements)r&&this.checkDeclaration(r);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(x.DuplicateDefaultExport,e):this.raise(x.DuplicateExport,e,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(e){const r=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const i=this.isContextual(130),a=this.match(134),n=this.startNode();n.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(n,a,e,i))}return r}parseExportSpecifier(e,r,s,i){return this.eatContextual(93)?e.exported=this.parseModuleExportName():r?e.exported=Qn(e.local):e.exported||(e.exported=Te(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const e=this.parseStringLiteral(this.state.value),r=Io.exec(e.value);return r&&this.raise(x.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:r[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:r,value:s})=>s.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(e){const{specifiers:r}=e,s=r.length===1?r[0].type:null;if(e.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(x.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(e.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(x.DeferImportRequiresNamespace,r[0].loc.start);else if(e.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(x.ImportReflectionNotBinding,r[0].loc.start),((i=e.assertions)==null?void 0:i.length)>0&&this.raise(x.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){const{specifiers:r}=e;if(r!=null){const s=r.find(i=>{let a;if(i.type==="ExportSpecifier"?a=i.local:i.type==="ImportSpecifier"&&(a=i.imported),a!==void 0)return a.type==="Identifier"?a.name!=="default":a.value!=="default"});s!==void 0&&this.raise(x.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,r,s,i){r||(s==="module"?(this.expectPlugin("importReflection",i),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(e,r,null),null;const s=this.parseIdentifier(!0),{type:i}=this.state;return(ue(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(e,r,s.name,s.loc.start),null):(this.applyImportPhase(e,r,null),s)}isPrecedingIdImportPhase(e){const{type:r}=this.state;return W(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,r){e.specifiers=[];const i=!this.maybeParseDefaultImportSpecifier(e,r)||this.eat(12),a=i&&this.maybeParseStarImportSpecifier(e);return i&&!a&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var r;return(r=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,r,s){r.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(r,s))}finishImportSpecifier(e,r,s=8201){return this.checkLVal(e.local,{type:r},s),this.finishNode(e,r)}parseImportAttributes(){this.expect(5);const e=[],r=new Set;do{if(this.match(8))break;const s=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(x.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(134)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(x.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){const e=[],r=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(x.ModuleAttributeDifferentFromType,s.key),r.has(s.key.name)&&this.raise(x.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),r.add(s.key.name),this.expect(14),!this.match(134))throw this.raise(x.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let r;var s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?r=this.parseModuleAttributes():r=this.parseImportAttributes(),s=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(x.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),r=this.parseImportAttributes()):r=[];!s&&this.hasPlugin("importAssertions")?e.assertions=r:e.attributes=r}maybeParseDefaultImportSpecifier(e,r){if(r){const s=this.startNodeAtNode(r);return s.local=r,e.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(ue(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){const r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(x.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const s=this.startNode(),i=this.match(134),a=this.isContextual(130);s.imported=this.parseModuleExportName();const n=this.parseImportSpecifier(s,i,e.importKind==="type"||e.importKind==="typeof",a,void 0);e.specifiers.push(n)}}parseImportSpecifier(e,r,s,i,a){if(this.eatContextual(93))e.local=this.parseIdentifier();else{const{imported:n}=e;if(r)throw this.raise(x.ImportBindingIsString,e,{importName:n.value});this.checkReservedWord(n.name,e.loc.start,!0,!0),e.local||(e.local=Te(n))}return this.finishImportSpecifier(e,"ImportSpecifier",a)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}}class xi extends Co{constructor(e,r,s){e=nn(e),super(e,r),this.options=e,this.initializeScopes(),this.plugins=s,this.filename=e.sourceFilename,this.startIndex=e.startIndex;let i=0;e.allowAwaitOutsideFunction&&(i|=1),e.allowReturnOutsideFunction&&(i|=2),e.allowImportExportEverywhere&&(i|=8),e.allowSuperOutsideMethod&&(i|=16),e.allowUndeclaredExports&&(i|=32),e.allowNewTargetOutsideFunction&&(i|=4),e.ranges&&(i|=64),e.tokens&&(i|=128),e.createImportExpressions&&(i|=256),e.createParenthesizedExpressions&&(i|=512),e.errorRecovery&&(i|=1024),e.attachComment&&(i|=2048),e.annexB&&(i|=4096),this.optionFlags=i}getScopeHandler(){return wr}parse(){this.enterInitialScopes();const e=this.startNode(),r=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,r),e.errors=this.state.errors,e.comments.length=this.state.commentsLen,e}}function No(t,e){var r;if(((r=e)==null?void 0:r.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";const s=st(e,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",st(e,t).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return e.sourceType="script",st(e,t).parse()}catch{}throw s}}else return st(e,t).parse()}function wo(t,e){const r=st(e,t);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function Oo(t){const e={};for(const r of Object.keys(t))e[r]=ye(t[r]);return e}const Do=Oo(cn);function st(t,e){let r=xi;const s=new Map;if(t!=null&&t.plugins){for(const i of t.plugins){let a,n;typeof i=="string"?a=i:[a,n]=i,s.has(a)||s.set(a,n||{})}Eo(s),r=Lo(s)}return new r(t,e,s)}const bi=new Map;function Lo(t){const e=[];for(const i of Po)t.has(i)&&e.push(i);const r=e.join("|");let s=bi.get(r);if(!s){s=xi;for(const i of e)s=Si[i](s);bi.set(r,s)}return s}var ko=xt.parse=No;xt.parseExpression=wo,xt.tokTypes=Do;const _o=t=>{const e=new Set;for(const r of t.program.body)if(r.type==="ExportDefaultDeclaration"&&e.add("default"),r.type==="ExportNamedDeclaration"){const{declaration:s,specifiers:i}=r;if(s)if(s.type==="FunctionDeclaration"&&s.id)e.add(s.id.name);else if(s.type==="VariableDeclaration"&&s.declarations.length)for(const a of s.declarations)a.id.type==="Identifier"&&e.add(a.id.name);else s.type==="ClassDeclaration"&&s.id&&e.add(s.id.name);i!=null&&i.length&&i.forEach(a=>{a.type==="ExportSpecifier"&&a.exported.type==="Identifier"&&e.add(a.exported.name)})}return Array.from(e)},Ei=t=>{const e=new Set(["render","mount","createApp","createRoot"]);for(const r of t.program.body){if(r.type!=="ImportDeclaration")continue;const s=r.source.value;if(typeof s=="string"){if(s==="lithent"&&r.specifiers.some(a=>{if(a.type==="ImportSpecifier"&&a.imported.type==="Identifier"){const n=a.imported.name;return e.has(n)}return!1}))return!0;if(s.startsWith("lithent/")){if(r.importKind==="type")continue;return!0}}}return!1},Mo=(t,e,r,s)=>{const i=[];let a=!1,n=0,o=0,u=null;for(const P of t.program.body){if(P.type==="ImportDeclaration"){n=P.end??n,u==null&&(u=P.start??null),P.source.value===r&&(a=!0);continue}if(P.type==="ExpressionStatement"&&P.expression.type==="StringLiteral"){const g=P;if(typeof g.directive=="string"){o=g.end??o;continue}}break}a||i.push(`import { createBoundary } from '${r}';`);const p=u??o??0,y=n||o||0;let E="";if(i.length){const P=p>0?e[p-1]:void 0,g=p>0&&P!==`
|
|
170
210
|
`;E+=g?`
|
|
171
211
|
`:"",E+=i.join(`
|
|
172
212
|
`),E+=`
|
|
173
|
-
`}return{importInsertionPos:p,blockInsertionPos:y,headerSnippet:E}},Pi=(t,e,r)=>{const s=
|
|
174
|
-
`)}for(const
|
|
213
|
+
`}return{importInsertionPos:p,blockInsertionPos:y,headerSnippet:E}},Pi=(t,e,r)=>{const s=ko(t,{sourceType:"module",plugins:["typescript","jsx"],ranges:!0}),i=_o(s),a=i.length>0?i:["default"],{importInsertionPos:n,blockInsertionPos:o,headerSnippet:u}=Mo(s,t,e);return{ast:s,targetExports:a,importInsertionPos:n,blockInsertionPos:o,headerSnippet:u}},gi=t=>{const{code:e,markerRegex:r,boundaryImportSpecifier:s,tagFunctionImportSpecifier:i}=t,{ast:a,targetExports:n,importInsertionPos:o,blockInsertionPos:u,headerSnippet:p}=Pi(e,s),y=r.exec(e),E=y!=null&&y[1]?y[1].split(",").map(g=>g.trim()).filter(Boolean):[];return{targetExports:E.length?E:n,shouldTransform:!!y||Ei(a),importInsertionPos:o,blockInsertionPos:u,headerSnippet:p,ast:a,match:y??null}},Ai=t=>{const{code:e,boundaryImportSpecifier:r,tagFunctionImportSpecifier:s}=t,{ast:i,targetExports:a,importInsertionPos:n,blockInsertionPos:o,headerSnippet:u}=Pi(e,r);return{targetExports:a,shouldTransform:Ei(i),importInsertionPos:n,blockInsertionPos:o,headerSnippet:u,ast:i}},Bo=t=>t.includes("__lithentModuleId"),Ii=(t,e,r,s)=>{if(!e.length)return;const i=Fo(r),a=!vi(i,"mountCallback"),n=!vi(i,"getComponentKey");if(a||n){const o=[];a&&o.push("mountCallback"),n&&o.push("getComponentKey");const u=o.join(", ");t.appendLeft(s,`import { ${u} } from 'lithent';
|
|
214
|
+
`)}for(const o of e){const{insertPos:u,componentName:p,declarationEnd:y}=o;if(t.appendLeft(u,`
|
|
175
215
|
const compKey = getComponentKey();
|
|
176
216
|
const unregister = compKey ? counterBoundary.register(compKey) : null;
|
|
177
217
|
if (unregister) {
|
|
178
218
|
mountCallback(() => () => unregister());
|
|
179
219
|
}
|
|
180
|
-
`),
|
|
181
|
-
const ${
|
|
220
|
+
`),p){const P=`__lithentHotComponent_${p}`,g=`
|
|
221
|
+
const ${P} = ${p};
|
|
182
222
|
if (__lithentModuleHotStore) {
|
|
183
|
-
__lithentModuleHotStore["${
|
|
223
|
+
__lithentModuleHotStore["${p}"] = ${P};
|
|
184
224
|
}
|
|
185
|
-
`;t.appendRight(
|
|
186
|
-
|
|
187
|
-
`)}}Object.defineProperty(d,"__esModule",{value:!0}),d.isAccessor=sd,d.isAnyTypeAnnotation=bu,d.isArgumentPlaceholder=Hc,d.isArrayExpression=jo,d.isArrayPattern=Fl,d.isArrayTypeAnnotation=Eu,d.isArrowFunctionExpression=Rl,d.isAssignmentExpression=Ko,d.isAssignmentPattern=Bl,d.isAwaitExpression=ou,d.isBigIntLiteral=uu,d.isBinary=If,d.isBinaryExpression=Uo,d.isBindExpression=zc,d.isBlock=Cf,d.isBlockParent=Nf,d.isBlockStatement=Xo,d.isBooleanLiteral=fl,d.isBooleanLiteralTypeAnnotation=gu,d.isBooleanTypeAnnotation=Pu,d.isBreakStatement=Jo,d.isCallExpression=qo,d.isCatchClause=Wo,d.isClass=ed,d.isClassAccessorProperty=hu,d.isClassBody=jl,d.isClassDeclaration=Ul,d.isClassExpression=Kl,d.isClassImplements=Iu,d.isClassMethod=Zl,d.isClassPrivateMethod=mu,d.isClassPrivateProperty=yu,d.isClassProperty=du,d.isCompletionStatement=Df,d.isConditional=Lf,d.isConditionalExpression=Ho,d.isContinueStatement=zo,d.isDebuggerStatement=Go,d.isDecimalLiteral=rp,d.isDeclaration=Uf,d.isDeclareClass=vu,d.isDeclareExportAllDeclaration=_u,d.isDeclareExportDeclaration=Mu,d.isDeclareFunction=Nu,d.isDeclareInterface=Cu,d.isDeclareModule=wu,d.isDeclareModuleExports=Ou,d.isDeclareOpaqueType=Lu,d.isDeclareTypeAlias=Du,d.isDeclareVariable=ku,d.isDeclaredPredicate=Bu,d.isDecorator=Gc,d.isDirective=$o,d.isDirectiveLiteral=Yo,d.isDoExpression=Qc,d.isDoWhileStatement=Qo,d.isEmptyStatement=Zo,d.isEmptyTypeAnnotation=qu,d.isEnumBody=cd,d.isEnumBooleanBody=Ec,d.isEnumBooleanMember=Ic,d.isEnumDeclaration=bc,d.isEnumDefaultedMember=Cc,d.isEnumMember=pd,d.isEnumNumberBody=Pc,d.isEnumNumberMember=vc,d.isEnumStringBody=gc,d.isEnumStringMember=Nc,d.isEnumSymbolBody=Ac,d.isExistsTypeAnnotation=Fu,d.isExportAllDeclaration=Vl,d.isExportDeclaration=td,d.isExportDefaultDeclaration=$l,d.isExportDefaultSpecifier=Zc,d.isExportNamedDeclaration=Yl,d.isExportNamespaceSpecifier=cu,d.isExportSpecifier=Xl,d.isExpression=Af,d.isExpressionStatement=el,d.isExpressionWrapper=_f,d.isFile=tl,d.isFlow=ad,d.isFlowBaseAnnotation=od,d.isFlowDeclaration=ld,d.isFlowPredicate=ud,d.isFlowType=nd,d.isFor=Bf,d.isForInStatement=rl,d.isForOfStatement=Jl,d.isForStatement=sl,d.isForXStatement=Ff,d.isFunction=Rf,d.isFunctionDeclaration=il,d.isFunctionExpression=al,d.isFunctionParameter=Vf,d.isFunctionParent=jf,d.isFunctionTypeAnnotation=Ru,d.isFunctionTypeParam=ju,d.isGenericTypeAnnotation=Ku,d.isIdentifier=nl,d.isIfStatement=ol,d.isImmutable=qf,d.isImport=lu,d.isImportAttribute=xu,d.isImportDeclaration=ql,d.isImportDefaultSpecifier=Wl,d.isImportExpression=Gl,d.isImportNamespaceSpecifier=Hl,d.isImportOrExportDeclaration=Ni,d.isImportSpecifier=zl,d.isIndexedAccessType=wc,d.isInferredPredicate=Uu,d.isInterfaceDeclaration=$u,d.isInterfaceExtends=Vu,d.isInterfaceTypeAnnotation=Yu,d.isInterpreterDirective=Vo,d.isIntersectionTypeAnnotation=Xu,d.isJSX=fd,d.isJSXAttribute=Dc,d.isJSXClosingElement=Lc,d.isJSXClosingFragment=Xc,d.isJSXElement=kc,d.isJSXEmptyExpression=Mc,d.isJSXExpressionContainer=_c,d.isJSXFragment=$c,d.isJSXIdentifier=Fc,d.isJSXMemberExpression=Rc,d.isJSXNamespacedName=jc,d.isJSXOpeningElement=Kc,d.isJSXOpeningFragment=Yc,d.isJSXSpreadAttribute=Uc,d.isJSXSpreadChild=Bc,d.isJSXText=Vc,d.isLVal=Yf,d.isLabeledStatement=ll,d.isLiteral=Jf,d.isLogicalExpression=hl,d.isLoop=kf,d.isMemberExpression=yl,d.isMetaProperty=Ql,d.isMethod=Hf,d.isMiscellaneous=dd,d.isMixedTypeAnnotation=Ju,d.isModuleDeclaration=Pd,d.isModuleExpression=sp,d.isModuleSpecifier=rd,d.isNewExpression=ml,d.isNoop=Jc,d.isNullLiteral=pl,d.isNullLiteralTypeAnnotation=Au,d.isNullableTypeAnnotation=Wu,d.isNumberLiteral=Sd,d.isNumberLiteralTypeAnnotation=Hu,d.isNumberTypeAnnotation=zu,d.isNumericLiteral=cl,d.isObjectExpression=Sl,d.isObjectMember=zf,d.isObjectMethod=xl,d.isObjectPattern=eu,d.isObjectProperty=bl,d.isObjectTypeAnnotation=Gu,d.isObjectTypeCallProperty=Zu,d.isObjectTypeIndexer=ec,d.isObjectTypeInternalSlot=Qu,d.isObjectTypeProperty=tc,d.isObjectTypeSpreadProperty=rc,d.isOpaqueType=sc,d.isOptionalCallExpression=fu,d.isOptionalIndexedAccessType=Oc,d.isOptionalMemberExpression=pu,d.isParenthesizedExpression=Al,d.isPattern=Zf,d.isPatternLike=$f,d.isPipelineBareFunction=np,d.isPipelinePrimaryTopicReference=op,d.isPipelineTopicExpression=ap,d.isPlaceholder=qc,d.isPrivate=id,d.isPrivateName=Tu,d.isProgram=Tl,d.isProperty=Gf,d.isPureish=Kf,d.isQualifiedTypeIdentifier=ic,d.isRecordExpression=ep,d.isRegExpLiteral=dl,d.isRegexLiteral=xd,d.isRestElement=El,d.isRestProperty=bd,d.isReturnStatement=Pl,d.isScopable=vf,d.isSequenceExpression=gl,d.isSpreadElement=tu,d.isSpreadProperty=Ed,d.isStandardized=gf,d.isStatement=wf,d.isStaticBlock=Su,d.isStringLiteral=ul,d.isStringLiteralTypeAnnotation=ac,d.isStringTypeAnnotation=nc,d.isSuper=ru,d.isSwitchCase=Il,d.isSwitchStatement=vl,d.isSymbolTypeAnnotation=oc,d.isTSAnyKeyword=Sp,d.isTSArrayType=Rp,d.isTSAsExpression=af,d.isTSBaseType=Td,d.isTSBigIntKeyword=bp,d.isTSBooleanKeyword=xp,d.isTSCallSignatureDeclaration=dp,d.isTSConditionalType=Xp,d.isTSConstructSignatureDeclaration=hp,d.isTSConstructorType=kp,d.isTSDeclareFunction=cp,d.isTSDeclareMethod=pp,d.isTSEntityName=Xf,d.isTSEnumBody=lf,d.isTSEnumDeclaration=uf,d.isTSEnumMember=cf,d.isTSExportAssignment=Tf,d.isTSExpressionWithTypeArguments=Zp,d.isTSExternalModuleReference=yf,d.isTSFunctionType=Lp,d.isTSImportEqualsDeclaration=hf,d.isTSImportType=df,d.isTSIndexSignature=Tp,d.isTSIndexedAccessType=Hp,d.isTSInferType=Jp,d.isTSInstantiationExpression=sf,d.isTSInterfaceBody=tf,d.isTSInterfaceDeclaration=ef,d.isTSIntersectionType=Yp,d.isTSIntrinsicKeyword=Ep,d.isTSLiteralType=Qp,d.isTSMappedType=zp,d.isTSMethodSignature=mp,d.isTSModuleBlock=ff,d.isTSModuleDeclaration=pf,d.isTSNamedTupleMember=Vp,d.isTSNamespaceExportDeclaration=Sf,d.isTSNeverKeyword=Pp,d.isTSNonNullExpression=mf,d.isTSNullKeyword=gp,d.isTSNumberKeyword=Ap,d.isTSObjectKeyword=Ip,d.isTSOptionalType=Kp,d.isTSParameterProperty=up,d.isTSParenthesizedType=qp,d.isTSPropertySignature=yp,d.isTSQualifiedName=fp,d.isTSRestType=Up,d.isTSSatisfiesExpression=nf,d.isTSStringKeyword=vp,d.isTSSymbolKeyword=Np,d.isTSTemplateLiteralType=Gp,d.isTSThisType=Dp,d.isTSTupleType=jp,d.isTSType=md,d.isTSTypeAliasDeclaration=rf,d.isTSTypeAnnotation=xf,d.isTSTypeAssertion=of,d.isTSTypeElement=yd,d.isTSTypeLiteral=Fp,d.isTSTypeOperator=Wp,d.isTSTypeParameter=Pf,d.isTSTypeParameterDeclaration=Ef,d.isTSTypeParameterInstantiation=bf,d.isTSTypePredicate=_p,d.isTSTypeQuery=Bp,d.isTSTypeReference=Mp,d.isTSUndefinedKeyword=Cp,d.isTSUnionType=$p,d.isTSUnknownKeyword=wp,d.isTSVoidKeyword=Op,d.isTaggedTemplateExpression=su,d.isTemplateElement=iu,d.isTemplateLiteral=au,d.isTerminatorless=Of,d.isThisExpression=Nl,d.isThisTypeAnnotation=lc,d.isThrowStatement=Cl,d.isTopicReference=ip,d.isTryStatement=wl,d.isTupleExpression=tp,d.isTupleTypeAnnotation=uc,d.isTypeAlias=pc,d.isTypeAnnotation=fc,d.isTypeCastExpression=dc,d.isTypeParameter=hc,d.isTypeParameterDeclaration=yc,d.isTypeParameterInstantiation=mc,d.isTypeScript=hd,d.isTypeofTypeAnnotation=cc,d.isUnaryExpression=Ol,d.isUnaryLike=Qf,d.isUnionTypeAnnotation=Tc,d.isUpdateExpression=Dl,d.isUserWhitespacable=Wf,d.isV8IntrinsicIdentifier=Wc,d.isVariableDeclaration=Ll,d.isVariableDeclarator=kl,d.isVariance=Sc,d.isVoidPattern=lp,d.isVoidTypeAnnotation=xc,d.isWhile=Mf,d.isWhileStatement=Ml,d.isWithStatement=_l,d.isYieldExpression=nu;var T=it,at=$e;function jo(t,e){return!t||t.type!=="ArrayExpression"?!1:e==null||(0,T.default)(t,e)}function Ko(t,e){return!t||t.type!=="AssignmentExpression"?!1:e==null||(0,T.default)(t,e)}function Uo(t,e){return!t||t.type!=="BinaryExpression"?!1:e==null||(0,T.default)(t,e)}function Vo(t,e){return!t||t.type!=="InterpreterDirective"?!1:e==null||(0,T.default)(t,e)}function $o(t,e){return!t||t.type!=="Directive"?!1:e==null||(0,T.default)(t,e)}function Yo(t,e){return!t||t.type!=="DirectiveLiteral"?!1:e==null||(0,T.default)(t,e)}function Xo(t,e){return!t||t.type!=="BlockStatement"?!1:e==null||(0,T.default)(t,e)}function Jo(t,e){return!t||t.type!=="BreakStatement"?!1:e==null||(0,T.default)(t,e)}function qo(t,e){return!t||t.type!=="CallExpression"?!1:e==null||(0,T.default)(t,e)}function Wo(t,e){return!t||t.type!=="CatchClause"?!1:e==null||(0,T.default)(t,e)}function Ho(t,e){return!t||t.type!=="ConditionalExpression"?!1:e==null||(0,T.default)(t,e)}function zo(t,e){return!t||t.type!=="ContinueStatement"?!1:e==null||(0,T.default)(t,e)}function Go(t,e){return!t||t.type!=="DebuggerStatement"?!1:e==null||(0,T.default)(t,e)}function Qo(t,e){return!t||t.type!=="DoWhileStatement"?!1:e==null||(0,T.default)(t,e)}function Zo(t,e){return!t||t.type!=="EmptyStatement"?!1:e==null||(0,T.default)(t,e)}function el(t,e){return!t||t.type!=="ExpressionStatement"?!1:e==null||(0,T.default)(t,e)}function tl(t,e){return!t||t.type!=="File"?!1:e==null||(0,T.default)(t,e)}function rl(t,e){return!t||t.type!=="ForInStatement"?!1:e==null||(0,T.default)(t,e)}function sl(t,e){return!t||t.type!=="ForStatement"?!1:e==null||(0,T.default)(t,e)}function il(t,e){return!t||t.type!=="FunctionDeclaration"?!1:e==null||(0,T.default)(t,e)}function al(t,e){return!t||t.type!=="FunctionExpression"?!1:e==null||(0,T.default)(t,e)}function nl(t,e){return!t||t.type!=="Identifier"?!1:e==null||(0,T.default)(t,e)}function ol(t,e){return!t||t.type!=="IfStatement"?!1:e==null||(0,T.default)(t,e)}function ll(t,e){return!t||t.type!=="LabeledStatement"?!1:e==null||(0,T.default)(t,e)}function ul(t,e){return!t||t.type!=="StringLiteral"?!1:e==null||(0,T.default)(t,e)}function cl(t,e){return!t||t.type!=="NumericLiteral"?!1:e==null||(0,T.default)(t,e)}function pl(t,e){return!t||t.type!=="NullLiteral"?!1:e==null||(0,T.default)(t,e)}function fl(t,e){return!t||t.type!=="BooleanLiteral"?!1:e==null||(0,T.default)(t,e)}function dl(t,e){return!t||t.type!=="RegExpLiteral"?!1:e==null||(0,T.default)(t,e)}function hl(t,e){return!t||t.type!=="LogicalExpression"?!1:e==null||(0,T.default)(t,e)}function yl(t,e){return!t||t.type!=="MemberExpression"?!1:e==null||(0,T.default)(t,e)}function ml(t,e){return!t||t.type!=="NewExpression"?!1:e==null||(0,T.default)(t,e)}function Tl(t,e){return!t||t.type!=="Program"?!1:e==null||(0,T.default)(t,e)}function Sl(t,e){return!t||t.type!=="ObjectExpression"?!1:e==null||(0,T.default)(t,e)}function xl(t,e){return!t||t.type!=="ObjectMethod"?!1:e==null||(0,T.default)(t,e)}function bl(t,e){return!t||t.type!=="ObjectProperty"?!1:e==null||(0,T.default)(t,e)}function El(t,e){return!t||t.type!=="RestElement"?!1:e==null||(0,T.default)(t,e)}function Pl(t,e){return!t||t.type!=="ReturnStatement"?!1:e==null||(0,T.default)(t,e)}function gl(t,e){return!t||t.type!=="SequenceExpression"?!1:e==null||(0,T.default)(t,e)}function Al(t,e){return!t||t.type!=="ParenthesizedExpression"?!1:e==null||(0,T.default)(t,e)}function Il(t,e){return!t||t.type!=="SwitchCase"?!1:e==null||(0,T.default)(t,e)}function vl(t,e){return!t||t.type!=="SwitchStatement"?!1:e==null||(0,T.default)(t,e)}function Nl(t,e){return!t||t.type!=="ThisExpression"?!1:e==null||(0,T.default)(t,e)}function Cl(t,e){return!t||t.type!=="ThrowStatement"?!1:e==null||(0,T.default)(t,e)}function wl(t,e){return!t||t.type!=="TryStatement"?!1:e==null||(0,T.default)(t,e)}function Ol(t,e){return!t||t.type!=="UnaryExpression"?!1:e==null||(0,T.default)(t,e)}function Dl(t,e){return!t||t.type!=="UpdateExpression"?!1:e==null||(0,T.default)(t,e)}function Ll(t,e){return!t||t.type!=="VariableDeclaration"?!1:e==null||(0,T.default)(t,e)}function kl(t,e){return!t||t.type!=="VariableDeclarator"?!1:e==null||(0,T.default)(t,e)}function Ml(t,e){return!t||t.type!=="WhileStatement"?!1:e==null||(0,T.default)(t,e)}function _l(t,e){return!t||t.type!=="WithStatement"?!1:e==null||(0,T.default)(t,e)}function Bl(t,e){return!t||t.type!=="AssignmentPattern"?!1:e==null||(0,T.default)(t,e)}function Fl(t,e){return!t||t.type!=="ArrayPattern"?!1:e==null||(0,T.default)(t,e)}function Rl(t,e){return!t||t.type!=="ArrowFunctionExpression"?!1:e==null||(0,T.default)(t,e)}function jl(t,e){return!t||t.type!=="ClassBody"?!1:e==null||(0,T.default)(t,e)}function Kl(t,e){return!t||t.type!=="ClassExpression"?!1:e==null||(0,T.default)(t,e)}function Ul(t,e){return!t||t.type!=="ClassDeclaration"?!1:e==null||(0,T.default)(t,e)}function Vl(t,e){return!t||t.type!=="ExportAllDeclaration"?!1:e==null||(0,T.default)(t,e)}function $l(t,e){return!t||t.type!=="ExportDefaultDeclaration"?!1:e==null||(0,T.default)(t,e)}function Yl(t,e){return!t||t.type!=="ExportNamedDeclaration"?!1:e==null||(0,T.default)(t,e)}function Xl(t,e){return!t||t.type!=="ExportSpecifier"?!1:e==null||(0,T.default)(t,e)}function Jl(t,e){return!t||t.type!=="ForOfStatement"?!1:e==null||(0,T.default)(t,e)}function ql(t,e){return!t||t.type!=="ImportDeclaration"?!1:e==null||(0,T.default)(t,e)}function Wl(t,e){return!t||t.type!=="ImportDefaultSpecifier"?!1:e==null||(0,T.default)(t,e)}function Hl(t,e){return!t||t.type!=="ImportNamespaceSpecifier"?!1:e==null||(0,T.default)(t,e)}function zl(t,e){return!t||t.type!=="ImportSpecifier"?!1:e==null||(0,T.default)(t,e)}function Gl(t,e){return!t||t.type!=="ImportExpression"?!1:e==null||(0,T.default)(t,e)}function Ql(t,e){return!t||t.type!=="MetaProperty"?!1:e==null||(0,T.default)(t,e)}function Zl(t,e){return!t||t.type!=="ClassMethod"?!1:e==null||(0,T.default)(t,e)}function eu(t,e){return!t||t.type!=="ObjectPattern"?!1:e==null||(0,T.default)(t,e)}function tu(t,e){return!t||t.type!=="SpreadElement"?!1:e==null||(0,T.default)(t,e)}function ru(t,e){return!t||t.type!=="Super"?!1:e==null||(0,T.default)(t,e)}function su(t,e){return!t||t.type!=="TaggedTemplateExpression"?!1:e==null||(0,T.default)(t,e)}function iu(t,e){return!t||t.type!=="TemplateElement"?!1:e==null||(0,T.default)(t,e)}function au(t,e){return!t||t.type!=="TemplateLiteral"?!1:e==null||(0,T.default)(t,e)}function nu(t,e){return!t||t.type!=="YieldExpression"?!1:e==null||(0,T.default)(t,e)}function ou(t,e){return!t||t.type!=="AwaitExpression"?!1:e==null||(0,T.default)(t,e)}function lu(t,e){return!t||t.type!=="Import"?!1:e==null||(0,T.default)(t,e)}function uu(t,e){return!t||t.type!=="BigIntLiteral"?!1:e==null||(0,T.default)(t,e)}function cu(t,e){return!t||t.type!=="ExportNamespaceSpecifier"?!1:e==null||(0,T.default)(t,e)}function pu(t,e){return!t||t.type!=="OptionalMemberExpression"?!1:e==null||(0,T.default)(t,e)}function fu(t,e){return!t||t.type!=="OptionalCallExpression"?!1:e==null||(0,T.default)(t,e)}function du(t,e){return!t||t.type!=="ClassProperty"?!1:e==null||(0,T.default)(t,e)}function hu(t,e){return!t||t.type!=="ClassAccessorProperty"?!1:e==null||(0,T.default)(t,e)}function yu(t,e){return!t||t.type!=="ClassPrivateProperty"?!1:e==null||(0,T.default)(t,e)}function mu(t,e){return!t||t.type!=="ClassPrivateMethod"?!1:e==null||(0,T.default)(t,e)}function Tu(t,e){return!t||t.type!=="PrivateName"?!1:e==null||(0,T.default)(t,e)}function Su(t,e){return!t||t.type!=="StaticBlock"?!1:e==null||(0,T.default)(t,e)}function xu(t,e){return!t||t.type!=="ImportAttribute"?!1:e==null||(0,T.default)(t,e)}function bu(t,e){return!t||t.type!=="AnyTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Eu(t,e){return!t||t.type!=="ArrayTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Pu(t,e){return!t||t.type!=="BooleanTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function gu(t,e){return!t||t.type!=="BooleanLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Au(t,e){return!t||t.type!=="NullLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Iu(t,e){return!t||t.type!=="ClassImplements"?!1:e==null||(0,T.default)(t,e)}function vu(t,e){return!t||t.type!=="DeclareClass"?!1:e==null||(0,T.default)(t,e)}function Nu(t,e){return!t||t.type!=="DeclareFunction"?!1:e==null||(0,T.default)(t,e)}function Cu(t,e){return!t||t.type!=="DeclareInterface"?!1:e==null||(0,T.default)(t,e)}function wu(t,e){return!t||t.type!=="DeclareModule"?!1:e==null||(0,T.default)(t,e)}function Ou(t,e){return!t||t.type!=="DeclareModuleExports"?!1:e==null||(0,T.default)(t,e)}function Du(t,e){return!t||t.type!=="DeclareTypeAlias"?!1:e==null||(0,T.default)(t,e)}function Lu(t,e){return!t||t.type!=="DeclareOpaqueType"?!1:e==null||(0,T.default)(t,e)}function ku(t,e){return!t||t.type!=="DeclareVariable"?!1:e==null||(0,T.default)(t,e)}function Mu(t,e){return!t||t.type!=="DeclareExportDeclaration"?!1:e==null||(0,T.default)(t,e)}function _u(t,e){return!t||t.type!=="DeclareExportAllDeclaration"?!1:e==null||(0,T.default)(t,e)}function Bu(t,e){return!t||t.type!=="DeclaredPredicate"?!1:e==null||(0,T.default)(t,e)}function Fu(t,e){return!t||t.type!=="ExistsTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Ru(t,e){return!t||t.type!=="FunctionTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function ju(t,e){return!t||t.type!=="FunctionTypeParam"?!1:e==null||(0,T.default)(t,e)}function Ku(t,e){return!t||t.type!=="GenericTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Uu(t,e){return!t||t.type!=="InferredPredicate"?!1:e==null||(0,T.default)(t,e)}function Vu(t,e){return!t||t.type!=="InterfaceExtends"?!1:e==null||(0,T.default)(t,e)}function $u(t,e){return!t||t.type!=="InterfaceDeclaration"?!1:e==null||(0,T.default)(t,e)}function Yu(t,e){return!t||t.type!=="InterfaceTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Xu(t,e){return!t||t.type!=="IntersectionTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Ju(t,e){return!t||t.type!=="MixedTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function qu(t,e){return!t||t.type!=="EmptyTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Wu(t,e){return!t||t.type!=="NullableTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Hu(t,e){return!t||t.type!=="NumberLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function zu(t,e){return!t||t.type!=="NumberTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Gu(t,e){return!t||t.type!=="ObjectTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Qu(t,e){return!t||t.type!=="ObjectTypeInternalSlot"?!1:e==null||(0,T.default)(t,e)}function Zu(t,e){return!t||t.type!=="ObjectTypeCallProperty"?!1:e==null||(0,T.default)(t,e)}function ec(t,e){return!t||t.type!=="ObjectTypeIndexer"?!1:e==null||(0,T.default)(t,e)}function tc(t,e){return!t||t.type!=="ObjectTypeProperty"?!1:e==null||(0,T.default)(t,e)}function rc(t,e){return!t||t.type!=="ObjectTypeSpreadProperty"?!1:e==null||(0,T.default)(t,e)}function sc(t,e){return!t||t.type!=="OpaqueType"?!1:e==null||(0,T.default)(t,e)}function ic(t,e){return!t||t.type!=="QualifiedTypeIdentifier"?!1:e==null||(0,T.default)(t,e)}function ac(t,e){return!t||t.type!=="StringLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function nc(t,e){return!t||t.type!=="StringTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function oc(t,e){return!t||t.type!=="SymbolTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function lc(t,e){return!t||t.type!=="ThisTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function uc(t,e){return!t||t.type!=="TupleTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function cc(t,e){return!t||t.type!=="TypeofTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function pc(t,e){return!t||t.type!=="TypeAlias"?!1:e==null||(0,T.default)(t,e)}function fc(t,e){return!t||t.type!=="TypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function dc(t,e){return!t||t.type!=="TypeCastExpression"?!1:e==null||(0,T.default)(t,e)}function hc(t,e){return!t||t.type!=="TypeParameter"?!1:e==null||(0,T.default)(t,e)}function yc(t,e){return!t||t.type!=="TypeParameterDeclaration"?!1:e==null||(0,T.default)(t,e)}function mc(t,e){return!t||t.type!=="TypeParameterInstantiation"?!1:e==null||(0,T.default)(t,e)}function Tc(t,e){return!t||t.type!=="UnionTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Sc(t,e){return!t||t.type!=="Variance"?!1:e==null||(0,T.default)(t,e)}function xc(t,e){return!t||t.type!=="VoidTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function bc(t,e){return!t||t.type!=="EnumDeclaration"?!1:e==null||(0,T.default)(t,e)}function Ec(t,e){return!t||t.type!=="EnumBooleanBody"?!1:e==null||(0,T.default)(t,e)}function Pc(t,e){return!t||t.type!=="EnumNumberBody"?!1:e==null||(0,T.default)(t,e)}function gc(t,e){return!t||t.type!=="EnumStringBody"?!1:e==null||(0,T.default)(t,e)}function Ac(t,e){return!t||t.type!=="EnumSymbolBody"?!1:e==null||(0,T.default)(t,e)}function Ic(t,e){return!t||t.type!=="EnumBooleanMember"?!1:e==null||(0,T.default)(t,e)}function vc(t,e){return!t||t.type!=="EnumNumberMember"?!1:e==null||(0,T.default)(t,e)}function Nc(t,e){return!t||t.type!=="EnumStringMember"?!1:e==null||(0,T.default)(t,e)}function Cc(t,e){return!t||t.type!=="EnumDefaultedMember"?!1:e==null||(0,T.default)(t,e)}function wc(t,e){return!t||t.type!=="IndexedAccessType"?!1:e==null||(0,T.default)(t,e)}function Oc(t,e){return!t||t.type!=="OptionalIndexedAccessType"?!1:e==null||(0,T.default)(t,e)}function Dc(t,e){return!t||t.type!=="JSXAttribute"?!1:e==null||(0,T.default)(t,e)}function Lc(t,e){return!t||t.type!=="JSXClosingElement"?!1:e==null||(0,T.default)(t,e)}function kc(t,e){return!t||t.type!=="JSXElement"?!1:e==null||(0,T.default)(t,e)}function Mc(t,e){return!t||t.type!=="JSXEmptyExpression"?!1:e==null||(0,T.default)(t,e)}function _c(t,e){return!t||t.type!=="JSXExpressionContainer"?!1:e==null||(0,T.default)(t,e)}function Bc(t,e){return!t||t.type!=="JSXSpreadChild"?!1:e==null||(0,T.default)(t,e)}function Fc(t,e){return!t||t.type!=="JSXIdentifier"?!1:e==null||(0,T.default)(t,e)}function Rc(t,e){return!t||t.type!=="JSXMemberExpression"?!1:e==null||(0,T.default)(t,e)}function jc(t,e){return!t||t.type!=="JSXNamespacedName"?!1:e==null||(0,T.default)(t,e)}function Kc(t,e){return!t||t.type!=="JSXOpeningElement"?!1:e==null||(0,T.default)(t,e)}function Uc(t,e){return!t||t.type!=="JSXSpreadAttribute"?!1:e==null||(0,T.default)(t,e)}function Vc(t,e){return!t||t.type!=="JSXText"?!1:e==null||(0,T.default)(t,e)}function $c(t,e){return!t||t.type!=="JSXFragment"?!1:e==null||(0,T.default)(t,e)}function Yc(t,e){return!t||t.type!=="JSXOpeningFragment"?!1:e==null||(0,T.default)(t,e)}function Xc(t,e){return!t||t.type!=="JSXClosingFragment"?!1:e==null||(0,T.default)(t,e)}function Jc(t,e){return!t||t.type!=="Noop"?!1:e==null||(0,T.default)(t,e)}function qc(t,e){return!t||t.type!=="Placeholder"?!1:e==null||(0,T.default)(t,e)}function Wc(t,e){return!t||t.type!=="V8IntrinsicIdentifier"?!1:e==null||(0,T.default)(t,e)}function Hc(t,e){return!t||t.type!=="ArgumentPlaceholder"?!1:e==null||(0,T.default)(t,e)}function zc(t,e){return!t||t.type!=="BindExpression"?!1:e==null||(0,T.default)(t,e)}function Gc(t,e){return!t||t.type!=="Decorator"?!1:e==null||(0,T.default)(t,e)}function Qc(t,e){return!t||t.type!=="DoExpression"?!1:e==null||(0,T.default)(t,e)}function Zc(t,e){return!t||t.type!=="ExportDefaultSpecifier"?!1:e==null||(0,T.default)(t,e)}function ep(t,e){return!t||t.type!=="RecordExpression"?!1:e==null||(0,T.default)(t,e)}function tp(t,e){return!t||t.type!=="TupleExpression"?!1:e==null||(0,T.default)(t,e)}function rp(t,e){return!t||t.type!=="DecimalLiteral"?!1:e==null||(0,T.default)(t,e)}function sp(t,e){return!t||t.type!=="ModuleExpression"?!1:e==null||(0,T.default)(t,e)}function ip(t,e){return!t||t.type!=="TopicReference"?!1:e==null||(0,T.default)(t,e)}function ap(t,e){return!t||t.type!=="PipelineTopicExpression"?!1:e==null||(0,T.default)(t,e)}function np(t,e){return!t||t.type!=="PipelineBareFunction"?!1:e==null||(0,T.default)(t,e)}function op(t,e){return!t||t.type!=="PipelinePrimaryTopicReference"?!1:e==null||(0,T.default)(t,e)}function lp(t,e){return!t||t.type!=="VoidPattern"?!1:e==null||(0,T.default)(t,e)}function up(t,e){return!t||t.type!=="TSParameterProperty"?!1:e==null||(0,T.default)(t,e)}function cp(t,e){return!t||t.type!=="TSDeclareFunction"?!1:e==null||(0,T.default)(t,e)}function pp(t,e){return!t||t.type!=="TSDeclareMethod"?!1:e==null||(0,T.default)(t,e)}function fp(t,e){return!t||t.type!=="TSQualifiedName"?!1:e==null||(0,T.default)(t,e)}function dp(t,e){return!t||t.type!=="TSCallSignatureDeclaration"?!1:e==null||(0,T.default)(t,e)}function hp(t,e){return!t||t.type!=="TSConstructSignatureDeclaration"?!1:e==null||(0,T.default)(t,e)}function yp(t,e){return!t||t.type!=="TSPropertySignature"?!1:e==null||(0,T.default)(t,e)}function mp(t,e){return!t||t.type!=="TSMethodSignature"?!1:e==null||(0,T.default)(t,e)}function Tp(t,e){return!t||t.type!=="TSIndexSignature"?!1:e==null||(0,T.default)(t,e)}function Sp(t,e){return!t||t.type!=="TSAnyKeyword"?!1:e==null||(0,T.default)(t,e)}function xp(t,e){return!t||t.type!=="TSBooleanKeyword"?!1:e==null||(0,T.default)(t,e)}function bp(t,e){return!t||t.type!=="TSBigIntKeyword"?!1:e==null||(0,T.default)(t,e)}function Ep(t,e){return!t||t.type!=="TSIntrinsicKeyword"?!1:e==null||(0,T.default)(t,e)}function Pp(t,e){return!t||t.type!=="TSNeverKeyword"?!1:e==null||(0,T.default)(t,e)}function gp(t,e){return!t||t.type!=="TSNullKeyword"?!1:e==null||(0,T.default)(t,e)}function Ap(t,e){return!t||t.type!=="TSNumberKeyword"?!1:e==null||(0,T.default)(t,e)}function Ip(t,e){return!t||t.type!=="TSObjectKeyword"?!1:e==null||(0,T.default)(t,e)}function vp(t,e){return!t||t.type!=="TSStringKeyword"?!1:e==null||(0,T.default)(t,e)}function Np(t,e){return!t||t.type!=="TSSymbolKeyword"?!1:e==null||(0,T.default)(t,e)}function Cp(t,e){return!t||t.type!=="TSUndefinedKeyword"?!1:e==null||(0,T.default)(t,e)}function wp(t,e){return!t||t.type!=="TSUnknownKeyword"?!1:e==null||(0,T.default)(t,e)}function Op(t,e){return!t||t.type!=="TSVoidKeyword"?!1:e==null||(0,T.default)(t,e)}function Dp(t,e){return!t||t.type!=="TSThisType"?!1:e==null||(0,T.default)(t,e)}function Lp(t,e){return!t||t.type!=="TSFunctionType"?!1:e==null||(0,T.default)(t,e)}function kp(t,e){return!t||t.type!=="TSConstructorType"?!1:e==null||(0,T.default)(t,e)}function Mp(t,e){return!t||t.type!=="TSTypeReference"?!1:e==null||(0,T.default)(t,e)}function _p(t,e){return!t||t.type!=="TSTypePredicate"?!1:e==null||(0,T.default)(t,e)}function Bp(t,e){return!t||t.type!=="TSTypeQuery"?!1:e==null||(0,T.default)(t,e)}function Fp(t,e){return!t||t.type!=="TSTypeLiteral"?!1:e==null||(0,T.default)(t,e)}function Rp(t,e){return!t||t.type!=="TSArrayType"?!1:e==null||(0,T.default)(t,e)}function jp(t,e){return!t||t.type!=="TSTupleType"?!1:e==null||(0,T.default)(t,e)}function Kp(t,e){return!t||t.type!=="TSOptionalType"?!1:e==null||(0,T.default)(t,e)}function Up(t,e){return!t||t.type!=="TSRestType"?!1:e==null||(0,T.default)(t,e)}function Vp(t,e){return!t||t.type!=="TSNamedTupleMember"?!1:e==null||(0,T.default)(t,e)}function $p(t,e){return!t||t.type!=="TSUnionType"?!1:e==null||(0,T.default)(t,e)}function Yp(t,e){return!t||t.type!=="TSIntersectionType"?!1:e==null||(0,T.default)(t,e)}function Xp(t,e){return!t||t.type!=="TSConditionalType"?!1:e==null||(0,T.default)(t,e)}function Jp(t,e){return!t||t.type!=="TSInferType"?!1:e==null||(0,T.default)(t,e)}function qp(t,e){return!t||t.type!=="TSParenthesizedType"?!1:e==null||(0,T.default)(t,e)}function Wp(t,e){return!t||t.type!=="TSTypeOperator"?!1:e==null||(0,T.default)(t,e)}function Hp(t,e){return!t||t.type!=="TSIndexedAccessType"?!1:e==null||(0,T.default)(t,e)}function zp(t,e){return!t||t.type!=="TSMappedType"?!1:e==null||(0,T.default)(t,e)}function Gp(t,e){return!t||t.type!=="TSTemplateLiteralType"?!1:e==null||(0,T.default)(t,e)}function Qp(t,e){return!t||t.type!=="TSLiteralType"?!1:e==null||(0,T.default)(t,e)}function Zp(t,e){return!t||t.type!=="TSExpressionWithTypeArguments"?!1:e==null||(0,T.default)(t,e)}function ef(t,e){return!t||t.type!=="TSInterfaceDeclaration"?!1:e==null||(0,T.default)(t,e)}function tf(t,e){return!t||t.type!=="TSInterfaceBody"?!1:e==null||(0,T.default)(t,e)}function rf(t,e){return!t||t.type!=="TSTypeAliasDeclaration"?!1:e==null||(0,T.default)(t,e)}function sf(t,e){return!t||t.type!=="TSInstantiationExpression"?!1:e==null||(0,T.default)(t,e)}function af(t,e){return!t||t.type!=="TSAsExpression"?!1:e==null||(0,T.default)(t,e)}function nf(t,e){return!t||t.type!=="TSSatisfiesExpression"?!1:e==null||(0,T.default)(t,e)}function of(t,e){return!t||t.type!=="TSTypeAssertion"?!1:e==null||(0,T.default)(t,e)}function lf(t,e){return!t||t.type!=="TSEnumBody"?!1:e==null||(0,T.default)(t,e)}function uf(t,e){return!t||t.type!=="TSEnumDeclaration"?!1:e==null||(0,T.default)(t,e)}function cf(t,e){return!t||t.type!=="TSEnumMember"?!1:e==null||(0,T.default)(t,e)}function pf(t,e){return!t||t.type!=="TSModuleDeclaration"?!1:e==null||(0,T.default)(t,e)}function ff(t,e){return!t||t.type!=="TSModuleBlock"?!1:e==null||(0,T.default)(t,e)}function df(t,e){return!t||t.type!=="TSImportType"?!1:e==null||(0,T.default)(t,e)}function hf(t,e){return!t||t.type!=="TSImportEqualsDeclaration"?!1:e==null||(0,T.default)(t,e)}function yf(t,e){return!t||t.type!=="TSExternalModuleReference"?!1:e==null||(0,T.default)(t,e)}function mf(t,e){return!t||t.type!=="TSNonNullExpression"?!1:e==null||(0,T.default)(t,e)}function Tf(t,e){return!t||t.type!=="TSExportAssignment"?!1:e==null||(0,T.default)(t,e)}function Sf(t,e){return!t||t.type!=="TSNamespaceExportDeclaration"?!1:e==null||(0,T.default)(t,e)}function xf(t,e){return!t||t.type!=="TSTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function bf(t,e){return!t||t.type!=="TSTypeParameterInstantiation"?!1:e==null||(0,T.default)(t,e)}function Ef(t,e){return!t||t.type!=="TSTypeParameterDeclaration"?!1:e==null||(0,T.default)(t,e)}function Pf(t,e){return!t||t.type!=="TSTypeParameter"?!1:e==null||(0,T.default)(t,e)}function gf(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(t.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Af(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function If(t,e){if(!t)return!1;switch(t.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return e==null||(0,T.default)(t,e)}function vf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,T.default)(t,e)}function Nf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,T.default)(t,e)}function Cf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,T.default)(t,e)}function wf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(t.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Of(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return e==null||(0,T.default)(t,e)}function Df(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Lf(t,e){if(!t)return!1;switch(t.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function kf(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Mf(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function _f(t,e){if(!t)return!1;switch(t.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return e==null||(0,T.default)(t,e)}function Bf(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Ff(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Rf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||(0,T.default)(t,e)}function jf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return e==null||(0,T.default)(t,e)}function Kf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,T.default)(t,e)}function Uf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(t.expectedNode==="Declaration")break;default:return!1}return e==null||(0,T.default)(t,e)}function Vf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(t.expectedNode==="Identifier")break;default:return!1}return e==null||(0,T.default)(t,e)}function $f(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Yf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Xf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if(t.expectedNode==="Identifier")break;default:return!1}return e==null||(0,T.default)(t,e)}function Jf(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,T.default)(t,e)}function qf(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,T.default)(t,e)}function Wf(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function Hf(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||(0,T.default)(t,e)}function zf(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function Gf(t,e){if(!t)return!1;switch(t.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function Qf(t,e){if(!t)return!1;switch(t.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Zf(t,e){if(!t)return!1;switch(t.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(t.expectedNode==="Pattern")break;default:return!1}return e==null||(0,T.default)(t,e)}function ed(t,e){if(!t)return!1;switch(t.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return e==null||(0,T.default)(t,e)}function Ni(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return e==null||(0,T.default)(t,e)}function td(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return e==null||(0,T.default)(t,e)}function rd(t,e){if(!t)return!1;switch(t.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return e==null||(0,T.default)(t,e)}function sd(t,e){if(!t)return!1;switch(t.type){case"ClassAccessorProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function id(t,e){if(!t)return!1;switch(t.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return e==null||(0,T.default)(t,e)}function ad(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||(0,T.default)(t,e)}function nd(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||(0,T.default)(t,e)}function od(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return e==null||(0,T.default)(t,e)}function ld(t,e){if(!t)return!1;switch(t.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return e==null||(0,T.default)(t,e)}function ud(t,e){if(!t)return!1;switch(t.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return e==null||(0,T.default)(t,e)}function cd(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return e==null||(0,T.default)(t,e)}function pd(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return e==null||(0,T.default)(t,e)}function fd(t,e){if(!t)return!1;switch(t.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return e==null||(0,T.default)(t,e)}function dd(t,e){if(!t)return!1;switch(t.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return e==null||(0,T.default)(t,e)}function hd(t,e){if(!t)return!1;switch(t.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return e==null||(0,T.default)(t,e)}function yd(t,e){if(!t)return!1;switch(t.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return e==null||(0,T.default)(t,e)}function md(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return e==null||(0,T.default)(t,e)}function Td(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return e==null||(0,T.default)(t,e)}function Sd(t,e){return(0,at.default)("isNumberLiteral","isNumericLiteral"),!t||t.type!=="NumberLiteral"?!1:e==null||(0,T.default)(t,e)}function xd(t,e){return(0,at.default)("isRegexLiteral","isRegExpLiteral"),!t||t.type!=="RegexLiteral"?!1:e==null||(0,T.default)(t,e)}function bd(t,e){return(0,at.default)("isRestProperty","isRestElement"),!t||t.type!=="RestProperty"?!1:e==null||(0,T.default)(t,e)}function Ed(t,e){return(0,at.default)("isSpreadProperty","isSpreadElement"),!t||t.type!=="SpreadProperty"?!1:e==null||(0,T.default)(t,e)}function Pd(t,e){return(0,at.default)("isModuleDeclaration","isImportOrExportDeclaration"),Ni(t,e)}Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=gd;var Le=d;function Ci(t){return(0,Le.isMemberExpression)(t)||(0,Le.isMetaProperty)(t)}function gd(t,e,r){if(!Ci(t))return!1;const s=Array.isArray(e)?e:e.split("."),i=[];let a;for(a=t;Ci(a);a=(n=a.object)!=null?n:a.meta){var n;i.push(a.property)}if(i.push(a),i.length<s.length||!r&&i.length>s.length)return!1;for(let o=0,u=i.length-1;o<s.length;o++,u--){const p=i[u];let y;if((0,Le.isIdentifier)(p))y=p.name;else if((0,Le.isStringLiteral)(p))y=p.value;else if((0,Le.isThisExpression)(p))y="this";else if((0,Le.isSuper)(p))y="super";else if((0,Le.isPrivateName)(p))y="#"+p.id.name;else return!1;if(s[o]!==y)return!1}return!0}Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=Id;var Ad=Lt;function Id(t,e){const r=t.split(".");return s=>(0,Ad.default)(s,r,e)}Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=void 0;var vd=Dt;const Nd=(0,vd.default)("React.Component");Ot.default=Nd;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.default=Cd;function Cd(t){return!!t&&/^[a-z]/.test(t)}var kt={},Mt={},ae={},f={},ke={},jr={},te={},_t={},Bt={},wi;function Kr(){if(wi)return Bt;wi=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.default=e;var t=ce();function e(r,s){if(r===s)return!0;if(r==null||t.ALIAS_KEYS[s])return!1;const i=t.FLIPPED_ALIAS_KEYS[s];return!!(i!=null&&i.includes(r))}return Bt}var Ft={},Oi;function Di(){if(Oi)return Ft;Oi=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.default=e;var t=ce();function e(r,s){if(r===s)return!0;const i=t.PLACEHOLDERS_ALIAS[r];return!!(i!=null&&i.includes(s))}return Ft}var Li;function nt(){if(Li)return _t;Li=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.default=i;var t=it,e=Kr(),r=Di(),s=ce();function i(a,n,o){return n?(0,e.default)(n.type,a)?o===void 0?!0:(0,t.default)(n,o):!o&&n.type==="Placeholder"&&a in s.FLIPPED_ALIAS_KEYS?(0,r.default)(n.expectedNode,a):!1:!1}return _t}var Me={},Rt={},ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.isIdentifierChar=Bi,ot.isIdentifierName=Ld,ot.isIdentifierStart=_i;let Ur="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ki="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const wd=new RegExp("["+Ur+"]"),Od=new RegExp("["+Ur+ki+"]");Ur=ki=null;const Mi=[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,7,25,39,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,5,57,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,24,43,261,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,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,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,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Dd=[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,78,5,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,199,7,137,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,55,9,266,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,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function Vr(t,e){let r=65536;for(let s=0,i=e.length;s<i;s+=2){if(r+=e[s],r>t)return!1;if(r+=e[s+1],r>=t)return!0}return!1}function _i(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&wd.test(String.fromCharCode(t)):Vr(t,Mi)}function Bi(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Od.test(String.fromCharCode(t)):Vr(t,Mi)||Vr(t,Dd)}function Ld(t){let e=!0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);if((s&64512)===55296&&r+1<t.length){const i=t.charCodeAt(++r);(i&64512)===56320&&(s=65536+((s&1023)<<10)+(i&1023))}if(e){if(e=!1,!_i(s))return!1}else if(!Bi(s))return!1}return!e}var _e={};Object.defineProperty(_e,"__esModule",{value:!0}),_e.isKeyword=Fd,_e.isReservedWord=Fi,_e.isStrictBindOnlyReservedWord=ji,_e.isStrictBindReservedWord=Bd,_e.isStrictReservedWord=Ri;const $r={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"]},kd=new Set($r.keyword),Md=new Set($r.strict),_d=new Set($r.strictBind);function Fi(t,e){return e&&t==="await"||t==="enum"}function Ri(t,e){return Fi(t,e)||Md.has(t)}function ji(t){return _d.has(t)}function Bd(t,e){return Ri(t,e)||ji(t)}function Fd(t){return kd.has(t)}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return e.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return e.isIdentifierName}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return e.isIdentifierStart}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return r.isKeyword}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return r.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return r.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return r.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return r.isStrictReservedWord}});var e=ot,r=_e})(Rt),Object.defineProperty(Me,"__esModule",{value:!0}),Me.default=Rd;var Yr=Rt;function Rd(t,e=!0){return typeof t!="string"||e&&((0,Yr.isKeyword)(t)||(0,Yr.isStrictReservedWord)(t,!0))?!1:(0,Yr.isIdentifierName)(t)}var lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.readCodePoint=Vi,lt.readInt=Ui,lt.readStringContents=Kd;var jd=function(e){return e>=48&&e<=57};const Ki={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},jt={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function Kd(t,e,r,s,i,a){const n=r,o=s,u=i;let p="",y=null,E=r;const{length:P}=e;for(;;){if(r>=P){a.unterminated(n,o,u),p+=e.slice(E,r);break}const g=e.charCodeAt(r);if(Ud(t,g,e,r)){p+=e.slice(E,r);break}if(g===92){p+=e.slice(E,r);const C=Vd(e,r,s,i,t==="template",a);C.ch===null&&!y?y={pos:r,lineStart:s,curLine:i}:p+=C.ch,{pos:r,lineStart:s,curLine:i}=C,E=r}else g===8232||g===8233?(++r,++i,s=r):g===10||g===13?t==="template"?(p+=e.slice(E,r)+`
|
|
188
|
-
|
|
189
|
-
|
|
225
|
+
`;t.appendRight(y,g)}}},Fo=t=>{const e=[];let r=0,s="code",i=0;for(;r<t.length;){const a=t[r],n=t[r+1];switch(s){case"code":if(a==="/"&&n==="/"){s="lineComment",r+=2;continue}if(a==="/"&&n==="*"){s="blockComment",r+=2;continue}if(a==="'"){s="single",r++;continue}if(a==='"'){s="double",r++;continue}if(a==="`"){s="template",i=0,r++;continue}if(a==="i"&&jo(t,r)&&!Ko(t,r)){const o=Uo(t,r);e.push(t.slice(r,o)),r=o;continue}r++;break;case"single":if(a==="\\"){r+=2;continue}a==="'"&&(s="code"),r++;break;case"double":if(a==="\\"){r+=2;continue}a==='"'&&(s="code"),r++;break;case"template":if(a==="\\"){r+=2;continue}if(a==="`"){if(i===0){s="code",r++;continue}i--,r++;continue}if(a==="$"&&n==="{"){i++,r+=2;continue}a==="}"&&i>0&&i--,r++;break;case"lineComment":a===`
|
|
226
|
+
`&&(s="code"),r++;break;case"blockComment":if(a==="*"&&n==="/"){s="code",r+=2;continue}r++;break}}return e},vi=(t,e)=>{const r=new RegExp(`\\b${Ro(e)}\\b`);return t.some(s=>{const[i]=s.split(/from\s+/i);return r.test(i)})},Ro=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),jo=(t,e)=>{if(!t.startsWith("import",e))return!1;const r=t[e-1];if(r&&/\w/.test(r))return!1;const s=t[e+6];return!(s&&/\w/.test(s))},Ko=(t,e)=>{const r=t[e+6];return r==="("||r==="."},Uo=(t,e)=>{let r=e,s="code";for(;r<t.length;){const i=t[r],a=t[r+1];switch(s){case"code":if(i===";")return r+1;if(i==="/"&&a==="/"){s="lineComment",r+=2;continue}if(i==="/"&&a==="*"){s="blockComment",r+=2;continue}if(i==="'"){s="single",r++;continue}if(i==='"'){s="double",r++;continue}if(i==="`"){s="template",r++;continue}if(i===`
|
|
227
|
+
`&&t[r+1]===`
|
|
228
|
+
`)return r+1;r++;break;case"single":if(i==="\\"){r+=2;continue}i==="'"&&(s="code"),r++;break;case"double":if(i==="\\"){r+=2;continue}i==='"'&&(s="code"),r++;break;case"template":if(i==="\\"){r+=2;continue}i==="`"&&(s="code"),r++;break;case"lineComment":i===`
|
|
229
|
+
`&&(s="code"),r++;break;case"blockComment":if(i==="*"&&a==="/"){s="code",r+=2;continue}r++;break}}return t.length};var Fr={},Ot={},Dt={},Lt={},d={},it={};Object.defineProperty(it,"__esModule",{value:!0}),it.default=Vo;function Vo(t,e){const r=Object.keys(e);for(const s of r)if(t[s]!==e[s])return!1;return!0}var $e={};Object.defineProperty($e,"__esModule",{value:!0}),$e.default=$o;const Ci=new Set;function $o(t,e,r="",s=t){if(Ci.has(s))return;Ci.add(s);const{internal:i,trace:a}=Xo(1,2);i||console.warn(`${r}\`${t}\` has been deprecated, please migrate to \`${e}\`
|
|
230
|
+
${a}`)}function Xo(t,e){const{stackTraceLimit:r,prepareStackTrace:s}=Error;let i;if(Error.stackTraceLimit=1+t+e,Error.prepareStackTrace=function(n,o){i=o},new Error().stack,Error.stackTraceLimit=r,Error.prepareStackTrace=s,!i)return{internal:!1,trace:""};const a=i.slice(1+t,1+t+e);return{internal:/[\\/]@babel[\\/]/.test(a[1].getFileName()),trace:a.map(n=>` at ${n}`).join(`
|
|
231
|
+
`)}}Object.defineProperty(d,"__esModule",{value:!0}),d.isAccessor=ud,d.isAnyTypeAnnotation=vu,d.isArgumentPlaceholder=tp,d.isArrayExpression=Yo,d.isArrayPattern=$l,d.isArrayTypeAnnotation=Cu,d.isArrowFunctionExpression=Xl,d.isAssignmentExpression=Jo,d.isAssignmentPattern=Vl,d.isAwaitExpression=du,d.isBigIntLiteral=yu,d.isBinary=Df,d.isBinaryExpression=qo,d.isBindExpression=rp,d.isBlock=_f,d.isBlockParent=kf,d.isBlockStatement=Go,d.isBooleanLiteral=Sl,d.isBooleanLiteralTypeAnnotation=wu,d.isBooleanTypeAnnotation=Nu,d.isBreakStatement=Qo,d.isCallExpression=Zo,d.isCatchClause=el,d.isClass=nd,d.isClassAccessorProperty=bu,d.isClassBody=Yl,d.isClassDeclaration=ql,d.isClassExpression=Jl,d.isClassImplements=Du,d.isClassMethod=au,d.isClassPrivateMethod=Pu,d.isClassPrivateProperty=Eu,d.isClassProperty=xu,d.isCompletionStatement=Ff,d.isConditional=Rf,d.isConditionalExpression=tl,d.isContinueStatement=rl,d.isDebuggerStatement=sl,d.isDecimalLiteral=lp,d.isDeclaration=qf,d.isDeclareClass=Lu,d.isDeclareExportAllDeclaration=Uu,d.isDeclareExportDeclaration=Ku,d.isDeclareFunction=ku,d.isDeclareInterface=_u,d.isDeclareModule=Mu,d.isDeclareModuleExports=Bu,d.isDeclareOpaqueType=Ru,d.isDeclareTypeAlias=Fu,d.isDeclareVariable=ju,d.isDeclaredPredicate=Vu,d.isDecorator=sp,d.isDirective=Ho,d.isDirectiveLiteral=zo,d.isDoExpression=ip,d.isDoWhileStatement=il,d.isEmptyStatement=al,d.isEmptyTypeAnnotation=Zu,d.isEnumBody=md,d.isEnumBooleanBody=Cc,d.isEnumBooleanMember=Dc,d.isEnumDeclaration=vc,d.isEnumDefaultedMember=_c,d.isEnumMember=Td,d.isEnumNumberBody=Nc,d.isEnumNumberMember=Lc,d.isEnumStringBody=wc,d.isEnumStringMember=kc,d.isEnumSymbolBody=Oc,d.isExistsTypeAnnotation=$u,d.isExportAllDeclaration=Wl,d.isExportDeclaration=od,d.isExportDefaultDeclaration=Hl,d.isExportDefaultSpecifier=ap,d.isExportNamedDeclaration=zl,d.isExportNamespaceSpecifier=mu,d.isExportSpecifier=Gl,d.isExpression=Of,d.isExpressionStatement=nl,d.isExpressionWrapper=Uf,d.isFile=ol,d.isFlow=pd,d.isFlowBaseAnnotation=dd,d.isFlowDeclaration=hd,d.isFlowPredicate=yd,d.isFlowType=fd,d.isFor=Vf,d.isForInStatement=ll,d.isForOfStatement=Ql,d.isForStatement=ul,d.isForXStatement=$f,d.isFunction=Xf,d.isFunctionDeclaration=cl,d.isFunctionExpression=pl,d.isFunctionParameter=Wf,d.isFunctionParent=Yf,d.isFunctionTypeAnnotation=Xu,d.isFunctionTypeParam=Yu,d.isGenericTypeAnnotation=Ju,d.isIdentifier=fl,d.isIfStatement=dl,d.isImmutable=Zf,d.isImport=hu,d.isImportAttribute=Iu,d.isImportDeclaration=Zl,d.isImportDefaultSpecifier=eu,d.isImportExpression=su,d.isImportNamespaceSpecifier=tu,d.isImportOrExportDeclaration=Ni,d.isImportSpecifier=ru,d.isIndexedAccessType=Mc,d.isInferredPredicate=qu,d.isInterfaceDeclaration=Hu,d.isInterfaceExtends=Wu,d.isInterfaceTypeAnnotation=zu,d.isInterpreterDirective=Wo,d.isIntersectionTypeAnnotation=Gu,d.isJSX=Sd,d.isJSXAttribute=Fc,d.isJSXClosingElement=Rc,d.isJSXClosingFragment=Gc,d.isJSXElement=jc,d.isJSXEmptyExpression=Kc,d.isJSXExpressionContainer=Uc,d.isJSXFragment=Hc,d.isJSXIdentifier=$c,d.isJSXMemberExpression=Xc,d.isJSXNamespacedName=Yc,d.isJSXOpeningElement=Jc,d.isJSXOpeningFragment=zc,d.isJSXSpreadAttribute=qc,d.isJSXSpreadChild=Vc,d.isJSXText=Wc,d.isLVal=zf,d.isLabeledStatement=hl,d.isLiteral=Qf,d.isLogicalExpression=bl,d.isLoop=jf,d.isMemberExpression=El,d.isMetaProperty=iu,d.isMethod=td,d.isMiscellaneous=xd,d.isMixedTypeAnnotation=Qu,d.isModuleDeclaration=Nd,d.isModuleExpression=up,d.isModuleSpecifier=ld,d.isNewExpression=Pl,d.isNoop=Qc,d.isNullLiteral=Tl,d.isNullLiteralTypeAnnotation=Ou,d.isNullableTypeAnnotation=ec,d.isNumberLiteral=Ad,d.isNumberLiteralTypeAnnotation=tc,d.isNumberTypeAnnotation=rc,d.isNumericLiteral=ml,d.isObjectExpression=Al,d.isObjectMember=rd,d.isObjectMethod=Il,d.isObjectPattern=nu,d.isObjectProperty=vl,d.isObjectTypeAnnotation=sc,d.isObjectTypeCallProperty=ac,d.isObjectTypeIndexer=nc,d.isObjectTypeInternalSlot=ic,d.isObjectTypeProperty=oc,d.isObjectTypeSpreadProperty=lc,d.isOpaqueType=uc,d.isOptionalCallExpression=Su,d.isOptionalIndexedAccessType=Bc,d.isOptionalMemberExpression=Tu,d.isParenthesizedExpression=Ol,d.isPattern=ad,d.isPatternLike=Hf,d.isPipelineBareFunction=fp,d.isPipelinePrimaryTopicReference=dp,d.isPipelineTopicExpression=pp,d.isPlaceholder=Zc,d.isPrivate=cd,d.isPrivateName=gu,d.isProgram=gl,d.isProperty=sd,d.isPureish=Jf,d.isQualifiedTypeIdentifier=cc,d.isRecordExpression=np,d.isRegExpLiteral=xl,d.isRegexLiteral=Id,d.isRestElement=Cl,d.isRestProperty=vd,d.isReturnStatement=Nl,d.isScopable=Lf,d.isSequenceExpression=wl,d.isSpreadElement=ou,d.isSpreadProperty=Cd,d.isStandardized=wf,d.isStatement=Mf,d.isStaticBlock=Au,d.isStringLiteral=yl,d.isStringLiteralTypeAnnotation=pc,d.isStringTypeAnnotation=fc,d.isSuper=lu,d.isSwitchCase=Dl,d.isSwitchStatement=Ll,d.isSymbolTypeAnnotation=dc,d.isTSAnyKeyword=Ap,d.isTSArrayType=Xp,d.isTSAsExpression=pf,d.isTSBaseType=gd,d.isTSBigIntKeyword=vp,d.isTSBooleanKeyword=Ip,d.isTSCallSignatureDeclaration=xp,d.isTSConditionalType=Gp,d.isTSConstructSignatureDeclaration=bp,d.isTSConstructorType=jp,d.isTSDeclareFunction=mp,d.isTSDeclareMethod=Tp,d.isTSEntityName=Gf,d.isTSEnumBody=hf,d.isTSEnumDeclaration=yf,d.isTSEnumMember=mf,d.isTSExportAssignment=gf,d.isTSExpressionWithTypeArguments=nf,d.isTSExternalModuleReference=Ef,d.isTSFunctionType=Rp,d.isTSImportEqualsDeclaration=bf,d.isTSImportType=xf,d.isTSIndexSignature=gp,d.isTSIndexedAccessType=tf,d.isTSInferType=Qp,d.isTSInstantiationExpression=cf,d.isTSInterfaceBody=lf,d.isTSInterfaceDeclaration=of,d.isTSIntersectionType=zp,d.isTSIntrinsicKeyword=Cp,d.isTSLiteralType=af,d.isTSMappedType=rf,d.isTSMethodSignature=Pp,d.isTSModuleBlock=Sf,d.isTSModuleDeclaration=Tf,d.isTSNamedTupleMember=Wp,d.isTSNamespaceExportDeclaration=Af,d.isTSNeverKeyword=Np,d.isTSNonNullExpression=Pf,d.isTSNullKeyword=wp,d.isTSNumberKeyword=Op,d.isTSObjectKeyword=Dp,d.isTSOptionalType=Jp,d.isTSParameterProperty=yp,d.isTSParenthesizedType=Zp,d.isTSPropertySignature=Ep,d.isTSQualifiedName=Sp,d.isTSRestType=qp,d.isTSSatisfiesExpression=ff,d.isTSStringKeyword=Lp,d.isTSSymbolKeyword=kp,d.isTSTemplateLiteralType=sf,d.isTSThisType=Fp,d.isTSTupleType=Yp,d.isTSType=Pd,d.isTSTypeAliasDeclaration=uf,d.isTSTypeAnnotation=If,d.isTSTypeAssertion=df,d.isTSTypeElement=Ed,d.isTSTypeLiteral=$p,d.isTSTypeOperator=ef,d.isTSTypeParameter=Nf,d.isTSTypeParameterDeclaration=Cf,d.isTSTypeParameterInstantiation=vf,d.isTSTypePredicate=Up,d.isTSTypeQuery=Vp,d.isTSTypeReference=Kp,d.isTSUndefinedKeyword=_p,d.isTSUnionType=Hp,d.isTSUnknownKeyword=Mp,d.isTSVoidKeyword=Bp,d.isTaggedTemplateExpression=uu,d.isTemplateElement=cu,d.isTemplateLiteral=pu,d.isTerminatorless=Bf,d.isThisExpression=kl,d.isThisTypeAnnotation=hc,d.isThrowStatement=_l,d.isTopicReference=cp,d.isTryStatement=Ml,d.isTupleExpression=op,d.isTupleTypeAnnotation=yc,d.isTypeAlias=Tc,d.isTypeAnnotation=Sc,d.isTypeCastExpression=xc,d.isTypeParameter=bc,d.isTypeParameterDeclaration=Ec,d.isTypeParameterInstantiation=Pc,d.isTypeScript=bd,d.isTypeofTypeAnnotation=mc,d.isUnaryExpression=Bl,d.isUnaryLike=id,d.isUnionTypeAnnotation=gc,d.isUpdateExpression=Fl,d.isUserWhitespacable=ed,d.isV8IntrinsicIdentifier=ep,d.isVariableDeclaration=Rl,d.isVariableDeclarator=jl,d.isVariance=Ac,d.isVoidPattern=hp,d.isVoidTypeAnnotation=Ic,d.isWhile=Kf,d.isWhileStatement=Kl,d.isWithStatement=Ul,d.isYieldExpression=fu;var T=it,at=$e;function Yo(t,e){return!t||t.type!=="ArrayExpression"?!1:e==null||(0,T.default)(t,e)}function Jo(t,e){return!t||t.type!=="AssignmentExpression"?!1:e==null||(0,T.default)(t,e)}function qo(t,e){return!t||t.type!=="BinaryExpression"?!1:e==null||(0,T.default)(t,e)}function Wo(t,e){return!t||t.type!=="InterpreterDirective"?!1:e==null||(0,T.default)(t,e)}function Ho(t,e){return!t||t.type!=="Directive"?!1:e==null||(0,T.default)(t,e)}function zo(t,e){return!t||t.type!=="DirectiveLiteral"?!1:e==null||(0,T.default)(t,e)}function Go(t,e){return!t||t.type!=="BlockStatement"?!1:e==null||(0,T.default)(t,e)}function Qo(t,e){return!t||t.type!=="BreakStatement"?!1:e==null||(0,T.default)(t,e)}function Zo(t,e){return!t||t.type!=="CallExpression"?!1:e==null||(0,T.default)(t,e)}function el(t,e){return!t||t.type!=="CatchClause"?!1:e==null||(0,T.default)(t,e)}function tl(t,e){return!t||t.type!=="ConditionalExpression"?!1:e==null||(0,T.default)(t,e)}function rl(t,e){return!t||t.type!=="ContinueStatement"?!1:e==null||(0,T.default)(t,e)}function sl(t,e){return!t||t.type!=="DebuggerStatement"?!1:e==null||(0,T.default)(t,e)}function il(t,e){return!t||t.type!=="DoWhileStatement"?!1:e==null||(0,T.default)(t,e)}function al(t,e){return!t||t.type!=="EmptyStatement"?!1:e==null||(0,T.default)(t,e)}function nl(t,e){return!t||t.type!=="ExpressionStatement"?!1:e==null||(0,T.default)(t,e)}function ol(t,e){return!t||t.type!=="File"?!1:e==null||(0,T.default)(t,e)}function ll(t,e){return!t||t.type!=="ForInStatement"?!1:e==null||(0,T.default)(t,e)}function ul(t,e){return!t||t.type!=="ForStatement"?!1:e==null||(0,T.default)(t,e)}function cl(t,e){return!t||t.type!=="FunctionDeclaration"?!1:e==null||(0,T.default)(t,e)}function pl(t,e){return!t||t.type!=="FunctionExpression"?!1:e==null||(0,T.default)(t,e)}function fl(t,e){return!t||t.type!=="Identifier"?!1:e==null||(0,T.default)(t,e)}function dl(t,e){return!t||t.type!=="IfStatement"?!1:e==null||(0,T.default)(t,e)}function hl(t,e){return!t||t.type!=="LabeledStatement"?!1:e==null||(0,T.default)(t,e)}function yl(t,e){return!t||t.type!=="StringLiteral"?!1:e==null||(0,T.default)(t,e)}function ml(t,e){return!t||t.type!=="NumericLiteral"?!1:e==null||(0,T.default)(t,e)}function Tl(t,e){return!t||t.type!=="NullLiteral"?!1:e==null||(0,T.default)(t,e)}function Sl(t,e){return!t||t.type!=="BooleanLiteral"?!1:e==null||(0,T.default)(t,e)}function xl(t,e){return!t||t.type!=="RegExpLiteral"?!1:e==null||(0,T.default)(t,e)}function bl(t,e){return!t||t.type!=="LogicalExpression"?!1:e==null||(0,T.default)(t,e)}function El(t,e){return!t||t.type!=="MemberExpression"?!1:e==null||(0,T.default)(t,e)}function Pl(t,e){return!t||t.type!=="NewExpression"?!1:e==null||(0,T.default)(t,e)}function gl(t,e){return!t||t.type!=="Program"?!1:e==null||(0,T.default)(t,e)}function Al(t,e){return!t||t.type!=="ObjectExpression"?!1:e==null||(0,T.default)(t,e)}function Il(t,e){return!t||t.type!=="ObjectMethod"?!1:e==null||(0,T.default)(t,e)}function vl(t,e){return!t||t.type!=="ObjectProperty"?!1:e==null||(0,T.default)(t,e)}function Cl(t,e){return!t||t.type!=="RestElement"?!1:e==null||(0,T.default)(t,e)}function Nl(t,e){return!t||t.type!=="ReturnStatement"?!1:e==null||(0,T.default)(t,e)}function wl(t,e){return!t||t.type!=="SequenceExpression"?!1:e==null||(0,T.default)(t,e)}function Ol(t,e){return!t||t.type!=="ParenthesizedExpression"?!1:e==null||(0,T.default)(t,e)}function Dl(t,e){return!t||t.type!=="SwitchCase"?!1:e==null||(0,T.default)(t,e)}function Ll(t,e){return!t||t.type!=="SwitchStatement"?!1:e==null||(0,T.default)(t,e)}function kl(t,e){return!t||t.type!=="ThisExpression"?!1:e==null||(0,T.default)(t,e)}function _l(t,e){return!t||t.type!=="ThrowStatement"?!1:e==null||(0,T.default)(t,e)}function Ml(t,e){return!t||t.type!=="TryStatement"?!1:e==null||(0,T.default)(t,e)}function Bl(t,e){return!t||t.type!=="UnaryExpression"?!1:e==null||(0,T.default)(t,e)}function Fl(t,e){return!t||t.type!=="UpdateExpression"?!1:e==null||(0,T.default)(t,e)}function Rl(t,e){return!t||t.type!=="VariableDeclaration"?!1:e==null||(0,T.default)(t,e)}function jl(t,e){return!t||t.type!=="VariableDeclarator"?!1:e==null||(0,T.default)(t,e)}function Kl(t,e){return!t||t.type!=="WhileStatement"?!1:e==null||(0,T.default)(t,e)}function Ul(t,e){return!t||t.type!=="WithStatement"?!1:e==null||(0,T.default)(t,e)}function Vl(t,e){return!t||t.type!=="AssignmentPattern"?!1:e==null||(0,T.default)(t,e)}function $l(t,e){return!t||t.type!=="ArrayPattern"?!1:e==null||(0,T.default)(t,e)}function Xl(t,e){return!t||t.type!=="ArrowFunctionExpression"?!1:e==null||(0,T.default)(t,e)}function Yl(t,e){return!t||t.type!=="ClassBody"?!1:e==null||(0,T.default)(t,e)}function Jl(t,e){return!t||t.type!=="ClassExpression"?!1:e==null||(0,T.default)(t,e)}function ql(t,e){return!t||t.type!=="ClassDeclaration"?!1:e==null||(0,T.default)(t,e)}function Wl(t,e){return!t||t.type!=="ExportAllDeclaration"?!1:e==null||(0,T.default)(t,e)}function Hl(t,e){return!t||t.type!=="ExportDefaultDeclaration"?!1:e==null||(0,T.default)(t,e)}function zl(t,e){return!t||t.type!=="ExportNamedDeclaration"?!1:e==null||(0,T.default)(t,e)}function Gl(t,e){return!t||t.type!=="ExportSpecifier"?!1:e==null||(0,T.default)(t,e)}function Ql(t,e){return!t||t.type!=="ForOfStatement"?!1:e==null||(0,T.default)(t,e)}function Zl(t,e){return!t||t.type!=="ImportDeclaration"?!1:e==null||(0,T.default)(t,e)}function eu(t,e){return!t||t.type!=="ImportDefaultSpecifier"?!1:e==null||(0,T.default)(t,e)}function tu(t,e){return!t||t.type!=="ImportNamespaceSpecifier"?!1:e==null||(0,T.default)(t,e)}function ru(t,e){return!t||t.type!=="ImportSpecifier"?!1:e==null||(0,T.default)(t,e)}function su(t,e){return!t||t.type!=="ImportExpression"?!1:e==null||(0,T.default)(t,e)}function iu(t,e){return!t||t.type!=="MetaProperty"?!1:e==null||(0,T.default)(t,e)}function au(t,e){return!t||t.type!=="ClassMethod"?!1:e==null||(0,T.default)(t,e)}function nu(t,e){return!t||t.type!=="ObjectPattern"?!1:e==null||(0,T.default)(t,e)}function ou(t,e){return!t||t.type!=="SpreadElement"?!1:e==null||(0,T.default)(t,e)}function lu(t,e){return!t||t.type!=="Super"?!1:e==null||(0,T.default)(t,e)}function uu(t,e){return!t||t.type!=="TaggedTemplateExpression"?!1:e==null||(0,T.default)(t,e)}function cu(t,e){return!t||t.type!=="TemplateElement"?!1:e==null||(0,T.default)(t,e)}function pu(t,e){return!t||t.type!=="TemplateLiteral"?!1:e==null||(0,T.default)(t,e)}function fu(t,e){return!t||t.type!=="YieldExpression"?!1:e==null||(0,T.default)(t,e)}function du(t,e){return!t||t.type!=="AwaitExpression"?!1:e==null||(0,T.default)(t,e)}function hu(t,e){return!t||t.type!=="Import"?!1:e==null||(0,T.default)(t,e)}function yu(t,e){return!t||t.type!=="BigIntLiteral"?!1:e==null||(0,T.default)(t,e)}function mu(t,e){return!t||t.type!=="ExportNamespaceSpecifier"?!1:e==null||(0,T.default)(t,e)}function Tu(t,e){return!t||t.type!=="OptionalMemberExpression"?!1:e==null||(0,T.default)(t,e)}function Su(t,e){return!t||t.type!=="OptionalCallExpression"?!1:e==null||(0,T.default)(t,e)}function xu(t,e){return!t||t.type!=="ClassProperty"?!1:e==null||(0,T.default)(t,e)}function bu(t,e){return!t||t.type!=="ClassAccessorProperty"?!1:e==null||(0,T.default)(t,e)}function Eu(t,e){return!t||t.type!=="ClassPrivateProperty"?!1:e==null||(0,T.default)(t,e)}function Pu(t,e){return!t||t.type!=="ClassPrivateMethod"?!1:e==null||(0,T.default)(t,e)}function gu(t,e){return!t||t.type!=="PrivateName"?!1:e==null||(0,T.default)(t,e)}function Au(t,e){return!t||t.type!=="StaticBlock"?!1:e==null||(0,T.default)(t,e)}function Iu(t,e){return!t||t.type!=="ImportAttribute"?!1:e==null||(0,T.default)(t,e)}function vu(t,e){return!t||t.type!=="AnyTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Cu(t,e){return!t||t.type!=="ArrayTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Nu(t,e){return!t||t.type!=="BooleanTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function wu(t,e){return!t||t.type!=="BooleanLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Ou(t,e){return!t||t.type!=="NullLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Du(t,e){return!t||t.type!=="ClassImplements"?!1:e==null||(0,T.default)(t,e)}function Lu(t,e){return!t||t.type!=="DeclareClass"?!1:e==null||(0,T.default)(t,e)}function ku(t,e){return!t||t.type!=="DeclareFunction"?!1:e==null||(0,T.default)(t,e)}function _u(t,e){return!t||t.type!=="DeclareInterface"?!1:e==null||(0,T.default)(t,e)}function Mu(t,e){return!t||t.type!=="DeclareModule"?!1:e==null||(0,T.default)(t,e)}function Bu(t,e){return!t||t.type!=="DeclareModuleExports"?!1:e==null||(0,T.default)(t,e)}function Fu(t,e){return!t||t.type!=="DeclareTypeAlias"?!1:e==null||(0,T.default)(t,e)}function Ru(t,e){return!t||t.type!=="DeclareOpaqueType"?!1:e==null||(0,T.default)(t,e)}function ju(t,e){return!t||t.type!=="DeclareVariable"?!1:e==null||(0,T.default)(t,e)}function Ku(t,e){return!t||t.type!=="DeclareExportDeclaration"?!1:e==null||(0,T.default)(t,e)}function Uu(t,e){return!t||t.type!=="DeclareExportAllDeclaration"?!1:e==null||(0,T.default)(t,e)}function Vu(t,e){return!t||t.type!=="DeclaredPredicate"?!1:e==null||(0,T.default)(t,e)}function $u(t,e){return!t||t.type!=="ExistsTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Xu(t,e){return!t||t.type!=="FunctionTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Yu(t,e){return!t||t.type!=="FunctionTypeParam"?!1:e==null||(0,T.default)(t,e)}function Ju(t,e){return!t||t.type!=="GenericTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function qu(t,e){return!t||t.type!=="InferredPredicate"?!1:e==null||(0,T.default)(t,e)}function Wu(t,e){return!t||t.type!=="InterfaceExtends"?!1:e==null||(0,T.default)(t,e)}function Hu(t,e){return!t||t.type!=="InterfaceDeclaration"?!1:e==null||(0,T.default)(t,e)}function zu(t,e){return!t||t.type!=="InterfaceTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Gu(t,e){return!t||t.type!=="IntersectionTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Qu(t,e){return!t||t.type!=="MixedTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Zu(t,e){return!t||t.type!=="EmptyTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function ec(t,e){return!t||t.type!=="NullableTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function tc(t,e){return!t||t.type!=="NumberLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function rc(t,e){return!t||t.type!=="NumberTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function sc(t,e){return!t||t.type!=="ObjectTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function ic(t,e){return!t||t.type!=="ObjectTypeInternalSlot"?!1:e==null||(0,T.default)(t,e)}function ac(t,e){return!t||t.type!=="ObjectTypeCallProperty"?!1:e==null||(0,T.default)(t,e)}function nc(t,e){return!t||t.type!=="ObjectTypeIndexer"?!1:e==null||(0,T.default)(t,e)}function oc(t,e){return!t||t.type!=="ObjectTypeProperty"?!1:e==null||(0,T.default)(t,e)}function lc(t,e){return!t||t.type!=="ObjectTypeSpreadProperty"?!1:e==null||(0,T.default)(t,e)}function uc(t,e){return!t||t.type!=="OpaqueType"?!1:e==null||(0,T.default)(t,e)}function cc(t,e){return!t||t.type!=="QualifiedTypeIdentifier"?!1:e==null||(0,T.default)(t,e)}function pc(t,e){return!t||t.type!=="StringLiteralTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function fc(t,e){return!t||t.type!=="StringTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function dc(t,e){return!t||t.type!=="SymbolTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function hc(t,e){return!t||t.type!=="ThisTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function yc(t,e){return!t||t.type!=="TupleTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function mc(t,e){return!t||t.type!=="TypeofTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Tc(t,e){return!t||t.type!=="TypeAlias"?!1:e==null||(0,T.default)(t,e)}function Sc(t,e){return!t||t.type!=="TypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function xc(t,e){return!t||t.type!=="TypeCastExpression"?!1:e==null||(0,T.default)(t,e)}function bc(t,e){return!t||t.type!=="TypeParameter"?!1:e==null||(0,T.default)(t,e)}function Ec(t,e){return!t||t.type!=="TypeParameterDeclaration"?!1:e==null||(0,T.default)(t,e)}function Pc(t,e){return!t||t.type!=="TypeParameterInstantiation"?!1:e==null||(0,T.default)(t,e)}function gc(t,e){return!t||t.type!=="UnionTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function Ac(t,e){return!t||t.type!=="Variance"?!1:e==null||(0,T.default)(t,e)}function Ic(t,e){return!t||t.type!=="VoidTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function vc(t,e){return!t||t.type!=="EnumDeclaration"?!1:e==null||(0,T.default)(t,e)}function Cc(t,e){return!t||t.type!=="EnumBooleanBody"?!1:e==null||(0,T.default)(t,e)}function Nc(t,e){return!t||t.type!=="EnumNumberBody"?!1:e==null||(0,T.default)(t,e)}function wc(t,e){return!t||t.type!=="EnumStringBody"?!1:e==null||(0,T.default)(t,e)}function Oc(t,e){return!t||t.type!=="EnumSymbolBody"?!1:e==null||(0,T.default)(t,e)}function Dc(t,e){return!t||t.type!=="EnumBooleanMember"?!1:e==null||(0,T.default)(t,e)}function Lc(t,e){return!t||t.type!=="EnumNumberMember"?!1:e==null||(0,T.default)(t,e)}function kc(t,e){return!t||t.type!=="EnumStringMember"?!1:e==null||(0,T.default)(t,e)}function _c(t,e){return!t||t.type!=="EnumDefaultedMember"?!1:e==null||(0,T.default)(t,e)}function Mc(t,e){return!t||t.type!=="IndexedAccessType"?!1:e==null||(0,T.default)(t,e)}function Bc(t,e){return!t||t.type!=="OptionalIndexedAccessType"?!1:e==null||(0,T.default)(t,e)}function Fc(t,e){return!t||t.type!=="JSXAttribute"?!1:e==null||(0,T.default)(t,e)}function Rc(t,e){return!t||t.type!=="JSXClosingElement"?!1:e==null||(0,T.default)(t,e)}function jc(t,e){return!t||t.type!=="JSXElement"?!1:e==null||(0,T.default)(t,e)}function Kc(t,e){return!t||t.type!=="JSXEmptyExpression"?!1:e==null||(0,T.default)(t,e)}function Uc(t,e){return!t||t.type!=="JSXExpressionContainer"?!1:e==null||(0,T.default)(t,e)}function Vc(t,e){return!t||t.type!=="JSXSpreadChild"?!1:e==null||(0,T.default)(t,e)}function $c(t,e){return!t||t.type!=="JSXIdentifier"?!1:e==null||(0,T.default)(t,e)}function Xc(t,e){return!t||t.type!=="JSXMemberExpression"?!1:e==null||(0,T.default)(t,e)}function Yc(t,e){return!t||t.type!=="JSXNamespacedName"?!1:e==null||(0,T.default)(t,e)}function Jc(t,e){return!t||t.type!=="JSXOpeningElement"?!1:e==null||(0,T.default)(t,e)}function qc(t,e){return!t||t.type!=="JSXSpreadAttribute"?!1:e==null||(0,T.default)(t,e)}function Wc(t,e){return!t||t.type!=="JSXText"?!1:e==null||(0,T.default)(t,e)}function Hc(t,e){return!t||t.type!=="JSXFragment"?!1:e==null||(0,T.default)(t,e)}function zc(t,e){return!t||t.type!=="JSXOpeningFragment"?!1:e==null||(0,T.default)(t,e)}function Gc(t,e){return!t||t.type!=="JSXClosingFragment"?!1:e==null||(0,T.default)(t,e)}function Qc(t,e){return!t||t.type!=="Noop"?!1:e==null||(0,T.default)(t,e)}function Zc(t,e){return!t||t.type!=="Placeholder"?!1:e==null||(0,T.default)(t,e)}function ep(t,e){return!t||t.type!=="V8IntrinsicIdentifier"?!1:e==null||(0,T.default)(t,e)}function tp(t,e){return!t||t.type!=="ArgumentPlaceholder"?!1:e==null||(0,T.default)(t,e)}function rp(t,e){return!t||t.type!=="BindExpression"?!1:e==null||(0,T.default)(t,e)}function sp(t,e){return!t||t.type!=="Decorator"?!1:e==null||(0,T.default)(t,e)}function ip(t,e){return!t||t.type!=="DoExpression"?!1:e==null||(0,T.default)(t,e)}function ap(t,e){return!t||t.type!=="ExportDefaultSpecifier"?!1:e==null||(0,T.default)(t,e)}function np(t,e){return!t||t.type!=="RecordExpression"?!1:e==null||(0,T.default)(t,e)}function op(t,e){return!t||t.type!=="TupleExpression"?!1:e==null||(0,T.default)(t,e)}function lp(t,e){return!t||t.type!=="DecimalLiteral"?!1:e==null||(0,T.default)(t,e)}function up(t,e){return!t||t.type!=="ModuleExpression"?!1:e==null||(0,T.default)(t,e)}function cp(t,e){return!t||t.type!=="TopicReference"?!1:e==null||(0,T.default)(t,e)}function pp(t,e){return!t||t.type!=="PipelineTopicExpression"?!1:e==null||(0,T.default)(t,e)}function fp(t,e){return!t||t.type!=="PipelineBareFunction"?!1:e==null||(0,T.default)(t,e)}function dp(t,e){return!t||t.type!=="PipelinePrimaryTopicReference"?!1:e==null||(0,T.default)(t,e)}function hp(t,e){return!t||t.type!=="VoidPattern"?!1:e==null||(0,T.default)(t,e)}function yp(t,e){return!t||t.type!=="TSParameterProperty"?!1:e==null||(0,T.default)(t,e)}function mp(t,e){return!t||t.type!=="TSDeclareFunction"?!1:e==null||(0,T.default)(t,e)}function Tp(t,e){return!t||t.type!=="TSDeclareMethod"?!1:e==null||(0,T.default)(t,e)}function Sp(t,e){return!t||t.type!=="TSQualifiedName"?!1:e==null||(0,T.default)(t,e)}function xp(t,e){return!t||t.type!=="TSCallSignatureDeclaration"?!1:e==null||(0,T.default)(t,e)}function bp(t,e){return!t||t.type!=="TSConstructSignatureDeclaration"?!1:e==null||(0,T.default)(t,e)}function Ep(t,e){return!t||t.type!=="TSPropertySignature"?!1:e==null||(0,T.default)(t,e)}function Pp(t,e){return!t||t.type!=="TSMethodSignature"?!1:e==null||(0,T.default)(t,e)}function gp(t,e){return!t||t.type!=="TSIndexSignature"?!1:e==null||(0,T.default)(t,e)}function Ap(t,e){return!t||t.type!=="TSAnyKeyword"?!1:e==null||(0,T.default)(t,e)}function Ip(t,e){return!t||t.type!=="TSBooleanKeyword"?!1:e==null||(0,T.default)(t,e)}function vp(t,e){return!t||t.type!=="TSBigIntKeyword"?!1:e==null||(0,T.default)(t,e)}function Cp(t,e){return!t||t.type!=="TSIntrinsicKeyword"?!1:e==null||(0,T.default)(t,e)}function Np(t,e){return!t||t.type!=="TSNeverKeyword"?!1:e==null||(0,T.default)(t,e)}function wp(t,e){return!t||t.type!=="TSNullKeyword"?!1:e==null||(0,T.default)(t,e)}function Op(t,e){return!t||t.type!=="TSNumberKeyword"?!1:e==null||(0,T.default)(t,e)}function Dp(t,e){return!t||t.type!=="TSObjectKeyword"?!1:e==null||(0,T.default)(t,e)}function Lp(t,e){return!t||t.type!=="TSStringKeyword"?!1:e==null||(0,T.default)(t,e)}function kp(t,e){return!t||t.type!=="TSSymbolKeyword"?!1:e==null||(0,T.default)(t,e)}function _p(t,e){return!t||t.type!=="TSUndefinedKeyword"?!1:e==null||(0,T.default)(t,e)}function Mp(t,e){return!t||t.type!=="TSUnknownKeyword"?!1:e==null||(0,T.default)(t,e)}function Bp(t,e){return!t||t.type!=="TSVoidKeyword"?!1:e==null||(0,T.default)(t,e)}function Fp(t,e){return!t||t.type!=="TSThisType"?!1:e==null||(0,T.default)(t,e)}function Rp(t,e){return!t||t.type!=="TSFunctionType"?!1:e==null||(0,T.default)(t,e)}function jp(t,e){return!t||t.type!=="TSConstructorType"?!1:e==null||(0,T.default)(t,e)}function Kp(t,e){return!t||t.type!=="TSTypeReference"?!1:e==null||(0,T.default)(t,e)}function Up(t,e){return!t||t.type!=="TSTypePredicate"?!1:e==null||(0,T.default)(t,e)}function Vp(t,e){return!t||t.type!=="TSTypeQuery"?!1:e==null||(0,T.default)(t,e)}function $p(t,e){return!t||t.type!=="TSTypeLiteral"?!1:e==null||(0,T.default)(t,e)}function Xp(t,e){return!t||t.type!=="TSArrayType"?!1:e==null||(0,T.default)(t,e)}function Yp(t,e){return!t||t.type!=="TSTupleType"?!1:e==null||(0,T.default)(t,e)}function Jp(t,e){return!t||t.type!=="TSOptionalType"?!1:e==null||(0,T.default)(t,e)}function qp(t,e){return!t||t.type!=="TSRestType"?!1:e==null||(0,T.default)(t,e)}function Wp(t,e){return!t||t.type!=="TSNamedTupleMember"?!1:e==null||(0,T.default)(t,e)}function Hp(t,e){return!t||t.type!=="TSUnionType"?!1:e==null||(0,T.default)(t,e)}function zp(t,e){return!t||t.type!=="TSIntersectionType"?!1:e==null||(0,T.default)(t,e)}function Gp(t,e){return!t||t.type!=="TSConditionalType"?!1:e==null||(0,T.default)(t,e)}function Qp(t,e){return!t||t.type!=="TSInferType"?!1:e==null||(0,T.default)(t,e)}function Zp(t,e){return!t||t.type!=="TSParenthesizedType"?!1:e==null||(0,T.default)(t,e)}function ef(t,e){return!t||t.type!=="TSTypeOperator"?!1:e==null||(0,T.default)(t,e)}function tf(t,e){return!t||t.type!=="TSIndexedAccessType"?!1:e==null||(0,T.default)(t,e)}function rf(t,e){return!t||t.type!=="TSMappedType"?!1:e==null||(0,T.default)(t,e)}function sf(t,e){return!t||t.type!=="TSTemplateLiteralType"?!1:e==null||(0,T.default)(t,e)}function af(t,e){return!t||t.type!=="TSLiteralType"?!1:e==null||(0,T.default)(t,e)}function nf(t,e){return!t||t.type!=="TSExpressionWithTypeArguments"?!1:e==null||(0,T.default)(t,e)}function of(t,e){return!t||t.type!=="TSInterfaceDeclaration"?!1:e==null||(0,T.default)(t,e)}function lf(t,e){return!t||t.type!=="TSInterfaceBody"?!1:e==null||(0,T.default)(t,e)}function uf(t,e){return!t||t.type!=="TSTypeAliasDeclaration"?!1:e==null||(0,T.default)(t,e)}function cf(t,e){return!t||t.type!=="TSInstantiationExpression"?!1:e==null||(0,T.default)(t,e)}function pf(t,e){return!t||t.type!=="TSAsExpression"?!1:e==null||(0,T.default)(t,e)}function ff(t,e){return!t||t.type!=="TSSatisfiesExpression"?!1:e==null||(0,T.default)(t,e)}function df(t,e){return!t||t.type!=="TSTypeAssertion"?!1:e==null||(0,T.default)(t,e)}function hf(t,e){return!t||t.type!=="TSEnumBody"?!1:e==null||(0,T.default)(t,e)}function yf(t,e){return!t||t.type!=="TSEnumDeclaration"?!1:e==null||(0,T.default)(t,e)}function mf(t,e){return!t||t.type!=="TSEnumMember"?!1:e==null||(0,T.default)(t,e)}function Tf(t,e){return!t||t.type!=="TSModuleDeclaration"?!1:e==null||(0,T.default)(t,e)}function Sf(t,e){return!t||t.type!=="TSModuleBlock"?!1:e==null||(0,T.default)(t,e)}function xf(t,e){return!t||t.type!=="TSImportType"?!1:e==null||(0,T.default)(t,e)}function bf(t,e){return!t||t.type!=="TSImportEqualsDeclaration"?!1:e==null||(0,T.default)(t,e)}function Ef(t,e){return!t||t.type!=="TSExternalModuleReference"?!1:e==null||(0,T.default)(t,e)}function Pf(t,e){return!t||t.type!=="TSNonNullExpression"?!1:e==null||(0,T.default)(t,e)}function gf(t,e){return!t||t.type!=="TSExportAssignment"?!1:e==null||(0,T.default)(t,e)}function Af(t,e){return!t||t.type!=="TSNamespaceExportDeclaration"?!1:e==null||(0,T.default)(t,e)}function If(t,e){return!t||t.type!=="TSTypeAnnotation"?!1:e==null||(0,T.default)(t,e)}function vf(t,e){return!t||t.type!=="TSTypeParameterInstantiation"?!1:e==null||(0,T.default)(t,e)}function Cf(t,e){return!t||t.type!=="TSTypeParameterDeclaration"?!1:e==null||(0,T.default)(t,e)}function Nf(t,e){return!t||t.type!=="TSTypeParameter"?!1:e==null||(0,T.default)(t,e)}function wf(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(t.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Of(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Df(t,e){if(!t)return!1;switch(t.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return e==null||(0,T.default)(t,e)}function Lf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,T.default)(t,e)}function kf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,T.default)(t,e)}function _f(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(t.expectedNode==="BlockStatement")break;default:return!1}return e==null||(0,T.default)(t,e)}function Mf(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(t.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Bf(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return e==null||(0,T.default)(t,e)}function Ff(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Rf(t,e){if(!t)return!1;switch(t.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function jf(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Kf(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Uf(t,e){if(!t)return!1;switch(t.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return e==null||(0,T.default)(t,e)}function Vf(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function $f(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return e==null||(0,T.default)(t,e)}function Xf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||(0,T.default)(t,e)}function Yf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return e==null||(0,T.default)(t,e)}function Jf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,T.default)(t,e)}function qf(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(t.expectedNode==="Declaration")break;default:return!1}return e==null||(0,T.default)(t,e)}function Wf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(t.expectedNode==="Identifier")break;default:return!1}return e==null||(0,T.default)(t,e)}function Hf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function zf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return e==null||(0,T.default)(t,e)}function Gf(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if(t.expectedNode==="Identifier")break;default:return!1}return e==null||(0,T.default)(t,e)}function Qf(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,T.default)(t,e)}function Zf(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if(t.expectedNode==="StringLiteral")break;default:return!1}return e==null||(0,T.default)(t,e)}function ed(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function td(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return e==null||(0,T.default)(t,e)}function rd(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function sd(t,e){if(!t)return!1;switch(t.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function id(t,e){if(!t)return!1;switch(t.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return e==null||(0,T.default)(t,e)}function ad(t,e){if(!t)return!1;switch(t.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(t.expectedNode==="Pattern")break;default:return!1}return e==null||(0,T.default)(t,e)}function nd(t,e){if(!t)return!1;switch(t.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return e==null||(0,T.default)(t,e)}function Ni(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return e==null||(0,T.default)(t,e)}function od(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return e==null||(0,T.default)(t,e)}function ld(t,e){if(!t)return!1;switch(t.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return e==null||(0,T.default)(t,e)}function ud(t,e){if(!t)return!1;switch(t.type){case"ClassAccessorProperty":break;default:return!1}return e==null||(0,T.default)(t,e)}function cd(t,e){if(!t)return!1;switch(t.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return e==null||(0,T.default)(t,e)}function pd(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||(0,T.default)(t,e)}function fd(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return e==null||(0,T.default)(t,e)}function dd(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return e==null||(0,T.default)(t,e)}function hd(t,e){if(!t)return!1;switch(t.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return e==null||(0,T.default)(t,e)}function yd(t,e){if(!t)return!1;switch(t.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return e==null||(0,T.default)(t,e)}function md(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return e==null||(0,T.default)(t,e)}function Td(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return e==null||(0,T.default)(t,e)}function Sd(t,e){if(!t)return!1;switch(t.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return e==null||(0,T.default)(t,e)}function xd(t,e){if(!t)return!1;switch(t.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return e==null||(0,T.default)(t,e)}function bd(t,e){if(!t)return!1;switch(t.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return e==null||(0,T.default)(t,e)}function Ed(t,e){if(!t)return!1;switch(t.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return e==null||(0,T.default)(t,e)}function Pd(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return e==null||(0,T.default)(t,e)}function gd(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return e==null||(0,T.default)(t,e)}function Ad(t,e){return(0,at.default)("isNumberLiteral","isNumericLiteral"),!t||t.type!=="NumberLiteral"?!1:e==null||(0,T.default)(t,e)}function Id(t,e){return(0,at.default)("isRegexLiteral","isRegExpLiteral"),!t||t.type!=="RegexLiteral"?!1:e==null||(0,T.default)(t,e)}function vd(t,e){return(0,at.default)("isRestProperty","isRestElement"),!t||t.type!=="RestProperty"?!1:e==null||(0,T.default)(t,e)}function Cd(t,e){return(0,at.default)("isSpreadProperty","isSpreadElement"),!t||t.type!=="SpreadProperty"?!1:e==null||(0,T.default)(t,e)}function Nd(t,e){return(0,at.default)("isModuleDeclaration","isImportOrExportDeclaration"),Ni(t,e)}Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=wd;var Le=d;function wi(t){return(0,Le.isMemberExpression)(t)||(0,Le.isMetaProperty)(t)}function wd(t,e,r){if(!wi(t))return!1;const s=Array.isArray(e)?e:e.split("."),i=[];let a;for(a=t;wi(a);a=(n=a.object)!=null?n:a.meta){var n;i.push(a.property)}if(i.push(a),i.length<s.length||!r&&i.length>s.length)return!1;for(let o=0,u=i.length-1;o<s.length;o++,u--){const p=i[u];let y;if((0,Le.isIdentifier)(p))y=p.name;else if((0,Le.isStringLiteral)(p))y=p.value;else if((0,Le.isThisExpression)(p))y="this";else if((0,Le.isSuper)(p))y="super";else if((0,Le.isPrivateName)(p))y="#"+p.id.name;else return!1;if(s[o]!==y)return!1}return!0}Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=Dd;var Od=Lt;function Dd(t,e){const r=t.split(".");return s=>(0,Od.default)(s,r,e)}Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=void 0;var Ld=Dt;const kd=(0,Ld.default)("React.Component");Ot.default=kd;var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.default=_d;function _d(t){return!!t&&/^[a-z]/.test(t)}var kt={},_t={},ae={},f={},ke={},jr={},te={},Mt={},Bt={},Oi;function Kr(){if(Oi)return Bt;Oi=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.default=e;var t=ce();function e(r,s){if(r===s)return!0;if(r==null||t.ALIAS_KEYS[s])return!1;const i=t.FLIPPED_ALIAS_KEYS[s];return!!(i!=null&&i.includes(r))}return Bt}var Ft={},Di;function Li(){if(Di)return Ft;Di=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.default=e;var t=ce();function e(r,s){if(r===s)return!0;const i=t.PLACEHOLDERS_ALIAS[r];return!!(i!=null&&i.includes(s))}return Ft}var ki;function nt(){if(ki)return Mt;ki=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.default=i;var t=it,e=Kr(),r=Li(),s=ce();function i(a,n,o){return n?(0,e.default)(n.type,a)?o===void 0?!0:(0,t.default)(n,o):!o&&n.type==="Placeholder"&&a in s.FLIPPED_ALIAS_KEYS?(0,r.default)(n.expectedNode,a):!1:!1}return Mt}var _e={},Rt={},ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.isIdentifierChar=Fi,ot.isIdentifierName=Rd,ot.isIdentifierStart=Bi;let Ur="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",_i="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const Md=new RegExp("["+Ur+"]"),Bd=new RegExp("["+Ur+_i+"]");Ur=_i=null;const Mi=[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,7,25,39,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,5,57,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,24,43,261,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,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,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,208,30,2,2,2,1,2,6,3,4,10,1,225,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,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Fd=[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,78,5,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,199,7,137,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,55,9,266,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,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function Vr(t,e){let r=65536;for(let s=0,i=e.length;s<i;s+=2){if(r+=e[s],r>t)return!1;if(r+=e[s+1],r>=t)return!0}return!1}function Bi(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Md.test(String.fromCharCode(t)):Vr(t,Mi)}function Fi(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Bd.test(String.fromCharCode(t)):Vr(t,Mi)||Vr(t,Fd)}function Rd(t){let e=!0;for(let r=0;r<t.length;r++){let s=t.charCodeAt(r);if((s&64512)===55296&&r+1<t.length){const i=t.charCodeAt(++r);(i&64512)===56320&&(s=65536+((s&1023)<<10)+(i&1023))}if(e){if(e=!1,!Bi(s))return!1}else if(!Fi(s))return!1}return!e}var Me={};Object.defineProperty(Me,"__esModule",{value:!0}),Me.isKeyword=$d,Me.isReservedWord=Ri,Me.isStrictBindOnlyReservedWord=Ki,Me.isStrictBindReservedWord=Vd,Me.isStrictReservedWord=ji;const $r={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"]},jd=new Set($r.keyword),Kd=new Set($r.strict),Ud=new Set($r.strictBind);function Ri(t,e){return e&&t==="await"||t==="enum"}function ji(t,e){return Ri(t,e)||Kd.has(t)}function Ki(t){return Ud.has(t)}function Vd(t,e){return ji(t,e)||Ki(t)}function $d(t){return jd.has(t)}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isIdentifierChar",{enumerable:!0,get:function(){return e.isIdentifierChar}}),Object.defineProperty(t,"isIdentifierName",{enumerable:!0,get:function(){return e.isIdentifierName}}),Object.defineProperty(t,"isIdentifierStart",{enumerable:!0,get:function(){return e.isIdentifierStart}}),Object.defineProperty(t,"isKeyword",{enumerable:!0,get:function(){return r.isKeyword}}),Object.defineProperty(t,"isReservedWord",{enumerable:!0,get:function(){return r.isReservedWord}}),Object.defineProperty(t,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return r.isStrictBindOnlyReservedWord}}),Object.defineProperty(t,"isStrictBindReservedWord",{enumerable:!0,get:function(){return r.isStrictBindReservedWord}}),Object.defineProperty(t,"isStrictReservedWord",{enumerable:!0,get:function(){return r.isStrictReservedWord}});var e=ot,r=Me})(Rt),Object.defineProperty(_e,"__esModule",{value:!0}),_e.default=Xd;var Xr=Rt;function Xd(t,e=!0){return typeof t!="string"||e&&((0,Xr.isKeyword)(t)||(0,Xr.isStrictReservedWord)(t,!0))?!1:(0,Xr.isIdentifierName)(t)}var lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.readCodePoint=$i,lt.readInt=Vi,lt.readStringContents=Jd;var Yd=function(e){return e>=48&&e<=57};const Ui={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},jt={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function Jd(t,e,r,s,i,a){const n=r,o=s,u=i;let p="",y=null,E=r;const{length:P}=e;for(;;){if(r>=P){a.unterminated(n,o,u),p+=e.slice(E,r);break}const g=e.charCodeAt(r);if(qd(t,g,e,r)){p+=e.slice(E,r);break}if(g===92){p+=e.slice(E,r);const N=Wd(e,r,s,i,t==="template",a);N.ch===null&&!y?y={pos:r,lineStart:s,curLine:i}:p+=N.ch,{pos:r,lineStart:s,curLine:i}=N,E=r}else g===8232||g===8233?(++r,++i,s=r):g===10||g===13?t==="template"?(p+=e.slice(E,r)+`
|
|
232
|
+
`,++r,g===13&&e.charCodeAt(r)===10&&++r,++i,E=s=r):a.unterminated(n,o,u):++r}return{pos:r,str:p,firstInvalidLoc:y,lineStart:s,curLine:i,containsInvalid:!!y}}function qd(t,e,r,s){return t==="template"?e===96||e===36&&r.charCodeAt(s+1)===123:e===(t==="double"?34:39)}function Wd(t,e,r,s,i,a){const n=!i;e++;const o=p=>({pos:e,ch:p,lineStart:r,curLine:s}),u=t.charCodeAt(e++);switch(u){case 110:return o(`
|
|
233
|
+
`);case 114:return o("\r");case 120:{let p;return{code:p,pos:e}=Yr(t,e,r,s,2,!1,n,a),o(p===null?null:String.fromCharCode(p))}case 117:{let p;return{code:p,pos:e}=$i(t,e,r,s,n,a),o(p===null?null:String.fromCodePoint(p))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);a.strictNumericEscape(e-1,r,s);default:if(u>=48&&u<=55){const p=e-1;let E=/^[0-7]+/.exec(t.slice(p,e+2))[0],P=parseInt(E,8);P>255&&(E=E.slice(0,-1),P=parseInt(E,8)),e+=E.length-1;const g=t.charCodeAt(e);if(E!=="0"||g===56||g===57){if(i)return o(null);a.strictNumericEscape(p,r,s)}return o(String.fromCharCode(P))}return o(String.fromCharCode(u))}}function Yr(t,e,r,s,i,a,n,o){const u=e;let p;return{n:p,pos:e}=Vi(t,e,r,s,16,i,a,!1,o,!n),p===null&&(n?o.invalidEscapeSequence(u,r,s):e=u-1),{code:p,pos:e}}function Vi(t,e,r,s,i,a,n,o,u,p){const y=e,E=i===16?Ui.hex:Ui.decBinOct,P=i===16?jt.hex:i===10?jt.dec:i===8?jt.oct:jt.bin;let g=!1,N=0;for(let A=0,O=a??1/0;A<O;++A){const I=t.charCodeAt(e);let C;if(I===95&&o!=="bail"){const B=t.charCodeAt(e-1),K=t.charCodeAt(e+1);if(o){if(Number.isNaN(K)||!P(K)||E.has(B)||E.has(K)){if(p)return{n:null,pos:e};u.unexpectedNumericSeparator(e,r,s)}}else{if(p)return{n:null,pos:e};u.numericSeparatorInEscapeSequence(e,r,s)}++e;continue}if(I>=97?C=I-97+10:I>=65?C=I-65+10:Yd(I)?C=I-48:C=1/0,C>=i){if(C<=9&&p)return{n:null,pos:e};if(C<=9&&u.invalidDigit(e,r,s,i))C=0;else if(n)C=0,g=!0;else break}++e,N=N*i+C}return e===y||a!=null&&e-y!==a||g?{n:null,pos:e}:{n:N,pos:e}}function $i(t,e,r,s,i,a){const n=t.charCodeAt(e);let o;if(n===123){if(++e,{code:o,pos:e}=Yr(t,e,r,s,t.indexOf("}",e)-e,!0,i,a),++e,o!==null&&o>1114111)if(i)a.invalidCodePoint(e,r,s);else return{code:null,pos:e}}else({code:o,pos:e}=Yr(t,e,r,s,4,!1,i,a));return{code:o,pos:e}}var U={};Object.defineProperty(U,"__esModule",{value:!0}),U.UPDATE_OPERATORS=U.UNARY_OPERATORS=U.STRING_UNARY_OPERATORS=U.STATEMENT_OR_BLOCK_KEYS=U.NUMBER_UNARY_OPERATORS=U.NUMBER_BINARY_OPERATORS=U.LOGICAL_OPERATORS=U.INHERIT_KEYS=U.FOR_INIT_KEYS=U.FLATTENABLE_KEYS=U.EQUALITY_BINARY_OPERATORS=U.COMPARISON_BINARY_OPERATORS=U.COMMENT_KEYS=U.BOOLEAN_UNARY_OPERATORS=U.BOOLEAN_NUMBER_BINARY_OPERATORS=U.BOOLEAN_BINARY_OPERATORS=U.BINARY_OPERATORS=U.ASSIGNMENT_OPERATORS=void 0,U.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],U.FLATTENABLE_KEYS=["body","expressions"],U.FOR_INIT_KEYS=["left","init"],U.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];const Hd=U.LOGICAL_OPERATORS=["||","&&","??"];U.UPDATE_OPERATORS=["++","--"];const zd=U.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="],Gd=U.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],Qd=U.COMPARISON_BINARY_OPERATORS=[...Gd,"in","instanceof"],Zd=U.BOOLEAN_BINARY_OPERATORS=[...Qd,...zd],Xi=U.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"];U.BINARY_OPERATORS=["+",...Xi,...Zd,"|>"],U.ASSIGNMENT_OPERATORS=["=","+=",...Xi.map(t=>t+"="),...Hd.map(t=>t+"=")];const eh=U.BOOLEAN_UNARY_OPERATORS=["delete","!"],th=U.NUMBER_UNARY_OPERATORS=["+","-","~"],rh=U.STRING_UNARY_OPERATORS=["typeof"];U.UNARY_OPERATORS=["void","throw",...eh,...th,...rh],U.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},U.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped"),U.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding");var X={},Yi;function Se(){if(Yi)return X;Yi=1,Object.defineProperty(X,"__esModule",{value:!0}),X.allExpandedTypes=X.VISITOR_KEYS=X.NODE_UNION_SHAPES__PRIVATE=X.NODE_PARENT_VALIDATIONS=X.NODE_FIELDS=X.FLIPPED_ALIAS_KEYS=X.DEPRECATED_KEYS=X.BUILDER_KEYS=X.ALIAS_KEYS=void 0,X.arrayOf=A,X.arrayOfType=O,X.assertEach=C,X.assertNodeOrValueType=Je,X.assertNodeType=re,X.assertOneOf=B,X.assertOptionalChainStart=yt,X.assertShape=ne,X.assertValueType=Ne,X.chain=dr,X.default=hr,X.defineAliasedType=_s,X.validate=E,X.validateArrayOfType=I,X.validateOptional=g,X.validateOptionalType=N,X.validateType=P;var t=nt(),e=Jr();const r=X.VISITOR_KEYS={},s=X.ALIAS_KEYS={},i=X.FLIPPED_ALIAS_KEYS={},a=X.NODE_FIELDS={},n=X.BUILDER_KEYS={},o=X.DEPRECATED_KEYS={},u=X.NODE_PARENT_VALIDATIONS={},p=X.NODE_UNION_SHAPES__PRIVATE={};function y(L){return Array.isArray(L)?"array":L===null?"null":typeof L}function E(L){return{validate:L}}function P(...L){return E(re(...L))}function g(L){return{validate:L,optional:!0}}function N(...L){return{validate:re(...L),optional:!0}}function A(L){return dr(Ne("array"),C(L))}function O(...L){return A(re(...L))}function I(...L){return E(O(...L))}function C(L){const j=process.env.BABEL_TYPES_8_BREAKING?e.validateChild:()=>{};function J(R,H,ee){if(!Array.isArray(ee))return;let G=0;const z={toString(){return`${H}[${G}]`}};for(;G<ee.length;G++){const Q=ee[G];L(R,z,Q),j(R,z,Q)}}return J.each=L,J}function B(...L){function j(J,R,H){if(!L.includes(H))throw new TypeError(`Property ${R} expected value to be one of ${JSON.stringify(L)} but got ${JSON.stringify(H)}`)}return j.oneOf=L,j}const K=X.allExpandedTypes=[];function re(...L){const j=new Set;K.push({types:L,set:j});function J(R,H,ee){const G=ee==null?void 0:ee.type;if(G!=null){if(j.has(G)){(0,e.validateChild)(R,H,ee);return}if(G==="Placeholder"){for(const z of L)if((0,t.default)(z,ee)){(0,e.validateChild)(R,H,ee);return}}}throw new TypeError(`Property ${H} of ${R.type} expected node to be of a type ${JSON.stringify(L)} but instead got ${JSON.stringify(G)}`)}return J.oneOfNodeTypes=L,J}function Je(...L){function j(J,R,H){const ee=y(H);for(const G of L)if(ee===G||(0,t.default)(G,H)){(0,e.validateChild)(J,R,H);return}throw new TypeError(`Property ${R} of ${J.type} expected node to be of a type ${JSON.stringify(L)} but instead got ${JSON.stringify(H==null?void 0:H.type)}`)}return j.oneOfNodeOrValueTypes=L,j}function Ne(L){function j(J,R,H){if(y(H)!==L)throw new TypeError(`Property ${R} expected type of ${L} but got ${y(H)}`)}return j.type=L,j}function ne(L){const j=Object.keys(L);function J(R,H,ee){const G=[];for(const z of j)try{(0,e.validateField)(R,z,ee[z],L[z])}catch(Q){if(Q instanceof TypeError){G.push(Q.message);continue}throw Q}if(G.length)throw new TypeError(`Property ${H} of ${R.type} expected to have the following:
|
|
190
234
|
${G.join(`
|
|
191
|
-
`)}`)}return J.shapeOf=L,J}function yt(){function L(j){var J;let R=j;for(;j;){const{type:H}=R;if(H==="OptionalCallExpression"){if(R.optional)return;R=R.callee;continue}if(H==="OptionalMemberExpression"){if(R.optional)return;R=R.object;continue}break}throw new TypeError(`Non-optional ${j.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(J=R)==null?void 0:J.type}`)}return L}function dr(...L){function j(...J){for(const R of L)R(...J)}if(j.chainOf=L,L.length>=2&&"type"in L[0]&&L[0].type==="array"&&!("each"in L[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return j}const Ls=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),ks=new Set(["default","optional","deprecated","validate"]),mt={};function Ms(...L){return(j,J={})=>{let R=J.aliases;if(!R){var H;J.inherits&&(R=(H=mt[J.inherits].aliases)==null?void 0:H.slice()),R??(R=[]),J.aliases=R}const ee=L.filter(G=>!R.includes(G));R.unshift(...ee),hr(j,J)}}function hr(L,j={}){const J=j.inherits&&mt[j.inherits]||{};let R=j.fields;if(!R&&(R={},J.fields)){const z=Object.getOwnPropertyNames(J.fields);for(const Q of z){const Pe=J.fields[Q],we=Pe.default;if(Array.isArray(we)?we.length>0:we&&typeof we=="object")throw new Error("field defaults can only be primitives or empty arrays currently");R[Q]={default:Array.isArray(we)?[]:we,optional:Pe.optional,deprecated:Pe.deprecated,validate:Pe.validate}}}const H=j.visitor||J.visitor||[],ee=j.aliases||J.aliases||[],G=j.builder||J.builder||j.visitor||[];for(const z of Object.keys(j))if(!Ls.has(z))throw new Error(`Unknown type option "${z}" on ${L}`);j.deprecatedAlias&&(o[j.deprecatedAlias]=L);for(const z of H.concat(G))R[z]=R[z]||{};for(const z of Object.keys(R)){const Q=R[z];Q.default!==void 0&&!G.includes(z)&&(Q.optional=!0),Q.default===void 0?Q.default=null:!Q.validate&&Q.default!=null&&(Q.validate=Ce(y(Q.default)));for(const Pe of Object.keys(Q))if(!ks.has(Pe))throw new Error(`Unknown field key "${Pe}" on ${L}.${z}`)}r[L]=j.visitor=H,n[L]=j.builder=G,a[L]=j.fields=R,s[L]=j.aliases=ee,ee.forEach(z=>{i[z]=i[z]||[],i[z].push(L)}),j.validate&&(u[L]=j.validate),j.unionShape&&(p[L]=j.unionShape),mt[L]=j}return Y}var Xi;function Kt(){if(Xi)return te;Xi=1,Object.defineProperty(te,"__esModule",{value:!0}),te.patternLikeCommon=te.importAttributes=te.functionTypeAnnotationCommon=te.functionDeclarationCommon=te.functionCommon=te.classMethodOrPropertyUnionShapeCommon=te.classMethodOrPropertyCommon=te.classMethodOrDeclareMethodCommon=void 0;var t=nt(),e=Me,r=Rt,s=lt,i=U,a=Se();const n=(A=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,a.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:A?(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});te.classMethodOrPropertyUnionShapeCommon=n;const o=(0,a.defineAliasedType)("Standardized");o("ArrayExpression",{fields:{elements:{validate:(0,a.arrayOf)((0,a.assertNodeOrValueType)("null","Expression","SpreadElement")),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]}),o("AssignmentExpression",{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){const A=(0,a.assertOneOf)(...i.ASSIGNMENT_OPERATORS),O=(0,a.assertOneOf)("=");return function(I,N,B){((0,t.default)("Pattern",I.left)?O:A)(I,N,B)}}(),{oneOf:i.ASSIGNMENT_OPERATORS}):(0,a.assertValueType)("string")},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,a.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,a.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),o("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,a.assertOneOf)(...i.BINARY_OPERATORS)},left:{validate:function(){const A=(0,a.assertNodeType)("Expression"),O=(0,a.assertNodeType)("Expression","PrivateName");return Object.assign(function(N,B,K){(N.operator==="in"?O:A)(N,B,K)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,a.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),o("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),o("Directive",{visitor:["value"],fields:{value:{validate:(0,a.assertNodeType)("DirectiveLiteral")}}}),o("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),o("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,a.arrayOfType)("Directive"),default:[]},body:(0,a.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),o("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),o("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,a.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,a.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,a.assertNodeType)("TypeParameterInstantiation"),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),o("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,a.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]}),o("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Expression")},alternate:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),o("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),o("DebuggerStatement",{aliases:["Statement"]}),o("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),o("EmptyStatement",{aliases:["Statement"]}),o("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),o("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,a.assertNodeType)("Program")},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertEach)((0,a.assertNodeType)("CommentBlock","CommentLine")):Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,a.assertEach)(Object.assign(()=>{},{type:"any"})),optional:!0}}}),o("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,a.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,a.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},update:{validate:(0,a.assertNodeType)("Expression"),optional:!0},body:{validate:(0,a.assertNodeType)("Statement")}}});const u=()=>({params:(0,a.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});te.functionCommon=u;const p=()=>({returnType:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});te.functionTypeAnnotationCommon=p;const y=()=>Object.assign({},u(),{declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}});te.functionDeclarationCommon=y,o("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},y(),p(),{body:{validate:(0,a.assertNodeType)("BlockStatement")},predicate:{validate:(0,a.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){const A=(0,a.assertNodeType)("Identifier");return function(O,I,N){(0,t.default)("ExportDefaultDeclaration",O)||A(N,"id",N.id)}}():void 0}),o("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},u(),p(),{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,a.assertNodeType)("BlockStatement")},predicate:{validate:(0,a.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});const E=()=>({typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}});te.patternLikeCommon=E,o("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},E(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("string"),Object.assign(function(A,O,I){if(!(0,e.default)(I,!1))throw new TypeError(`"${I}" is not a valid identifier name`)},{type:"string"})):(0,a.assertValueType)("string")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(A,O,I){const N=/\.(\w+)$/.exec(O.toString());if(!N)return;const[,B]=N,K={computed:!1};if(B==="property"){if((0,t.default)("MemberExpression",A,K)||(0,t.default)("OptionalMemberExpression",A,K))return}else if(B==="key"){if((0,t.default)("Property",A,K)||(0,t.default)("Method",A,K))return}else if(B==="exported"){if((0,t.default)("ExportSpecifier",A))return}else if(B==="imported"){if((0,t.default)("ImportSpecifier",A,{imported:I}))return}else if(B==="meta"&&(0,t.default)("MetaProperty",A,{meta:I}))return;if(((0,r.isKeyword)(I.name)||(0,r.isReservedWord)(I.name,!1))&&I.name!=="this")throw new TypeError(`"${I.name}" is not a valid identifier`)}:void 0}),o("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,a.assertNodeType)("Statement")}}}),o("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("StringLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,a.chain)((0,a.assertValueType)("number"),Object.assign(function(A,O,I){},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),o("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,a.assertValueType)("string")},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("string"),Object.assign(function(A,O,I){const N=/[^dgimsuvy]/.exec(I);if(N)throw new TypeError(`"${N[0]}" is not a valid RegExp flag`)},{type:"string"})):(0,a.assertValueType)("string"),default:""}}}),o("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,a.assertOneOf)(...i.LOGICAL_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}}}),o("MemberExpression",{builder:["object","property","computed",...process.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,a.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,a.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,a.assertNodeType)("Expression","Super")},property:{validate:function(){const A=(0,a.assertNodeType)("Identifier","PrivateName"),O=(0,a.assertNodeType)("Expression"),I=function(N,B,K){(N.computed?O:A)(N,B,K)};return I.oneOfNodeTypes=["Expression","Identifier","PrivateName"],I}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,a.assertValueType)("boolean"),optional:!0}})}),o("NewExpression",{inherits:"CallExpression"}),o("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,a.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,a.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,a.arrayOfType)("Directive"),default:[]},body:(0,a.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]}),o("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,a.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}}),o("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},n(),{fields:Object.assign({},u(),p(),{kind:Object.assign({validate:(0,a.assertOneOf)("method","get","set")},process.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),O=(0,a.assertNodeType)("Expression"),I=function(N,B,K){(N.computed?O:A)(N,B,K)};return I.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],I}()},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,a.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]})),o("ObjectProperty",{builder:["key","value","computed","shorthand",...process.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,a.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),O=(0,a.assertNodeType)("Expression");return Object.assign(function(N,B,K){(N.computed?O:A)(N,B,K)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,a.assertNodeType)("Expression","PatternLike")},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),Object.assign(function(A,O,I){if(I){if(A.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,t.default)("Identifier",A.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})):(0,a.assertValueType)("boolean"),default:!1},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){const A=(0,a.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),O=(0,a.assertNodeType)("Expression");return function(I,N,B){((0,t.default)("ObjectPattern",I)?A:O)(B,"value",B.value)}}():void 0}),o("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},E(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(A,O){const I=/(\w+)\[(\d+)\]/.exec(O.toString());if(!I)throw new Error("Internal Babel error: malformed key.");const[,N,B]=I;if(A[N].length>+B+1)throw new TypeError(`RestElement must be last element of ${N}`)}:void 0}),o("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),o("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,a.validateArrayOfType)("Expression")},aliases:["Expression"]}),o("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}}}),o("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},consequent:(0,a.validateArrayOfType)("Statement")}}),o("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,a.assertNodeType)("Expression")},cases:(0,a.validateArrayOfType)("SwitchCase")}}),o("ThisExpression",{aliases:["Expression"]}),o("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),o("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertNodeType)("BlockStatement"),Object.assign(function(A){if(!A.handler&&!A.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]})):(0,a.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,a.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,a.assertNodeType)("BlockStatement")}}}),o("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:(0,a.assertOneOf)(...i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),o("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","MemberExpression"):(0,a.assertNodeType)("Expression")},operator:{validate:(0,a.assertOneOf)(...i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),o("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},kind:{validate:(0,a.assertOneOf)("var","let","const","using","await using")},declarations:(0,a.validateArrayOfType)("VariableDeclarator")},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{const A=(0,a.assertNodeType)("Identifier","Placeholder"),O=(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),I=(0,a.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(N,B,K){const{kind:re,declarations:Je}=K,Ce=(0,t.default)("ForXStatement",N,{left:K});if(Ce&&Je.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${N.type}`);for(const ne of Je)re==="const"||re==="let"||re==="var"?!Ce&&!ne.init?A(ne,"id",ne.id):O(ne,"id",ne.id):I(ne,"id",ne.id)}})():void 0}),o("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,a.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,a.assertValueType)("boolean")},init:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),o("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},E(),{left:{validate:(0,a.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,a.assertNodeType)("Expression")},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}})}),o("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},E(),{elements:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeOrValueType)("null","PatternLike")))}})}),o("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},u(),p(),{expression:{validate:(0,a.assertValueType)("boolean")},body:{validate:(0,a.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,a.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})}),o("ClassBody",{visitor:["body"],fields:{body:(0,a.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),o("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,a.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,a.assertNodeType)("Expression")},superTypeParameters:{validate:(0,a.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,a.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,a.assertNodeType)("InterfaceExtends"),optional:!0}}}),o("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,a.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,a.assertNodeType)("Expression")},superTypeParameters:{validate:(0,a.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,a.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,a.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,a.assertValueType)("boolean"),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){const A=(0,a.assertNodeType)("Identifier");return function(O,I,N){(0,t.default)("ExportDefaultDeclaration",O)||A(N,"id",N.id)}}():void 0});const P=te.importAttributes={attributes:{optional:!0,validate:(0,a.arrayOfType)("ImportAttribute")},assertions:{deprecated:!0,optional:!0,validate:(0,a.arrayOfType)("ImportAttribute")}};o("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,a.assertNodeType)("StringLiteral")},exportKind:(0,a.validateOptional)((0,a.assertOneOf)("type","value"))},P)}),o("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,a.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,a.validateOptional)((0,a.assertOneOf)("value"))}}),o("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertNodeType)("Declaration"),Object.assign(function(A,O,I){if(I&&A.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(I&&A.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["Declaration"]})):(0,a.assertNodeType)("Declaration")}},P,{specifiers:{default:[],validate:(0,a.arrayOf)(function(){const A=(0,a.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),O=(0,a.assertNodeType)("ExportSpecifier");return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(I,N,B){(I.source?A:O)(I,N,B)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):A}())},source:{validate:(0,a.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,a.validateOptional)((0,a.assertOneOf)("type","value"))})}),o("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")},exported:{validate:(0,a.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,a.assertOneOf)("type","value"),optional:!0}}}),o("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,a.assertNodeType)("VariableDeclaration","LVal");const A=(0,a.assertNodeType)("VariableDeclaration"),O=(0,a.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign(function(I,N,B){(0,t.default)("VariableDeclaration",B)?A(I,N,B):O(I,N,B)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")},await:{default:!1}}}),o("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},P,{module:{optional:!0,validate:(0,a.assertValueType)("boolean")},phase:{default:null,validate:(0,a.assertOneOf)("source","defer")},specifiers:(0,a.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,a.assertNodeType)("StringLiteral")},importKind:{validate:(0,a.assertOneOf)("type","typeof","value"),optional:!0}})}),o("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")}}}),o("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")}}}),o("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")},imported:{validate:(0,a.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,a.assertOneOf)("type","typeof","value"),optional:!0}}}),o("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,a.assertOneOf)("source","defer")},source:{validate:(0,a.assertNodeType)("Expression")},options:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),o("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertNodeType)("Identifier"),Object.assign(function(A,O,I){let N;switch(I.name){case"function":N="sent";break;case"new":N="target";break;case"import":N="meta";break}if(!(0,t.default)("Identifier",A.property,{name:N}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]})):(0,a.assertNodeType)("Identifier")},property:{validate:(0,a.assertNodeType)("Identifier")}}});const g=()=>({abstract:{validate:(0,a.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,a.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},key:{validate:(0,a.chain)(function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),O=(0,a.assertNodeType)("Expression");return function(I,N,B){(I.computed?O:A)(I,N,B)}}(),(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});te.classMethodOrPropertyCommon=g;const C=()=>Object.assign({},u(),g(),{params:(0,a.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,a.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}});return te.classMethodOrDeclareMethodCommon=C,o("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},n(),{fields:Object.assign({},C(),p(),{body:{validate:(0,a.assertNodeType)("BlockStatement")}})})),o("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},E(),{properties:(0,a.validateArrayOfType)("RestElement","ObjectProperty")})}),o("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),o("Super",{aliases:["Expression"]}),o("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,a.assertNodeType)("Expression")},quasi:{validate:(0,a.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),o("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,a.chain)((0,a.assertShape)({raw:{validate:(0,a.assertValueType)("string")},cooked:{validate:(0,a.assertValueType)("string"),optional:!0}}),function(O){const I=O.value.raw;let N=!1;const B=()=>{throw new Error("Internal @babel/types error.")},{str:K,firstInvalidLoc:re}=(0,s.readStringContents)("template",I,0,0,0,{unterminated(){N=!0},strictNumericEscape:B,invalidEscapeSequence:B,numericSeparatorInEscapeSequence:B,unexpectedNumericSeparator:B,invalidDigit:B,invalidCodePoint:B});if(!N)throw new Error("Invalid raw");O.value.cooked=re?null:K})},tail:{default:!1}}}),o("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,a.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","TSType")),function(A,O,I){if(A.quasis.length!==I.length+1)throw new TypeError(`Number of ${A.type} quasis should be exactly one more than the number of expressions.
|
|
192
|
-
Expected ${I.length+1} quasis but got ${A.quasis.length}`)})}}}),o("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),Object.assign(function(A,O,I){if(I&&!A.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})):(0,a.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),o("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),o("Import",{aliases:["Expression"]}),o("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,a.assertNodeType)("Identifier")}}}),o("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},property:{validate:function(){const A=(0,a.assertNodeType)("Identifier"),O=(0,a.assertNodeType)("Expression");return Object.assign(function(N,B,K){(N.computed?O:A)(N,B,K)},{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),(0,a.assertOptionalChainStart)()):(0,a.assertValueType)("boolean")}}}),o("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,a.assertNodeType)("Expression")},arguments:(0,a.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),(0,a.assertOptionalChainStart)()):(0,a.assertValueType)("boolean")},typeArguments:{validate:(0,a.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,a.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),o("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},n(),{fields:Object.assign({},g(),{value:{validate:(0,a.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,a.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,a.assertValueType)("boolean"),optional:!0},declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},variance:{validate:(0,a.assertNodeType)("Variance"),optional:!0}})})),o("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},n(!0),{fields:Object.assign({},g(),{key:{validate:(0,a.chain)(function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),O=(0,a.assertNodeType)("Expression");return function(I,N,B){(I.computed?O:A)(I,N,B)}}(),(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,a.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,a.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,a.assertValueType)("boolean"),optional:!0},declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},variance:{validate:(0,a.assertNodeType)("Variance"),optional:!0}})})),o("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,a.assertNodeType)("PrivateName")},value:{validate:(0,a.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,a.assertValueType)("boolean"),default:!1},readonly:{validate:(0,a.assertValueType)("boolean"),optional:!0},optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},definite:{validate:(0,a.assertValueType)("boolean"),optional:!0},variance:{validate:(0,a.assertNodeType)("Variance"),optional:!0}}}),o("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},C(),p(),{kind:{validate:(0,a.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,a.assertNodeType)("PrivateName")},body:{validate:(0,a.assertNodeType)("BlockStatement")}})}),o("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,a.assertNodeType)("Identifier")}}}),o("StaticBlock",{visitor:["body"],fields:{body:(0,a.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),o("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,a.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,a.assertNodeType)("StringLiteral")}}}),te}var Ji={},qi;function Gd(){if(qi)return Ji;qi=1;var t=Kt(),e=Se();const r=(0,e.defineAliasedType)("Flow"),s=i=>{const a=i==="DeclareClass";r(i,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...a?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),extends:(0,e.validateOptional)((0,e.arrayOfType)("InterfaceExtends"))},a?{mixins:(0,e.validateOptional)((0,e.arrayOfType)("InterfaceExtends")),implements:(0,e.validateOptional)((0,e.arrayOfType)("ClassImplements"))}:{},{body:(0,e.validateType)("ObjectTypeAnnotation")})})};return r("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,e.validateType)("FlowType")}}),r("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterInstantiation")}}),s("DeclareClass"),r("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),predicate:(0,e.validateOptionalType)("DeclaredPredicate")}}),s("DeclareInterface"),r("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier","StringLiteral"),body:(0,e.validateType)("BlockStatement"),kind:(0,e.validateOptional)((0,e.assertOneOf)("CommonJS","ES"))}}),r("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,e.validateType)("TypeAnnotation")}}),r("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),right:(0,e.validateType)("FlowType")}}),r("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,e.validateOptionalType)("FlowType"),impltype:(0,e.validateOptionalType)("FlowType")}}),r("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier")}}),r("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,e.validateOptionalType)("Flow"),specifiers:(0,e.validateOptional)((0,e.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,e.validateOptionalType)("StringLiteral"),default:(0,e.validateOptional)((0,e.assertValueType)("boolean"))},t.importAttributes)}),r("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,e.validateType)("StringLiteral"),exportKind:(0,e.validateOptional)((0,e.assertOneOf)("type","value"))},t.importAttributes)}),r("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,e.validateType)("Flow")}}),r("ExistsTypeAnnotation",{aliases:["FlowType"]}),r("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),params:(0,e.validateArrayOfType)("FunctionTypeParam"),rest:(0,e.validateOptionalType)("FunctionTypeParam"),this:(0,e.validateOptionalType)("FunctionTypeParam"),returnType:(0,e.validateType)("FlowType")}}),r("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,e.validateOptionalType)("Identifier"),typeAnnotation:(0,e.validateType)("FlowType"),optional:(0,e.validateOptional)((0,e.assertValueType)("boolean"))}}),r("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,e.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterInstantiation")}}),r("InferredPredicate",{aliases:["FlowPredicate"]}),r("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,e.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterInstantiation")}}),s("InterfaceDeclaration"),r("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,e.validateOptional)((0,e.arrayOfType)("InterfaceExtends")),body:(0,e.validateType)("ObjectTypeAnnotation")}}),r("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,e.validateType)("FlowType")}}),r("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,e.validate)((0,e.assertValueType)("number"))}}),r("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,e.validate)((0,e.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,e.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,e.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,e.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,e.assertValueType)("boolean"),default:!1},inexact:(0,e.validateOptional)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,e.validateType)("Identifier"),value:(0,e.validateType)("FlowType"),optional:(0,e.validate)((0,e.assertValueType)("boolean")),static:(0,e.validate)((0,e.assertValueType)("boolean")),method:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,e.validateType)("FlowType"),static:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,e.validateOptionalType)("Identifier"),key:(0,e.validateType)("FlowType"),value:(0,e.validateType)("FlowType"),static:(0,e.validate)((0,e.assertValueType)("boolean")),variance:(0,e.validateOptionalType)("Variance")}}),r("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,e.validateType)("Identifier","StringLiteral"),value:(0,e.validateType)("FlowType"),kind:(0,e.validate)((0,e.assertOneOf)("init","get","set")),static:(0,e.validate)((0,e.assertValueType)("boolean")),proto:(0,e.validate)((0,e.assertValueType)("boolean")),optional:(0,e.validate)((0,e.assertValueType)("boolean")),variance:(0,e.validateOptionalType)("Variance"),method:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,e.validateType)("FlowType")}}),r("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,e.validateOptionalType)("FlowType"),impltype:(0,e.validateType)("FlowType")}}),r("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,e.validateType)("Identifier"),qualification:(0,e.validateType)("Identifier","QualifiedTypeIdentifier")}}),r("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,e.validate)((0,e.assertValueType)("string"))}}),r("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,e.validateType)("FlowType")}}),r("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),right:(0,e.validateType)("FlowType")}}),r("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,e.validateType)("FlowType")}}),r("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,e.validateType)("Expression"),typeAnnotation:(0,e.validateType)("TypeAnnotation")}}),r("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,e.validate)((0,e.assertValueType)("string")),bound:(0,e.validateOptionalType)("TypeAnnotation"),default:(0,e.validateOptionalType)("FlowType"),variance:(0,e.validateOptionalType)("Variance")}}),r("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,e.validate)((0,e.arrayOfType)("TypeParameter"))}}),r("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("Variance",{builder:["kind"],fields:{kind:(0,e.validate)((0,e.assertOneOf)("minus","plus"))}}),r("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,e.validateType)("Identifier"),body:(0,e.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}}),r("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,e.validate)((0,e.assertValueType)("boolean")),members:(0,e.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,e.validate)((0,e.assertValueType)("boolean")),members:(0,e.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,e.validate)((0,e.assertValueType)("boolean")),members:(0,e.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,e.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,e.validateType)("Identifier"),init:(0,e.validateType)("BooleanLiteral")}}),r("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,e.validateType)("Identifier"),init:(0,e.validateType)("NumericLiteral")}}),r("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,e.validateType)("Identifier"),init:(0,e.validateType)("StringLiteral")}}),r("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,e.validateType)("Identifier")}}),r("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,e.validateType)("FlowType"),indexType:(0,e.validateType)("FlowType")}}),r("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,e.validateType)("FlowType"),indexType:(0,e.validateType)("FlowType"),optional:(0,e.validate)((0,e.assertValueType)("boolean"))}}),Ji}var Wi={},Hi;function Qd(){if(Hi)return Wi;Hi=1;var t=Se();const e=(0,t.defineAliasedType)("JSX");return e("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,t.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,t.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),e("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,t.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),e("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,t.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,t.assertNodeType)("JSXClosingElement")},children:(0,t.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,t.assertValueType)("boolean"),optional:!0}})}),e("JSXEmptyExpression",{}),e("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,t.assertNodeType)("Expression","JSXEmptyExpression")}}}),e("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}}}),e("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,t.assertValueType)("string")}}}),e("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,t.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,t.assertNodeType)("JSXIdentifier")}}}),e("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,t.assertNodeType)("JSXIdentifier")},name:{validate:(0,t.assertNodeType)("JSXIdentifier")}}}),e("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,t.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,t.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,t.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,t.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),e("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,t.assertNodeType)("Expression")}}}),e("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,t.assertValueType)("string")}}}),e("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,t.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,t.assertNodeType)("JSXClosingFragment")},children:(0,t.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),e("JSXOpeningFragment",{aliases:["Immutable"]}),e("JSXClosingFragment",{aliases:["Immutable"]}),Wi}var zi={},xe={},Gi;function Qi(){if(Gi)return xe;Gi=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.PLACEHOLDERS_FLIPPED_ALIAS=xe.PLACEHOLDERS_ALIAS=xe.PLACEHOLDERS=void 0;var t=Se();const e=xe.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],r=xe.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const i of e){const a=t.ALIAS_KEYS[i];a!=null&&a.length&&(r[i]=a)}const s=xe.PLACEHOLDERS_FLIPPED_ALIAS={};return Object.keys(r).forEach(i=>{r[i].forEach(a=>{hasOwnProperty.call(s,a)||(s[a]=[]),s[a].push(i)})}),xe}var Zi;function Zd(){if(Zi)return zi;Zi=1;var t=Se(),e=Qi(),r=Kt();const s=(0,t.defineAliasedType)("Miscellaneous");return s("Noop",{visitor:[]}),s("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,t.assertNodeType)("Identifier")},expectedNode:{validate:(0,t.assertOneOf)(...e.PLACEHOLDERS)}},(0,r.patternLikeCommon)())}),s("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,t.assertValueType)("string")}}}),zi}var ea={},ta;function eh(){if(ta)return ea;ta=1;var t=Se();return(0,t.default)("ArgumentPlaceholder",{}),(0,t.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,t.assertNodeType)("Expression")},callee:{validate:(0,t.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}}),(0,t.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}}}),(0,t.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,t.assertNodeType)("BlockStatement")},async:{validate:(0,t.assertValueType)("boolean"),default:!1}}}),(0,t.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,t.assertNodeType)("Identifier")}}}),(0,t.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,t.validateArrayOfType)("ObjectProperty","SpreadElement")}}),(0,t.default)("TupleExpression",{fields:{elements:{validate:(0,t.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,t.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,t.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,t.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,t.assertNodeType)("Program")}},aliases:["Expression"]}),(0,t.default)("TopicReference",{aliases:["Expression"]}),(0,t.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]}),(0,t.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]}),ea}var ra={},sa;function th(){if(sa)return ra;sa=1;var t=Se(),e=Kt(),r=nt();const s=(0,t.defineAliasedType)("TypeScript"),i=(0,t.assertValueType)("boolean"),a=()=>({returnType:{validate:(0,t.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,t.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});s("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,t.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,t.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,t.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,t.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,t.arrayOfType)("Decorator"),optional:!0}}}),s("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,e.functionDeclarationCommon)(),a())}),s("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,e.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,e.classMethodOrDeclareMethodCommon)(),a())})),s("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,t.validateType)("TSEntityName"),right:(0,t.validateType)("Identifier")}});const n=()=>({typeParameters:(0,t.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,t.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation")}),o={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:n()};s("TSCallSignatureDeclaration",o),s("TSConstructSignatureDeclaration",o);const u=()=>({key:(0,t.validateType)("Expression"),computed:{default:!1},optional:(0,t.validateOptional)(i)});s("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},u(),{readonly:(0,t.validateOptional)(i),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,t.assertOneOf)("get","set")}})}),s("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},n(),u(),{kind:{validate:(0,t.assertOneOf)("method","get","set")}})}),s("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,t.validateOptional)(i),static:(0,t.validateOptional)(i),parameters:(0,t.validateArrayOfType)("Identifier"),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation")}});const p=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const g of p)s(g,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});s("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const y={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};s("TSFunctionType",Object.assign({},y,{fields:n()})),s("TSConstructorType",Object.assign({},y,{fields:Object.assign({},n(),{abstract:(0,t.validateOptional)(i)})})),s("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,t.validateType)("TSEntityName"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}}),s("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,t.validateType)("Identifier","TSThisType"),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation"),asserts:(0,t.validateOptional)(i)}}),s("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,t.validateType)("TSEntityName","TSImportType"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}}),s("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,t.validateArrayOfType)("TSTypeElement")}}),s("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,t.validateType)("TSType")}}),s("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,t.validateArrayOfType)("TSType","TSNamedTupleMember")}}),s("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,t.validateType)("TSType")}}),s("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,t.validateType)("TSType")}}),s("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,t.validateType)("Identifier"),optional:{validate:i,default:!1},elementType:(0,t.validateType)("TSType")}});const E={aliases:["TSType"],visitor:["types"],fields:{types:(0,t.validateArrayOfType)("TSType")}};s("TSUnionType",E),s("TSIntersectionType",E),s("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,t.validateType)("TSType"),extendsType:(0,t.validateType)("TSType"),trueType:(0,t.validateType)("TSType"),falseType:(0,t.validateType)("TSType")}}),s("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,t.validateType)("TSTypeParameter")}}),s("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,t.validateType)("TSType")}}),s("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,t.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,t.validateType)("TSType")}}),s("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,t.validateType)("TSType"),indexType:(0,t.validateType)("TSType")}}),s("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,t.validateType)("TSTypeParameter")},{readonly:(0,t.validateOptional)((0,t.assertOneOf)(!0,!1,"+","-")),optional:(0,t.validateOptional)((0,t.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,t.validateOptionalType)("TSType"),nameType:(0,t.validateOptionalType)("TSType")})}),s("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,t.validateArrayOfType)("TemplateElement"),types:{validate:(0,t.chain)((0,t.assertValueType)("array"),(0,t.assertEach)((0,t.assertNodeType)("TSType")),function(g,C,A){if(g.quasis.length!==A.length+1)throw new TypeError(`Number of ${g.type} quasis should be exactly one more than the number of types.
|
|
193
|
-
Expected ${A.length+1} quasis but got ${g.quasis.length}`)})}}}),s("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const g=(0,t.assertNodeType)("NumericLiteral","BigIntLiteral"),C=(0,t.assertOneOf)("-"),A=(0,t.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral"),O=function(N,B,K){(0,r.default)("UnaryExpression",K)?(C(K,"operator",K.operator),g(K,"argument",K.argument)):A(N,B,K)};return O.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],O}()}}}),s("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,t.validateType)("TSEntityName"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}}),s("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,t.validateOptional)(i),id:(0,t.validateType)("Identifier"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,t.validateOptional)((0,t.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,t.validateType)("TSInterfaceBody")}}),s("TSInterfaceBody",{visitor:["body"],fields:{body:(0,t.validateArrayOfType)("TSTypeElement")}}),s("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,t.validateOptional)(i),id:(0,t.validateType)("Identifier"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,t.validateType)("TSType")}}),s("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,t.validateType)("Expression"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}});const P={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,t.validateType)("Expression"),typeAnnotation:(0,t.validateType)("TSType")}};return s("TSAsExpression",P),s("TSSatisfiesExpression",P),s("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,t.validateType)("TSType"),expression:(0,t.validateType)("Expression")}}),s("TSEnumBody",{visitor:["members"],fields:{members:(0,t.validateArrayOfType)("TSEnumMember")}}),s("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,t.validateOptional)(i),const:(0,t.validateOptional)(i),id:(0,t.validateType)("Identifier"),members:(0,t.validateArrayOfType)("TSEnumMember"),initializer:(0,t.validateOptionalType)("Expression"),body:(0,t.validateOptionalType)("TSEnumBody")}}),s("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,t.validateType)("Identifier","StringLiteral"),initializer:(0,t.validateOptionalType)("Expression")}}),s("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,t.assertOneOf)("global","module","namespace")},declare:(0,t.validateOptional)(i)},{global:(0,t.validateOptional)(i)},{id:(0,t.validateType)("Identifier","StringLiteral"),body:(0,t.validateType)("TSModuleBlock","TSModuleDeclaration")})}),s("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,t.validateArrayOfType)("Statement")}}),s("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:{argument:(0,t.validateType)("StringLiteral"),qualifier:(0,t.validateOptionalType)("TSEntityName"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation"),options:{validate:(0,t.assertNodeType)("ObjectExpression"),optional:!0}}}),s("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,t.validate)(i)},{id:(0,t.validateType)("Identifier"),moduleReference:(0,t.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,t.assertOneOf)("type","value"),optional:!0}})}),s("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,t.validateType)("StringLiteral")}}),s("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,t.validateType)("Expression")}}),s("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,t.validateType)("Expression")}}),s("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,t.validateType)("Identifier")}}),s("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,t.assertNodeType)("TSType")}}}),s("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,t.validateArrayOfType)("TSType")}}),s("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,t.validateArrayOfType)("TSTypeParameter")}}),s("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,t.assertValueType)("string")},in:{validate:(0,t.assertValueType)("boolean"),optional:!0},out:{validate:(0,t.assertValueType)("boolean"),optional:!0},const:{validate:(0,t.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,t.assertNodeType)("TSType"),optional:!0},default:{validate:(0,t.assertNodeType)("TSType"),optional:!0}}}),ra}var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.DEPRECATED_ALIASES=void 0,Ut.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"};var ia;function ce(){return ia||(ia=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ALIAS_KEYS",{enumerable:!0,get:function(){return e.ALIAS_KEYS}}),Object.defineProperty(t,"BUILDER_KEYS",{enumerable:!0,get:function(){return e.BUILDER_KEYS}}),Object.defineProperty(t,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return s.DEPRECATED_ALIASES}}),Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return e.DEPRECATED_KEYS}}),Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return e.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(t,"NODE_FIELDS",{enumerable:!0,get:function(){return e.NODE_FIELDS}}),Object.defineProperty(t,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return e.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(t,"NODE_UNION_SHAPES__PRIVATE",{enumerable:!0,get:function(){return e.NODE_UNION_SHAPES__PRIVATE}}),Object.defineProperty(t,"PLACEHOLDERS",{enumerable:!0,get:function(){return r.PLACEHOLDERS}}),Object.defineProperty(t,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return r.PLACEHOLDERS_ALIAS}}),Object.defineProperty(t,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return r.PLACEHOLDERS_FLIPPED_ALIAS}}),t.TYPES=void 0,Object.defineProperty(t,"VISITOR_KEYS",{enumerable:!0,get:function(){return e.VISITOR_KEYS}}),Kt(),Gd(),Qd(),Zd(),eh(),th();var e=Se(),r=Qi(),s=Ut;Object.keys(s.DEPRECATED_ALIASES).forEach(i=>{e.FLIPPED_ALIAS_KEYS[i]=e.FLIPPED_ALIAS_KEYS[s.DEPRECATED_ALIASES[i]]});for(const{types:i,set:a}of e.allExpandedTypes)for(const n of i){const o=e.FLIPPED_ALIAS_KEYS[n];o?o.forEach(a.add,a):a.add(n)}t.TYPES=[].concat(Object.keys(e.VISITOR_KEYS),Object.keys(e.FLIPPED_ALIAS_KEYS),Object.keys(e.DEPRECATED_KEYS))}(jr)),jr}var aa;function Jr(){if(aa)return ke;aa=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.default=e,ke.validateChild=i,ke.validateField=s,ke.validateInternal=r;var t=ce();function e(a,n,o){if(!a)return;const u=t.NODE_FIELDS[a.type];if(!u)return;const p=u[n];s(a,n,o,p),i(a,n,o)}function r(a,n,o,u,p){if(a!=null&&a.validate&&!(a.optional&&u==null)&&(a.validate(n,o,u),p)){var y;const E=u.type;if(E==null)return;(y=t.NODE_PARENT_VALIDATIONS[E])==null||y.call(t.NODE_PARENT_VALIDATIONS,n,o,u)}}function s(a,n,o,u){u!=null&&u.validate&&(u.optional&&o==null||u.validate(a,n,o))}function i(a,n,o){var u;const p=o==null?void 0:o.type;p!=null&&((u=t.NODE_PARENT_VALIDATIONS[p])==null||u.call(t.NODE_PARENT_VALIDATIONS,a,n,o))}return ke}Object.defineProperty(f,"__esModule",{value:!0}),f.anyTypeAnnotation=_y,f.argumentPlaceholder=cT,f.arrayExpression=ah,f.arrayPattern=ey,f.arrayTypeAnnotation=By,f.arrowFunctionExpression=ty,f.assignmentExpression=nh,f.assignmentPattern=Zh,f.awaitExpression=gy,f.bigIntLiteral=ih,f.binaryExpression=oh,f.bindExpression=pT,f.blockStatement=ph,f.booleanLiteral=Dh,f.booleanLiteralTypeAnnotation=Ry,f.booleanTypeAnnotation=Fy,f.breakStatement=fh,f.callExpression=dh,f.catchClause=hh,f.classAccessorProperty=wy,f.classBody=ry,f.classDeclaration=iy,f.classExpression=sy,f.classImplements=Ky,f.classMethod=my,f.classPrivateMethod=Dy,f.classPrivateProperty=Oy,f.classProperty=Cy,f.conditionalExpression=yh,f.continueStatement=mh,f.debuggerStatement=Th,f.decimalLiteral=TT,f.declareClass=Uy,f.declareExportAllDeclaration=zy,f.declareExportDeclaration=Hy,f.declareFunction=Vy,f.declareInterface=$y,f.declareModule=Yy,f.declareModuleExports=Xy,f.declareOpaqueType=qy,f.declareTypeAlias=Jy,f.declareVariable=Wy,f.declaredPredicate=Gy,f.decorator=fT,f.directive=uh,f.directiveLiteral=ch,f.doExpression=dT,f.doWhileStatement=Sh,f.emptyStatement=xh,f.emptyTypeAnnotation=lm,f.enumBooleanBody=Bm,f.enumBooleanMember=Km,f.enumDeclaration=_m,f.enumDefaultedMember=$m,f.enumNumberBody=Fm,f.enumNumberMember=Um,f.enumStringBody=Rm,f.enumStringMember=Vm,f.enumSymbolBody=jm,f.existsTypeAnnotation=Qy,f.exportAllDeclaration=ay,f.exportDefaultDeclaration=ny,f.exportDefaultSpecifier=hT,f.exportNamedDeclaration=oy,f.exportNamespaceSpecifier=Iy,f.exportSpecifier=ly,f.expressionStatement=bh,f.file=Eh,f.forInStatement=Ph,f.forOfStatement=uy,f.forStatement=gh,f.functionDeclaration=Ah,f.functionExpression=Ih,f.functionTypeAnnotation=Zy,f.functionTypeParam=em,f.genericTypeAnnotation=tm,f.identifier=vh,f.ifStatement=Nh,f.import=Ay,f.importAttribute=My,f.importDeclaration=cy,f.importDefaultSpecifier=py,f.importExpression=hy,f.importNamespaceSpecifier=fy,f.importSpecifier=dy,f.indexedAccessType=Ym,f.inferredPredicate=rm,f.interfaceDeclaration=im,f.interfaceExtends=sm,f.interfaceTypeAnnotation=am,f.interpreterDirective=lh,f.intersectionTypeAnnotation=nm,f.jSXAttribute=f.jsxAttribute=Jm,f.jSXClosingElement=f.jsxClosingElement=qm,f.jSXClosingFragment=f.jsxClosingFragment=nT,f.jSXElement=f.jsxElement=Wm,f.jSXEmptyExpression=f.jsxEmptyExpression=Hm,f.jSXExpressionContainer=f.jsxExpressionContainer=zm,f.jSXFragment=f.jsxFragment=iT,f.jSXIdentifier=f.jsxIdentifier=Qm,f.jSXMemberExpression=f.jsxMemberExpression=Zm,f.jSXNamespacedName=f.jsxNamespacedName=eT,f.jSXOpeningElement=f.jsxOpeningElement=tT,f.jSXOpeningFragment=f.jsxOpeningFragment=aT,f.jSXSpreadAttribute=f.jsxSpreadAttribute=rT,f.jSXSpreadChild=f.jsxSpreadChild=Gm,f.jSXText=f.jsxText=sT,f.labeledStatement=Ch,f.logicalExpression=Lh,f.memberExpression=kh,f.metaProperty=yy,f.mixedTypeAnnotation=om,f.moduleExpression=ST,f.newExpression=Mh,f.noop=oT,f.nullLiteral=Oh,f.nullLiteralTypeAnnotation=jy,f.nullableTypeAnnotation=um,f.numberLiteral=FS,f.numberLiteralTypeAnnotation=cm,f.numberTypeAnnotation=pm,f.numericLiteral=na,f.objectExpression=Bh,f.objectMethod=Fh,f.objectPattern=Ty,f.objectProperty=Rh,f.objectTypeAnnotation=fm,f.objectTypeCallProperty=hm,f.objectTypeIndexer=ym,f.objectTypeInternalSlot=dm,f.objectTypeProperty=mm,f.objectTypeSpreadProperty=Tm,f.opaqueType=Sm,f.optionalCallExpression=Ny,f.optionalIndexedAccessType=Xm,f.optionalMemberExpression=vy,f.parenthesizedExpression=Uh,f.pipelineBareFunction=ET,f.pipelinePrimaryTopicReference=PT,f.pipelineTopicExpression=bT,f.placeholder=lT,f.privateName=Ly,f.program=_h,f.qualifiedTypeIdentifier=xm,f.recordExpression=yT,f.regExpLiteral=oa,f.regexLiteral=RS,f.restElement=la,f.restProperty=jS,f.returnStatement=jh,f.sequenceExpression=Kh,f.spreadElement=ua,f.spreadProperty=KS,f.staticBlock=ky,f.stringLiteral=wh,f.stringLiteralTypeAnnotation=bm,f.stringTypeAnnotation=Em,f.super=Sy,f.switchCase=Vh,f.switchStatement=$h,f.symbolTypeAnnotation=Pm,f.taggedTemplateExpression=xy,f.templateElement=by,f.templateLiteral=Ey,f.thisExpression=Yh,f.thisTypeAnnotation=gm,f.throwStatement=Xh,f.topicReference=xT,f.tryStatement=Jh,f.tSAnyKeyword=f.tsAnyKeyword=kT,f.tSArrayType=f.tsArrayType=ZT,f.tSAsExpression=f.tsAsExpression=xS,f.tSBigIntKeyword=f.tsBigIntKeyword=_T,f.tSBooleanKeyword=f.tsBooleanKeyword=MT,f.tSCallSignatureDeclaration=f.tsCallSignatureDeclaration=CT,f.tSConditionalType=f.tsConditionalType=nS,f.tSConstructSignatureDeclaration=f.tsConstructSignatureDeclaration=wT,f.tSConstructorType=f.tsConstructorType=WT,f.tSDeclareFunction=f.tsDeclareFunction=IT,f.tSDeclareMethod=f.tsDeclareMethod=vT,f.tSEnumBody=f.tsEnumBody=PS,f.tSEnumDeclaration=f.tsEnumDeclaration=gS,f.tSEnumMember=f.tsEnumMember=AS,f.tSExportAssignment=f.tsExportAssignment=DS,f.tSExpressionWithTypeArguments=f.tsExpressionWithTypeArguments=hS,f.tSExternalModuleReference=f.tsExternalModuleReference=wS,f.tSFunctionType=f.tsFunctionType=qT,f.tSImportEqualsDeclaration=f.tsImportEqualsDeclaration=CS,f.tSImportType=f.tsImportType=NS,f.tSIndexSignature=f.tsIndexSignature=LT,f.tSIndexedAccessType=f.tsIndexedAccessType=cS,f.tSInferType=f.tsInferType=oS,f.tSInstantiationExpression=f.tsInstantiationExpression=SS,f.tSInterfaceBody=f.tsInterfaceBody=mS,f.tSInterfaceDeclaration=f.tsInterfaceDeclaration=yS,f.tSIntersectionType=f.tsIntersectionType=aS,f.tSIntrinsicKeyword=f.tsIntrinsicKeyword=BT,f.tSLiteralType=f.tsLiteralType=dS,f.tSMappedType=f.tsMappedType=pS,f.tSMethodSignature=f.tsMethodSignature=DT,f.tSModuleBlock=f.tsModuleBlock=vS,f.tSModuleDeclaration=f.tsModuleDeclaration=IS,f.tSNamedTupleMember=f.tsNamedTupleMember=sS,f.tSNamespaceExportDeclaration=f.tsNamespaceExportDeclaration=LS,f.tSNeverKeyword=f.tsNeverKeyword=FT,f.tSNonNullExpression=f.tsNonNullExpression=OS,f.tSNullKeyword=f.tsNullKeyword=RT,f.tSNumberKeyword=f.tsNumberKeyword=jT,f.tSObjectKeyword=f.tsObjectKeyword=KT,f.tSOptionalType=f.tsOptionalType=tS,f.tSParameterProperty=f.tsParameterProperty=AT,f.tSParenthesizedType=f.tsParenthesizedType=lS,f.tSPropertySignature=f.tsPropertySignature=OT,f.tSQualifiedName=f.tsQualifiedName=NT,f.tSRestType=f.tsRestType=rS,f.tSSatisfiesExpression=f.tsSatisfiesExpression=bS,f.tSStringKeyword=f.tsStringKeyword=UT,f.tSSymbolKeyword=f.tsSymbolKeyword=VT,f.tSTemplateLiteralType=f.tsTemplateLiteralType=fS,f.tSThisType=f.tsThisType=JT,f.tSTupleType=f.tsTupleType=eS,f.tSTypeAliasDeclaration=f.tsTypeAliasDeclaration=TS,f.tSTypeAnnotation=f.tsTypeAnnotation=kS,f.tSTypeAssertion=f.tsTypeAssertion=ES,f.tSTypeLiteral=f.tsTypeLiteral=QT,f.tSTypeOperator=f.tsTypeOperator=uS,f.tSTypeParameter=f.tsTypeParameter=BS,f.tSTypeParameterDeclaration=f.tsTypeParameterDeclaration=_S,f.tSTypeParameterInstantiation=f.tsTypeParameterInstantiation=MS,f.tSTypePredicate=f.tsTypePredicate=zT,f.tSTypeQuery=f.tsTypeQuery=GT,f.tSTypeReference=f.tsTypeReference=HT,f.tSUndefinedKeyword=f.tsUndefinedKeyword=$T,f.tSUnionType=f.tsUnionType=iS,f.tSUnknownKeyword=f.tsUnknownKeyword=YT,f.tSVoidKeyword=f.tsVoidKeyword=XT,f.tupleExpression=mT,f.tupleTypeAnnotation=Am,f.typeAlias=vm,f.typeAnnotation=Nm,f.typeCastExpression=Cm,f.typeParameter=wm,f.typeParameterDeclaration=Om,f.typeParameterInstantiation=Dm,f.typeofTypeAnnotation=Im,f.unaryExpression=qh,f.unionTypeAnnotation=Lm,f.updateExpression=Wh,f.v8IntrinsicIdentifier=uT,f.variableDeclaration=Hh,f.variableDeclarator=zh,f.variance=km,f.voidPattern=gT,f.voidTypeAnnotation=Mm,f.whileStatement=Gh,f.withStatement=Qh,f.yieldExpression=Py;var rh=Jr(),Vt=$e,sh=Se();const{validateInternal:c}=rh,{NODE_FIELDS:b}=sh;function ih(t){typeof t=="bigint"&&(t=t.toString());const e={type:"BigIntLiteral",value:t},r=b.BigIntLiteral;return c(r.value,e,"value",t),e}function ah(t=[]){const e={type:"ArrayExpression",elements:t},r=b.ArrayExpression;return c(r.elements,e,"elements",t,1),e}function nh(t,e,r){const s={type:"AssignmentExpression",operator:t,left:e,right:r},i=b.AssignmentExpression;return c(i.operator,s,"operator",t),c(i.left,s,"left",e,1),c(i.right,s,"right",r,1),s}function oh(t,e,r){const s={type:"BinaryExpression",operator:t,left:e,right:r},i=b.BinaryExpression;return c(i.operator,s,"operator",t),c(i.left,s,"left",e,1),c(i.right,s,"right",r,1),s}function lh(t){const e={type:"InterpreterDirective",value:t},r=b.InterpreterDirective;return c(r.value,e,"value",t),e}function uh(t){const e={type:"Directive",value:t},r=b.Directive;return c(r.value,e,"value",t,1),e}function ch(t){const e={type:"DirectiveLiteral",value:t},r=b.DirectiveLiteral;return c(r.value,e,"value",t),e}function ph(t,e=[]){const r={type:"BlockStatement",body:t,directives:e},s=b.BlockStatement;return c(s.body,r,"body",t,1),c(s.directives,r,"directives",e,1),r}function fh(t=null){const e={type:"BreakStatement",label:t},r=b.BreakStatement;return c(r.label,e,"label",t,1),e}function dh(t,e){const r={type:"CallExpression",callee:t,arguments:e},s=b.CallExpression;return c(s.callee,r,"callee",t,1),c(s.arguments,r,"arguments",e,1),r}function hh(t=null,e){const r={type:"CatchClause",param:t,body:e},s=b.CatchClause;return c(s.param,r,"param",t,1),c(s.body,r,"body",e,1),r}function yh(t,e,r){const s={type:"ConditionalExpression",test:t,consequent:e,alternate:r},i=b.ConditionalExpression;return c(i.test,s,"test",t,1),c(i.consequent,s,"consequent",e,1),c(i.alternate,s,"alternate",r,1),s}function mh(t=null){const e={type:"ContinueStatement",label:t},r=b.ContinueStatement;return c(r.label,e,"label",t,1),e}function Th(){return{type:"DebuggerStatement"}}function Sh(t,e){const r={type:"DoWhileStatement",test:t,body:e},s=b.DoWhileStatement;return c(s.test,r,"test",t,1),c(s.body,r,"body",e,1),r}function xh(){return{type:"EmptyStatement"}}function bh(t){const e={type:"ExpressionStatement",expression:t},r=b.ExpressionStatement;return c(r.expression,e,"expression",t,1),e}function Eh(t,e=null,r=null){const s={type:"File",program:t,comments:e,tokens:r},i=b.File;return c(i.program,s,"program",t,1),c(i.comments,s,"comments",e,1),c(i.tokens,s,"tokens",r),s}function Ph(t,e,r){const s={type:"ForInStatement",left:t,right:e,body:r},i=b.ForInStatement;return c(i.left,s,"left",t,1),c(i.right,s,"right",e,1),c(i.body,s,"body",r,1),s}function gh(t=null,e=null,r=null,s){const i={type:"ForStatement",init:t,test:e,update:r,body:s},a=b.ForStatement;return c(a.init,i,"init",t,1),c(a.test,i,"test",e,1),c(a.update,i,"update",r,1),c(a.body,i,"body",s,1),i}function Ah(t=null,e,r,s=!1,i=!1){const a={type:"FunctionDeclaration",id:t,params:e,body:r,generator:s,async:i},n=b.FunctionDeclaration;return c(n.id,a,"id",t,1),c(n.params,a,"params",e,1),c(n.body,a,"body",r,1),c(n.generator,a,"generator",s),c(n.async,a,"async",i),a}function Ih(t=null,e,r,s=!1,i=!1){const a={type:"FunctionExpression",id:t,params:e,body:r,generator:s,async:i},n=b.FunctionExpression;return c(n.id,a,"id",t,1),c(n.params,a,"params",e,1),c(n.body,a,"body",r,1),c(n.generator,a,"generator",s),c(n.async,a,"async",i),a}function vh(t){const e={type:"Identifier",name:t},r=b.Identifier;return c(r.name,e,"name",t),e}function Nh(t,e,r=null){const s={type:"IfStatement",test:t,consequent:e,alternate:r},i=b.IfStatement;return c(i.test,s,"test",t,1),c(i.consequent,s,"consequent",e,1),c(i.alternate,s,"alternate",r,1),s}function Ch(t,e){const r={type:"LabeledStatement",label:t,body:e},s=b.LabeledStatement;return c(s.label,r,"label",t,1),c(s.body,r,"body",e,1),r}function wh(t){const e={type:"StringLiteral",value:t},r=b.StringLiteral;return c(r.value,e,"value",t),e}function na(t){const e={type:"NumericLiteral",value:t},r=b.NumericLiteral;return c(r.value,e,"value",t),e}function Oh(){return{type:"NullLiteral"}}function Dh(t){const e={type:"BooleanLiteral",value:t},r=b.BooleanLiteral;return c(r.value,e,"value",t),e}function oa(t,e=""){const r={type:"RegExpLiteral",pattern:t,flags:e},s=b.RegExpLiteral;return c(s.pattern,r,"pattern",t),c(s.flags,r,"flags",e),r}function Lh(t,e,r){const s={type:"LogicalExpression",operator:t,left:e,right:r},i=b.LogicalExpression;return c(i.operator,s,"operator",t),c(i.left,s,"left",e,1),c(i.right,s,"right",r,1),s}function kh(t,e,r=!1,s=null){const i={type:"MemberExpression",object:t,property:e,computed:r,optional:s},a=b.MemberExpression;return c(a.object,i,"object",t,1),c(a.property,i,"property",e,1),c(a.computed,i,"computed",r),c(a.optional,i,"optional",s),i}function Mh(t,e){const r={type:"NewExpression",callee:t,arguments:e},s=b.NewExpression;return c(s.callee,r,"callee",t,1),c(s.arguments,r,"arguments",e,1),r}function _h(t,e=[],r="script",s=null){const i={type:"Program",body:t,directives:e,sourceType:r,interpreter:s},a=b.Program;return c(a.body,i,"body",t,1),c(a.directives,i,"directives",e,1),c(a.sourceType,i,"sourceType",r),c(a.interpreter,i,"interpreter",s,1),i}function Bh(t){const e={type:"ObjectExpression",properties:t},r=b.ObjectExpression;return c(r.properties,e,"properties",t,1),e}function Fh(t="method",e,r,s,i=!1,a=!1,n=!1){const o={type:"ObjectMethod",kind:t,key:e,params:r,body:s,computed:i,generator:a,async:n},u=b.ObjectMethod;return c(u.kind,o,"kind",t),c(u.key,o,"key",e,1),c(u.params,o,"params",r,1),c(u.body,o,"body",s,1),c(u.computed,o,"computed",i),c(u.generator,o,"generator",a),c(u.async,o,"async",n),o}function Rh(t,e,r=!1,s=!1,i=null){const a={type:"ObjectProperty",key:t,value:e,computed:r,shorthand:s,decorators:i},n=b.ObjectProperty;return c(n.key,a,"key",t,1),c(n.value,a,"value",e,1),c(n.computed,a,"computed",r),c(n.shorthand,a,"shorthand",s),c(n.decorators,a,"decorators",i,1),a}function la(t){const e={type:"RestElement",argument:t},r=b.RestElement;return c(r.argument,e,"argument",t,1),e}function jh(t=null){const e={type:"ReturnStatement",argument:t},r=b.ReturnStatement;return c(r.argument,e,"argument",t,1),e}function Kh(t){const e={type:"SequenceExpression",expressions:t},r=b.SequenceExpression;return c(r.expressions,e,"expressions",t,1),e}function Uh(t){const e={type:"ParenthesizedExpression",expression:t},r=b.ParenthesizedExpression;return c(r.expression,e,"expression",t,1),e}function Vh(t=null,e){const r={type:"SwitchCase",test:t,consequent:e},s=b.SwitchCase;return c(s.test,r,"test",t,1),c(s.consequent,r,"consequent",e,1),r}function $h(t,e){const r={type:"SwitchStatement",discriminant:t,cases:e},s=b.SwitchStatement;return c(s.discriminant,r,"discriminant",t,1),c(s.cases,r,"cases",e,1),r}function Yh(){return{type:"ThisExpression"}}function Xh(t){const e={type:"ThrowStatement",argument:t},r=b.ThrowStatement;return c(r.argument,e,"argument",t,1),e}function Jh(t,e=null,r=null){const s={type:"TryStatement",block:t,handler:e,finalizer:r},i=b.TryStatement;return c(i.block,s,"block",t,1),c(i.handler,s,"handler",e,1),c(i.finalizer,s,"finalizer",r,1),s}function qh(t,e,r=!0){const s={type:"UnaryExpression",operator:t,argument:e,prefix:r},i=b.UnaryExpression;return c(i.operator,s,"operator",t),c(i.argument,s,"argument",e,1),c(i.prefix,s,"prefix",r),s}function Wh(t,e,r=!1){const s={type:"UpdateExpression",operator:t,argument:e,prefix:r},i=b.UpdateExpression;return c(i.operator,s,"operator",t),c(i.argument,s,"argument",e,1),c(i.prefix,s,"prefix",r),s}function Hh(t,e){const r={type:"VariableDeclaration",kind:t,declarations:e},s=b.VariableDeclaration;return c(s.kind,r,"kind",t),c(s.declarations,r,"declarations",e,1),r}function zh(t,e=null){const r={type:"VariableDeclarator",id:t,init:e},s=b.VariableDeclarator;return c(s.id,r,"id",t,1),c(s.init,r,"init",e,1),r}function Gh(t,e){const r={type:"WhileStatement",test:t,body:e},s=b.WhileStatement;return c(s.test,r,"test",t,1),c(s.body,r,"body",e,1),r}function Qh(t,e){const r={type:"WithStatement",object:t,body:e},s=b.WithStatement;return c(s.object,r,"object",t,1),c(s.body,r,"body",e,1),r}function Zh(t,e){const r={type:"AssignmentPattern",left:t,right:e},s=b.AssignmentPattern;return c(s.left,r,"left",t,1),c(s.right,r,"right",e,1),r}function ey(t){const e={type:"ArrayPattern",elements:t},r=b.ArrayPattern;return c(r.elements,e,"elements",t,1),e}function ty(t,e,r=!1){const s={type:"ArrowFunctionExpression",params:t,body:e,async:r,expression:null},i=b.ArrowFunctionExpression;return c(i.params,s,"params",t,1),c(i.body,s,"body",e,1),c(i.async,s,"async",r),s}function ry(t){const e={type:"ClassBody",body:t},r=b.ClassBody;return c(r.body,e,"body",t,1),e}function sy(t=null,e=null,r,s=null){const i={type:"ClassExpression",id:t,superClass:e,body:r,decorators:s},a=b.ClassExpression;return c(a.id,i,"id",t,1),c(a.superClass,i,"superClass",e,1),c(a.body,i,"body",r,1),c(a.decorators,i,"decorators",s,1),i}function iy(t=null,e=null,r,s=null){const i={type:"ClassDeclaration",id:t,superClass:e,body:r,decorators:s},a=b.ClassDeclaration;return c(a.id,i,"id",t,1),c(a.superClass,i,"superClass",e,1),c(a.body,i,"body",r,1),c(a.decorators,i,"decorators",s,1),i}function ay(t){const e={type:"ExportAllDeclaration",source:t},r=b.ExportAllDeclaration;return c(r.source,e,"source",t,1),e}function ny(t){const e={type:"ExportDefaultDeclaration",declaration:t},r=b.ExportDefaultDeclaration;return c(r.declaration,e,"declaration",t,1),e}function oy(t=null,e=[],r=null){const s={type:"ExportNamedDeclaration",declaration:t,specifiers:e,source:r},i=b.ExportNamedDeclaration;return c(i.declaration,s,"declaration",t,1),c(i.specifiers,s,"specifiers",e,1),c(i.source,s,"source",r,1),s}function ly(t,e){const r={type:"ExportSpecifier",local:t,exported:e},s=b.ExportSpecifier;return c(s.local,r,"local",t,1),c(s.exported,r,"exported",e,1),r}function uy(t,e,r,s=!1){const i={type:"ForOfStatement",left:t,right:e,body:r,await:s},a=b.ForOfStatement;return c(a.left,i,"left",t,1),c(a.right,i,"right",e,1),c(a.body,i,"body",r,1),c(a.await,i,"await",s),i}function cy(t,e){const r={type:"ImportDeclaration",specifiers:t,source:e},s=b.ImportDeclaration;return c(s.specifiers,r,"specifiers",t,1),c(s.source,r,"source",e,1),r}function py(t){const e={type:"ImportDefaultSpecifier",local:t},r=b.ImportDefaultSpecifier;return c(r.local,e,"local",t,1),e}function fy(t){const e={type:"ImportNamespaceSpecifier",local:t},r=b.ImportNamespaceSpecifier;return c(r.local,e,"local",t,1),e}function dy(t,e){const r={type:"ImportSpecifier",local:t,imported:e},s=b.ImportSpecifier;return c(s.local,r,"local",t,1),c(s.imported,r,"imported",e,1),r}function hy(t,e=null){const r={type:"ImportExpression",source:t,options:e},s=b.ImportExpression;return c(s.source,r,"source",t,1),c(s.options,r,"options",e,1),r}function yy(t,e){const r={type:"MetaProperty",meta:t,property:e},s=b.MetaProperty;return c(s.meta,r,"meta",t,1),c(s.property,r,"property",e,1),r}function my(t="method",e,r,s,i=!1,a=!1,n=!1,o=!1){const u={type:"ClassMethod",kind:t,key:e,params:r,body:s,computed:i,static:a,generator:n,async:o},p=b.ClassMethod;return c(p.kind,u,"kind",t),c(p.key,u,"key",e,1),c(p.params,u,"params",r,1),c(p.body,u,"body",s,1),c(p.computed,u,"computed",i),c(p.static,u,"static",a),c(p.generator,u,"generator",n),c(p.async,u,"async",o),u}function Ty(t){const e={type:"ObjectPattern",properties:t},r=b.ObjectPattern;return c(r.properties,e,"properties",t,1),e}function ua(t){const e={type:"SpreadElement",argument:t},r=b.SpreadElement;return c(r.argument,e,"argument",t,1),e}function Sy(){return{type:"Super"}}function xy(t,e){const r={type:"TaggedTemplateExpression",tag:t,quasi:e},s=b.TaggedTemplateExpression;return c(s.tag,r,"tag",t,1),c(s.quasi,r,"quasi",e,1),r}function by(t,e=!1){const r={type:"TemplateElement",value:t,tail:e},s=b.TemplateElement;return c(s.value,r,"value",t),c(s.tail,r,"tail",e),r}function Ey(t,e){const r={type:"TemplateLiteral",quasis:t,expressions:e},s=b.TemplateLiteral;return c(s.quasis,r,"quasis",t,1),c(s.expressions,r,"expressions",e,1),r}function Py(t=null,e=!1){const r={type:"YieldExpression",argument:t,delegate:e},s=b.YieldExpression;return c(s.argument,r,"argument",t,1),c(s.delegate,r,"delegate",e),r}function gy(t){const e={type:"AwaitExpression",argument:t},r=b.AwaitExpression;return c(r.argument,e,"argument",t,1),e}function Ay(){return{type:"Import"}}function Iy(t){const e={type:"ExportNamespaceSpecifier",exported:t},r=b.ExportNamespaceSpecifier;return c(r.exported,e,"exported",t,1),e}function vy(t,e,r=!1,s){const i={type:"OptionalMemberExpression",object:t,property:e,computed:r,optional:s},a=b.OptionalMemberExpression;return c(a.object,i,"object",t,1),c(a.property,i,"property",e,1),c(a.computed,i,"computed",r),c(a.optional,i,"optional",s),i}function Ny(t,e,r){const s={type:"OptionalCallExpression",callee:t,arguments:e,optional:r},i=b.OptionalCallExpression;return c(i.callee,s,"callee",t,1),c(i.arguments,s,"arguments",e,1),c(i.optional,s,"optional",r),s}function Cy(t,e=null,r=null,s=null,i=!1,a=!1){const n={type:"ClassProperty",key:t,value:e,typeAnnotation:r,decorators:s,computed:i,static:a},o=b.ClassProperty;return c(o.key,n,"key",t,1),c(o.value,n,"value",e,1),c(o.typeAnnotation,n,"typeAnnotation",r,1),c(o.decorators,n,"decorators",s,1),c(o.computed,n,"computed",i),c(o.static,n,"static",a),n}function wy(t,e=null,r=null,s=null,i=!1,a=!1){const n={type:"ClassAccessorProperty",key:t,value:e,typeAnnotation:r,decorators:s,computed:i,static:a},o=b.ClassAccessorProperty;return c(o.key,n,"key",t,1),c(o.value,n,"value",e,1),c(o.typeAnnotation,n,"typeAnnotation",r,1),c(o.decorators,n,"decorators",s,1),c(o.computed,n,"computed",i),c(o.static,n,"static",a),n}function Oy(t,e=null,r=null,s=!1){const i={type:"ClassPrivateProperty",key:t,value:e,decorators:r,static:s},a=b.ClassPrivateProperty;return c(a.key,i,"key",t,1),c(a.value,i,"value",e,1),c(a.decorators,i,"decorators",r,1),c(a.static,i,"static",s),i}function Dy(t="method",e,r,s,i=!1){const a={type:"ClassPrivateMethod",kind:t,key:e,params:r,body:s,static:i},n=b.ClassPrivateMethod;return c(n.kind,a,"kind",t),c(n.key,a,"key",e,1),c(n.params,a,"params",r,1),c(n.body,a,"body",s,1),c(n.static,a,"static",i),a}function Ly(t){const e={type:"PrivateName",id:t},r=b.PrivateName;return c(r.id,e,"id",t,1),e}function ky(t){const e={type:"StaticBlock",body:t},r=b.StaticBlock;return c(r.body,e,"body",t,1),e}function My(t,e){const r={type:"ImportAttribute",key:t,value:e},s=b.ImportAttribute;return c(s.key,r,"key",t,1),c(s.value,r,"value",e,1),r}function _y(){return{type:"AnyTypeAnnotation"}}function By(t){const e={type:"ArrayTypeAnnotation",elementType:t},r=b.ArrayTypeAnnotation;return c(r.elementType,e,"elementType",t,1),e}function Fy(){return{type:"BooleanTypeAnnotation"}}function Ry(t){const e={type:"BooleanLiteralTypeAnnotation",value:t},r=b.BooleanLiteralTypeAnnotation;return c(r.value,e,"value",t),e}function jy(){return{type:"NullLiteralTypeAnnotation"}}function Ky(t,e=null){const r={type:"ClassImplements",id:t,typeParameters:e},s=b.ClassImplements;return c(s.id,r,"id",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function Uy(t,e=null,r=null,s){const i={type:"DeclareClass",id:t,typeParameters:e,extends:r,body:s},a=b.DeclareClass;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function Vy(t){const e={type:"DeclareFunction",id:t},r=b.DeclareFunction;return c(r.id,e,"id",t,1),e}function $y(t,e=null,r=null,s){const i={type:"DeclareInterface",id:t,typeParameters:e,extends:r,body:s},a=b.DeclareInterface;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function Yy(t,e,r=null){const s={type:"DeclareModule",id:t,body:e,kind:r},i=b.DeclareModule;return c(i.id,s,"id",t,1),c(i.body,s,"body",e,1),c(i.kind,s,"kind",r),s}function Xy(t){const e={type:"DeclareModuleExports",typeAnnotation:t},r=b.DeclareModuleExports;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function Jy(t,e=null,r){const s={type:"DeclareTypeAlias",id:t,typeParameters:e,right:r},i=b.DeclareTypeAlias;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.right,s,"right",r,1),s}function qy(t,e=null,r=null){const s={type:"DeclareOpaqueType",id:t,typeParameters:e,supertype:r},i=b.DeclareOpaqueType;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.supertype,s,"supertype",r,1),s}function Wy(t){const e={type:"DeclareVariable",id:t},r=b.DeclareVariable;return c(r.id,e,"id",t,1),e}function Hy(t=null,e=null,r=null,s=null){const i={type:"DeclareExportDeclaration",declaration:t,specifiers:e,source:r,attributes:s},a=b.DeclareExportDeclaration;return c(a.declaration,i,"declaration",t,1),c(a.specifiers,i,"specifiers",e,1),c(a.source,i,"source",r,1),c(a.attributes,i,"attributes",s,1),i}function zy(t,e=null){const r={type:"DeclareExportAllDeclaration",source:t,attributes:e},s=b.DeclareExportAllDeclaration;return c(s.source,r,"source",t,1),c(s.attributes,r,"attributes",e,1),r}function Gy(t){const e={type:"DeclaredPredicate",value:t},r=b.DeclaredPredicate;return c(r.value,e,"value",t,1),e}function Qy(){return{type:"ExistsTypeAnnotation"}}function Zy(t=null,e,r=null,s){const i={type:"FunctionTypeAnnotation",typeParameters:t,params:e,rest:r,returnType:s},a=b.FunctionTypeAnnotation;return c(a.typeParameters,i,"typeParameters",t,1),c(a.params,i,"params",e,1),c(a.rest,i,"rest",r,1),c(a.returnType,i,"returnType",s,1),i}function em(t=null,e){const r={type:"FunctionTypeParam",name:t,typeAnnotation:e},s=b.FunctionTypeParam;return c(s.name,r,"name",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function tm(t,e=null){const r={type:"GenericTypeAnnotation",id:t,typeParameters:e},s=b.GenericTypeAnnotation;return c(s.id,r,"id",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function rm(){return{type:"InferredPredicate"}}function sm(t,e=null){const r={type:"InterfaceExtends",id:t,typeParameters:e},s=b.InterfaceExtends;return c(s.id,r,"id",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function im(t,e=null,r=null,s){const i={type:"InterfaceDeclaration",id:t,typeParameters:e,extends:r,body:s},a=b.InterfaceDeclaration;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function am(t=null,e){const r={type:"InterfaceTypeAnnotation",extends:t,body:e},s=b.InterfaceTypeAnnotation;return c(s.extends,r,"extends",t,1),c(s.body,r,"body",e,1),r}function nm(t){const e={type:"IntersectionTypeAnnotation",types:t},r=b.IntersectionTypeAnnotation;return c(r.types,e,"types",t,1),e}function om(){return{type:"MixedTypeAnnotation"}}function lm(){return{type:"EmptyTypeAnnotation"}}function um(t){const e={type:"NullableTypeAnnotation",typeAnnotation:t},r=b.NullableTypeAnnotation;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function cm(t){const e={type:"NumberLiteralTypeAnnotation",value:t},r=b.NumberLiteralTypeAnnotation;return c(r.value,e,"value",t),e}function pm(){return{type:"NumberTypeAnnotation"}}function fm(t,e=[],r=[],s=[],i=!1){const a={type:"ObjectTypeAnnotation",properties:t,indexers:e,callProperties:r,internalSlots:s,exact:i},n=b.ObjectTypeAnnotation;return c(n.properties,a,"properties",t,1),c(n.indexers,a,"indexers",e,1),c(n.callProperties,a,"callProperties",r,1),c(n.internalSlots,a,"internalSlots",s,1),c(n.exact,a,"exact",i),a}function dm(t,e,r,s,i){const a={type:"ObjectTypeInternalSlot",id:t,value:e,optional:r,static:s,method:i},n=b.ObjectTypeInternalSlot;return c(n.id,a,"id",t,1),c(n.value,a,"value",e,1),c(n.optional,a,"optional",r),c(n.static,a,"static",s),c(n.method,a,"method",i),a}function hm(t){const e={type:"ObjectTypeCallProperty",value:t,static:null},r=b.ObjectTypeCallProperty;return c(r.value,e,"value",t,1),e}function ym(t=null,e,r,s=null){const i={type:"ObjectTypeIndexer",id:t,key:e,value:r,variance:s,static:null},a=b.ObjectTypeIndexer;return c(a.id,i,"id",t,1),c(a.key,i,"key",e,1),c(a.value,i,"value",r,1),c(a.variance,i,"variance",s,1),i}function mm(t,e,r=null){const s={type:"ObjectTypeProperty",key:t,value:e,variance:r,kind:null,method:null,optional:null,proto:null,static:null},i=b.ObjectTypeProperty;return c(i.key,s,"key",t,1),c(i.value,s,"value",e,1),c(i.variance,s,"variance",r,1),s}function Tm(t){const e={type:"ObjectTypeSpreadProperty",argument:t},r=b.ObjectTypeSpreadProperty;return c(r.argument,e,"argument",t,1),e}function Sm(t,e=null,r=null,s){const i={type:"OpaqueType",id:t,typeParameters:e,supertype:r,impltype:s},a=b.OpaqueType;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.supertype,i,"supertype",r,1),c(a.impltype,i,"impltype",s,1),i}function xm(t,e){const r={type:"QualifiedTypeIdentifier",id:t,qualification:e},s=b.QualifiedTypeIdentifier;return c(s.id,r,"id",t,1),c(s.qualification,r,"qualification",e,1),r}function bm(t){const e={type:"StringLiteralTypeAnnotation",value:t},r=b.StringLiteralTypeAnnotation;return c(r.value,e,"value",t),e}function Em(){return{type:"StringTypeAnnotation"}}function Pm(){return{type:"SymbolTypeAnnotation"}}function gm(){return{type:"ThisTypeAnnotation"}}function Am(t){const e={type:"TupleTypeAnnotation",types:t},r=b.TupleTypeAnnotation;return c(r.types,e,"types",t,1),e}function Im(t){const e={type:"TypeofTypeAnnotation",argument:t},r=b.TypeofTypeAnnotation;return c(r.argument,e,"argument",t,1),e}function vm(t,e=null,r){const s={type:"TypeAlias",id:t,typeParameters:e,right:r},i=b.TypeAlias;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.right,s,"right",r,1),s}function Nm(t){const e={type:"TypeAnnotation",typeAnnotation:t},r=b.TypeAnnotation;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function Cm(t,e){const r={type:"TypeCastExpression",expression:t,typeAnnotation:e},s=b.TypeCastExpression;return c(s.expression,r,"expression",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function wm(t=null,e=null,r=null){const s={type:"TypeParameter",bound:t,default:e,variance:r,name:null},i=b.TypeParameter;return c(i.bound,s,"bound",t,1),c(i.default,s,"default",e,1),c(i.variance,s,"variance",r,1),s}function Om(t){const e={type:"TypeParameterDeclaration",params:t},r=b.TypeParameterDeclaration;return c(r.params,e,"params",t,1),e}function Dm(t){const e={type:"TypeParameterInstantiation",params:t},r=b.TypeParameterInstantiation;return c(r.params,e,"params",t,1),e}function Lm(t){const e={type:"UnionTypeAnnotation",types:t},r=b.UnionTypeAnnotation;return c(r.types,e,"types",t,1),e}function km(t){const e={type:"Variance",kind:t},r=b.Variance;return c(r.kind,e,"kind",t),e}function Mm(){return{type:"VoidTypeAnnotation"}}function _m(t,e){const r={type:"EnumDeclaration",id:t,body:e},s=b.EnumDeclaration;return c(s.id,r,"id",t,1),c(s.body,r,"body",e,1),r}function Bm(t){const e={type:"EnumBooleanBody",members:t,explicitType:null,hasUnknownMembers:null},r=b.EnumBooleanBody;return c(r.members,e,"members",t,1),e}function Fm(t){const e={type:"EnumNumberBody",members:t,explicitType:null,hasUnknownMembers:null},r=b.EnumNumberBody;return c(r.members,e,"members",t,1),e}function Rm(t){const e={type:"EnumStringBody",members:t,explicitType:null,hasUnknownMembers:null},r=b.EnumStringBody;return c(r.members,e,"members",t,1),e}function jm(t){const e={type:"EnumSymbolBody",members:t,hasUnknownMembers:null},r=b.EnumSymbolBody;return c(r.members,e,"members",t,1),e}function Km(t){const e={type:"EnumBooleanMember",id:t,init:null},r=b.EnumBooleanMember;return c(r.id,e,"id",t,1),e}function Um(t,e){const r={type:"EnumNumberMember",id:t,init:e},s=b.EnumNumberMember;return c(s.id,r,"id",t,1),c(s.init,r,"init",e,1),r}function Vm(t,e){const r={type:"EnumStringMember",id:t,init:e},s=b.EnumStringMember;return c(s.id,r,"id",t,1),c(s.init,r,"init",e,1),r}function $m(t){const e={type:"EnumDefaultedMember",id:t},r=b.EnumDefaultedMember;return c(r.id,e,"id",t,1),e}function Ym(t,e){const r={type:"IndexedAccessType",objectType:t,indexType:e},s=b.IndexedAccessType;return c(s.objectType,r,"objectType",t,1),c(s.indexType,r,"indexType",e,1),r}function Xm(t,e){const r={type:"OptionalIndexedAccessType",objectType:t,indexType:e,optional:null},s=b.OptionalIndexedAccessType;return c(s.objectType,r,"objectType",t,1),c(s.indexType,r,"indexType",e,1),r}function Jm(t,e=null){const r={type:"JSXAttribute",name:t,value:e},s=b.JSXAttribute;return c(s.name,r,"name",t,1),c(s.value,r,"value",e,1),r}function qm(t){const e={type:"JSXClosingElement",name:t},r=b.JSXClosingElement;return c(r.name,e,"name",t,1),e}function Wm(t,e=null,r,s=null){const i={type:"JSXElement",openingElement:t,closingElement:e,children:r,selfClosing:s},a=b.JSXElement;return c(a.openingElement,i,"openingElement",t,1),c(a.closingElement,i,"closingElement",e,1),c(a.children,i,"children",r,1),c(a.selfClosing,i,"selfClosing",s),i}function Hm(){return{type:"JSXEmptyExpression"}}function zm(t){const e={type:"JSXExpressionContainer",expression:t},r=b.JSXExpressionContainer;return c(r.expression,e,"expression",t,1),e}function Gm(t){const e={type:"JSXSpreadChild",expression:t},r=b.JSXSpreadChild;return c(r.expression,e,"expression",t,1),e}function Qm(t){const e={type:"JSXIdentifier",name:t},r=b.JSXIdentifier;return c(r.name,e,"name",t),e}function Zm(t,e){const r={type:"JSXMemberExpression",object:t,property:e},s=b.JSXMemberExpression;return c(s.object,r,"object",t,1),c(s.property,r,"property",e,1),r}function eT(t,e){const r={type:"JSXNamespacedName",namespace:t,name:e},s=b.JSXNamespacedName;return c(s.namespace,r,"namespace",t,1),c(s.name,r,"name",e,1),r}function tT(t,e,r=!1){const s={type:"JSXOpeningElement",name:t,attributes:e,selfClosing:r},i=b.JSXOpeningElement;return c(i.name,s,"name",t,1),c(i.attributes,s,"attributes",e,1),c(i.selfClosing,s,"selfClosing",r),s}function rT(t){const e={type:"JSXSpreadAttribute",argument:t},r=b.JSXSpreadAttribute;return c(r.argument,e,"argument",t,1),e}function sT(t){const e={type:"JSXText",value:t},r=b.JSXText;return c(r.value,e,"value",t),e}function iT(t,e,r){const s={type:"JSXFragment",openingFragment:t,closingFragment:e,children:r},i=b.JSXFragment;return c(i.openingFragment,s,"openingFragment",t,1),c(i.closingFragment,s,"closingFragment",e,1),c(i.children,s,"children",r,1),s}function aT(){return{type:"JSXOpeningFragment"}}function nT(){return{type:"JSXClosingFragment"}}function oT(){return{type:"Noop"}}function lT(t,e){const r={type:"Placeholder",expectedNode:t,name:e},s=b.Placeholder;return c(s.expectedNode,r,"expectedNode",t),c(s.name,r,"name",e,1),r}function uT(t){const e={type:"V8IntrinsicIdentifier",name:t},r=b.V8IntrinsicIdentifier;return c(r.name,e,"name",t),e}function cT(){return{type:"ArgumentPlaceholder"}}function pT(t,e){const r={type:"BindExpression",object:t,callee:e},s=b.BindExpression;return c(s.object,r,"object",t,1),c(s.callee,r,"callee",e,1),r}function fT(t){const e={type:"Decorator",expression:t},r=b.Decorator;return c(r.expression,e,"expression",t,1),e}function dT(t,e=!1){const r={type:"DoExpression",body:t,async:e},s=b.DoExpression;return c(s.body,r,"body",t,1),c(s.async,r,"async",e),r}function hT(t){const e={type:"ExportDefaultSpecifier",exported:t},r=b.ExportDefaultSpecifier;return c(r.exported,e,"exported",t,1),e}function yT(t){const e={type:"RecordExpression",properties:t},r=b.RecordExpression;return c(r.properties,e,"properties",t,1),e}function mT(t=[]){const e={type:"TupleExpression",elements:t},r=b.TupleExpression;return c(r.elements,e,"elements",t,1),e}function TT(t){const e={type:"DecimalLiteral",value:t},r=b.DecimalLiteral;return c(r.value,e,"value",t),e}function ST(t){const e={type:"ModuleExpression",body:t},r=b.ModuleExpression;return c(r.body,e,"body",t,1),e}function xT(){return{type:"TopicReference"}}function bT(t){const e={type:"PipelineTopicExpression",expression:t},r=b.PipelineTopicExpression;return c(r.expression,e,"expression",t,1),e}function ET(t){const e={type:"PipelineBareFunction",callee:t},r=b.PipelineBareFunction;return c(r.callee,e,"callee",t,1),e}function PT(){return{type:"PipelinePrimaryTopicReference"}}function gT(){return{type:"VoidPattern"}}function AT(t){const e={type:"TSParameterProperty",parameter:t},r=b.TSParameterProperty;return c(r.parameter,e,"parameter",t,1),e}function IT(t=null,e=null,r,s=null){const i={type:"TSDeclareFunction",id:t,typeParameters:e,params:r,returnType:s},a=b.TSDeclareFunction;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.params,i,"params",r,1),c(a.returnType,i,"returnType",s,1),i}function vT(t=null,e,r=null,s,i=null){const a={type:"TSDeclareMethod",decorators:t,key:e,typeParameters:r,params:s,returnType:i},n=b.TSDeclareMethod;return c(n.decorators,a,"decorators",t,1),c(n.key,a,"key",e,1),c(n.typeParameters,a,"typeParameters",r,1),c(n.params,a,"params",s,1),c(n.returnType,a,"returnType",i,1),a}function NT(t,e){const r={type:"TSQualifiedName",left:t,right:e},s=b.TSQualifiedName;return c(s.left,r,"left",t,1),c(s.right,r,"right",e,1),r}function CT(t=null,e,r=null){const s={type:"TSCallSignatureDeclaration",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSCallSignatureDeclaration;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function wT(t=null,e,r=null){const s={type:"TSConstructSignatureDeclaration",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSConstructSignatureDeclaration;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function OT(t,e=null){const r={type:"TSPropertySignature",key:t,typeAnnotation:e},s=b.TSPropertySignature;return c(s.key,r,"key",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function DT(t,e=null,r,s=null){const i={type:"TSMethodSignature",key:t,typeParameters:e,parameters:r,typeAnnotation:s,kind:null},a=b.TSMethodSignature;return c(a.key,i,"key",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.parameters,i,"parameters",r,1),c(a.typeAnnotation,i,"typeAnnotation",s,1),i}function LT(t,e=null){const r={type:"TSIndexSignature",parameters:t,typeAnnotation:e},s=b.TSIndexSignature;return c(s.parameters,r,"parameters",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function kT(){return{type:"TSAnyKeyword"}}function MT(){return{type:"TSBooleanKeyword"}}function _T(){return{type:"TSBigIntKeyword"}}function BT(){return{type:"TSIntrinsicKeyword"}}function FT(){return{type:"TSNeverKeyword"}}function RT(){return{type:"TSNullKeyword"}}function jT(){return{type:"TSNumberKeyword"}}function KT(){return{type:"TSObjectKeyword"}}function UT(){return{type:"TSStringKeyword"}}function VT(){return{type:"TSSymbolKeyword"}}function $T(){return{type:"TSUndefinedKeyword"}}function YT(){return{type:"TSUnknownKeyword"}}function XT(){return{type:"TSVoidKeyword"}}function JT(){return{type:"TSThisType"}}function qT(t=null,e,r=null){const s={type:"TSFunctionType",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSFunctionType;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function WT(t=null,e,r=null){const s={type:"TSConstructorType",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSConstructorType;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function HT(t,e=null){const r={type:"TSTypeReference",typeName:t,typeParameters:e},s=b.TSTypeReference;return c(s.typeName,r,"typeName",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function zT(t,e=null,r=null){const s={type:"TSTypePredicate",parameterName:t,typeAnnotation:e,asserts:r},i=b.TSTypePredicate;return c(i.parameterName,s,"parameterName",t,1),c(i.typeAnnotation,s,"typeAnnotation",e,1),c(i.asserts,s,"asserts",r),s}function GT(t,e=null){const r={type:"TSTypeQuery",exprName:t,typeParameters:e},s=b.TSTypeQuery;return c(s.exprName,r,"exprName",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function QT(t){const e={type:"TSTypeLiteral",members:t},r=b.TSTypeLiteral;return c(r.members,e,"members",t,1),e}function ZT(t){const e={type:"TSArrayType",elementType:t},r=b.TSArrayType;return c(r.elementType,e,"elementType",t,1),e}function eS(t){const e={type:"TSTupleType",elementTypes:t},r=b.TSTupleType;return c(r.elementTypes,e,"elementTypes",t,1),e}function tS(t){const e={type:"TSOptionalType",typeAnnotation:t},r=b.TSOptionalType;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function rS(t){const e={type:"TSRestType",typeAnnotation:t},r=b.TSRestType;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function sS(t,e,r=!1){const s={type:"TSNamedTupleMember",label:t,elementType:e,optional:r},i=b.TSNamedTupleMember;return c(i.label,s,"label",t,1),c(i.elementType,s,"elementType",e,1),c(i.optional,s,"optional",r),s}function iS(t){const e={type:"TSUnionType",types:t},r=b.TSUnionType;return c(r.types,e,"types",t,1),e}function aS(t){const e={type:"TSIntersectionType",types:t},r=b.TSIntersectionType;return c(r.types,e,"types",t,1),e}function nS(t,e,r,s){const i={type:"TSConditionalType",checkType:t,extendsType:e,trueType:r,falseType:s},a=b.TSConditionalType;return c(a.checkType,i,"checkType",t,1),c(a.extendsType,i,"extendsType",e,1),c(a.trueType,i,"trueType",r,1),c(a.falseType,i,"falseType",s,1),i}function oS(t){const e={type:"TSInferType",typeParameter:t},r=b.TSInferType;return c(r.typeParameter,e,"typeParameter",t,1),e}function lS(t){const e={type:"TSParenthesizedType",typeAnnotation:t},r=b.TSParenthesizedType;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function uS(t,e="keyof"){const r={type:"TSTypeOperator",typeAnnotation:t,operator:e},s=b.TSTypeOperator;return c(s.typeAnnotation,r,"typeAnnotation",t,1),c(s.operator,r,"operator",e),r}function cS(t,e){const r={type:"TSIndexedAccessType",objectType:t,indexType:e},s=b.TSIndexedAccessType;return c(s.objectType,r,"objectType",t,1),c(s.indexType,r,"indexType",e,1),r}function pS(t,e=null,r=null){const s={type:"TSMappedType",typeParameter:t,typeAnnotation:e,nameType:r},i=b.TSMappedType;return c(i.typeParameter,s,"typeParameter",t,1),c(i.typeAnnotation,s,"typeAnnotation",e,1),c(i.nameType,s,"nameType",r,1),s}function fS(t,e){const r={type:"TSTemplateLiteralType",quasis:t,types:e},s=b.TSTemplateLiteralType;return c(s.quasis,r,"quasis",t,1),c(s.types,r,"types",e,1),r}function dS(t){const e={type:"TSLiteralType",literal:t},r=b.TSLiteralType;return c(r.literal,e,"literal",t,1),e}function hS(t,e=null){const r={type:"TSExpressionWithTypeArguments",expression:t,typeParameters:e},s=b.TSExpressionWithTypeArguments;return c(s.expression,r,"expression",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function yS(t,e=null,r=null,s){const i={type:"TSInterfaceDeclaration",id:t,typeParameters:e,extends:r,body:s},a=b.TSInterfaceDeclaration;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function mS(t){const e={type:"TSInterfaceBody",body:t},r=b.TSInterfaceBody;return c(r.body,e,"body",t,1),e}function TS(t,e=null,r){const s={type:"TSTypeAliasDeclaration",id:t,typeParameters:e,typeAnnotation:r},i=b.TSTypeAliasDeclaration;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function SS(t,e=null){const r={type:"TSInstantiationExpression",expression:t,typeParameters:e},s=b.TSInstantiationExpression;return c(s.expression,r,"expression",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function xS(t,e){const r={type:"TSAsExpression",expression:t,typeAnnotation:e},s=b.TSAsExpression;return c(s.expression,r,"expression",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function bS(t,e){const r={type:"TSSatisfiesExpression",expression:t,typeAnnotation:e},s=b.TSSatisfiesExpression;return c(s.expression,r,"expression",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function ES(t,e){const r={type:"TSTypeAssertion",typeAnnotation:t,expression:e},s=b.TSTypeAssertion;return c(s.typeAnnotation,r,"typeAnnotation",t,1),c(s.expression,r,"expression",e,1),r}function PS(t){const e={type:"TSEnumBody",members:t},r=b.TSEnumBody;return c(r.members,e,"members",t,1),e}function gS(t,e){const r={type:"TSEnumDeclaration",id:t,members:e},s=b.TSEnumDeclaration;return c(s.id,r,"id",t,1),c(s.members,r,"members",e,1),r}function AS(t,e=null){const r={type:"TSEnumMember",id:t,initializer:e},s=b.TSEnumMember;return c(s.id,r,"id",t,1),c(s.initializer,r,"initializer",e,1),r}function IS(t,e){const r={type:"TSModuleDeclaration",id:t,body:e,kind:null},s=b.TSModuleDeclaration;return c(s.id,r,"id",t,1),c(s.body,r,"body",e,1),r}function vS(t){const e={type:"TSModuleBlock",body:t},r=b.TSModuleBlock;return c(r.body,e,"body",t,1),e}function NS(t,e=null,r=null){const s={type:"TSImportType",argument:t,qualifier:e,typeParameters:r},i=b.TSImportType;return c(i.argument,s,"argument",t,1),c(i.qualifier,s,"qualifier",e,1),c(i.typeParameters,s,"typeParameters",r,1),s}function CS(t,e){const r={type:"TSImportEqualsDeclaration",id:t,moduleReference:e,isExport:null},s=b.TSImportEqualsDeclaration;return c(s.id,r,"id",t,1),c(s.moduleReference,r,"moduleReference",e,1),r}function wS(t){const e={type:"TSExternalModuleReference",expression:t},r=b.TSExternalModuleReference;return c(r.expression,e,"expression",t,1),e}function OS(t){const e={type:"TSNonNullExpression",expression:t},r=b.TSNonNullExpression;return c(r.expression,e,"expression",t,1),e}function DS(t){const e={type:"TSExportAssignment",expression:t},r=b.TSExportAssignment;return c(r.expression,e,"expression",t,1),e}function LS(t){const e={type:"TSNamespaceExportDeclaration",id:t},r=b.TSNamespaceExportDeclaration;return c(r.id,e,"id",t,1),e}function kS(t){const e={type:"TSTypeAnnotation",typeAnnotation:t},r=b.TSTypeAnnotation;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function MS(t){const e={type:"TSTypeParameterInstantiation",params:t},r=b.TSTypeParameterInstantiation;return c(r.params,e,"params",t,1),e}function _S(t){const e={type:"TSTypeParameterDeclaration",params:t},r=b.TSTypeParameterDeclaration;return c(r.params,e,"params",t,1),e}function BS(t=null,e=null,r){const s={type:"TSTypeParameter",constraint:t,default:e,name:r},i=b.TSTypeParameter;return c(i.constraint,s,"constraint",t,1),c(i.default,s,"default",e,1),c(i.name,s,"name",r),s}function FS(t){return(0,Vt.default)("NumberLiteral","NumericLiteral","The node type "),na(t)}function RS(t,e=""){return(0,Vt.default)("RegexLiteral","RegExpLiteral","The node type "),oa(t,e)}function jS(t){return(0,Vt.default)("RestProperty","RestElement","The node type "),la(t)}function KS(t){return(0,Vt.default)("SpreadProperty","SpreadElement","The node type "),ua(t)}var l={};Object.defineProperty(l,"__esModule",{value:!0}),l.JSXIdentifier=l.JSXFragment=l.JSXExpressionContainer=l.JSXEmptyExpression=l.JSXElement=l.JSXClosingFragment=l.JSXClosingElement=l.JSXAttribute=l.IntersectionTypeAnnotation=l.InterpreterDirective=l.InterfaceTypeAnnotation=l.InterfaceExtends=l.InterfaceDeclaration=l.InferredPredicate=l.IndexedAccessType=l.ImportSpecifier=l.ImportNamespaceSpecifier=l.ImportExpression=l.ImportDefaultSpecifier=l.ImportDeclaration=l.ImportAttribute=l.Import=l.IfStatement=l.Identifier=l.GenericTypeAnnotation=l.FunctionTypeParam=l.FunctionTypeAnnotation=l.FunctionExpression=l.FunctionDeclaration=l.ForStatement=l.ForOfStatement=l.ForInStatement=l.File=l.ExpressionStatement=l.ExportSpecifier=l.ExportNamespaceSpecifier=l.ExportNamedDeclaration=l.ExportDefaultSpecifier=l.ExportDefaultDeclaration=l.ExportAllDeclaration=l.ExistsTypeAnnotation=l.EnumSymbolBody=l.EnumStringMember=l.EnumStringBody=l.EnumNumberMember=l.EnumNumberBody=l.EnumDefaultedMember=l.EnumDeclaration=l.EnumBooleanMember=l.EnumBooleanBody=l.EmptyTypeAnnotation=l.EmptyStatement=l.DoWhileStatement=l.DoExpression=l.DirectiveLiteral=l.Directive=l.Decorator=l.DeclaredPredicate=l.DeclareVariable=l.DeclareTypeAlias=l.DeclareOpaqueType=l.DeclareModuleExports=l.DeclareModule=l.DeclareInterface=l.DeclareFunction=l.DeclareExportDeclaration=l.DeclareExportAllDeclaration=l.DeclareClass=l.DecimalLiteral=l.DebuggerStatement=l.ContinueStatement=l.ConditionalExpression=l.ClassProperty=l.ClassPrivateProperty=l.ClassPrivateMethod=l.ClassMethod=l.ClassImplements=l.ClassExpression=l.ClassDeclaration=l.ClassBody=l.ClassAccessorProperty=l.CatchClause=l.CallExpression=l.BreakStatement=l.BooleanTypeAnnotation=l.BooleanLiteralTypeAnnotation=l.BooleanLiteral=l.BlockStatement=l.BindExpression=l.BinaryExpression=l.BigIntLiteral=l.AwaitExpression=l.AssignmentPattern=l.AssignmentExpression=l.ArrowFunctionExpression=l.ArrayTypeAnnotation=l.ArrayPattern=l.ArrayExpression=l.ArgumentPlaceholder=l.AnyTypeAnnotation=void 0,l.TSNumberKeyword=l.TSNullKeyword=l.TSNonNullExpression=l.TSNeverKeyword=l.TSNamespaceExportDeclaration=l.TSNamedTupleMember=l.TSModuleDeclaration=l.TSModuleBlock=l.TSMethodSignature=l.TSMappedType=l.TSLiteralType=l.TSIntrinsicKeyword=l.TSIntersectionType=l.TSInterfaceDeclaration=l.TSInterfaceBody=l.TSInstantiationExpression=l.TSInferType=l.TSIndexedAccessType=l.TSIndexSignature=l.TSImportType=l.TSImportEqualsDeclaration=l.TSFunctionType=l.TSExternalModuleReference=l.TSExpressionWithTypeArguments=l.TSExportAssignment=l.TSEnumMember=l.TSEnumDeclaration=l.TSEnumBody=l.TSDeclareMethod=l.TSDeclareFunction=l.TSConstructorType=l.TSConstructSignatureDeclaration=l.TSConditionalType=l.TSCallSignatureDeclaration=l.TSBooleanKeyword=l.TSBigIntKeyword=l.TSAsExpression=l.TSArrayType=l.TSAnyKeyword=l.SymbolTypeAnnotation=l.SwitchStatement=l.SwitchCase=l.Super=l.StringTypeAnnotation=l.StringLiteralTypeAnnotation=l.StringLiteral=l.StaticBlock=l.SpreadProperty=l.SpreadElement=l.SequenceExpression=l.ReturnStatement=l.RestProperty=l.RestElement=l.RegexLiteral=l.RegExpLiteral=l.RecordExpression=l.QualifiedTypeIdentifier=l.Program=l.PrivateName=l.Placeholder=l.PipelineTopicExpression=l.PipelinePrimaryTopicReference=l.PipelineBareFunction=l.ParenthesizedExpression=l.OptionalMemberExpression=l.OptionalIndexedAccessType=l.OptionalCallExpression=l.OpaqueType=l.ObjectTypeSpreadProperty=l.ObjectTypeProperty=l.ObjectTypeInternalSlot=l.ObjectTypeIndexer=l.ObjectTypeCallProperty=l.ObjectTypeAnnotation=l.ObjectProperty=l.ObjectPattern=l.ObjectMethod=l.ObjectExpression=l.NumericLiteral=l.NumberTypeAnnotation=l.NumberLiteralTypeAnnotation=l.NumberLiteral=l.NullableTypeAnnotation=l.NullLiteralTypeAnnotation=l.NullLiteral=l.Noop=l.NewExpression=l.ModuleExpression=l.MixedTypeAnnotation=l.MetaProperty=l.MemberExpression=l.LogicalExpression=l.LabeledStatement=l.JSXText=l.JSXSpreadChild=l.JSXSpreadAttribute=l.JSXOpeningFragment=l.JSXOpeningElement=l.JSXNamespacedName=l.JSXMemberExpression=void 0,l.YieldExpression=l.WithStatement=l.WhileStatement=l.VoidTypeAnnotation=l.VoidPattern=l.Variance=l.VariableDeclarator=l.VariableDeclaration=l.V8IntrinsicIdentifier=l.UpdateExpression=l.UnionTypeAnnotation=l.UnaryExpression=l.TypeofTypeAnnotation=l.TypeParameterInstantiation=l.TypeParameterDeclaration=l.TypeParameter=l.TypeCastExpression=l.TypeAnnotation=l.TypeAlias=l.TupleTypeAnnotation=l.TupleExpression=l.TryStatement=l.TopicReference=l.ThrowStatement=l.ThisTypeAnnotation=l.ThisExpression=l.TemplateLiteral=l.TemplateElement=l.TaggedTemplateExpression=l.TSVoidKeyword=l.TSUnknownKeyword=l.TSUnionType=l.TSUndefinedKeyword=l.TSTypeReference=l.TSTypeQuery=l.TSTypePredicate=l.TSTypeParameterInstantiation=l.TSTypeParameterDeclaration=l.TSTypeParameter=l.TSTypeOperator=l.TSTypeLiteral=l.TSTypeAssertion=l.TSTypeAnnotation=l.TSTypeAliasDeclaration=l.TSTupleType=l.TSThisType=l.TSTemplateLiteralType=l.TSSymbolKeyword=l.TSStringKeyword=l.TSSatisfiesExpression=l.TSRestType=l.TSQualifiedName=l.TSPropertySignature=l.TSParenthesizedType=l.TSParameterProperty=l.TSOptionalType=l.TSObjectKeyword=void 0;var ut=f;function S(t){return ut[t]}l.ArrayExpression=S("arrayExpression"),l.AssignmentExpression=S("assignmentExpression"),l.BinaryExpression=S("binaryExpression"),l.InterpreterDirective=S("interpreterDirective"),l.Directive=S("directive"),l.DirectiveLiteral=S("directiveLiteral"),l.BlockStatement=S("blockStatement"),l.BreakStatement=S("breakStatement"),l.CallExpression=S("callExpression"),l.CatchClause=S("catchClause"),l.ConditionalExpression=S("conditionalExpression"),l.ContinueStatement=S("continueStatement"),l.DebuggerStatement=S("debuggerStatement"),l.DoWhileStatement=S("doWhileStatement"),l.EmptyStatement=S("emptyStatement"),l.ExpressionStatement=S("expressionStatement"),l.File=S("file"),l.ForInStatement=S("forInStatement"),l.ForStatement=S("forStatement"),l.FunctionDeclaration=S("functionDeclaration"),l.FunctionExpression=S("functionExpression"),l.Identifier=S("identifier"),l.IfStatement=S("ifStatement"),l.LabeledStatement=S("labeledStatement"),l.StringLiteral=S("stringLiteral"),l.NumericLiteral=S("numericLiteral"),l.NullLiteral=S("nullLiteral"),l.BooleanLiteral=S("booleanLiteral"),l.RegExpLiteral=S("regExpLiteral"),l.LogicalExpression=S("logicalExpression"),l.MemberExpression=S("memberExpression"),l.NewExpression=S("newExpression"),l.Program=S("program"),l.ObjectExpression=S("objectExpression"),l.ObjectMethod=S("objectMethod"),l.ObjectProperty=S("objectProperty"),l.RestElement=S("restElement"),l.ReturnStatement=S("returnStatement"),l.SequenceExpression=S("sequenceExpression"),l.ParenthesizedExpression=S("parenthesizedExpression"),l.SwitchCase=S("switchCase"),l.SwitchStatement=S("switchStatement"),l.ThisExpression=S("thisExpression"),l.ThrowStatement=S("throwStatement"),l.TryStatement=S("tryStatement"),l.UnaryExpression=S("unaryExpression"),l.UpdateExpression=S("updateExpression"),l.VariableDeclaration=S("variableDeclaration"),l.VariableDeclarator=S("variableDeclarator"),l.WhileStatement=S("whileStatement"),l.WithStatement=S("withStatement"),l.AssignmentPattern=S("assignmentPattern"),l.ArrayPattern=S("arrayPattern"),l.ArrowFunctionExpression=S("arrowFunctionExpression"),l.ClassBody=S("classBody"),l.ClassExpression=S("classExpression"),l.ClassDeclaration=S("classDeclaration"),l.ExportAllDeclaration=S("exportAllDeclaration"),l.ExportDefaultDeclaration=S("exportDefaultDeclaration"),l.ExportNamedDeclaration=S("exportNamedDeclaration"),l.ExportSpecifier=S("exportSpecifier"),l.ForOfStatement=S("forOfStatement"),l.ImportDeclaration=S("importDeclaration"),l.ImportDefaultSpecifier=S("importDefaultSpecifier"),l.ImportNamespaceSpecifier=S("importNamespaceSpecifier"),l.ImportSpecifier=S("importSpecifier"),l.ImportExpression=S("importExpression"),l.MetaProperty=S("metaProperty"),l.ClassMethod=S("classMethod"),l.ObjectPattern=S("objectPattern"),l.SpreadElement=S("spreadElement"),l.Super=S("super"),l.TaggedTemplateExpression=S("taggedTemplateExpression"),l.TemplateElement=S("templateElement"),l.TemplateLiteral=S("templateLiteral"),l.YieldExpression=S("yieldExpression"),l.AwaitExpression=S("awaitExpression"),l.Import=S("import"),l.BigIntLiteral=S("bigIntLiteral"),l.ExportNamespaceSpecifier=S("exportNamespaceSpecifier"),l.OptionalMemberExpression=S("optionalMemberExpression"),l.OptionalCallExpression=S("optionalCallExpression"),l.ClassProperty=S("classProperty"),l.ClassAccessorProperty=S("classAccessorProperty"),l.ClassPrivateProperty=S("classPrivateProperty"),l.ClassPrivateMethod=S("classPrivateMethod"),l.PrivateName=S("privateName"),l.StaticBlock=S("staticBlock"),l.ImportAttribute=S("importAttribute"),l.AnyTypeAnnotation=S("anyTypeAnnotation"),l.ArrayTypeAnnotation=S("arrayTypeAnnotation"),l.BooleanTypeAnnotation=S("booleanTypeAnnotation"),l.BooleanLiteralTypeAnnotation=S("booleanLiteralTypeAnnotation"),l.NullLiteralTypeAnnotation=S("nullLiteralTypeAnnotation"),l.ClassImplements=S("classImplements"),l.DeclareClass=S("declareClass"),l.DeclareFunction=S("declareFunction"),l.DeclareInterface=S("declareInterface"),l.DeclareModule=S("declareModule"),l.DeclareModuleExports=S("declareModuleExports"),l.DeclareTypeAlias=S("declareTypeAlias"),l.DeclareOpaqueType=S("declareOpaqueType"),l.DeclareVariable=S("declareVariable"),l.DeclareExportDeclaration=S("declareExportDeclaration"),l.DeclareExportAllDeclaration=S("declareExportAllDeclaration"),l.DeclaredPredicate=S("declaredPredicate"),l.ExistsTypeAnnotation=S("existsTypeAnnotation"),l.FunctionTypeAnnotation=S("functionTypeAnnotation"),l.FunctionTypeParam=S("functionTypeParam"),l.GenericTypeAnnotation=S("genericTypeAnnotation"),l.InferredPredicate=S("inferredPredicate"),l.InterfaceExtends=S("interfaceExtends"),l.InterfaceDeclaration=S("interfaceDeclaration"),l.InterfaceTypeAnnotation=S("interfaceTypeAnnotation"),l.IntersectionTypeAnnotation=S("intersectionTypeAnnotation"),l.MixedTypeAnnotation=S("mixedTypeAnnotation"),l.EmptyTypeAnnotation=S("emptyTypeAnnotation"),l.NullableTypeAnnotation=S("nullableTypeAnnotation"),l.NumberLiteralTypeAnnotation=S("numberLiteralTypeAnnotation"),l.NumberTypeAnnotation=S("numberTypeAnnotation"),l.ObjectTypeAnnotation=S("objectTypeAnnotation"),l.ObjectTypeInternalSlot=S("objectTypeInternalSlot"),l.ObjectTypeCallProperty=S("objectTypeCallProperty"),l.ObjectTypeIndexer=S("objectTypeIndexer"),l.ObjectTypeProperty=S("objectTypeProperty"),l.ObjectTypeSpreadProperty=S("objectTypeSpreadProperty"),l.OpaqueType=S("opaqueType"),l.QualifiedTypeIdentifier=S("qualifiedTypeIdentifier"),l.StringLiteralTypeAnnotation=S("stringLiteralTypeAnnotation"),l.StringTypeAnnotation=S("stringTypeAnnotation"),l.SymbolTypeAnnotation=S("symbolTypeAnnotation"),l.ThisTypeAnnotation=S("thisTypeAnnotation"),l.TupleTypeAnnotation=S("tupleTypeAnnotation"),l.TypeofTypeAnnotation=S("typeofTypeAnnotation"),l.TypeAlias=S("typeAlias"),l.TypeAnnotation=S("typeAnnotation"),l.TypeCastExpression=S("typeCastExpression"),l.TypeParameter=S("typeParameter"),l.TypeParameterDeclaration=S("typeParameterDeclaration"),l.TypeParameterInstantiation=S("typeParameterInstantiation"),l.UnionTypeAnnotation=S("unionTypeAnnotation"),l.Variance=S("variance"),l.VoidTypeAnnotation=S("voidTypeAnnotation"),l.EnumDeclaration=S("enumDeclaration"),l.EnumBooleanBody=S("enumBooleanBody"),l.EnumNumberBody=S("enumNumberBody"),l.EnumStringBody=S("enumStringBody"),l.EnumSymbolBody=S("enumSymbolBody"),l.EnumBooleanMember=S("enumBooleanMember"),l.EnumNumberMember=S("enumNumberMember"),l.EnumStringMember=S("enumStringMember"),l.EnumDefaultedMember=S("enumDefaultedMember"),l.IndexedAccessType=S("indexedAccessType"),l.OptionalIndexedAccessType=S("optionalIndexedAccessType"),l.JSXAttribute=S("jsxAttribute"),l.JSXClosingElement=S("jsxClosingElement"),l.JSXElement=S("jsxElement"),l.JSXEmptyExpression=S("jsxEmptyExpression"),l.JSXExpressionContainer=S("jsxExpressionContainer"),l.JSXSpreadChild=S("jsxSpreadChild"),l.JSXIdentifier=S("jsxIdentifier"),l.JSXMemberExpression=S("jsxMemberExpression"),l.JSXNamespacedName=S("jsxNamespacedName"),l.JSXOpeningElement=S("jsxOpeningElement"),l.JSXSpreadAttribute=S("jsxSpreadAttribute"),l.JSXText=S("jsxText"),l.JSXFragment=S("jsxFragment"),l.JSXOpeningFragment=S("jsxOpeningFragment"),l.JSXClosingFragment=S("jsxClosingFragment"),l.Noop=S("noop"),l.Placeholder=S("placeholder"),l.V8IntrinsicIdentifier=S("v8IntrinsicIdentifier"),l.ArgumentPlaceholder=S("argumentPlaceholder"),l.BindExpression=S("bindExpression"),l.Decorator=S("decorator"),l.DoExpression=S("doExpression"),l.ExportDefaultSpecifier=S("exportDefaultSpecifier"),l.RecordExpression=S("recordExpression"),l.TupleExpression=S("tupleExpression"),l.DecimalLiteral=S("decimalLiteral"),l.ModuleExpression=S("moduleExpression"),l.TopicReference=S("topicReference"),l.PipelineTopicExpression=S("pipelineTopicExpression"),l.PipelineBareFunction=S("pipelineBareFunction"),l.PipelinePrimaryTopicReference=S("pipelinePrimaryTopicReference"),l.VoidPattern=S("voidPattern"),l.TSParameterProperty=S("tsParameterProperty"),l.TSDeclareFunction=S("tsDeclareFunction"),l.TSDeclareMethod=S("tsDeclareMethod"),l.TSQualifiedName=S("tsQualifiedName"),l.TSCallSignatureDeclaration=S("tsCallSignatureDeclaration"),l.TSConstructSignatureDeclaration=S("tsConstructSignatureDeclaration"),l.TSPropertySignature=S("tsPropertySignature"),l.TSMethodSignature=S("tsMethodSignature"),l.TSIndexSignature=S("tsIndexSignature"),l.TSAnyKeyword=S("tsAnyKeyword"),l.TSBooleanKeyword=S("tsBooleanKeyword"),l.TSBigIntKeyword=S("tsBigIntKeyword"),l.TSIntrinsicKeyword=S("tsIntrinsicKeyword"),l.TSNeverKeyword=S("tsNeverKeyword"),l.TSNullKeyword=S("tsNullKeyword"),l.TSNumberKeyword=S("tsNumberKeyword"),l.TSObjectKeyword=S("tsObjectKeyword"),l.TSStringKeyword=S("tsStringKeyword"),l.TSSymbolKeyword=S("tsSymbolKeyword"),l.TSUndefinedKeyword=S("tsUndefinedKeyword"),l.TSUnknownKeyword=S("tsUnknownKeyword"),l.TSVoidKeyword=S("tsVoidKeyword"),l.TSThisType=S("tsThisType"),l.TSFunctionType=S("tsFunctionType"),l.TSConstructorType=S("tsConstructorType"),l.TSTypeReference=S("tsTypeReference"),l.TSTypePredicate=S("tsTypePredicate"),l.TSTypeQuery=S("tsTypeQuery"),l.TSTypeLiteral=S("tsTypeLiteral"),l.TSArrayType=S("tsArrayType"),l.TSTupleType=S("tsTupleType"),l.TSOptionalType=S("tsOptionalType"),l.TSRestType=S("tsRestType"),l.TSNamedTupleMember=S("tsNamedTupleMember"),l.TSUnionType=S("tsUnionType"),l.TSIntersectionType=S("tsIntersectionType"),l.TSConditionalType=S("tsConditionalType"),l.TSInferType=S("tsInferType"),l.TSParenthesizedType=S("tsParenthesizedType"),l.TSTypeOperator=S("tsTypeOperator"),l.TSIndexedAccessType=S("tsIndexedAccessType"),l.TSMappedType=S("tsMappedType"),l.TSTemplateLiteralType=S("tsTemplateLiteralType"),l.TSLiteralType=S("tsLiteralType"),l.TSExpressionWithTypeArguments=S("tsExpressionWithTypeArguments"),l.TSInterfaceDeclaration=S("tsInterfaceDeclaration"),l.TSInterfaceBody=S("tsInterfaceBody"),l.TSTypeAliasDeclaration=S("tsTypeAliasDeclaration"),l.TSInstantiationExpression=S("tsInstantiationExpression"),l.TSAsExpression=S("tsAsExpression"),l.TSSatisfiesExpression=S("tsSatisfiesExpression"),l.TSTypeAssertion=S("tsTypeAssertion"),l.TSEnumBody=S("tsEnumBody"),l.TSEnumDeclaration=S("tsEnumDeclaration"),l.TSEnumMember=S("tsEnumMember"),l.TSModuleDeclaration=S("tsModuleDeclaration"),l.TSModuleBlock=S("tsModuleBlock"),l.TSImportType=S("tsImportType"),l.TSImportEqualsDeclaration=S("tsImportEqualsDeclaration"),l.TSExternalModuleReference=S("tsExternalModuleReference"),l.TSNonNullExpression=S("tsNonNullExpression"),l.TSExportAssignment=S("tsExportAssignment"),l.TSNamespaceExportDeclaration=S("tsNamespaceExportDeclaration"),l.TSTypeAnnotation=S("tsTypeAnnotation"),l.TSTypeParameterInstantiation=S("tsTypeParameterInstantiation"),l.TSTypeParameterDeclaration=S("tsTypeParameterDeclaration"),l.TSTypeParameter=S("tsTypeParameter"),l.NumberLiteral=ut.numberLiteral,l.RegexLiteral=ut.regexLiteral,l.RestProperty=ut.restProperty,l.SpreadProperty=ut.spreadProperty,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=f;Object.keys(e).forEach(function(s){s==="default"||s==="__esModule"||s in t&&t[s]===e[s]||Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[s]}})});var r=l;Object.keys(r).forEach(function(s){s==="default"||s==="__esModule"||s in t&&t[s]===r[s]||Object.defineProperty(t,s,{enumerable:!0,get:function(){return r[s]}})})}(ae);var ca;function US(){if(ca)return Mt;ca=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.default=r;var t=ae,e=Ds();function r(s,i){const a=s.value.split(/\r\n|\n|\r/);let n=0;for(let u=0;u<a.length;u++)/[^ \t]/.exec(a[u])&&(n=u);let o="";for(let u=0;u<a.length;u++){const p=a[u],y=u===0,E=u===a.length-1,P=u===n;let g=p.replace(/\t/g," ");y||(g=g.replace(/^ +/,"")),E||(g=g.replace(/ +$/,"")),g&&(P||(g+=" "),o+=g)}o&&i.push((0,e.inherits)((0,t.stringLiteral)(o),s))}return Mt}var pa;function VS(){if(pa)return kt;pa=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.default=r;var t=d,e=US();function r(s){const i=[];for(let a=0;a<s.children.length;a++){let n=s.children[a];if((0,t.isJSXText)(n)){(0,e.default)(n,i);continue}(0,t.isJSXExpressionContainer)(n)&&(n=n.expression),!(0,t.isJSXEmptyExpression)(n)&&i.push(n)}return i}return kt}var qr={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.default=YS;var $S=ce();function YS(t){return!!(t&&$S.VISITOR_KEYS[t.type])}Object.defineProperty(qr,"__esModule",{value:!0}),qr.default=JS;var XS=$t;function JS(t){if(!(0,XS.default)(t)){var e;const r=(e=t==null?void 0:t.type)!=null?e:JSON.stringify(t);throw new TypeError(`Not a valid node of type "${r}"`)}}var h={};Object.defineProperty(h,"__esModule",{value:!0}),h.assertAccessor=fg,h.assertAnyTypeAnnotation=wx,h.assertArgumentPlaceholder=iE,h.assertArrayExpression=WS,h.assertArrayPattern=J0,h.assertArrayTypeAnnotation=Ox,h.assertArrowFunctionExpression=q0,h.assertAssignmentExpression=HS,h.assertAssignmentPattern=X0,h.assertAwaitExpression=mx,h.assertBigIntLiteral=Sx,h.assertBinary=kP,h.assertBinaryExpression=zS,h.assertBindExpression=aE,h.assertBlock=BP,h.assertBlockParent=_P,h.assertBlockStatement=e0,h.assertBooleanLiteral=E0,h.assertBooleanLiteralTypeAnnotation=Lx,h.assertBooleanTypeAnnotation=Dx,h.assertBreakStatement=t0,h.assertCallExpression=r0,h.assertCatchClause=s0,h.assertClass=lg,h.assertClassAccessorProperty=gx,h.assertClassBody=W0,h.assertClassDeclaration=z0,h.assertClassExpression=H0,h.assertClassImplements=Mx,h.assertClassMethod=lx,h.assertClassPrivateMethod=Ix,h.assertClassPrivateProperty=Ax,h.assertClassProperty=Px,h.assertCompletionStatement=jP,h.assertConditional=KP,h.assertConditionalExpression=i0,h.assertContinueStatement=a0,h.assertDebuggerStatement=n0,h.assertDecimalLiteral=pE,h.assertDeclaration=HP,h.assertDeclareClass=_x,h.assertDeclareExportAllDeclaration=Yx,h.assertDeclareExportDeclaration=$x,h.assertDeclareFunction=Bx,h.assertDeclareInterface=Fx,h.assertDeclareModule=Rx,h.assertDeclareModuleExports=jx,h.assertDeclareOpaqueType=Ux,h.assertDeclareTypeAlias=Kx,h.assertDeclareVariable=Vx,h.assertDeclaredPredicate=Xx,h.assertDecorator=nE,h.assertDirective=QS,h.assertDirectiveLiteral=ZS,h.assertDoExpression=oE,h.assertDoWhileStatement=o0,h.assertEmptyStatement=l0,h.assertEmptyTypeAnnotation=rb,h.assertEnumBody=xg,h.assertEnumBooleanBody=Ob,h.assertEnumBooleanMember=Mb,h.assertEnumDeclaration=wb,h.assertEnumDefaultedMember=Fb,h.assertEnumMember=bg,h.assertEnumNumberBody=Db,h.assertEnumNumberMember=_b,h.assertEnumStringBody=Lb,h.assertEnumStringMember=Bb,h.assertEnumSymbolBody=kb,h.assertExistsTypeAnnotation=Jx,h.assertExportAllDeclaration=G0,h.assertExportDeclaration=cg,h.assertExportDefaultDeclaration=Q0,h.assertExportDefaultSpecifier=lE,h.assertExportNamedDeclaration=Z0,h.assertExportNamespaceSpecifier=xx,h.assertExportSpecifier=ex,h.assertExpression=LP,h.assertExpressionStatement=u0,h.assertExpressionWrapper=$P,h.assertFile=c0,h.assertFlow=hg,h.assertFlowBaseAnnotation=mg,h.assertFlowDeclaration=Tg,h.assertFlowPredicate=Sg,h.assertFlowType=yg,h.assertFor=YP,h.assertForInStatement=p0,h.assertForOfStatement=tx,h.assertForStatement=f0,h.assertForXStatement=XP,h.assertFunction=JP,h.assertFunctionDeclaration=d0,h.assertFunctionExpression=h0,h.assertFunctionParameter=zP,h.assertFunctionParent=qP,h.assertFunctionTypeAnnotation=qx,h.assertFunctionTypeParam=Wx,h.assertGenericTypeAnnotation=Hx,h.assertIdentifier=y0,h.assertIfStatement=m0,h.assertImmutable=tg,h.assertImport=Tx,h.assertImportAttribute=Cx,h.assertImportDeclaration=rx,h.assertImportDefaultSpecifier=sx,h.assertImportExpression=nx,h.assertImportNamespaceSpecifier=ix,h.assertImportOrExportDeclaration=ug,h.assertImportSpecifier=ax,h.assertIndexedAccessType=Rb,h.assertInferredPredicate=zx,h.assertInterfaceDeclaration=Qx,h.assertInterfaceExtends=Gx,h.assertInterfaceTypeAnnotation=Zx,h.assertInterpreterDirective=GS,h.assertIntersectionTypeAnnotation=eb,h.assertJSX=Eg,h.assertJSXAttribute=Kb,h.assertJSXClosingElement=Ub,h.assertJSXClosingFragment=eE,h.assertJSXElement=Vb,h.assertJSXEmptyExpression=$b,h.assertJSXExpressionContainer=Yb,h.assertJSXFragment=Qb,h.assertJSXIdentifier=Jb,h.assertJSXMemberExpression=qb,h.assertJSXNamespacedName=Wb,h.assertJSXOpeningElement=Hb,h.assertJSXOpeningFragment=Zb,h.assertJSXSpreadAttribute=zb,h.assertJSXSpreadChild=Xb,h.assertJSXText=Gb,h.assertLVal=QP,h.assertLabeledStatement=T0,h.assertLiteral=eg,h.assertLogicalExpression=g0,h.assertLoop=UP,h.assertMemberExpression=A0,h.assertMetaProperty=ox,h.assertMethod=sg,h.assertMiscellaneous=Pg,h.assertMixedTypeAnnotation=tb,h.assertModuleDeclaration=Dg,h.assertModuleExpression=fE,h.assertModuleSpecifier=pg,h.assertNewExpression=I0,h.assertNoop=tE,h.assertNullLiteral=b0,h.assertNullLiteralTypeAnnotation=kx,h.assertNullableTypeAnnotation=sb,h.assertNumberLiteral=Ng,h.assertNumberLiteralTypeAnnotation=ib,h.assertNumberTypeAnnotation=ab,h.assertNumericLiteral=x0,h.assertObjectExpression=N0,h.assertObjectMember=ig,h.assertObjectMethod=C0,h.assertObjectPattern=ux,h.assertObjectProperty=w0,h.assertObjectTypeAnnotation=nb,h.assertObjectTypeCallProperty=lb,h.assertObjectTypeIndexer=ub,h.assertObjectTypeInternalSlot=ob,h.assertObjectTypeProperty=cb,h.assertObjectTypeSpreadProperty=pb,h.assertOpaqueType=fb,h.assertOptionalCallExpression=Ex,h.assertOptionalIndexedAccessType=jb,h.assertOptionalMemberExpression=bx,h.assertParenthesizedExpression=k0,h.assertPattern=og,h.assertPatternLike=GP,h.assertPipelineBareFunction=yE,h.assertPipelinePrimaryTopicReference=mE,h.assertPipelineTopicExpression=hE,h.assertPlaceholder=rE,h.assertPrivate=dg,h.assertPrivateName=vx,h.assertProgram=v0,h.assertProperty=ag,h.assertPureish=WP,h.assertQualifiedTypeIdentifier=db,h.assertRecordExpression=uE,h.assertRegExpLiteral=P0,h.assertRegexLiteral=Cg,h.assertRestElement=O0,h.assertRestProperty=wg,h.assertReturnStatement=D0,h.assertScopable=MP,h.assertSequenceExpression=L0,h.assertSpreadElement=cx,h.assertSpreadProperty=Og,h.assertStandardized=DP,h.assertStatement=FP,h.assertStaticBlock=Nx,h.assertStringLiteral=S0,h.assertStringLiteralTypeAnnotation=hb,h.assertStringTypeAnnotation=yb,h.assertSuper=px,h.assertSwitchCase=M0,h.assertSwitchStatement=_0,h.assertSymbolTypeAnnotation=mb,h.assertTSAnyKeyword=NE,h.assertTSArrayType=qE,h.assertTSAsExpression=dP,h.assertTSBaseType=vg,h.assertTSBigIntKeyword=wE,h.assertTSBooleanKeyword=CE,h.assertTSCallSignatureDeclaration=PE,h.assertTSConditionalType=eP,h.assertTSConstructSignatureDeclaration=gE,h.assertTSConstructorType=VE,h.assertTSDeclareFunction=xE,h.assertTSDeclareMethod=bE,h.assertTSEntityName=ZP,h.assertTSEnumBody=mP,h.assertTSEnumDeclaration=TP,h.assertTSEnumMember=SP,h.assertTSExportAssignment=IP,h.assertTSExpressionWithTypeArguments=lP,h.assertTSExternalModuleReference=gP,h.assertTSFunctionType=UE,h.assertTSImportEqualsDeclaration=PP,h.assertTSImportType=EP,h.assertTSIndexSignature=vE,h.assertTSIndexedAccessType=iP,h.assertTSInferType=tP,h.assertTSInstantiationExpression=fP,h.assertTSInterfaceBody=cP,h.assertTSInterfaceDeclaration=uP,h.assertTSIntersectionType=ZE,h.assertTSIntrinsicKeyword=OE,h.assertTSLiteralType=oP,h.assertTSMappedType=aP,h.assertTSMethodSignature=IE,h.assertTSModuleBlock=bP,h.assertTSModuleDeclaration=xP,h.assertTSNamedTupleMember=GE,h.assertTSNamespaceExportDeclaration=vP,h.assertTSNeverKeyword=DE,h.assertTSNonNullExpression=AP,h.assertTSNullKeyword=LE,h.assertTSNumberKeyword=kE,h.assertTSObjectKeyword=ME,h.assertTSOptionalType=HE,h.assertTSParameterProperty=SE,h.assertTSParenthesizedType=rP,h.assertTSPropertySignature=AE,h.assertTSQualifiedName=EE,h.assertTSRestType=zE,h.assertTSSatisfiesExpression=hP,h.assertTSStringKeyword=_E,h.assertTSSymbolKeyword=BE,h.assertTSTemplateLiteralType=nP,h.assertTSThisType=KE,h.assertTSTupleType=WE,h.assertTSType=Ig,h.assertTSTypeAliasDeclaration=pP,h.assertTSTypeAnnotation=NP,h.assertTSTypeAssertion=yP,h.assertTSTypeElement=Ag,h.assertTSTypeLiteral=JE,h.assertTSTypeOperator=sP,h.assertTSTypeParameter=OP,h.assertTSTypeParameterDeclaration=wP,h.assertTSTypeParameterInstantiation=CP,h.assertTSTypePredicate=YE,h.assertTSTypeQuery=XE,h.assertTSTypeReference=$E,h.assertTSUndefinedKeyword=FE,h.assertTSUnionType=QE,h.assertTSUnknownKeyword=RE,h.assertTSVoidKeyword=jE,h.assertTaggedTemplateExpression=fx,h.assertTemplateElement=dx,h.assertTemplateLiteral=hx,h.assertTerminatorless=RP,h.assertThisExpression=B0,h.assertThisTypeAnnotation=Tb,h.assertThrowStatement=F0,h.assertTopicReference=dE,h.assertTryStatement=R0,h.assertTupleExpression=cE,h.assertTupleTypeAnnotation=Sb,h.assertTypeAlias=bb,h.assertTypeAnnotation=Eb,h.assertTypeCastExpression=Pb,h.assertTypeParameter=gb,h.assertTypeParameterDeclaration=Ab,h.assertTypeParameterInstantiation=Ib,h.assertTypeScript=gg,h.assertTypeofTypeAnnotation=xb,h.assertUnaryExpression=j0,h.assertUnaryLike=ng,h.assertUnionTypeAnnotation=vb,h.assertUpdateExpression=K0,h.assertUserWhitespacable=rg,h.assertV8IntrinsicIdentifier=sE,h.assertVariableDeclaration=U0,h.assertVariableDeclarator=V0,h.assertVariance=Nb,h.assertVoidPattern=TE,h.assertVoidTypeAnnotation=Cb,h.assertWhile=VP,h.assertWhileStatement=$0,h.assertWithStatement=Y0,h.assertYieldExpression=yx;var qS=nt(),ct=$e;function m(t,e,r){if(!(0,qS.default)(t,e,r))throw new Error(`Expected type "${t}" with option ${JSON.stringify(r)}, but instead got "${e.type}".`)}function WS(t,e){m("ArrayExpression",t,e)}function HS(t,e){m("AssignmentExpression",t,e)}function zS(t,e){m("BinaryExpression",t,e)}function GS(t,e){m("InterpreterDirective",t,e)}function QS(t,e){m("Directive",t,e)}function ZS(t,e){m("DirectiveLiteral",t,e)}function e0(t,e){m("BlockStatement",t,e)}function t0(t,e){m("BreakStatement",t,e)}function r0(t,e){m("CallExpression",t,e)}function s0(t,e){m("CatchClause",t,e)}function i0(t,e){m("ConditionalExpression",t,e)}function a0(t,e){m("ContinueStatement",t,e)}function n0(t,e){m("DebuggerStatement",t,e)}function o0(t,e){m("DoWhileStatement",t,e)}function l0(t,e){m("EmptyStatement",t,e)}function u0(t,e){m("ExpressionStatement",t,e)}function c0(t,e){m("File",t,e)}function p0(t,e){m("ForInStatement",t,e)}function f0(t,e){m("ForStatement",t,e)}function d0(t,e){m("FunctionDeclaration",t,e)}function h0(t,e){m("FunctionExpression",t,e)}function y0(t,e){m("Identifier",t,e)}function m0(t,e){m("IfStatement",t,e)}function T0(t,e){m("LabeledStatement",t,e)}function S0(t,e){m("StringLiteral",t,e)}function x0(t,e){m("NumericLiteral",t,e)}function b0(t,e){m("NullLiteral",t,e)}function E0(t,e){m("BooleanLiteral",t,e)}function P0(t,e){m("RegExpLiteral",t,e)}function g0(t,e){m("LogicalExpression",t,e)}function A0(t,e){m("MemberExpression",t,e)}function I0(t,e){m("NewExpression",t,e)}function v0(t,e){m("Program",t,e)}function N0(t,e){m("ObjectExpression",t,e)}function C0(t,e){m("ObjectMethod",t,e)}function w0(t,e){m("ObjectProperty",t,e)}function O0(t,e){m("RestElement",t,e)}function D0(t,e){m("ReturnStatement",t,e)}function L0(t,e){m("SequenceExpression",t,e)}function k0(t,e){m("ParenthesizedExpression",t,e)}function M0(t,e){m("SwitchCase",t,e)}function _0(t,e){m("SwitchStatement",t,e)}function B0(t,e){m("ThisExpression",t,e)}function F0(t,e){m("ThrowStatement",t,e)}function R0(t,e){m("TryStatement",t,e)}function j0(t,e){m("UnaryExpression",t,e)}function K0(t,e){m("UpdateExpression",t,e)}function U0(t,e){m("VariableDeclaration",t,e)}function V0(t,e){m("VariableDeclarator",t,e)}function $0(t,e){m("WhileStatement",t,e)}function Y0(t,e){m("WithStatement",t,e)}function X0(t,e){m("AssignmentPattern",t,e)}function J0(t,e){m("ArrayPattern",t,e)}function q0(t,e){m("ArrowFunctionExpression",t,e)}function W0(t,e){m("ClassBody",t,e)}function H0(t,e){m("ClassExpression",t,e)}function z0(t,e){m("ClassDeclaration",t,e)}function G0(t,e){m("ExportAllDeclaration",t,e)}function Q0(t,e){m("ExportDefaultDeclaration",t,e)}function Z0(t,e){m("ExportNamedDeclaration",t,e)}function ex(t,e){m("ExportSpecifier",t,e)}function tx(t,e){m("ForOfStatement",t,e)}function rx(t,e){m("ImportDeclaration",t,e)}function sx(t,e){m("ImportDefaultSpecifier",t,e)}function ix(t,e){m("ImportNamespaceSpecifier",t,e)}function ax(t,e){m("ImportSpecifier",t,e)}function nx(t,e){m("ImportExpression",t,e)}function ox(t,e){m("MetaProperty",t,e)}function lx(t,e){m("ClassMethod",t,e)}function ux(t,e){m("ObjectPattern",t,e)}function cx(t,e){m("SpreadElement",t,e)}function px(t,e){m("Super",t,e)}function fx(t,e){m("TaggedTemplateExpression",t,e)}function dx(t,e){m("TemplateElement",t,e)}function hx(t,e){m("TemplateLiteral",t,e)}function yx(t,e){m("YieldExpression",t,e)}function mx(t,e){m("AwaitExpression",t,e)}function Tx(t,e){m("Import",t,e)}function Sx(t,e){m("BigIntLiteral",t,e)}function xx(t,e){m("ExportNamespaceSpecifier",t,e)}function bx(t,e){m("OptionalMemberExpression",t,e)}function Ex(t,e){m("OptionalCallExpression",t,e)}function Px(t,e){m("ClassProperty",t,e)}function gx(t,e){m("ClassAccessorProperty",t,e)}function Ax(t,e){m("ClassPrivateProperty",t,e)}function Ix(t,e){m("ClassPrivateMethod",t,e)}function vx(t,e){m("PrivateName",t,e)}function Nx(t,e){m("StaticBlock",t,e)}function Cx(t,e){m("ImportAttribute",t,e)}function wx(t,e){m("AnyTypeAnnotation",t,e)}function Ox(t,e){m("ArrayTypeAnnotation",t,e)}function Dx(t,e){m("BooleanTypeAnnotation",t,e)}function Lx(t,e){m("BooleanLiteralTypeAnnotation",t,e)}function kx(t,e){m("NullLiteralTypeAnnotation",t,e)}function Mx(t,e){m("ClassImplements",t,e)}function _x(t,e){m("DeclareClass",t,e)}function Bx(t,e){m("DeclareFunction",t,e)}function Fx(t,e){m("DeclareInterface",t,e)}function Rx(t,e){m("DeclareModule",t,e)}function jx(t,e){m("DeclareModuleExports",t,e)}function Kx(t,e){m("DeclareTypeAlias",t,e)}function Ux(t,e){m("DeclareOpaqueType",t,e)}function Vx(t,e){m("DeclareVariable",t,e)}function $x(t,e){m("DeclareExportDeclaration",t,e)}function Yx(t,e){m("DeclareExportAllDeclaration",t,e)}function Xx(t,e){m("DeclaredPredicate",t,e)}function Jx(t,e){m("ExistsTypeAnnotation",t,e)}function qx(t,e){m("FunctionTypeAnnotation",t,e)}function Wx(t,e){m("FunctionTypeParam",t,e)}function Hx(t,e){m("GenericTypeAnnotation",t,e)}function zx(t,e){m("InferredPredicate",t,e)}function Gx(t,e){m("InterfaceExtends",t,e)}function Qx(t,e){m("InterfaceDeclaration",t,e)}function Zx(t,e){m("InterfaceTypeAnnotation",t,e)}function eb(t,e){m("IntersectionTypeAnnotation",t,e)}function tb(t,e){m("MixedTypeAnnotation",t,e)}function rb(t,e){m("EmptyTypeAnnotation",t,e)}function sb(t,e){m("NullableTypeAnnotation",t,e)}function ib(t,e){m("NumberLiteralTypeAnnotation",t,e)}function ab(t,e){m("NumberTypeAnnotation",t,e)}function nb(t,e){m("ObjectTypeAnnotation",t,e)}function ob(t,e){m("ObjectTypeInternalSlot",t,e)}function lb(t,e){m("ObjectTypeCallProperty",t,e)}function ub(t,e){m("ObjectTypeIndexer",t,e)}function cb(t,e){m("ObjectTypeProperty",t,e)}function pb(t,e){m("ObjectTypeSpreadProperty",t,e)}function fb(t,e){m("OpaqueType",t,e)}function db(t,e){m("QualifiedTypeIdentifier",t,e)}function hb(t,e){m("StringLiteralTypeAnnotation",t,e)}function yb(t,e){m("StringTypeAnnotation",t,e)}function mb(t,e){m("SymbolTypeAnnotation",t,e)}function Tb(t,e){m("ThisTypeAnnotation",t,e)}function Sb(t,e){m("TupleTypeAnnotation",t,e)}function xb(t,e){m("TypeofTypeAnnotation",t,e)}function bb(t,e){m("TypeAlias",t,e)}function Eb(t,e){m("TypeAnnotation",t,e)}function Pb(t,e){m("TypeCastExpression",t,e)}function gb(t,e){m("TypeParameter",t,e)}function Ab(t,e){m("TypeParameterDeclaration",t,e)}function Ib(t,e){m("TypeParameterInstantiation",t,e)}function vb(t,e){m("UnionTypeAnnotation",t,e)}function Nb(t,e){m("Variance",t,e)}function Cb(t,e){m("VoidTypeAnnotation",t,e)}function wb(t,e){m("EnumDeclaration",t,e)}function Ob(t,e){m("EnumBooleanBody",t,e)}function Db(t,e){m("EnumNumberBody",t,e)}function Lb(t,e){m("EnumStringBody",t,e)}function kb(t,e){m("EnumSymbolBody",t,e)}function Mb(t,e){m("EnumBooleanMember",t,e)}function _b(t,e){m("EnumNumberMember",t,e)}function Bb(t,e){m("EnumStringMember",t,e)}function Fb(t,e){m("EnumDefaultedMember",t,e)}function Rb(t,e){m("IndexedAccessType",t,e)}function jb(t,e){m("OptionalIndexedAccessType",t,e)}function Kb(t,e){m("JSXAttribute",t,e)}function Ub(t,e){m("JSXClosingElement",t,e)}function Vb(t,e){m("JSXElement",t,e)}function $b(t,e){m("JSXEmptyExpression",t,e)}function Yb(t,e){m("JSXExpressionContainer",t,e)}function Xb(t,e){m("JSXSpreadChild",t,e)}function Jb(t,e){m("JSXIdentifier",t,e)}function qb(t,e){m("JSXMemberExpression",t,e)}function Wb(t,e){m("JSXNamespacedName",t,e)}function Hb(t,e){m("JSXOpeningElement",t,e)}function zb(t,e){m("JSXSpreadAttribute",t,e)}function Gb(t,e){m("JSXText",t,e)}function Qb(t,e){m("JSXFragment",t,e)}function Zb(t,e){m("JSXOpeningFragment",t,e)}function eE(t,e){m("JSXClosingFragment",t,e)}function tE(t,e){m("Noop",t,e)}function rE(t,e){m("Placeholder",t,e)}function sE(t,e){m("V8IntrinsicIdentifier",t,e)}function iE(t,e){m("ArgumentPlaceholder",t,e)}function aE(t,e){m("BindExpression",t,e)}function nE(t,e){m("Decorator",t,e)}function oE(t,e){m("DoExpression",t,e)}function lE(t,e){m("ExportDefaultSpecifier",t,e)}function uE(t,e){m("RecordExpression",t,e)}function cE(t,e){m("TupleExpression",t,e)}function pE(t,e){m("DecimalLiteral",t,e)}function fE(t,e){m("ModuleExpression",t,e)}function dE(t,e){m("TopicReference",t,e)}function hE(t,e){m("PipelineTopicExpression",t,e)}function yE(t,e){m("PipelineBareFunction",t,e)}function mE(t,e){m("PipelinePrimaryTopicReference",t,e)}function TE(t,e){m("VoidPattern",t,e)}function SE(t,e){m("TSParameterProperty",t,e)}function xE(t,e){m("TSDeclareFunction",t,e)}function bE(t,e){m("TSDeclareMethod",t,e)}function EE(t,e){m("TSQualifiedName",t,e)}function PE(t,e){m("TSCallSignatureDeclaration",t,e)}function gE(t,e){m("TSConstructSignatureDeclaration",t,e)}function AE(t,e){m("TSPropertySignature",t,e)}function IE(t,e){m("TSMethodSignature",t,e)}function vE(t,e){m("TSIndexSignature",t,e)}function NE(t,e){m("TSAnyKeyword",t,e)}function CE(t,e){m("TSBooleanKeyword",t,e)}function wE(t,e){m("TSBigIntKeyword",t,e)}function OE(t,e){m("TSIntrinsicKeyword",t,e)}function DE(t,e){m("TSNeverKeyword",t,e)}function LE(t,e){m("TSNullKeyword",t,e)}function kE(t,e){m("TSNumberKeyword",t,e)}function ME(t,e){m("TSObjectKeyword",t,e)}function _E(t,e){m("TSStringKeyword",t,e)}function BE(t,e){m("TSSymbolKeyword",t,e)}function FE(t,e){m("TSUndefinedKeyword",t,e)}function RE(t,e){m("TSUnknownKeyword",t,e)}function jE(t,e){m("TSVoidKeyword",t,e)}function KE(t,e){m("TSThisType",t,e)}function UE(t,e){m("TSFunctionType",t,e)}function VE(t,e){m("TSConstructorType",t,e)}function $E(t,e){m("TSTypeReference",t,e)}function YE(t,e){m("TSTypePredicate",t,e)}function XE(t,e){m("TSTypeQuery",t,e)}function JE(t,e){m("TSTypeLiteral",t,e)}function qE(t,e){m("TSArrayType",t,e)}function WE(t,e){m("TSTupleType",t,e)}function HE(t,e){m("TSOptionalType",t,e)}function zE(t,e){m("TSRestType",t,e)}function GE(t,e){m("TSNamedTupleMember",t,e)}function QE(t,e){m("TSUnionType",t,e)}function ZE(t,e){m("TSIntersectionType",t,e)}function eP(t,e){m("TSConditionalType",t,e)}function tP(t,e){m("TSInferType",t,e)}function rP(t,e){m("TSParenthesizedType",t,e)}function sP(t,e){m("TSTypeOperator",t,e)}function iP(t,e){m("TSIndexedAccessType",t,e)}function aP(t,e){m("TSMappedType",t,e)}function nP(t,e){m("TSTemplateLiteralType",t,e)}function oP(t,e){m("TSLiteralType",t,e)}function lP(t,e){m("TSExpressionWithTypeArguments",t,e)}function uP(t,e){m("TSInterfaceDeclaration",t,e)}function cP(t,e){m("TSInterfaceBody",t,e)}function pP(t,e){m("TSTypeAliasDeclaration",t,e)}function fP(t,e){m("TSInstantiationExpression",t,e)}function dP(t,e){m("TSAsExpression",t,e)}function hP(t,e){m("TSSatisfiesExpression",t,e)}function yP(t,e){m("TSTypeAssertion",t,e)}function mP(t,e){m("TSEnumBody",t,e)}function TP(t,e){m("TSEnumDeclaration",t,e)}function SP(t,e){m("TSEnumMember",t,e)}function xP(t,e){m("TSModuleDeclaration",t,e)}function bP(t,e){m("TSModuleBlock",t,e)}function EP(t,e){m("TSImportType",t,e)}function PP(t,e){m("TSImportEqualsDeclaration",t,e)}function gP(t,e){m("TSExternalModuleReference",t,e)}function AP(t,e){m("TSNonNullExpression",t,e)}function IP(t,e){m("TSExportAssignment",t,e)}function vP(t,e){m("TSNamespaceExportDeclaration",t,e)}function NP(t,e){m("TSTypeAnnotation",t,e)}function CP(t,e){m("TSTypeParameterInstantiation",t,e)}function wP(t,e){m("TSTypeParameterDeclaration",t,e)}function OP(t,e){m("TSTypeParameter",t,e)}function DP(t,e){m("Standardized",t,e)}function LP(t,e){m("Expression",t,e)}function kP(t,e){m("Binary",t,e)}function MP(t,e){m("Scopable",t,e)}function _P(t,e){m("BlockParent",t,e)}function BP(t,e){m("Block",t,e)}function FP(t,e){m("Statement",t,e)}function RP(t,e){m("Terminatorless",t,e)}function jP(t,e){m("CompletionStatement",t,e)}function KP(t,e){m("Conditional",t,e)}function UP(t,e){m("Loop",t,e)}function VP(t,e){m("While",t,e)}function $P(t,e){m("ExpressionWrapper",t,e)}function YP(t,e){m("For",t,e)}function XP(t,e){m("ForXStatement",t,e)}function JP(t,e){m("Function",t,e)}function qP(t,e){m("FunctionParent",t,e)}function WP(t,e){m("Pureish",t,e)}function HP(t,e){m("Declaration",t,e)}function zP(t,e){m("FunctionParameter",t,e)}function GP(t,e){m("PatternLike",t,e)}function QP(t,e){m("LVal",t,e)}function ZP(t,e){m("TSEntityName",t,e)}function eg(t,e){m("Literal",t,e)}function tg(t,e){m("Immutable",t,e)}function rg(t,e){m("UserWhitespacable",t,e)}function sg(t,e){m("Method",t,e)}function ig(t,e){m("ObjectMember",t,e)}function ag(t,e){m("Property",t,e)}function ng(t,e){m("UnaryLike",t,e)}function og(t,e){m("Pattern",t,e)}function lg(t,e){m("Class",t,e)}function ug(t,e){m("ImportOrExportDeclaration",t,e)}function cg(t,e){m("ExportDeclaration",t,e)}function pg(t,e){m("ModuleSpecifier",t,e)}function fg(t,e){m("Accessor",t,e)}function dg(t,e){m("Private",t,e)}function hg(t,e){m("Flow",t,e)}function yg(t,e){m("FlowType",t,e)}function mg(t,e){m("FlowBaseAnnotation",t,e)}function Tg(t,e){m("FlowDeclaration",t,e)}function Sg(t,e){m("FlowPredicate",t,e)}function xg(t,e){m("EnumBody",t,e)}function bg(t,e){m("EnumMember",t,e)}function Eg(t,e){m("JSX",t,e)}function Pg(t,e){m("Miscellaneous",t,e)}function gg(t,e){m("TypeScript",t,e)}function Ag(t,e){m("TSTypeElement",t,e)}function Ig(t,e){m("TSType",t,e)}function vg(t,e){m("TSBaseType",t,e)}function Ng(t,e){(0,ct.default)("assertNumberLiteral","assertNumericLiteral"),m("NumberLiteral",t,e)}function Cg(t,e){(0,ct.default)("assertRegexLiteral","assertRegExpLiteral"),m("RegexLiteral",t,e)}function wg(t,e){(0,ct.default)("assertRestProperty","assertRestElement"),m("RestProperty",t,e)}function Og(t,e){(0,ct.default)("assertSpreadProperty","assertSpreadElement"),m("SpreadProperty",t,e)}function Dg(t,e){(0,ct.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),m("ModuleDeclaration",t,e)}var Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.default=void 0;var pe=ae;Yt.default=Lg;function Lg(t){switch(t){case"string":return(0,pe.stringTypeAnnotation)();case"number":return(0,pe.numberTypeAnnotation)();case"undefined":return(0,pe.voidTypeAnnotation)();case"boolean":return(0,pe.booleanTypeAnnotation)();case"function":return(0,pe.genericTypeAnnotation)((0,pe.identifier)("Function"));case"object":return(0,pe.genericTypeAnnotation)((0,pe.identifier)("Object"));case"symbol":return(0,pe.genericTypeAnnotation)((0,pe.identifier)("Symbol"));case"bigint":return(0,pe.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+t)}var Wr={},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.default=da;var pt=d;function fa(t){return(0,pt.isIdentifier)(t)?t.name:`${t.id.name}.${fa(t.qualification)}`}function da(t){const e=Array.from(t),r=new Map,s=new Map,i=new Set,a=[];for(let n=0;n<e.length;n++){const o=e[n];if(o&&!a.includes(o)){if((0,pt.isAnyTypeAnnotation)(o))return[o];if((0,pt.isFlowBaseAnnotation)(o)){s.set(o.type,o);continue}if((0,pt.isUnionTypeAnnotation)(o)){i.has(o.types)||(e.push(...o.types),i.add(o.types));continue}if((0,pt.isGenericTypeAnnotation)(o)){const u=fa(o.id);if(r.has(u)){let p=r.get(u);p.typeParameters?o.typeParameters&&(p.typeParameters.params.push(...o.typeParameters.params),p.typeParameters.params=da(p.typeParameters.params)):p=o.typeParameters}else r.set(u,o);continue}a.push(o)}}for(const[,n]of s)a.push(n);for(const[,n]of r)a.push(n);return a}Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.default=_g;var kg=ae,Mg=Xt;function _g(t){const e=(0,Mg.default)(t);return e.length===1?e[0]:(0,kg.unionTypeAnnotation)(e)}var Hr={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.default=ya;var Ye=d;function ha(t){return(0,Ye.isIdentifier)(t)?t.name:(0,Ye.isThisExpression)(t)?"this":`${t.right.name}.${ha(t.left)}`}function ya(t){const e=Array.from(t),r=new Map,s=new Map,i=new Set,a=[];for(let n=0;n<e.length;n++){const o=e[n];if(!o||a.includes(o))continue;if((0,Ye.isTSAnyKeyword)(o))return[o];if((0,Ye.isTSBaseType)(o)){s.set(o.type,o);continue}if((0,Ye.isTSUnionType)(o)){i.has(o.types)||(e.push(...o.types),i.add(o.types));continue}const u="typeParameters";if((0,Ye.isTSTypeReference)(o)&&o[u]){const p=o[u],y=ha(o.typeName);if(r.has(y)){let E=r.get(y);const P=E[u];P?(P.params.push(...p.params),P.params=ya(P.params)):E=p}else r.set(y,o);continue}a.push(o)}for(const[,n]of s)a.push(n);for(const[,n]of r)a.push(n);return a}Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.default=jg;var Bg=ae,Fg=zr,Rg=d;function jg(t){const e=t.map(s=>(0,Rg.isTSTypeAnnotation)(s)?s.typeAnnotation:s),r=(0,Fg.default)(e);return r.length===1?r[0]:(0,Bg.tsUnionType)(r)}var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.buildUndefinedNode=Kg;var ma=ae;function Kg(){return(0,ma.unaryExpression)("void",(0,ma.numericLiteral)(0),!0)}var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.default=Ug;var Ta=ce(),Sa=d;const{hasOwn:fe}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function xa(t,e,r,s){return t&&typeof t.type=="string"?ba(t,e,r,s):t}function Gr(t,e,r,s){return Array.isArray(t)?t.map(i=>xa(i,e,r,s)):xa(t,e,r,s)}function Ug(t,e=!0,r=!1){return ba(t,e,r,new Map)}function ba(t,e=!0,r=!1,s){if(!t)return t;const{type:i}=t,a={type:t.type};if((0,Sa.isIdentifier)(t))a.name=t.name,fe(t,"optional")&&typeof t.optional=="boolean"&&(a.optional=t.optional),fe(t,"typeAnnotation")&&(a.typeAnnotation=e?Gr(t.typeAnnotation,!0,r,s):t.typeAnnotation),fe(t,"decorators")&&(a.decorators=e?Gr(t.decorators,!0,r,s):t.decorators);else if(fe(Ta.NODE_FIELDS,i))for(const n of Object.keys(Ta.NODE_FIELDS[i]))fe(t,n)&&(e?a[n]=(0,Sa.isFile)(t)&&n==="comments"?qt(t.comments,e,r,s):Gr(t[n],!0,r,s):a[n]=t[n]);else throw new Error(`Unknown node type: "${i}"`);return fe(t,"loc")&&(r?a.loc=null:a.loc=t.loc),fe(t,"leadingComments")&&(a.leadingComments=qt(t.leadingComments,e,r,s)),fe(t,"innerComments")&&(a.innerComments=qt(t.innerComments,e,r,s)),fe(t,"trailingComments")&&(a.trailingComments=qt(t.trailingComments,e,r,s)),fe(t,"extra")&&(a.extra=Object.assign({},t.extra)),a}function qt(t,e,r,s){return!t||!e?t:t.map(i=>{const a=s.get(i);if(a)return a;const{type:n,value:o,loc:u}=i,p={type:n,value:o,loc:u};return r&&(p.loc=null),s.set(i,p),p})}var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.default=$g;var Vg=be;function $g(t){return(0,Vg.default)(t,!1)}var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=Xg;var Yg=be;function Xg(t){return(0,Yg.default)(t)}var es={};Object.defineProperty(es,"__esModule",{value:!0}),es.default=qg;var Jg=be;function qg(t){return(0,Jg.default)(t,!0,!0)}var ts={};Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=Hg;var Wg=be;function Hg(t){return(0,Wg.default)(t,!1,!0)}var rs={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.default=zg;function zg(t,e,r){if(!r||!t)return t;const s=`${e}Comments`;return t[s]?e==="leading"?t[s]=r.concat(t[s]):t[s].push(...r):t[s]=r,t}Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=Qg;var Gg=Wt;function Qg(t,e,r,s){return(0,Gg.default)(t,e,[{type:s?"CommentLine":"CommentBlock",value:r}])}var Ht={},ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=Zg;function Zg(t,e,r){e&&r&&(e[t]=Array.from(new Set([].concat(e[t],r[t]).filter(Boolean))))}Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.default=tA;var eA=ft;function tA(t,e){(0,eA.default)("innerComments",t,e)}var zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.default=sA;var rA=ft;function sA(t,e){(0,rA.default)("leadingComments",t,e)}var Gt={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=aA;var iA=ft;function aA(t,e){(0,iA.default)("trailingComments",t,e)}Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.default=uA;var nA=Qt,oA=zt,lA=Ht;function uA(t,e){return(0,nA.default)(t,e),(0,oA.default)(t,e),(0,lA.default)(t,e),t}var ss={};Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=pA;var cA=U;function pA(t){return cA.COMMENT_KEYS.forEach(e=>{t[e]=null}),t}var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.WHILE_TYPES=v.USERWHITESPACABLE_TYPES=v.UNARYLIKE_TYPES=v.TYPESCRIPT_TYPES=v.TSTYPE_TYPES=v.TSTYPEELEMENT_TYPES=v.TSENTITYNAME_TYPES=v.TSBASETYPE_TYPES=v.TERMINATORLESS_TYPES=v.STATEMENT_TYPES=v.STANDARDIZED_TYPES=v.SCOPABLE_TYPES=v.PUREISH_TYPES=v.PROPERTY_TYPES=v.PRIVATE_TYPES=v.PATTERN_TYPES=v.PATTERNLIKE_TYPES=v.OBJECTMEMBER_TYPES=v.MODULESPECIFIER_TYPES=v.MODULEDECLARATION_TYPES=v.MISCELLANEOUS_TYPES=v.METHOD_TYPES=v.LVAL_TYPES=v.LOOP_TYPES=v.LITERAL_TYPES=v.JSX_TYPES=v.IMPORTOREXPORTDECLARATION_TYPES=v.IMMUTABLE_TYPES=v.FUNCTION_TYPES=v.FUNCTIONPARENT_TYPES=v.FUNCTIONPARAMETER_TYPES=v.FOR_TYPES=v.FORXSTATEMENT_TYPES=v.FLOW_TYPES=v.FLOWTYPE_TYPES=v.FLOWPREDICATE_TYPES=v.FLOWDECLARATION_TYPES=v.FLOWBASEANNOTATION_TYPES=v.EXPRESSION_TYPES=v.EXPRESSIONWRAPPER_TYPES=v.EXPORTDECLARATION_TYPES=v.ENUMMEMBER_TYPES=v.ENUMBODY_TYPES=v.DECLARATION_TYPES=v.CONDITIONAL_TYPES=v.COMPLETIONSTATEMENT_TYPES=v.CLASS_TYPES=v.BLOCK_TYPES=v.BLOCKPARENT_TYPES=v.BINARY_TYPES=v.ACCESSOR_TYPES=void 0;var F=ce();v.STANDARDIZED_TYPES=F.FLIPPED_ALIAS_KEYS.Standardized,v.EXPRESSION_TYPES=F.FLIPPED_ALIAS_KEYS.Expression,v.BINARY_TYPES=F.FLIPPED_ALIAS_KEYS.Binary,v.SCOPABLE_TYPES=F.FLIPPED_ALIAS_KEYS.Scopable,v.BLOCKPARENT_TYPES=F.FLIPPED_ALIAS_KEYS.BlockParent,v.BLOCK_TYPES=F.FLIPPED_ALIAS_KEYS.Block,v.STATEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.Statement,v.TERMINATORLESS_TYPES=F.FLIPPED_ALIAS_KEYS.Terminatorless,v.COMPLETIONSTATEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.CompletionStatement,v.CONDITIONAL_TYPES=F.FLIPPED_ALIAS_KEYS.Conditional,v.LOOP_TYPES=F.FLIPPED_ALIAS_KEYS.Loop,v.WHILE_TYPES=F.FLIPPED_ALIAS_KEYS.While,v.EXPRESSIONWRAPPER_TYPES=F.FLIPPED_ALIAS_KEYS.ExpressionWrapper,v.FOR_TYPES=F.FLIPPED_ALIAS_KEYS.For,v.FORXSTATEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.ForXStatement,v.FUNCTION_TYPES=F.FLIPPED_ALIAS_KEYS.Function,v.FUNCTIONPARENT_TYPES=F.FLIPPED_ALIAS_KEYS.FunctionParent,v.PUREISH_TYPES=F.FLIPPED_ALIAS_KEYS.Pureish,v.DECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.Declaration,v.FUNCTIONPARAMETER_TYPES=F.FLIPPED_ALIAS_KEYS.FunctionParameter,v.PATTERNLIKE_TYPES=F.FLIPPED_ALIAS_KEYS.PatternLike,v.LVAL_TYPES=F.FLIPPED_ALIAS_KEYS.LVal,v.TSENTITYNAME_TYPES=F.FLIPPED_ALIAS_KEYS.TSEntityName,v.LITERAL_TYPES=F.FLIPPED_ALIAS_KEYS.Literal,v.IMMUTABLE_TYPES=F.FLIPPED_ALIAS_KEYS.Immutable,v.USERWHITESPACABLE_TYPES=F.FLIPPED_ALIAS_KEYS.UserWhitespacable,v.METHOD_TYPES=F.FLIPPED_ALIAS_KEYS.Method,v.OBJECTMEMBER_TYPES=F.FLIPPED_ALIAS_KEYS.ObjectMember,v.PROPERTY_TYPES=F.FLIPPED_ALIAS_KEYS.Property,v.UNARYLIKE_TYPES=F.FLIPPED_ALIAS_KEYS.UnaryLike,v.PATTERN_TYPES=F.FLIPPED_ALIAS_KEYS.Pattern,v.CLASS_TYPES=F.FLIPPED_ALIAS_KEYS.Class;const fA=v.IMPORTOREXPORTDECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration;v.EXPORTDECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.ExportDeclaration,v.MODULESPECIFIER_TYPES=F.FLIPPED_ALIAS_KEYS.ModuleSpecifier,v.ACCESSOR_TYPES=F.FLIPPED_ALIAS_KEYS.Accessor,v.PRIVATE_TYPES=F.FLIPPED_ALIAS_KEYS.Private,v.FLOW_TYPES=F.FLIPPED_ALIAS_KEYS.Flow,v.FLOWTYPE_TYPES=F.FLIPPED_ALIAS_KEYS.FlowType,v.FLOWBASEANNOTATION_TYPES=F.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,v.FLOWDECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.FlowDeclaration,v.FLOWPREDICATE_TYPES=F.FLIPPED_ALIAS_KEYS.FlowPredicate,v.ENUMBODY_TYPES=F.FLIPPED_ALIAS_KEYS.EnumBody,v.ENUMMEMBER_TYPES=F.FLIPPED_ALIAS_KEYS.EnumMember,v.JSX_TYPES=F.FLIPPED_ALIAS_KEYS.JSX,v.MISCELLANEOUS_TYPES=F.FLIPPED_ALIAS_KEYS.Miscellaneous,v.TYPESCRIPT_TYPES=F.FLIPPED_ALIAS_KEYS.TypeScript,v.TSTYPEELEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.TSTypeElement,v.TSTYPE_TYPES=F.FLIPPED_ALIAS_KEYS.TSType,v.TSBASETYPE_TYPES=F.FLIPPED_ALIAS_KEYS.TSBaseType,v.MODULEDECLARATION_TYPES=fA;var is={},Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=dA;var er=d,as=ae;function dA(t,e){if((0,er.isBlockStatement)(t))return t;let r=[];return(0,er.isEmptyStatement)(t)?r=[]:((0,er.isStatement)(t)||((0,er.isFunction)(e)?t=(0,as.returnStatement)(t):t=(0,as.expressionStatement)(t)),r=[t]),(0,as.blockStatement)(r)}Object.defineProperty(is,"__esModule",{value:!0}),is.default=yA;var hA=Zt;function yA(t,e="body"){const r=(0,hA.default)(t[e],t);return t[e]=r,r}var ns={},tr={};Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=SA;var mA=Me,TA=Rt;function SA(t){t=t+"";let e="";for(const r of t)e+=(0,TA.isIdentifierChar)(r.codePointAt(0))?r:"-";return e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(r,s){return s?s.toUpperCase():""}),(0,mA.default)(e)||(e=`_${e}`),e||"_"}Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=bA;var xA=tr;function bA(t){return t=(0,xA.default)(t),(t==="eval"||t==="arguments")&&(t="_"+t),t}var os={};Object.defineProperty(os,"__esModule",{value:!0}),os.default=gA;var EA=d,PA=ae;function gA(t,e=t.key||t.property){return!t.computed&&(0,EA.isIdentifier)(e)&&(e=(0,PA.stringLiteral)(e.name)),e}var rr={};Object.defineProperty(rr,"__esModule",{value:!0}),rr.default=void 0;var dt=d;rr.default=AA;function AA(t){if((0,dt.isExpressionStatement)(t)&&(t=t.expression),(0,dt.isExpression)(t))return t;if((0,dt.isClass)(t)?(t.type="ClassExpression",t.abstract=!1):(0,dt.isFunction)(t)&&(t.type="FunctionExpression"),!(0,dt.isExpression)(t))throw new Error(`cannot turn ${t.type} to an expression`);return t}var ls={},sr={},ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.default=ht;var IA=ce();const Ea=Symbol(),Pa=Symbol();function ht(t,e,r){if(!t)return!1;const s=IA.VISITOR_KEYS[t.type];if(!s)return!1;r=r||{};const i=e(t,r);if(i!==void 0)switch(i){case Ea:return!1;case Pa:return!0}for(const a of s){const n=t[a];if(n){if(Array.isArray(n)){for(const o of n)if(ht(o,e,r))return!0}else if(ht(n,e,r))return!0}}return!1}ht.skip=Ea,ht.stop=Pa;var ar={};Object.defineProperty(ar,"__esModule",{value:!0}),ar.default=CA;var vA=U;const ga=["tokens","start","end","loc","raw","rawValue"],NA=[...vA.COMMENT_KEYS,"comments",...ga];function CA(t,e={}){const r=e.preserveComments?ga:NA;for(const i of r)t[i]!=null&&(t[i]=void 0);for(const i of Object.keys(t))i[0]==="_"&&t[i]!=null&&(t[i]=void 0);const s=Object.getOwnPropertySymbols(t);for(const i of s)t[i]=null}Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=DA;var wA=ir,OA=ar;function DA(t,e){return(0,wA.default)(t,OA.default,e),t}Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=Be;var Aa=d,LA=be,kA=sr;function Be(t,e=t.key){let r;return t.kind==="method"?Be.increment()+"":((0,Aa.isIdentifier)(e)?r=e.name:(0,Aa.isStringLiteral)(e)?r=JSON.stringify(e.value):r=JSON.stringify((0,kA.default)((0,LA.default)(e))),t.computed&&(r=`[${r}]`),t.static&&(r=`static:${r}`),r)}Be.uid=0,Be.increment=function(){return Be.uid>=Number.MAX_SAFE_INTEGER?Be.uid=0:Be.uid++};var nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=void 0;var or=d,MA=ae;nr.default=_A;function _A(t,e){if((0,or.isStatement)(t))return t;let r=!1,s;if((0,or.isClass)(t))r=!0,s="ClassDeclaration";else if((0,or.isFunction)(t))r=!0,s="FunctionDeclaration";else if((0,or.isAssignmentExpression)(t))return(0,MA.expressionStatement)(t);if(r&&!t.id&&(s=!1),!s){if(e)return!1;throw new Error(`cannot turn ${t.type} to a statement`)}return t.type=s,t}var lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.default=void 0;var BA=Me,Z=ae;lr.default=us;const FA=Function.call.bind(Object.prototype.toString);function RA(t){return FA(t)==="[object RegExp]"}function jA(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}function us(t){if(t===void 0)return(0,Z.identifier)("undefined");if(t===!0||t===!1)return(0,Z.booleanLiteral)(t);if(t===null)return(0,Z.nullLiteral)();if(typeof t=="string")return(0,Z.stringLiteral)(t);if(typeof t=="number"){let e;if(Number.isFinite(t))e=(0,Z.numericLiteral)(Math.abs(t));else{let r;Number.isNaN(t)?r=(0,Z.numericLiteral)(0):r=(0,Z.numericLiteral)(1),e=(0,Z.binaryExpression)("/",r,(0,Z.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,Z.unaryExpression)("-",e)),e}if(typeof t=="bigint")return t<0?(0,Z.unaryExpression)("-",(0,Z.bigIntLiteral)(-t)):(0,Z.bigIntLiteral)(t);if(RA(t)){const e=t.source,r=/\/([a-z]*)$/.exec(t.toString())[1];return(0,Z.regExpLiteral)(e,r)}if(Array.isArray(t))return(0,Z.arrayExpression)(t.map(us));if(jA(t)){const e=[];for(const r of Object.keys(t)){let s,i=!1;(0,BA.default)(r)?r==="__proto__"?(i=!0,s=(0,Z.stringLiteral)(r)):s=(0,Z.identifier)(r):s=(0,Z.stringLiteral)(r),e.push((0,Z.objectProperty)(s,us(t[r]),i))}return(0,Z.objectExpression)(e)}throw new Error("don't know how to turn this value into a node")}var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=UA;var KA=ae;function UA(t,e,r=!1){return t.object=(0,KA.memberExpression)(t.object,t.property,t.computed),t.property=e,t.computed=!!r,t}var ps={};Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=$A;var Ia=U,VA=Gt;function $A(t,e){if(!t||!e)return t;for(const r of Ia.INHERIT_KEYS.optional)t[r]==null&&(t[r]=e[r]);for(const r of Object.keys(e))r[0]==="_"&&r!=="__clone"&&(t[r]=e[r]);for(const r of Ia.INHERIT_KEYS.force)t[r]=e[r];return(0,VA.default)(t,e),t}var ur={},va;function YA(){if(va)return ur;va=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=r;var t=ae,e=Ds();function r(s,i){if((0,e.isSuper)(s.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return s.object=(0,t.memberExpression)(i,s.object),s}return ur}var fs={};Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=XA;function XA(t){const e=[].concat(t),r=Object.create(null);for(;e.length;){const s=e.pop();if(s)switch(s.type){case"ArrayPattern":e.push(...s.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":e.push(s.left);break;case"ObjectPattern":e.push(...s.properties);break;case"ObjectProperty":e.push(s.value);break;case"RestElement":case"UpdateExpression":e.push(s.argument);break;case"UnaryExpression":s.operator==="delete"&&e.push(s.argument);break;case"Identifier":r[s.name]=s;break}}return r}var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.default=ds;var Ee=d;function ds(t,e,r,s){const i=[].concat(t),a=Object.create(null);for(;i.length;){const n=i.shift();if(!n||s&&((0,Ee.isAssignmentExpression)(n)||(0,Ee.isUnaryExpression)(n)||(0,Ee.isUpdateExpression)(n)))continue;if((0,Ee.isIdentifier)(n)){e?(a[n.name]=a[n.name]||[]).push(n):a[n.name]=n;continue}if((0,Ee.isExportDeclaration)(n)&&!(0,Ee.isExportAllDeclaration)(n)){(0,Ee.isDeclaration)(n.declaration)&&i.push(n.declaration);continue}if(r){if((0,Ee.isFunctionDeclaration)(n)){i.push(n.id);continue}if((0,Ee.isFunctionExpression)(n))continue}const o=ds.keys[n.type];if(o)for(let u=0;u<o.length;u++){const p=o[u],y=n[p];y&&(Array.isArray(y)?i.push(...y):i.push(y))}}return a}const JA={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};ds.keys=JA;var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),cr.default=void 0;var qA=Xe;cr.default=WA;function WA(t,e){return(0,qA.default)(t,e,!0)}var hs={};Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=zA;var oe=d;function HA(t){return(0,oe.isNullLiteral)(t)?"null":(0,oe.isRegExpLiteral)(t)?`/${t.pattern}/${t.flags}`:(0,oe.isTemplateLiteral)(t)?t.quasis.map(e=>e.value.raw).join(""):t.value!==void 0?String(t.value):null}function Na(t){if(!t.computed||(0,oe.isLiteral)(t.key))return t.key}function zA(t,e){if("id"in t&&t.id)return{name:t.id.name,originalNode:t.id};let r="",s;if((0,oe.isObjectProperty)(e,{value:t})?s=Na(e):(0,oe.isObjectMethod)(t)||(0,oe.isClassMethod)(t)?(s=Na(t),t.kind==="get"?r="get ":t.kind==="set"&&(r="set ")):(0,oe.isVariableDeclarator)(e,{init:t})?s=e.id:(0,oe.isAssignmentExpression)(e,{operator:"=",right:t})&&(s=e.left),!s)return null;const i=(0,oe.isLiteral)(s)?HA(s):(0,oe.isIdentifier)(s)?s.name:(0,oe.isPrivateName)(s)?s.id.name:null;return i==null?null:{name:r+i,originalNode:s}}var ys={};Object.defineProperty(ys,"__esModule",{value:!0}),ys.default=QA;var GA=ce();function QA(t,e,r){typeof e=="function"&&(e={enter:e});const{enter:s,exit:i}=e;ms(t,s,i,r,[])}function ms(t,e,r,s,i){const a=GA.VISITOR_KEYS[t.type];if(a){e&&e(t,i,s);for(const n of a){const o=t[n];if(Array.isArray(o))for(let u=0;u<o.length;u++){const p=o[u];p&&(i.push({node:t,key:n,index:u}),ms(p,e,r,s,i),i.pop())}else o&&(i.push({node:t,key:n}),ms(o,e,r,s,i),i.pop())}r&&r(t,i,s)}}var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=e1;var ZA=Xe;function e1(t,e,r){if(r&&t.type==="Identifier"&&e.type==="ObjectProperty"&&r.type==="ObjectExpression")return!1;const s=ZA.default.keys[e.type];if(s)for(let i=0;i<s.length;i++){const a=s[i],n=e[a];if(Array.isArray(n)){if(n.includes(t))return!0}else if(n===t)return!0}return!1}var Ss={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.default=s1;var t1=d,r1=Symbol.for("var used to be block scoped");function s1(t){return(0,t1.isVariableDeclaration)(t)&&(t.kind!=="var"||t[r1])}Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=a1;var Ca=d,i1=pr;function a1(t){return(0,Ca.isFunctionDeclaration)(t)||(0,Ca.isClassDeclaration)(t)||(0,i1.default)(t)}var xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.default=l1;var n1=Kr(),o1=d;function l1(t){return(0,n1.default)(t.type,"Immutable")?!0:(0,o1.isIdentifier)(t)?t.name==="undefined":!1}var bs={};Object.defineProperty(bs,"__esModule",{value:!0}),bs.default=Es;var wa=ce();function Es(t,e){if(typeof t!="object"||typeof e!="object"||t==null||e==null)return t===e;if(t.type!==e.type)return!1;const r=Object.keys(wa.NODE_FIELDS[t.type]||t.type),s=wa.VISITOR_KEYS[t.type];for(const i of r){const a=t[i],n=e[i];if(typeof a!=typeof n)return!1;if(!(a==null&&n==null)){if(a==null||n==null)return!1;if(Array.isArray(a)){if(!Array.isArray(n)||a.length!==n.length)return!1;for(let o=0;o<a.length;o++)if(!Es(a[o],n[o]))return!1;continue}if(typeof a=="object"&&!(s!=null&&s.includes(i))){for(const o of Object.keys(a))if(a[o]!==n[o])return!1;continue}if(!Es(a,n))return!1}}return!0}var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.default=u1;function u1(t,e,r){switch(e.type){case"MemberExpression":case"OptionalMemberExpression":return e.property===t?!!e.computed:e.object===t;case"JSXMemberExpression":return e.object===t;case"VariableDeclarator":return e.init===t;case"ArrowFunctionExpression":return e.body===t;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return e.key===t?!!e.computed:!1;case"ObjectProperty":return e.key===t?!!e.computed:!r||r.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":return e.key===t?!!e.computed:!0;case"ClassPrivateProperty":return e.key!==t;case"ClassDeclaration":case"ClassExpression":return e.superClass===t;case"AssignmentExpression":return e.right===t;case"AssignmentPattern":return e.right===t;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return r!=null&&r.source?!1:e.local===t;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return e.key!==t;case"TSEnumMember":return e.id!==t;case"TSPropertySignature":return e.key===t?!!e.computed:!0}return!0}var gs={};Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=c1;var Fe=d;function c1(t,e){return(0,Fe.isBlockStatement)(t)&&((0,Fe.isFunction)(e)||(0,Fe.isCatchClause)(e))?!1:(0,Fe.isPattern)(t)&&((0,Fe.isFunction)(e)||(0,Fe.isCatchClause)(e))?!0:(0,Fe.isScopable)(t)}var As={};Object.defineProperty(As,"__esModule",{value:!0}),As.default=p1;var Oa=d;function p1(t){return(0,Oa.isImportDefaultSpecifier)(t)||(0,Oa.isIdentifier)(t.imported||t.exported,{name:"default"})}var Is={};Object.defineProperty(Is,"__esModule",{value:!0}),Is.default=h1;var f1=Me;const d1=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function h1(t){return(0,f1.default)(t)&&!d1.has(t)}var vs={};Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=T1;var y1=d,m1=Symbol.for("var used to be block scoped");function T1(t){return(0,y1.isVariableDeclaration)(t,{kind:"var"})&&!t[m1]}var Ns={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=fr;var S1=Xe,Re=d,ws=ae,Os=Jt,x1=be;function fr(t,e){const r=[];let s=!0;for(const i of t)if((0,Re.isEmptyStatement)(i)||(s=!1),(0,Re.isExpression)(i))r.push(i);else if((0,Re.isExpressionStatement)(i))r.push(i.expression);else if((0,Re.isVariableDeclaration)(i)){if(i.kind!=="var")return;for(const a of i.declarations){const n=(0,S1.default)(a);for(const o of Object.keys(n))e.push({kind:i.kind,id:(0,x1.default)(n[o])});a.init&&r.push((0,ws.assignmentExpression)("=",a.id,a.init))}s=!0}else if((0,Re.isIfStatement)(i)){const a=i.consequent?fr([i.consequent],e):(0,Os.buildUndefinedNode)(),n=i.alternate?fr([i.alternate],e):(0,Os.buildUndefinedNode)();if(!a||!n)return;r.push((0,ws.conditionalExpression)(i.test,a,n))}else if((0,Re.isBlockStatement)(i)){const a=fr(i.body,e);if(!a)return;r.push(a)}else if((0,Re.isEmptyStatement)(i))t.indexOf(i)===0&&(s=!0);else return;return s&&r.push((0,Os.buildUndefinedNode)()),r.length===1?r[0]:(0,ws.sequenceExpression)(r)}Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=E1;var b1=Cs;function E1(t,e){if(!(t!=null&&t.length))return;const r=[],s=(0,b1.default)(t,r);if(s){for(const i of r)e.push(i);return s}}var Da;function Ds(){return Da||(Da=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(t,"__internal__deprecationWarning",{enumerable:!0,get:function(){return G1.default}}),Object.defineProperty(t,"addComment",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"addComments",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"appendToMemberExpression",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"assertNode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:!0,get:function(){return z1.default}}),Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"cloneDeep",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"cloneNode",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"cloneWithoutLoc",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"createFlowUnionType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"createTSUnionType",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ensureBlock",{enumerable:!0,get:function(){return dr.default}}),Object.defineProperty(t,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return C1.default}}),Object.defineProperty(t,"getFunctionName",{enumerable:!0,get:function(){return O1.default}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return w1.default}}),Object.defineProperty(t,"inheritInnerComments",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"inheritLeadingComments",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"inheritTrailingComments",{enumerable:!0,get:function(){return Je.default}}),Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(t,"inheritsComments",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(t,"is",{enumerable:!0,get:function(){return k1.default}}),Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return M1.default}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return _1.default}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return B1.default}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return F1.default}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return R1.default}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return j1.default}}),Object.defineProperty(t,"isPlaceholderType",{enumerable:!0,get:function(){return K1.default}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return U1.default}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return V1.default}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return $1.default}}),Object.defineProperty(t,"isType",{enumerable:!0,get:function(){return Y1.default}}),Object.defineProperty(t,"isValidES3Identifier",{enumerable:!0,get:function(){return X1.default}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return J1.default}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return q1.default}}),Object.defineProperty(t,"matchesPattern",{enumerable:!0,get:function(){return W1.default}}),Object.defineProperty(t,"prependToMemberExpression",{enumerable:!0,get:function(){return G.default}}),t.react=void 0,Object.defineProperty(t,"removeComments",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(t,"removeProperties",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,"removePropertiesDeep",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return L1.default}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return Ls.default}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return ks.default}}),Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return mt.default}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return Ms.default}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return hr.default}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return yr.default}}),Object.defineProperty(t,"traverseFast",{enumerable:!0,get:function(){return D1.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return H1.default}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return J.default}});var r=Ot,s=Rr,i=VS(),a=qr,n=h;Object.keys(n).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===n[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return n[D]}})});var o=Yt,u=Wr,p=Hr,y=Jt;Object.keys(y).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===y[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return y[D]}})});var E=ae;Object.keys(E).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===E[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return E[D]}})});var P=be,g=Qr,C=Zr,A=es,O=ts,I=rs,N=Wt,B=Ht,K=zt,re=Gt,Je=Qt,Ce=ss,ne=v;Object.keys(ne).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===ne[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return ne[D]}})});var yt=U;Object.keys(yt).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===yt[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return yt[D]}})});var dr=is,Ls=ns,ks=Zt,mt=os,Ms=rr,hr=tr,L=ls,j=nr,J=lr,R=ce();Object.keys(R).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===R[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return R[D]}})});var H=cs,ee=ps,G=YA(),z=ar,Q=sr,Pe=Xt,we=fs,C1=Xe,w1=cr,O1=hs,yr=ys;Object.keys(yr).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===yr[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return yr[D]}})});var D1=ir,L1=it,k1=nt(),M1=Ts,_1=Ss,B1=xs,F1=pr,R1=$t,j1=bs,K1=Di(),U1=Ps,V1=gs,$1=As,Y1=Kr(),X1=Is,J1=Me,q1=vs,W1=Lt,H1=Jr(),z1=Dt,_s=d;Object.keys(_s).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===_s[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return _s[D]}})});var G1=$e,Q1=Ns;t.react={isReactComponent:r.default,isCompatTag:s.default,buildChildren:i.default},t.toSequenceExpression=Q1.default,process.env.BABEL_TYPES_8_BREAKING&&console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!")}(Fr)),Fr}var P1=Ds();const g1=(t,e)=>{const r=s=>{if(!s)return;s.type==="CallExpression"&&s.callee.type==="Identifier"&&s.callee.name==="render"&&e.push(s);const i=P1.VISITOR_KEYS[s.type]??[];for(const a of i){const n=s[a];if(Array.isArray(n))for(const o of n)o&&typeof o.type=="string"&&r(o);else n&&typeof n.type=="string"&&r(n)}};r(t)},La=(t,e,r)=>{const s=[];if(g1(e,s),!s.length)return!1;const i=s.map(a=>({start:a.start??0,end:a.end??0})).filter(({start:a,end:n})=>a>=0&&n>a).sort((a,n)=>n.start-a.start);for(const{start:a,end:n}of i){const o=r.slice(a,n);t.overwrite(a,n,`__lithentRenderOnce(() => ${o})`)}return!0},A1=t=>t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="mount",I1=(t,e)=>{var i;const r=e.start??0,s=((i=e.typeAnnotation)==null?void 0:i.start)??e.end??0;return t.slice(r,s)},v1=(t,e)=>{if(!t)return"props";switch(t.type){case"Identifier":return t.name;case"ObjectPattern":case"ArrayPattern":return I1(e,t);default:return"props"}},ka=(t,e)=>{const r=[],s=i=>{if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return;const a=i.declarations[0];if(!a.init||!A1(a.init)||a.init.arguments.length===0)return;const n=a.init.arguments[0];if(n.type!=="ArrowFunctionExpression"||n.body.type!=="BlockStatement")return;const o=n.body,u=n.params[1],p=v1(u,e),y=o.body.length>0?o.body[0].start??o.start??0:o.start??0,E=a.id&&a.id.type==="Identifier"?a.id.name:null,P=i.end??o.end??y;r.push({insertPos:y,propsExpression:p,componentName:E,declarationEnd:P})};for(const i of t.program.body){if(i.type==="VariableDeclaration"){s(i);continue}i.type==="ExportNamedDeclaration"&&i.declaration&&i.declaration.type==="VariableDeclaration"&&s(i.declaration)}return r},Ma=t=>{const e=gi(t),{match:r,targetExports:s,shouldTransform:i,importInsertionPos:a,headerSnippet:n}=e;if(!i||!r)return{transformed:!1,code:t.code,map:null};const o=ka(e.ast,t.code),u=Array.from(new Set(o.map(O=>O.componentName).filter(O=>!!O))),p=new St(t.code);La(p,e.ast,t.code);const y=Us(s,u).trimStart();n&&p.appendLeft(a,n);const E=r.index>0?t.code[r.index-1]:void 0,P=r.index>0&&E!==`
|
|
194
|
-
`,
|
|
235
|
+
`)}`)}return J.shapeOf=L,J}function yt(){function L(j){var J;let R=j;for(;j;){const{type:H}=R;if(H==="OptionalCallExpression"){if(R.optional)return;R=R.callee;continue}if(H==="OptionalMemberExpression"){if(R.optional)return;R=R.object;continue}break}throw new TypeError(`Non-optional ${j.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(J=R)==null?void 0:J.type}`)}return L}function dr(...L){function j(...J){for(const R of L)R(...J)}if(j.chainOf=L,L.length>=2&&"type"in L[0]&&L[0].type==="array"&&!("each"in L[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return j}const Ls=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),ks=new Set(["default","optional","deprecated","validate"]),mt={};function _s(...L){return(j,J={})=>{let R=J.aliases;if(!R){var H;J.inherits&&(R=(H=mt[J.inherits].aliases)==null?void 0:H.slice()),R??(R=[]),J.aliases=R}const ee=L.filter(G=>!R.includes(G));R.unshift(...ee),hr(j,J)}}function hr(L,j={}){const J=j.inherits&&mt[j.inherits]||{};let R=j.fields;if(!R&&(R={},J.fields)){const z=Object.getOwnPropertyNames(J.fields);for(const Q of z){const Pe=J.fields[Q],we=Pe.default;if(Array.isArray(we)?we.length>0:we&&typeof we=="object")throw new Error("field defaults can only be primitives or empty arrays currently");R[Q]={default:Array.isArray(we)?[]:we,optional:Pe.optional,deprecated:Pe.deprecated,validate:Pe.validate}}}const H=j.visitor||J.visitor||[],ee=j.aliases||J.aliases||[],G=j.builder||J.builder||j.visitor||[];for(const z of Object.keys(j))if(!Ls.has(z))throw new Error(`Unknown type option "${z}" on ${L}`);j.deprecatedAlias&&(o[j.deprecatedAlias]=L);for(const z of H.concat(G))R[z]=R[z]||{};for(const z of Object.keys(R)){const Q=R[z];Q.default!==void 0&&!G.includes(z)&&(Q.optional=!0),Q.default===void 0?Q.default=null:!Q.validate&&Q.default!=null&&(Q.validate=Ne(y(Q.default)));for(const Pe of Object.keys(Q))if(!ks.has(Pe))throw new Error(`Unknown field key "${Pe}" on ${L}.${z}`)}r[L]=j.visitor=H,n[L]=j.builder=G,a[L]=j.fields=R,s[L]=j.aliases=ee,ee.forEach(z=>{i[z]=i[z]||[],i[z].push(L)}),j.validate&&(u[L]=j.validate),j.unionShape&&(p[L]=j.unionShape),mt[L]=j}return X}var Ji;function Kt(){if(Ji)return te;Ji=1,Object.defineProperty(te,"__esModule",{value:!0}),te.patternLikeCommon=te.importAttributes=te.functionTypeAnnotationCommon=te.functionDeclarationCommon=te.functionCommon=te.classMethodOrPropertyUnionShapeCommon=te.classMethodOrPropertyCommon=te.classMethodOrDeclareMethodCommon=void 0;var t=nt(),e=_e,r=Rt,s=lt,i=U,a=Se();const n=(A=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,a.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:A?(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});te.classMethodOrPropertyUnionShapeCommon=n;const o=(0,a.defineAliasedType)("Standardized");o("ArrayExpression",{fields:{elements:{validate:(0,a.arrayOf)((0,a.assertNodeOrValueType)("null","Expression","SpreadElement")),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]}),o("AssignmentExpression",{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){const A=(0,a.assertOneOf)(...i.ASSIGNMENT_OPERATORS),O=(0,a.assertOneOf)("=");return function(I,C,B){((0,t.default)("Pattern",I.left)?O:A)(I,C,B)}}(),{oneOf:i.ASSIGNMENT_OPERATORS}):(0,a.assertValueType)("string")},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,a.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,a.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),o("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,a.assertOneOf)(...i.BINARY_OPERATORS)},left:{validate:function(){const A=(0,a.assertNodeType)("Expression"),O=(0,a.assertNodeType)("Expression","PrivateName");return Object.assign(function(C,B,K){(C.operator==="in"?O:A)(C,B,K)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,a.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),o("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),o("Directive",{visitor:["value"],fields:{value:{validate:(0,a.assertNodeType)("DirectiveLiteral")}}}),o("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),o("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,a.arrayOfType)("Directive"),default:[]},body:(0,a.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),o("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),o("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,a.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,a.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,a.assertNodeType)("TypeParameterInstantiation"),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),o("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,a.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]}),o("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Expression")},alternate:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),o("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),o("DebuggerStatement",{aliases:["Statement"]}),o("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),o("EmptyStatement",{aliases:["Statement"]}),o("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),o("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,a.assertNodeType)("Program")},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertEach)((0,a.assertNodeType)("CommentBlock","CommentLine")):Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,a.assertEach)(Object.assign(()=>{},{type:"any"})),optional:!0}}}),o("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,a.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,a.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},update:{validate:(0,a.assertNodeType)("Expression"),optional:!0},body:{validate:(0,a.assertNodeType)("Statement")}}});const u=()=>({params:(0,a.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});te.functionCommon=u;const p=()=>({returnType:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});te.functionTypeAnnotationCommon=p;const y=()=>Object.assign({},u(),{declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}});te.functionDeclarationCommon=y,o("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},y(),p(),{body:{validate:(0,a.assertNodeType)("BlockStatement")},predicate:{validate:(0,a.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){const A=(0,a.assertNodeType)("Identifier");return function(O,I,C){(0,t.default)("ExportDefaultDeclaration",O)||A(C,"id",C.id)}}():void 0}),o("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},u(),p(),{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,a.assertNodeType)("BlockStatement")},predicate:{validate:(0,a.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});const E=()=>({typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}});te.patternLikeCommon=E,o("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},E(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("string"),Object.assign(function(A,O,I){if(!(0,e.default)(I,!1))throw new TypeError(`"${I}" is not a valid identifier name`)},{type:"string"})):(0,a.assertValueType)("string")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(A,O,I){const C=/\.(\w+)$/.exec(O.toString());if(!C)return;const[,B]=C,K={computed:!1};if(B==="property"){if((0,t.default)("MemberExpression",A,K)||(0,t.default)("OptionalMemberExpression",A,K))return}else if(B==="key"){if((0,t.default)("Property",A,K)||(0,t.default)("Method",A,K))return}else if(B==="exported"){if((0,t.default)("ExportSpecifier",A))return}else if(B==="imported"){if((0,t.default)("ImportSpecifier",A,{imported:I}))return}else if(B==="meta"&&(0,t.default)("MetaProperty",A,{meta:I}))return;if(((0,r.isKeyword)(I.name)||(0,r.isReservedWord)(I.name,!1))&&I.name!=="this")throw new TypeError(`"${I.name}" is not a valid identifier`)}:void 0}),o("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,a.assertNodeType)("Statement")}}}),o("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("StringLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,a.chain)((0,a.assertValueType)("number"),Object.assign(function(A,O,I){},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),o("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,a.assertValueType)("string")},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("string"),Object.assign(function(A,O,I){const C=/[^dgimsuvy]/.exec(I);if(C)throw new TypeError(`"${C[0]}" is not a valid RegExp flag`)},{type:"string"})):(0,a.assertValueType)("string"),default:""}}}),o("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,a.assertOneOf)(...i.LOGICAL_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}}}),o("MemberExpression",{builder:["object","property","computed",...process.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,a.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,a.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,a.assertNodeType)("Expression","Super")},property:{validate:function(){const A=(0,a.assertNodeType)("Identifier","PrivateName"),O=(0,a.assertNodeType)("Expression"),I=function(C,B,K){(C.computed?O:A)(C,B,K)};return I.oneOfNodeTypes=["Expression","Identifier","PrivateName"],I}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,a.assertValueType)("boolean"),optional:!0}})}),o("NewExpression",{inherits:"CallExpression"}),o("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,a.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,a.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,a.arrayOfType)("Directive"),default:[]},body:(0,a.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]}),o("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,a.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}}),o("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},n(),{fields:Object.assign({},u(),p(),{kind:Object.assign({validate:(0,a.assertOneOf)("method","get","set")},process.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),O=(0,a.assertNodeType)("Expression"),I=function(C,B,K){(C.computed?O:A)(C,B,K)};return I.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],I}()},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,a.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]})),o("ObjectProperty",{builder:["key","value","computed","shorthand",...process.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,a.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),O=(0,a.assertNodeType)("Expression");return Object.assign(function(C,B,K){(C.computed?O:A)(C,B,K)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,a.assertNodeType)("Expression","PatternLike")},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),Object.assign(function(A,O,I){if(I){if(A.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,t.default)("Identifier",A.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})):(0,a.assertValueType)("boolean"),default:!1},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){const A=(0,a.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),O=(0,a.assertNodeType)("Expression");return function(I,C,B){((0,t.default)("ObjectPattern",I)?A:O)(B,"value",B.value)}}():void 0}),o("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},E(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(A,O){const I=/(\w+)\[(\d+)\]/.exec(O.toString());if(!I)throw new Error("Internal Babel error: malformed key.");const[,C,B]=I;if(A[C].length>+B+1)throw new TypeError(`RestElement must be last element of ${C}`)}:void 0}),o("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),o("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,a.validateArrayOfType)("Expression")},aliases:["Expression"]}),o("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}}}),o("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},consequent:(0,a.validateArrayOfType)("Statement")}}),o("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,a.assertNodeType)("Expression")},cases:(0,a.validateArrayOfType)("SwitchCase")}}),o("ThisExpression",{aliases:["Expression"]}),o("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),o("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertNodeType)("BlockStatement"),Object.assign(function(A){if(!A.handler&&!A.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]})):(0,a.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,a.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,a.assertNodeType)("BlockStatement")}}}),o("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:(0,a.assertOneOf)(...i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),o("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","MemberExpression"):(0,a.assertNodeType)("Expression")},operator:{validate:(0,a.assertOneOf)(...i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),o("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},kind:{validate:(0,a.assertOneOf)("var","let","const","using","await using")},declarations:(0,a.validateArrayOfType)("VariableDeclarator")},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{const A=(0,a.assertNodeType)("Identifier","Placeholder"),O=(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),I=(0,a.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(C,B,K){const{kind:re,declarations:Je}=K,Ne=(0,t.default)("ForXStatement",C,{left:K});if(Ne&&Je.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${C.type}`);for(const ne of Je)re==="const"||re==="let"||re==="var"?!Ne&&!ne.init?A(ne,"id",ne.id):O(ne,"id",ne.id):I(ne,"id",ne.id)}})():void 0}),o("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,a.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,a.assertValueType)("boolean")},init:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),o("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),o("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},E(),{left:{validate:(0,a.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,a.assertNodeType)("Expression")},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}})}),o("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},E(),{elements:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeOrValueType)("null","PatternLike")))}})}),o("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},u(),p(),{expression:{validate:(0,a.assertValueType)("boolean")},body:{validate:(0,a.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,a.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})}),o("ClassBody",{visitor:["body"],fields:{body:(0,a.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),o("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,a.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,a.assertNodeType)("Expression")},superTypeParameters:{validate:(0,a.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,a.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,a.assertNodeType)("InterfaceExtends"),optional:!0}}}),o("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,a.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,a.assertNodeType)("Expression")},superTypeParameters:{validate:(0,a.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,a.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,a.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,a.assertValueType)("boolean"),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){const A=(0,a.assertNodeType)("Identifier");return function(O,I,C){(0,t.default)("ExportDefaultDeclaration",O)||A(C,"id",C.id)}}():void 0});const P=te.importAttributes={attributes:{optional:!0,validate:(0,a.arrayOfType)("ImportAttribute")},assertions:{deprecated:!0,optional:!0,validate:(0,a.arrayOfType)("ImportAttribute")}};o("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,a.assertNodeType)("StringLiteral")},exportKind:(0,a.validateOptional)((0,a.assertOneOf)("type","value"))},P)}),o("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,a.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,a.validateOptional)((0,a.assertOneOf)("value"))}}),o("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertNodeType)("Declaration"),Object.assign(function(A,O,I){if(I&&A.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(I&&A.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["Declaration"]})):(0,a.assertNodeType)("Declaration")}},P,{specifiers:{default:[],validate:(0,a.arrayOf)(function(){const A=(0,a.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),O=(0,a.assertNodeType)("ExportSpecifier");return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(I,C,B){(I.source?A:O)(I,C,B)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):A}())},source:{validate:(0,a.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,a.validateOptional)((0,a.assertOneOf)("type","value"))})}),o("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")},exported:{validate:(0,a.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,a.assertOneOf)("type","value"),optional:!0}}}),o("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,a.assertNodeType)("VariableDeclaration","LVal");const A=(0,a.assertNodeType)("VariableDeclaration"),O=(0,a.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign(function(I,C,B){(0,t.default)("VariableDeclaration",B)?A(I,C,B):O(I,C,B)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")},await:{default:!1}}}),o("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},P,{module:{optional:!0,validate:(0,a.assertValueType)("boolean")},phase:{default:null,validate:(0,a.assertOneOf)("source","defer")},specifiers:(0,a.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,a.assertNodeType)("StringLiteral")},importKind:{validate:(0,a.assertOneOf)("type","typeof","value"),optional:!0}})}),o("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")}}}),o("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")}}}),o("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,a.assertNodeType)("Identifier")},imported:{validate:(0,a.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,a.assertOneOf)("type","typeof","value"),optional:!0}}}),o("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,a.assertOneOf)("source","defer")},source:{validate:(0,a.assertNodeType)("Expression")},options:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),o("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertNodeType)("Identifier"),Object.assign(function(A,O,I){let C;switch(I.name){case"function":C="sent";break;case"new":C="target";break;case"import":C="meta";break}if(!(0,t.default)("Identifier",A.property,{name:C}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]})):(0,a.assertNodeType)("Identifier")},property:{validate:(0,a.assertNodeType)("Identifier")}}});const g=()=>({abstract:{validate:(0,a.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,a.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},key:{validate:(0,a.chain)(function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),O=(0,a.assertNodeType)("Expression");return function(I,C,B){(I.computed?O:A)(I,C,B)}}(),(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});te.classMethodOrPropertyCommon=g;const N=()=>Object.assign({},u(),g(),{params:(0,a.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,a.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0}});return te.classMethodOrDeclareMethodCommon=N,o("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},n(),{fields:Object.assign({},N(),p(),{body:{validate:(0,a.assertNodeType)("BlockStatement")}})})),o("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},E(),{properties:(0,a.validateArrayOfType)("RestElement","ObjectProperty")})}),o("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),o("Super",{aliases:["Expression"]}),o("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,a.assertNodeType)("Expression")},quasi:{validate:(0,a.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,a.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),o("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,a.chain)((0,a.assertShape)({raw:{validate:(0,a.assertValueType)("string")},cooked:{validate:(0,a.assertValueType)("string"),optional:!0}}),function(O){const I=O.value.raw;let C=!1;const B=()=>{throw new Error("Internal @babel/types error.")},{str:K,firstInvalidLoc:re}=(0,s.readStringContents)("template",I,0,0,0,{unterminated(){C=!0},strictNumericEscape:B,invalidEscapeSequence:B,numericSeparatorInEscapeSequence:B,unexpectedNumericSeparator:B,invalidDigit:B,invalidCodePoint:B});if(!C)throw new Error("Invalid raw");O.value.cooked=re?null:K})},tail:{default:!1}}}),o("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,a.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","TSType")),function(A,O,I){if(A.quasis.length!==I.length+1)throw new TypeError(`Number of ${A.type} quasis should be exactly one more than the number of expressions.
|
|
236
|
+
Expected ${I.length+1} quasis but got ${A.quasis.length}`)})}}}),o("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),Object.assign(function(A,O,I){if(I&&!A.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})):(0,a.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),o("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),o("Import",{aliases:["Expression"]}),o("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),o("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,a.assertNodeType)("Identifier")}}}),o("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},property:{validate:function(){const A=(0,a.assertNodeType)("Identifier"),O=(0,a.assertNodeType)("Expression");return Object.assign(function(C,B,K){(C.computed?O:A)(C,B,K)},{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),(0,a.assertOptionalChainStart)()):(0,a.assertValueType)("boolean")}}}),o("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,a.assertNodeType)("Expression")},arguments:(0,a.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,a.chain)((0,a.assertValueType)("boolean"),(0,a.assertOptionalChainStart)()):(0,a.assertValueType)("boolean")},typeArguments:{validate:(0,a.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,a.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),o("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},n(),{fields:Object.assign({},g(),{value:{validate:(0,a.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,a.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,a.assertValueType)("boolean"),optional:!0},declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},variance:{validate:(0,a.assertNodeType)("Variance"),optional:!0}})})),o("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},n(!0),{fields:Object.assign({},g(),{key:{validate:(0,a.chain)(function(){const A=(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),O=(0,a.assertNodeType)("Expression");return function(I,C,B){(I.computed?O:A)(I,C,B)}}(),(0,a.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,a.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,a.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,a.assertValueType)("boolean"),optional:!0},declare:{validate:(0,a.assertValueType)("boolean"),optional:!0},variance:{validate:(0,a.assertNodeType)("Variance"),optional:!0}})})),o("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,a.assertNodeType)("PrivateName")},value:{validate:(0,a.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,a.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,a.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,a.assertValueType)("boolean"),default:!1},readonly:{validate:(0,a.assertValueType)("boolean"),optional:!0},optional:{validate:(0,a.assertValueType)("boolean"),optional:!0},definite:{validate:(0,a.assertValueType)("boolean"),optional:!0},variance:{validate:(0,a.assertNodeType)("Variance"),optional:!0}}}),o("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},N(),p(),{kind:{validate:(0,a.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,a.assertNodeType)("PrivateName")},body:{validate:(0,a.assertNodeType)("BlockStatement")}})}),o("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,a.assertNodeType)("Identifier")}}}),o("StaticBlock",{visitor:["body"],fields:{body:(0,a.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),o("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,a.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,a.assertNodeType)("StringLiteral")}}}),te}var qi={},Wi;function sh(){if(Wi)return qi;Wi=1;var t=Kt(),e=Se();const r=(0,e.defineAliasedType)("Flow"),s=i=>{const a=i==="DeclareClass";r(i,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...a?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),extends:(0,e.validateOptional)((0,e.arrayOfType)("InterfaceExtends"))},a?{mixins:(0,e.validateOptional)((0,e.arrayOfType)("InterfaceExtends")),implements:(0,e.validateOptional)((0,e.arrayOfType)("ClassImplements"))}:{},{body:(0,e.validateType)("ObjectTypeAnnotation")})})};return r("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,e.validateType)("FlowType")}}),r("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterInstantiation")}}),s("DeclareClass"),r("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),predicate:(0,e.validateOptionalType)("DeclaredPredicate")}}),s("DeclareInterface"),r("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier","StringLiteral"),body:(0,e.validateType)("BlockStatement"),kind:(0,e.validateOptional)((0,e.assertOneOf)("CommonJS","ES"))}}),r("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,e.validateType)("TypeAnnotation")}}),r("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),right:(0,e.validateType)("FlowType")}}),r("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,e.validateOptionalType)("FlowType"),impltype:(0,e.validateOptionalType)("FlowType")}}),r("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier")}}),r("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,e.validateOptionalType)("Flow"),specifiers:(0,e.validateOptional)((0,e.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,e.validateOptionalType)("StringLiteral"),default:(0,e.validateOptional)((0,e.assertValueType)("boolean"))},t.importAttributes)}),r("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,e.validateType)("StringLiteral"),exportKind:(0,e.validateOptional)((0,e.assertOneOf)("type","value"))},t.importAttributes)}),r("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,e.validateType)("Flow")}}),r("ExistsTypeAnnotation",{aliases:["FlowType"]}),r("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),params:(0,e.validateArrayOfType)("FunctionTypeParam"),rest:(0,e.validateOptionalType)("FunctionTypeParam"),this:(0,e.validateOptionalType)("FunctionTypeParam"),returnType:(0,e.validateType)("FlowType")}}),r("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,e.validateOptionalType)("Identifier"),typeAnnotation:(0,e.validateType)("FlowType"),optional:(0,e.validateOptional)((0,e.assertValueType)("boolean"))}}),r("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,e.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterInstantiation")}}),r("InferredPredicate",{aliases:["FlowPredicate"]}),r("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,e.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterInstantiation")}}),s("InterfaceDeclaration"),r("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,e.validateOptional)((0,e.arrayOfType)("InterfaceExtends")),body:(0,e.validateType)("ObjectTypeAnnotation")}}),r("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,e.validateType)("FlowType")}}),r("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,e.validate)((0,e.assertValueType)("number"))}}),r("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,e.validate)((0,e.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,e.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,e.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,e.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,e.assertValueType)("boolean"),default:!1},inexact:(0,e.validateOptional)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,e.validateType)("Identifier"),value:(0,e.validateType)("FlowType"),optional:(0,e.validate)((0,e.assertValueType)("boolean")),static:(0,e.validate)((0,e.assertValueType)("boolean")),method:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,e.validateType)("FlowType"),static:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,e.validateOptionalType)("Identifier"),key:(0,e.validateType)("FlowType"),value:(0,e.validateType)("FlowType"),static:(0,e.validate)((0,e.assertValueType)("boolean")),variance:(0,e.validateOptionalType)("Variance")}}),r("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,e.validateType)("Identifier","StringLiteral"),value:(0,e.validateType)("FlowType"),kind:(0,e.validate)((0,e.assertOneOf)("init","get","set")),static:(0,e.validate)((0,e.assertValueType)("boolean")),proto:(0,e.validate)((0,e.assertValueType)("boolean")),optional:(0,e.validate)((0,e.assertValueType)("boolean")),variance:(0,e.validateOptionalType)("Variance"),method:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,e.validateType)("FlowType")}}),r("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,e.validateOptionalType)("FlowType"),impltype:(0,e.validateType)("FlowType")}}),r("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,e.validateType)("Identifier"),qualification:(0,e.validateType)("Identifier","QualifiedTypeIdentifier")}}),r("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,e.validate)((0,e.assertValueType)("string"))}}),r("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,e.validateType)("FlowType")}}),r("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,e.validateType)("Identifier"),typeParameters:(0,e.validateOptionalType)("TypeParameterDeclaration"),right:(0,e.validateType)("FlowType")}}),r("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,e.validateType)("FlowType")}}),r("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,e.validateType)("Expression"),typeAnnotation:(0,e.validateType)("TypeAnnotation")}}),r("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,e.validate)((0,e.assertValueType)("string")),bound:(0,e.validateOptionalType)("TypeAnnotation"),default:(0,e.validateOptionalType)("FlowType"),variance:(0,e.validateOptionalType)("Variance")}}),r("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,e.validate)((0,e.arrayOfType)("TypeParameter"))}}),r("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,e.validate)((0,e.arrayOfType)("FlowType"))}}),r("Variance",{builder:["kind"],fields:{kind:(0,e.validate)((0,e.assertOneOf)("minus","plus"))}}),r("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),r("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,e.validateType)("Identifier"),body:(0,e.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}}),r("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,e.validate)((0,e.assertValueType)("boolean")),members:(0,e.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,e.validate)((0,e.assertValueType)("boolean")),members:(0,e.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,e.validate)((0,e.assertValueType)("boolean")),members:(0,e.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,e.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,e.validate)((0,e.assertValueType)("boolean"))}}),r("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,e.validateType)("Identifier"),init:(0,e.validateType)("BooleanLiteral")}}),r("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,e.validateType)("Identifier"),init:(0,e.validateType)("NumericLiteral")}}),r("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,e.validateType)("Identifier"),init:(0,e.validateType)("StringLiteral")}}),r("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,e.validateType)("Identifier")}}),r("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,e.validateType)("FlowType"),indexType:(0,e.validateType)("FlowType")}}),r("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,e.validateType)("FlowType"),indexType:(0,e.validateType)("FlowType"),optional:(0,e.validate)((0,e.assertValueType)("boolean"))}}),qi}var Hi={},zi;function ih(){if(zi)return Hi;zi=1;var t=Se();const e=(0,t.defineAliasedType)("JSX");return e("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,t.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,t.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),e("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,t.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),e("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,t.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,t.assertNodeType)("JSXClosingElement")},children:(0,t.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,t.assertValueType)("boolean"),optional:!0}})}),e("JSXEmptyExpression",{}),e("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,t.assertNodeType)("Expression","JSXEmptyExpression")}}}),e("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}}}),e("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,t.assertValueType)("string")}}}),e("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,t.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,t.assertNodeType)("JSXIdentifier")}}}),e("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,t.assertNodeType)("JSXIdentifier")},name:{validate:(0,t.assertNodeType)("JSXIdentifier")}}}),e("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,t.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,t.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,t.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,t.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),e("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,t.assertNodeType)("Expression")}}}),e("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,t.assertValueType)("string")}}}),e("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,t.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,t.assertNodeType)("JSXClosingFragment")},children:(0,t.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),e("JSXOpeningFragment",{aliases:["Immutable"]}),e("JSXClosingFragment",{aliases:["Immutable"]}),Hi}var Gi={},xe={},Qi;function Zi(){if(Qi)return xe;Qi=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.PLACEHOLDERS_FLIPPED_ALIAS=xe.PLACEHOLDERS_ALIAS=xe.PLACEHOLDERS=void 0;var t=Se();const e=xe.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],r=xe.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const i of e){const a=t.ALIAS_KEYS[i];a!=null&&a.length&&(r[i]=a)}const s=xe.PLACEHOLDERS_FLIPPED_ALIAS={};return Object.keys(r).forEach(i=>{r[i].forEach(a=>{hasOwnProperty.call(s,a)||(s[a]=[]),s[a].push(i)})}),xe}var ea;function ah(){if(ea)return Gi;ea=1;var t=Se(),e=Zi(),r=Kt();const s=(0,t.defineAliasedType)("Miscellaneous");return s("Noop",{visitor:[]}),s("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,t.assertNodeType)("Identifier")},expectedNode:{validate:(0,t.assertOneOf)(...e.PLACEHOLDERS)}},(0,r.patternLikeCommon)())}),s("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,t.assertValueType)("string")}}}),Gi}var ta={},ra;function nh(){if(ra)return ta;ra=1;var t=Se();return(0,t.default)("ArgumentPlaceholder",{}),(0,t.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,t.assertNodeType)("Expression")},callee:{validate:(0,t.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}}),(0,t.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}}}),(0,t.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,t.assertNodeType)("BlockStatement")},async:{validate:(0,t.assertValueType)("boolean"),default:!1}}}),(0,t.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,t.assertNodeType)("Identifier")}}}),(0,t.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,t.validateArrayOfType)("ObjectProperty","SpreadElement")}}),(0,t.default)("TupleExpression",{fields:{elements:{validate:(0,t.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,t.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,t.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,t.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,t.assertNodeType)("Program")}},aliases:["Expression"]}),(0,t.default)("TopicReference",{aliases:["Expression"]}),(0,t.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,t.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,t.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]}),(0,t.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]}),ta}var sa={},ia;function oh(){if(ia)return sa;ia=1;var t=Se(),e=Kt(),r=nt();const s=(0,t.defineAliasedType)("TypeScript"),i=(0,t.assertValueType)("boolean"),a=()=>({returnType:{validate:(0,t.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,t.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});s("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,t.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,t.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,t.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,t.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,t.arrayOfType)("Decorator"),optional:!0}}}),s("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,e.functionDeclarationCommon)(),a())}),s("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,e.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,e.classMethodOrDeclareMethodCommon)(),a())})),s("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,t.validateType)("TSEntityName"),right:(0,t.validateType)("Identifier")}});const n=()=>({typeParameters:(0,t.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,t.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation")}),o={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:n()};s("TSCallSignatureDeclaration",o),s("TSConstructSignatureDeclaration",o);const u=()=>({key:(0,t.validateType)("Expression"),computed:{default:!1},optional:(0,t.validateOptional)(i)});s("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},u(),{readonly:(0,t.validateOptional)(i),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,t.assertOneOf)("get","set")}})}),s("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},n(),u(),{kind:{validate:(0,t.assertOneOf)("method","get","set")}})}),s("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,t.validateOptional)(i),static:(0,t.validateOptional)(i),parameters:(0,t.validateArrayOfType)("Identifier"),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation")}});const p=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const g of p)s(g,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});s("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const y={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};s("TSFunctionType",Object.assign({},y,{fields:n()})),s("TSConstructorType",Object.assign({},y,{fields:Object.assign({},n(),{abstract:(0,t.validateOptional)(i)})})),s("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,t.validateType)("TSEntityName"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}}),s("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,t.validateType)("Identifier","TSThisType"),typeAnnotation:(0,t.validateOptionalType)("TSTypeAnnotation"),asserts:(0,t.validateOptional)(i)}}),s("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,t.validateType)("TSEntityName","TSImportType"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}}),s("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,t.validateArrayOfType)("TSTypeElement")}}),s("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,t.validateType)("TSType")}}),s("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,t.validateArrayOfType)("TSType","TSNamedTupleMember")}}),s("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,t.validateType)("TSType")}}),s("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,t.validateType)("TSType")}}),s("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,t.validateType)("Identifier"),optional:{validate:i,default:!1},elementType:(0,t.validateType)("TSType")}});const E={aliases:["TSType"],visitor:["types"],fields:{types:(0,t.validateArrayOfType)("TSType")}};s("TSUnionType",E),s("TSIntersectionType",E),s("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,t.validateType)("TSType"),extendsType:(0,t.validateType)("TSType"),trueType:(0,t.validateType)("TSType"),falseType:(0,t.validateType)("TSType")}}),s("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,t.validateType)("TSTypeParameter")}}),s("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,t.validateType)("TSType")}}),s("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,t.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,t.validateType)("TSType")}}),s("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,t.validateType)("TSType"),indexType:(0,t.validateType)("TSType")}}),s("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,t.validateType)("TSTypeParameter")},{readonly:(0,t.validateOptional)((0,t.assertOneOf)(!0,!1,"+","-")),optional:(0,t.validateOptional)((0,t.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,t.validateOptionalType)("TSType"),nameType:(0,t.validateOptionalType)("TSType")})}),s("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,t.validateArrayOfType)("TemplateElement"),types:{validate:(0,t.chain)((0,t.assertValueType)("array"),(0,t.assertEach)((0,t.assertNodeType)("TSType")),function(g,N,A){if(g.quasis.length!==A.length+1)throw new TypeError(`Number of ${g.type} quasis should be exactly one more than the number of types.
|
|
237
|
+
Expected ${A.length+1} quasis but got ${g.quasis.length}`)})}}}),s("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const g=(0,t.assertNodeType)("NumericLiteral","BigIntLiteral"),N=(0,t.assertOneOf)("-"),A=(0,t.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral"),O=function(C,B,K){(0,r.default)("UnaryExpression",K)?(N(K,"operator",K.operator),g(K,"argument",K.argument)):A(C,B,K)};return O.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],O}()}}}),s("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,t.validateType)("TSEntityName"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}}),s("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,t.validateOptional)(i),id:(0,t.validateType)("Identifier"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,t.validateOptional)((0,t.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,t.validateType)("TSInterfaceBody")}}),s("TSInterfaceBody",{visitor:["body"],fields:{body:(0,t.validateArrayOfType)("TSTypeElement")}}),s("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,t.validateOptional)(i),id:(0,t.validateType)("Identifier"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,t.validateType)("TSType")}}),s("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,t.validateType)("Expression"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation")}});const P={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,t.validateType)("Expression"),typeAnnotation:(0,t.validateType)("TSType")}};return s("TSAsExpression",P),s("TSSatisfiesExpression",P),s("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,t.validateType)("TSType"),expression:(0,t.validateType)("Expression")}}),s("TSEnumBody",{visitor:["members"],fields:{members:(0,t.validateArrayOfType)("TSEnumMember")}}),s("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,t.validateOptional)(i),const:(0,t.validateOptional)(i),id:(0,t.validateType)("Identifier"),members:(0,t.validateArrayOfType)("TSEnumMember"),initializer:(0,t.validateOptionalType)("Expression"),body:(0,t.validateOptionalType)("TSEnumBody")}}),s("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,t.validateType)("Identifier","StringLiteral"),initializer:(0,t.validateOptionalType)("Expression")}}),s("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,t.assertOneOf)("global","module","namespace")},declare:(0,t.validateOptional)(i)},{global:(0,t.validateOptional)(i)},{id:(0,t.validateType)("Identifier","StringLiteral"),body:(0,t.validateType)("TSModuleBlock","TSModuleDeclaration")})}),s("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,t.validateArrayOfType)("Statement")}}),s("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:{argument:(0,t.validateType)("StringLiteral"),qualifier:(0,t.validateOptionalType)("TSEntityName"),typeParameters:(0,t.validateOptionalType)("TSTypeParameterInstantiation"),options:{validate:(0,t.assertNodeType)("ObjectExpression"),optional:!0}}}),s("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,t.validate)(i)},{id:(0,t.validateType)("Identifier"),moduleReference:(0,t.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,t.assertOneOf)("type","value"),optional:!0}})}),s("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,t.validateType)("StringLiteral")}}),s("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,t.validateType)("Expression")}}),s("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,t.validateType)("Expression")}}),s("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,t.validateType)("Identifier")}}),s("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,t.assertNodeType)("TSType")}}}),s("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,t.validateArrayOfType)("TSType")}}),s("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,t.validateArrayOfType)("TSTypeParameter")}}),s("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,t.assertValueType)("string")},in:{validate:(0,t.assertValueType)("boolean"),optional:!0},out:{validate:(0,t.assertValueType)("boolean"),optional:!0},const:{validate:(0,t.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,t.assertNodeType)("TSType"),optional:!0},default:{validate:(0,t.assertNodeType)("TSType"),optional:!0}}}),sa}var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.DEPRECATED_ALIASES=void 0,Ut.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"};var aa;function ce(){return aa||(aa=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ALIAS_KEYS",{enumerable:!0,get:function(){return e.ALIAS_KEYS}}),Object.defineProperty(t,"BUILDER_KEYS",{enumerable:!0,get:function(){return e.BUILDER_KEYS}}),Object.defineProperty(t,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return s.DEPRECATED_ALIASES}}),Object.defineProperty(t,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return e.DEPRECATED_KEYS}}),Object.defineProperty(t,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return e.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(t,"NODE_FIELDS",{enumerable:!0,get:function(){return e.NODE_FIELDS}}),Object.defineProperty(t,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return e.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(t,"NODE_UNION_SHAPES__PRIVATE",{enumerable:!0,get:function(){return e.NODE_UNION_SHAPES__PRIVATE}}),Object.defineProperty(t,"PLACEHOLDERS",{enumerable:!0,get:function(){return r.PLACEHOLDERS}}),Object.defineProperty(t,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return r.PLACEHOLDERS_ALIAS}}),Object.defineProperty(t,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return r.PLACEHOLDERS_FLIPPED_ALIAS}}),t.TYPES=void 0,Object.defineProperty(t,"VISITOR_KEYS",{enumerable:!0,get:function(){return e.VISITOR_KEYS}}),Kt(),sh(),ih(),ah(),nh(),oh();var e=Se(),r=Zi(),s=Ut;Object.keys(s.DEPRECATED_ALIASES).forEach(i=>{e.FLIPPED_ALIAS_KEYS[i]=e.FLIPPED_ALIAS_KEYS[s.DEPRECATED_ALIASES[i]]});for(const{types:i,set:a}of e.allExpandedTypes)for(const n of i){const o=e.FLIPPED_ALIAS_KEYS[n];o?o.forEach(a.add,a):a.add(n)}t.TYPES=[].concat(Object.keys(e.VISITOR_KEYS),Object.keys(e.FLIPPED_ALIAS_KEYS),Object.keys(e.DEPRECATED_KEYS))}(jr)),jr}var na;function Jr(){if(na)return ke;na=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.default=e,ke.validateChild=i,ke.validateField=s,ke.validateInternal=r;var t=ce();function e(a,n,o){if(!a)return;const u=t.NODE_FIELDS[a.type];if(!u)return;const p=u[n];s(a,n,o,p),i(a,n,o)}function r(a,n,o,u,p){if(a!=null&&a.validate&&!(a.optional&&u==null)&&(a.validate(n,o,u),p)){var y;const E=u.type;if(E==null)return;(y=t.NODE_PARENT_VALIDATIONS[E])==null||y.call(t.NODE_PARENT_VALIDATIONS,n,o,u)}}function s(a,n,o,u){u!=null&&u.validate&&(u.optional&&o==null||u.validate(a,n,o))}function i(a,n,o){var u;const p=o==null?void 0:o.type;p!=null&&((u=t.NODE_PARENT_VALIDATIONS[p])==null||u.call(t.NODE_PARENT_VALIDATIONS,a,n,o))}return ke}Object.defineProperty(f,"__esModule",{value:!0}),f.anyTypeAnnotation=Uy,f.argumentPlaceholder=mT,f.arrayExpression=ph,f.arrayPattern=ny,f.arrayTypeAnnotation=Vy,f.arrowFunctionExpression=oy,f.assignmentExpression=fh,f.assignmentPattern=ay,f.awaitExpression=wy,f.bigIntLiteral=ch,f.binaryExpression=dh,f.bindExpression=TT,f.blockStatement=Th,f.booleanLiteral=Fh,f.booleanLiteralTypeAnnotation=Xy,f.booleanTypeAnnotation=$y,f.breakStatement=Sh,f.callExpression=xh,f.catchClause=bh,f.classAccessorProperty=My,f.classBody=ly,f.classDeclaration=cy,f.classExpression=uy,f.classImplements=Jy,f.classMethod=Py,f.classPrivateMethod=Fy,f.classPrivateProperty=By,f.classProperty=_y,f.conditionalExpression=Eh,f.continueStatement=Ph,f.debuggerStatement=gh,f.decimalLiteral=gT,f.declareClass=qy,f.declareExportAllDeclaration=rm,f.declareExportDeclaration=tm,f.declareFunction=Wy,f.declareInterface=Hy,f.declareModule=zy,f.declareModuleExports=Gy,f.declareOpaqueType=Zy,f.declareTypeAlias=Qy,f.declareVariable=em,f.declaredPredicate=sm,f.decorator=ST,f.directive=yh,f.directiveLiteral=mh,f.doExpression=xT,f.doWhileStatement=Ah,f.emptyStatement=Ih,f.emptyTypeAnnotation=hm,f.enumBooleanBody=Vm,f.enumBooleanMember=Jm,f.enumDeclaration=Um,f.enumDefaultedMember=Hm,f.enumNumberBody=$m,f.enumNumberMember=qm,f.enumStringBody=Xm,f.enumStringMember=Wm,f.enumSymbolBody=Ym,f.existsTypeAnnotation=im,f.exportAllDeclaration=py,f.exportDefaultDeclaration=fy,f.exportDefaultSpecifier=bT,f.exportNamedDeclaration=dy,f.exportNamespaceSpecifier=Dy,f.exportSpecifier=hy,f.expressionStatement=vh,f.file=Ch,f.forInStatement=Nh,f.forOfStatement=yy,f.forStatement=wh,f.functionDeclaration=Oh,f.functionExpression=Dh,f.functionTypeAnnotation=am,f.functionTypeParam=nm,f.genericTypeAnnotation=om,f.identifier=Lh,f.ifStatement=kh,f.import=Oy,f.importAttribute=Ky,f.importDeclaration=my,f.importDefaultSpecifier=Ty,f.importExpression=by,f.importNamespaceSpecifier=Sy,f.importSpecifier=xy,f.indexedAccessType=zm,f.inferredPredicate=lm,f.interfaceDeclaration=cm,f.interfaceExtends=um,f.interfaceTypeAnnotation=pm,f.interpreterDirective=hh,f.intersectionTypeAnnotation=fm,f.jSXAttribute=f.jsxAttribute=Qm,f.jSXClosingElement=f.jsxClosingElement=Zm,f.jSXClosingFragment=f.jsxClosingFragment=fT,f.jSXElement=f.jsxElement=eT,f.jSXEmptyExpression=f.jsxEmptyExpression=tT,f.jSXExpressionContainer=f.jsxExpressionContainer=rT,f.jSXFragment=f.jsxFragment=cT,f.jSXIdentifier=f.jsxIdentifier=iT,f.jSXMemberExpression=f.jsxMemberExpression=aT,f.jSXNamespacedName=f.jsxNamespacedName=nT,f.jSXOpeningElement=f.jsxOpeningElement=oT,f.jSXOpeningFragment=f.jsxOpeningFragment=pT,f.jSXSpreadAttribute=f.jsxSpreadAttribute=lT,f.jSXSpreadChild=f.jsxSpreadChild=sT,f.jSXText=f.jsxText=uT,f.labeledStatement=_h,f.logicalExpression=Rh,f.memberExpression=jh,f.metaProperty=Ey,f.mixedTypeAnnotation=dm,f.moduleExpression=AT,f.newExpression=Kh,f.noop=dT,f.nullLiteral=Bh,f.nullLiteralTypeAnnotation=Yy,f.nullableTypeAnnotation=ym,f.numberLiteral=$S,f.numberLiteralTypeAnnotation=mm,f.numberTypeAnnotation=Tm,f.numericLiteral=oa,f.objectExpression=Vh,f.objectMethod=$h,f.objectPattern=gy,f.objectProperty=Xh,f.objectTypeAnnotation=Sm,f.objectTypeCallProperty=bm,f.objectTypeIndexer=Em,f.objectTypeInternalSlot=xm,f.objectTypeProperty=Pm,f.objectTypeSpreadProperty=gm,f.opaqueType=Am,f.optionalCallExpression=ky,f.optionalIndexedAccessType=Gm,f.optionalMemberExpression=Ly,f.parenthesizedExpression=qh,f.pipelineBareFunction=CT,f.pipelinePrimaryTopicReference=NT,f.pipelineTopicExpression=vT,f.placeholder=hT,f.privateName=Ry,f.program=Uh,f.qualifiedTypeIdentifier=Im,f.recordExpression=ET,f.regExpLiteral=la,f.regexLiteral=XS,f.restElement=ua,f.restProperty=YS,f.returnStatement=Yh,f.sequenceExpression=Jh,f.spreadElement=ca,f.spreadProperty=JS,f.staticBlock=jy,f.stringLiteral=Mh,f.stringLiteralTypeAnnotation=vm,f.stringTypeAnnotation=Cm,f.super=Ay,f.switchCase=Wh,f.switchStatement=Hh,f.symbolTypeAnnotation=Nm,f.taggedTemplateExpression=Iy,f.templateElement=vy,f.templateLiteral=Cy,f.thisExpression=zh,f.thisTypeAnnotation=wm,f.throwStatement=Gh,f.topicReference=IT,f.tryStatement=Qh,f.tSAnyKeyword=f.tsAnyKeyword=jT,f.tSArrayType=f.tsArrayType=aS,f.tSAsExpression=f.tsAsExpression=IS,f.tSBigIntKeyword=f.tsBigIntKeyword=UT,f.tSBooleanKeyword=f.tsBooleanKeyword=KT,f.tSCallSignatureDeclaration=f.tsCallSignatureDeclaration=_T,f.tSConditionalType=f.tsConditionalType=fS,f.tSConstructSignatureDeclaration=f.tsConstructSignatureDeclaration=MT,f.tSConstructorType=f.tsConstructorType=eS,f.tSDeclareFunction=f.tsDeclareFunction=DT,f.tSDeclareMethod=f.tsDeclareMethod=LT,f.tSEnumBody=f.tsEnumBody=NS,f.tSEnumDeclaration=f.tsEnumDeclaration=wS,f.tSEnumMember=f.tsEnumMember=OS,f.tSExportAssignment=f.tsExportAssignment=FS,f.tSExpressionWithTypeArguments=f.tsExpressionWithTypeArguments=bS,f.tSExternalModuleReference=f.tsExternalModuleReference=MS,f.tSFunctionType=f.tsFunctionType=ZT,f.tSImportEqualsDeclaration=f.tsImportEqualsDeclaration=_S,f.tSImportType=f.tsImportType=kS,f.tSIndexSignature=f.tsIndexSignature=RT,f.tSIndexedAccessType=f.tsIndexedAccessType=mS,f.tSInferType=f.tsInferType=dS,f.tSInstantiationExpression=f.tsInstantiationExpression=AS,f.tSInterfaceBody=f.tsInterfaceBody=PS,f.tSInterfaceDeclaration=f.tsInterfaceDeclaration=ES,f.tSIntersectionType=f.tsIntersectionType=pS,f.tSIntrinsicKeyword=f.tsIntrinsicKeyword=VT,f.tSLiteralType=f.tsLiteralType=xS,f.tSMappedType=f.tsMappedType=TS,f.tSMethodSignature=f.tsMethodSignature=FT,f.tSModuleBlock=f.tsModuleBlock=LS,f.tSModuleDeclaration=f.tsModuleDeclaration=DS,f.tSNamedTupleMember=f.tsNamedTupleMember=uS,f.tSNamespaceExportDeclaration=f.tsNamespaceExportDeclaration=RS,f.tSNeverKeyword=f.tsNeverKeyword=$T,f.tSNonNullExpression=f.tsNonNullExpression=BS,f.tSNullKeyword=f.tsNullKeyword=XT,f.tSNumberKeyword=f.tsNumberKeyword=YT,f.tSObjectKeyword=f.tsObjectKeyword=JT,f.tSOptionalType=f.tsOptionalType=oS,f.tSParameterProperty=f.tsParameterProperty=OT,f.tSParenthesizedType=f.tsParenthesizedType=hS,f.tSPropertySignature=f.tsPropertySignature=BT,f.tSQualifiedName=f.tsQualifiedName=kT,f.tSRestType=f.tsRestType=lS,f.tSSatisfiesExpression=f.tsSatisfiesExpression=vS,f.tSStringKeyword=f.tsStringKeyword=qT,f.tSSymbolKeyword=f.tsSymbolKeyword=WT,f.tSTemplateLiteralType=f.tsTemplateLiteralType=SS,f.tSThisType=f.tsThisType=QT,f.tSTupleType=f.tsTupleType=nS,f.tSTypeAliasDeclaration=f.tsTypeAliasDeclaration=gS,f.tSTypeAnnotation=f.tsTypeAnnotation=jS,f.tSTypeAssertion=f.tsTypeAssertion=CS,f.tSTypeLiteral=f.tsTypeLiteral=iS,f.tSTypeOperator=f.tsTypeOperator=yS,f.tSTypeParameter=f.tsTypeParameter=VS,f.tSTypeParameterDeclaration=f.tsTypeParameterDeclaration=US,f.tSTypeParameterInstantiation=f.tsTypeParameterInstantiation=KS,f.tSTypePredicate=f.tsTypePredicate=rS,f.tSTypeQuery=f.tsTypeQuery=sS,f.tSTypeReference=f.tsTypeReference=tS,f.tSUndefinedKeyword=f.tsUndefinedKeyword=HT,f.tSUnionType=f.tsUnionType=cS,f.tSUnknownKeyword=f.tsUnknownKeyword=zT,f.tSVoidKeyword=f.tsVoidKeyword=GT,f.tupleExpression=PT,f.tupleTypeAnnotation=Om,f.typeAlias=Lm,f.typeAnnotation=km,f.typeCastExpression=_m,f.typeParameter=Mm,f.typeParameterDeclaration=Bm,f.typeParameterInstantiation=Fm,f.typeofTypeAnnotation=Dm,f.unaryExpression=Zh,f.unionTypeAnnotation=Rm,f.updateExpression=ey,f.v8IntrinsicIdentifier=yT,f.variableDeclaration=ty,f.variableDeclarator=ry,f.variance=jm,f.voidPattern=wT,f.voidTypeAnnotation=Km,f.whileStatement=sy,f.withStatement=iy,f.yieldExpression=Ny;var lh=Jr(),Vt=$e,uh=Se();const{validateInternal:c}=lh,{NODE_FIELDS:b}=uh;function ch(t){typeof t=="bigint"&&(t=t.toString());const e={type:"BigIntLiteral",value:t},r=b.BigIntLiteral;return c(r.value,e,"value",t),e}function ph(t=[]){const e={type:"ArrayExpression",elements:t},r=b.ArrayExpression;return c(r.elements,e,"elements",t,1),e}function fh(t,e,r){const s={type:"AssignmentExpression",operator:t,left:e,right:r},i=b.AssignmentExpression;return c(i.operator,s,"operator",t),c(i.left,s,"left",e,1),c(i.right,s,"right",r,1),s}function dh(t,e,r){const s={type:"BinaryExpression",operator:t,left:e,right:r},i=b.BinaryExpression;return c(i.operator,s,"operator",t),c(i.left,s,"left",e,1),c(i.right,s,"right",r,1),s}function hh(t){const e={type:"InterpreterDirective",value:t},r=b.InterpreterDirective;return c(r.value,e,"value",t),e}function yh(t){const e={type:"Directive",value:t},r=b.Directive;return c(r.value,e,"value",t,1),e}function mh(t){const e={type:"DirectiveLiteral",value:t},r=b.DirectiveLiteral;return c(r.value,e,"value",t),e}function Th(t,e=[]){const r={type:"BlockStatement",body:t,directives:e},s=b.BlockStatement;return c(s.body,r,"body",t,1),c(s.directives,r,"directives",e,1),r}function Sh(t=null){const e={type:"BreakStatement",label:t},r=b.BreakStatement;return c(r.label,e,"label",t,1),e}function xh(t,e){const r={type:"CallExpression",callee:t,arguments:e},s=b.CallExpression;return c(s.callee,r,"callee",t,1),c(s.arguments,r,"arguments",e,1),r}function bh(t=null,e){const r={type:"CatchClause",param:t,body:e},s=b.CatchClause;return c(s.param,r,"param",t,1),c(s.body,r,"body",e,1),r}function Eh(t,e,r){const s={type:"ConditionalExpression",test:t,consequent:e,alternate:r},i=b.ConditionalExpression;return c(i.test,s,"test",t,1),c(i.consequent,s,"consequent",e,1),c(i.alternate,s,"alternate",r,1),s}function Ph(t=null){const e={type:"ContinueStatement",label:t},r=b.ContinueStatement;return c(r.label,e,"label",t,1),e}function gh(){return{type:"DebuggerStatement"}}function Ah(t,e){const r={type:"DoWhileStatement",test:t,body:e},s=b.DoWhileStatement;return c(s.test,r,"test",t,1),c(s.body,r,"body",e,1),r}function Ih(){return{type:"EmptyStatement"}}function vh(t){const e={type:"ExpressionStatement",expression:t},r=b.ExpressionStatement;return c(r.expression,e,"expression",t,1),e}function Ch(t,e=null,r=null){const s={type:"File",program:t,comments:e,tokens:r},i=b.File;return c(i.program,s,"program",t,1),c(i.comments,s,"comments",e,1),c(i.tokens,s,"tokens",r),s}function Nh(t,e,r){const s={type:"ForInStatement",left:t,right:e,body:r},i=b.ForInStatement;return c(i.left,s,"left",t,1),c(i.right,s,"right",e,1),c(i.body,s,"body",r,1),s}function wh(t=null,e=null,r=null,s){const i={type:"ForStatement",init:t,test:e,update:r,body:s},a=b.ForStatement;return c(a.init,i,"init",t,1),c(a.test,i,"test",e,1),c(a.update,i,"update",r,1),c(a.body,i,"body",s,1),i}function Oh(t=null,e,r,s=!1,i=!1){const a={type:"FunctionDeclaration",id:t,params:e,body:r,generator:s,async:i},n=b.FunctionDeclaration;return c(n.id,a,"id",t,1),c(n.params,a,"params",e,1),c(n.body,a,"body",r,1),c(n.generator,a,"generator",s),c(n.async,a,"async",i),a}function Dh(t=null,e,r,s=!1,i=!1){const a={type:"FunctionExpression",id:t,params:e,body:r,generator:s,async:i},n=b.FunctionExpression;return c(n.id,a,"id",t,1),c(n.params,a,"params",e,1),c(n.body,a,"body",r,1),c(n.generator,a,"generator",s),c(n.async,a,"async",i),a}function Lh(t){const e={type:"Identifier",name:t},r=b.Identifier;return c(r.name,e,"name",t),e}function kh(t,e,r=null){const s={type:"IfStatement",test:t,consequent:e,alternate:r},i=b.IfStatement;return c(i.test,s,"test",t,1),c(i.consequent,s,"consequent",e,1),c(i.alternate,s,"alternate",r,1),s}function _h(t,e){const r={type:"LabeledStatement",label:t,body:e},s=b.LabeledStatement;return c(s.label,r,"label",t,1),c(s.body,r,"body",e,1),r}function Mh(t){const e={type:"StringLiteral",value:t},r=b.StringLiteral;return c(r.value,e,"value",t),e}function oa(t){const e={type:"NumericLiteral",value:t},r=b.NumericLiteral;return c(r.value,e,"value",t),e}function Bh(){return{type:"NullLiteral"}}function Fh(t){const e={type:"BooleanLiteral",value:t},r=b.BooleanLiteral;return c(r.value,e,"value",t),e}function la(t,e=""){const r={type:"RegExpLiteral",pattern:t,flags:e},s=b.RegExpLiteral;return c(s.pattern,r,"pattern",t),c(s.flags,r,"flags",e),r}function Rh(t,e,r){const s={type:"LogicalExpression",operator:t,left:e,right:r},i=b.LogicalExpression;return c(i.operator,s,"operator",t),c(i.left,s,"left",e,1),c(i.right,s,"right",r,1),s}function jh(t,e,r=!1,s=null){const i={type:"MemberExpression",object:t,property:e,computed:r,optional:s},a=b.MemberExpression;return c(a.object,i,"object",t,1),c(a.property,i,"property",e,1),c(a.computed,i,"computed",r),c(a.optional,i,"optional",s),i}function Kh(t,e){const r={type:"NewExpression",callee:t,arguments:e},s=b.NewExpression;return c(s.callee,r,"callee",t,1),c(s.arguments,r,"arguments",e,1),r}function Uh(t,e=[],r="script",s=null){const i={type:"Program",body:t,directives:e,sourceType:r,interpreter:s},a=b.Program;return c(a.body,i,"body",t,1),c(a.directives,i,"directives",e,1),c(a.sourceType,i,"sourceType",r),c(a.interpreter,i,"interpreter",s,1),i}function Vh(t){const e={type:"ObjectExpression",properties:t},r=b.ObjectExpression;return c(r.properties,e,"properties",t,1),e}function $h(t="method",e,r,s,i=!1,a=!1,n=!1){const o={type:"ObjectMethod",kind:t,key:e,params:r,body:s,computed:i,generator:a,async:n},u=b.ObjectMethod;return c(u.kind,o,"kind",t),c(u.key,o,"key",e,1),c(u.params,o,"params",r,1),c(u.body,o,"body",s,1),c(u.computed,o,"computed",i),c(u.generator,o,"generator",a),c(u.async,o,"async",n),o}function Xh(t,e,r=!1,s=!1,i=null){const a={type:"ObjectProperty",key:t,value:e,computed:r,shorthand:s,decorators:i},n=b.ObjectProperty;return c(n.key,a,"key",t,1),c(n.value,a,"value",e,1),c(n.computed,a,"computed",r),c(n.shorthand,a,"shorthand",s),c(n.decorators,a,"decorators",i,1),a}function ua(t){const e={type:"RestElement",argument:t},r=b.RestElement;return c(r.argument,e,"argument",t,1),e}function Yh(t=null){const e={type:"ReturnStatement",argument:t},r=b.ReturnStatement;return c(r.argument,e,"argument",t,1),e}function Jh(t){const e={type:"SequenceExpression",expressions:t},r=b.SequenceExpression;return c(r.expressions,e,"expressions",t,1),e}function qh(t){const e={type:"ParenthesizedExpression",expression:t},r=b.ParenthesizedExpression;return c(r.expression,e,"expression",t,1),e}function Wh(t=null,e){const r={type:"SwitchCase",test:t,consequent:e},s=b.SwitchCase;return c(s.test,r,"test",t,1),c(s.consequent,r,"consequent",e,1),r}function Hh(t,e){const r={type:"SwitchStatement",discriminant:t,cases:e},s=b.SwitchStatement;return c(s.discriminant,r,"discriminant",t,1),c(s.cases,r,"cases",e,1),r}function zh(){return{type:"ThisExpression"}}function Gh(t){const e={type:"ThrowStatement",argument:t},r=b.ThrowStatement;return c(r.argument,e,"argument",t,1),e}function Qh(t,e=null,r=null){const s={type:"TryStatement",block:t,handler:e,finalizer:r},i=b.TryStatement;return c(i.block,s,"block",t,1),c(i.handler,s,"handler",e,1),c(i.finalizer,s,"finalizer",r,1),s}function Zh(t,e,r=!0){const s={type:"UnaryExpression",operator:t,argument:e,prefix:r},i=b.UnaryExpression;return c(i.operator,s,"operator",t),c(i.argument,s,"argument",e,1),c(i.prefix,s,"prefix",r),s}function ey(t,e,r=!1){const s={type:"UpdateExpression",operator:t,argument:e,prefix:r},i=b.UpdateExpression;return c(i.operator,s,"operator",t),c(i.argument,s,"argument",e,1),c(i.prefix,s,"prefix",r),s}function ty(t,e){const r={type:"VariableDeclaration",kind:t,declarations:e},s=b.VariableDeclaration;return c(s.kind,r,"kind",t),c(s.declarations,r,"declarations",e,1),r}function ry(t,e=null){const r={type:"VariableDeclarator",id:t,init:e},s=b.VariableDeclarator;return c(s.id,r,"id",t,1),c(s.init,r,"init",e,1),r}function sy(t,e){const r={type:"WhileStatement",test:t,body:e},s=b.WhileStatement;return c(s.test,r,"test",t,1),c(s.body,r,"body",e,1),r}function iy(t,e){const r={type:"WithStatement",object:t,body:e},s=b.WithStatement;return c(s.object,r,"object",t,1),c(s.body,r,"body",e,1),r}function ay(t,e){const r={type:"AssignmentPattern",left:t,right:e},s=b.AssignmentPattern;return c(s.left,r,"left",t,1),c(s.right,r,"right",e,1),r}function ny(t){const e={type:"ArrayPattern",elements:t},r=b.ArrayPattern;return c(r.elements,e,"elements",t,1),e}function oy(t,e,r=!1){const s={type:"ArrowFunctionExpression",params:t,body:e,async:r,expression:null},i=b.ArrowFunctionExpression;return c(i.params,s,"params",t,1),c(i.body,s,"body",e,1),c(i.async,s,"async",r),s}function ly(t){const e={type:"ClassBody",body:t},r=b.ClassBody;return c(r.body,e,"body",t,1),e}function uy(t=null,e=null,r,s=null){const i={type:"ClassExpression",id:t,superClass:e,body:r,decorators:s},a=b.ClassExpression;return c(a.id,i,"id",t,1),c(a.superClass,i,"superClass",e,1),c(a.body,i,"body",r,1),c(a.decorators,i,"decorators",s,1),i}function cy(t=null,e=null,r,s=null){const i={type:"ClassDeclaration",id:t,superClass:e,body:r,decorators:s},a=b.ClassDeclaration;return c(a.id,i,"id",t,1),c(a.superClass,i,"superClass",e,1),c(a.body,i,"body",r,1),c(a.decorators,i,"decorators",s,1),i}function py(t){const e={type:"ExportAllDeclaration",source:t},r=b.ExportAllDeclaration;return c(r.source,e,"source",t,1),e}function fy(t){const e={type:"ExportDefaultDeclaration",declaration:t},r=b.ExportDefaultDeclaration;return c(r.declaration,e,"declaration",t,1),e}function dy(t=null,e=[],r=null){const s={type:"ExportNamedDeclaration",declaration:t,specifiers:e,source:r},i=b.ExportNamedDeclaration;return c(i.declaration,s,"declaration",t,1),c(i.specifiers,s,"specifiers",e,1),c(i.source,s,"source",r,1),s}function hy(t,e){const r={type:"ExportSpecifier",local:t,exported:e},s=b.ExportSpecifier;return c(s.local,r,"local",t,1),c(s.exported,r,"exported",e,1),r}function yy(t,e,r,s=!1){const i={type:"ForOfStatement",left:t,right:e,body:r,await:s},a=b.ForOfStatement;return c(a.left,i,"left",t,1),c(a.right,i,"right",e,1),c(a.body,i,"body",r,1),c(a.await,i,"await",s),i}function my(t,e){const r={type:"ImportDeclaration",specifiers:t,source:e},s=b.ImportDeclaration;return c(s.specifiers,r,"specifiers",t,1),c(s.source,r,"source",e,1),r}function Ty(t){const e={type:"ImportDefaultSpecifier",local:t},r=b.ImportDefaultSpecifier;return c(r.local,e,"local",t,1),e}function Sy(t){const e={type:"ImportNamespaceSpecifier",local:t},r=b.ImportNamespaceSpecifier;return c(r.local,e,"local",t,1),e}function xy(t,e){const r={type:"ImportSpecifier",local:t,imported:e},s=b.ImportSpecifier;return c(s.local,r,"local",t,1),c(s.imported,r,"imported",e,1),r}function by(t,e=null){const r={type:"ImportExpression",source:t,options:e},s=b.ImportExpression;return c(s.source,r,"source",t,1),c(s.options,r,"options",e,1),r}function Ey(t,e){const r={type:"MetaProperty",meta:t,property:e},s=b.MetaProperty;return c(s.meta,r,"meta",t,1),c(s.property,r,"property",e,1),r}function Py(t="method",e,r,s,i=!1,a=!1,n=!1,o=!1){const u={type:"ClassMethod",kind:t,key:e,params:r,body:s,computed:i,static:a,generator:n,async:o},p=b.ClassMethod;return c(p.kind,u,"kind",t),c(p.key,u,"key",e,1),c(p.params,u,"params",r,1),c(p.body,u,"body",s,1),c(p.computed,u,"computed",i),c(p.static,u,"static",a),c(p.generator,u,"generator",n),c(p.async,u,"async",o),u}function gy(t){const e={type:"ObjectPattern",properties:t},r=b.ObjectPattern;return c(r.properties,e,"properties",t,1),e}function ca(t){const e={type:"SpreadElement",argument:t},r=b.SpreadElement;return c(r.argument,e,"argument",t,1),e}function Ay(){return{type:"Super"}}function Iy(t,e){const r={type:"TaggedTemplateExpression",tag:t,quasi:e},s=b.TaggedTemplateExpression;return c(s.tag,r,"tag",t,1),c(s.quasi,r,"quasi",e,1),r}function vy(t,e=!1){const r={type:"TemplateElement",value:t,tail:e},s=b.TemplateElement;return c(s.value,r,"value",t),c(s.tail,r,"tail",e),r}function Cy(t,e){const r={type:"TemplateLiteral",quasis:t,expressions:e},s=b.TemplateLiteral;return c(s.quasis,r,"quasis",t,1),c(s.expressions,r,"expressions",e,1),r}function Ny(t=null,e=!1){const r={type:"YieldExpression",argument:t,delegate:e},s=b.YieldExpression;return c(s.argument,r,"argument",t,1),c(s.delegate,r,"delegate",e),r}function wy(t){const e={type:"AwaitExpression",argument:t},r=b.AwaitExpression;return c(r.argument,e,"argument",t,1),e}function Oy(){return{type:"Import"}}function Dy(t){const e={type:"ExportNamespaceSpecifier",exported:t},r=b.ExportNamespaceSpecifier;return c(r.exported,e,"exported",t,1),e}function Ly(t,e,r=!1,s){const i={type:"OptionalMemberExpression",object:t,property:e,computed:r,optional:s},a=b.OptionalMemberExpression;return c(a.object,i,"object",t,1),c(a.property,i,"property",e,1),c(a.computed,i,"computed",r),c(a.optional,i,"optional",s),i}function ky(t,e,r){const s={type:"OptionalCallExpression",callee:t,arguments:e,optional:r},i=b.OptionalCallExpression;return c(i.callee,s,"callee",t,1),c(i.arguments,s,"arguments",e,1),c(i.optional,s,"optional",r),s}function _y(t,e=null,r=null,s=null,i=!1,a=!1){const n={type:"ClassProperty",key:t,value:e,typeAnnotation:r,decorators:s,computed:i,static:a},o=b.ClassProperty;return c(o.key,n,"key",t,1),c(o.value,n,"value",e,1),c(o.typeAnnotation,n,"typeAnnotation",r,1),c(o.decorators,n,"decorators",s,1),c(o.computed,n,"computed",i),c(o.static,n,"static",a),n}function My(t,e=null,r=null,s=null,i=!1,a=!1){const n={type:"ClassAccessorProperty",key:t,value:e,typeAnnotation:r,decorators:s,computed:i,static:a},o=b.ClassAccessorProperty;return c(o.key,n,"key",t,1),c(o.value,n,"value",e,1),c(o.typeAnnotation,n,"typeAnnotation",r,1),c(o.decorators,n,"decorators",s,1),c(o.computed,n,"computed",i),c(o.static,n,"static",a),n}function By(t,e=null,r=null,s=!1){const i={type:"ClassPrivateProperty",key:t,value:e,decorators:r,static:s},a=b.ClassPrivateProperty;return c(a.key,i,"key",t,1),c(a.value,i,"value",e,1),c(a.decorators,i,"decorators",r,1),c(a.static,i,"static",s),i}function Fy(t="method",e,r,s,i=!1){const a={type:"ClassPrivateMethod",kind:t,key:e,params:r,body:s,static:i},n=b.ClassPrivateMethod;return c(n.kind,a,"kind",t),c(n.key,a,"key",e,1),c(n.params,a,"params",r,1),c(n.body,a,"body",s,1),c(n.static,a,"static",i),a}function Ry(t){const e={type:"PrivateName",id:t},r=b.PrivateName;return c(r.id,e,"id",t,1),e}function jy(t){const e={type:"StaticBlock",body:t},r=b.StaticBlock;return c(r.body,e,"body",t,1),e}function Ky(t,e){const r={type:"ImportAttribute",key:t,value:e},s=b.ImportAttribute;return c(s.key,r,"key",t,1),c(s.value,r,"value",e,1),r}function Uy(){return{type:"AnyTypeAnnotation"}}function Vy(t){const e={type:"ArrayTypeAnnotation",elementType:t},r=b.ArrayTypeAnnotation;return c(r.elementType,e,"elementType",t,1),e}function $y(){return{type:"BooleanTypeAnnotation"}}function Xy(t){const e={type:"BooleanLiteralTypeAnnotation",value:t},r=b.BooleanLiteralTypeAnnotation;return c(r.value,e,"value",t),e}function Yy(){return{type:"NullLiteralTypeAnnotation"}}function Jy(t,e=null){const r={type:"ClassImplements",id:t,typeParameters:e},s=b.ClassImplements;return c(s.id,r,"id",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function qy(t,e=null,r=null,s){const i={type:"DeclareClass",id:t,typeParameters:e,extends:r,body:s},a=b.DeclareClass;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function Wy(t){const e={type:"DeclareFunction",id:t},r=b.DeclareFunction;return c(r.id,e,"id",t,1),e}function Hy(t,e=null,r=null,s){const i={type:"DeclareInterface",id:t,typeParameters:e,extends:r,body:s},a=b.DeclareInterface;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function zy(t,e,r=null){const s={type:"DeclareModule",id:t,body:e,kind:r},i=b.DeclareModule;return c(i.id,s,"id",t,1),c(i.body,s,"body",e,1),c(i.kind,s,"kind",r),s}function Gy(t){const e={type:"DeclareModuleExports",typeAnnotation:t},r=b.DeclareModuleExports;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function Qy(t,e=null,r){const s={type:"DeclareTypeAlias",id:t,typeParameters:e,right:r},i=b.DeclareTypeAlias;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.right,s,"right",r,1),s}function Zy(t,e=null,r=null){const s={type:"DeclareOpaqueType",id:t,typeParameters:e,supertype:r},i=b.DeclareOpaqueType;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.supertype,s,"supertype",r,1),s}function em(t){const e={type:"DeclareVariable",id:t},r=b.DeclareVariable;return c(r.id,e,"id",t,1),e}function tm(t=null,e=null,r=null,s=null){const i={type:"DeclareExportDeclaration",declaration:t,specifiers:e,source:r,attributes:s},a=b.DeclareExportDeclaration;return c(a.declaration,i,"declaration",t,1),c(a.specifiers,i,"specifiers",e,1),c(a.source,i,"source",r,1),c(a.attributes,i,"attributes",s,1),i}function rm(t,e=null){const r={type:"DeclareExportAllDeclaration",source:t,attributes:e},s=b.DeclareExportAllDeclaration;return c(s.source,r,"source",t,1),c(s.attributes,r,"attributes",e,1),r}function sm(t){const e={type:"DeclaredPredicate",value:t},r=b.DeclaredPredicate;return c(r.value,e,"value",t,1),e}function im(){return{type:"ExistsTypeAnnotation"}}function am(t=null,e,r=null,s){const i={type:"FunctionTypeAnnotation",typeParameters:t,params:e,rest:r,returnType:s},a=b.FunctionTypeAnnotation;return c(a.typeParameters,i,"typeParameters",t,1),c(a.params,i,"params",e,1),c(a.rest,i,"rest",r,1),c(a.returnType,i,"returnType",s,1),i}function nm(t=null,e){const r={type:"FunctionTypeParam",name:t,typeAnnotation:e},s=b.FunctionTypeParam;return c(s.name,r,"name",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function om(t,e=null){const r={type:"GenericTypeAnnotation",id:t,typeParameters:e},s=b.GenericTypeAnnotation;return c(s.id,r,"id",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function lm(){return{type:"InferredPredicate"}}function um(t,e=null){const r={type:"InterfaceExtends",id:t,typeParameters:e},s=b.InterfaceExtends;return c(s.id,r,"id",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function cm(t,e=null,r=null,s){const i={type:"InterfaceDeclaration",id:t,typeParameters:e,extends:r,body:s},a=b.InterfaceDeclaration;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function pm(t=null,e){const r={type:"InterfaceTypeAnnotation",extends:t,body:e},s=b.InterfaceTypeAnnotation;return c(s.extends,r,"extends",t,1),c(s.body,r,"body",e,1),r}function fm(t){const e={type:"IntersectionTypeAnnotation",types:t},r=b.IntersectionTypeAnnotation;return c(r.types,e,"types",t,1),e}function dm(){return{type:"MixedTypeAnnotation"}}function hm(){return{type:"EmptyTypeAnnotation"}}function ym(t){const e={type:"NullableTypeAnnotation",typeAnnotation:t},r=b.NullableTypeAnnotation;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function mm(t){const e={type:"NumberLiteralTypeAnnotation",value:t},r=b.NumberLiteralTypeAnnotation;return c(r.value,e,"value",t),e}function Tm(){return{type:"NumberTypeAnnotation"}}function Sm(t,e=[],r=[],s=[],i=!1){const a={type:"ObjectTypeAnnotation",properties:t,indexers:e,callProperties:r,internalSlots:s,exact:i},n=b.ObjectTypeAnnotation;return c(n.properties,a,"properties",t,1),c(n.indexers,a,"indexers",e,1),c(n.callProperties,a,"callProperties",r,1),c(n.internalSlots,a,"internalSlots",s,1),c(n.exact,a,"exact",i),a}function xm(t,e,r,s,i){const a={type:"ObjectTypeInternalSlot",id:t,value:e,optional:r,static:s,method:i},n=b.ObjectTypeInternalSlot;return c(n.id,a,"id",t,1),c(n.value,a,"value",e,1),c(n.optional,a,"optional",r),c(n.static,a,"static",s),c(n.method,a,"method",i),a}function bm(t){const e={type:"ObjectTypeCallProperty",value:t,static:null},r=b.ObjectTypeCallProperty;return c(r.value,e,"value",t,1),e}function Em(t=null,e,r,s=null){const i={type:"ObjectTypeIndexer",id:t,key:e,value:r,variance:s,static:null},a=b.ObjectTypeIndexer;return c(a.id,i,"id",t,1),c(a.key,i,"key",e,1),c(a.value,i,"value",r,1),c(a.variance,i,"variance",s,1),i}function Pm(t,e,r=null){const s={type:"ObjectTypeProperty",key:t,value:e,variance:r,kind:null,method:null,optional:null,proto:null,static:null},i=b.ObjectTypeProperty;return c(i.key,s,"key",t,1),c(i.value,s,"value",e,1),c(i.variance,s,"variance",r,1),s}function gm(t){const e={type:"ObjectTypeSpreadProperty",argument:t},r=b.ObjectTypeSpreadProperty;return c(r.argument,e,"argument",t,1),e}function Am(t,e=null,r=null,s){const i={type:"OpaqueType",id:t,typeParameters:e,supertype:r,impltype:s},a=b.OpaqueType;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.supertype,i,"supertype",r,1),c(a.impltype,i,"impltype",s,1),i}function Im(t,e){const r={type:"QualifiedTypeIdentifier",id:t,qualification:e},s=b.QualifiedTypeIdentifier;return c(s.id,r,"id",t,1),c(s.qualification,r,"qualification",e,1),r}function vm(t){const e={type:"StringLiteralTypeAnnotation",value:t},r=b.StringLiteralTypeAnnotation;return c(r.value,e,"value",t),e}function Cm(){return{type:"StringTypeAnnotation"}}function Nm(){return{type:"SymbolTypeAnnotation"}}function wm(){return{type:"ThisTypeAnnotation"}}function Om(t){const e={type:"TupleTypeAnnotation",types:t},r=b.TupleTypeAnnotation;return c(r.types,e,"types",t,1),e}function Dm(t){const e={type:"TypeofTypeAnnotation",argument:t},r=b.TypeofTypeAnnotation;return c(r.argument,e,"argument",t,1),e}function Lm(t,e=null,r){const s={type:"TypeAlias",id:t,typeParameters:e,right:r},i=b.TypeAlias;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.right,s,"right",r,1),s}function km(t){const e={type:"TypeAnnotation",typeAnnotation:t},r=b.TypeAnnotation;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function _m(t,e){const r={type:"TypeCastExpression",expression:t,typeAnnotation:e},s=b.TypeCastExpression;return c(s.expression,r,"expression",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function Mm(t=null,e=null,r=null){const s={type:"TypeParameter",bound:t,default:e,variance:r,name:null},i=b.TypeParameter;return c(i.bound,s,"bound",t,1),c(i.default,s,"default",e,1),c(i.variance,s,"variance",r,1),s}function Bm(t){const e={type:"TypeParameterDeclaration",params:t},r=b.TypeParameterDeclaration;return c(r.params,e,"params",t,1),e}function Fm(t){const e={type:"TypeParameterInstantiation",params:t},r=b.TypeParameterInstantiation;return c(r.params,e,"params",t,1),e}function Rm(t){const e={type:"UnionTypeAnnotation",types:t},r=b.UnionTypeAnnotation;return c(r.types,e,"types",t,1),e}function jm(t){const e={type:"Variance",kind:t},r=b.Variance;return c(r.kind,e,"kind",t),e}function Km(){return{type:"VoidTypeAnnotation"}}function Um(t,e){const r={type:"EnumDeclaration",id:t,body:e},s=b.EnumDeclaration;return c(s.id,r,"id",t,1),c(s.body,r,"body",e,1),r}function Vm(t){const e={type:"EnumBooleanBody",members:t,explicitType:null,hasUnknownMembers:null},r=b.EnumBooleanBody;return c(r.members,e,"members",t,1),e}function $m(t){const e={type:"EnumNumberBody",members:t,explicitType:null,hasUnknownMembers:null},r=b.EnumNumberBody;return c(r.members,e,"members",t,1),e}function Xm(t){const e={type:"EnumStringBody",members:t,explicitType:null,hasUnknownMembers:null},r=b.EnumStringBody;return c(r.members,e,"members",t,1),e}function Ym(t){const e={type:"EnumSymbolBody",members:t,hasUnknownMembers:null},r=b.EnumSymbolBody;return c(r.members,e,"members",t,1),e}function Jm(t){const e={type:"EnumBooleanMember",id:t,init:null},r=b.EnumBooleanMember;return c(r.id,e,"id",t,1),e}function qm(t,e){const r={type:"EnumNumberMember",id:t,init:e},s=b.EnumNumberMember;return c(s.id,r,"id",t,1),c(s.init,r,"init",e,1),r}function Wm(t,e){const r={type:"EnumStringMember",id:t,init:e},s=b.EnumStringMember;return c(s.id,r,"id",t,1),c(s.init,r,"init",e,1),r}function Hm(t){const e={type:"EnumDefaultedMember",id:t},r=b.EnumDefaultedMember;return c(r.id,e,"id",t,1),e}function zm(t,e){const r={type:"IndexedAccessType",objectType:t,indexType:e},s=b.IndexedAccessType;return c(s.objectType,r,"objectType",t,1),c(s.indexType,r,"indexType",e,1),r}function Gm(t,e){const r={type:"OptionalIndexedAccessType",objectType:t,indexType:e,optional:null},s=b.OptionalIndexedAccessType;return c(s.objectType,r,"objectType",t,1),c(s.indexType,r,"indexType",e,1),r}function Qm(t,e=null){const r={type:"JSXAttribute",name:t,value:e},s=b.JSXAttribute;return c(s.name,r,"name",t,1),c(s.value,r,"value",e,1),r}function Zm(t){const e={type:"JSXClosingElement",name:t},r=b.JSXClosingElement;return c(r.name,e,"name",t,1),e}function eT(t,e=null,r,s=null){const i={type:"JSXElement",openingElement:t,closingElement:e,children:r,selfClosing:s},a=b.JSXElement;return c(a.openingElement,i,"openingElement",t,1),c(a.closingElement,i,"closingElement",e,1),c(a.children,i,"children",r,1),c(a.selfClosing,i,"selfClosing",s),i}function tT(){return{type:"JSXEmptyExpression"}}function rT(t){const e={type:"JSXExpressionContainer",expression:t},r=b.JSXExpressionContainer;return c(r.expression,e,"expression",t,1),e}function sT(t){const e={type:"JSXSpreadChild",expression:t},r=b.JSXSpreadChild;return c(r.expression,e,"expression",t,1),e}function iT(t){const e={type:"JSXIdentifier",name:t},r=b.JSXIdentifier;return c(r.name,e,"name",t),e}function aT(t,e){const r={type:"JSXMemberExpression",object:t,property:e},s=b.JSXMemberExpression;return c(s.object,r,"object",t,1),c(s.property,r,"property",e,1),r}function nT(t,e){const r={type:"JSXNamespacedName",namespace:t,name:e},s=b.JSXNamespacedName;return c(s.namespace,r,"namespace",t,1),c(s.name,r,"name",e,1),r}function oT(t,e,r=!1){const s={type:"JSXOpeningElement",name:t,attributes:e,selfClosing:r},i=b.JSXOpeningElement;return c(i.name,s,"name",t,1),c(i.attributes,s,"attributes",e,1),c(i.selfClosing,s,"selfClosing",r),s}function lT(t){const e={type:"JSXSpreadAttribute",argument:t},r=b.JSXSpreadAttribute;return c(r.argument,e,"argument",t,1),e}function uT(t){const e={type:"JSXText",value:t},r=b.JSXText;return c(r.value,e,"value",t),e}function cT(t,e,r){const s={type:"JSXFragment",openingFragment:t,closingFragment:e,children:r},i=b.JSXFragment;return c(i.openingFragment,s,"openingFragment",t,1),c(i.closingFragment,s,"closingFragment",e,1),c(i.children,s,"children",r,1),s}function pT(){return{type:"JSXOpeningFragment"}}function fT(){return{type:"JSXClosingFragment"}}function dT(){return{type:"Noop"}}function hT(t,e){const r={type:"Placeholder",expectedNode:t,name:e},s=b.Placeholder;return c(s.expectedNode,r,"expectedNode",t),c(s.name,r,"name",e,1),r}function yT(t){const e={type:"V8IntrinsicIdentifier",name:t},r=b.V8IntrinsicIdentifier;return c(r.name,e,"name",t),e}function mT(){return{type:"ArgumentPlaceholder"}}function TT(t,e){const r={type:"BindExpression",object:t,callee:e},s=b.BindExpression;return c(s.object,r,"object",t,1),c(s.callee,r,"callee",e,1),r}function ST(t){const e={type:"Decorator",expression:t},r=b.Decorator;return c(r.expression,e,"expression",t,1),e}function xT(t,e=!1){const r={type:"DoExpression",body:t,async:e},s=b.DoExpression;return c(s.body,r,"body",t,1),c(s.async,r,"async",e),r}function bT(t){const e={type:"ExportDefaultSpecifier",exported:t},r=b.ExportDefaultSpecifier;return c(r.exported,e,"exported",t,1),e}function ET(t){const e={type:"RecordExpression",properties:t},r=b.RecordExpression;return c(r.properties,e,"properties",t,1),e}function PT(t=[]){const e={type:"TupleExpression",elements:t},r=b.TupleExpression;return c(r.elements,e,"elements",t,1),e}function gT(t){const e={type:"DecimalLiteral",value:t},r=b.DecimalLiteral;return c(r.value,e,"value",t),e}function AT(t){const e={type:"ModuleExpression",body:t},r=b.ModuleExpression;return c(r.body,e,"body",t,1),e}function IT(){return{type:"TopicReference"}}function vT(t){const e={type:"PipelineTopicExpression",expression:t},r=b.PipelineTopicExpression;return c(r.expression,e,"expression",t,1),e}function CT(t){const e={type:"PipelineBareFunction",callee:t},r=b.PipelineBareFunction;return c(r.callee,e,"callee",t,1),e}function NT(){return{type:"PipelinePrimaryTopicReference"}}function wT(){return{type:"VoidPattern"}}function OT(t){const e={type:"TSParameterProperty",parameter:t},r=b.TSParameterProperty;return c(r.parameter,e,"parameter",t,1),e}function DT(t=null,e=null,r,s=null){const i={type:"TSDeclareFunction",id:t,typeParameters:e,params:r,returnType:s},a=b.TSDeclareFunction;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.params,i,"params",r,1),c(a.returnType,i,"returnType",s,1),i}function LT(t=null,e,r=null,s,i=null){const a={type:"TSDeclareMethod",decorators:t,key:e,typeParameters:r,params:s,returnType:i},n=b.TSDeclareMethod;return c(n.decorators,a,"decorators",t,1),c(n.key,a,"key",e,1),c(n.typeParameters,a,"typeParameters",r,1),c(n.params,a,"params",s,1),c(n.returnType,a,"returnType",i,1),a}function kT(t,e){const r={type:"TSQualifiedName",left:t,right:e},s=b.TSQualifiedName;return c(s.left,r,"left",t,1),c(s.right,r,"right",e,1),r}function _T(t=null,e,r=null){const s={type:"TSCallSignatureDeclaration",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSCallSignatureDeclaration;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function MT(t=null,e,r=null){const s={type:"TSConstructSignatureDeclaration",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSConstructSignatureDeclaration;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function BT(t,e=null){const r={type:"TSPropertySignature",key:t,typeAnnotation:e},s=b.TSPropertySignature;return c(s.key,r,"key",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function FT(t,e=null,r,s=null){const i={type:"TSMethodSignature",key:t,typeParameters:e,parameters:r,typeAnnotation:s,kind:null},a=b.TSMethodSignature;return c(a.key,i,"key",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.parameters,i,"parameters",r,1),c(a.typeAnnotation,i,"typeAnnotation",s,1),i}function RT(t,e=null){const r={type:"TSIndexSignature",parameters:t,typeAnnotation:e},s=b.TSIndexSignature;return c(s.parameters,r,"parameters",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function jT(){return{type:"TSAnyKeyword"}}function KT(){return{type:"TSBooleanKeyword"}}function UT(){return{type:"TSBigIntKeyword"}}function VT(){return{type:"TSIntrinsicKeyword"}}function $T(){return{type:"TSNeverKeyword"}}function XT(){return{type:"TSNullKeyword"}}function YT(){return{type:"TSNumberKeyword"}}function JT(){return{type:"TSObjectKeyword"}}function qT(){return{type:"TSStringKeyword"}}function WT(){return{type:"TSSymbolKeyword"}}function HT(){return{type:"TSUndefinedKeyword"}}function zT(){return{type:"TSUnknownKeyword"}}function GT(){return{type:"TSVoidKeyword"}}function QT(){return{type:"TSThisType"}}function ZT(t=null,e,r=null){const s={type:"TSFunctionType",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSFunctionType;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function eS(t=null,e,r=null){const s={type:"TSConstructorType",typeParameters:t,parameters:e,typeAnnotation:r},i=b.TSConstructorType;return c(i.typeParameters,s,"typeParameters",t,1),c(i.parameters,s,"parameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function tS(t,e=null){const r={type:"TSTypeReference",typeName:t,typeParameters:e},s=b.TSTypeReference;return c(s.typeName,r,"typeName",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function rS(t,e=null,r=null){const s={type:"TSTypePredicate",parameterName:t,typeAnnotation:e,asserts:r},i=b.TSTypePredicate;return c(i.parameterName,s,"parameterName",t,1),c(i.typeAnnotation,s,"typeAnnotation",e,1),c(i.asserts,s,"asserts",r),s}function sS(t,e=null){const r={type:"TSTypeQuery",exprName:t,typeParameters:e},s=b.TSTypeQuery;return c(s.exprName,r,"exprName",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function iS(t){const e={type:"TSTypeLiteral",members:t},r=b.TSTypeLiteral;return c(r.members,e,"members",t,1),e}function aS(t){const e={type:"TSArrayType",elementType:t},r=b.TSArrayType;return c(r.elementType,e,"elementType",t,1),e}function nS(t){const e={type:"TSTupleType",elementTypes:t},r=b.TSTupleType;return c(r.elementTypes,e,"elementTypes",t,1),e}function oS(t){const e={type:"TSOptionalType",typeAnnotation:t},r=b.TSOptionalType;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function lS(t){const e={type:"TSRestType",typeAnnotation:t},r=b.TSRestType;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function uS(t,e,r=!1){const s={type:"TSNamedTupleMember",label:t,elementType:e,optional:r},i=b.TSNamedTupleMember;return c(i.label,s,"label",t,1),c(i.elementType,s,"elementType",e,1),c(i.optional,s,"optional",r),s}function cS(t){const e={type:"TSUnionType",types:t},r=b.TSUnionType;return c(r.types,e,"types",t,1),e}function pS(t){const e={type:"TSIntersectionType",types:t},r=b.TSIntersectionType;return c(r.types,e,"types",t,1),e}function fS(t,e,r,s){const i={type:"TSConditionalType",checkType:t,extendsType:e,trueType:r,falseType:s},a=b.TSConditionalType;return c(a.checkType,i,"checkType",t,1),c(a.extendsType,i,"extendsType",e,1),c(a.trueType,i,"trueType",r,1),c(a.falseType,i,"falseType",s,1),i}function dS(t){const e={type:"TSInferType",typeParameter:t},r=b.TSInferType;return c(r.typeParameter,e,"typeParameter",t,1),e}function hS(t){const e={type:"TSParenthesizedType",typeAnnotation:t},r=b.TSParenthesizedType;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function yS(t,e="keyof"){const r={type:"TSTypeOperator",typeAnnotation:t,operator:e},s=b.TSTypeOperator;return c(s.typeAnnotation,r,"typeAnnotation",t,1),c(s.operator,r,"operator",e),r}function mS(t,e){const r={type:"TSIndexedAccessType",objectType:t,indexType:e},s=b.TSIndexedAccessType;return c(s.objectType,r,"objectType",t,1),c(s.indexType,r,"indexType",e,1),r}function TS(t,e=null,r=null){const s={type:"TSMappedType",typeParameter:t,typeAnnotation:e,nameType:r},i=b.TSMappedType;return c(i.typeParameter,s,"typeParameter",t,1),c(i.typeAnnotation,s,"typeAnnotation",e,1),c(i.nameType,s,"nameType",r,1),s}function SS(t,e){const r={type:"TSTemplateLiteralType",quasis:t,types:e},s=b.TSTemplateLiteralType;return c(s.quasis,r,"quasis",t,1),c(s.types,r,"types",e,1),r}function xS(t){const e={type:"TSLiteralType",literal:t},r=b.TSLiteralType;return c(r.literal,e,"literal",t,1),e}function bS(t,e=null){const r={type:"TSExpressionWithTypeArguments",expression:t,typeParameters:e},s=b.TSExpressionWithTypeArguments;return c(s.expression,r,"expression",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function ES(t,e=null,r=null,s){const i={type:"TSInterfaceDeclaration",id:t,typeParameters:e,extends:r,body:s},a=b.TSInterfaceDeclaration;return c(a.id,i,"id",t,1),c(a.typeParameters,i,"typeParameters",e,1),c(a.extends,i,"extends",r,1),c(a.body,i,"body",s,1),i}function PS(t){const e={type:"TSInterfaceBody",body:t},r=b.TSInterfaceBody;return c(r.body,e,"body",t,1),e}function gS(t,e=null,r){const s={type:"TSTypeAliasDeclaration",id:t,typeParameters:e,typeAnnotation:r},i=b.TSTypeAliasDeclaration;return c(i.id,s,"id",t,1),c(i.typeParameters,s,"typeParameters",e,1),c(i.typeAnnotation,s,"typeAnnotation",r,1),s}function AS(t,e=null){const r={type:"TSInstantiationExpression",expression:t,typeParameters:e},s=b.TSInstantiationExpression;return c(s.expression,r,"expression",t,1),c(s.typeParameters,r,"typeParameters",e,1),r}function IS(t,e){const r={type:"TSAsExpression",expression:t,typeAnnotation:e},s=b.TSAsExpression;return c(s.expression,r,"expression",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function vS(t,e){const r={type:"TSSatisfiesExpression",expression:t,typeAnnotation:e},s=b.TSSatisfiesExpression;return c(s.expression,r,"expression",t,1),c(s.typeAnnotation,r,"typeAnnotation",e,1),r}function CS(t,e){const r={type:"TSTypeAssertion",typeAnnotation:t,expression:e},s=b.TSTypeAssertion;return c(s.typeAnnotation,r,"typeAnnotation",t,1),c(s.expression,r,"expression",e,1),r}function NS(t){const e={type:"TSEnumBody",members:t},r=b.TSEnumBody;return c(r.members,e,"members",t,1),e}function wS(t,e){const r={type:"TSEnumDeclaration",id:t,members:e},s=b.TSEnumDeclaration;return c(s.id,r,"id",t,1),c(s.members,r,"members",e,1),r}function OS(t,e=null){const r={type:"TSEnumMember",id:t,initializer:e},s=b.TSEnumMember;return c(s.id,r,"id",t,1),c(s.initializer,r,"initializer",e,1),r}function DS(t,e){const r={type:"TSModuleDeclaration",id:t,body:e,kind:null},s=b.TSModuleDeclaration;return c(s.id,r,"id",t,1),c(s.body,r,"body",e,1),r}function LS(t){const e={type:"TSModuleBlock",body:t},r=b.TSModuleBlock;return c(r.body,e,"body",t,1),e}function kS(t,e=null,r=null){const s={type:"TSImportType",argument:t,qualifier:e,typeParameters:r},i=b.TSImportType;return c(i.argument,s,"argument",t,1),c(i.qualifier,s,"qualifier",e,1),c(i.typeParameters,s,"typeParameters",r,1),s}function _S(t,e){const r={type:"TSImportEqualsDeclaration",id:t,moduleReference:e,isExport:null},s=b.TSImportEqualsDeclaration;return c(s.id,r,"id",t,1),c(s.moduleReference,r,"moduleReference",e,1),r}function MS(t){const e={type:"TSExternalModuleReference",expression:t},r=b.TSExternalModuleReference;return c(r.expression,e,"expression",t,1),e}function BS(t){const e={type:"TSNonNullExpression",expression:t},r=b.TSNonNullExpression;return c(r.expression,e,"expression",t,1),e}function FS(t){const e={type:"TSExportAssignment",expression:t},r=b.TSExportAssignment;return c(r.expression,e,"expression",t,1),e}function RS(t){const e={type:"TSNamespaceExportDeclaration",id:t},r=b.TSNamespaceExportDeclaration;return c(r.id,e,"id",t,1),e}function jS(t){const e={type:"TSTypeAnnotation",typeAnnotation:t},r=b.TSTypeAnnotation;return c(r.typeAnnotation,e,"typeAnnotation",t,1),e}function KS(t){const e={type:"TSTypeParameterInstantiation",params:t},r=b.TSTypeParameterInstantiation;return c(r.params,e,"params",t,1),e}function US(t){const e={type:"TSTypeParameterDeclaration",params:t},r=b.TSTypeParameterDeclaration;return c(r.params,e,"params",t,1),e}function VS(t=null,e=null,r){const s={type:"TSTypeParameter",constraint:t,default:e,name:r},i=b.TSTypeParameter;return c(i.constraint,s,"constraint",t,1),c(i.default,s,"default",e,1),c(i.name,s,"name",r),s}function $S(t){return(0,Vt.default)("NumberLiteral","NumericLiteral","The node type "),oa(t)}function XS(t,e=""){return(0,Vt.default)("RegexLiteral","RegExpLiteral","The node type "),la(t,e)}function YS(t){return(0,Vt.default)("RestProperty","RestElement","The node type "),ua(t)}function JS(t){return(0,Vt.default)("SpreadProperty","SpreadElement","The node type "),ca(t)}var l={};Object.defineProperty(l,"__esModule",{value:!0}),l.JSXIdentifier=l.JSXFragment=l.JSXExpressionContainer=l.JSXEmptyExpression=l.JSXElement=l.JSXClosingFragment=l.JSXClosingElement=l.JSXAttribute=l.IntersectionTypeAnnotation=l.InterpreterDirective=l.InterfaceTypeAnnotation=l.InterfaceExtends=l.InterfaceDeclaration=l.InferredPredicate=l.IndexedAccessType=l.ImportSpecifier=l.ImportNamespaceSpecifier=l.ImportExpression=l.ImportDefaultSpecifier=l.ImportDeclaration=l.ImportAttribute=l.Import=l.IfStatement=l.Identifier=l.GenericTypeAnnotation=l.FunctionTypeParam=l.FunctionTypeAnnotation=l.FunctionExpression=l.FunctionDeclaration=l.ForStatement=l.ForOfStatement=l.ForInStatement=l.File=l.ExpressionStatement=l.ExportSpecifier=l.ExportNamespaceSpecifier=l.ExportNamedDeclaration=l.ExportDefaultSpecifier=l.ExportDefaultDeclaration=l.ExportAllDeclaration=l.ExistsTypeAnnotation=l.EnumSymbolBody=l.EnumStringMember=l.EnumStringBody=l.EnumNumberMember=l.EnumNumberBody=l.EnumDefaultedMember=l.EnumDeclaration=l.EnumBooleanMember=l.EnumBooleanBody=l.EmptyTypeAnnotation=l.EmptyStatement=l.DoWhileStatement=l.DoExpression=l.DirectiveLiteral=l.Directive=l.Decorator=l.DeclaredPredicate=l.DeclareVariable=l.DeclareTypeAlias=l.DeclareOpaqueType=l.DeclareModuleExports=l.DeclareModule=l.DeclareInterface=l.DeclareFunction=l.DeclareExportDeclaration=l.DeclareExportAllDeclaration=l.DeclareClass=l.DecimalLiteral=l.DebuggerStatement=l.ContinueStatement=l.ConditionalExpression=l.ClassProperty=l.ClassPrivateProperty=l.ClassPrivateMethod=l.ClassMethod=l.ClassImplements=l.ClassExpression=l.ClassDeclaration=l.ClassBody=l.ClassAccessorProperty=l.CatchClause=l.CallExpression=l.BreakStatement=l.BooleanTypeAnnotation=l.BooleanLiteralTypeAnnotation=l.BooleanLiteral=l.BlockStatement=l.BindExpression=l.BinaryExpression=l.BigIntLiteral=l.AwaitExpression=l.AssignmentPattern=l.AssignmentExpression=l.ArrowFunctionExpression=l.ArrayTypeAnnotation=l.ArrayPattern=l.ArrayExpression=l.ArgumentPlaceholder=l.AnyTypeAnnotation=void 0,l.TSNumberKeyword=l.TSNullKeyword=l.TSNonNullExpression=l.TSNeverKeyword=l.TSNamespaceExportDeclaration=l.TSNamedTupleMember=l.TSModuleDeclaration=l.TSModuleBlock=l.TSMethodSignature=l.TSMappedType=l.TSLiteralType=l.TSIntrinsicKeyword=l.TSIntersectionType=l.TSInterfaceDeclaration=l.TSInterfaceBody=l.TSInstantiationExpression=l.TSInferType=l.TSIndexedAccessType=l.TSIndexSignature=l.TSImportType=l.TSImportEqualsDeclaration=l.TSFunctionType=l.TSExternalModuleReference=l.TSExpressionWithTypeArguments=l.TSExportAssignment=l.TSEnumMember=l.TSEnumDeclaration=l.TSEnumBody=l.TSDeclareMethod=l.TSDeclareFunction=l.TSConstructorType=l.TSConstructSignatureDeclaration=l.TSConditionalType=l.TSCallSignatureDeclaration=l.TSBooleanKeyword=l.TSBigIntKeyword=l.TSAsExpression=l.TSArrayType=l.TSAnyKeyword=l.SymbolTypeAnnotation=l.SwitchStatement=l.SwitchCase=l.Super=l.StringTypeAnnotation=l.StringLiteralTypeAnnotation=l.StringLiteral=l.StaticBlock=l.SpreadProperty=l.SpreadElement=l.SequenceExpression=l.ReturnStatement=l.RestProperty=l.RestElement=l.RegexLiteral=l.RegExpLiteral=l.RecordExpression=l.QualifiedTypeIdentifier=l.Program=l.PrivateName=l.Placeholder=l.PipelineTopicExpression=l.PipelinePrimaryTopicReference=l.PipelineBareFunction=l.ParenthesizedExpression=l.OptionalMemberExpression=l.OptionalIndexedAccessType=l.OptionalCallExpression=l.OpaqueType=l.ObjectTypeSpreadProperty=l.ObjectTypeProperty=l.ObjectTypeInternalSlot=l.ObjectTypeIndexer=l.ObjectTypeCallProperty=l.ObjectTypeAnnotation=l.ObjectProperty=l.ObjectPattern=l.ObjectMethod=l.ObjectExpression=l.NumericLiteral=l.NumberTypeAnnotation=l.NumberLiteralTypeAnnotation=l.NumberLiteral=l.NullableTypeAnnotation=l.NullLiteralTypeAnnotation=l.NullLiteral=l.Noop=l.NewExpression=l.ModuleExpression=l.MixedTypeAnnotation=l.MetaProperty=l.MemberExpression=l.LogicalExpression=l.LabeledStatement=l.JSXText=l.JSXSpreadChild=l.JSXSpreadAttribute=l.JSXOpeningFragment=l.JSXOpeningElement=l.JSXNamespacedName=l.JSXMemberExpression=void 0,l.YieldExpression=l.WithStatement=l.WhileStatement=l.VoidTypeAnnotation=l.VoidPattern=l.Variance=l.VariableDeclarator=l.VariableDeclaration=l.V8IntrinsicIdentifier=l.UpdateExpression=l.UnionTypeAnnotation=l.UnaryExpression=l.TypeofTypeAnnotation=l.TypeParameterInstantiation=l.TypeParameterDeclaration=l.TypeParameter=l.TypeCastExpression=l.TypeAnnotation=l.TypeAlias=l.TupleTypeAnnotation=l.TupleExpression=l.TryStatement=l.TopicReference=l.ThrowStatement=l.ThisTypeAnnotation=l.ThisExpression=l.TemplateLiteral=l.TemplateElement=l.TaggedTemplateExpression=l.TSVoidKeyword=l.TSUnknownKeyword=l.TSUnionType=l.TSUndefinedKeyword=l.TSTypeReference=l.TSTypeQuery=l.TSTypePredicate=l.TSTypeParameterInstantiation=l.TSTypeParameterDeclaration=l.TSTypeParameter=l.TSTypeOperator=l.TSTypeLiteral=l.TSTypeAssertion=l.TSTypeAnnotation=l.TSTypeAliasDeclaration=l.TSTupleType=l.TSThisType=l.TSTemplateLiteralType=l.TSSymbolKeyword=l.TSStringKeyword=l.TSSatisfiesExpression=l.TSRestType=l.TSQualifiedName=l.TSPropertySignature=l.TSParenthesizedType=l.TSParameterProperty=l.TSOptionalType=l.TSObjectKeyword=void 0;var ut=f;function S(t){return ut[t]}l.ArrayExpression=S("arrayExpression"),l.AssignmentExpression=S("assignmentExpression"),l.BinaryExpression=S("binaryExpression"),l.InterpreterDirective=S("interpreterDirective"),l.Directive=S("directive"),l.DirectiveLiteral=S("directiveLiteral"),l.BlockStatement=S("blockStatement"),l.BreakStatement=S("breakStatement"),l.CallExpression=S("callExpression"),l.CatchClause=S("catchClause"),l.ConditionalExpression=S("conditionalExpression"),l.ContinueStatement=S("continueStatement"),l.DebuggerStatement=S("debuggerStatement"),l.DoWhileStatement=S("doWhileStatement"),l.EmptyStatement=S("emptyStatement"),l.ExpressionStatement=S("expressionStatement"),l.File=S("file"),l.ForInStatement=S("forInStatement"),l.ForStatement=S("forStatement"),l.FunctionDeclaration=S("functionDeclaration"),l.FunctionExpression=S("functionExpression"),l.Identifier=S("identifier"),l.IfStatement=S("ifStatement"),l.LabeledStatement=S("labeledStatement"),l.StringLiteral=S("stringLiteral"),l.NumericLiteral=S("numericLiteral"),l.NullLiteral=S("nullLiteral"),l.BooleanLiteral=S("booleanLiteral"),l.RegExpLiteral=S("regExpLiteral"),l.LogicalExpression=S("logicalExpression"),l.MemberExpression=S("memberExpression"),l.NewExpression=S("newExpression"),l.Program=S("program"),l.ObjectExpression=S("objectExpression"),l.ObjectMethod=S("objectMethod"),l.ObjectProperty=S("objectProperty"),l.RestElement=S("restElement"),l.ReturnStatement=S("returnStatement"),l.SequenceExpression=S("sequenceExpression"),l.ParenthesizedExpression=S("parenthesizedExpression"),l.SwitchCase=S("switchCase"),l.SwitchStatement=S("switchStatement"),l.ThisExpression=S("thisExpression"),l.ThrowStatement=S("throwStatement"),l.TryStatement=S("tryStatement"),l.UnaryExpression=S("unaryExpression"),l.UpdateExpression=S("updateExpression"),l.VariableDeclaration=S("variableDeclaration"),l.VariableDeclarator=S("variableDeclarator"),l.WhileStatement=S("whileStatement"),l.WithStatement=S("withStatement"),l.AssignmentPattern=S("assignmentPattern"),l.ArrayPattern=S("arrayPattern"),l.ArrowFunctionExpression=S("arrowFunctionExpression"),l.ClassBody=S("classBody"),l.ClassExpression=S("classExpression"),l.ClassDeclaration=S("classDeclaration"),l.ExportAllDeclaration=S("exportAllDeclaration"),l.ExportDefaultDeclaration=S("exportDefaultDeclaration"),l.ExportNamedDeclaration=S("exportNamedDeclaration"),l.ExportSpecifier=S("exportSpecifier"),l.ForOfStatement=S("forOfStatement"),l.ImportDeclaration=S("importDeclaration"),l.ImportDefaultSpecifier=S("importDefaultSpecifier"),l.ImportNamespaceSpecifier=S("importNamespaceSpecifier"),l.ImportSpecifier=S("importSpecifier"),l.ImportExpression=S("importExpression"),l.MetaProperty=S("metaProperty"),l.ClassMethod=S("classMethod"),l.ObjectPattern=S("objectPattern"),l.SpreadElement=S("spreadElement"),l.Super=S("super"),l.TaggedTemplateExpression=S("taggedTemplateExpression"),l.TemplateElement=S("templateElement"),l.TemplateLiteral=S("templateLiteral"),l.YieldExpression=S("yieldExpression"),l.AwaitExpression=S("awaitExpression"),l.Import=S("import"),l.BigIntLiteral=S("bigIntLiteral"),l.ExportNamespaceSpecifier=S("exportNamespaceSpecifier"),l.OptionalMemberExpression=S("optionalMemberExpression"),l.OptionalCallExpression=S("optionalCallExpression"),l.ClassProperty=S("classProperty"),l.ClassAccessorProperty=S("classAccessorProperty"),l.ClassPrivateProperty=S("classPrivateProperty"),l.ClassPrivateMethod=S("classPrivateMethod"),l.PrivateName=S("privateName"),l.StaticBlock=S("staticBlock"),l.ImportAttribute=S("importAttribute"),l.AnyTypeAnnotation=S("anyTypeAnnotation"),l.ArrayTypeAnnotation=S("arrayTypeAnnotation"),l.BooleanTypeAnnotation=S("booleanTypeAnnotation"),l.BooleanLiteralTypeAnnotation=S("booleanLiteralTypeAnnotation"),l.NullLiteralTypeAnnotation=S("nullLiteralTypeAnnotation"),l.ClassImplements=S("classImplements"),l.DeclareClass=S("declareClass"),l.DeclareFunction=S("declareFunction"),l.DeclareInterface=S("declareInterface"),l.DeclareModule=S("declareModule"),l.DeclareModuleExports=S("declareModuleExports"),l.DeclareTypeAlias=S("declareTypeAlias"),l.DeclareOpaqueType=S("declareOpaqueType"),l.DeclareVariable=S("declareVariable"),l.DeclareExportDeclaration=S("declareExportDeclaration"),l.DeclareExportAllDeclaration=S("declareExportAllDeclaration"),l.DeclaredPredicate=S("declaredPredicate"),l.ExistsTypeAnnotation=S("existsTypeAnnotation"),l.FunctionTypeAnnotation=S("functionTypeAnnotation"),l.FunctionTypeParam=S("functionTypeParam"),l.GenericTypeAnnotation=S("genericTypeAnnotation"),l.InferredPredicate=S("inferredPredicate"),l.InterfaceExtends=S("interfaceExtends"),l.InterfaceDeclaration=S("interfaceDeclaration"),l.InterfaceTypeAnnotation=S("interfaceTypeAnnotation"),l.IntersectionTypeAnnotation=S("intersectionTypeAnnotation"),l.MixedTypeAnnotation=S("mixedTypeAnnotation"),l.EmptyTypeAnnotation=S("emptyTypeAnnotation"),l.NullableTypeAnnotation=S("nullableTypeAnnotation"),l.NumberLiteralTypeAnnotation=S("numberLiteralTypeAnnotation"),l.NumberTypeAnnotation=S("numberTypeAnnotation"),l.ObjectTypeAnnotation=S("objectTypeAnnotation"),l.ObjectTypeInternalSlot=S("objectTypeInternalSlot"),l.ObjectTypeCallProperty=S("objectTypeCallProperty"),l.ObjectTypeIndexer=S("objectTypeIndexer"),l.ObjectTypeProperty=S("objectTypeProperty"),l.ObjectTypeSpreadProperty=S("objectTypeSpreadProperty"),l.OpaqueType=S("opaqueType"),l.QualifiedTypeIdentifier=S("qualifiedTypeIdentifier"),l.StringLiteralTypeAnnotation=S("stringLiteralTypeAnnotation"),l.StringTypeAnnotation=S("stringTypeAnnotation"),l.SymbolTypeAnnotation=S("symbolTypeAnnotation"),l.ThisTypeAnnotation=S("thisTypeAnnotation"),l.TupleTypeAnnotation=S("tupleTypeAnnotation"),l.TypeofTypeAnnotation=S("typeofTypeAnnotation"),l.TypeAlias=S("typeAlias"),l.TypeAnnotation=S("typeAnnotation"),l.TypeCastExpression=S("typeCastExpression"),l.TypeParameter=S("typeParameter"),l.TypeParameterDeclaration=S("typeParameterDeclaration"),l.TypeParameterInstantiation=S("typeParameterInstantiation"),l.UnionTypeAnnotation=S("unionTypeAnnotation"),l.Variance=S("variance"),l.VoidTypeAnnotation=S("voidTypeAnnotation"),l.EnumDeclaration=S("enumDeclaration"),l.EnumBooleanBody=S("enumBooleanBody"),l.EnumNumberBody=S("enumNumberBody"),l.EnumStringBody=S("enumStringBody"),l.EnumSymbolBody=S("enumSymbolBody"),l.EnumBooleanMember=S("enumBooleanMember"),l.EnumNumberMember=S("enumNumberMember"),l.EnumStringMember=S("enumStringMember"),l.EnumDefaultedMember=S("enumDefaultedMember"),l.IndexedAccessType=S("indexedAccessType"),l.OptionalIndexedAccessType=S("optionalIndexedAccessType"),l.JSXAttribute=S("jsxAttribute"),l.JSXClosingElement=S("jsxClosingElement"),l.JSXElement=S("jsxElement"),l.JSXEmptyExpression=S("jsxEmptyExpression"),l.JSXExpressionContainer=S("jsxExpressionContainer"),l.JSXSpreadChild=S("jsxSpreadChild"),l.JSXIdentifier=S("jsxIdentifier"),l.JSXMemberExpression=S("jsxMemberExpression"),l.JSXNamespacedName=S("jsxNamespacedName"),l.JSXOpeningElement=S("jsxOpeningElement"),l.JSXSpreadAttribute=S("jsxSpreadAttribute"),l.JSXText=S("jsxText"),l.JSXFragment=S("jsxFragment"),l.JSXOpeningFragment=S("jsxOpeningFragment"),l.JSXClosingFragment=S("jsxClosingFragment"),l.Noop=S("noop"),l.Placeholder=S("placeholder"),l.V8IntrinsicIdentifier=S("v8IntrinsicIdentifier"),l.ArgumentPlaceholder=S("argumentPlaceholder"),l.BindExpression=S("bindExpression"),l.Decorator=S("decorator"),l.DoExpression=S("doExpression"),l.ExportDefaultSpecifier=S("exportDefaultSpecifier"),l.RecordExpression=S("recordExpression"),l.TupleExpression=S("tupleExpression"),l.DecimalLiteral=S("decimalLiteral"),l.ModuleExpression=S("moduleExpression"),l.TopicReference=S("topicReference"),l.PipelineTopicExpression=S("pipelineTopicExpression"),l.PipelineBareFunction=S("pipelineBareFunction"),l.PipelinePrimaryTopicReference=S("pipelinePrimaryTopicReference"),l.VoidPattern=S("voidPattern"),l.TSParameterProperty=S("tsParameterProperty"),l.TSDeclareFunction=S("tsDeclareFunction"),l.TSDeclareMethod=S("tsDeclareMethod"),l.TSQualifiedName=S("tsQualifiedName"),l.TSCallSignatureDeclaration=S("tsCallSignatureDeclaration"),l.TSConstructSignatureDeclaration=S("tsConstructSignatureDeclaration"),l.TSPropertySignature=S("tsPropertySignature"),l.TSMethodSignature=S("tsMethodSignature"),l.TSIndexSignature=S("tsIndexSignature"),l.TSAnyKeyword=S("tsAnyKeyword"),l.TSBooleanKeyword=S("tsBooleanKeyword"),l.TSBigIntKeyword=S("tsBigIntKeyword"),l.TSIntrinsicKeyword=S("tsIntrinsicKeyword"),l.TSNeverKeyword=S("tsNeverKeyword"),l.TSNullKeyword=S("tsNullKeyword"),l.TSNumberKeyword=S("tsNumberKeyword"),l.TSObjectKeyword=S("tsObjectKeyword"),l.TSStringKeyword=S("tsStringKeyword"),l.TSSymbolKeyword=S("tsSymbolKeyword"),l.TSUndefinedKeyword=S("tsUndefinedKeyword"),l.TSUnknownKeyword=S("tsUnknownKeyword"),l.TSVoidKeyword=S("tsVoidKeyword"),l.TSThisType=S("tsThisType"),l.TSFunctionType=S("tsFunctionType"),l.TSConstructorType=S("tsConstructorType"),l.TSTypeReference=S("tsTypeReference"),l.TSTypePredicate=S("tsTypePredicate"),l.TSTypeQuery=S("tsTypeQuery"),l.TSTypeLiteral=S("tsTypeLiteral"),l.TSArrayType=S("tsArrayType"),l.TSTupleType=S("tsTupleType"),l.TSOptionalType=S("tsOptionalType"),l.TSRestType=S("tsRestType"),l.TSNamedTupleMember=S("tsNamedTupleMember"),l.TSUnionType=S("tsUnionType"),l.TSIntersectionType=S("tsIntersectionType"),l.TSConditionalType=S("tsConditionalType"),l.TSInferType=S("tsInferType"),l.TSParenthesizedType=S("tsParenthesizedType"),l.TSTypeOperator=S("tsTypeOperator"),l.TSIndexedAccessType=S("tsIndexedAccessType"),l.TSMappedType=S("tsMappedType"),l.TSTemplateLiteralType=S("tsTemplateLiteralType"),l.TSLiteralType=S("tsLiteralType"),l.TSExpressionWithTypeArguments=S("tsExpressionWithTypeArguments"),l.TSInterfaceDeclaration=S("tsInterfaceDeclaration"),l.TSInterfaceBody=S("tsInterfaceBody"),l.TSTypeAliasDeclaration=S("tsTypeAliasDeclaration"),l.TSInstantiationExpression=S("tsInstantiationExpression"),l.TSAsExpression=S("tsAsExpression"),l.TSSatisfiesExpression=S("tsSatisfiesExpression"),l.TSTypeAssertion=S("tsTypeAssertion"),l.TSEnumBody=S("tsEnumBody"),l.TSEnumDeclaration=S("tsEnumDeclaration"),l.TSEnumMember=S("tsEnumMember"),l.TSModuleDeclaration=S("tsModuleDeclaration"),l.TSModuleBlock=S("tsModuleBlock"),l.TSImportType=S("tsImportType"),l.TSImportEqualsDeclaration=S("tsImportEqualsDeclaration"),l.TSExternalModuleReference=S("tsExternalModuleReference"),l.TSNonNullExpression=S("tsNonNullExpression"),l.TSExportAssignment=S("tsExportAssignment"),l.TSNamespaceExportDeclaration=S("tsNamespaceExportDeclaration"),l.TSTypeAnnotation=S("tsTypeAnnotation"),l.TSTypeParameterInstantiation=S("tsTypeParameterInstantiation"),l.TSTypeParameterDeclaration=S("tsTypeParameterDeclaration"),l.TSTypeParameter=S("tsTypeParameter"),l.NumberLiteral=ut.numberLiteral,l.RegexLiteral=ut.regexLiteral,l.RestProperty=ut.restProperty,l.SpreadProperty=ut.spreadProperty,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=f;Object.keys(e).forEach(function(s){s==="default"||s==="__esModule"||s in t&&t[s]===e[s]||Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[s]}})});var r=l;Object.keys(r).forEach(function(s){s==="default"||s==="__esModule"||s in t&&t[s]===r[s]||Object.defineProperty(t,s,{enumerable:!0,get:function(){return r[s]}})})}(ae);var pa;function qS(){if(pa)return _t;pa=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.default=r;var t=ae,e=Ds();function r(s,i){const a=s.value.split(/\r\n|\n|\r/);let n=0;for(let u=0;u<a.length;u++)/[^ \t]/.exec(a[u])&&(n=u);let o="";for(let u=0;u<a.length;u++){const p=a[u],y=u===0,E=u===a.length-1,P=u===n;let g=p.replace(/\t/g," ");y||(g=g.replace(/^ +/,"")),E||(g=g.replace(/ +$/,"")),g&&(P||(g+=" "),o+=g)}o&&i.push((0,e.inherits)((0,t.stringLiteral)(o),s))}return _t}var fa;function WS(){if(fa)return kt;fa=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.default=r;var t=d,e=qS();function r(s){const i=[];for(let a=0;a<s.children.length;a++){let n=s.children[a];if((0,t.isJSXText)(n)){(0,e.default)(n,i);continue}(0,t.isJSXExpressionContainer)(n)&&(n=n.expression),!(0,t.isJSXEmptyExpression)(n)&&i.push(n)}return i}return kt}var qr={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.default=zS;var HS=ce();function zS(t){return!!(t&&HS.VISITOR_KEYS[t.type])}Object.defineProperty(qr,"__esModule",{value:!0}),qr.default=QS;var GS=$t;function QS(t){if(!(0,GS.default)(t)){var e;const r=(e=t==null?void 0:t.type)!=null?e:JSON.stringify(t);throw new TypeError(`Not a valid node of type "${r}"`)}}var h={};Object.defineProperty(h,"__esModule",{value:!0}),h.assertAccessor=Sg,h.assertAnyTypeAnnotation=Mx,h.assertArgumentPlaceholder=cE,h.assertArrayExpression=e0,h.assertArrayPattern=Q0,h.assertArrayTypeAnnotation=Bx,h.assertArrowFunctionExpression=Z0,h.assertAssignmentExpression=t0,h.assertAssignmentPattern=G0,h.assertAwaitExpression=Px,h.assertBigIntLiteral=Ax,h.assertBinary=jP,h.assertBinaryExpression=r0,h.assertBindExpression=pE,h.assertBlock=VP,h.assertBlockParent=UP,h.assertBlockStatement=n0,h.assertBooleanLiteral=C0,h.assertBooleanLiteralTypeAnnotation=Rx,h.assertBooleanTypeAnnotation=Fx,h.assertBreakStatement=o0,h.assertCallExpression=l0,h.assertCatchClause=u0,h.assertClass=hg,h.assertClassAccessorProperty=wx,h.assertClassBody=ex,h.assertClassDeclaration=rx,h.assertClassExpression=tx,h.assertClassImplements=Kx,h.assertClassMethod=hx,h.assertClassPrivateMethod=Dx,h.assertClassPrivateProperty=Ox,h.assertClassProperty=Nx,h.assertCompletionStatement=YP,h.assertConditional=JP,h.assertConditionalExpression=c0,h.assertContinueStatement=p0,h.assertDebuggerStatement=f0,h.assertDecimalLiteral=TE,h.assertDeclaration=tg,h.assertDeclareClass=Ux,h.assertDeclareExportAllDeclaration=zx,h.assertDeclareExportDeclaration=Hx,h.assertDeclareFunction=Vx,h.assertDeclareInterface=$x,h.assertDeclareModule=Xx,h.assertDeclareModuleExports=Yx,h.assertDeclareOpaqueType=qx,h.assertDeclareTypeAlias=Jx,h.assertDeclareVariable=Wx,h.assertDeclaredPredicate=Gx,h.assertDecorator=fE,h.assertDirective=i0,h.assertDirectiveLiteral=a0,h.assertDoExpression=dE,h.assertDoWhileStatement=d0,h.assertEmptyStatement=h0,h.assertEmptyTypeAnnotation=lb,h.assertEnumBody=Ig,h.assertEnumBooleanBody=Bb,h.assertEnumBooleanMember=Kb,h.assertEnumDeclaration=Mb,h.assertEnumDefaultedMember=$b,h.assertEnumMember=vg,h.assertEnumNumberBody=Fb,h.assertEnumNumberMember=Ub,h.assertEnumStringBody=Rb,h.assertEnumStringMember=Vb,h.assertEnumSymbolBody=jb,h.assertExistsTypeAnnotation=Qx,h.assertExportAllDeclaration=sx,h.assertExportDeclaration=mg,h.assertExportDefaultDeclaration=ix,h.assertExportDefaultSpecifier=hE,h.assertExportNamedDeclaration=ax,h.assertExportNamespaceSpecifier=Ix,h.assertExportSpecifier=nx,h.assertExpression=RP,h.assertExpressionStatement=y0,h.assertExpressionWrapper=HP,h.assertFile=m0,h.assertFlow=bg,h.assertFlowBaseAnnotation=Pg,h.assertFlowDeclaration=gg,h.assertFlowPredicate=Ag,h.assertFlowType=Eg,h.assertFor=zP,h.assertForInStatement=T0,h.assertForOfStatement=ox,h.assertForStatement=S0,h.assertForXStatement=GP,h.assertFunction=QP,h.assertFunctionDeclaration=x0,h.assertFunctionExpression=b0,h.assertFunctionParameter=rg,h.assertFunctionParent=ZP,h.assertFunctionTypeAnnotation=Zx,h.assertFunctionTypeParam=eb,h.assertGenericTypeAnnotation=tb,h.assertIdentifier=E0,h.assertIfStatement=P0,h.assertImmutable=og,h.assertImport=gx,h.assertImportAttribute=_x,h.assertImportDeclaration=lx,h.assertImportDefaultSpecifier=ux,h.assertImportExpression=fx,h.assertImportNamespaceSpecifier=cx,h.assertImportOrExportDeclaration=yg,h.assertImportSpecifier=px,h.assertIndexedAccessType=Xb,h.assertInferredPredicate=rb,h.assertInterfaceDeclaration=ib,h.assertInterfaceExtends=sb,h.assertInterfaceTypeAnnotation=ab,h.assertInterpreterDirective=s0,h.assertIntersectionTypeAnnotation=nb,h.assertJSX=Cg,h.assertJSXAttribute=Jb,h.assertJSXClosingElement=qb,h.assertJSXClosingFragment=nE,h.assertJSXElement=Wb,h.assertJSXEmptyExpression=Hb,h.assertJSXExpressionContainer=zb,h.assertJSXFragment=iE,h.assertJSXIdentifier=Qb,h.assertJSXMemberExpression=Zb,h.assertJSXNamespacedName=eE,h.assertJSXOpeningElement=tE,h.assertJSXOpeningFragment=aE,h.assertJSXSpreadAttribute=rE,h.assertJSXSpreadChild=Gb,h.assertJSXText=sE,h.assertLVal=ig,h.assertLabeledStatement=g0,h.assertLiteral=ng,h.assertLogicalExpression=w0,h.assertLoop=qP,h.assertMemberExpression=O0,h.assertMetaProperty=dx,h.assertMethod=ug,h.assertMiscellaneous=Ng,h.assertMixedTypeAnnotation=ob,h.assertModuleDeclaration=Fg,h.assertModuleExpression=SE,h.assertModuleSpecifier=Tg,h.assertNewExpression=D0,h.assertNoop=oE,h.assertNullLiteral=v0,h.assertNullLiteralTypeAnnotation=jx,h.assertNullableTypeAnnotation=ub,h.assertNumberLiteral=kg,h.assertNumberLiteralTypeAnnotation=cb,h.assertNumberTypeAnnotation=pb,h.assertNumericLiteral=I0,h.assertObjectExpression=k0,h.assertObjectMember=cg,h.assertObjectMethod=_0,h.assertObjectPattern=yx,h.assertObjectProperty=M0,h.assertObjectTypeAnnotation=fb,h.assertObjectTypeCallProperty=hb,h.assertObjectTypeIndexer=yb,h.assertObjectTypeInternalSlot=db,h.assertObjectTypeProperty=mb,h.assertObjectTypeSpreadProperty=Tb,h.assertOpaqueType=Sb,h.assertOptionalCallExpression=Cx,h.assertOptionalIndexedAccessType=Yb,h.assertOptionalMemberExpression=vx,h.assertParenthesizedExpression=j0,h.assertPattern=dg,h.assertPatternLike=sg,h.assertPipelineBareFunction=EE,h.assertPipelinePrimaryTopicReference=PE,h.assertPipelineTopicExpression=bE,h.assertPlaceholder=lE,h.assertPrivate=xg,h.assertPrivateName=Lx,h.assertProgram=L0,h.assertProperty=pg,h.assertPureish=eg,h.assertQualifiedTypeIdentifier=xb,h.assertRecordExpression=yE,h.assertRegExpLiteral=N0,h.assertRegexLiteral=_g,h.assertRestElement=B0,h.assertRestProperty=Mg,h.assertReturnStatement=F0,h.assertScopable=KP,h.assertSequenceExpression=R0,h.assertSpreadElement=mx,h.assertSpreadProperty=Bg,h.assertStandardized=FP,h.assertStatement=$P,h.assertStaticBlock=kx,h.assertStringLiteral=A0,h.assertStringLiteralTypeAnnotation=bb,h.assertStringTypeAnnotation=Eb,h.assertSuper=Tx,h.assertSwitchCase=K0,h.assertSwitchStatement=U0,h.assertSymbolTypeAnnotation=Pb,h.assertTSAnyKeyword=kE,h.assertTSArrayType=ZE,h.assertTSAsExpression=xP,h.assertTSBaseType=Lg,h.assertTSBigIntKeyword=ME,h.assertTSBooleanKeyword=_E,h.assertTSCallSignatureDeclaration=NE,h.assertTSConditionalType=nP,h.assertTSConstructSignatureDeclaration=wE,h.assertTSConstructorType=WE,h.assertTSDeclareFunction=IE,h.assertTSDeclareMethod=vE,h.assertTSEntityName=ag,h.assertTSEnumBody=PP,h.assertTSEnumDeclaration=gP,h.assertTSEnumMember=AP,h.assertTSExportAssignment=DP,h.assertTSExpressionWithTypeArguments=hP,h.assertTSExternalModuleReference=wP,h.assertTSFunctionType=qE,h.assertTSImportEqualsDeclaration=NP,h.assertTSImportType=CP,h.assertTSIndexSignature=LE,h.assertTSIndexedAccessType=cP,h.assertTSInferType=oP,h.assertTSInstantiationExpression=SP,h.assertTSInterfaceBody=mP,h.assertTSInterfaceDeclaration=yP,h.assertTSIntersectionType=aP,h.assertTSIntrinsicKeyword=BE,h.assertTSLiteralType=dP,h.assertTSMappedType=pP,h.assertTSMethodSignature=DE,h.assertTSModuleBlock=vP,h.assertTSModuleDeclaration=IP,h.assertTSNamedTupleMember=sP,h.assertTSNamespaceExportDeclaration=LP,h.assertTSNeverKeyword=FE,h.assertTSNonNullExpression=OP,h.assertTSNullKeyword=RE,h.assertTSNumberKeyword=jE,h.assertTSObjectKeyword=KE,h.assertTSOptionalType=tP,h.assertTSParameterProperty=AE,h.assertTSParenthesizedType=lP,h.assertTSPropertySignature=OE,h.assertTSQualifiedName=CE,h.assertTSRestType=rP,h.assertTSSatisfiesExpression=bP,h.assertTSStringKeyword=UE,h.assertTSSymbolKeyword=VE,h.assertTSTemplateLiteralType=fP,h.assertTSThisType=JE,h.assertTSTupleType=eP,h.assertTSType=Dg,h.assertTSTypeAliasDeclaration=TP,h.assertTSTypeAnnotation=kP,h.assertTSTypeAssertion=EP,h.assertTSTypeElement=Og,h.assertTSTypeLiteral=QE,h.assertTSTypeOperator=uP,h.assertTSTypeParameter=BP,h.assertTSTypeParameterDeclaration=MP,h.assertTSTypeParameterInstantiation=_P,h.assertTSTypePredicate=zE,h.assertTSTypeQuery=GE,h.assertTSTypeReference=HE,h.assertTSUndefinedKeyword=$E,h.assertTSUnionType=iP,h.assertTSUnknownKeyword=XE,h.assertTSVoidKeyword=YE,h.assertTaggedTemplateExpression=Sx,h.assertTemplateElement=xx,h.assertTemplateLiteral=bx,h.assertTerminatorless=XP,h.assertThisExpression=V0,h.assertThisTypeAnnotation=gb,h.assertThrowStatement=$0,h.assertTopicReference=xE,h.assertTryStatement=X0,h.assertTupleExpression=mE,h.assertTupleTypeAnnotation=Ab,h.assertTypeAlias=vb,h.assertTypeAnnotation=Cb,h.assertTypeCastExpression=Nb,h.assertTypeParameter=wb,h.assertTypeParameterDeclaration=Ob,h.assertTypeParameterInstantiation=Db,h.assertTypeScript=wg,h.assertTypeofTypeAnnotation=Ib,h.assertUnaryExpression=Y0,h.assertUnaryLike=fg,h.assertUnionTypeAnnotation=Lb,h.assertUpdateExpression=J0,h.assertUserWhitespacable=lg,h.assertV8IntrinsicIdentifier=uE,h.assertVariableDeclaration=q0,h.assertVariableDeclarator=W0,h.assertVariance=kb,h.assertVoidPattern=gE,h.assertVoidTypeAnnotation=_b,h.assertWhile=WP,h.assertWhileStatement=H0,h.assertWithStatement=z0,h.assertYieldExpression=Ex;var ZS=nt(),ct=$e;function m(t,e,r){if(!(0,ZS.default)(t,e,r))throw new Error(`Expected type "${t}" with option ${JSON.stringify(r)}, but instead got "${e.type}".`)}function e0(t,e){m("ArrayExpression",t,e)}function t0(t,e){m("AssignmentExpression",t,e)}function r0(t,e){m("BinaryExpression",t,e)}function s0(t,e){m("InterpreterDirective",t,e)}function i0(t,e){m("Directive",t,e)}function a0(t,e){m("DirectiveLiteral",t,e)}function n0(t,e){m("BlockStatement",t,e)}function o0(t,e){m("BreakStatement",t,e)}function l0(t,e){m("CallExpression",t,e)}function u0(t,e){m("CatchClause",t,e)}function c0(t,e){m("ConditionalExpression",t,e)}function p0(t,e){m("ContinueStatement",t,e)}function f0(t,e){m("DebuggerStatement",t,e)}function d0(t,e){m("DoWhileStatement",t,e)}function h0(t,e){m("EmptyStatement",t,e)}function y0(t,e){m("ExpressionStatement",t,e)}function m0(t,e){m("File",t,e)}function T0(t,e){m("ForInStatement",t,e)}function S0(t,e){m("ForStatement",t,e)}function x0(t,e){m("FunctionDeclaration",t,e)}function b0(t,e){m("FunctionExpression",t,e)}function E0(t,e){m("Identifier",t,e)}function P0(t,e){m("IfStatement",t,e)}function g0(t,e){m("LabeledStatement",t,e)}function A0(t,e){m("StringLiteral",t,e)}function I0(t,e){m("NumericLiteral",t,e)}function v0(t,e){m("NullLiteral",t,e)}function C0(t,e){m("BooleanLiteral",t,e)}function N0(t,e){m("RegExpLiteral",t,e)}function w0(t,e){m("LogicalExpression",t,e)}function O0(t,e){m("MemberExpression",t,e)}function D0(t,e){m("NewExpression",t,e)}function L0(t,e){m("Program",t,e)}function k0(t,e){m("ObjectExpression",t,e)}function _0(t,e){m("ObjectMethod",t,e)}function M0(t,e){m("ObjectProperty",t,e)}function B0(t,e){m("RestElement",t,e)}function F0(t,e){m("ReturnStatement",t,e)}function R0(t,e){m("SequenceExpression",t,e)}function j0(t,e){m("ParenthesizedExpression",t,e)}function K0(t,e){m("SwitchCase",t,e)}function U0(t,e){m("SwitchStatement",t,e)}function V0(t,e){m("ThisExpression",t,e)}function $0(t,e){m("ThrowStatement",t,e)}function X0(t,e){m("TryStatement",t,e)}function Y0(t,e){m("UnaryExpression",t,e)}function J0(t,e){m("UpdateExpression",t,e)}function q0(t,e){m("VariableDeclaration",t,e)}function W0(t,e){m("VariableDeclarator",t,e)}function H0(t,e){m("WhileStatement",t,e)}function z0(t,e){m("WithStatement",t,e)}function G0(t,e){m("AssignmentPattern",t,e)}function Q0(t,e){m("ArrayPattern",t,e)}function Z0(t,e){m("ArrowFunctionExpression",t,e)}function ex(t,e){m("ClassBody",t,e)}function tx(t,e){m("ClassExpression",t,e)}function rx(t,e){m("ClassDeclaration",t,e)}function sx(t,e){m("ExportAllDeclaration",t,e)}function ix(t,e){m("ExportDefaultDeclaration",t,e)}function ax(t,e){m("ExportNamedDeclaration",t,e)}function nx(t,e){m("ExportSpecifier",t,e)}function ox(t,e){m("ForOfStatement",t,e)}function lx(t,e){m("ImportDeclaration",t,e)}function ux(t,e){m("ImportDefaultSpecifier",t,e)}function cx(t,e){m("ImportNamespaceSpecifier",t,e)}function px(t,e){m("ImportSpecifier",t,e)}function fx(t,e){m("ImportExpression",t,e)}function dx(t,e){m("MetaProperty",t,e)}function hx(t,e){m("ClassMethod",t,e)}function yx(t,e){m("ObjectPattern",t,e)}function mx(t,e){m("SpreadElement",t,e)}function Tx(t,e){m("Super",t,e)}function Sx(t,e){m("TaggedTemplateExpression",t,e)}function xx(t,e){m("TemplateElement",t,e)}function bx(t,e){m("TemplateLiteral",t,e)}function Ex(t,e){m("YieldExpression",t,e)}function Px(t,e){m("AwaitExpression",t,e)}function gx(t,e){m("Import",t,e)}function Ax(t,e){m("BigIntLiteral",t,e)}function Ix(t,e){m("ExportNamespaceSpecifier",t,e)}function vx(t,e){m("OptionalMemberExpression",t,e)}function Cx(t,e){m("OptionalCallExpression",t,e)}function Nx(t,e){m("ClassProperty",t,e)}function wx(t,e){m("ClassAccessorProperty",t,e)}function Ox(t,e){m("ClassPrivateProperty",t,e)}function Dx(t,e){m("ClassPrivateMethod",t,e)}function Lx(t,e){m("PrivateName",t,e)}function kx(t,e){m("StaticBlock",t,e)}function _x(t,e){m("ImportAttribute",t,e)}function Mx(t,e){m("AnyTypeAnnotation",t,e)}function Bx(t,e){m("ArrayTypeAnnotation",t,e)}function Fx(t,e){m("BooleanTypeAnnotation",t,e)}function Rx(t,e){m("BooleanLiteralTypeAnnotation",t,e)}function jx(t,e){m("NullLiteralTypeAnnotation",t,e)}function Kx(t,e){m("ClassImplements",t,e)}function Ux(t,e){m("DeclareClass",t,e)}function Vx(t,e){m("DeclareFunction",t,e)}function $x(t,e){m("DeclareInterface",t,e)}function Xx(t,e){m("DeclareModule",t,e)}function Yx(t,e){m("DeclareModuleExports",t,e)}function Jx(t,e){m("DeclareTypeAlias",t,e)}function qx(t,e){m("DeclareOpaqueType",t,e)}function Wx(t,e){m("DeclareVariable",t,e)}function Hx(t,e){m("DeclareExportDeclaration",t,e)}function zx(t,e){m("DeclareExportAllDeclaration",t,e)}function Gx(t,e){m("DeclaredPredicate",t,e)}function Qx(t,e){m("ExistsTypeAnnotation",t,e)}function Zx(t,e){m("FunctionTypeAnnotation",t,e)}function eb(t,e){m("FunctionTypeParam",t,e)}function tb(t,e){m("GenericTypeAnnotation",t,e)}function rb(t,e){m("InferredPredicate",t,e)}function sb(t,e){m("InterfaceExtends",t,e)}function ib(t,e){m("InterfaceDeclaration",t,e)}function ab(t,e){m("InterfaceTypeAnnotation",t,e)}function nb(t,e){m("IntersectionTypeAnnotation",t,e)}function ob(t,e){m("MixedTypeAnnotation",t,e)}function lb(t,e){m("EmptyTypeAnnotation",t,e)}function ub(t,e){m("NullableTypeAnnotation",t,e)}function cb(t,e){m("NumberLiteralTypeAnnotation",t,e)}function pb(t,e){m("NumberTypeAnnotation",t,e)}function fb(t,e){m("ObjectTypeAnnotation",t,e)}function db(t,e){m("ObjectTypeInternalSlot",t,e)}function hb(t,e){m("ObjectTypeCallProperty",t,e)}function yb(t,e){m("ObjectTypeIndexer",t,e)}function mb(t,e){m("ObjectTypeProperty",t,e)}function Tb(t,e){m("ObjectTypeSpreadProperty",t,e)}function Sb(t,e){m("OpaqueType",t,e)}function xb(t,e){m("QualifiedTypeIdentifier",t,e)}function bb(t,e){m("StringLiteralTypeAnnotation",t,e)}function Eb(t,e){m("StringTypeAnnotation",t,e)}function Pb(t,e){m("SymbolTypeAnnotation",t,e)}function gb(t,e){m("ThisTypeAnnotation",t,e)}function Ab(t,e){m("TupleTypeAnnotation",t,e)}function Ib(t,e){m("TypeofTypeAnnotation",t,e)}function vb(t,e){m("TypeAlias",t,e)}function Cb(t,e){m("TypeAnnotation",t,e)}function Nb(t,e){m("TypeCastExpression",t,e)}function wb(t,e){m("TypeParameter",t,e)}function Ob(t,e){m("TypeParameterDeclaration",t,e)}function Db(t,e){m("TypeParameterInstantiation",t,e)}function Lb(t,e){m("UnionTypeAnnotation",t,e)}function kb(t,e){m("Variance",t,e)}function _b(t,e){m("VoidTypeAnnotation",t,e)}function Mb(t,e){m("EnumDeclaration",t,e)}function Bb(t,e){m("EnumBooleanBody",t,e)}function Fb(t,e){m("EnumNumberBody",t,e)}function Rb(t,e){m("EnumStringBody",t,e)}function jb(t,e){m("EnumSymbolBody",t,e)}function Kb(t,e){m("EnumBooleanMember",t,e)}function Ub(t,e){m("EnumNumberMember",t,e)}function Vb(t,e){m("EnumStringMember",t,e)}function $b(t,e){m("EnumDefaultedMember",t,e)}function Xb(t,e){m("IndexedAccessType",t,e)}function Yb(t,e){m("OptionalIndexedAccessType",t,e)}function Jb(t,e){m("JSXAttribute",t,e)}function qb(t,e){m("JSXClosingElement",t,e)}function Wb(t,e){m("JSXElement",t,e)}function Hb(t,e){m("JSXEmptyExpression",t,e)}function zb(t,e){m("JSXExpressionContainer",t,e)}function Gb(t,e){m("JSXSpreadChild",t,e)}function Qb(t,e){m("JSXIdentifier",t,e)}function Zb(t,e){m("JSXMemberExpression",t,e)}function eE(t,e){m("JSXNamespacedName",t,e)}function tE(t,e){m("JSXOpeningElement",t,e)}function rE(t,e){m("JSXSpreadAttribute",t,e)}function sE(t,e){m("JSXText",t,e)}function iE(t,e){m("JSXFragment",t,e)}function aE(t,e){m("JSXOpeningFragment",t,e)}function nE(t,e){m("JSXClosingFragment",t,e)}function oE(t,e){m("Noop",t,e)}function lE(t,e){m("Placeholder",t,e)}function uE(t,e){m("V8IntrinsicIdentifier",t,e)}function cE(t,e){m("ArgumentPlaceholder",t,e)}function pE(t,e){m("BindExpression",t,e)}function fE(t,e){m("Decorator",t,e)}function dE(t,e){m("DoExpression",t,e)}function hE(t,e){m("ExportDefaultSpecifier",t,e)}function yE(t,e){m("RecordExpression",t,e)}function mE(t,e){m("TupleExpression",t,e)}function TE(t,e){m("DecimalLiteral",t,e)}function SE(t,e){m("ModuleExpression",t,e)}function xE(t,e){m("TopicReference",t,e)}function bE(t,e){m("PipelineTopicExpression",t,e)}function EE(t,e){m("PipelineBareFunction",t,e)}function PE(t,e){m("PipelinePrimaryTopicReference",t,e)}function gE(t,e){m("VoidPattern",t,e)}function AE(t,e){m("TSParameterProperty",t,e)}function IE(t,e){m("TSDeclareFunction",t,e)}function vE(t,e){m("TSDeclareMethod",t,e)}function CE(t,e){m("TSQualifiedName",t,e)}function NE(t,e){m("TSCallSignatureDeclaration",t,e)}function wE(t,e){m("TSConstructSignatureDeclaration",t,e)}function OE(t,e){m("TSPropertySignature",t,e)}function DE(t,e){m("TSMethodSignature",t,e)}function LE(t,e){m("TSIndexSignature",t,e)}function kE(t,e){m("TSAnyKeyword",t,e)}function _E(t,e){m("TSBooleanKeyword",t,e)}function ME(t,e){m("TSBigIntKeyword",t,e)}function BE(t,e){m("TSIntrinsicKeyword",t,e)}function FE(t,e){m("TSNeverKeyword",t,e)}function RE(t,e){m("TSNullKeyword",t,e)}function jE(t,e){m("TSNumberKeyword",t,e)}function KE(t,e){m("TSObjectKeyword",t,e)}function UE(t,e){m("TSStringKeyword",t,e)}function VE(t,e){m("TSSymbolKeyword",t,e)}function $E(t,e){m("TSUndefinedKeyword",t,e)}function XE(t,e){m("TSUnknownKeyword",t,e)}function YE(t,e){m("TSVoidKeyword",t,e)}function JE(t,e){m("TSThisType",t,e)}function qE(t,e){m("TSFunctionType",t,e)}function WE(t,e){m("TSConstructorType",t,e)}function HE(t,e){m("TSTypeReference",t,e)}function zE(t,e){m("TSTypePredicate",t,e)}function GE(t,e){m("TSTypeQuery",t,e)}function QE(t,e){m("TSTypeLiteral",t,e)}function ZE(t,e){m("TSArrayType",t,e)}function eP(t,e){m("TSTupleType",t,e)}function tP(t,e){m("TSOptionalType",t,e)}function rP(t,e){m("TSRestType",t,e)}function sP(t,e){m("TSNamedTupleMember",t,e)}function iP(t,e){m("TSUnionType",t,e)}function aP(t,e){m("TSIntersectionType",t,e)}function nP(t,e){m("TSConditionalType",t,e)}function oP(t,e){m("TSInferType",t,e)}function lP(t,e){m("TSParenthesizedType",t,e)}function uP(t,e){m("TSTypeOperator",t,e)}function cP(t,e){m("TSIndexedAccessType",t,e)}function pP(t,e){m("TSMappedType",t,e)}function fP(t,e){m("TSTemplateLiteralType",t,e)}function dP(t,e){m("TSLiteralType",t,e)}function hP(t,e){m("TSExpressionWithTypeArguments",t,e)}function yP(t,e){m("TSInterfaceDeclaration",t,e)}function mP(t,e){m("TSInterfaceBody",t,e)}function TP(t,e){m("TSTypeAliasDeclaration",t,e)}function SP(t,e){m("TSInstantiationExpression",t,e)}function xP(t,e){m("TSAsExpression",t,e)}function bP(t,e){m("TSSatisfiesExpression",t,e)}function EP(t,e){m("TSTypeAssertion",t,e)}function PP(t,e){m("TSEnumBody",t,e)}function gP(t,e){m("TSEnumDeclaration",t,e)}function AP(t,e){m("TSEnumMember",t,e)}function IP(t,e){m("TSModuleDeclaration",t,e)}function vP(t,e){m("TSModuleBlock",t,e)}function CP(t,e){m("TSImportType",t,e)}function NP(t,e){m("TSImportEqualsDeclaration",t,e)}function wP(t,e){m("TSExternalModuleReference",t,e)}function OP(t,e){m("TSNonNullExpression",t,e)}function DP(t,e){m("TSExportAssignment",t,e)}function LP(t,e){m("TSNamespaceExportDeclaration",t,e)}function kP(t,e){m("TSTypeAnnotation",t,e)}function _P(t,e){m("TSTypeParameterInstantiation",t,e)}function MP(t,e){m("TSTypeParameterDeclaration",t,e)}function BP(t,e){m("TSTypeParameter",t,e)}function FP(t,e){m("Standardized",t,e)}function RP(t,e){m("Expression",t,e)}function jP(t,e){m("Binary",t,e)}function KP(t,e){m("Scopable",t,e)}function UP(t,e){m("BlockParent",t,e)}function VP(t,e){m("Block",t,e)}function $P(t,e){m("Statement",t,e)}function XP(t,e){m("Terminatorless",t,e)}function YP(t,e){m("CompletionStatement",t,e)}function JP(t,e){m("Conditional",t,e)}function qP(t,e){m("Loop",t,e)}function WP(t,e){m("While",t,e)}function HP(t,e){m("ExpressionWrapper",t,e)}function zP(t,e){m("For",t,e)}function GP(t,e){m("ForXStatement",t,e)}function QP(t,e){m("Function",t,e)}function ZP(t,e){m("FunctionParent",t,e)}function eg(t,e){m("Pureish",t,e)}function tg(t,e){m("Declaration",t,e)}function rg(t,e){m("FunctionParameter",t,e)}function sg(t,e){m("PatternLike",t,e)}function ig(t,e){m("LVal",t,e)}function ag(t,e){m("TSEntityName",t,e)}function ng(t,e){m("Literal",t,e)}function og(t,e){m("Immutable",t,e)}function lg(t,e){m("UserWhitespacable",t,e)}function ug(t,e){m("Method",t,e)}function cg(t,e){m("ObjectMember",t,e)}function pg(t,e){m("Property",t,e)}function fg(t,e){m("UnaryLike",t,e)}function dg(t,e){m("Pattern",t,e)}function hg(t,e){m("Class",t,e)}function yg(t,e){m("ImportOrExportDeclaration",t,e)}function mg(t,e){m("ExportDeclaration",t,e)}function Tg(t,e){m("ModuleSpecifier",t,e)}function Sg(t,e){m("Accessor",t,e)}function xg(t,e){m("Private",t,e)}function bg(t,e){m("Flow",t,e)}function Eg(t,e){m("FlowType",t,e)}function Pg(t,e){m("FlowBaseAnnotation",t,e)}function gg(t,e){m("FlowDeclaration",t,e)}function Ag(t,e){m("FlowPredicate",t,e)}function Ig(t,e){m("EnumBody",t,e)}function vg(t,e){m("EnumMember",t,e)}function Cg(t,e){m("JSX",t,e)}function Ng(t,e){m("Miscellaneous",t,e)}function wg(t,e){m("TypeScript",t,e)}function Og(t,e){m("TSTypeElement",t,e)}function Dg(t,e){m("TSType",t,e)}function Lg(t,e){m("TSBaseType",t,e)}function kg(t,e){(0,ct.default)("assertNumberLiteral","assertNumericLiteral"),m("NumberLiteral",t,e)}function _g(t,e){(0,ct.default)("assertRegexLiteral","assertRegExpLiteral"),m("RegexLiteral",t,e)}function Mg(t,e){(0,ct.default)("assertRestProperty","assertRestElement"),m("RestProperty",t,e)}function Bg(t,e){(0,ct.default)("assertSpreadProperty","assertSpreadElement"),m("SpreadProperty",t,e)}function Fg(t,e){(0,ct.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),m("ModuleDeclaration",t,e)}var Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.default=void 0;var pe=ae;Xt.default=Rg;function Rg(t){switch(t){case"string":return(0,pe.stringTypeAnnotation)();case"number":return(0,pe.numberTypeAnnotation)();case"undefined":return(0,pe.voidTypeAnnotation)();case"boolean":return(0,pe.booleanTypeAnnotation)();case"function":return(0,pe.genericTypeAnnotation)((0,pe.identifier)("Function"));case"object":return(0,pe.genericTypeAnnotation)((0,pe.identifier)("Object"));case"symbol":return(0,pe.genericTypeAnnotation)((0,pe.identifier)("Symbol"));case"bigint":return(0,pe.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+t)}var Wr={},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.default=ha;var pt=d;function da(t){return(0,pt.isIdentifier)(t)?t.name:`${t.id.name}.${da(t.qualification)}`}function ha(t){const e=Array.from(t),r=new Map,s=new Map,i=new Set,a=[];for(let n=0;n<e.length;n++){const o=e[n];if(o&&!a.includes(o)){if((0,pt.isAnyTypeAnnotation)(o))return[o];if((0,pt.isFlowBaseAnnotation)(o)){s.set(o.type,o);continue}if((0,pt.isUnionTypeAnnotation)(o)){i.has(o.types)||(e.push(...o.types),i.add(o.types));continue}if((0,pt.isGenericTypeAnnotation)(o)){const u=da(o.id);if(r.has(u)){let p=r.get(u);p.typeParameters?o.typeParameters&&(p.typeParameters.params.push(...o.typeParameters.params),p.typeParameters.params=ha(p.typeParameters.params)):p=o.typeParameters}else r.set(u,o);continue}a.push(o)}}for(const[,n]of s)a.push(n);for(const[,n]of r)a.push(n);return a}Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.default=Ug;var jg=ae,Kg=Yt;function Ug(t){const e=(0,Kg.default)(t);return e.length===1?e[0]:(0,jg.unionTypeAnnotation)(e)}var Hr={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.default=ma;var Xe=d;function ya(t){return(0,Xe.isIdentifier)(t)?t.name:(0,Xe.isThisExpression)(t)?"this":`${t.right.name}.${ya(t.left)}`}function ma(t){const e=Array.from(t),r=new Map,s=new Map,i=new Set,a=[];for(let n=0;n<e.length;n++){const o=e[n];if(!o||a.includes(o))continue;if((0,Xe.isTSAnyKeyword)(o))return[o];if((0,Xe.isTSBaseType)(o)){s.set(o.type,o);continue}if((0,Xe.isTSUnionType)(o)){i.has(o.types)||(e.push(...o.types),i.add(o.types));continue}const u="typeParameters";if((0,Xe.isTSTypeReference)(o)&&o[u]){const p=o[u],y=ya(o.typeName);if(r.has(y)){let E=r.get(y);const P=E[u];P?(P.params.push(...p.params),P.params=ma(P.params)):E=p}else r.set(y,o);continue}a.push(o)}for(const[,n]of s)a.push(n);for(const[,n]of r)a.push(n);return a}Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.default=Yg;var Vg=ae,$g=zr,Xg=d;function Yg(t){const e=t.map(s=>(0,Xg.isTSTypeAnnotation)(s)?s.typeAnnotation:s),r=(0,$g.default)(e);return r.length===1?r[0]:(0,Vg.tsUnionType)(r)}var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.buildUndefinedNode=Jg;var Ta=ae;function Jg(){return(0,Ta.unaryExpression)("void",(0,Ta.numericLiteral)(0),!0)}var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.default=qg;var Sa=ce(),xa=d;const{hasOwn:fe}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function ba(t,e,r,s){return t&&typeof t.type=="string"?Ea(t,e,r,s):t}function Gr(t,e,r,s){return Array.isArray(t)?t.map(i=>ba(i,e,r,s)):ba(t,e,r,s)}function qg(t,e=!0,r=!1){return Ea(t,e,r,new Map)}function Ea(t,e=!0,r=!1,s){if(!t)return t;const{type:i}=t,a={type:t.type};if((0,xa.isIdentifier)(t))a.name=t.name,fe(t,"optional")&&typeof t.optional=="boolean"&&(a.optional=t.optional),fe(t,"typeAnnotation")&&(a.typeAnnotation=e?Gr(t.typeAnnotation,!0,r,s):t.typeAnnotation),fe(t,"decorators")&&(a.decorators=e?Gr(t.decorators,!0,r,s):t.decorators);else if(fe(Sa.NODE_FIELDS,i))for(const n of Object.keys(Sa.NODE_FIELDS[i]))fe(t,n)&&(e?a[n]=(0,xa.isFile)(t)&&n==="comments"?qt(t.comments,e,r,s):Gr(t[n],!0,r,s):a[n]=t[n]);else throw new Error(`Unknown node type: "${i}"`);return fe(t,"loc")&&(r?a.loc=null:a.loc=t.loc),fe(t,"leadingComments")&&(a.leadingComments=qt(t.leadingComments,e,r,s)),fe(t,"innerComments")&&(a.innerComments=qt(t.innerComments,e,r,s)),fe(t,"trailingComments")&&(a.trailingComments=qt(t.trailingComments,e,r,s)),fe(t,"extra")&&(a.extra=Object.assign({},t.extra)),a}function qt(t,e,r,s){return!t||!e?t:t.map(i=>{const a=s.get(i);if(a)return a;const{type:n,value:o,loc:u}=i,p={type:n,value:o,loc:u};return r&&(p.loc=null),s.set(i,p),p})}var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.default=Hg;var Wg=be;function Hg(t){return(0,Wg.default)(t,!1)}var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=Gg;var zg=be;function Gg(t){return(0,zg.default)(t)}var es={};Object.defineProperty(es,"__esModule",{value:!0}),es.default=Zg;var Qg=be;function Zg(t){return(0,Qg.default)(t,!0,!0)}var ts={};Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=tA;var eA=be;function tA(t){return(0,eA.default)(t,!1,!0)}var rs={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.default=rA;function rA(t,e,r){if(!r||!t)return t;const s=`${e}Comments`;return t[s]?e==="leading"?t[s]=r.concat(t[s]):t[s].push(...r):t[s]=r,t}Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=iA;var sA=Wt;function iA(t,e,r,s){return(0,sA.default)(t,e,[{type:s?"CommentLine":"CommentBlock",value:r}])}var Ht={},ft={};Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=aA;function aA(t,e,r){e&&r&&(e[t]=Array.from(new Set([].concat(e[t],r[t]).filter(Boolean))))}Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.default=oA;var nA=ft;function oA(t,e){(0,nA.default)("innerComments",t,e)}var zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.default=uA;var lA=ft;function uA(t,e){(0,lA.default)("leadingComments",t,e)}var Gt={},Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=pA;var cA=ft;function pA(t,e){(0,cA.default)("trailingComments",t,e)}Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.default=yA;var fA=Qt,dA=zt,hA=Ht;function yA(t,e){return(0,fA.default)(t,e),(0,dA.default)(t,e),(0,hA.default)(t,e),t}var ss={};Object.defineProperty(ss,"__esModule",{value:!0}),ss.default=TA;var mA=U;function TA(t){return mA.COMMENT_KEYS.forEach(e=>{t[e]=null}),t}var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.WHILE_TYPES=v.USERWHITESPACABLE_TYPES=v.UNARYLIKE_TYPES=v.TYPESCRIPT_TYPES=v.TSTYPE_TYPES=v.TSTYPEELEMENT_TYPES=v.TSENTITYNAME_TYPES=v.TSBASETYPE_TYPES=v.TERMINATORLESS_TYPES=v.STATEMENT_TYPES=v.STANDARDIZED_TYPES=v.SCOPABLE_TYPES=v.PUREISH_TYPES=v.PROPERTY_TYPES=v.PRIVATE_TYPES=v.PATTERN_TYPES=v.PATTERNLIKE_TYPES=v.OBJECTMEMBER_TYPES=v.MODULESPECIFIER_TYPES=v.MODULEDECLARATION_TYPES=v.MISCELLANEOUS_TYPES=v.METHOD_TYPES=v.LVAL_TYPES=v.LOOP_TYPES=v.LITERAL_TYPES=v.JSX_TYPES=v.IMPORTOREXPORTDECLARATION_TYPES=v.IMMUTABLE_TYPES=v.FUNCTION_TYPES=v.FUNCTIONPARENT_TYPES=v.FUNCTIONPARAMETER_TYPES=v.FOR_TYPES=v.FORXSTATEMENT_TYPES=v.FLOW_TYPES=v.FLOWTYPE_TYPES=v.FLOWPREDICATE_TYPES=v.FLOWDECLARATION_TYPES=v.FLOWBASEANNOTATION_TYPES=v.EXPRESSION_TYPES=v.EXPRESSIONWRAPPER_TYPES=v.EXPORTDECLARATION_TYPES=v.ENUMMEMBER_TYPES=v.ENUMBODY_TYPES=v.DECLARATION_TYPES=v.CONDITIONAL_TYPES=v.COMPLETIONSTATEMENT_TYPES=v.CLASS_TYPES=v.BLOCK_TYPES=v.BLOCKPARENT_TYPES=v.BINARY_TYPES=v.ACCESSOR_TYPES=void 0;var F=ce();v.STANDARDIZED_TYPES=F.FLIPPED_ALIAS_KEYS.Standardized,v.EXPRESSION_TYPES=F.FLIPPED_ALIAS_KEYS.Expression,v.BINARY_TYPES=F.FLIPPED_ALIAS_KEYS.Binary,v.SCOPABLE_TYPES=F.FLIPPED_ALIAS_KEYS.Scopable,v.BLOCKPARENT_TYPES=F.FLIPPED_ALIAS_KEYS.BlockParent,v.BLOCK_TYPES=F.FLIPPED_ALIAS_KEYS.Block,v.STATEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.Statement,v.TERMINATORLESS_TYPES=F.FLIPPED_ALIAS_KEYS.Terminatorless,v.COMPLETIONSTATEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.CompletionStatement,v.CONDITIONAL_TYPES=F.FLIPPED_ALIAS_KEYS.Conditional,v.LOOP_TYPES=F.FLIPPED_ALIAS_KEYS.Loop,v.WHILE_TYPES=F.FLIPPED_ALIAS_KEYS.While,v.EXPRESSIONWRAPPER_TYPES=F.FLIPPED_ALIAS_KEYS.ExpressionWrapper,v.FOR_TYPES=F.FLIPPED_ALIAS_KEYS.For,v.FORXSTATEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.ForXStatement,v.FUNCTION_TYPES=F.FLIPPED_ALIAS_KEYS.Function,v.FUNCTIONPARENT_TYPES=F.FLIPPED_ALIAS_KEYS.FunctionParent,v.PUREISH_TYPES=F.FLIPPED_ALIAS_KEYS.Pureish,v.DECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.Declaration,v.FUNCTIONPARAMETER_TYPES=F.FLIPPED_ALIAS_KEYS.FunctionParameter,v.PATTERNLIKE_TYPES=F.FLIPPED_ALIAS_KEYS.PatternLike,v.LVAL_TYPES=F.FLIPPED_ALIAS_KEYS.LVal,v.TSENTITYNAME_TYPES=F.FLIPPED_ALIAS_KEYS.TSEntityName,v.LITERAL_TYPES=F.FLIPPED_ALIAS_KEYS.Literal,v.IMMUTABLE_TYPES=F.FLIPPED_ALIAS_KEYS.Immutable,v.USERWHITESPACABLE_TYPES=F.FLIPPED_ALIAS_KEYS.UserWhitespacable,v.METHOD_TYPES=F.FLIPPED_ALIAS_KEYS.Method,v.OBJECTMEMBER_TYPES=F.FLIPPED_ALIAS_KEYS.ObjectMember,v.PROPERTY_TYPES=F.FLIPPED_ALIAS_KEYS.Property,v.UNARYLIKE_TYPES=F.FLIPPED_ALIAS_KEYS.UnaryLike,v.PATTERN_TYPES=F.FLIPPED_ALIAS_KEYS.Pattern,v.CLASS_TYPES=F.FLIPPED_ALIAS_KEYS.Class;const SA=v.IMPORTOREXPORTDECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration;v.EXPORTDECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.ExportDeclaration,v.MODULESPECIFIER_TYPES=F.FLIPPED_ALIAS_KEYS.ModuleSpecifier,v.ACCESSOR_TYPES=F.FLIPPED_ALIAS_KEYS.Accessor,v.PRIVATE_TYPES=F.FLIPPED_ALIAS_KEYS.Private,v.FLOW_TYPES=F.FLIPPED_ALIAS_KEYS.Flow,v.FLOWTYPE_TYPES=F.FLIPPED_ALIAS_KEYS.FlowType,v.FLOWBASEANNOTATION_TYPES=F.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,v.FLOWDECLARATION_TYPES=F.FLIPPED_ALIAS_KEYS.FlowDeclaration,v.FLOWPREDICATE_TYPES=F.FLIPPED_ALIAS_KEYS.FlowPredicate,v.ENUMBODY_TYPES=F.FLIPPED_ALIAS_KEYS.EnumBody,v.ENUMMEMBER_TYPES=F.FLIPPED_ALIAS_KEYS.EnumMember,v.JSX_TYPES=F.FLIPPED_ALIAS_KEYS.JSX,v.MISCELLANEOUS_TYPES=F.FLIPPED_ALIAS_KEYS.Miscellaneous,v.TYPESCRIPT_TYPES=F.FLIPPED_ALIAS_KEYS.TypeScript,v.TSTYPEELEMENT_TYPES=F.FLIPPED_ALIAS_KEYS.TSTypeElement,v.TSTYPE_TYPES=F.FLIPPED_ALIAS_KEYS.TSType,v.TSBASETYPE_TYPES=F.FLIPPED_ALIAS_KEYS.TSBaseType,v.MODULEDECLARATION_TYPES=SA;var is={},Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=xA;var er=d,as=ae;function xA(t,e){if((0,er.isBlockStatement)(t))return t;let r=[];return(0,er.isEmptyStatement)(t)?r=[]:((0,er.isStatement)(t)||((0,er.isFunction)(e)?t=(0,as.returnStatement)(t):t=(0,as.expressionStatement)(t)),r=[t]),(0,as.blockStatement)(r)}Object.defineProperty(is,"__esModule",{value:!0}),is.default=EA;var bA=Zt;function EA(t,e="body"){const r=(0,bA.default)(t[e],t);return t[e]=r,r}var ns={},tr={};Object.defineProperty(tr,"__esModule",{value:!0}),tr.default=AA;var PA=_e,gA=Rt;function AA(t){t=t+"";let e="";for(const r of t)e+=(0,gA.isIdentifierChar)(r.codePointAt(0))?r:"-";return e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(r,s){return s?s.toUpperCase():""}),(0,PA.default)(e)||(e=`_${e}`),e||"_"}Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=vA;var IA=tr;function vA(t){return t=(0,IA.default)(t),(t==="eval"||t==="arguments")&&(t="_"+t),t}var os={};Object.defineProperty(os,"__esModule",{value:!0}),os.default=wA;var CA=d,NA=ae;function wA(t,e=t.key||t.property){return!t.computed&&(0,CA.isIdentifier)(e)&&(e=(0,NA.stringLiteral)(e.name)),e}var rr={};Object.defineProperty(rr,"__esModule",{value:!0}),rr.default=void 0;var dt=d;rr.default=OA;function OA(t){if((0,dt.isExpressionStatement)(t)&&(t=t.expression),(0,dt.isExpression)(t))return t;if((0,dt.isClass)(t)?(t.type="ClassExpression",t.abstract=!1):(0,dt.isFunction)(t)&&(t.type="FunctionExpression"),!(0,dt.isExpression)(t))throw new Error(`cannot turn ${t.type} to an expression`);return t}var ls={},sr={},ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.default=ht;var DA=ce();const Pa=Symbol(),ga=Symbol();function ht(t,e,r){if(!t)return!1;const s=DA.VISITOR_KEYS[t.type];if(!s)return!1;r=r||{};const i=e(t,r);if(i!==void 0)switch(i){case Pa:return!1;case ga:return!0}for(const a of s){const n=t[a];if(n){if(Array.isArray(n)){for(const o of n)if(ht(o,e,r))return!0}else if(ht(n,e,r))return!0}}return!1}ht.skip=Pa,ht.stop=ga;var ar={};Object.defineProperty(ar,"__esModule",{value:!0}),ar.default=_A;var LA=U;const Aa=["tokens","start","end","loc","raw","rawValue"],kA=[...LA.COMMENT_KEYS,"comments",...Aa];function _A(t,e={}){const r=e.preserveComments?Aa:kA;for(const i of r)t[i]!=null&&(t[i]=void 0);for(const i of Object.keys(t))i[0]==="_"&&t[i]!=null&&(t[i]=void 0);const s=Object.getOwnPropertySymbols(t);for(const i of s)t[i]=null}Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=FA;var MA=ir,BA=ar;function FA(t,e){return(0,MA.default)(t,BA.default,e),t}Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=Be;var Ia=d,RA=be,jA=sr;function Be(t,e=t.key){let r;return t.kind==="method"?Be.increment()+"":((0,Ia.isIdentifier)(e)?r=e.name:(0,Ia.isStringLiteral)(e)?r=JSON.stringify(e.value):r=JSON.stringify((0,jA.default)((0,RA.default)(e))),t.computed&&(r=`[${r}]`),t.static&&(r=`static:${r}`),r)}Be.uid=0,Be.increment=function(){return Be.uid>=Number.MAX_SAFE_INTEGER?Be.uid=0:Be.uid++};var nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=void 0;var or=d,KA=ae;nr.default=UA;function UA(t,e){if((0,or.isStatement)(t))return t;let r=!1,s;if((0,or.isClass)(t))r=!0,s="ClassDeclaration";else if((0,or.isFunction)(t))r=!0,s="FunctionDeclaration";else if((0,or.isAssignmentExpression)(t))return(0,KA.expressionStatement)(t);if(r&&!t.id&&(s=!1),!s){if(e)return!1;throw new Error(`cannot turn ${t.type} to a statement`)}return t.type=s,t}var lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.default=void 0;var VA=_e,Z=ae;lr.default=us;const $A=Function.call.bind(Object.prototype.toString);function XA(t){return $A(t)==="[object RegExp]"}function YA(t){if(typeof t!="object"||t===null||Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null}function us(t){if(t===void 0)return(0,Z.identifier)("undefined");if(t===!0||t===!1)return(0,Z.booleanLiteral)(t);if(t===null)return(0,Z.nullLiteral)();if(typeof t=="string")return(0,Z.stringLiteral)(t);if(typeof t=="number"){let e;if(Number.isFinite(t))e=(0,Z.numericLiteral)(Math.abs(t));else{let r;Number.isNaN(t)?r=(0,Z.numericLiteral)(0):r=(0,Z.numericLiteral)(1),e=(0,Z.binaryExpression)("/",r,(0,Z.numericLiteral)(0))}return(t<0||Object.is(t,-0))&&(e=(0,Z.unaryExpression)("-",e)),e}if(typeof t=="bigint")return t<0?(0,Z.unaryExpression)("-",(0,Z.bigIntLiteral)(-t)):(0,Z.bigIntLiteral)(t);if(XA(t)){const e=t.source,r=/\/([a-z]*)$/.exec(t.toString())[1];return(0,Z.regExpLiteral)(e,r)}if(Array.isArray(t))return(0,Z.arrayExpression)(t.map(us));if(YA(t)){const e=[];for(const r of Object.keys(t)){let s,i=!1;(0,VA.default)(r)?r==="__proto__"?(i=!0,s=(0,Z.stringLiteral)(r)):s=(0,Z.identifier)(r):s=(0,Z.stringLiteral)(r),e.push((0,Z.objectProperty)(s,us(t[r]),i))}return(0,Z.objectExpression)(e)}throw new Error("don't know how to turn this value into a node")}var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=qA;var JA=ae;function qA(t,e,r=!1){return t.object=(0,JA.memberExpression)(t.object,t.property,t.computed),t.property=e,t.computed=!!r,t}var ps={};Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=HA;var va=U,WA=Gt;function HA(t,e){if(!t||!e)return t;for(const r of va.INHERIT_KEYS.optional)t[r]==null&&(t[r]=e[r]);for(const r of Object.keys(e))r[0]==="_"&&r!=="__clone"&&(t[r]=e[r]);for(const r of va.INHERIT_KEYS.force)t[r]=e[r];return(0,WA.default)(t,e),t}var ur={},Ca;function zA(){if(Ca)return ur;Ca=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=r;var t=ae,e=Ds();function r(s,i){if((0,e.isSuper)(s.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return s.object=(0,t.memberExpression)(i,s.object),s}return ur}var fs={};Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=GA;function GA(t){const e=[].concat(t),r=Object.create(null);for(;e.length;){const s=e.pop();if(s)switch(s.type){case"ArrayPattern":e.push(...s.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":e.push(s.left);break;case"ObjectPattern":e.push(...s.properties);break;case"ObjectProperty":e.push(s.value);break;case"RestElement":case"UpdateExpression":e.push(s.argument);break;case"UnaryExpression":s.operator==="delete"&&e.push(s.argument);break;case"Identifier":r[s.name]=s;break}}return r}var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.default=ds;var Ee=d;function ds(t,e,r,s){const i=[].concat(t),a=Object.create(null);for(;i.length;){const n=i.shift();if(!n||s&&((0,Ee.isAssignmentExpression)(n)||(0,Ee.isUnaryExpression)(n)||(0,Ee.isUpdateExpression)(n)))continue;if((0,Ee.isIdentifier)(n)){e?(a[n.name]=a[n.name]||[]).push(n):a[n.name]=n;continue}if((0,Ee.isExportDeclaration)(n)&&!(0,Ee.isExportAllDeclaration)(n)){(0,Ee.isDeclaration)(n.declaration)&&i.push(n.declaration);continue}if(r){if((0,Ee.isFunctionDeclaration)(n)){i.push(n.id);continue}if((0,Ee.isFunctionExpression)(n))continue}const o=ds.keys[n.type];if(o)for(let u=0;u<o.length;u++){const p=o[u],y=n[p];y&&(Array.isArray(y)?i.push(...y):i.push(y))}}return a}const QA={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};ds.keys=QA;var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),cr.default=void 0;var ZA=Ye;cr.default=e1;function e1(t,e){return(0,ZA.default)(t,e,!0)}var hs={};Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=r1;var oe=d;function t1(t){return(0,oe.isNullLiteral)(t)?"null":(0,oe.isRegExpLiteral)(t)?`/${t.pattern}/${t.flags}`:(0,oe.isTemplateLiteral)(t)?t.quasis.map(e=>e.value.raw).join(""):t.value!==void 0?String(t.value):null}function Na(t){if(!t.computed||(0,oe.isLiteral)(t.key))return t.key}function r1(t,e){if("id"in t&&t.id)return{name:t.id.name,originalNode:t.id};let r="",s;if((0,oe.isObjectProperty)(e,{value:t})?s=Na(e):(0,oe.isObjectMethod)(t)||(0,oe.isClassMethod)(t)?(s=Na(t),t.kind==="get"?r="get ":t.kind==="set"&&(r="set ")):(0,oe.isVariableDeclarator)(e,{init:t})?s=e.id:(0,oe.isAssignmentExpression)(e,{operator:"=",right:t})&&(s=e.left),!s)return null;const i=(0,oe.isLiteral)(s)?t1(s):(0,oe.isIdentifier)(s)?s.name:(0,oe.isPrivateName)(s)?s.id.name:null;return i==null?null:{name:r+i,originalNode:s}}var ys={};Object.defineProperty(ys,"__esModule",{value:!0}),ys.default=i1;var s1=ce();function i1(t,e,r){typeof e=="function"&&(e={enter:e});const{enter:s,exit:i}=e;ms(t,s,i,r,[])}function ms(t,e,r,s,i){const a=s1.VISITOR_KEYS[t.type];if(a){e&&e(t,i,s);for(const n of a){const o=t[n];if(Array.isArray(o))for(let u=0;u<o.length;u++){const p=o[u];p&&(i.push({node:t,key:n,index:u}),ms(p,e,r,s,i),i.pop())}else o&&(i.push({node:t,key:n}),ms(o,e,r,s,i),i.pop())}r&&r(t,i,s)}}var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=n1;var a1=Ye;function n1(t,e,r){if(r&&t.type==="Identifier"&&e.type==="ObjectProperty"&&r.type==="ObjectExpression")return!1;const s=a1.default.keys[e.type];if(s)for(let i=0;i<s.length;i++){const a=s[i],n=e[a];if(Array.isArray(n)){if(n.includes(t))return!0}else if(n===t)return!0}return!1}var Ss={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.default=u1;var o1=d,l1=Symbol.for("var used to be block scoped");function u1(t){return(0,o1.isVariableDeclaration)(t)&&(t.kind!=="var"||t[l1])}Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=p1;var wa=d,c1=pr;function p1(t){return(0,wa.isFunctionDeclaration)(t)||(0,wa.isClassDeclaration)(t)||(0,c1.default)(t)}var xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.default=h1;var f1=Kr(),d1=d;function h1(t){return(0,f1.default)(t.type,"Immutable")?!0:(0,d1.isIdentifier)(t)?t.name==="undefined":!1}var bs={};Object.defineProperty(bs,"__esModule",{value:!0}),bs.default=Es;var Oa=ce();function Es(t,e){if(typeof t!="object"||typeof e!="object"||t==null||e==null)return t===e;if(t.type!==e.type)return!1;const r=Object.keys(Oa.NODE_FIELDS[t.type]||t.type),s=Oa.VISITOR_KEYS[t.type];for(const i of r){const a=t[i],n=e[i];if(typeof a!=typeof n)return!1;if(!(a==null&&n==null)){if(a==null||n==null)return!1;if(Array.isArray(a)){if(!Array.isArray(n)||a.length!==n.length)return!1;for(let o=0;o<a.length;o++)if(!Es(a[o],n[o]))return!1;continue}if(typeof a=="object"&&!(s!=null&&s.includes(i))){for(const o of Object.keys(a))if(a[o]!==n[o])return!1;continue}if(!Es(a,n))return!1}}return!0}var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.default=y1;function y1(t,e,r){switch(e.type){case"MemberExpression":case"OptionalMemberExpression":return e.property===t?!!e.computed:e.object===t;case"JSXMemberExpression":return e.object===t;case"VariableDeclarator":return e.init===t;case"ArrowFunctionExpression":return e.body===t;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return e.key===t?!!e.computed:!1;case"ObjectProperty":return e.key===t?!!e.computed:!r||r.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":return e.key===t?!!e.computed:!0;case"ClassPrivateProperty":return e.key!==t;case"ClassDeclaration":case"ClassExpression":return e.superClass===t;case"AssignmentExpression":return e.right===t;case"AssignmentPattern":return e.right===t;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return r!=null&&r.source?!1:e.local===t;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return e.key!==t;case"TSEnumMember":return e.id!==t;case"TSPropertySignature":return e.key===t?!!e.computed:!0}return!0}var gs={};Object.defineProperty(gs,"__esModule",{value:!0}),gs.default=m1;var Fe=d;function m1(t,e){return(0,Fe.isBlockStatement)(t)&&((0,Fe.isFunction)(e)||(0,Fe.isCatchClause)(e))?!1:(0,Fe.isPattern)(t)&&((0,Fe.isFunction)(e)||(0,Fe.isCatchClause)(e))?!0:(0,Fe.isScopable)(t)}var As={};Object.defineProperty(As,"__esModule",{value:!0}),As.default=T1;var Da=d;function T1(t){return(0,Da.isImportDefaultSpecifier)(t)||(0,Da.isIdentifier)(t.imported||t.exported,{name:"default"})}var Is={};Object.defineProperty(Is,"__esModule",{value:!0}),Is.default=b1;var S1=_e;const x1=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function b1(t){return(0,S1.default)(t)&&!x1.has(t)}var vs={};Object.defineProperty(vs,"__esModule",{value:!0}),vs.default=g1;var E1=d,P1=Symbol.for("var used to be block scoped");function g1(t){return(0,E1.isVariableDeclaration)(t,{kind:"var"})&&!t[P1]}var Cs={},Ns={};Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=fr;var A1=Ye,Re=d,ws=ae,Os=Jt,I1=be;function fr(t,e){const r=[];let s=!0;for(const i of t)if((0,Re.isEmptyStatement)(i)||(s=!1),(0,Re.isExpression)(i))r.push(i);else if((0,Re.isExpressionStatement)(i))r.push(i.expression);else if((0,Re.isVariableDeclaration)(i)){if(i.kind!=="var")return;for(const a of i.declarations){const n=(0,A1.default)(a);for(const o of Object.keys(n))e.push({kind:i.kind,id:(0,I1.default)(n[o])});a.init&&r.push((0,ws.assignmentExpression)("=",a.id,a.init))}s=!0}else if((0,Re.isIfStatement)(i)){const a=i.consequent?fr([i.consequent],e):(0,Os.buildUndefinedNode)(),n=i.alternate?fr([i.alternate],e):(0,Os.buildUndefinedNode)();if(!a||!n)return;r.push((0,ws.conditionalExpression)(i.test,a,n))}else if((0,Re.isBlockStatement)(i)){const a=fr(i.body,e);if(!a)return;r.push(a)}else if((0,Re.isEmptyStatement)(i))t.indexOf(i)===0&&(s=!0);else return;return s&&r.push((0,Os.buildUndefinedNode)()),r.length===1?r[0]:(0,ws.sequenceExpression)(r)}Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=C1;var v1=Ns;function C1(t,e){if(!(t!=null&&t.length))return;const r=[],s=(0,v1.default)(t,r);if(s){for(const i of r)e.push(i);return s}}var La;function Ds(){return La||(La=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(t,"__internal__deprecationWarning",{enumerable:!0,get:function(){return sI.default}}),Object.defineProperty(t,"addComment",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"addComments",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"appendToMemberExpression",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"assertNode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"buildMatchMemberExpression",{enumerable:!0,get:function(){return rI.default}}),Object.defineProperty(t,"clone",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"cloneDeep",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"cloneNode",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"cloneWithoutLoc",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"createFlowUnionType",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"createTSUnionType",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ensureBlock",{enumerable:!0,get:function(){return dr.default}}),Object.defineProperty(t,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return _1.default}}),Object.defineProperty(t,"getFunctionName",{enumerable:!0,get:function(){return B1.default}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return M1.default}}),Object.defineProperty(t,"inheritInnerComments",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"inheritLeadingComments",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"inheritTrailingComments",{enumerable:!0,get:function(){return Je.default}}),Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(t,"inheritsComments",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(t,"is",{enumerable:!0,get:function(){return j1.default}}),Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return K1.default}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return U1.default}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return V1.default}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return $1.default}}),Object.defineProperty(t,"isNode",{enumerable:!0,get:function(){return X1.default}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return Y1.default}}),Object.defineProperty(t,"isPlaceholderType",{enumerable:!0,get:function(){return J1.default}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return q1.default}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return W1.default}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return H1.default}}),Object.defineProperty(t,"isType",{enumerable:!0,get:function(){return z1.default}}),Object.defineProperty(t,"isValidES3Identifier",{enumerable:!0,get:function(){return G1.default}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return Q1.default}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return Z1.default}}),Object.defineProperty(t,"matchesPattern",{enumerable:!0,get:function(){return eI.default}}),Object.defineProperty(t,"prependToMemberExpression",{enumerable:!0,get:function(){return G.default}}),t.react=void 0,Object.defineProperty(t,"removeComments",{enumerable:!0,get:function(){return Ne.default}}),Object.defineProperty(t,"removeProperties",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,"removePropertiesDeep",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return R1.default}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return Ls.default}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return ks.default}}),Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return mt.default}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return _s.default}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return hr.default}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"traverse",{enumerable:!0,get:function(){return yr.default}}),Object.defineProperty(t,"traverseFast",{enumerable:!0,get:function(){return F1.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return tI.default}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return J.default}});var r=Ot,s=Rr,i=WS(),a=qr,n=h;Object.keys(n).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===n[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return n[D]}})});var o=Xt,u=Wr,p=Hr,y=Jt;Object.keys(y).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===y[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return y[D]}})});var E=ae;Object.keys(E).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===E[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return E[D]}})});var P=be,g=Qr,N=Zr,A=es,O=ts,I=rs,C=Wt,B=Ht,K=zt,re=Gt,Je=Qt,Ne=ss,ne=v;Object.keys(ne).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===ne[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return ne[D]}})});var yt=U;Object.keys(yt).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===yt[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return yt[D]}})});var dr=is,Ls=ns,ks=Zt,mt=os,_s=rr,hr=tr,L=ls,j=nr,J=lr,R=ce();Object.keys(R).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===R[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return R[D]}})});var H=cs,ee=ps,G=zA(),z=ar,Q=sr,Pe=Yt,we=fs,_1=Ye,M1=cr,B1=hs,yr=ys;Object.keys(yr).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===yr[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return yr[D]}})});var F1=ir,R1=it,j1=nt(),K1=Ts,U1=Ss,V1=xs,$1=pr,X1=$t,Y1=bs,J1=Li(),q1=Ps,W1=gs,H1=As,z1=Kr(),G1=Is,Q1=_e,Z1=vs,eI=Lt,tI=Jr(),rI=Dt,Ms=d;Object.keys(Ms).forEach(function(D){D==="default"||D==="__esModule"||Object.prototype.hasOwnProperty.call(e,D)||D in t&&t[D]===Ms[D]||Object.defineProperty(t,D,{enumerable:!0,get:function(){return Ms[D]}})});var sI=$e,iI=Cs;t.react={isReactComponent:r.default,isCompatTag:s.default,buildChildren:i.default},t.toSequenceExpression=iI.default,process.env.BABEL_TYPES_8_BREAKING&&console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!")}(Fr)),Fr}var N1=Ds();const w1=(t,e)=>{const r=s=>{if(!s)return;s.type==="CallExpression"&&s.callee.type==="Identifier"&&s.callee.name==="render"&&e.push(s);const i=N1.VISITOR_KEYS[s.type]??[];for(const a of i){const n=s[a];if(Array.isArray(n))for(const o of n)o&&typeof o.type=="string"&&r(o);else n&&typeof n.type=="string"&&r(n)}};r(t)},ka=(t,e,r)=>{const s=[];if(w1(e,s),!s.length)return!1;const i=s.map(a=>({start:a.start??0,end:a.end??0})).filter(({start:a,end:n})=>a>=0&&n>a).sort((a,n)=>n.start-a.start);for(const{start:a,end:n}of i){const o=r.slice(a,n);t.overwrite(a,n,`__lithentRenderOnce(() => ${o})`)}return!0},O1=t=>t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="mount",D1=(t,e)=>{var i;const r=e.start??0,s=((i=e.typeAnnotation)==null?void 0:i.start)??e.end??0;return t.slice(r,s)},L1=(t,e)=>{if(!t)return"props";switch(t.type){case"Identifier":return t.name;case"ObjectPattern":case"ArrayPattern":return D1(e,t);default:return"props"}},_a=(t,e)=>{const r=[],s=i=>{if(i.type!=="VariableDeclaration"||i.declarations.length!==1)return;const a=i.declarations[0];if(!a.init||!O1(a.init)||a.init.arguments.length===0)return;const n=a.init.arguments[0];if(n.type!=="ArrowFunctionExpression"||n.body.type!=="BlockStatement")return;const o=n.body,u=n.params[1],p=L1(u,e),y=o.body.length>0?o.body[0].start??o.start??0:o.start??0,E=a.id&&a.id.type==="Identifier"?a.id.name:null,P=i.end??o.end??y;r.push({insertPos:y,propsExpression:p,componentName:E,declarationEnd:P})};for(const i of t.program.body){if(i.type==="VariableDeclaration"){s(i);continue}i.type==="ExportNamedDeclaration"&&i.declaration&&i.declaration.type==="VariableDeclaration"&&s(i.declaration)}return r},Ma=t=>{const e=gi(t),{match:r,targetExports:s,shouldTransform:i,importInsertionPos:a,headerSnippet:n}=e;if(!i||!r)return{transformed:!1,code:t.code,map:null};const o=_a(e.ast,t.code),u=Array.from(new Set(o.map(O=>O.componentName).filter(O=>!!O))),p=new St(t.code);ka(p,e.ast,t.code);const y=Us(s,u).trimStart();n&&p.appendLeft(a,n);const E=r.index>0?t.code[r.index-1]:void 0,P=r.index>0&&E!==`
|
|
238
|
+
`,N=(t.code[r.index+r[0].length]??null)===`
|
|
195
239
|
`?`
|
|
196
240
|
`:`
|
|
197
241
|
|
|
198
242
|
`,A=`${P?`
|
|
199
|
-
`:""}${y}${
|
|
243
|
+
`:""}${y}${N}`;return p.overwrite(r.index,r.index+r[0].length,A),Ii(p,o,t.code,a),{transformed:!0,code:p.toString(),map:p.generateMap({hires:!0})}},Ba=t=>{const e=Ai(t),{targetExports:r,shouldTransform:s,importInsertionPos:i,blockInsertionPos:a,headerSnippet:n,ast:o}=e;if(!s)return{transformed:!1,code:t.code,map:null};const u=_a(o,t.code),p=Array.from(new Set(u.map(A=>A.componentName).filter(A=>!!A))),y=new St(t.code);ka(y,o,t.code);const E=Us(r,p).trimStart(),P=a>0?t.code[a-1]:void 0,N=`${a>0&&P!==`
|
|
200
244
|
`?`
|
|
201
245
|
`:""}${E}
|
|
202
246
|
|
|
203
|
-
`;return!n&&!
|
|
247
|
+
`;return!n&&!N.trim().length?{transformed:!1,code:t.code,map:null}:(n?a===i?y.appendLeft(i,`${n}${N}`):(y.appendLeft(i,n),y.appendLeft(a,N)):y.appendLeft(a,N),Ii(y,u,t.code,i),{transformed:!0,code:y.toString(),map:y.generateMap({hires:!0})})},k1=t=>{const e=Ma(t);if(e.transformed)return e;const r={code:t.code,boundaryImportSpecifier:t.boundaryImportSpecifier,tagFunctionImportSpecifier:t.tagFunctionImportSpecifier};return Ba(r)};le.analyzeMarker=gi,le.analyzeNoMarker=Ai,le.shouldSkipTransform=Bo,le.transformWithHmr=k1,le.transformWithMarker=Ma,le.transformWithoutMarker=Ba,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
|
204
248
|
//# sourceMappingURL=lithentHmrParser.umd.js.map
|